A Structural Soundness Proof for Shivers’s Escape Technique

A Case for Galois Connections
  • Jan Midtgaard
  • Michael D. Adams
  • Matthew Might
Part of the Lecture Notes in Computer Science book series (LNCS, volume 7460)


Shivers’s escape technique enables one to analyse the control flow of higher-order program fragments. It is widely used, but its soundness has never been proven. In this paper, we present the first soundness proof for the technique. Our proof is structured as a composition of Galois connections and thus rests on the foundations of abstract interpretation.


Program Language Abstract Interpretation Galois Connection Helper Function Call Site 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. Adams, M.D., Keep, A.W., Midtgaard, J., Might, M., Chauhan, A., Dybvig, R.K.: Flow-sensitive type recovery in linear-log time. In: Object-Oriented Programming, Systems, Languages and Applications (OOPSLA 2011), Portland, Oregon (October 2011)Google Scholar
  2. Ashley, J.M.: Flexible and Practical Flow Analysis for Higher-Order Programming Languages. PhD thesis, Department of Computer Science, Indiana University, Bloomington, Indiana (May 1996)Google Scholar
  3. Ashley, J.M., Dybvig, R.K.: A practical and flexible flow analysis for higher-order languages. ACM Transactions on Programming Languages and Systems 20(4), 845–868 (1998)CrossRefGoogle Scholar
  4. Banerjee, A., Jensen, T.: Modular control-flow analysis with rank 2 intersection types. Mathematical Structures in Computer Science 13(1), 87–124 (2003)MathSciNetzbMATHCrossRefGoogle Scholar
  5. Cousot, P.: The calculational design of a generic abstract interpreter. In: Broy, M., Steinbrüggen, R. (eds.) Calculational System Design. NATO ASI Series. IOS Press, Amsterdam (1999)Google Scholar
  6. Cousot, P., Cousot, R.: Systematic design of program analysis frameworks. In: Rosen, B.K. (ed.) Proc. of the Sixth Annual ACM Symposium on Principles of Programming Languages, San Antonio, Texas, pp. 269–282 (January 1979)Google Scholar
  7. Cousot, P., Cousot, R.: Abstract interpretation and application to logic programs. Journal of Logic Programming 13(2-3), 103–179 (1992)MathSciNetzbMATHCrossRefGoogle Scholar
  8. Cousot, P., Cousot, R.: Higher-order abstract interpretation (and application to comportment analysis generalizing strictness, termination, projection and PER analysis of functional languages). In: Bal, H. (ed.) Proc. of the Fifth IEEE International Conference on Computer Languages, Toulouse, France, pp. 95–112 (May 1994) (invited paper)Google Scholar
  9. Cousot, P., Cousot, R.: Compositional and Inductive Semantic Definitions in Fixpoint, Equational, Constraint, Closure-condition, Rule-based and Game-Theoretic Form (Invited Paper). In: Wolper, P. (ed.) CAV 1995. LNCS, vol. 939, pp. 293–308. Springer, Heidelberg (1995)CrossRefGoogle Scholar
  10. Cousot, P., Cousot, R.: Abstract Interpretation of Algebraic Polynomial Systems. In: Johnson, M. (ed.) AMAST 1997. LNCS, vol. 1349, pp. 138–154. Springer, Heidelberg (1997)CrossRefGoogle Scholar
  11. Cousot, P., Cousot, R.: Modular Static Program Analysis. In: Horspool, R.N. (ed.) CC 2002. LNCS, vol. 2304, pp. 159–179. Springer, Heidelberg (2002)CrossRefGoogle Scholar
  12. Flanagan, C.: Effective Static Debugging via Componential Set-Based Analysis. PhD thesis, Rice University, Houston, Texas (May 1997)Google Scholar
  13. Flanagan, C., Felleisen, M.: Componential set-based analysis. ACM Transactions on Programming Languages and Systems 21(2), 370–416 (1999)CrossRefGoogle Scholar
  14. Heintze, N.: Set-Based Program Analysis. PhD thesis, School of Computer Science, Carnegie Mellon University, Pittsburgh, Pennsylvania (October 1992)Google Scholar
  15. Heintze, N., McAllester, D.: Linear-time subtransitive control flow analysis. In: Cytron, R.K. (ed.) Proc. of the ACM SIGPLAN 1997 Conference on Programming Languages Design and Implementation, Las Vegas, Nevada, pp. 261–272 (June 1997)Google Scholar
  16. Lee, O., Yi, K., Paek, Y.: A proof method for the correctness of modularized 0CFA. Information Processing Letters 81(4), 179–185 (2002)zbMATHCrossRefGoogle Scholar
  17. Meunier, P., Findler, R.B., Felleisen, M.: Modular set-based analysis from contracts. In: Peyton Jones, S. (ed.) Proc. of the 33rd Annual ACM Symposium on Principles of Programming Languages, Charleston, South Carolina, pp. 218–231 (January 2006)Google Scholar
  18. Midtgaard, J.: Control-flow analysis of functional programs. ACM Computing Surveys 44(3) (2012)Google Scholar
  19. 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)CrossRefGoogle Scholar
  20. Midtgaard, J., Jensen, T.P.: Control-flow analysis of function calls and returns by abstract interpretation. Information and Computation 211, 49–76 (2012); a preliminary version was presented at the 2009 ACM SIGPLAN International Conference on Functional Programming (ICFP 2009)MathSciNetzbMATHCrossRefGoogle Scholar
  21. Might, M.: Abstract Interpreters for Free. In: Cousot, R., Martel, M. (eds.) SAS 2010. LNCS, vol. 6337, pp. 407–421. Springer, Heidelberg (2010)CrossRefGoogle Scholar
  22. Nielson, F., Nielson, H.R.: Infinitary control flow analysis: a collecting semantics for closure analysis. In: Jones, N.D. (ed.) Proc. of the 24th Annual ACM Symposium on Principles of Programming Languages, Paris, France, pp. 332–345 (January 1997)Google Scholar
  23. Nielson, F., Nielson, H.R., Hankin, C.: Principles of Program Analysis. Springer (1999)Google Scholar
  24. Palsberg, J., Schwartzbach, M.I.: Safety analysis versus type inference. Information and Computation 118(1), 128–141 (1995)MathSciNetzbMATHCrossRefGoogle Scholar
  25. Reppy, J.: Type-sensitive control-flow analysis. In: Kennedy, A., Pottier, F. (eds.) ML 2006: Proc. of the ACM SIGPLAN 2006 Workshop on ML, pp. 74–83 (September 2006)Google Scholar
  26. Reynolds, J.C.: Definitional interpreters for higher-order programming languages. Higher-Order and Symbolic Computation 11(4), 363–397 (1998); reprinted from the proceedings of the 25th ACM National Conference (1972)zbMATHCrossRefGoogle Scholar
  27. Serrano, M., Feeley, M.: Storage use analysis and its applications. In: Dybvig, R.K. (ed.) Proc. of the First ACM SIGPLAN International Conference on Functional Programming, Philadelphia, Pennsylvania, pp. 50–61 (May 1996)Google Scholar
  28. Shivers, O.: Control-Flow Analysis of Higher-Order Languages or Taming Lambda. PhD thesis, School of Computer Science, Carnegie Mellon University, Pittsburgh, Pennsylvania, Technical Report CMU-CS-91-145 (May 1991)Google Scholar
  29. Wand, M., Vaillancourt, D.: Relating models of backtracking. In: Fisher, K. (ed.) Proc. of the Ninth ACM SIGPLAN International Conference on Functional Programming (ICFP 2004), Snowbird, Utah, pp. 54–65 (September 2004)Google Scholar
  30. Winskel, G.: Set theory for computer science. Unpublished lecture notes (2010),

Copyright information

© Springer-Verlag Berlin Heidelberg 2012

Authors and Affiliations

  • Jan Midtgaard
    • 1
  • Michael D. Adams
    • 2
  • Matthew Might
    • 3
  1. 1.Aarhus UniversityDenmark
  2. 2.Portland State UniversityUSA
  3. 3.University of UtahUSA

Personalised recommendations