[racket] nested environments

From: Richard Cobbe (cobbe at ccs.neu.edu)
Date: Mon Jun 14 07:47:30 EDT 2010

On Mon, Jun 14, 2010 at 11:42:43AM +0100, Noel Welsh wrote:
> Didn't get to the end of this, but it seems like you want to represent
> a lexical environment as found in any interpreter. For this, I
> suggest:
>
> http://planet.plt-scheme.org/display.ss?package=environment.plt&owner=cobbe
> A rib-cage environment data structure.

There's a very good chance that this will do what you want, synx, but I'm a
little unclear on the details -- perhaps because I only skimmed your post.

The data structure in that package is primarily for use in an interpreter
or type checker.  I get the sense from your original message that the
expression you wish to evaluate is written in Racket, in which case this
package won't be much use, as there's no way to plug this environment
structure into the Racket evaluator.  If, on the other hand, you're writing
your own evaluator for this expression('s language), then this package
could be just what you need.

Finally, I haven't used this package in a while, so it's possible that it
may have succumbed to bit-rot in the interim.  (That said, it doesn't use
any particularly advanced features of the language, so I think dusting it
off should be sufficient.)  If you do try to use it and find any problems,
please do let me know, ideally by filing a bug report with the existing
Planet infrastructure.  I'd like to keep this package usable and useful,
although I can't promise that I'll be able to respond to issues
immediately.

Richard


Posted on the users mailing list.