On Wednesday 07 January 2009 11:08 you wrote:
> Hi Alexey,
>
> I'm happy you are working on logic algebra stuff, I will find it
> useful. I checked it on some old exam problems and it seems to work
> well.
>
> I found a small bug though:
>
> C1 : (not s) implies q;
> C2 : s or (not t);
> C1 and C2;
>
> the last line gives an error:
>
> Maxima encountered a Lisp error:
> Malformed property list: ($S)
> Automatically continuing.
> To reenable the Lisp debugger set *debugger-hook* to nil.
I'm not sure why it happens. Here's a minimal test case,
without loading "logic.mac":
nary ("nand",62)$
nary ("nor",61)$
infix ("implies",59)$
nary ("eq",58)$
nary ("xor",58)$
x nor (not y) or (not z);
It prints
Maxima encountered a Lisp error:
Error during processing of --eval option "(cl-user::run)":
malformed property list: ($Y).
Automatically continuing.
To reenable the Lisp debugger set *debugger-hook* to nil.
But if you add
nary ("OR",60)$
Then
y eq (not z) nand t nor (not x) OR (not t);
is OK.
I tried to tune the binding powers, but it doesn't make sense.
:lisp (setf *debugger-hook* nil)
x nor (not y) or (not z);
debugger invoked on a SIMPLE-ERROR in thread #<THREAD "initial thread"
RUNNING {BBC2AF9}>:
Error during processing of --eval option "(cl-user::run)":
malformed property list: ($Y).
Type HELP for debugger help, or (SB-EXT:QUIT) to exit from SBCL.
restarts (invokable by number or by possibly-abbreviated name):
0: [MACSYMA-QUIT] Maxima top-level
1: [CONTINUE ] Ignore and continue with next --eval option.
2: [ABORT ] Skip rest of --eval options.
3: Skip to toplevel READ/EVAL/PRINT loop.
4: [QUIT ] Quit SBCL (calling #'QUIT, killing the process).
((FLET #:LAMBDA139) #<SIMPLE-TYPE-ERROR {C6B5A91}>)
0] backtrace
0: ((FLET #:LAMBDA139) #<SIMPLE-TYPE-ERROR {C6B5A91}>)
1: ((FLET #:LAMBDA139) #<SIMPLE-TYPE-ERROR {C6B5A91}>)[:EXTERNAL]
2: (SIGNAL #<SIMPLE-TYPE-ERROR {C6B5A91}>)[:EXTERNAL]
3: (ERROR SIMPLE-TYPE-ERROR)[:EXTERNAL]
4: (GETF ($Y) -LABS NIL)
5: (QUEUE-P (MNOT $Y) #<unavailable argument>)
6: (BEG- (MNOT $Y) #<unavailable argument>)
7: (TRUEP #<unavailable argument>)
8: (ISP ($NOR $X (MNOT $Y)))
9: (MEVALP1 (($NOR) $X ((MNOT) $Y)))
10: (MEVALP (($NOR) $X ((MNOT) $Y)))
11: ((LAMBDA (FORM)) ((MOR) (($NOR) $X ((MNOT) $Y)) ((MNOT) $Z)))
12: (MEVAL1 #<unavailable argument>)
13: (MEVAL ((MOR) (($NOR) $X ((MNOT) $Y)) ((MNOT) $Z)))
14: (MEVAL* ((MOR) (($NOR) $X ((MNOT) $Y)) ((MNOT) $Z)))
15: (TOPLEVEL-MACSYMA-EVAL ((MOR) (($NOR) $X ((MNOT) $Y)) ((MNOT)
$Z)))
16: (CONTINUE #<SYNONYM-STREAM :SYMBOL SB-SYS:*STDIN* {910C7D9}> NIL)
17: (MACSYMA-TOP-LEVEL #<SYNONYM-STREAM :SYMBOL SB-SYS:*STDIN*
{910C7D9}> NIL)
18: (RUN)
19: (SB-INT:SIMPLE-EVAL-IN-LEXENV (RUN) #<NULL-LEXENV>)
20: (SB-IMPL::PROCESS-EVAL-OPTIONS ("(cl-user::run)"))
21: (SB-IMPL::TOPLEVEL-INIT)
22: ((LABELS SB-IMPL::RESTART-LISP))
--
Boomtime, Chaos 7 YOLD 3175
Alexey Beshenov http://beshenov.ru/