Partial evaluation in Scheme

565 views Asked by At

I'm trying to use Scheme in a distributed system. The idea is that one process would evaluate some expressions and pass it on to another process to finish.

Example:

(do-stuff (f1 x) (f2 x))

would evaluate to

(do-stuff res1 (f2 x))

in the first process. This process passes the expression as a string to another process (on another node), which would evaluate it to

(do-stuff res1 res2)

The ideas is to do a map reduce style work distribution, but by passing scheme expressions around. Is this possible? Any pointers would be helpful. (I'm using IronScheme btw).

2

There are 2 answers

0
Aslan986 On

it's not a real answer, but just an hint.

Have you tried with continuations? Here

I think the can do what you need.

0
ceving On

As Aslan986 suggested you need support for full continuations. Unfortunately Ironscheme does not support full continuations but only escape continuations, which go the call stack up. See the known limitations of Ironscheme. Furthermore you need to serialize the continuations, to be able to pass them from one process to another. In general this is not always possible and only few Scheme systems have support for that. One example is Gambit-C. There exists a presentation which shows how to implement a distributed computing system.