An incremental compiler is an important tool of the integrated programming development system based on the compiler.
In this thesis, an incremental Prolog compiler is designed and implemented. In the incremental Prolog compiler proposed in this thesis, the compilation of a program consists of three phases. The first phase is skeleton compiling, the second phase is code qualification, and the third phase is the generation of choice code of each procedure. Each phase has its own unit of incrementality. The incremental Prolog compiler performs skeleton compilation with the unit of incrementality of subgoal, code qualification with the unit of incrementality of clause, and choice code generation with the unit of incrementality of procedure. This scheme takes the advantages that we can use the techniques for the general compilation of Prolog programs. The subgoal as minimal unit of incrementality makes the usage of storage for the representation of source program and the mapping informations between source and object code be practical.
The incremental compiler generates the codes for the Prolog machine which is a modified version of Warren's and University California Berkely Prolog Machine. Also, a Prolog machine simulator is implemented to execute the generated codes.