
                   ALGERNON V3 SYNTAX

Definition
----------
  (:TAXONOMY s)                  Assert set-descriptor s.  A set-descriptor of form
                                 (t sd1 ... sdn t1 ... tm) asserts that set t has subsets
                                 described by set-descriptors sd1 ... sdn and members 
                                 t1 ... tm.

  (:SLOT s (s1 ... sn))          Declare slot s to be of arity n, with argument i a 
                                 member of set si.  Slot descriptors such as :cardinality
                                 and :inverse that used to be declared with :SLOT should
                                 now be asserted as relations, e.g. (cardinality isa 1).

  (:RULES  t r1 ... rn)          Add rules r1 ... rn to frame t. 
  (:SRULES t r1 ... rn)          Add slot rules r1 ... rn to frame t. 

Frame creation
--------------
  (:A ?x c1 ... cn)              Make new frame and assign to ?x such that (c1 ... cn). 
  (:A (?x type) c1 ... cn)       Make new frame of type 'type' such that (c1 ... cn).

  (:THE ?x c1 ... cn)            Find or create the ?x such that (c1 ... cn). 
  (:THE (?x type) c1 ... cn)     Find or create the ?x of type 'type' such that (c1 ... cn). 

  (:FORC ?x c1 ... cn)           Find or create an ?x such that (c1 ... cn). 
  (:FORC (?x type) c1 ... cn)    Find or create an ?x of type 'type' such that (c1 ... cn). 

Control
-------
  (:NO-COMPLETION c)             Suppresses rule completion while querying or asserting c.

  (:FAIL c1 ... cn)              Succeed if the query of (c1 ... cn) fails.   
  (:UNP c1 ... cn)               Same as :FAIL.

  (:BOUNDP var)                  Succeed iff the var is bound.
  (:UNBOUNDP var)                Succeed iff the var is not bound.

  (:TEST e)                      Succeed iff e does not evaluate to nil in lisp.

  (:NEQ t1 t2)                   Succeed iff NOT t1 = t2.  

  (:STOP)                        Halts execution and returns to the top level.

User interface
--------------
  (:ASK clause)                  Ask user for a value for the frame-slot in <clause>.  

  (:SHOW f)                      Display the contents of frame, slot, rule or facet f.  


General
-------

  (:ALL-PATHS P1 P2)             Succeed iff all substitutions for path P1 are 
                                 substitutions for P2. 

  (:BIND ?x e)                   Bind ?x to result of evaluating e (as a lisp expression).
                                 in slot s of frame t. 

  (:BRANCH ?x e)                 Bind ?x to each element in list resulting from the
                                 evaluation of e (as a lisp expression).

  (:CLEAR-SLOT f s)              Remove all values from slot s of frame f.

  (:DELETE (frame slot value))   Remove the specified value.

  (:EVAL e)                      Evaluate e as lisp form for side effects only.

  (:RETRIEVE clause)             Retrieve values but suppresses rule firings. 



Not implemented
---------------
  (:APPLY fun e)                         Apply lisp function fun to e. 
  (:ASSUME p)                            Assume p if can't prove not p. 
  (:BIND-TO-VALUES ?x t s)               Bind ?x to list of values (known with no assumptions)
  (:FUNCALL fun e)                       Apply lisp function fun to e. 
