Date: Sat, 31 Jan 2015 22:18:16 -0800
From: Glen Chiacchieri
Subject: Ohm grammar editor mockups [4/24/14]
Frustrated by my time with grammar editors while making Legible Mathematics, I imagined some mockups for what an editor might look like for Alex Warth's Ohm language, the successor to O-meta.

I started with some improvements to simple editors I had already seen.


As part of this mockup, I came up with the idea of generating expressions with the grammar to help a creator understand their language. This was based on the observation that it's usually easier to recognize when something is right or wrong rather than think up examples yourself.

Alex, Tony, and Mahdi would later come out with a paper "Recognizing and Generating Terms using Derivatives of Parsing Expression Grammar" that was able to generate valid examples given a grammar.

——

A few days later, the mockup I made was still bugging me so I made a new one:



This one was an attempt to make an IDE for "ubiquitous seeing", an environment where poking at one thing on in the interface (e.g. the semantic action for AddExpr in the screenshot) would show other things affected by that part everywhere else on the interface (e.g. every place an AddExpr example or abstract definition showed up).

But once I thought through this design a little, I realized that even a small grammar would have problems with being able to see all the things you need to see. A lot of the value in this interface comes in being able to see everything at once, and that is not possible with the tiny rectangles on our desks.

So I tried an interface that would come out of the rectangle:



​I prototyped this with sticky notes, but I don't expect the interface would really look this or take place on a card-like interface. I imagine this would take place on huge screens or projected surfaces, but far in the future it could be physical.

The abstract grammar definitions, the semantic actions, and specified and generated examples (kind of like unit tests) are all grouped together (i.e. all parts relevant to each other are grouped spatially). Poking anything in the interface highlights everything related to that. For example, if you pointed to "1+1", the group of things related to addition expressions would highlight and show you why that string was parsed as an addition expression. Other examples of addition expressions that appeared anywhere on the work surface would also

To me, the idea here is that the entire language is out on a workbench. Every part of it is visible all at once. You would work on this grammar like you might build a chair in a wood shop. You can place the parts of the grammar, your working examples, the language's documentation anywhere in the space that makes sense to you and grab them when you need them, just like you'd customize your workshop:


And of course, once you take something out of the tiny rectangle and make it into a workspace, it starts bringing up questions about multiple people working with and talking about the work at the same time.