How to uniformly specify program analysis and transformation with graph rewrite systems

  • Uwe Aßmann
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 1060)


Implementing program optimizers is a task which swallows an enourmous amount of man-power. To reduce development time a simple and practial specification method is highly desirable. Such a method should comprise both program analysis and transformation. However, although several frameworks for program analysis exist, none of them can be used for analysis and transformation uniformly. This paper presents such a method. For program analysis we use a simple variant of graph rewrite systems (edge addition rewrite systems). For program transformation we apply more complex graph rewrite systems. Our specification method has been implemented prototypically in the optimizer generator OPTIMIX. OPTIMIX works with arbitrary intermediate languages and generates real-life program analyses and transformations. We demonstrate this by several examples and measurements.


Program analysis program transformation optimization specification graph rewrite systems 


  1. [Aß95a]
    Uwe Aßmann. Generierung von Programmoptimierungen mit Graphersetzungssystemen. PhD thesis, Universität Karlsruhe, Kaiserstr. 12, 76128 Karlsruhe, Germany, July 1995.Google Scholar
  2. [Aß95b]
    Uwe Aßmann. On Edge Addition Rewrite Systems and Their Relevance to Program Analysis. In J. Cuny, editor, 5th Workshop on Graph Grammars and Their Application To Computer Science, to appear in Lecture Notes in Computer Science. Springer, 1995.Google Scholar
  3. [AAvS94]
    M. Alt, U. Aßmann, and H. van Someren. Cosy Compiler Phase Embedding with the CoSy Compiler Model. In P. A. Fritzson, editor, Compiler Construction, Lecture Notes in Computer Science 786, pages 278–293. Springer Verlag, April 1994.Google Scholar
  4. [AM95]
    M. Alt and F. Martin. Generation of efficient interprocedural analyzers with pag. In A. Mycroft, editor, Static Analysis Symposium, volume to appear of Lecture Notes in Computer Science, Spinger Verlag. Springer Verlag, 1995.Google Scholar
  5. [Dör95]
    Heiko Dörr. Efficient Graph Rewriting and Its Implementation, volume 922 of Lecture Notes in Computer Science, Spinger Verlag. Springer Verlag, 1995.Google Scholar
  6. [Har88]
    D. Harel. On visual formalisms. Communications of the ACM, 31(5):514–530, May 1988.Google Scholar
  7. [Hec77]
    M. S. Hecht. Flow Analysis of Computer Programs. Elsevier North-Holland, 1977.Google Scholar
  8. [Koc92]
    Gerd Kock. Spezifikation und Verifikation von Optimierungsalgorithmen. GMD Bericht 201, Universität Karlsruhe, 1992.Google Scholar
  9. [KRS94]
    J. Knoop, O. Rüthing, and B. Steffen. Optimal code motion: Theory and practice. Transactions on Programming Languages and Systems, 16(7), July 1994.Google Scholar
  10. [Rep94]
    Thomas Reps. Solving Demand Versions of Interprocedural Analysis Problems. In P.A. Fritzson, editor, Compiler Construction, volume 786 of Lecture Notes in Computer Science, pages 389–403, April 1994.Google Scholar
  11. [RHS95]
    T. Reps, S. Horwitz, and M. Sagiv. Precise interprocedural dataflow analysis via graph reachability. In ACM Symposium on Principles of Programming Languages, volume 22, pages 49–61. ACM, January 1995.Google Scholar
  12. [Sch90]
    A. Schürr. Introduction to PROGRES, an Attribute Graph Grammar Based Specification Language. In Graph-Theoretic Concepts in Computer Science, volume 541 of Lecture Notes in Computer Science, pages 444–458. Springer Verlag, 1990.Google Scholar
  13. [Ste91]
    Bernhard Steffen. Data flow analysis as model checking. In Proceedings of Theoretical Aspects of Computer Software (TACS), pages 346–364, 1991.Google Scholar
  14. [TH92]
    S. W. K. Tjiang and J. L. Henessy. Sharlit — A tool for building optimizers. SIGPLAN Conference on Programming Language Design and Implementation, 1992.Google Scholar
  15. [Ven89]
    G. A. Venkatesh. A Framework for Construction and Evaluation of High-Level Specifications for Program Analysis Techniques. In ACM SIGPLAN Conference on Programming Language Design and Implementation, June 1989.Google Scholar
  16. [VH92]
    Jürgen Vollmer and Ralf Hoffart. Modula-P, a language for parallel programming: Definition and implementation on a transputer network. In Proceedings of the 1992 International Conference on Computer Languages ICCL'92, Oakland, California, pages 54–64. IEEE, IEEE Computer Society Press, April 1992.Google Scholar
  17. [WKD94]
    H.R. Walters, J.F.Th. Kamperman, and T.B. Dinesh. An extensible language for the generation of parallel data manipulation and control packages. In P. Fritzson, editor, Proceedings of the Poster Session of Compiler Construction, number LiTH-IDA-R-94-11 in PELAB Research Report. Linköping University, 1994.Google Scholar
  18. [WS90]
    D. Whitfield and M. L. Soffa. An approach to ordering optimizing transformations. In ACM Conference on Principles and Practice of Parallel Programming (PPOPP), 1990.Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 1996

Authors and Affiliations

  • Uwe Aßmann
    • 1
  1. 1.INRIA RocquencourtLe Chesnay CedexFrance

Personalised recommendations