Abstract
We calculate two iterative, polynomial-time graph algorithms from the literature: a dominance algorithm and an algorithm for the single-source shortest path problem. Both algorithms are calculated directly from the definition of the properties by fixed-point fusion of (1) a least fixed point expressing all finite paths through a directed graph and (2) Galois connections that capture dominance and path length.
The approach illustrates that reasoning in the style of fixed-point calculus extends gracefully to the domain of graph algorithms. We thereby bridge common practice from the school of program calculation with common practice from the school of static program analysis, and build a novel view on iterative graph algorithms as instances of abstract interpretation.
This work was carried out while the first author was visiting Aarhus University in the fall of 2011.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
Aarts, C., Backhouse, R.C., Boiten, E.A., Doornbos, H., van Gasteren, N., van Geldrop, R., Hoogendijk, P.F., Voermans, E., van der Woude, J.: Fixed-point calculus. Information Processing Letters 53, 131–136 (1995)
Allen, F.E.: Control flow analysis. SIGPLAN Not. 5, 1–19 (1970)
Allen, F.E., Cocke, J.: Graph theoretic constructs for program control flow analysis. Technical Report IBM Research Report RC 3923, Thomas J. Watson Research Center, Yorktown Heights, NY, USA (1972)
Alstrup, S., Harel, D., Lauridsen, P.W., Thorup, M.: Dominators in linear time. SIAM J. Comput. 28(6), 2117–2132 (1999)
Appel, A.W.: Modern Compiler Implementation in {C, Java, ML}. Cambridge University Press, New York (1998)
Backhouse, R.: Chapter 4: Galois Connections and Fixed Point Calculus. In: Backhouse, R., Crole, R.L., Gibbons, J. (eds.) Algebraic and Coalgebraic Methods in the Mathematics of Program Construction. LNCS, vol. 2297, pp. 89–148. Springer, Heidelberg (2002)
Backhouse, R.C.: Regular algebra applied to language problems. J. Log. Algebr. Program. 66(2), 71–111 (2006)
Backhouse, R.C., Carré, B.A.: Regular algebra applied to path-finding problems. Journal of the Institute of Mathematics and Applications 15, 161–186 (1975)
Backhouse, R.C., van den Eijnde, J.P.H.W., van Gasteren, A.J.M.: Calculating path algorithms. Sci. Comput. Program. 22(1-2), 3–19 (1994)
Barbuti, R., Bernardeschi, C., De Francesco, N.: Checking security of Java bytecode by abstract interpretation. In: Proceedings of the 2002 ACM Symposium on Applied Computing, Madrid, Spain, pp. 229–236. ACM (March 2002)
Bellman, R.: On a routing problem. Quarterly of Applied Mathematics 16, 87–90 (1958)
Bird, R., de Moor, O.: The Algebra of Programming. Prentice-Hall (1996)
Cai, J., Paige, R.: Program derivation by fixed point computation. Sci. Comput. Program. 11(3), 197–261 (1989)
Carré, B.A.: An algebra for network routing problems. J. Inst. Maths Applics. 7, 273–294 (1971)
Cooper, K.D., Harvey, T.J., Kennedy, K.: A simple, fast dominance algorithm. Technical report, Rice University Houston, Texas, USA (2001)
Cormen, T.H., Leiserson, C.E., Rivest, R.L., Stein, C.: Introduction to Algorithms, 2nd edn. McGraw-Hill Higher Education (2001)
Cousot, P.: Semantic foundations of program analysis. In: Muchnick, S.S., Jones, N.D. (eds.) Program Flow Analysis: Theory and Applications, ch. 10, pp. 303–342. Prentice-Hall (1981)
Cousot, P.: The calculational design of a generic abstract interpreter. In: Broy, M., Steinbrüggen, R. (eds.) Calculational System Design. NATO ASI Series F. IOS Press, Amsterdam (1999)
Cousot, P.: Constructive design of a hierarchy of semantics of a transition system by abstract interpretation. Theoretical Comput. Sci. 277(1-2), 47–103 (2002)
Cousot, P., Cousot, R.: Static determination of dynamic properties of programs. In: Proceedings of the Second International Symposium on Programming, Dunod, Paris, France, pp. 106–130 (1976)
Cousot, P., Cousot, R.: Abstract interpretation: a unified lattice model for static analysis of programs by construction or approximation of fixpoints. In: Sethi, R. (ed.) Proceedings of the Fourth Annual ACM Symposium on Principles of Programming Languages, Los Angeles, California, pp. 238–252 (January 1977)
Cousot, P., Cousot, R.: Systematic design of program analysis frameworks. In: Rosen, B.K. (ed.) Proceedings of the Sixth Annual ACM Symposium on Principles of Programming Languages, San Antonio, Texas, pp. 269–282 (January 1979)
Cousot, P., Cousot, R.: Abstract interpretation and application to logic programs. Journal of Logic Programming 13(2-3), 103–179 (1992)
Cousot, P., Cousot, R.: Abstract interpretation frameworks. Journal of Logic and Computation 2(4), 511–547 (1992)
Cousot, P., Cousot, R.: Systematic design of program transformation frameworks by abstract interpretation. In: Mitchell, J.C. (ed.) Proceedings of the 29th Annual ACM Symposium on Principles of Programming Languages, Portland, Oregon, pp. 178–190 (January 2002)
Cousot, P., Cousot, R.: Basic concepts of abstract interpretation. In: Jacquart, R. (ed.) Building the Information Society, pp. 359–366. Kluwer Academic Publishers (2004)
Davey, B.A., Priestley, H.A.: Introduction to Lattices and Order, 2nd edn. Cambridge University Press, Cambridge (2002)
Dijkstra, E.W.: A note on two problems in connexion with graphs. Numerische Mathematik 1, 269–271 (1959)
Dummit, D., Foote, R.: Abstract algebra. Prentice Hall (1999)
Fluet, M., Weeks, S.: Contification using dominators. In: Leroy, X. (ed.) Proceedings of the Sixth ACM SIGPLAN International Conference on Functional Programming (ICFP 2001), Firenze, Italy, pp. 2–13 (September 2001)
Kam, J.B., Ullman, J.D.: Global data flow analysis and iterative algorithms. J. ACM 23, 158–171 (1976)
Lengauer, T., Tarjan, R.E.: A fast algorithm for finding dominators in a flowgraph. ACM Trans. Program. Lang. Syst. 1, 121–141 (1979)
Midtgaard, J., Jensen, T.: A Calculational Approach to Control-Flow Analysis by Abstract Interpretation. In: Alpuente, M., Vidal, G. (eds.) SAS 2008. LNCS, vol. 5079, pp. 347–362. Springer, Heidelberg (2008)
Might, M.: Abstract Interpreters for Free. In: Cousot, R., Martel, M. (eds.) SAS 2010. LNCS, vol. 6337, pp. 407–421. Springer, Heidelberg (2010)
Milanova, A., Vitek, J.: Static Dominance Inference. In: Bishop, J., Vallecillo, A. (eds.) TOOLS 2011. LNCS, vol. 6705, pp. 211–227. Springer, Heidelberg (2011)
Prosser, R.T.: Applications of boolean matrices to the analysis of flow diagrams. In: Proceeding of the Eastern Joint IRE-AIEE-ACM Computer Conference, pp. 133–138. ACM, Boston (1959)
Schrijver, A.: On the History of Combinatorial Optimization (till 1960). In: Aardal, K., Nemhauser, G.L., Weismantel, R. (eds.) Handbook of Discrete Optimization, pp. 1–68 (2005)
Silva, P.F., Oliveira, J.N.: ’Galculator’: functional prototype of a Galois-connection based proof assistant. In: Antoy, S., Albert, E. (eds.) PPDP 2008: Proceedings of the 10th ACM-SIGPLAN International Conference on Principles and Practice of Declarative Programming, pp. 44–55 (July 2008)
van den Eijnde, J.P.H.W.: Conservative Fixpoint Functions on a graph. In: Bird, R.S., Morgan, C.C., Woodcock, J.C.P. (eds.) MPC 1992. LNCS, vol. 669, pp. 80–99. Springer, Heidelberg (1993)
van Gasteren, A.J.M.: On the shape of mathematical arguments. Springer-Verlag New York, Inc. (1990)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2012 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Sergey, I., Midtgaard, J., Clarke, D. (2012). Calculating Graph Algorithms for Dominance and Shortest Path. In: Gibbons, J., Nogueira, P. (eds) Mathematics of Program Construction. MPC 2012. Lecture Notes in Computer Science, vol 7342. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-31113-0_8
Download citation
DOI: https://doi.org/10.1007/978-3-642-31113-0_8
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-642-31112-3
Online ISBN: 978-3-642-31113-0
eBook Packages: Computer ScienceComputer Science (R0)