Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

types and type algebra in sbcl and cmucl

59 views
Skip to first unread message

jimka

unread,
Dec 17, 2008, 5:35:40 PM12/17/08
to
Can someone recommend a source i can read that explains the type
system and hopefully the type inferencer in cmucl and sbcl.

D Herring

unread,
Dec 17, 2008, 9:32:34 PM12/17/08
to
jimka wrote:
> Can someone recommend a source i can read that explains the type
> system and hopefully the type inferencer in cmucl and sbcl.

I'm no SBCL expert, but take a look at sbcl/src/code/*type*.lisp

Are you looking for stuff like numeric-contagion in late-type.lisp or
where you asking another question?

- Daniel

Thomas F. Burdick

unread,
Dec 18, 2008, 6:14:36 AM12/18/08
to
On 17 déc, 23:35, jimka <ji...@rdrop.com> wrote:
> Can someone recommend a source i can read that explains the type
> system and hopefully the type inferencer in cmucl and sbcl.

The type system used internally in SBCL is exactly the same
implementation of the ANSI CL type system available to user programs.
This means that the type system per se is described in Chapter 4 of
the spec. What this means for user programs is described in section
3.2 of the SBCL manual, "Handling of Types". The description of the
compiler in the paper "Design of CMU Common Lisp", edited by Rob
MacLachlan, is still largely relevant to SBCL. Chapters 9 and 10
describe the handling of types, although they may be less than
comprehensible without reading the preceding chapters on the ICR
representation.

jimka

unread,
Dec 18, 2008, 4:32:52 PM12/18/08
to
I'm interesting in reading about how the type algebra works and
and how the reasoning about types is done. How does python
look at code and reach conclusions about the types? I imagine
it is very complicated, but probably some parts are approachable...

-jim

jimka

unread,
Dec 18, 2008, 4:37:31 PM12/18/08
to
the paper "Design of CMU Common Lisp" is a great reference. thanks
for the pointer.

Thomas F. Burdick

unread,
Dec 19, 2008, 10:12:23 AM12/19/08
to
On 18 déc, 22:37, jimka <ji...@rdrop.com> wrote:
> the paper "Design of CMU Common Lisp" is  a great reference.  thanks
> for the pointer.

It really is, and should probably be pointed out more widely to people
who want to understand the general approach taken by SBCL and CMUCL to
figuring things out about their code. Some particulars have changed,
but the essence of Python is explained there.

It's too bad the document was never finished, but that's the way
things go. I'm glad the community focused on keeping the
implementation alive and moving forward, rather than finishing the
internals documentation.

The now departed encyCMUCLopedia had a number of other interesting
things in it, but this (along with the Hemlock command implementor's
manual) was the real gem. I guess it shows in their still being among
the CMUCL documentation.

0 new messages