Documentation Index
Fetch the complete documentation index at: https://mintlify.com/HarvardPL/AbcDatalog/llms.txt
Use this file to discover all available pages before exploring further.
DatalogEngine is the primary interface for evaluating Datalog programs in AbcDatalog. You initialize an engine with a set of Clause objects representing both EDB facts (body-less clauses) and IDB rules, after which the engine derives all consequences and answers point queries or conjunctive queries against the fully-computed result.
Methods
init
The full program: a mix of body-less fact clauses and rules. Passed directly to the engine’s internal validator.
Calling
init a second time on the same engine instance throws IllegalStateException. Create a new engine instance if you need to evaluate a different program.query (single atom)
q. Variables in q act as wildcards.
The query pattern. May contain variables, which are treated as existential wildcards during unification.
The set of all ground facts derivable from the program that unify with
q. Returns an empty set if none match.query (conjunctive)
query and make the conjunction true with respect to the program. This is a default method implemented via ConjunctiveQueryHelper.
A conjunctive query: a list of positive atoms sharing variables across elements.
Each
ConstOnlySubstitution in the result maps the variables in query to constants. Apply a substitution to the query list using SubstitutionUtils.applyToPositiveAtoms to obtain a concrete solution.Code example
Concrete implementations
SemiNaiveEngine
Classic semi-naive bottom-up evaluation. Supports explicit unification and stratified negation. Also implements
DatalogEngineWithProvenance.ConcurrentBottomUpEngine
Multi-threaded bottom-up evaluation using a work-stealing thread pool.
ConcurrentChunkedBottomUpEngine
Concurrent bottom-up engine that processes derived facts in chunks for improved cache locality.
ConcurrentStratifiedNegationBottomUpEngine
Concurrent engine with support for stratified negation.
IterativeQsqEngine
Top-down query-sub-query (QSQ) evaluation using an iterative fixpoint loop.