[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CPS in Parrot

On Wednesday, August 20, 2003, at 06:25 PM, Michael Vanier wrote:

>> Date: Wed, 20 Aug 2003 09:07:24 -0400
>> From: Matthias Felleisen <matthias@ccs.neu.edu>
>>> Landin makes sure to note that an ISWIM
>>> program-point definition introduces a
>>> "deviant" kind of function, not a plain
>>> one.
>> Yes, but you need to understand that Landin's program points are even
>> more powerful than call/cc-style continuation objects. On top of J you
>> can
>> find F, which blows it away. And then there is G, which is the 
>> top-most
>> control operator.
>> -- Matthias, on a nostalgic trip to the past
> *drool*
> I have one paper on J, and you mentioned F before.  I haven't heard of 
> G.
> Is there a paper or papers which describes all of these?

Here are the equations:

  # E{ F   v } = # v (\x.E{ x })

  # E{ F+ v } =  v (\x.E{ x })

  # E{ G/w  v } = v (w(E))

E: evaluation contexts
v: function
x: variable
f(x): function application
\x.expression: (lambda (x) expression) in Scheme

G/w is a control operator that is parameterized over a function w from 
evaluation contexts
to values. I claim that with G you can model every form of control 
manipulations, including
lightweight continuation inspection (Clements, dissertation, to appear) 
as it is used in our
world. Of course, w is a function in the meta-world, not in the 
language itself because I don't
make any assumptions about the language other than the above.