skip to main content
research-article
Open Access
Artifacts Available
Artifacts Evaluated & Functional

Compositional soundness proofs of abstract interpreters

Published:30 July 2018Publication History
Skip Abstract Section

Abstract

Abstract interpretation is a technique for developing static analyses. Yet, proving abstract interpreters sound is challenging for interesting analyses, because of the high proof complexity and proof effort. To reduce complexity and effort, we propose a framework for abstract interpreters that makes their soundness proof compositional. Key to our approach is to capture the similarities between concrete and abstract interpreters in a single shared interpreter, parameterized over an arrow-based interface. In our framework, a soundness proof is reduced to proving reusable soundness lemmas over the concrete and abstract instances of this interface; the soundness of the overall interpreters follows from a generic theorem.

To further reduce proof effort, we explore the relationship between soundness and parametricity. Parametricity not only provides us with useful guidelines for how to design non-leaky interfaces for shared interpreters, but also provides us soundness of shared pure functions as free theorems. We implemented our framework in Haskell and developed a k-CFA analysis for PCF and a tree-shape analysis for Stratego. We were able to prove both analyses sound compositionally with manageable complexity and effort, compared to a conventional soundness proof.

Skip Supplemental Material Section

Supplemental Material

a72-keidel.webm

References

  1. Robert Atkey. 2012. Relational Parametricity for Higher Kinds. In Computer Science Logic (CSL’12) - 26th International Workshop/21st Annual Conference of the EACSL, CSL 2012, September 3-6, 2012, Fontainebleau, France. 46–61.Google ScholarGoogle Scholar
  2. Pavel Avgustinov, Elnar Hajiyev, Neil Ongkingco, Oege de Moor, Damien Sereni, Julian Tibble, and Mathieu Verbaere. 2007. Semantics of static pointcuts in aspectJ. In Proceedings of the 34th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, POPL 2007, Nice, France, January 17-19, 2007. 11–23. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. Anya Helene Bagge and Karl Trygve Kalleberg. 2006. DSAL= library+ notation: Program transformation for domain-specific aspect languages. In Proceedings of the Domain-Specific Aspect Languages Workshop.Google ScholarGoogle Scholar
  4. Martin Bravenboer, Arthur van Dam, Karina Olmos, and Eelco Visser. 2006. Program Transformation with Scoped Dynamic Rewrite Rules. Fundam. Inform. 69, 1-2 (2006), 123–178. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. Thierry Coquand and Christine Paulin-Mohring. 1990. Inductively defined types. In COLOG-88, Per Martin-Löf and Grigori Mints (Eds.). LNCS, Vol. 417. Springer, 50–66. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. P. Cousot. 1999. The Calculational Design of a Generic Abstract Interpreter. In Calculational System Design, M. Broy and R. Steinbrüggen (Eds.). NATO ASI Series F. IOS Press, Amsterdam.Google ScholarGoogle Scholar
  7. Patrick Cousot and Radhia Cousot. 1979. Systematic design of program analysis frameworks. In Proceedings of Symposium on Principles of Programming Languages (POPL). ACM, 269–282. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. Patrick Cousot and Radhia Cousot. 1992. Abstract Interpretation Frameworks. J. Log. Comput. 2, 4 (1992), 511–547.Google ScholarGoogle ScholarCross RefCross Ref
  9. Patrick Cousot, Radhia Cousot, Jérôme Feret, Laurent Mauborgne, Antoine Miné, David Monniaux, and Xavier Rival. 2006. Combination of Abstractions in the ASTRÉE Static Analyzer. In Advances in Computer Science - ASIAN 2006. Secure Software and Related Issues, 11th Asian Computing Science Conference, Tokyo, Japan, December 6-8, 2006, Revised Selected Papers. 272–300. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. David Darais, Nicholas Labich, Phuc C. Nguyen, and David Van Horn. 2017. Abstracting definitional interpreters (functional pearl). PACMPL 1, ICFP (2017), 12:1–12:25. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. David Darais, Matthew Might, and David Van Horn. 2015. Galois transformers and modular abstract interpreters: reusable metatheory for program analysis. In Proceedings of the 2015 ACM SIGPLAN International Conference on Object-Oriented Programming, Systems, Languages, and Applications, OOPSLA 2015, part of SPLASH 2015, Pittsburgh, PA, USA, October 25-30, 2015. 552–571. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. David Charles Darais. 2017. Mechanizing Abstract Interpretation. Ph.D. Dissertation. University of Maryland, College Park, MD, USA.Google ScholarGoogle Scholar
  13. Maartje de Jonge and Eelco Visser. 2012. A Language Generic Solution for Name Binding Preservation in Refactorings. In Proceedings of the Twelfth Workshop on Language Descriptions, Tools, and Applications (LDTA ’12). ACM, New York, NY, USA, Article 2, 8 pages. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. Eelco Dolstra and Eelco Visser. 2002. Building Interpreters with Rewriting Strategies. Electronic Notes in Theoretical Computer Science 65, 3 (2002), 57–76.Google ScholarGoogle ScholarCross RefCross Ref
  15. Giorgios Rob Economopoulos and Bernd Fischer. 2011. Higher-order transformations with nested concrete syntax. In Language Descriptions, Tools and Applications, LDTA 2011, Saarbrücken, Germany, March 26-27, 2011. Proceeding, Claus Brabrand and Eric Van Wyk (Eds.). ACM, 4. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. Sebastian Erdweg, Tillmann Rendel, Christian Kästner, and Klaus Ostermann. 2011. SugarJ: Library-based Syntactic Language Extensibility. In Proceedings of the 2011 ACM International Conference on Object Oriented Programming Systems Languages and Applications (OOPSLA ’11). ACM, New York, NY, USA, 391–406. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. Neil Ghani, Patricia Johann, Fredrik Nordvall Forsberg, Federico Orsanigo, and Tim Revell. 2015. Bifibrational Functorial Semantics of Parametric Polymorphism. Electr. Notes Theor. Comput. Sci. 319 (2015), 165–181. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. Cordelia V Hall, Kevin Hammond, Simon L Peyton Jones, and Philip L Wadler. 1996. Type classes in Haskell. ACM Transactions on Programming Languages and Systems (TOPLAS) 18, 2 (1996), 109–138. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. Makoto Hamana and Marcelo P. Fiore. 2011. A foundation for GADTs and inductive families: dependent polynomial functor approach. In Proceedings of the seventh ACM SIGPLAN workshop on Generic programming, [email protected] 2011, Tokyo, Japan, September 19-21, 2011. 59–70. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. David Van Horn and Matthew Might. 2010. Abstracting abstract machines. In Proceeding of the 15th ACM SIGPLAN international conference on Functional programming, ICFP 2010, Baltimore, Maryland, USA, September 27-29, 2010. 51–62. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. John Hughes. 2000. Generalising monads to arrows. Sci. Comput. Program. 37, 1-3 (2000), 67–111. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. N Jones and Flemming Nielson. 1994. Abstract interpretation: a semantics-based tool for program analysis. Handbook of logic in computer science 4 (1994), 527–636.Google ScholarGoogle Scholar
  23. Sven Keidel and Sebastian Erdweg. 2017. Toward Abstract Interpretation of Program Transformations. In Proc. Meta. ACM, 1–5. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. Sheng Liang, Paul Hudak, and Mark P. Jones. 1995. Monad Transformers and Modular Interpreters. In Conference Record of POPL’95: 22nd ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, San Francisco, California, USA, January 23-25, 1995. 333–343. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. Saunders Mac Lane. 1978. Categories for the Working Mathematician. Springer New York.Google ScholarGoogle Scholar
  26. Jan Midtgaard. 2012. Control-flow analysis of functional programs. ACM Comput. Surv. 44, 3 (2012), 10:1–10:33. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. Eugenio Moggi. 1991. Notions of Computation and Monads. Inf. Comput. 93, 1 (1991), 55–92. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. Flemming Nielson, Hanne Riis Nielson, and Chris Hankin. 1999. Principles of program analysis. Springer. Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. Ross Paterson. 2001. A New Notation for Arrows. In Proceedings of International Conference on Functional Programming (ICFP). ACM, 229–240. Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. Gordon D. Plotkin. 1977. LCF Considered as a Programming Language. Theor. Comput. Sci. 5, 3 (1977), 223–255.Google ScholarGoogle ScholarCross RefCross Ref
  31. Gordon D Plotkin. 1980. Lambda-definability in the full type hierarchy. To HB Curry: Essays on Combinatory Logic, Lambda Calculus and Formalism (1980), 363–373.Google ScholarGoogle Scholar
  32. John C. Reynolds. 1983. Types, Abstraction and Parametric Polymorphism. In IFIP Congress. 513–523.Google ScholarGoogle Scholar
  33. John C. Reynolds. 1998. Definitional Interpreters for Higher-Order Programming Languages. Higher-Order and Symbolic Computation 11, 4 (1998), 363–397. Google ScholarGoogle ScholarDigital LibraryDigital Library
  34. Ilya Sergey, Dominique Devriese, Matthew Might, Jan Midtgaard, David Darais, Dave Clarke, and Frank Piessens. 2013. Monadic Abstract Interpreters. In Proceedings of the 34th ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI ’13). ACM, New York, NY, USA, 12. Google ScholarGoogle ScholarDigital LibraryDigital Library
  35. Olin Shivers. 1991. Control-flow analysis of higher-order languages. Ph.D. Dissertation. Carnegie Mellon University. Google ScholarGoogle ScholarDigital LibraryDigital Library
  36. Elmer van Chastelet, Eelco Visser, and Craig Anslow. 2015. Conf.Researchr.Org: towards a domain-specific content management system for managing large conference websites. In Companion Proceedings of the 2015 ACM SIGPLAN International Conference on Systems, Programming, Languages and Applications: Software for Humanity, SPLASH 2015, Pittsburgh, PA, USA, October 25-30, 2015. 50–51. Google ScholarGoogle ScholarDigital LibraryDigital Library
  37. Eelco Visser. 2007. WebDSL: A Case Study in Domain-Specific Language Engineering. In Generative and Transformational Techniques in Software Engineering II, International Summer School, GTTSE 2007 (Lecture Notes in Computer Science), Ralf Lämmel, Joost Visser, and Jo ao Saraiva (Eds.), Vol. 5235. Springer, Braga, Portugal, 291–373. Google ScholarGoogle ScholarDigital LibraryDigital Library
  38. Eelco Visser, Zine-El-Abidine Benaissa, and Andrew P. Tolmach. 1998. Building Program Optimizers with Rewriting Strategies. In Proceedings of the third ACM SIGPLAN International Conference on Functional Programming (ICFP ’98), Baltimore, Maryland, USA, September 27-29, 1998. 13–26. Google ScholarGoogle ScholarDigital LibraryDigital Library
  39. Philip Wadler. 1989. Theorems for Free!. In Proceedings of the fourth international conference on Functional programming languages and computer architecture, FPCA 1989, London, UK, September 11-13, 1989. ACM, 347–359. Google ScholarGoogle ScholarDigital LibraryDigital Library
  40. Philip Wadler. 1995. Monads for Functional Programming. In Advanced Functional Programming, First International Spring School on Advanced Functional Programming Techniques, Båstad, Sweden, May 24-30, 1995, Tutorial Text. 24–52. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Compositional soundness proofs of abstract interpreters

      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!