Common Lisp Package: GAMBOL

README:

FUNCTION

Public

PL-ASSERT (RULE)

add a rule to the end of the database for this functor

PL-ASSERTA (RULE)

add a rule to the beginning of the database for this functor

Undocumented

CLEAR-RULES (&OPTIONAL (FUNCTORS NIL))

CURRENT-RULEBASE

MAKE-RULEBASE

PL-RETRACT (GOALS)

PL-SOLVE-ALL (GOALS)

PL-SOLVE-NEXT (&OPTIONAL (CONT *LAST-CONTINUATION*))

PL-SOLVE-ONE (GOALS)

PL-SOLVE-REST (&OPTIONAL (CONT *LAST-CONTINUATION*))

Private

ADD-RULE-TO-INDEX (SKELETON FUNCTOR NUM-VARS)

add a rule to the end of the database for the functor

PUSH-RULE-TO-INDEX (SKELETON FUNCTOR NUM-VARS)

add a rule to the beginning of the database for the functor

Undocumented

ASSERTA? (GOAL)

ASSERTZ? (GOAL)

BUILD-BINDING-LIST (VARS ENV)

BUILD-MOLECULE (SKELETON)

CALCIFY (FORM ALIST)

CONTINUE-ON (CONT)

DO-CUT (CONT LEVEL)

DO-IS (MOLECULE)

DO-LISP-HOOK (MOLECULE)

DO-UNIFY (GOAL)

EXPAND-LISP-HOOKS (TERM ENV)

EXPAND-LOGICAL-VARS (EXP ENV &OPTIONAL (QUERY NIL))

FAIL-TRACE (GOAL)

FAIL? (GOAL)

FILTER-VARS (EXP)

GET-LISP-HOOK-VALUES (HOOK ENV)

GET-RULE-MOLECULES (FUNCTOR)

INDEX-RULE (SKELETON NUM-VARS)

LHS (BINDING)

LISP-HOOK? (GOAL)

LISP-QUERY? (GOAL)

MAKE-GOALS (GOALS)

MATCH-RULE-HEAD (GOAL GOALS PENDING-RULES LEVEL BACK)

NEW-GOALS (MOLECULE)

NUM-VARS (RULE)

PL-BIND (X X-ENV Y Y-ENV)

PL-SOLVE (GOALS)

PP-RULE (RULE)

PUSH-RULE (SKELETON NUM-VARS)

REMOVE-ALTERNATIVES (CONT LEVEL)

RETRACT-FACT (FACT)

RETRACT? (GOAL)

RHS (BINDING)

RULE-PART (RULE-PAIR)

SEARCH-RULES (GOALS RULES LEVEL BACK)

SHOW-BINDINGS (VARS ENVS)

SHOW-ONE-BINDING (BINDING)

SUBST-ALIST (ALIST TREE &KEY (TEST #'EQL))

SUCCEED (BACK)

SUCCEED-CONTINUE (GOAL GOALS RULE LEVEL BACK)

SUCCEED-TRACE (GOAL RULE BACK)

UNBIND-VAR (BINDING)

UNIFY (X X-ENV Y Y-ENV)

UNIFY1 (X Y)

UNIFY2 (X Y)

UNTRAIL (MARK)

X-VIEW-VAR (X ENV)

Y-VIEW-VAR (Y ENV)

MACRO

Public

Undocumented

*- (&REST RULE)

?- (&REST GOALS)

??- (&REST GOALS)

DO-SOLVE-ALL ((&REST VARS) GOALS &BODY BODY)

WITH-RULEBASE (RULEBASE &BODY BODY)

Private

Undocumented

ADD-NEW-VAR (VAR VARS)

ALL-PROLOG-RULES

ANON-VAR-NAME? (X)

ANON-VAR? (X)

BODY (RULE)

CONT-BACK (CONT)

CONT-GOALS (CONT)

CONT-LEVEL (CONT)

CONT-RULES (CONT)

CONT-TRACE (CONT)

CONT-TRAIL (CONT)

CUT? (GOAL)

FAIL-CONTINUE (GOAL BACK)

FILTER-NO (VALUE)

FUNCTOR (TERM)

GET-ENV (FUNCTOR)

GET-ENV-SIZE (FUNCTOR)

GET-PROLOG-RULES (FUNCTOR)

GOAL-BODY (GOAL)

GOAL-ENV (GOAL)

GOAL-FUNCTOR (GOAL)

IMPOSSIBLE? (ENV)

IS? (GOAL)

LEVEL-TAG? (GOAL)

LISP-HOOK-MOL? (GOAL)

LISP-QUERY-MOL? (GOAL)

LOOKUP-VAR (VAR ENV)

MAKE-CONT (GOALS RULES LEVEL BACK TRAIL TRACE)

MAKE-EMPTY-ENVIRONMENT (SIZE)

MAKE-MOLECULE (SKEL ENV)

MOL-ENV (MOLECULE)

MOL-SKEL (MOLECULE)

MOLECULE-P (EXP)

PL-BOUND? (X)

PRINCIPAL-FUNCTOR (RULE)

PUT-PROLOG-RULES (FUNCTOR RULES)

REMOVE-ALL-PROLOG-RULES

REMOVE-PROLOG-RULES (FUNCTOR)

RULE-BODY (MOLECULE)

RULE-ENV (MOLECULE)

RULE-HEAD (MOLECULE)

SET-ENV (FUNCTOR ENV)

UNIFY? (GOAL)

VAR-ENV (X)

VAR-INDEX (X)

VAR-NAME (X)

VAR-NAME? (X)

VAR? (X)

VARIABLE

Public

*LIPS*

logical inferences per second

*TRACING*

if t, tracing is turned on

Private

*AUTO-BACKTRACK*

return all solutions if true

*IMPOSSIBLE*

make impossible look nice

*INTERACTIVE*

true iff interacting with user

*LAST-CONTINUATION*

saved state of the system

*NUM-SLOTS*

number of logical variables in a query

*PROLOG-RULES*

hash table for prolog rule heads

*SOLVED*

make solved look nice

*TOP-LEVEL-ENVS*

saves top-level environments

*TOP-LEVEL-VARS*

saves top-level variable names

*TRAIL*

the trail, for backtracking

*X-ENV*

env for goals

*Y-ENV*

env for rules