Nothing Special   »   [go: up one dir, main page]

skip to main content
research-article

Symbolic Program Analysis in Almost-Linear Time

Published: 01 February 1982 Publication History

Abstract

This paper describes an algorithm to construct, for each expression in a given program text, a symbolic expression whose value is equal to the value of the text expression for all executions of the program. We call such a mapping from text expressions to symbolic expressions a cover. Covers are useful in such program optimization techniques as constant propagation and code motion. The particular cover constructed by our methods is in general weaker than the covers obtainable by the methods of [Ki], [FKU], [RL], [R2] but our method has the advantage of being very efficient. It requires $O(m\alpha (m,n) + l)$ operations if extended bit vector operations have unit cost, where n is the number of vertices in the control flow graph of the program, m is the number of edges, l is the length of the program text, and $\alpha $ is related to a functional inverse of Ackermann’s function [T2]. Our method does not require that the program be well-structured nor that the flow graph be reducible.

References

[1]
A. V. Aho, J. D. Ullman, Introduction to Compiler Design, Addison-Wesley, Reading, MA, 1977, 441–477
[2]
J. Cocks, F. E. Allen, R. Rustin, A catalogue of optimization transformationsDesign and Optimization of Computers, Prentice-Hall, Englewood Cliffs, NJ, 1971, 1–31
[3]
Peter J. Downey, Ravi Sethi, Robert Endre Tarjan, Variations on the common subexpression problem, J. Assoc. Comput. Mach., 27 (1980), 758–771
[4]
C. Earnest, Some topics in code optimization, J. Assoc. Comput. Mach., 21 (1974), 76–102
[5]
R. Farrow, Efficient variants of path compression in unbalanced trees, 1978, unpublished manuscript
[6]
R. N. Faiman, A. A. Kortesoja, An optimizing Pascal compiler, IEEE Trans. Software Engineering, SE-6 (1980), 512–519
[7]
E. A. Fong, J. B. Kam, J. D. Ullman, Application of lattice algebra to loop optimization, Conf. Record Second ACM Symposium on Principles of Programming Languages, 1975, 1–9, January
[8]
C. M. Geschke, Ph.D. Thesis, Global program optimizations, Computer Science Dept., Carnegie-Mellon University, Pittsburgh, PA, 1972
[9]
S. Graham, M. Wegman, A fast and usually linear algorithm for global flow analysis, J. Assoc. Comput. Mach., 23 (1976), 172–202
[10]
Matthew S. Hecht, Jeffrey D. Ullman, Flow graph reducibility, SIAM J. Comput., 1 (1972), 188–202
[11]
G. A. Kildall, A unified approach to global program optimization, Proc. ACM Symposium on Principles of Programming Languages, Boston, 1973, 194–206
[12]
R. Lengauer, R. E. Tarjan, A fast algorithm for finding dominators in a flow graph, ACM Trans. Programming Languages and Systems, 1 (1979), 121–141
[13]
John H. Reif, Code motion, SIAM J. Comput., 9 (1980), 375–395
[14]
J. H. Reif, Ph.D. Thesis, Combinatorial aspects of symbolic program analysis, Division of Engineering and Applied Physics, Harvard University, Cambridge, MA, 1977
[15]
J. H. Reif, H. R. Lewis, Symbolic evaluation and the global value graph, Proc. 4th ACM Symposium on Principles of Programming Languages, 1977
[16]
J. T. Schwartz, Optimization of very high level languages—value transmission and its corollaries, Computer Languages, 1 (1975), 161–194
[17]
R. E. Tarjan, Depth-first search and linear graph algorithms, SIAM J. Comput., 1 (1972), 146–160
[18]
Robert Endre Tarjan, Applications of path compression on balanced trees, J. Assoc. Comput. Mach., 26 (1979), 690–715
[19]
Robert Endre Tarjan, A unified approach to path problems, J. Assoc. Comput. Mach., 28 (1981), 577–593

Cited By

View all

Index Terms

  1. Symbolic Program Analysis in Almost-Linear Time
    Index terms have been assigned to the content through auto-classification.

    Recommendations

    Comments

    Please enable JavaScript to view thecomments powered by Disqus.

    Information & Contributors

    Information

    Published In

    cover image SIAM Journal on Computing
    SIAM Journal on Computing  Volume 11, Issue 1
    Feb 1982
    199 pages
    ISSN:0097-5397
    DOI:10.1137/smjcat.1982.11.issue-1
    Issue’s Table of Contents

    Publisher

    Society for Industrial and Applied Mathematics

    United States

    Publication History

    Published: 01 February 1982

    Author Tags

    1. code movement
    2. code optimization
    3. constant propagation
    4. data flow analysis
    5. symbolic evaluation

    Qualifiers

    • Research-article

    Contributors

    Other Metrics

    Bibliometrics & Citations

    Bibliometrics

    Article Metrics

    • Downloads (Last 12 months)0
    • Downloads (Last 6 weeks)0
    Reflects downloads up to 14 Nov 2024

    Other Metrics

    Citations

    Cited By

    View all

    View Options

    View options

    Get Access

    Login options

    Media

    Figures

    Other

    Tables

    Share

    Share

    Share this Publication link

    Share on social media