sclass ActualThoughtSpace extends AbstractThoughtSpace implements AI_PostHandler, AI_CacheChecker { new TripleIndex index; int limit; // 0 = no limit *() {} *(int *limit) {} // existence of triple has already been checked public S postTriple(T3 t) { if (limitReached()) fail("Thought space limit reached"); TripleWeb w = tripleWeb(t); index.addTriple(w); ret w.globalID(); } bool limitReached() { ret limit > 0 && size() >= limit; } L get(S s) { ret index.get(ai_shortenForIndex(s)); } int size() { ret l(websByID); } }