Announcing the CHICKEN Scheme-to-C compiler

566 views
Skip to first unread message

felix

unread,
Jul 20, 2000, 3:00:00 AM7/20/00
to
CHICKEN compiles a subset of R5RS into C. The goal was to implement a
Scheme compiler that follows the ideas given in Henry Baker's paper
"Cheney on the MTA". CHICKEN is quite small and easy to extend,
so it might be a start for everybody interested in hacking a compiler.
This is *not* a production quality/high-performance system. The
speed of the generated code is "reasonable", which means: faster than
most interpreters.
CHICKEN is quite portable, since it generates straightforward C code
that can be compiled to a standalone executable. The system was developed
on Cygwin/gcc and later Visual C++ 5.0 under Windows98 and should work
on most platforms and with most C compilers.

Features:

- Has most of R5RS plus SRFIs 0, 1, 6, and 8, Wright's MATCH package and
some extras
- A generational garbage-collector (youngest generation on the C-stack)
- Efficient first-class continuations with full support for multiple values
- Compiles into relatively portable C (32-bit ints, downward growing stack
and 'alloca')
- Easy access to C-functions and -macros
- The compiler is about 3000 lines of code and should be not too difficult
to extend/hack/port/etc.
- CHICKEN is free and distributed under the GNU General Public License

Limitations:

- Only numeric types supported are fixnum (30-bit) and flonum (64-bit
double)
- Some numeric routines are missing, some are not exactness preserving
- Floating-point printing/reading uses C-library and is not overly
sophisticated
- The FFI is only minimal, yet
- No module system and no OOP-support
- Access to Scheme from C (callbacks) is relatively complicated

CHICKEN is quite stable. It compiles all Gabriel/Clinger benchmarks,
Jaffer's
r4rstest (doesn't give too much trouble) and itself (compiler and
libraries).

Of course a lot of work has yet to be done to make this a reliable Scheme
system, but perhaps it might already be useful for someone.

Anybody interested can download the system at:

<www.anu.ie/felix/chicken.html>
(BTW, my apologies for the state of the documentation)

Comments, suggestions and bug-reports would be very welcome!


felix


felix

unread,
Jul 20, 2000, 3:00:00 AM7/20/00
to
And here is the first round of bugfixes already!

I have added a makefile to the distribution, so
anybody *still* interested should go ahead now
and download the thing at

<www.anu.ie/felix/chicken.html>


felix


Elliott Oti

unread,
Jul 25, 2000, 3:00:00 AM7/25/00
to
Here is your first bugreport :-)

I compiled Chicken with mingw32 (gcc for win32), but it causes a memory
access error when it compiles large *.scm files, like csi.scm. This is the
same both under Windows NT, and 9x, on machines with 128 MB RAM.
Small *.scm files compile OK. I haven't played with it enough to find out
whether it's certain Scheme constructs that cause the problem, or simply the
size of the source file.

I like the documentation, though. Well written.

greets,
Elliott

felix <fe...@anu.ie> wrote in message
news:snen8k...@corp.supernews.com...

felix

unread,
Jul 26, 2000, 3:00:00 AM7/26/00
to

Elliott Oti wrote in message <8lkqr5$1q5v$1...@pukkie.phys.uu.nl>...

>I compiled Chicken with mingw32 (gcc for win32), but it causes a memory
>access error when it compiles large *.scm files, like csi.scm. This is the
>same both under Windows NT, and 9x, on machines with 128 MB RAM.
>Small *.scm files compile OK. I haven't played with it enough to find out
>whether it's certain Scheme constructs that cause the problem, or simply
the
>size of the source file.


I just build the thing with Cygwin B20 (egcs 2.91.57) and the '-no-cygwin'
option (which according to the readme will "...link in the latest Mingw32
Libs...")
and everything works smoothly - large and small files.

What mingw32-version do you have?


felix


Reply all
Reply to author
Forward
0 new messages