Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Partial evaluation in Scheme

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).

like image 241
biozinc Avatar asked Feb 28 '26 11:02

biozinc


1 Answers

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.

like image 192
ceving Avatar answered Mar 03 '26 05:03

ceving