Tools For Automatic Compiler Generation (Panel Discussion)

  • Authors:
  • Susan L. Graham;A. Aho

  • Affiliations:
  • -;-

  • Venue:
  • ACM '78 Proceedings of the 1978 annual conference
  • Year:
  • 1978

Quantified Score

Hi-index 0.00

Visualization

Abstract

As various parts of the compiling process have become better understood, it has been possible to package this understanding in tools that can be used by nonspecialists. This talk describes tools for parser generation and lexical analyzer generation which are available under the UNIX% operating system. It will also touch on some less successful attempts to package understanding of symbol table management. In addition to specific tools, the UNIX system eases many of the ancillary tasks of the compiler writer: debugging, regression testing, and constructing new versions of the compiler, to name a few. The talk will draw from practical experience in the construction of a portable compiler for the language C, which has been moved to over a dozen different machines. Since the early history of compilers, researchers have attempted to systematize and automate the production of compilers. The most successful aspect of this attempt has been syntax analysis. It is now commonplace to use a table-driven syntax analyzer which is automatically constructed from a generalized context-free grammar specifying the syntax of the source language (see, for example, [1]). Such an analyzer is easily obtained or modified, provably correct, and modular. In order to automate the production of the code-generator module of a compiler, it is desirable to take a similar approach - namely, to find techniques to construct the code generator automatically from an easily specified description of the computer architecture. We would again have the advantages that the code-generator would be provably correct, modular, and easily modified to generate code for a new kind of machine. In the talk, a technique will be presented to provide an easily specified machine description to a program which computes a table of information from which another algorithm generates probably correct code. The results, described more fully in [4], [5], [6], are based in part on earlier work reported in [7] and [8]. Other current research on this topic, described in [2] and [3], will also be discussed. The PQCC (Production-Quality Compiler-Compiler) project is an effort aimed at the automatic construction of production quality, optimizing compilers. The goal, is, with no more than a few man-months effort, to produce a compiler that is competitive in every respect with the best hand-crafted compilers available today. Input to this automatic construction process is formal descriptions of the source language and target machine. PQCC differs from nearly all previous work in this area in that we are concentrating on the semantic and machine-dependent phases of compilation—as opposed to lexical and syntactic analysis. Each phase has been formalized in a manner that permits it to be expressed in table-driven form. Thus the automatic construction of the compiler consists of deriving these tables from the semantic definitions of the language and target machine. Table-driven prototypes have just been completed for most compiler phases, and work is now proceeding on improving and automating their generation. The talk will go into some detail on one of these phases, code generation, discussing the formalization of the (table-driven) algorithms and the automatic construction of the tables from a machine description.