Summarizing graphs by regular expressions

  • Authors:
  • Mark Wegman

  • Affiliations:
  • IBM Thomas J. Watson Research Center

  • Venue:
  • POPL '83 Proceedings of the 10th ACM SIGACT-SIGPLAN symposium on Principles of programming languages
  • Year:
  • 1983

Quantified Score

Hi-index 0.00

Visualization

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.