Expand description
An easily embeddable, futures-friendly logic engine.
If you want to understand more about this implementation, see How to replace failure by a list of successes by Philip Wadler. This code does not follow that paper exactly (since we can encounter errors during resolution), but the general approach is the same.
Modules§
- util
- Miscellaneous utilities.
Structs§
- Clause
- A single rule or fact.
- Env
- An execution environment.
- Lit
- A literal value, e.g.
foo
,bar(1, 2)
, orbaz(X, a, X)
. - Rules
- A collection of rules or facts (as clauses).
- Subst
- A substitution.
Enums§
- Load
Error - An error loading a file.
- Resolution
Error - An error during resolution.
- Term
- A term, e.g.
even(X)
,30
,foo
, orBar
.