From 5123a40466b67f2033955ec5717b28224e1d3ecb Mon Sep 17 00:00:00 2001 From: Robert Dodier Date: Mon, 16 Jan 2023 18:05:36 -0800 Subject: [PATCH] In package boolsimp, evaluate arguments of MCOND by MCOND-EVAL-SYMBOLS (which is what is called by "if") instead of MEVALATOMS. MEVALATOMS changes expressions but leaves the SIMP flag intact, which produces expressions which are not handled correctly by the simplifier, e.g. ((MPLUS SIMP) 1 1). MCOND-EVAL-SYMBOLS does not have that defect. --- share/contrib/boolsimp/boolsimp.lisp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/share/contrib/boolsimp/boolsimp.lisp b/share/contrib/boolsimp/boolsimp.lisp index 456caa624..a344dbd93 100644 --- a/share/contrib/boolsimp/boolsimp.lisp +++ b/share/contrib/boolsimp/boolsimp.lisp @@ -19,10 +19,6 @@ (remprop 'mcond 'translate) -; It's OK for MEVALATOMS to evaluate the arguments of MCOND. -; %MCOND already has this property. -(defprop mcond t evok) - ; X is an expression of the form ((OP) B1 G1 B2 G2 B3 G3 ...) ; where OP is MCOND or %MCOND, ; and B1, B2, B3, ... are boolean expressions, @@ -60,7 +56,7 @@ ((eq (car conditions) t) (meval (car consequences))) (t - (setq consequences (mapcar 'mevalatoms consequences)) + (setq consequences (mapcar #'(lambda (e) (mcond-eval-symbols #'meval1 e)) consequences)) ; Burn off SIMP flag, if any, when constructing the new CAAR (cons `(,(car op)) (apply 'append (mapcar #'(lambda (x y) `(,x ,y)) conditions consequences))))))) -- 2.11.4.GIT