Erlang to Scheme compiler
Scheme Erlang Emacs Lisp Shell
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


ETOS is an Erlang to Scheme compiler designed at the Universite de
Montreal.  The Scheme code it generates is compiled to native code
with the Gambit Scheme compiler, which allows it to achieve good

Here are some papers and presentations on ETOS:

- "Compiling Erlang to Scheme", PLILP 1998

- "Status report on the ETOS Erlang to Scheme compiler", Erlang User
  Conference 1999 (

- "Etos: an Erlang to Scheme compiler", Technical Report 1079,
   1997, DIRO, Universite de Montreal


Before installing ETOS, you must install the Gambit Scheme compiler
(  ETOS v2.4 has been tested with
Gambit v4.6.5 (older versions of Gambit will probably work too, but
don't go too far back).

Then build ETOS with the command

   % make install

This will place the following files in the bin/ directory:

   etos             the ETOS compiler

   estart           the program loader

   rt-gambit.scm    a Scheme file with macro definitions required
                    by the Gambit Scheme compiler to compile the
                    Scheme files produced by ETOS

If you wish to install these files somewhere else, then
change the definition of INSTALL_DIR in the Makefile before
the "make install".

Note that on some platforms it can take a long time to compile etos.
On Mac OS X with LLVM gcc, it takes roughly half an hour on a fast
machine (with GNU gcc it takes only a few minutes).


Erlang files, with extension .erl, can be compiled by invoking etos:

   % bin/etos hw.erl

By default this will produce the files hw.scm, the Scheme code
generated, and hw.o1 (or hw.o2, etc) which is the dynamically loadable
object file produced from hw.scm by the Gambit Scheme compiler.

To execute the program, simply invoke estart with the name of the
module, "hw" in this case:

   % bin/estart hw
   "Hello World!"

You can get usage information on these programs with:

   % bin/etos --help

or man pages with:

   % man man/man1/etos.1
   % man man/man1/estart.1


The benchmarks can be run with the command:

   % make bench