matcher

Constant summary
+fail+ nil
Structure summary
merge-result
Method summary
instantiate-expression e &optional instantiations
instantiate-variables object &optional renamings
make-load-form (r merge-result) &optional env
rename-variables object &optional renamings
Function summary
assert-binding var val bindings
binding-val binding
binding-var binding
bindings->alist bs
bucket-difference l1 l2 &key (test (function eql))
copy-merge-result merge-result
create-vars list &optional (bindings +no-bindings+) (rename-variables t)
dotted-list? list
equalities? bindings
expression-introduce-variables facts &optional bindings (rename-variables t)
extend-bindings var val bindings
fail? x
fcg-length l
fcg-merge pattern source bindings &key (cutoff nil) (destructive t) (merge-fn (function fcg-merge))
get-binding var bindings
get-equalities bs
introduce-variables fact &optional bindings (rename-variables t)
lookup var bindings &optional prev-bindings
make-binding var val
make-dotted-list list &optional (last-cell (make-var (quote rest)))
make-merge-result expr bsl &optional (added nil)
make-mr &key expr (bsl (list +no-bindings+)) added moved
merge-bindings bs1 bs2
merge-bindings-lists bsl1 bsl2
merge-result-added merge-result
merge-result-bsl merge-result
merge-result-expr merge-result
merge-result-moved merge-result
merge-result-p object
merge-special pattern source bindings cutoff merge-fn &key (remove-special-operators t)
no-bindings? x
occurs-check var x bindings
remove-special-operators e bindings
reverse-bindings bs
reverse-renamings in renamings
safe-extend-bindings var val bindings
(setf binding-val) val
simple-unify-special x y bindings
substitute-bindings bindings x
unify x y &optional (bindings-list (list +no-bindings+))
unify-atom x y bindings
unify-simple x y &optional (bindings +no-bindings+)
unify-special x y bindings-list
unify-variable var x bindings
variables-in x
Macro summary
test-unify pattern source bsl
merge-result    [Structure]
merge-result-moved   merge-result  [Function]

Returns and (with setf) changes the moved of the specified merge-result

merge-result-added   merge-result  [Function]

Returns and (with setf) changes the added of the specified merge-result

merge-result-bsl   merge-result  [Function]

Returns and (with setf) changes the bsl of the specified merge-result

merge-result-expr   merge-result  [Function]

Returns and (with setf) changes the expr of the specified merge-result

make-mr   &key expr (bsl (list +no-bindings+)) added moved  [Function]

Returns a newly created merge-result.

copy-merge-result   merge-result  [Function]

Returns a copy of the specified merge-result.

merge-result-p   object  [Function]

Returns T if the specified object is of type merge-result.

var   (quote (and symbol (satisfies variable-p)))  [Type]
binding   (quote (cons))  [Type]
bindings   (quote (or (satisfies fail?) (satisfies no-bindings?) cons))  [Type]
bindings-list   (quote (or null cons))  [Type]
+fail+   nil  [Constant]
+no-bindings+    [Variable]
*occurs-check*    [Variable]
rename-variables   object &optional renamings  [Generic function]

Rename all variables that occur in the object to new unique variables and return the result. The renamings used (an alist) is returned as second value.

instantiate-variables   object &optional renamings  [Generic function]

Rename all variables that occur in the object to new unique constants and return the result. The renamings used (an alist) is returned as second value.

instantiate-expression   e &optional instantiations  [Generic function]
make-load-form   (r merge-result) &optional env  [Method]
bucket-difference   l1 l2 &key (test (function eql))  [Function]
fail?   x  [Function]

Test whether x is eq to the constant +fail+

no-bindings?   x  [Function]

Test whether x is eq to the constant +no-bindings+

variables-in   x  [Function]

Returns a list of all variables contained in x. X can be anything, but only if it is a variable or a tree of which one of the leafs is a varibale something is returned, i.e. for example the contents of a struct is not checked.

make-binding   var val  [Function]
binding-val   binding  [Function]

Returns the value of binding (the cdr)

binding-var   binding  [Function]

Returns the variable of binding (the car)

get-binding   var bindings  [Function]

Returns a binding (a cons cell of the form (var . value)) for the variable var as specified in bindings or NIL if var is unbound in bindings.

lookup   var bindings &optional prev-bindings  [Function]

Returns the value to which var is bound in bindings or NIL if it is unbound.

extend-bindings   var val bindings  [Function]

Adds the binding of var to val to bindings.

safe-extend-bindings   var val bindings  [Function]

Adds the binding of var to val to bindings but checks whether there is not already a different binding.

assert-binding   var val bindings  [Function]

Assures that var is bound to val in binding, even if it was bount to something else (in which case the binding is changed.

reverse-bindings   bs  [Function]
bindings->alist   bs  [Function]

Does nothing for now because bindings are actually implemented as alist, but is here in case we would like to change this.

merge-bindings   bs1 bs2  [Function]

Merges the bindings bs1 and bs2. If there are conflicting bindings than +fail+ is returned.

merge-bindings-lists   bsl1 bsl2  [Function]

Returns a bindings-list (a list of bindings) which is the union of all possible successful pairwise merges of bindings in bsl1 and bsl2

equalities?   bindings  [Function]

Returns a list of lists of variables that are equal according to bindings

substitute-bindings   bindings x  [Function]

Substitute all variables in x with their binding as specified in bindings.

create-vars   list &optional (bindings +no-bindings+) (rename-variables t)  [Function]

Extend bindings with variables for every element in list.

introduce-variables   fact &optional bindings (rename-variables t)  [Function]

Introduces variables for each but the first element of fact.

expression-introduce-variables   facts &optional bindings (rename-variables t)  [Function]
get-equalities   bs  [Function]

Return a list of all equalities, i.e. bindings of variables to other variables.

reverse-renamings   in renamings  [Function]
occurs-check   var x bindings  [Function]

Check whether the variable var or its value according to bindings occurs in x.

unify-variable   var x bindings  [Function]
simple-unify-special   x y bindings  [Function]
unify-atom   x y bindings  [Function]
unify-simple   x y &optional (bindings +no-bindings+)  [Function]
unify-special   x y bindings-list  [Function]
unify   x y &optional (bindings-list (list +no-bindings+))  [Function]
make-merge-result   expr bsl &optional (added nil)  [Function]
merge-special   pattern source bindings cutoff merge-fn &key (remove-special-operators t)  [Function]
remove-special-operators   e bindings  [Function]
fcg-length   l  [Function]

Quick hack to solve a problem...

dotted-list?   list  [Function]

Checks whether the list is a dotted list.

make-dotted-list   list &optional (last-cell (make-var (quote rest)))  [Function]

Creates a dotted-list: (make-dotted-list '(a b)) -> (a b . ?rest-1)

fcg-merge   pattern source bindings &key (cutoff nil) (destructive t) (merge-fn (function fcg-merge))  [Function]

The merger will find the minimal expansion of source so that it unifies with the given pattern.

(setf binding-val binding)   (val)  [Setf function]
test-unify   pattern source bsl  [Macro]