qq: make_array('any,4) => {Lisp Array: #(NIL NIL NIL NIL)}
rr: make_array('any,4) => {Lisp Array: #(NIL NIL NIL NIL)}
ss: make_array('any,4) => {Lisp Array: #(NIL NIL NIL NIL)}
qq[2]:3$
rr[1]:5$
ss[2]:3$
qq => {Lisp Array: #(NIL NIL 3 NIL)}
rr => {Lisp Array: #(NIL 5 NIL NIL)}
ss => {Lisp Array: #(NIL NIL 3 NIL)}
is(equal(qq,ss)) => true
is(equal(qq,rr)) => unknown << should be false
alike1
correctly returns T and NIL in these cases, but array-meqp
messes up.
ARRAY-MEQP calls MEQP, and MEQP is the one saying it doesn't know if NIL is equal to 5.
So from what I can tell the bug is in MEQP.
I'm kind of confused by the comments. The problem isn't in ALIKE1, right? ALIKE1 correctly returns
true
orfalse
. "Evidence that the array comparison in alike1 isn't used anywhere" ... what?? I don't get it. If it's incorrect we should fix it. But anyway ALIKE1 is correct in this case.Diff:
You're right. I've removed the incorrect comment.
I think I can fix this if we figure out what's the correct result for comparisons to
true
andfalse
.Considering
is(equal(x, b))
whereb
is a Boolean value (true
orfalse
) andx
is anything other than a Boolean value, I guess we want that to betrue
if and only ifx
is known to be equal tob
(viaassume(equal(x, true))
orassume(equal(x, false))
, unless I've overlooked another way to declare a value),false
if and only ifx
is known to be not equal tob
(either by itsassume
value or becausex
is known to be a non-Boolean value), and undetermined otherwise. Does that sound right?