Skip to main content

Code Selection by Regularly Controlled Term Rewriting

  • Conference paper

Part of the book series: Workshops in Computing ((WORKSHOPS COMP.))

Abstract

Regularly controlled term rewriting allows the efficient implementation of a class of non—deterministic term rewriting systems by using regular tree automata to control rule applications. This makes it possible to describe code selectors using very high level specifications: The mapping from intermediate to target code is described by term rewriting rules or by equations. A tree grammar is used to specify the set of target terms and their costs. The paper presents an algorithm to generate efficient tree transducers that map intermediate code terms to cost minimal target terms. First practical experiences using the proposed algorithm are reported.

This work was partly carried out within the Esprit Project #5399 (COMPARE)

This is a preview of subscription content, log in via an institution.

Buying options

Chapter
USD   29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD   39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD   54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Learn about institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. A.V. Aho, M. Ganapathi, S.W. Tjiang, Code Generation Using Tree Matching and Dynamic Programming, Technical Report, Bell Laboratories, Murray Hill, NJ, January 1986

    Google Scholar 

  2. A Balachandran, D. M. Dhamdhere, S. Biswas, Efficient Retargetable Code Generation Using Bottom-up Tree Pattern Matching, Computer Languages, 15 (3): 127–140, 1990

    Article  Google Scholar 

  3. H. Emmelmann, F-W. Schröer, R. Landwehr, BEG - a Generator for Efficient Back Ends, Proc. of the Sigplan’89 Conference on Programming Language Design and Implementation, Sigplan Notices, Vol. 24, Number 7, July 1989

    Google Scholar 

  4. M.Ganapathi, C. N. Fischer, J.L. Hennessy, Retargetable Compiler Code Generation, Computing Surveys Vol.14 No.4, Dec 82

    Google Scholar 

  5. R.S.Glanville, S.L.Graham, A New Method for Compiler Code Generation, Proceedings 5th ACM Symposium on Principles of Programming Languages, pp. 231–240, 1977

    Google Scholar 

  6. P.J. Hatcher, T.W. Christopher, High-Quality Code Generation Via Bottom Up Tree Pattern Matching, Proceedings 13th ACM Symposium on Principles of Programming Languages pp. 119–130, 1986

    Google Scholar 

  7. R. Henry, P.Damron, Performance of Table–Driven Code Generators Using Tree–Pattern Matching, Technical Report # 89–02–02 Computer Science Department, FR–35 University of Washington, Seattle, WA 98195 USA

    Google Scholar 

  8. R. Henry, P. Damron, Algorithms for Table–Driven Code Generators Using Tree–Pattern Matching, Technical Report # 89–02–03 Computer Science Department, FR–35 University of Washington, Seattle, WA 98195 USA

    Google Scholar 

  9. R. Henry, Encoding Optimal Pattern Selection in a Table–Driven Bottom–Up Tree–Pattern Matcher, Technical Report # 89–02–04 Computer Science Department, FR–35 University of Washington, Seattle, WA 98195 USA

    Google Scholar 

  10. B.Weisgerber, R.Wilhelm, Two Tree Pattern Matchers for Code Selection (Including Targeting), Technical Report, Universität des Saarlandes, Saarbrücken, W. Germany, February 1986

    Google Scholar 

  11. R.G.G. Cattell, Automatic Derivation of Code Generators from Machine Descriptions, ACM Transactions on Programming Languages and Systems, April 1980, Volume 2, Number 2, p. 173–190

    Article  Google Scholar 

  12. E. Pelegri-Llopart, S. Graham, Optimal Code Generation for Expression Trees: An Application of BURS Theory, Proc. of the 15th ACM Symposium on Principles of Programming Languages, 1988, p. 294–308

    Google Scholar 

  13. C.W. Fraser, R.R. Henry, Hard-coding Bottom-up Code Generation Tables to Save Time and Space, Software Practice & Experience, January 1991, Volume 21, No. 1

    Google Scholar 

  14. R.Giegerich, Code Selection by Inversion of Order-Sorted Derivors, Theoretical Computer Science 73 (1990), p. 177–211

    Article  MathSciNet  MATH  Google Scholar 

  15. R. Giegerich, On the Structure of Verifiable Code Generator Specifications, Proc. of the ACM SIGPLAN’90 Conference on Programming Language Design and Implementation, p.1–8, Sigplan Notices, Vol. 25, Number 6, June 1990

    Google Scholar 

  16. C. Hoffmann, J.O’Donnell, Pattern Matching in Trees, Journal of the ACM Vol. 29, No. 1, January 1982, pp. 68–95

    Article  MathSciNet  MATH  Google Scholar 

  17. E. Pelegri-Llopart, Rewrite Systems, Pattern Matching and Codé Generation, Dissertation, EECS-Report, UC Berkeley, 1987

    Google Scholar 

  18. J.R. Büchi, Finite Automata, Their Algebras and Grammars, Towards a Theory of Formal Expressions, Springer-Verlag, New York, 1989

    MATH  Google Scholar 

  19. J.W.Thatcher, Tree Automata: An Informal Survey, Currents in the Theory of Computing, A.V. Aho (editor), Prentice Hall, Englewood CLiffs, NJ, 1973, 143–172

    Google Scholar 

  20. W.S.Brainerd, Minimalization of Tree Automata, Information and Control 13 (1968) p. 484–491

    Article  MathSciNet  Google Scholar 

  21. D.R.Chase, An Improvement to Bottom-up Tree Pattern Matching, POPL87, Munich, Germany, January 1987

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 1992 Springer-Verlag London

About this paper

Cite this paper

Emmelmann, H. (1992). Code Selection by Regularly Controlled Term Rewriting. In: Giegerich, R., Graham, S.L. (eds) Code Generation — Concepts, Tools, Techniques. Workshops in Computing. Springer, London. https://doi.org/10.1007/978-1-4471-3501-2_1

Download citation

  • DOI: https://doi.org/10.1007/978-1-4471-3501-2_1

  • Publisher Name: Springer, London

  • Print ISBN: 978-3-540-19757-7

  • Online ISBN: 978-1-4471-3501-2

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics