Related articles |
---|
Summary: Wanted: Simple virtual machine or interpreter marten.norman@intertex.se (Morten Norman) (1998-03-13) |
From: | Morten Norman <marten.norman@intertex.se> |
Newsgroups: | comp.compilers |
Date: | 13 Mar 1998 00:06:33 -0500 |
Organization: | Compilers Central |
Keywords: | interpreter, summary |
I while ago I asked for a simple, yet efficient virtual machine and a
compiler for it. (More background details are in my original post
that may be found in the archives for this group...)
This returned a lot of interesting pointers and suggestions and I
really like to thank you everybody for all great input!
I have not yet picked my choice, but the candidates I think suits _my_
application best are BCPL or the "Obfuscated C interpreter". Both
does what I want, but no more. BCPL is mature and has been used for
real projects. Obfuscated C on the other hand is a C subset (means
reduced learning for me) and is extremly "bare bones".
Anyway, here is the brief summary. The comments are more or less my
personal notes during a quick WWW browse. Be warned that things may
be misinterpreted or even mixed up by me. The list is in random
order...
Lua at http://www.tecgraf.puc-rio.br/lua/
=========================================
Free (no cost), but copyrighted.
C-like. Has C interface. Is a C library. Precompiles available for Unix,
Windows, and Macintosh. Interpreted (text parsing?)
www.gnu.org. GUILE
==================
Pointer that GUILE might be useful.
Free (under GPL), forces me to release my application under GPL too (but
that was my intention anyway).
www.kaffe.org
=============
Java. Ported to Unix, Amiga, Windows 95 etc. Just-in-time compiles.
www.python.org
==============
Free (no cost), but copyrighted http://www.python.org/python/Copyright.html
C-like. C source. Runs on Unix, PC, Macintosh, Amiga, and many other systems.
Interpreted (can be byte-compiled?)
Forth
=====
Hints to look for a forth called UNTIL in ANSI C. Repeated suggestions
that forth is small and efficient.
http://www.forth.org or news:comp.lang.forth
Tcl
===
Hints to look for for Tcl without the graphical interface.
WAM (Warren Abstract Machine) for Prolog implementation
=======================================================
ftp://swi.psy.uva.nl/pub/SWI-Prolog/
http://www.swi.psy.uva.nl/usr/jan/SWI-Prolog/Manual/Contents.html
Free for noncommercial use: ftp://swi.psy.uva.nl/pub/SWI-Prolog/LICENCEyy
TAM (code example from book)
=============================
Pointer to book with PASCAL source code for an interpreter for a simple
abstract machine language called TAM.
Programming Language Processors
David A. Watt
Prentice-Hall, 1993
ISBN 0-13-720129-X (paperback)
Obfuscated C
============
Lennart Augustssons winning entry in the "Obfuscated C contest" 1996.
An interpreter that runs a simple byte code + a compiler that compiles
a C subset into this code.
Obfuscated version at:
http://reality.sgi.com/csp/ioccc/1996/august.c
And a few more pointers under year 1996 and subject august at:
http://reality.sgi.com/csp/ioccc/years.html
Unobfuscated version at ftp://ftp.cs.chalmers.se/~augustss/oc.tar.gz
(I had to replace "~augustss" with "home/augustss" or something like
that to get the path recognised. Maybe just my ftp?) Not too much
comments in the source, but after seeing the obfuscated version I'm
eternally grateful for the human readable version! ;-).
BCPL
====
As far as I understand, the language C has adopted most from.
Has a "porting kit" with efficient BCPL byte code that may be
used to run the compiler etc. Appears to be designed for porting.
Tightly associated to the TRIPOS operating system. Appears to be
fully usable even when running under an interpreter? TRIPOS (in a
modified port?) is also known as the original AmigaDOS (which IMHO
still beats the latest MS-DOS).
Pointer to Martin Richards (the author himself) WWW page:
http://www.cl.cam.ac.uk/users/mr/
Morten Norman email: jmn@update.uu.se
--
Return to the
comp.compilers page.
Search the
comp.compilers archives again.