From: Utz-Uwe Haus Date: Tue, 22 Jun 2010 15:21:43 +0000 (+0200) Subject: Avoid double mapping from symbolic literals to variables in CNF creation X-Git-Url: https://repo.or.cz/w/cl-satwrap.git/commitdiff_plain/a4db34804749d120a5e93fa8c07e17294dc22279 Avoid double mapping from symbolic literals to variables in CNF creation Signed-off-by: Utz-Uwe Haus --- diff --git a/satwrap.lisp b/satwrap.lisp index 4b2f6fe..116b7b2 100644 --- a/satwrap.lisp +++ b/satwrap.lisp @@ -421,11 +421,11 @@ Supports :IMPLY, :IFF, binary :XOR, and :NOR. " (clean-clauses (cnf) ;; destructively apply MAPPING (if (atomic cnf) - (setf cnf (funcall mapping cnf)) + (setf cnf cnf) (setf (cdr cnf) ;; we must be looking at an AND (loop :for clause :in (cdr cnf) :if (atomic clause) - :collect (funcall mapping clause) + :collect clause :else :if (not (trivial-clausep clause)) :collect `(:OR ,@(remove-duplicates (cdr clause)