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

skip to main content
article
Open access

A generalized theory of bit vector data flow analysis

Published: 01 September 1994 Publication History

Abstract

The classical theory of data flow analysis, which has its roots in unidirectional flows, is inadequate to characterize bidirectional data flow problems. We present a generalized theory of bit vector data flow analysis which explains the known results in unidirectional and bidirectional data flows and provides a deeper insight into the process of data flow analysis. Based on the theory, we develop a worklist-based generic algorithm which is uniformly applicable to unidirectional and bidirectional data flow problems. It is simple, versatile, and easy to adapt for a specific problem. We show that the theory and the algorithm are applicable to all bounded monotone data flow problems which possess the property of the separability of solution.
The theory yields valuable information about the complexity of data flow analysis. We show that the complexity of worklist-based iterative analysis is the same for unidirectional and bidirectional problems. We also define a measure of the complexity of round-robin iterative analysis. This measure, called width, is uniformly applicable to unidirectional and bidirectional problems and provides a tighter bound for unidirectional problems than the traditional measure of depth. Other applications include explanation of isolated results in efficient solution techniques and motivation of new techniques for bidirectional flows. In particular, we discuss edge splitting and edge placement and develop a feasibility criterion for decomposition of a bidirectional flow into a sequence of unidirectional flows.

References

[1]
AHO, A. V., SETttI, R., AND ULLMAN, J.D. 1986. Compilers--Principles, Techniques, and Tools. Addison-Wesley, Reading, Mass.
[2]
ALLEN, F. E. AND COCKE, J. 1977. A program data flow analysis procedure. Commun. ACM 19, 3, 137-147.
[3]
BISWAS, S., BHATTACHARJEE, G. P., AND DRAR, P. 1980. A comparison of some algorithms for live variable analysis. Int. J. Comput. Math. 8, 2, 121-134.
[4]
CHOW, F. C. 1988. Minimizing register usage penalty at procedure calls. In Proceedings of SIGPLAN'88 Symposium on Compiler Construction. ACM SIGPLAN Not. 23, 7, 85-94.
[5]
DHAMDHERE, D.M. 1991. Comments on practical adaptation of the global optimization algorithm by Morel and Renvoise. ACM Trans. Program. Lang. Syst. 13, 2, 291-294.
[6]
DHAMDHERE, D.M. 1988a. A fast algorithm for code movement optimization. ACM SIGPLAN Not. 23, 10, 172-180.
[7]
DHAMDHERE, D. M. 1988b. Register assignment using code placement techniques. Comput. Lang. 13, 2, 75-93.
[8]
DHAMDHERE, D. M. AND KHEDKER, U.P. 1993. Complexity of bidirectional data flow analysis. In Proceedings of the 20th Annual A CM Symposium on Principles of Programming Languages. ACM, New York, 397-408.
[9]
DHAMDHERE, D. M. AND PATH, H. 1993. An elimination algorithm for bidirectional data flow analysis using edge placement technique. ACM Trans. Program. Lang. Syst. 15, 312-336.
[10]
DHAMDHERE, D. M., ROSEN, B. K., AND ZADECK, F.K. 1992. How to analyze large programs efficiently and informatively, in ACM SIGPLAN '92 Conference on Programming Language Design and Implementation. ACM, New York.
[11]
GRAHAM, S. AND WEGMAN, M. 1976. A fast and usually linear algorithm for global data flow analysis. J. ACM 23, 1, 172-202.
[12]
HECHT, M.S. 1977. Flow Analysis of Computer Programs. Elsevier North-Holland, Amsterdam.
[13]
JOSHI, S. M. AND DHAMDHERE, D.M. 1982a. A composite algorithm for strength reduction and code movement: Part I. Int. J. Comput. Math. 11, 1, 21-44.
[14]
JOSHI, S. M. AND DHAMDHERE, D.M. 1982b. A composite algorithm for strength reduction and code movement: Part II. Int. J. Comput. Math. 11, 2, 111-126.
[15]
KAM, J. B. AND ULLMAN, J.D. 1977. Monotone data flow analysis frameworks. Acta Informatica 7, 3, 305-318.
[16]
KENNEDY, K. 1972. Safety of code movement. Int. J. Comput. Math. 3, 2/3, 117-130.
[17]
KHEDKER, U. P. AND DHAMDHERE~ D.M. 1992. A generalized theory of data flow analysis. Tech. Rep. TR-070-92, Dept. of Computer Science and Engineering, Indian Inst. of Technology, Bombay, India.
[18]
KILDALL, G. 1973. A unified approach to global program optimization. In Proceedings of the tst Annual ACM Symposium on Principles of Programming Languages. ACM, New York, 194-206.
[19]
KNooP, Ji, RUTHING, O., AND STEFFEN, B. 1992. Lazy code motion. In ACM SIGPLAN '92 Conference on Programming Language Design and Implementation. ACM SIGPLAN Not. 27,7.
[20]
MARLOWE, T. J. AND RYDER, B.G. 1990. Properties of data flow frameworks. Acta Informatica 28, 2, 121-163.
[21]
MOREL, E. AND RENVOISE, C. 1979. Global optimization by suppression of partial redundancies. Commun. ACM 22, 2, 96-103.
[22]
MUCI4NICK, S. S. AND JONES, N.D. 1981. Program Flow Analysis: Theory and Applications. Prentice-Hall, Englewood Cliffs, N.J.
[23]
ROSEN, B.K. 1980. Monoids for rapid data flow analysis. SIAM J. Comput. 9, 1, 159-196.
[24]
RYDER, B. G. AND PAULL, M. C. 1986. Elimination algorithms for data flow analysis. ACM Comput. Surv. 18, 3, 277-316.
[25]
TARJ~, R.E. 1981a. Fast algorithms for solving path problems. J. ACM 28, 3, 594-614.
[26]
TARJAN, R.E. 1981b. A unified approach to path problem. J. ACM 28, 3, 577-593.
[27]
ZADECg, F.K. 1984. Incremental data flow analysis in a structured program editor in Proceedings of SIGPLAN'84 Symposium on Computer Construction. ACM SIGPLAN Not. 19, 6, 132-143.

