skip to main content
10.1145/1926385.1926406acmconferencesArticle/Chapter ViewAbstractPublication PagespoplConference Proceedingsconference-collections
research-article

Calling context abstraction with shapes

Published:26 January 2011Publication History

ABSTRACT

Interprocedural program analysis is often performed by computing procedure summaries. While possible, computing adequate summaries is difficult, particularly in the presence of recursive procedures. In this paper, we propose a complementary framework for interprocedural analysis based on a direct abstraction of the calling context. Specifically, our approach exploits the inductive structure of a calling context by treating it directly as a stack of activation records. We then build an abstraction based on separation logic with inductive definitions. A key element of this abstract domain is the use of parameters to refine the meaning of such call stack summaries and thus express relations across activation records and with the heap. In essence, we define an abstract interpretation-based analysis framework for recursive programs that permits a fluid per call site abstraction of the call stack--much like how shape analyzers enable a fluid per program point abstraction of the heap.

Skip Supplemental Material Section

Supplemental Material

16-mpeg-4.mp4

mp4

394 MB

References

  1. Josh Berdine, Cristiano Calcagno, and Peter W. O'Hearn. Symbolic execution with separation logic. In Asian Symposium on Programming Languages and Systems (APLAS), pages 52--68, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. Josh Berdine, Cristiano Calcagno, Byron Cook, Dino Distefano, Peter W. O'Hearn, Thomas Wies, and Hongseok Yang. Shape analysis for composite data structures. In Computer-Aided Verification (CAV), pages 178--192, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. Bruno Blanchet, Patrick Cousot, Radhia Cousot, J´ erÆ ome Feret, Lau-rent Mauborgne, Antoine Miné, David Monniaux, and Xavier Rival. A static analyzer for large safety-critical software. In Programming Language Design and Implementation (PLDI), pages 196--207, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. Cristiano Calcagno, Dino Distefano, Peter W. O'Hearn, and Hongseok Yang. Compositional shape analysis by means of bi-abduction. In Principles of Programming Languages (POPL), pages 289--300, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. Bor-Yuh Evan Chang and Xavier Rival. Relational inductive shape analysis. In Principles of Programming Languages (POPL), pages 247--260, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. Bor-Yuh Evan Chang, Xavier Rival, and George C. Necula. Shape analysis with structural invariant checkers. In Static Analysis (SAS), pages 384--401, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. Patrick Cousot and Radhia Cousot. Abstract interpretation: A unified lattice model for static analysis of programs by construction or approximation of fixpoints. In Principles of Programming Languages (POPL), pages 238--252, 1977. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. Patrick Cousot and Nicolas Halbwachs. Automatic discovery of linear restraints among variables of a program. In Principles of Program-ming Languages (POPL), pages 84--97, 1978. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. Alain Deutsch. On determining lifetime and aliasing of dynamically allocated data in higher-order functional specifications. In Principles of Programming Languages (POPL), pages 157--168, 1990. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. Dino Distefano, Peter W. O'Hearn, and Hongseok Yang. A local shape analysis based on separation logic. In Tools and Algorithms for the Construction and Analysis of Systems (TACAS), pages 287--302, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. Jérôme Feret. Static analysis of digital filters. In European Symposium on Programming (ESOP), pages 33--48, 2004.Google ScholarGoogle ScholarCross RefCross Ref
  12. Alexey Gotsman, Josh Berdine, and Byron Cook. Interprocedural shape analysis with separated heap abstractions. In Static Analysis (SAS), pages 240--260, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. Bhargav S. Gulavani, Supratik Chakraborty, Ganesan Ramalingam, and Aditya V. Nori. Bottom-up shape analysis. In Static Analysis (SAS), pages 188--204, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. Bolei Guo, Neil Vachharajani, and David I. August. Shape analysis with inductive recursion synthesis. In Programming Language Design and Implementation (PLDI), pages 256--265, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. Bertrand Jeannet and Wendelin Serwe. Abstracting call-stacks for interprocedural verification of imperative programs. In Algebraic Methodology and Software Technology (AMAST), pages 258--273, 2004.Google ScholarGoogle ScholarCross RefCross Ref
  16. Bertrand Jeannet, Alexey Loginov, Thomas Reps, and Mooly Sagiv. A relational approach to interprocedural shape analysis. ACM Trans. Program. Lang. Syst., 32(2), 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. Jörg Kreiker, Thomas Reps, Noam Rinetzky, Mooly Sagiv, Reinhard Wilhelm, and Eran Yahav. Interprocedural shape analysis for effec-tively cutpoint-free programs. Technical report, Queen Mary Univer-sity of London, 2010.Google ScholarGoogle Scholar
  18. Vincent Laviron, Bor-Yuh Evan Chang, and Xavier Rival. Separating shape graphs. In European Symposium on Programming (ESOP), pages 387--406, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. Mark Marron, Manuel V. Hermenegildo, Deepak Kapur, and Darko Stefanovic. Efficient context-sensitive shape analysis with graph based heap models. In Compiler Construction (CC), pages 245--259, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. Thomas Reps, Susan Horwitz, and Mooly Sagiv. Precise interproce-dural dataflow analysis via graph reachability. In Principles of Programming Languages (POPL), pages 49--61, 1995. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. John C. Reynolds. Separation logic: A logic for shared mutable data structures. In Logic in Computer Science (LICS), pages 55--74, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. Noam Rinetzky and Mooly Sagiv. Interprocedural shape analysis for recursive programs. In Compiler Construction (CC), pages 133--149, 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. Noam Rinetzky, Jörg Bauer, Thomas Reps, Mooly Sagiv, and Rein-hard Wilhelm. A semantics for procedure local heaps and its abstrac-tions. In Principles of Programming Languages (POPL), pages 296--309, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. Noam Rinetzky, Mooly Sagiv, and Eran Yahav. Interprocedural shape analysis for cutpoint-free programs. In Static Analysis (SAS), pages 284--302, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. Xavier Rival and Laurent Mauborgne. The trace partitioning abstract domain. ACM Trans. Program. Lang. Syst., 29(5), 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. Mooly Sagiv, Thomas Reps, and Reinhard Wilhelm. Solving shape-analysis problems in languages with destructive updating. ACM Trans. Program. Lang. Syst., 20(1):1--50, 1998. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. Mooly Sagiv, Thomas Reps, and Reinhard Wilhelm. Parametric shape analysis via 3-valued logic. ACM Trans. Program. Lang. Syst., 24(3): 217--298, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. Micha Sharir and Amir Pnueli. Two approaches to interprocedural data flow analysis. In Steven S. Muchnick and Neil D. Jones, editors, Program Flow Analysis: Theory and Applications, chapter 7, pages 189--233. Prentice-Hall, 1981.Google ScholarGoogle Scholar
  29. Arnaud Venet. Abstract cofibered domains: Application to the alias analysis of untyped programs. In Static Analysis (SAS), pages 366--382, 1996. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Calling context abstraction with shapes

                  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
                    POPL '11: Proceedings of the 38th annual ACM SIGPLAN-SIGACT symposium on Principles of programming languages
                    January 2011
                    652 pages
                    ISBN:9781450304900
                    DOI:10.1145/1926385
                    • cover image ACM SIGPLAN Notices
                      ACM SIGPLAN Notices  Volume 46, Issue 1
                      POPL '11
                      January 2011
                      624 pages
                      ISSN:0362-1340
                      EISSN:1558-1160
                      DOI:10.1145/1925844
                      Issue’s Table of Contents

                    Copyright © 2011 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 ACM 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: 26 January 2011

                    Permissions

                    Request permissions about this article.

                    Request Permissions

                    Check for updates

                    Qualifiers

                    • research-article

                    Acceptance Rates

                    Overall Acceptance Rate824of4,130submissions,20%

                    Upcoming Conference

                    POPL '25

                  PDF Format

                  View or Download as a PDF file.

                  PDF

                  eReader

                  View online with eReader.

                  eReader