[Openmcl-devel] AnsiCL of ToDo

Christophe Rhodes csr21 at cam.ac.uk
Tue Sep 17 12:39:07 UTC 2002

On Tue, Sep 17, 2002 at 06:23:35AM -0600, Gary Byers wrote:
> 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.)

No, it's not as bad as all that; NIL, NIL is an acceptable thing to
return with (NOT <foo>) types, with the exception of ATOM, which has to
be recognized as a special case as it's a standard CL type.

> ? (subtypep 'cons '(not integer))
> Whoops.

My reading of the CLHS allows this from a conforming implementation
(though, as it happens, sbcl returns T, T for this :-)

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

Sorry -- I remember how much time I and Bill Newman took to fix it in
sbcl, so it was my first try. :-)

> > 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
> > * (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 ?

There's a version in clocc, I believe; there's also a locally-hacked
version in the sbcl sources. It's not as useful as it could be, sadly,
because some of the answers are misleading or plain wrong, so it has to
be read with a pinch of salt; also, it doesn't probe some areas terribly
deeply (e.g. pathnames, when there are internal consistency requirements
but they're hard to probe without implementation-specific knowledge).

I mentioned that I'm currently going through the sbcl BUGS file; this is
because the sbcl and cmucl teams are in the process of setting up a
shared bug database (on the basis that the two implementations share an
awful lot of code). It's entirely possible that some of the corner cases
might similarly be wrong in openmcl, so it might be worth perusing at
some point, and possibly joining in. (non-permanent) URL on request,
though it's not excessively full of data yet.


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

More information about the Openmcl-devel mailing list