A compiler that is structured as a small number of monolithic passes is difficult to understand and difficult to maintain. Finding compiler bugs in such a compiler is often difficult, and adding new optimizations and analyses sometimes requires major restructuring that can result in subtle and tenacious bugs.
A natural solution to this problem is to structure the compiler as a series of correctness-preserving transformations, each of which performs a small part of the compilation process. Unfortunately, as each pass of the compiler becomes simpler, the number of passes required to accomplish the entire task becomes greater. Even though a pass may make significant changes to only a few of the intermediate-language forms, it must still handle the remaining forms. This coding overhead can more than offset the benefits of having a fine-grained structure, as the sheer volume of essentially repetitive code can obscure the meaningful transformations performed by the compiler.
This dissertation describes a new “nanopass” infrastructure that eliminates most of the repetitive coding overhead, making the development of such compilers simpler, less tedious, and less error-prone. The nanopass infrastructure formalizes the declaration of intermediate languages, and a compiler written using the infrastructure rejects intermediate-language programs that are not well-formed according to these declarations, increasing reliability. The infrastructure also represents intermediate-language code internally using efficient lowlevel data structures while allowing the compiler writer to interact with the code at a higher, more readable level. The infrastructure provides additional tools to support rapid development of new compilers, as well as experimentation with new language features and code improvement strategies in existing compilers. The modular nature of the compilers developed with the infrastructure should also support rapid adaptation of general-purpose compilers to domain-specific purposes.
|Advisor:||Dybvig, R. Kent|
|Commitee:||Friedman, Daniel P., Leake, David B., Waddell, Oscar|
|School Location:||United States -- Indiana|
|Source:||DAI-B 69/12, Dissertation Abstracts International|
|Keywords:||Attribute grammars, Compiler infrastructure, Formal grammars, Nanopass infrastructure, Pass expansion, Syntactic macros, Term rewriting|
Copyright in each Dissertation and Thesis is retained by the author. All Rights Reserved
The supplemental file or files you are about to download were provided to ProQuest by the author as part of a
dissertation or thesis. The supplemental files are provided "AS IS" without warranty. ProQuest is not responsible for the
content, format or impact on the supplemental file(s) on our system. in some cases, the file type may be unknown or
may be a .exe file. We recommend caution as you open such files.
Copyright of the original materials contained in the supplemental file is retained by the author and your access to the
supplemental files is subject to the ProQuest Terms and Conditions of use.
Depending on the size of the file(s) you are downloading, the system may take some time to download them. Please be