Since version 5.2.4 ConceptBase features a new query evaluation method which uses a so-called cache to store intermediate results of predicates that are called during the query evaluation. Assume, for example, that an employee 'bill' has two projects 'p1' and 'p2'. Then, the result of a predicate '(bill hasProject x)' with variable x would be the set {(bill hasProject p1),(bill hasProject p2)}. We call this result set also the extension of the predicate.
After a completed predicate evaluation, the cache of the predicate holds its extension. The cache speeds up query evaluation and prevents infinite loops when ConceptBase evaluates recursive queries and deductive rules. Essentially, the cache-based evaluation allows to compute dynamically stratified semantics of the Datalog database underlying ConceptBase. Plenty of examples for recursive rules and queries are provided in the online ConceptBase Forum.
The ConceptBase server provides three cache modes to control the behavior during query evaluation:
Some statistics on cache usage are written to the terminal window of the ConceptBase server when the tracemode has been set to high or veryhigh.
Acknowledgements: Though developed independently, some ideas for realizing the cache-based query evaluator are similar to the implementation of the XSB System [http://xsb.sourceforge.net/]. In contrast to XSB's strategy of modify the Warren Abstract Machine, our modification to the SLDNF-style topdown evaluation is realized as a Prolog meta program using efficient data structures for the storage of the predicate extensions.