Advertisement

Generation of efficient interprocedural analyzers with PAG

  • Martin Alt
  • Florian Martin
Contributed Papers
Part of the Lecture Notes in Computer Science book series (LNCS, volume 983)

Abstract

To produce high quality code, modern compilers use global optimization algorithms based on abstract interpretation. These algorithms are rather complex; their implementation is therefore a non-trivial task and error-prone. However, since they are based on a common theory, they have large similar parts. We conclude that analyzer writing better should be replaced with analyzer generation.

We present the tool PAG that has a high level functional input language to specify data flow analyses. It offers the specification of even recursive data structures and is therefore not limited to bit vector problems. PAG generates efficient analyzers which can be easily integrated in existing compilers. The analyzers are interprocedural, they can handle recursive procedures with local variables and higher order functions. PAG has successfully been tested by generating several analyzers (e.g. alias analysis, constant propagation) for an industrial quality ANSI-C and Fortran90 compiler.

Keywords

data flow analysis specification and generation of analyzers lattice specification abstract syntax specification interprocedural analysis compiler construction 

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    M. Alt, U. Aßmann, and H. van Someren. Cosy Compiler Phase Embedding with the Cosy Compiler Model. In CC'94, LNCS 786 Springer, 1994.Google Scholar
  2. 2.
    D. Callahan, K. D. Cooper, K. Kennedy, and L. Torczon. Interprocedural constant propagation. In SIGPLAN '86, volume 21, June 1986.Google Scholar
  3. 3.
    P. Cousot and R. Cousot. Abstract Interpretation: A Unified Lattice Model for Static Analysis of Programs by Construction or Approximation of Fixpoints. In POPL'77, pages 238–252, 1977.Google Scholar
  4. 4.
    P. Cousot and R. Cousot. Systematic design of program analysis frameworks. In POPL'79, pages 269–282, January 1979.Google Scholar
  5. 5.
    P. Cousot and R. Cousot. Abstract interpretation frameworks. Journal of Logic Computation, 2(4):511–547, 1992.Google Scholar
  6. 6.
    D. Dhamdhere, B. Rosen, and F. K. Zadeck. How to analyze large programs efficiently and informatively. In SIGPLAN PLDI '92, volume 27, June 1992.Google Scholar
  7. 7.
    E. Duesterwald, R. Gupta, and M. L. Soffa. Demand-driven computation of interprocedual data flow. In POPL '95, January 1995.Google Scholar
  8. 8.
    D. Grove and L. Torczon. Interprocedural Constant Propagation: A Study of Jump Function Implementations. In ACM SIGPLAN PLDI '93, 1993.Google Scholar
  9. 9.
    M. Hecht. Flow Analysis of Computer Programs. North Holland, 1977.Google Scholar
  10. 10.
    N. Jones and S. Muchnick. Even simple programs are hard to analyze. In POPL'75, pages 106–118, January 1975.Google Scholar
  11. 11.
    J. Kam and J. Ullman. Monotone data flow analysis frameworks. Acta Informatica, 7:305–317, 1977.Google Scholar
  12. 12.
    G. Kildall. A unified approach to global program optimization. In POPL'73, pages 194–206, October 1973.Google Scholar
  13. 13.
    J. Knoop and B. Steffen. The interprocedural coincidence theorem. In CC'92, LNCS 641, pages 125–140., 1992.Google Scholar
  14. 14.
    T. Reps, M. Sagiv, and S. Horwitz. Precise interprocedural dataflow analysis with application to constant propagation. In TAPSOFT'95, Arhus, Denmark, 1995.Google Scholar
  15. 15.
    Florian Martin. Die Generierung von Datenflußanalysatoren. Master's thesis, Universität des Saarlandes, 1995.Google Scholar
  16. 16.
    Florian Martin. PAG Reference Manual. Universität des Saarlandes, 1995.Google Scholar
  17. 17.
    Kurt Mehlhorn. Data Structures and Algorithms 2: Graph Algorithms and NP-Completeness. Springer Verlag, 1984. ISBN 3–540-13641-X.Google Scholar
  18. 18.
    H.R. Nielson and F. Nielson. Bounded fixed point iteration. In ACM POPL'92, pages 71–82, Albuquerque, NM, January 1992.Google Scholar
  19. 19.
    Mads Rosendahl. Higher-order chaotic iteration sequences. In PLILP'93, Tallinn, Estonia, LNCS 714, pages 332–345. Springer-Verlag, 1993.Google Scholar
  20. 20.
    M. Sharir and A. Pnueli. Two approaches to interprocedural data flow analysis. In Program Flow Analysis: Theory and Applications, chapter 7, Prentice-Hall, 1981.Google Scholar
  21. 21.
    S. Tjiang and J. Hennessy. Sharlit — A tool for building optimizers. In PLDI'92.Google Scholar
  22. 22.
    G.V. Venkatesch and C. N. Fischer. Spare: A development environment For Program Analysis Algorithms. In IEEE Transactions on Software Engineering, 1992.Google Scholar
  23. 23.
    M. N. Wegman and F. K. Zadeck. Constant propagation with conditional branches. In ACM POPL'85, pages 291–299, New Orleans, LA, January 1985.Google Scholar
  24. 24.
    Reinhard Wilhelm and Dieter Maurer. Compiler Design. International Computer Science Series. Addison-Wesley, 1995.Google Scholar
  25. 25.
    K. Yi and W.L. Harrison III. Automatic generation and management of interprocedural program analyses. In ACM SIGPLAN-SIGACT, January 1993.Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 1995

Authors and Affiliations

  • Martin Alt
    • 1
  • Florian Martin
    • 1
  1. 1.Universität des SaarlandesSaarbrücken

Personalised recommendations