[racket] filtering syntax

From: Marijn (hkBst at gentoo.org)
Date: Fri Jan 13 10:20:23 EST 2012

Hash: SHA1

On 13-01-12 15:23, Matthias Felleisen wrote:
> On Jan 13, 2012, at 8:40 AM, Marijn wrote:
>> My question is how one determines the dependencies from the above
>> code. The result for the above would be something like:
>> ((a) (b a) (c a b) (d c))
> If model allows arbitrary Racket code on the right-hand side, you
> locally expand them into core, compute the free variables with a
> simple recursive pass over core syntax, and compute dependencies
> from there. The latter is approximate, however. If you allow
> (model ([a] [b (lambda () a)] [c (+ a 2)]))
> b is much less dependent on a than c.

Right, b would be a constant, namely the function that returns the
value of a.

> Indeed, it would be mistaken to deref a before you apply the
> function bound to b.

I don't understand this. I would say that if you deref a before
setting it you would get an implementation-defined value (or an
error). Same if the first thing you do is apply the function bound to
b, since it just retrieves a's current value. What am I missing?

Version: GnuPG v2.0.18 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/


Posted on the users mailing list.