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.
Partially funded by the ESPRIT Project #5399 (COMPARE)
Preview
Unable to display preview. Download preview PDF.
References
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.
D. Callahan, K. D. Cooper, K. Kennedy, and L. Torczon. Interprocedural constant propagation. In SIGPLAN '86, volume 21, June 1986.
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.
P. Cousot and R. Cousot. Systematic design of program analysis frameworks. In POPL'79, pages 269–282, January 1979.
P. Cousot and R. Cousot. Abstract interpretation frameworks. Journal of Logic Computation, 2(4):511–547, 1992.
D. Dhamdhere, B. Rosen, and F. K. Zadeck. How to analyze large programs efficiently and informatively. In SIGPLAN PLDI '92, volume 27, June 1992.
E. Duesterwald, R. Gupta, and M. L. Soffa. Demand-driven computation of interprocedual data flow. In POPL '95, January 1995.
D. Grove and L. Torczon. Interprocedural Constant Propagation: A Study of Jump Function Implementations. In ACM SIGPLAN PLDI '93, 1993.
M. Hecht. Flow Analysis of Computer Programs. North Holland, 1977.
N. Jones and S. Muchnick. Even simple programs are hard to analyze. In POPL'75, pages 106–118, January 1975.
J. Kam and J. Ullman. Monotone data flow analysis frameworks. Acta Informatica, 7:305–317, 1977.
G. Kildall. A unified approach to global program optimization. In POPL'73, pages 194–206, October 1973.
J. Knoop and B. Steffen. The interprocedural coincidence theorem. In CC'92, LNCS 641, pages 125–140., 1992.
T. Reps, M. Sagiv, and S. Horwitz. Precise interprocedural dataflow analysis with application to constant propagation. In TAPSOFT'95, Arhus, Denmark, 1995.
Florian Martin. Die Generierung von Datenflußanalysatoren. Master's thesis, Universität des Saarlandes, 1995.
Florian Martin. PAG Reference Manual. Universität des Saarlandes, 1995.
Kurt Mehlhorn. Data Structures and Algorithms 2: Graph Algorithms and NP-Completeness. Springer Verlag, 1984. ISBN 3–540-13641-X.
H.R. Nielson and F. Nielson. Bounded fixed point iteration. In ACM POPL'92, pages 71–82, Albuquerque, NM, January 1992.
Mads Rosendahl. Higher-order chaotic iteration sequences. In PLILP'93, Tallinn, Estonia, LNCS 714, pages 332–345. Springer-Verlag, 1993.
M. Sharir and A. Pnueli. Two approaches to interprocedural data flow analysis. In Program Flow Analysis: Theory and Applications, chapter 7, Prentice-Hall, 1981.
S. Tjiang and J. Hennessy. Sharlit — A tool for building optimizers. In PLDI'92.
G.V. Venkatesch and C. N. Fischer. Spare: A development environment For Program Analysis Algorithms. In IEEE Transactions on Software Engineering, 1992.
M. N. Wegman and F. K. Zadeck. Constant propagation with conditional branches. In ACM POPL'85, pages 291–299, New Orleans, LA, January 1985.
Reinhard Wilhelm and Dieter Maurer. Compiler Design. International Computer Science Series. Addison-Wesley, 1995.
K. Yi and W.L. Harrison III. Automatic generation and management of interprocedural program analyses. In ACM SIGPLAN-SIGACT, January 1993.
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 1995 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Alt, M., Martin, F. (1995). Generation of efficient interprocedural analyzers with PAG. In: Mycroft, A. (eds) Static Analysis. SAS 1995. Lecture Notes in Computer Science, vol 983. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-60360-3_31
Download citation
DOI: https://doi.org/10.1007/3-540-60360-3_31
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-60360-3
Online ISBN: 978-3-540-45050-4
eBook Packages: Springer Book Archive