Update of /project/cl-unification/cvsroot/cl-unification In directory cl-net:/tmp/cvs-serv19119
Modified Files: apply-substitution.lisp Log Message: Fixed a couple of snags. APPLY-SUBSTITUTION was not applied recursively and it was barfing on numbers. Current version is still incomplete, but it serves as a template for further development.
--- /project/cl-unification/cvsroot/cl-unification/apply-substitution.lisp 2009/04/15 10:05:58 1.3 +++ /project/cl-unification/cvsroot/cl-unification/apply-substitution.lisp 2009/04/17 07:52:25 1.4 @@ -17,6 +17,11 @@ (defgeneric apply-substitution (substitution item &optional exclude-vars))
+(defmethod apply-substitution ((s environment) (n number) &optional exclude-vars) + (declare (ignore exclude-vars)) + n) + + (defmethod apply-substitution ((substitution environment) (s symbol) &optional (exclude-vars ())) (declare (type list exclude-vars)) @@ -26,7 +31,7 @@ s (multiple-value-bind (val foundp) (find-variable-value s substitution) - (cond (foundp val) + (cond (foundp (apply-substitution substitution val exclude-vars)) (t (warn "~S is a free variable in the current environment." s) s))))
cl-unification-cvs@common-lisp.net