ABSTRACT
This paper shows how to rapidly determine the path relationships between k different elements of a graph (of the type primarily resulting from programs) in time proportional to k log k. Given the path relations between elements u,v, and w, it is easy to answer questions like "is there a path from u to w?" and "is there a path from u to w which does not go through v?" (The elements can be either nodes or edges.)This algorithm can be used in a wide variety of contexts. For example, in order to prove that whenever control reaches a point p, the last assignment of a value to a variable, v, has always been of the form v := c, where c is a certain constant, it is only necessary to know the path relations between the point p and all assignments to that variable.Ordinarily one is interested in the possible points, where a variable was assigned its current value (definition points), and at the points at which that value is used. Previously, all flow analysis algorithms would compute the definition points of all variables at all nodes in the graph, despite the fact that any given node may use only one of those variables.This algorithm may also be a generally useful graph algorithm. It can compute transitive closure more rapidly than the standard algorithm using the current best matrix multiplication algorithm on the kinds of graphs resulting from programs. The algorithm proceeds by preprocessing the graph, creating tables that can be used later to rapidly determine flow relationships between any sections of the program. In addition, small changes to the graph need only result in small changes to the tables. The algorithm is therefore suitable for incremental analysis.
- Kou, L. 'On Live-Dead Analysis for Global Data Flow Problems' JACM Vol 24, No. 3 pp. 473-483 1977.]] Google ScholarDigital Library
- Graham, S. L. and Wegman, M. 'A Fast and Usually Linear Algorithm for Global Flow Analysis' JACM Vol. 23, No. 1 January 1976 pp.172-202.]] Google ScholarDigital Library
- Wegman, M. 'General and Efficient Methods for Global Code Improvement' Ph.D. Dissertation, Univ. of Cal. at Berkeley, Dec. 1981.]] Google ScholarDigital Library
- Harel, Dov, 'A linear time algorithm for the lowest common ancestors problem' 21st Annual Symposium on Foundations of Computer Science, Syracuse N.Y., Oct. 1980 pp. 308-319]]Google Scholar
- Rosen, B. K., 'Linear Cost is Sometimes Quadratic' 8th Annual Principles of Programming Languages, Jan. 1981, pp. 117-125]] Google ScholarDigital Library
- Allen, F. E. et. al. 'The Experimental Compiling System' IBM Journal of Research and Development, vol 24, no 6, Nov. 1980 pp. 695-715.]]Google ScholarDigital Library
- Tarjan, R. E., 'A Unified Approach to Path Problems', J. ACM 28, 3 (July 1981), 581-593.]] Google ScholarDigital Library
- Tarjan, R. E., 'Fast Algorithms for Solving Path Problems', J. ACM 28, 3 (July 1981), 594-614.]] Google ScholarDigital Library
- Cocke, J., private communication to a number of people, 1961-62(?).]]Google Scholar
- Tarjan, R. E., 'Applications of Path Compression on Balanced Trees', J. ACM 26,4(Oct 79) 690-715.]] Google ScholarDigital Library
- Ferrante, J. personal communication.]]Google Scholar
- Coppersmith, D. and Winograd, S., On the Asymptotic Complexity of Matrix Multiplication, to appear SIAM Journal on Computing, Aug 82 (also FOCS 1981.]]Google Scholar
- Aho Hopcroft and Ullman, Design and Analysis of Algorithms, Addison-Wesley, 1975.]] Google ScholarDigital Library
- Kildall, G. A. A unified approach to global program optimization. Conf. Records of the Second ACM Symposium on Principles of Programming Languages, Oct. 1973, pp. 193-206.]] Google ScholarDigital Library
- Summarizing graphs by regular expressions
Recommendations
On 3-regular 4-ordered graphs
A simple graph G is k-ordered (respectively, k-ordered hamiltonian), if for any sequence of k distinct vertices v"1,...,v"kof G there exists a cycle (respectively, hamiltonian cycle) in G containing these k vertices in the specified order. In 1997 Ng ...
Roman domination in regular graphs
A Roman domination function on a graph G=(V(G),E(G)) is a function f:V(G)->{0,1,2} satisfying the condition that every vertex u for which f(u)=0 is adjacent to at least one vertex v for which f(v)=2. The weight of a Roman dominating function is the ...
Regular graphs and edge chromatic number
For any simple graph G, Vizing's Theorem [5] implies that @D(G) =< @g(G) =< @D(G) + 1, where @D(G) is the maximum degree of a vertex in G and @g(G) is the edge chromatic number. It is of course possible to add edges to G without changing its edge ...
Comments