Cited By

View all
  • (2022)Sound, precise, and fast abstract interpretation with tristate numbersProceedings of the 20th IEEE/ACM International Symposium on Code Generation and Optimization10.1109/CGO53902.2022.9741267(254-265)Online publication date: 2-Apr-2022
  • (2020)Testing static analyses for precision and soundnessProceedings of the 18th ACM/IEEE International Symposium on Code Generation and Optimization10.1145/3368826.3377927(81-93)Online publication date: 22-Feb-2020
  • (2020)Bidirectionality in flow-sensitive demand-driven analysisScience of Computer Programming10.1016/j.scico.2020.102391(102391)Online publication date: Jan-2020
  • Show More Cited By

Recommendations

Reviews

Gerald David Chandler

Dataflow problems are concerned with a set of flow equations that relate the flow of information concerning safe and profitable code transformations in programs. The larger part of this paper consists of systematizing known results. The major contributions are to make the results better understood and to provide a tighter bound on the complexity of dataflow analysis. This work represents a continuation of a program that has been carried on for more than a decade by Dhamdhere and his students and colleagues. It should prove valuable to workers in the field and a useful reference to newcomers. For the latter, it is likely to prove difficult, as it is heavy with definitions. The presentation seems to have suffered from what appears to be a reduction of a longer paper that included proofs. The language is clear, though, and there are no important typographical errors. The authors use as running examples the equations for five problems: reaching definitions, live variable, the Morel-Renvoise algorithm, the basic load store insertion algorithm, and the composite hoisting and strength reduction algorithm. Flow problems can be forward, backward, or bidirectional. In the last case, if a program is viewed as a directed graph, dataflow information flows up and down the graph. The authors observe that bidirectional problems are made clearer by distinguishing between flows through nodes and those along edges. They define sibling and spouse effects, in which information flows respectively from nodes that have the same parents or the same child, and show how these flows arise in bidirectional problems. After introducing their theoretical framework, the authors present an algorithm for solving the general flow problem based on wordwise analysis, in which a bit vector is used to represent the solution and is processed in word-units. This is plausibly said to save time “since all parts may not require processing of all nodes,” but they present no experimental confirmation, although they do refer to another paper with data. They point out that their methods are not restricted to bit-vector methods; rather, they apply to any dataflow framework that is monotonic and separable. One method of solution of flow problems is iterative, in which an initial solution is assumed and a fixed-point solution found by repeated substitution of the current answer in the equations. The authors point out that previous works were not rigorous in specifying how to choose initial values and fix this lacuna. The standard upper limit on the complexity of itera tive solutions is that it is proportional to the number of back edges not visited during a standard (reverse) postorder traversal. The authors improve on this by defining a graph width, which is the size of a subset of the back edges and thus a smaller limit.

Svetlana Segarceanu

