skip to main content
article

Logic-flow analysis of higher-order programs

Published:17 January 2007Publication History
Skip Abstract Section

Abstract

This work presents a framework for fusing flow analysis and theorem proving called logic-flow analysis (LFA). The framework itself is the reduced product of two abstract interpretations: (1) an abstract state machine and (2) a set of propositions in a restricted first-order logic. The motivating application for LFA is the safe removal of implicit array-bounds checks without type information, user interaction or program annotation. LFA achieves this by delegating a given task to either the prover or the flow analysis depending on which is best suited to discharge it. Described within are a concrete semantics for continuation-passing style; a restricted, first-order logic; a woven product of two abstract interpretations; proofs of correctness; and a worked example.

References

  1. AGESEN, O. The cartesian product algorithm: Simple and precise type inference of parametric polymorphism. In Proceedings of ECOOP 1995 (1995), pp. 2--26. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. BALL, T., MILLSTEIN, T., AND RAJAMANI, S. K. Polymorphic predicate abstraction. ACM Trans. Program. Lang. Syst. 27, 2 (2005), 314--343. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. COUSOT, P., AND COUSOT, R. Abstract interpretation: a unified lattice model for static analysis of programs by construction or approximation of fixpoints. In ACM SIGPLAN Symposium on Principles of Programming Languages (Los Angeles, California, Jan. 1977), vol. 4, pp. 238--252. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. COUSOT, P., AND COUSOT, R. Comparing the Galois connection and widening/narrowing approaches to abstract interpretation, invited paper. In Proceedings of the International Workshop Programming Language Implementation and Logic Programming, PLILP '92, (1992), M. Bruynooghe and M. Wirsing, Eds., Leuven, Belgium, 13-17 August 1992, Lecture Notes in Computer Science 631, Springer-Verlag, Berlin, Germany, pp. 269--295. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. EBBINGHAUS, H.-D., FLUM,J., AND THOMAS, W. Mathematical Logic, 2nd ed. Springer-Verlag, New York, 1994.Google ScholarGoogle Scholar
  6. FELLEISEN, M., AND HIEB, R. A Revised Report on the Syntactic Theories of Sequential Control and State. Theoretical Computer Science 103, 2 (1992), 235--271. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. HUDAK, P. A semantic model of reference counting and its abstraction (detailed summary). In Proceedings of the 1986 ACM Conference on LISP and Functional Programming (Cambridge, Massachusetts, Aug. 1986), pp. 351--363. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. JIA, L., AND WALKER, D. ILC: A Foundation for Automated Reasoning About Pointer Programs. In European Symposium on Programming Languages (March 2006), pp. 131--145. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. MEUNIER, P., FINDLER,R.B., AND FELLEISEN, M. Modular Set-Based Analysis From Contracts. In ACM SIGPLAN Symposium on Principles of Programming Languages (Charleston, South Carolina, January 2006), pp. 218--231. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. MIGHT, M., AND SHIVERS, O. Environment Analysis via Δ CFA. In ACM SIGPLAN Symposium on Principles of Programming Languages (Charleston, South Carolina, January 2006), pp. 127--140. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. MIGHT, M., AND SHIVERS, O. Improving Flow Analysis via ΓCFA: Abstract Garbage Collection and Counting. In Proceedings of the 11th ACM SIGPLAN International Conference on Functional Programming (ICFP 2006) (Portland, Oregon, September 2006). Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. MINÉ, A. Relational abstract domains for the detection of floating-point run-time errors. In ESOP'04 (2004), vol. 2986 of LNCS, Springer, pp. 3--17.Google ScholarGoogle Scholar
  13. MINÉ, A. The octagon abstract domain. Higher-Order and Symbolic Computation 19 (2006), 31--100. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. NANEVSKI, A., MORRISETT,G., AND BIRKEDAL, L. Polymor-phism and Separation in Hoare Type Theory. In ACM SIGPLAN International Conference on Functional Programming (Portland, Oregon, September 2006). Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. REHOF, J., AND FÄHNDRICH, M. Type-based Flow Analysis: From Polymorphic Subtyping to CFL-reachability. In Proceedings of the 28th Annual ACM Symposium on the Principles of Programming Languages (2001). Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. SHIVERS, O. Control-flow analysis in Scheme. In Proceedings of the SIGPLAN '88 Conference on Programming Language Design and Implementation (PLDI) (Atlanta, Georgia, June 1988), pp. 164--174. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. SHIVERS,O. Control-Flow Analysis of Higher-Order Languages. PhD thesis, School of Computer Science, Carnegie-Mellon Univer-sity, Pittsburgh, Pennsylvania, May 1991. Technical Report CMU-CS-91--145. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Logic-flow analysis of higher-order programs

    Recommendations

    Comments

    Login options

    Check if you have access through your login credentials or your institution to get full access on this article.

    Sign in

    Full Access

    PDF Format

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader
    About Cookies On This Site

    We use cookies to ensure that we give you the best experience on our website.

    Learn more

    Got it!