Repository navigation
tiny-datalog 0.3.0
Tabling with stratified negation. tiny-datalog-tabling now runs programs with not when they stratify: a negated subgoal's tables are completed one stratum down before they are read. Negation through recursion is still refused, with a pointer to --models for the well-founded semantics.
A friendlier library.
engine = run_program(rules, facts={"depends": [("app", "lib")], "service": ["app"]})
engine.query("exposed(S, C)") # [{'S': ..., 'C': ...}, ...]Course. Lesson 15 adds a section on what full SLG resolution adds, and eight queens as a worked example: tabling solves it in 0.4s, while plain bottom-up must build 2.5 million intermediate facts. benchmarks/generate.py queens N generates any board size.