Entry Date:
February 27, 2007

Subtext: Uncovering the Simplicity of Programming

Principal Investigator Daniel Jackson

Co-investigator Jonathan Edwards


The Subtext project is exploring an alternative approach to programming language design in order to make programming fundamentally easier. The traditional approach is to encode programs as text strings, which a compiler parses according to a grammar. Enormously complex Interactive Development Environments (IDE's) have evolved to make these textual encodings comprehensible and usable. Subtext is instead designing the language and IDE as an inseparable whole, with programmer usabilty as the central goal. Without the constraint of a grammar, computer-mediated representations can more directly express the semantics of a program, and direct manipulation of such representations can effect high-level semantic transformations. Programs can further be given "live" semantics, so that, like a spreadsheet, they are constantly executing concrete examples.
Results

Previous work produced a prototype implementation of a functional programming language represented as a tree with internal copying relationships, edited largely by drag-and-drop operations. A web video demonstration has been viewed tens of thousands of times.

Subsequent work developed an operational semantics of this language, including a translation from the lambda calculus. A novel model of mutable state, input/ouput, and concurrency was proposed to reconcile these imperative features with live example-centric semantics.

Current work is developing an alternative representation of conditionals, called schematic tables. Roughly a cross between decision tables and data flow graphs, they represent computation and decision-making orthogonally. They unify the full range of conditional constructs, from if statements through pattern matching to polymorphic predicate dispatch. Program logic is maintained in a declarative canonical form that enforces completeness and disjointness among choices. They give program logic the clarity of truth tables, and support high-level direct manipulation of that logic, avoiding much of the mental computation demanded by conventional conditionals.