[Openmcl-devel] AnsiCL of ToDo

Gary Byers gb at clozure.com
Tue Sep 17 05:23:35 PDT 2002



On Tue, 17 Sep 2002, Christophe Rhodes wrote:

> On the wiki page, you wrote:
>
> >  My guess is that it'll generally be harder to find remaining
> >  compliance bugs than it will be to fix them.
>
> And, since this is somewhat like a red rag to a bull, here's an ANSI
> compliance bug report :-)
>
> The system (as of 0.13) doesn't understand the ATOM type specifier:
>
> (subtypep 'atom 'cons) -> NIL, NIL ; should be NIL, T
> (subtypep 'cons 'atom) -> NIL, NIL ; should be NIL, T
> (subtypep 'number 'atom) -> NIL, NIL ; should be T, T
> (subtypep 'null 'atom) -> NIL, NIL ; should be T, T
>
> According to the hyperspec (under Function SUBTYPEP):

In other words, a negated type specifier isn't as hairy as something
involving SATISFIES.  (Well, negation of something not involving SATISFIES
isn't, and I think that's true of things besides SUBTYPEP.)

? (subtypep 'cons '(not integer))
NIL
NIL

Whoops.

I hope that it took you at least several hours to find that; otherwise,
I'd have guessed wrong.

For extra credit:

? (deftype odd () '(satisfies oddp))
ODD
? (deftype even () '(not odd))
EVEN
? (subtypep 'even 'odd)
NIL
NIL

Clearly a legal answer, but ...

>
> Cheers,
>
> Christophe
>
> PS: Other ANSI bugs from the currently-open SBCL bugs list, some of which came
> via Peter van Eynde's ANSI(ish) test suite, include:
>
> * (defgeneric if (x)) should signal a PROGRAM-ERROR, not a SIMPLE-ERROR;
> * (symbol-macrolet ((x 'x)) (declare (special x)) ...) should signal
>   a PROGRAM-ERROR;
> * (read-byte 'foo) should signal a TYPE-ERROR, not a SIMPLE-ERROR
> * (typep 'x 'and) should not return T; 'and is not a synonym for AND
>

Thanks.  Where would one find Peter van Eynde's test suite ?

> I haven't looked at the ones sbcl has fixed, either, though I am currently
> going through them to see which are relevant to CMUCL...
> --
> 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)
>
> _______________________________________________
> Openmcl-devel mailing list
> Openmcl-devel at clozure.com
> http://clozure.com/cgi-bin/mailman/listinfo/openmcl-devel
>
>


_______________________________________________
Openmcl-devel mailing list
Openmcl-devel at clozure.com
http://clozure.com/cgi-bin/mailman/listinfo/openmcl-devel




More information about the Openmcl-devel mailing list