I tried to create simple instances of the bug I found in wamcompiler. In fact, I can reproduce the bugs from the repl. Besides, I found another bug in the repl itself.
Bug 1 -- This is quite easy to fix, I believe.
~/wambugs/wamcompiler master •
› rlwrap ros run
* (load "wamcompiler.lisp")
* (repl)
> ?- !, write(passed), nl.
debugger invoked on a TYPE-ERROR in thread
#<THREAD "main thread" RUNNING {10005184C3}>:
The value
NIL
is not of type
NUMBER
when binding SB-KERNEL::X
To fix this bug, I believe that one should go to the send-query definition and fix the neck-cut snippet as shown below:
Bug 2 -- This one is tough for a person who is not familiar with the wam. By the way, I think that you had it right, since you added the definition of the takai predicate into prelude.pl. Since the takai predicate does not work because of this bug, I believe that wamcompiler was correct when you tested the prelude. Any way, here is a simple test for bug 2:
* (repl)
> ?- X is 42, X < 50, write(passed), nl.
passed
X = 42
yes.
> ?- X is 42, X < 50, !, write(passed), nl.
I tried to create simple instances of the bug I found in wamcompiler. In fact, I can reproduce the bugs from the repl. Besides, I found another bug in the repl itself.
Bug 1 -- This is quite easy to fix, I believe.
To fix this bug, I believe that one should go to the send-query definition and fix the neck-cut snippet as shown below:
Bug 2 -- This one is tough for a person who is not familiar with the wam. By the way, I think that you had it right, since you added the definition of the takai predicate into prelude.pl. Since the takai predicate does not work because of this bug, I believe that wamcompiler was correct when you tested the prelude. Any way, here is a simple test for bug 2: