Advertisement

Testing completeness of code selector specifications

  • Helmut Emmelmann
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 641)

Abstract

The tree pattern matching approach for code selection has proven very successful. This paper presents an algorithm to test the completeness of a code selector specification. A specification is said to be complete, if it can produce code for every possible intermediate code tree produced by the front end.

To enable a code generator generator to test the completeness property current code selector descriptions have to be extended to describe the set of possible intermediate code trees. We use a tree grammar for this purpose. The paper first presents the algorithm for testing completeness. Afterwards implementation techniques are discussed. Finally results of practical experiments using the algorithm are given.

References

  1. [Cha87]
    D.R.Chase: An Improvement to Bottom-up Tree Pattern Matching, POPL87, Munich, Germany, January 1987Google Scholar
  2. [ESL89]
    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 1989Google Scholar
  3. [FeSe92]
    Ferdinand, Seidl and Wilhelm Tree automata for code selection, Proceedings of the Code'91 workshop on code generation, Workshops in Computing, Springer 1992Google Scholar
  4. [GiSchm88]
    R.Giegerich, K.Schmal: Code selection techniques: pattern matching, tree parsing and inversion of derivors, ESOP '88, LNCS 300, pp. 247–268, March 1988Google Scholar
  5. [Gie90]
    R. Giegerich: Code Selection by Inversion of Order-Sorted Derivors, Theoretical Computer Science 73 (1990), pp. 177–211Google Scholar
  6. [HaCh86]
    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, 1986Google Scholar
  7. [HoDo82]
    C. Hoffmann, J. O'Donnell: Pattern Matching in Trees, Journal of the ACM Vol. 29, No. 1, January 1982, pp. 68–95Google Scholar
  8. [MöWe86]
    Möncke, Weisgerber, R. Wilhelm Generative support for transformational programming. ESPRIT: Status Report of Continuing Work, Elsevier Sc., 1986, BrusselsGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 1992

Authors and Affiliations

  • Helmut Emmelmann
    • 1
  1. 1.GMD Research Center KarlsruheKarlsruheGermany

Personalised recommendations