A SINGLE INTERMEDIATE LANGUAGE FOR PROGRAMMING ENVIRONMENTS
CAPLINGER, MICHAEL ALAN
Doctor of Philosophy
Programming by the traditional methods of text editing and batch compilation is no longer necessary. The advent of the personal workstation and bitmap graphics allows us to construct integrated programming environments, which actively aid the programmer in viewing, creating, and debugging programs. But despite many attempts to build such environments for the widely used Algol family of languages, none is in production use today. Our system, Yggdrasil, is an attempt to answer the question of how to build an effective IPE for Algol-like languages. It consists of a language-independent framework for editing and executing programs, and a language-dependent part driven by specifications. An Yggdrasil environment for a particular language is built by writing a specification for that language. The specification must define three fairly separate components of the language: its abstract syntax, its static semantics, and its execution semantics. The first two are used to enforce the static validity of the program as it is edited, while the third allows the system to execute the program via interpretation. The central part of the specification is a description of the programming language's abstract syntax. Unlike other systems, which may use several different program representations, only a single tree form is maintained. This insures that the environment will not have distinct "modes," since there is no need to translate between representations; it also lets different parts of the system share common functions. Other specifications take the form of static annotations for each constructor in the abstract syntax. Such specifications control the user's view of the program, some checking of its validity, and the treatment of program names. Some aspects of the programming language cannot be expressed statically. The system also allows constructors to be annotated with functions; each function is executed in response to a message sent to a particular mode in the program tree, as in an object-oriented system. The functions are used to complete the static checking of the program during editing, and to execute it. One of the function annotations specifies the execution semantics of a constructor, in terms of a composition of primitive operators provided by the system and the semantic functions of the constructor's sons. Execution is performed by repeatedly calling the semantic functions. The combination of the editing and execution framework and the semantic primitives allows the simple specification of a powerful programming environment for Algol-like languages. We pay special attention to making the user interface for program composition, editing, and debugging execution convenient, while avoiding the problems of earlier IPE systems.