Engineering E cient Code Generators using Tree Matching and Dynamic Programming

作者: Todd A. Proebsting , David R. Hanson , Christopher W. Fraser

DOI:

关键词: Programming languageTwigTree (data structure)Matching (graph theory)Computer scienceCode generationCode (cryptography)Dynamic programmingUnreachable codeDead code

摘要: Many code generator generators use tree pattern matching and dynamic programming. This note describes a simple program that generates matchers are fast, compact, easy to understand. It is simpler than common alternatives: 200{700 lines of Icon versus 3000 C for Twig 5000 burg. Its run up 25 times faster Twig's. They necessarily slower burg's BURS (bottom-up rewrite system) but they more exible still practical. AT&T Bell Laboratories, 600 Mountain Avenue 2C-464, Murray Hill, NJ 07974 Department Computer Science, The University Arizona, Tucson, AZ 85721

参考文章(8)
Ravi Sethi, Jeffrey D. Ullman, Alfred V. Aho, Compilers: Principles, Techniques, and Tools ,(1986)
Madge T. Griswold, Ralph E. Griswold, The Icon programming language ,(1983)
Alfred V. Aho, Mahadevan Ganapathi, Steven W. K. Tjiang, Code generation using tree matching and dynamic programming ACM Transactions on Programming Languages and Systems. ,vol. 11, pp. 491- 516 ,(1989) , 10.1145/69558.75700
A. V. Aho, S. C. Johnson, Optimal Code Generation for Expression Trees Journal of the ACM. ,vol. 23, pp. 488- 501 ,(1976) , 10.1145/321958.321970
Christopher W. Fraser, A retargetable compiler for ANSI C ACM SIGPLAN Notices. ,vol. 26, pp. 29- 43 ,(1991) , 10.1145/122616.122621
Christopher W. Fraser, David R. Hanson, A code generation interface for ANSI C Software - Practice and Experience. ,vol. 21, pp. 963- 988 ,(1991) , 10.1002/SPE.4380210906
Christopher W. Fraser, Robert R. Henry, Todd A. Proebsting, BURG ACM SIGPLAN Notices. ,vol. 27, pp. 68- 76 ,(1992) , 10.1145/131080.131089
E. Pelegrí-Llopart, S. L. Graham, Optimal code generation for expression trees: an application BURS theory symposium on principles of programming languages. pp. 294- 308 ,(1988) , 10.1145/73560.73586