[plt-dev] an api for check syntax & module browser

From: Philippe Meunier (meunier at ccs.neu.edu)
Date: Thu Sep 10 03:43:13 EDT 2009

Ryan Culpepper wrote:
> I envision two APIs. One handles source code analysis, possibly  
> including expansion, builds def-use relations, etc. The other handles  
> annotations to code in editors, allows adding mouseover callbacks to  
> regions of code, adding right-click menu items, etc.

FYI, I'm working on an abstract interpretation framework for DrScheme
that will eventually provide APIs for that stuff, including the GUI
part (in fact the GUI part of MrFlow already had a basic version of an
API that provided the mouseover callbacks (to draw flow arrows) and
the right-click menu items, it's just that MrFlow was that API's only
customer and that the API had only minimal documentation).

Most of (all?) the "client programs" you list would then be plug-in
analyses for the framework.  In turn there's fairly simple DrScheme
tool that takes the framework and all its analyses and plugs the whole
thing into DrScheme (in theory the framework can be plugged into any
program you want, but I haven't actually tried it yet).  In parallel
to working on the framework proper, I'm also developing two client
analyses, mostly to check that I'm abstracting the framework at the
right level, and, interestingly, one of them is an attempt at
re-implementing Robby's syntax checker (the other client is a tracing
evaluator, and there's in fact a third client I'm working on, which
one day should become MrFlow 2.0, but that one is harder to develop
than the other two).

Don't hold your breath though, I've got about 2000 lines of code so
far and I'm only just about to be able to analyze the lambda calculus,
so it'll be quite a while before I have something that can more or
less match Robby's tool.  Progress is steady but slow, there's just a
ton of infrastructure code to write (anybody wants to write a
hashconsing library that can handle cyclic data structures, unions,
subtyping (and least upper bounds in general), and that's reasonably
efficient and GC-friendly?)


Posted on the dev mailing list.