Dataflow analysis is an important process used in program design, optimization, and debugging. The paper presents a generalized theory of bit vector dataflow analysis, which elucidates the known results in unidirectional and bidirectional dataflows and provides a deeper insight into the process of dataflow analysis. The theory presented in the paper handles both unidirectional (either forward or backward) and bidirectional dataflow problems. Though the presentation concerns bit vector problems, the theory is applicable to a larger class of dataflow problems. After an introductory section, the authors present the Morel Renvoise algorithm for partial redundancy elimination, which they use as a representative bidirectional problem throughout the paper. Section 3 presents an overview of the classical theory of dataflow analysis and compares the efficiency of several methods (such as meet over paths solution and maximum fixed point solution), and describes the two main approaches to dataflow analysis (the iterative method and the elimination method). The next section defines the bit vector frameworks, generalizes the classical concepts, and proposes generic dataflow equations. Section 5 presents a worklist-based generic algorithm, analyzes its performance, and proves that the complexity of the worklist-based iterative analysis is the same for unidirectional and bidirectional problems. Section 6 discusses several applications of the generalized theory. A new measure is defined, which is shown to bound the number of iterations of round-robin analysis for unidirectional and bidirectional problems. This section also establishes several results on the solution of bidirectional dataflows with regard to edge splitting and edge placement, and develops a feasibility criterion for decomposition of bi directional flows into a sequence of unidirectional flows. Section 7 draws conclusions on the significance and applicability of the results presented. Although not cited in the text, some of the figures clearly illustrate certain phenomena described. For instance, Figure 13 concerns Example 6.2.1.1, and Figure 14 is an illustration of the process of edge splitting. The main goal of the work—to unify the theoretical results concerning unidirectional and bidirectional dataflows—is thoroughly achieved. It extends previous results in dataflow analysis, most of which can be found in the references. Thus, it would be enlightening reading for people whose professional interests lie in this domain.

Access critical reviews of Computing literature here

Become a reviewer for Computing Reviews.

Comments

Please enable JavaScript to view thecomments powered by Disqus.

Information & Contributors

Information

Published In

cover image ACM Transactions on Programming Languages and Systems
ACM Transactions on Programming Languages and Systems  Volume 16, Issue 5
Sept. 1994
267 pages
ISSN:0164-0925
EISSN:1558-4593
DOI:10.1145/186025
Issue’s Table of Contents

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 01 September 1994
Published in TOPLAS Volume 16, Issue 5

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. bidirectional data flows
  2. data flow analysis
  3. data flow frameworks

Qualifiers

  • Article

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)114
  • Downloads (Last 6 weeks)13
Reflects downloads up to 16 Nov 2024

Other Metrics

Citations

Cited By

View all
  • (2022)Sound, precise, and fast abstract interpretation with tristate numbersProceedings of the 20th IEEE/ACM International Symposium on Code Generation and Optimization10.1109/CGO53902.2022.9741267(254-265)Online publication date: 2-Apr-2022
  • (2020)Testing static analyses for precision and soundnessProceedings of the 18th ACM/IEEE International Symposium on Code Generation and Optimization10.1145/3368826.3377927(81-93)Online publication date: 22-Feb-2020
  • (2020)Bidirectionality in flow-sensitive demand-driven analysisScience of Computer Programming10.1016/j.scico.2020.102391(102391)Online publication date: Jan-2020
  • (2018)Compilation and Other Software Techniques Enabling Approximate ComputingApproximate Circuits10.1007/978-3-319-99322-5_22(443-463)Online publication date: 6-Dec-2018
  • (2017)Generalising tree traversals and tree transformations to DAGs: Exploiting sharing without the painScience of Computer Programming10.1016/j.scico.2016.03.006137(63-97)Online publication date: Apr-2017
  • (2017)Vector DataEncyclopedia of GIS10.1007/978-3-319-17885-1_1438(2411-2416)Online publication date: 12-May-2017
  • (2016)Vector DataEncyclopedia of GIS10.1007/978-3-319-23519-6_1438-2(1-6)Online publication date: 27-May-2016
  • (2015)Generalising Tree Traversals to DAGsProceedings of the 2015 Workshop on Partial Evaluation and Program Manipulation10.1145/2678015.2682539(27-38)Online publication date: 13-Jan-2015
  • (2014)Syntax-Directed Divide-and-Conquer Data-Flow AnalysisProgramming Languages and Systems10.1007/978-3-319-12736-1_21(392-407)Online publication date: 2014
  • (2013)Fun with semiringsACM SIGPLAN Notices10.1145/2544174.250061348:9(101-110)Online publication date: 25-Sep-2013
  • Show More Cited By

View Options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Login options

Full Access

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media