InMemoryDatalogEngine class
In-memory Datalog engine for testing and small programs.
- Implemented types
Constructors
- InMemoryDatalogEngine({int maxIterations = 100000})
- Creates an in-memory Datalog engine.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- maxIterations → int
-
Maximum iterations before termination (prevents infinite loops).
final
- reachedMaxIterations → bool
-
Whether the last run() reached the iteration limit.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- totalIterations → int
-
Total iterations performed during the last run().
no setter
Methods
-
addRule(
DatalogRule rule) → void - Adds a rule to the engine.
-
clear(
) → void -
Clears all facts.
override
-
loadFacts(
List< Fact> facts) → void -
Loads facts into the engine.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
query(
String relationName) → List< List< Object> > -
Queries a relation and returns matching tuples.
override
-
run(
) → void -
Runs the Datalog program to compute derived facts.
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited