@techreport{R-92-06, TITLE = {Comparative Evaluation and Industrial Application of Code Generator Generators}, AUTHOR = {Niclas Andersson and Peter Fritzson}, YEAR = {1992}, NUMBER = {R-92-06}, INSTITUTION = ida, ADDRESS = idaaddr, ABSTRACTURL = {/publications/cgi-bin/tr-fetch.pl?r-92-06+abstr}, ABSTRACT = {The past ten to fifteen years has seen active research in the area of automatically generating the code generator part of compilers from formal specifications. However, less work has been done on evaluating and applying these systems in an industrial setting. This paper attempts to fill this gap.Three systems for automatic generation of code generators are evaluated in this paper: CGSS, BEG and TWIG. CGSS is an older Graham-Glanville style system based on pattern matching through parsing, whereas BEG and TWIG are more recent systems based on tree pattern matching combined with dynamic programming. An industrial-strength code generator previously implemented for a special-purpose language using the CGSS system is described and compared in some detail to our new implementation based on the BEG system. Several problems of integrating local and global register allocation within automatically generated code generators are described, and some solutions proposed. We finally conclude that current technology of automatically generating code generators is viable in an industrial setting. However, further research needs to be done on the problem of properly integrating register allocation with instruction selection, when both are generated from declarative specifications.}, IDANR = {LiTH-IDA-R-92-06}