# [racket] Projectional Editors

 From: Tony Clark (t.n.clark at mdx.ac.uk) Date: Fri Jul 5 03:52:10 EDT 2013 Previous message: [racket] Rules For Compiling code that will use dynamic-places with RACO Next message: [racket] Projectional Editors Messages sorted by: [date] [thread] [subject] [author]

Dear All,

I am implementing a language that involves patterns over sets. I am experimenting with an 'indexed set' pattern of the form:

(iU (index-var limit-var) pattern …)

Where pattern can include constants, (indexed) variables, (indexed) sets and terms. For example:

(iU (i n) (Person (index name i)))

Matches a set of terms:

'((Person fred) (Person bert) (Person sally))

To produce a binding environment:

'((n . 2) (name-0 . fred) (name-1 . bert) (name-2 . sally))

My question is whether DrRacket can be extended with 'projectional editing' features so that:

(iU (i n) (Person (index name i)))

When entered, is displayed using the equivalent of latex:

$\bigcup_{i\in[0,n]} (Person (index name i))$

A projectional editor (http://martinfowler.com/bliki/ProjectionalEditing.html) works by representing the AST of a language and then providing the user with a view of the AST, thereby allowing fancy representations. Whether the user can interact with the fancy representation or has to work at the AST level depends on the projectional editor.

I think DrRacket ought to be ideal for this kind of thing since: (a) we are essentially working on an AST already; (2) the editor appears to be programmable; (3) the GUI libraries allow easy dynamic creation of images that can be inserted into the editor.

I looked at the reference for DrRacket Plugins, but encountered a large interface that I am unsure how to navigate.

Thanks for any pointers.

-- Tony

---------------------------------------------------------------------------

Please note that Middlesex University's preferred way of receiving all correspondence is via email in line with our Environmental Policy. All incoming post to Middlesex University is opened and scanned by our digital document handler, CDS, and then emailed to the recipient.

If you do not want your correspondence to Middlesex University processed in this way please email the recipient directly. Parcels, couriered items and recorded delivery items will not be opened or scanned by CDS.  There are items which are "exceptions" which will be opened by CDS but will not be scanned a full list of these can be obtained by contacting the University.



 Posted on the users mailing list. Previous message: [racket] Rules For Compiling code that will use dynamic-places with RACO Next message: [racket] Projectional Editors Messages sorted by: [date] [thread] [subject] [author]