ap1@cunixa.cc.columbia.edu (Agim Perolli) (04/25/91)
On a related, but different topic: does anyone know of an ftp site that has a translator that will convert MIT version 7 scheme code into C code, which can then be compiled. In my class on Structure and Interpretation of Computer Programs, we use several of the large, slow programs given in the Abelson & Sussman text, like a MetaCircular Evaluator and Register Machine Simulator (written in Scheme). I think it would be helpful to compile these into C, then into executables, so that the execution speed, which is awfully slow, can be increased. Also, it might be instructive to write VERY small scheme programs, and translate them into C-code, to see just how much pointer work is actually going on behind the scenes. Any responses will be greatly appreciated. Agim Perolli, ap1@cunixa.cc.columbia.edu
jinx@zurich.ai.mit.edu (Guillermo J. Rozas) (04/25/91)
In article <1991Apr24.183538.3946@cunixf.cc.columbia.edu> ap1@cunixa.cc.columbia.edu (Agim Perolli) writes:
Path: ai-lab!mintaka!think.com!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!cunixf.cc.columbia.edu!cunixa.cc.columbia.edu!ap1
From: ap1@cunixa.cc.columbia.edu (Agim Perolli)
Newsgroups: comp.lang.scheme
Date: 24 Apr 91 18:35:38 GMT
Sender: usenet@cunixf.cc.columbia.edu (The Network News)
Reply-To: ap1@cunixa.cc.columbia.edu
Organization: Columbia University
Lines: 17
Originator: ap1@cunixa.cc.columbia.edu
Nntp-Posting-Host: cunixa.cc.columbia.edu
On a related, but different topic: does anyone know of an ftp site
that has a translator that will convert MIT version 7 scheme code
into C code, which can then be compiled. In my class on Structure
and Interpretation of Computer Programs, we use several of the large,
slow programs given in the Abelson & Sussman text, like a MetaCircular
Evaluator and Register Machine Simulator (written in Scheme). I think
it would be helpful to compile these into C, then into executables,
so that the execution speed, which is awfully slow, can be increased.
Also, it might be instructive to write VERY small scheme programs,
and translate them into C-code, to see just how much pointer work
is actually going on behind the scenes.
Any responses will be greatly appreciated.
Agim Perolli, ap1@cunixa.cc.columbia.edu
Do you refer to MIT Scheme code, or to SICP (Structure and
Interpretation of Computer Programs) code?
If the former, it is not far from RnRS scheme, and Scheme->C might do
the job for you.
It sounds, however, that you mean the latter, and you may be out of
luck. The register machine simulator, in particular, uses first-class
environments, that not all dialects of Scheme support. You would
either have to change the code to implement register machines
differently, or use something else.
A different possibility is to use the MIT Scheme compiler if you are
running on a machine for which there is a back-end.