Database class final
An indexed collection of Prolog Rule definitions that can be queried.
Rules are indexed by head functor name for fast candidate lookup during goal resolution.
For example:
final db = Database.parse('parent(tom, bob). parent(bob, ann).');
final goal = Term.parse('parent(tom, X)');
for (final result in db.query(goal)) {
print(result); // parent(tom, bob)
}
- Annotations
-
- @immutable
Constructors
Properties
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
query(
Term goal) → Iterable< Node> -
Queries the database with
goal, yielding unified solution terms. -
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited