This is an experimental compiler for the call-by-name lambda-mu calculus with disjunction, based on a Krivine-style abstract machine. The abstract machine is in turns derived from the CPS semantics that is given in my paper. A detailed description of the compiler, the abstract machine, and the underlying CPS semantics can be found in the documentation.
The input to the compiler is abstract syntax - we do no typechecking, but the correctness of the implementation depends on the typability of the source. Parser and typechecker can be added later. The execution of the underlying abstract machine can be observed step by step by starting the compiled program with the -v option. The target language is C, with a set of runtime primitives defined in runtime.c.
7/13/98-8/19/98. Copyright 1998 Peter Selinger. Version 1.3.
use "compiler.sml";from SML,
include "compiler.ml";;from Caml Light, or
#use "compiler.oml";;from Objective Caml.
compile term "myfile.c";;
gcc myfile.c -o myfile
-vtag causes the program to print information on each step of the computation.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
Back to Homepage: