skip to main content
research-article

Introspective pushdown analysis of higher-order programs

Published:09 September 2012Publication History
Skip Abstract Section

Abstract

In the static analysis of functional programs, pushdown flow analysis and abstract garbage collection skirt just inside the boundaries of soundness and decidability. Alone, each method reduces analysis times and boosts precision by orders of magnitude. This work illuminates and conquers the theoretical challenges that stand in the way of combining the power of these techniques. The challenge in marrying these techniques is not subtle: computing the reachable control states of a pushdown system relies on limiting access during transition to the top of the stack; abstract garbage collection, on the other hand, needs full access to the entire stack to compute a root set, just as concrete collection does. Introspective pushdown systems resolve this conflict. Introspective pushdown systems provide enough access to the stack to allow abstract garbage collection, but they remain restricted enough to compute control-state reachability, thereby enabling the sound and precise product of pushdown analysis and abstract garbage collection. Experiments reveal synergistic interplay between the techniques, and the fusion demonstrates "better-than-both-worlds" precision.

References

  1. Bouajjani, A., Esparza, J., and Maler, O. Reachability analysis of pushdown automata: Application to Model-Checking. In CONCUR '97: Proceedings of the 8th International Conference on Concurrency Theory (1997), Springer-Verlag, pp. 135--150. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. Cousot, P. The calculational design of a generic abstract interpreter. In Calculational System Design, M. Broy and R. Steinbrüggen, Eds. 1999.Google ScholarGoogle Scholar
  3. Cousot, P., and Cousot, R. Abstract interpretation: A unified lattice model for static analysis of programs by construction or approximation of fixpoints. In Conference Record of the Fourth ACM Symposium on Principles of Programming Languages (1977), ACM Press, pp. 238--252. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. Earl, C., Might, M., and Van Horn, D. Pushdown control-flow analysis of higher-order programs. In Proceedings of the 2010 Workshop on Scheme and Functional Programming (Aug. 2010).Google ScholarGoogle Scholar
  5. Felleisen, M., and Friedman, D. P. A calculus for assignments in higher-order languages. In POPL '87: Proceedings of the 14th ACM SIGACT-SIGPLAN Symposium on Principles of Programming Languages (1987), ACM, pp. 314+. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. Flanagan, C., Sabry, A., Duba, B. F., and Felleisen, M. The essence of compiling with continuations. In PLDI '93: Proceedings of the ACM SIGPLAN 1993 Conference on Programming Language Design and Implementation (June 1993), ACM, pp. 237--247. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. Kobayashi, N. Types and higher-order recursion schemes for verification of higher-order programs. In POPL '09: Proceedings of the 36th Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (2009), POPL '09, ACM, pp. 416--428. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. Kodumal, J., and Aiken, A. The set constraint/CFL reachability connection in practice. SIGPLAN Not. 39 (June 2004), 207--218. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. Melski, D., and Reps, T. W. Interconvertibility of a class of set constraints and context-free-language reachability. Theoretical Computer Science 248, 1-2 (Oct. 2000), 29--98. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. Midtgaard, J., and Jensen, T. P. Control-flow analysis of function calls and returns by abstract interpretation. In ICFP '09: Proceedings of the 14th ACM SIGPLAN International Conference on Functional Programming (2009), pp. 287--298. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. Might, M. Environment Analysis of Higher-Order Languages. PhD thesis, Georgia Institute of Technology, June 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. Might, M., Chambers, B., and Shivers, O. Model checking via Gamma-CFA. In Verification, Model Checking, and Abstract Interpretation (Jan. 2007), pp. 59--73. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. Might, M., and Shivers, O. Environment analysis via Delta-CFA. In POPL '06: Conference Record of the 33rd ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (2006), ACM, pp. 127--140. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. Might, M., and Shivers, O. Improving flow analyses via Gamma-CFA: Abstract garbage collection and counting. In ICFP '06: Proceedings of the 11th ACM SIGPLAN International Conference on Functional Programming (2006), ACM, pp. 13--25. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. Ong, C. H. L. On Model-Checking trees generated by Higher-Order recursion schemes. In 21st Annual IEEE Symposium on Logic in Computer Science (LICS'06) (2006), pp. 81--90. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. Rehof, J., and Fähndrich, M. Type-based flow analysis: From polymorphic subtyping to CFL-reachability. In POPL '01: Proceedings of the 28th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (2001), ACM, pp. 54--66. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. Reps, T. Program analysis via graph reachability. Information and Software Technology 40, 11-12 (Dec. 1998), 701--726.Google ScholarGoogle ScholarCross RefCross Ref
  18. Reps, T., Schwoon, S., Jha, S., and Melski, D. Weighted pushdown systems and their application to interprocedural dataflow analysis. Science of Computer Programming 58, 1-2 (2005), 206--263. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. Shivers, O. G. Control-Flow Analysis of Higher-Order Languages. PhD thesis, Carnegie Mellon University, 1991. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. Sipser, M. Introduction to the Theory of Computation, 2 ed. Course Technology, Feb. 2005.Google ScholarGoogle Scholar
  21. Van Horn, D., and Mairson, H. G. Deciding kCFA is complete for EXPTIME. In ICFP '08: Proceeding of the 13th ACM SIGPLAN International Conference on Functional Programming (2008), pp. 275--282. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. Vardoulakis, D., and Shivers, O. Cfa2: a Context-Free Approach to Control-Flow Analysis. In European Symposium on Programming (ESOP) (2010), vol. 6012 of LNCS, pp. 570--589. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. Wright, A. K., and Jagannathan, S. Polymorphic splitting: An effective polyvariant flow analysis. ACM Transactions on Programming Languages and Systems 20, 1 (Jan. 1998), 166--207. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Introspective pushdown 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!