There are several entry points provided for calling Prolog from Lisp. The main interface function is called
and has numerous options. The basic form is:
(logic <goal >
:return-type <return-type >
:all <all-type >
:bag-exp <bag-exp >)
The keyword arguments are interpreted as follows:
describes what to do with a solution when one is found. Possible values of
Display variable bindings and prompt user (the option used by the
Instantiate the goal expression and return it.
Instantiate < bag-exp > and return it.
Return an alist of variables and bindings.
The default is
tells what to do with multiple solutions. Possible values of
Return the first solution.
Return multiple solutions as multiple values.
Return a list of the solutions.
is an expression that should be instantiated with the bindings from a solution. This is only meaningful if
KnowledgeWorks and Prolog User Guide (Macintosh version) - 6 Dec 2011