Automatic Derivation of Code Generators from Machine Descriptions
- 1 April 1980
- journal article
- Published by Association for Computing Machinery (ACM) in ACM Transactions on Programming Languages and Systems
- Vol. 2 (2) , 173-190
- https://doi.org/10.1145/357094.357097
Abstract
Work with compiler compilers has dealt principally with automatic generation of parsers and lexical analyzers. Until recently, little work has been done on formalizing and generating the back end of a compiler, particularly an optimizing compiler. This paper describes formalizations of machines and code generators and describes a scheme for the automatic derivation of code generators from machine descriptions. It was possible to separate all machine dependence from the code generation algorithms for a wide range of typical architectures (IBM-360, PDP-11, PDP-10, Intel 8080) while retaining good code quality. Heuristic search methods from work in artificial intelligence were found to be both fast and general enough for use in generation of code generators with the machine representation proposed. A scheme is proposed to perform as much analysis as possible at code generator generation time, resulting in a fast pattern-matching code generator. The algorithms and representations were implemented to test their practicality in use.Keywords
This publication has 3 references indexed in Scilit:
- On formalised computer programsJournal of Computer and System Sciences, 1970
- Code-generation technique for large-language compilersIBM Systems Journal, 1970
- Translator writing systemsCommunications of the ACM, 1968