Expand description
Functions for Prolog-style logic programming: unification, SLD resolution, parsing.
Functionsยง
- apply_
subst - Apply a substitution to a term, recursively dereferencing variables.
- load_
standard_ predicates - Populate a database with classic Prolog predicates: member/2, append/3, reverse/3, length/2, last/2.
- occurs_
check - Check whether variable
varoccurs intermunder substitutionsubst. - parse_
clause - Parse a Horn clause from a string:
head :- b1, b2.orhead. - parse_
term - Parse a simple Prolog term from a string.
- resolve
- Collect all solutions to a query using SLD resolution.
- solve_
one - Solve the query, returning the first solution or failure.
- term_
to_ string - Pretty-print a term to a Prolog-style string.
- unify
- Compute the most general unifier of
t1andt2undersubst. - unify_
with_ occurs_ check - Unify with the occurs check enabled (sound but slower).