A knowledge based program editor

This paper describes an initial implementation of an interactive programming assistant system called the Programmer's Apprentice (PA). The PA is designed to be midway between an improved programming methodology and an automatic programming system. The intention is that the programmer will do the hard parts of design and implementation while the PA will assist him wherever possible. One of The major underpinnings of the PA is a representation (called a plan) for programs which abstracts away from the inessential features of a program, and represents the basic logical properties of the algorithm explicitly. The current system is composed of four parts: an analyzer that can construct the plan for a program; a coder that can create program text corresponding to a plan, a library of plans for common algorithmic fragments; and a plan editor which makes it possible for a programmer to modify a program by modifying its plan. The greatest leverage provided by the system comes from the fact that a programmer can rapidly and accurately build up a program by referring to the fragments in the library and from the fact that the editor provides commands specifically designed to facilitate program modification.