Generalized dominators for structured programs

  • Stephen Alstrup
  • Peter W. Lauridsen
  • Mikkel Thorup
Contributed Papers
Part of the Lecture Notes in Computer Science book series (LNCS, volume 1145)


Recently it has been discovered that control flow graphs of structured programs have bounded treewidth. In this paper we show that this knowledge can be used to design fast algorithms for control flow analysis. We give a linear time algorithm for the problem of finding the immediate multiple-vertex dominator set for all nodes in a control flow graph. The problem was originally proposed by Gupta (Generalized dominators and post-dominators, ACM Symp. on Principles of Programming Languages, 1992). Without the restriction of bounded treewidth the fastest algorithm runs in O(¦V¦*¦E¦) on a graph with ¦V¦ nodes and ¦E¦ edges and is due to Alstrup, Clausen and JØrgensen (An O(¦V¦*¦E¦) Algorithm for Finding Immediate Multiple-Vertex Dominators, accepted to Information Processing Letters).


Generalize Dominator Dominator Tree Tree Node Tree Decomposition Linear Time Algorithm 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    A.V. Aho, R. Sethi, and J.D. Ullman. Compilers: Principles, Techniques and Tools. Addison-Wesley, 1986.Google Scholar
  2. 2.
    S. Alstrup, J. Clausen, and K. JØrgensen. An O(¦V¦*¦E¦) algorithm for finding immediate multiple-vertex dominators. Technical Report DIKU-TR-96/4, Deparment of Computer Science, University of Copenhagen, 1996. Revised version with minor change accepted to Information Processing Letters.Google Scholar
  3. 3.
    H. Bodlaender. A linear time algorithm for finding tree-decompositions of small treewidth. In Proc. 25th ACM. Symp. on theory of Comp.(STOC'93), pages 226–234, 1993.Google Scholar
  4. 4.
    G.R. Gao, Y.-F Lee, and V.C. Sreedhar. DJ-graphs and their application to flow-graph analyses. Technical Report 70, McGill University, School of Computer Science, ACAPS, May 1994.Google Scholar
  5. 5.
    G.R. Gao and V.C. Sreedhar. A linear time algorithm for placing Φ-nodes. In ACM Symp. on the Principles of Programming Languages (POPL'95), volume 22, pages 62–73, January 1995.Google Scholar
  6. 6.
    R. Gupta. Generalized dominators and post-dommators. In ACM Symp. on Principles of Programming Languages (POPL'92), volume 19, pages 246–257, 1992.Google Scholar
  7. 7.
    R. Gupta. Generalized dominators. Information processing letters, 53:193–200, 1995.Google Scholar
  8. 8.
    D. Harel. A linear time algorithm for finding dominator in flow graphs and related problems. In Proc. 17th Ann. ACM Symp. on theory of Comp. (STOC'85), pages 185–194, 1985.Google Scholar
  9. 9.
    M.S. Hecht and J.D. Ullman. A simple algorithm for global data flow analysis of programs. SIAM J. Comput., 4:519–532, 1975.Google Scholar
  10. 10.
    B.R. Kernighan and D.M. Ritchie. The C programming language. Prentice-Hall, New-Jersey, 1978.Google Scholar
  11. 11.
    T. Lengauer and R.E. Tarjan. A fast algorithm for finding dominators in a flow-graph. ACM Trans. Programming Languages Systems, 1:121–141, 1979.Google Scholar
  12. 12.
    P. Naur. Revised report on the algorithmic language algol 60. Comm. ACM, 1(6):1–17, 1963.Google Scholar
  13. 13.
    P.W. Purdom and E.F. Moore. Immediate predominators in a directed graph. Comm. ACM, 15(8):777–778, 1972.CrossRefGoogle Scholar
  14. 14.
    R.E. Tarjan. Finding dominators in directed graphs. SIAM J. Comput., 3(1):62–89, 1974.Google Scholar
  15. 15.
    M. Thorup. Structured programs have small tree-width and good register allocation. Technical Report DIKU-TR-95/18 (revised version), Deparaient of Computer Science, University of Copenhage, 1995.Google Scholar
  16. 16.
    N. Wirth. The programming language pascal. Acta informatica, 1:35–63, 1971.CrossRefGoogle Scholar
  17. 17.
    N. Wirth. Programming in modula-2(3rd corr.ed). Springer-verlag, Berlin, New York, 1985.Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 1996

Authors and Affiliations

  • Stephen Alstrup
    • 1
  • Peter W. Lauridsen
    • 1
  • Mikkel Thorup
    • 1
  1. 1.Department of Computer ScienceUniversity of CopenhagenCopenhagenDenmark

Personalised recommendations