eljenso
eljenso

Reputation: 17027

VM for Scheme with support for parallelisation

I have written a Scheme evaluator in Java that does some parallelisation tricks. It's not usable by anyone but me for the moment, but I'm getting some results.

The frontend and middle-end are ok for my purposes and are the parts that I want to concentrate on, but my backend sucks. It is unoptimized and is slow or lacks proper tail-call optimization.

So instead I want to target an existing VM. Does anyone know a candidate for this? It doesn't have to be an enterprise-ready VM but at least it should

Upvotes: 1

Views: 472

Answers (4)

erjiang
erjiang

Reputation: 45657

The other obvious VM to target is the Java VM, which brings you the added advantages of the Hotspot JITter and interoperability with other Java programs.

Bigloo compiles Scheme to Java VM bytecode or thr .NET cil.

Upvotes: 0

Mark Bolusmjak
Mark Bolusmjak

Reputation: 24399

Dybvig's Three Implementation Models For Scheme provides a very straightforward heap-based compiler/vm implementation with proper continuation and tail-call-optimization support. The code is in Scheme but it's easily translatable. I used it to implement Scheme in Javascript.

Upvotes: 1

Vijay Mathew
Vijay Mathew

Reputation: 27164

If you could get your Scheme to compile and run on the Erlang VM, that will be great. Already people are thinking seriously about this and there is a project that does the reverse.

Upvotes: 2

Sam Tobin-Hochstadt
Sam Tobin-Hochstadt

Reputation: 5053

The Microsoft CLR/.NET VM supports parallelism and has a tail-call instruction. The Mono implementation is free software and quite portable.

Alternatively, you could target Racket, which supports parallel constructs and would make it very easy to target from your Scheme system.

Upvotes: 2

Related Questions