Parallel Scheme variant

Programming, for all ages and all languages.
Post Reply
Crazed123
Member
Member
Posts: 248
Joined: Thu Oct 21, 2004 11:00 pm

Parallel Scheme variant

Post by Crazed123 »

For the fun of it, I have designed a Scheme-like Lisp dialect for
parallel computation and attached the resulting evaluator written in
Scheme (and very obviously a dirty hack of the SICP metacircular
evaluator). It is called Paralisp.

Differences from Scheme:

1) All subexpressions of compound expressions ("combinations" as SICP
calls them, but really function applications) are evaluated in parallel.
Each subexpression evaluates in its own thread with its own evaluation
environment, so that no subexpression of expression A can affect the
mutable state of another subexpression of A. This (deliberately)
increases the implied parallelism of Paralisp programs to the point of
absurdity.
2) Thanks to #1, only explicit "begin" forms are evaluated sequentially.
No special form or syntax allows by default for the sequential
evaluation of multiple expressions. This aids parallel programmers by
clearly and explicitly showing where code must run in a defined order.
3) "Map" is a primitive function that runs in parallel. This adds to
Paralisp support for "do-one-thing-to-X-items" parallelism in addition
to the pure-functional
"run-everything-without-explicit-dependencies-in-parallel" model.

I'm publishing this language simply because I thought someone might find
it interesting and I don't expect to pursue professional or research
work on it for a long time yet. Still, maybe someday I can make a research project out of writing a non-naive compiler and/or interpreter and runtime system.
Attachments
paralisp.txt
The Paralisp evaluator. Change the file extension to .scm to use it with a Scheme system (though I wrote it for Chicken). Now with a bug fixed!
(11.05 KiB) Downloaded 96 times
Post Reply