CSAIL Publications and Digital Archive header
bullet Technical Reports bullet Work Products bullet Research Abstracts bullet Historical Collections bullet

link to publications.csail.mit.edu link to www.csail.mit.edu horizontal line


Research Abstracts - 2006
horizontal line

horizontal line

vertical line
vertical line

Subtext: Uncovering the Simplicity of Programming

Jonathan Edwards


The Subtext project seeks to make programming fundamentally easier by altering the nature of programming languages and tools. Subtext programs have no source code. Programs are living executables in a persistent runtime environment, and programming is done by direct manipulation of example executions, more like using a spreadsheet than a keypunch. Programming moves from a world of dead textual abstractions into one of living concrete examples.


Inclusions reify copy & paste editing operations into persistent relationships, with the crucial enhancement that changes to the source of the inclusion are propagated into its destination. Inclusions are developed on the domain of edge-labeled trees, forming integral trees. The expressive power of inclusions stems from the fact that they are higher-order: inclusions include inclusions. Inclusions can be used to reformulate the standard constructions of a pure lazy higher-order functional programming language. Notably absent are symbolic names, the workhorse of textual notations. The copy & paste operations with which a program is constructed establish structural congruences that effectively replace names.

Subtext frees the user interface of programming from text editing. The prototype interface is based on a collapsible indented outline - the familiar "tree control" of modern GUI's. Inclusions are links cross-cutting this tree, represented with textual tags and mouse-sensitive graphical decorations. Edits are high-level semantic transformations initiated by drag-and-drop operations.

Performance issues have been deferred in order to focus on the simplicity and coherence of the semantics without premature optimization.


The prototype implementation can build simple functional programs like factorial, but is not yet scalable in terms of program size or performance. The prototype has served primarily as an intellectual proving ground. A web video demo has been viewed over 15,000 times.

An operational semantics of inclusions has been developed, revealing a simpler model that will be incorporated into the next version of the prototype.

A fresh approach has been developed to the problems of mutable state, input/output, and concurrency. These features are required for interactive systems, but are not easily handled by functional languages. The approach taken avoids descending to the hardware level of control-flow and side-effects, preserving the simplicity of functional semantics. But the approach also offers a common-sense model of mutable state, avoids higher-order abstractions, and supports a transactional form of concurrency. Full WYSIWYG visibility of example executions is maintained. The key idea is hypothetical states, which are recursive copies of the entire system state calculated by actions. Actions are invoked by lifting their hypothetical future state into a new version of the actual state. Hypotheticals enable transactional concurrency based on queued single-threaded execution. Speculative execution of queued hypotheticals provides concurrency as a semantically transparent implementation optimization.


[1] Jonathan Edwards. Example Centric Programming. In Companion to the 19th annual ACM SIGPLAN conference on Object Oriented Programming Systems, Languages, and Applications (OOPSLA'04) Vancouver, BC, CANADA, October 2004. [PDF]

[2] Jonathan Edwards. Subtext: Uncovering the Simplicity of Programming. In Proceedings of the 20th Annual ACM SIGPLAN Conference on Object Oriented Programming Systems Languages and Applications(OOPSLA ’05) San Diego, CA, USA, October 16 - 20, 2005. [PDF]

[3] Jonathan Edwards. First Class Copy & Paste. Submitted to OOPSLA'06. [PDF]


vertical line
vertical line
horizontal line

MIT logo Computer Science and Artificial Intelligence Laboratory (CSAIL)
The Stata Center, Building 32 - 32 Vassar Street - Cambridge, MA 02139 - USA
tel:+1-617-253-0073 - publications@csail.mit.edu