abstract sclass AbstractThoughtSpace implements AI_PostHandler { AbstractThoughtSpace parent; *() {} *(AbstractThoughtSpace *parent) {} // take unshortened queries abstract L> get(Symbol query); abstract L> get(Symbol query, int position); abstract L getTriples(Symbol query); abstract L getTriples(Symbol query, int position); abstract L getOneTwo(Symbol a, Symbol b); // existence of triple has already been checked public abstract GlobalID postTriple(T3 t); abstract int size(); // doesn't take variables public bool hasTriple(Symbol a, Symbol b, Symbol c) { ret findTriple(a, b, c) != null; } // doesn't take variables public TripleWeb findTriple(Symbol a, Symbol b, Symbol c) { L l = shortestList3(getTriples(a, 0), getTriples(b, 1), getTriples(c, 2)); if (l != null) for (TripleWeb w : l) if (w != null && tripleEqic(w, a, b, c)) ret w; null; } public bool hasTriple_verified(Symbol a, Symbol b, Symbol c) { L l = shortestList3(getTriples(a, 0), getTriples(b, 1), getTriples(c, 2)); if (l != null) for (TripleWeb w : l) if (w != null && w.verified() && tripleEqic(w, a, b, c)) true; false; } }