Average case analysis of DJ graphs

Sreedhar et al. [V.C. Sreedhar, G.R. Gao, Y.-F. Lee, A new framework for elimination-based data flow analysis using DJ graphs, ACM Trans. Program. Lang. Syst. 20 (2) (1998) 388-435; V.C. Sreedhar, Efficient program analysis using DJ graphs, PhD thesis, School of Computer Science, McGill University, Montreal, Quebec, Canada, 1995] have presented an elimination-based algorithm to solve data flow problems. A thorough analysis of the algorithm shows that the worst-case performance is at least quadratic in the number of nodes of the underlying graph. In contrast, Sreedhar reports a linear time behavior based on some practical applications. In this paper we prove that for goto-free programs, the average case behavior is indeed linear. As a byproduct our result also applies to the average size of the so-called dominance frontier. A thorough average case analysis based on a graph grammar is performed by studying properties of the j-edges in DJ graphs. It appears that this is the first time that a graph grammar is used in order to analyze an algorithm. The average linear time of the algorithm is obtained by classic techniques in the analysis of algorithms and data structures such as singularity analysis of generating functions and transfer lemmas.

[1]  Niklaus Wirth,et al.  Programming in Modula-2 , 1985, Texts and Monographs in Computer Science.

[2]  G. Darboux,et al.  Mémoire sur l'approximation des fonctions de très-grands nombres, et sur une classe étendue de développements en série. , 1878 .

[3]  A. Meyers Reading , 1999, Language Teaching.

[4]  Donald E. Knuth,et al.  fundamental algorithms , 1969 .

[5]  Grzegorz Rozenberg,et al.  Handbook of Graph Grammars and Computing by Graph Transformations, Volume 1: Foundations , 1997 .

[6]  Marvin C. Paull Algorithm design: A recursion transformation framework , 1988 .

[7]  E. Rodney Canfield Remarks on an Asymptotic Method in Combinatorics , 1984, J. Comb. Theory, Ser. A.

[8]  Jakob Engblom,et al.  Modeling complex flows for worst-case execution time analysis , 2000, Proceedings 21st IEEE Real-Time Systems Symposium.

[9]  Alfred V. Aho,et al.  Compilers: Principles, Techniques, and Tools , 1986, Addison-Wesley series in computer science / World student series edition.

[10]  Ken Arnold,et al.  The Java Programming Language , 1996 .

[11]  Robert E. Tarjan,et al.  Finding Dominators Revisited , 2004, SODA 2004.

[12]  Guang R. Gao,et al.  A new framework for elimination-based data flow analysis using DJ graphs , 1998, TOPL.

[13]  Mark N. Wegman,et al.  Efficiently computing static single assignment form and the control dependence graph , 1991, TOPL.

[14]  Robert E. Tarjan,et al.  Finding dominators revisited: extended abstract , 2004, SODA '04.

[15]  John W. Moon,et al.  On an asymptotic method in enumeration , 1989, J. Comb. Theory, Ser. A.

[16]  Barbara G. Ryder,et al.  Elimination algorithms for data flow analysis , 1986, CSUR.

[17]  Mikkel Thorup,et al.  Dominators in Linear Time , 1999, SIAM J. Comput..

[18]  J. Van Leeuwen,et al.  Handbook of theoretical computer science - Part A: Algorithms and complexity; Part B: Formal models and semantics , 1990 .

[19]  Vugranam C. Sreedhar,et al.  Efficient program analysis using DJ graphs , 1996 .

[20]  Hartmut Ehrig,et al.  Handbook of graph grammars and computing by graph transformation: vol. 3: concurrency, parallelism, and distribution , 1999 .

[21]  Johann Blieberger,et al.  Data-Flow Frameworks for Worst-Case Execution Time Analysis , 2002, Real-Time Systems.

[22]  R. Tarjan Graph theory and Gaussian elimination. , 1975 .

[23]  D. Jutras Quebec. , 1907 .

[24]  G. Ramalingam,et al.  On loops, dominators, and dominance frontiers , 2002, TOPL.

[25]  Philippe Flajolet,et al.  Average-Case Analysis of Algorithms and Data Structures , 1991, Handbook of Theoretical Computer Science, Volume A: Algorithms and Complexity.

[26]  E. Bender Asymptotic Methods in Enumeration , 1974 .

[27]  Jan van Leeuwen,et al.  Handbook of Theoretical Computer Science, Vol. A: Algorithms and Complexity , 1994 .