Zenith Logic Foundry

Interface: Prolog REPL

target/release/zlf repl [db_path]

Opens or reopens a database at db_path (default from configuration). The REPL reads facts, rules, directives, and queries:

node(alice, [person], { name: "Alice" }).
knows(alice, bob).
friend(X, Y) :- knows(X, Y).
? knows(alice, Who).
? retract(knows(alice, bob)).

Examples

? person(X).
? property(X, name, Value).
? bm25("软件", Node, Score).
node(alice, [person], { name: "Alice" }).
edge(alice, knows, bob, { since: 2024 }).
impart(zlf, katurupi, tongtong).
friend(X, Y) :- knows(X, Y).
? retract(person(alice)).
? retract(edge(alice, knows, bob)).
? retract(prop_name(alice, _)).
? retract(impart(zlf, _, _)).

Output

A successful ground query has no variable bindings and prints as [{}]. Queries with variables print a JSON array of binding objects. Errors print error: <message>.