From: Håkon Alstadheim
Subject: clocc ansi-test
Date: 
Message-ID: <m0vg9ximjg.fsf@alstadhome.online.no>
I'm playing around with ansi-test from clocc
<http://clocc.sourceforge.net/> (clocc-05-04-02.tgz snapshot). One of
the first errors it reports on my cmucl is 

> ERROR!! (BUGID=:ALLTEST-LEGACY-391) Got NIL solution T expected!
> interpreted Form: (FUNCTIONP (QUOTE ATOM))
> Should be: T
> CMUCL: NIL
> 
 
The test that produces this is 
 
> (check-for-bug :alltest-legacy-391
>   (functionp 'atom)
>   #-(or cltl2 clisp) t
>   #+(or cltl2 clisp) nil)
> 

I do not have clisp, and :cltl2 is not in my *features*, so evidently
ansi-test is expecting T from (functionp 'atom), but getting NIL.
 
The hyperspec has this (and more) to say about functionp:

> Description:
> 
> Returns true if object is of type function; otherwise, returns false.
> 
> Examples:
> 
> (functionp 'append) => false
> (functionp #'append) => true
> 

Now, the result cmucl gives me is clearly in accordance with the
hyperspec (i.e. 'atom does not give a function, even though #'atom
does). 

This started me wondering whether the feature CLTL2 is something that
is mandated by ANSI? But then a much simpler test would suffice, so
this can not be the case. Does the name of the test, ("xx-LEGACY-NN")
indicate that this test *should* in fact fail? But then this passage
from the README makes no sense:

>  Thus, if ansi-test thinks your Lisp
> is compliant, it will still produce a lot of output on the
> console, but no "ERROR!!" messages; 


Have I found a bug in ansi-test? Can I expect more bugs like this one
in ansi-test?

I'm planning on working my way through all the errors I get from
ansi-test as a way of familiarising myself with lisp, so expect more
of my rambling posts in the future.

-- 
H�kon Alstadheim, hjemmepappa.

From: Christophe Rhodes
Subject: Re: clocc ansi-test
Date: 
Message-ID: <sq661x4976.fsf@lambda.jcn.srcf.net>
······@online.no (H�kon Alstadheim) writes:

> I'm playing around with ansi-test from clocc
> <http://clocc.sourceforge.net/> (clocc-05-04-02.tgz snapshot). One of
> the first errors it reports on my cmucl is 
> 
> > ERROR!! (BUGID=:ALLTEST-LEGACY-391) Got NIL solution T expected!
> > interpreted Form: (FUNCTIONP (QUOTE ATOM))
> > Should be: T
> > CMUCL: NIL
> > 
>  
> The test that produces this is 
>  
> > (check-for-bug :alltest-legacy-391
> >   (functionp 'atom)
> >   #-(or cltl2 clisp) t
> >   #+(or cltl2 clisp) nil)
> > 
> 
> 
> Have I found a bug in ansi-test? Can I expect more bugs like this one
> in ansi-test?

Yes, unfortunately, though it's not a completely obvious one. The
problem is that implementations' *features* have changed over time.

CMUCL, which dates from before the ANSI standard was finalized, used
to have :CLTL2 on its features (which of late was illegal, as it no
longer purported to be a cltl2-compliant lisp, but rather an
ANSI-compliant lisp). Other variants of this feature are also "in the
wild", such as :X3J13. The test above really should treat
  (functionp 'atom) -> nil
as correct, but presumably the clocc-ansi-test has _also_ been
evolving over the same timescale, and you happen to have caught it at
a time when an assumption it made about implementations is no longer
true.

As for the features mandated by ANSI, see 

<URL:http://www-2.cs.cmu.edu/Groups/AI/html/hyperspec/HyperSpec/Body/var_stfeaturesst.html>

Cheers,

Christophe
-- 
Jesus College, Cambridge, CB5 8BL                           +44 1223 510 299
http://www-jcsu.jesus.cam.ac.uk/~csr21/                  (defun pling-dollar 
(str schar arg) (first (last +))) (make-dispatch-macro-character #\! t)
(set-dispatch-macro-character #\! #\$ #'pling-dollar)
From: Håkon Alstadheim
Subject: Re: clocc ansi-test
Date: 
Message-ID: <m0r8kkj410.fsf@alstadhome.online.no>
Christophe Rhodes <·····@cam.ac.uk> writes:

> ······@online.no (H�kon Alstadheim) writes:
> 
> > 
> > Have I found a bug in ansi-test? Can I expect more bugs like this one
> > in ansi-test?
> 
> Yes, unfortunately, though it's not a completely obvious one. The
> problem is that implementations' *features* have changed over time.
>

[...]

> 
> <URL:http://www-2.cs.cmu.edu/Groups/AI/html/hyperspec/HyperSpec/Body/var_stfeaturesst.html>
> 

Thanks for that pointer. 

Looking more closely at the failure, and at the features listed in the
link above, I get the feeling tat ansi-test is not just ANSI-test,
but rather is/used to be a more general-purpose lisp-test. Is it a
stated purpose of the ansi-test to be able to conformance-test cltl2
and cltl1 as well as ANSI-CL? Or, more likely, is it a stated goal for
the ansi-test to be just that and simply slaughter all other lisps?
Should the conditional compilation stuff simply be removed?

It seems to me that a CLTL1 conforming lisp *should* fail a whole slew
of ansi-tests. Inserting conditional compilation macros to make a
cltl1-lisp pass an ansi test seems to me quite bizarre.

P.S: I just subscribed to the clocc mailing-lists at source-forge, I
guess I'll continue this series there. Next up is
ALLTEST-EQUALP-STRING-HASH, which is even more of a mystery to me than
ALLTEST-LEGACY-391 has been.
-- 
H�kon Alstadheim, hjemmepappa.