skip to main content
10.1145/2814270.2814308acmconferencesArticle/Chapter ViewAbstractPublication PagessplashConference Proceedingsconference-collections
research-article
Public Access

Galois transformers and modular abstract interpreters: reusable metatheory for program analysis

Published:23 October 2015Publication History

ABSTRACT

The design and implementation of static analyzers has become increasingly systematic. Yet for a given language or analysis feature, it often requires tedious and error prone work to implement an analyzer and prove it sound. In short, static analysis features and their proofs of soundness do not compose well, causing a dearth of reuse in both implementation and metatheory. We solve the problem of systematically constructing static analyzers by introducing Galois transformers: monad transformers that transport Galois connection properties. In concert with a monadic interpreter, we define a library of monad transformers that implement building blocks for classic analysis parameters like context, path, and heap (in)sensitivity. Moreover, these can be composed together independent of the language being analyzed. Significantly, a Galois transformer can be proved sound once and for all, making it a reusable analysis component. As new analysis features and abstractions are developed and mixed in, soundness proofs need not be reconstructed, as the composition of a monad transformer stack is sound by virtue of its constituents. Galois transformers provide a viable foundation for reusable and composable metatheory for program analysis. Finally, these Galois transformers shift the level of abstraction in analysis design and implementation to a level where non-specialists have the ability to synthesize sound analyzers over a number of parameters.

References

  1. L. O. Andersen. Program Analysis and Specialization for the C Programming Language. PhD thesis, DIKU, University of Copenhagen, 1994.Google ScholarGoogle Scholar
  2. D. R. Chase, M. Wegman, and F. K. Zadeck. Analysis of pointers and structures. PLDI ’90. ACM, 1990. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. P. Cousot. The calculational design of a generic abstract interpreter. In Calculational System Design. NATO ASI Series F. IOS Press, Amsterdam, 1999.Google ScholarGoogle Scholar
  4. P. Cousot and R. Cousot. Abstract interpretation: a unified lattice model for static analysis of programs by construction or approximation of fixpoints. POPL ’77. ACM, 1977. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. P. Cousot and R. Cousot. Systematic design of program analysis frameworks. POPL ’79. ACM, 1979. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. M. Das, S. Lerner, and M. Seigle. ESP: Path-sensitive program verification in polynomial time. PLDI ’02. ACM, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. J. Gibbons and R. Hinze. Just do it: Simple monadic equational reasoning. ICFP ’11. ACM, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. B. Hardekopf, B. Wiedermann, B. Churchill, and V. Kashyap. Widening for Control-Flow. VMCAI ’14. Springer Berlin Heidelberg, 2014.Google ScholarGoogle Scholar
  9. M. Hind. Pointer analysis: haven’t we solved this problem yet? PASTE ’01. ACM, 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. N. D. Jones. Flow analysis of lambda expressions (preliminary version). ICALP ’81. Springer-Verlag, 1981. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. G. Kastrinis and Y. Smaragdakis. Hybrid context-sensitivity for points-to analysis. PLDI ’13. ACM, 2013. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. S. Liang, P. Hudak, and M. Jones. Monad transformers and modular interpreters. POPL ’95. ACM, 1995. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. J. Midtgaard. Control-flow analysis of functional programs. ACM Comput. Surv., 2012. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. M. Might and O. Shivers. Improving flow analyses via ΓCFA: Abstract garbage collection and counting. ICFP ’06, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. A. Milanova, A. Rountev, and B. G. Ryder. Parameterized object sensitivity for points-to analysis for Java. ACM Trans. Softw. Eng. Methodol., 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. E. Moggi. An abstract view of programming languages. Technical report, Edinburgh University, 1989.Google ScholarGoogle Scholar
  17. F. Nielson and H. R. Nielson. Infinitary control flow analysis: a collecting semantics for closure analysis. POPL ’97. ACM, 1997. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. F. Nielson, H. R. Nielson, and C. Hankin. Principles of Program Analysis. Springer-Verlag, 1999. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. I. Sergey, D. Devriese, M. Might, J. Midtgaard, D. Darais, D. Clarke, and F. Piessens. Monadic abstract interpreters. PLDI ’13. ACM, 2013. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. M. Sharir and A. Pnueli. Two Approaches to Interprocedural Data Flow Analysis, chapter 7. Prentice-Hall, Inc., 1981.Google ScholarGoogle Scholar
  21. O. Shivers. Control-flow analysis of higher-order languages. PhD thesis, Carnegie Mellon University, 1991. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. Y. Smaragdakis, M. Bravenboer, and O. Lhoták. Pick your contexts well: Understanding object-sensitivity. POPL ’11. ACM, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. D. Van Horn and M. Might. Abstracting abstract machines. ICFP ’10. ACM, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Galois transformers and modular abstract interpreters: reusable metatheory for program analysis

    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
    • Published in

      cover image ACM Conferences
      OOPSLA 2015: Proceedings of the 2015 ACM SIGPLAN International Conference on Object-Oriented Programming, Systems, Languages, and Applications
      October 2015
      953 pages
      ISBN:9781450336895
      DOI:10.1145/2814270
      • cover image ACM SIGPLAN Notices
        ACM SIGPLAN Notices  Volume 50, Issue 10
        OOPSLA '15
        October 2015
        953 pages
        ISSN:0362-1340
        EISSN:1558-1160
        DOI:10.1145/2858965
        • Editor:
        • Andy Gill
        Issue’s Table of Contents

      Copyright © 2015 ACM

      Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than the author(s) must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected].

      Publisher

      Association for Computing Machinery

      New York, NY, United States

      Publication History

      • Published: 23 October 2015

      Permissions

      Request permissions about this article.

      Request Permissions

      Check for updates

      Qualifiers

      • research-article

      Acceptance Rates

      Overall Acceptance Rate268of1,244submissions,22%

      Upcoming Conference

    PDF Format

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader