Metafor: Programming by Storytelling


Programming is the art of constructing a story about objects and what they do in various situations, expressed in programming languages which are easy for the computer to accurately convert into executable code, but difficult for people to write and understand. This project explores using descriptions in a natural language like English as a representation for programs. We cannot convert arbitrary English descriptions to fully specified code, but we can use an expressive subset of English as a visualization tool. Simple descriptions of program objects and their behavior are converted to scaffolding (underspecified) code fragments that can be used as feedback for the designer and then elaborated. Our parser can infer a surprising amount of information about program structure from relations implicit in the linguistic structure; we call this "programmatic semantics." Our program editor, Metafor, dynamically converts a user's stories into program code. Users found it useful as a brainstorming tool.