Skip to main content

Calculating Graph Algorithms for Dominance and Shortest Path

  • Conference paper
Mathematics of Program Construction (MPC 2012)

Part of the book series: Lecture Notes in Computer Science ((LNTCS,volume 7342))

Included in the following conference series:

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.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 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)

    Article  MathSciNet  Google Scholar 

  2. Allen, F.E.: Control flow analysis. SIGPLAN Not. 5, 1–19 (1970)

    Article  Google Scholar 

  3. 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)

    Google Scholar 

  4. Alstrup, S., Harel, D., Lauridsen, P.W., Thorup, M.: Dominators in linear time. SIAM J. Comput. 28(6), 2117–2132 (1999)

    Article  MathSciNet  MATH  Google Scholar 

  5. Appel, A.W.: Modern Compiler Implementation in {C, Java, ML}. Cambridge University Press, New York (1998)

    Google Scholar 

  6. 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)

    Chapter  Google Scholar 

  7. Backhouse, R.C.: Regular algebra applied to language problems. J. Log. Algebr. Program. 66(2), 71–111 (2006)

    Article  MathSciNet  MATH  Google Scholar 

  8. 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)

    Article  MATH  Google Scholar 

  9. 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)

    Article  MATH  Google Scholar 

  10. 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)

    Google Scholar 

  11. Bellman, R.: On a routing problem. Quarterly of Applied Mathematics 16, 87–90 (1958)

    MathSciNet  MATH  Google Scholar 

  12. Bird, R., de Moor, O.: The Algebra of Programming. Prentice-Hall (1996)

    Google Scholar 

  13. Cai, J., Paige, R.: Program derivation by fixed point computation. Sci. Comput. Program. 11(3), 197–261 (1989)

    Article  MathSciNet  MATH  Google Scholar 

  14. Carré, B.A.: An algebra for network routing problems. J. Inst. Maths Applics. 7, 273–294 (1971)

    Article  MATH  Google Scholar 

  15. Cooper, K.D., Harvey, T.J., Kennedy, K.: A simple, fast dominance algorithm. Technical report, Rice University Houston, Texas, USA (2001)

    Google Scholar 

  16. Cormen, T.H., Leiserson, C.E., Rivest, R.L., Stein, C.: Introduction to Algorithms, 2nd edn. McGraw-Hill Higher Education (2001)

    Google Scholar 

  17. 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)

    Google Scholar 

  18. 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)

    Google Scholar 

  19. 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)

    Article  MathSciNet  MATH  Google Scholar 

  20. 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)

    Google Scholar 

  21. 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)

    Google Scholar 

  22. 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)

    Google Scholar 

  23. Cousot, P., Cousot, R.: Abstract interpretation and application to logic programs. Journal of Logic Programming 13(2-3), 103–179 (1992)

    Article  MathSciNet  MATH  Google Scholar 

  24. Cousot, P., Cousot, R.: Abstract interpretation frameworks. Journal of Logic and Computation 2(4), 511–547 (1992)

    Article  MathSciNet  MATH  Google Scholar 

  25. 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)

    Google Scholar 

  26. Cousot, P., Cousot, R.: Basic concepts of abstract interpretation. In: Jacquart, R. (ed.) Building the Information Society, pp. 359–366. Kluwer Academic Publishers (2004)

    Google Scholar 

  27. Davey, B.A., Priestley, H.A.: Introduction to Lattices and Order, 2nd edn. Cambridge University Press, Cambridge (2002)

    Book  MATH  Google Scholar 

  28. Dijkstra, E.W.: A note on two problems in connexion with graphs. Numerische Mathematik 1, 269–271 (1959)

    Article  MathSciNet  MATH  Google Scholar 

  29. Dummit, D., Foote, R.: Abstract algebra. Prentice Hall (1999)

    Google Scholar 

  30. 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)

    Google Scholar 

  31. Kam, J.B., Ullman, J.D.: Global data flow analysis and iterative algorithms. J. ACM 23, 158–171 (1976)

    Article  MathSciNet  MATH  Google Scholar 

  32. Lengauer, T., Tarjan, R.E.: A fast algorithm for finding dominators in a flowgraph. ACM Trans. Program. Lang. Syst. 1, 121–141 (1979)

    Article  MATH  Google Scholar 

  33. 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)

    Chapter  Google Scholar 

  34. Might, M.: Abstract Interpreters for Free. In: Cousot, R., Martel, M. (eds.) SAS 2010. LNCS, vol. 6337, pp. 407–421. Springer, Heidelberg (2010)

    Chapter  Google Scholar 

  35. Milanova, A., Vitek, J.: Static Dominance Inference. In: Bishop, J., Vallecillo, A. (eds.) TOOLS 2011. LNCS, vol. 6705, pp. 211–227. Springer, Heidelberg (2011)

    Chapter  Google Scholar 

  36. 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)

    Google Scholar 

  37. 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)

    Google Scholar 

  38. 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)

    Google Scholar 

  39. 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)

    Chapter  Google Scholar 

  40. van Gasteren, A.J.M.: On the shape of mathematical arguments. Springer-Verlag New York, Inc. (1990)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints 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)

Publish with us

Policies and ethics