#include <XSBPool.h>
Inheritance diagram for XSBPool::
The data is stored in an InMemoryPool and also as prolog facts in a file. The file is updated by the agent calling sync(), which it should do prior to any queries. In theory we could keep track of changes and update the file more efficiently and/or even assert() to the XSB pipe. In fact, XSB's compile/cache system is probably good enough for most apps.
We might want a flag about whether the database should be compiled.
Definition at line 24 of file XSBPool.h.
|
Get the first triple which matches the pattern, and then (on following calls) get the next matching triples. max_results is a hint which can improve performance if you know ahead of time that you will not be iterating more than some number of times. Reimplemented from TripleSource. |
|
Create a new query, trying to match the given pattern. The formal semantics of the query are "does the formula ('this') logically entail the formula 'pattern'?" (If it does, then I might want proof or maybe just some bindings.) The different kinds of queries one might want correspond to different kinds of logical entailment. If the query allows variables in the pattern to match constants in the pool (not just variables in the pool), that means the entailment proceedure includes existential instantiation. Variables in the pool matching constants in the pattern would be like "someone has a car" entailing "Sam has a car", which is probably not what you want.
Reimplemented from QueryablePool. |
|
Remove the given triple, if it happens to be present. No operation otherwise. Reimplemented from Pool. |
|
Replace any occurances of 'old' with 'replacement'. Caller should treat 'old' as if it had been released.
Reimplemented from Pool. |