skip to main content
research-article

On inter-procedural analysis of programs with lists and data

Authors Info & Claims
Published:04 June 2011Publication History
Skip Abstract Section

Abstract

We address the problem of automatic synthesis of assertions on sequential programs with singly-linked lists containing data over infinite domains such as integers or reals. Our approach is based on an accurate abstract inter-procedural analysis. Program configurations are represented by graphs where nodes represent list segments without sharing. The data in these list segments are characterized by constraints in abstract domains. We consider a domain where constraints are in a universally quantified fragment of the first-order logic over sequences, as well as a domain constraining the multisets of data in sequences.

Our analysis computes the effect of each procedure in a local manner, by considering only the reachable part of the heap from its actual parameters. In order to avoid losses of information, we introduce a mechanism based on unfolding/folding operations allowing to strengthen the analysis in the domain of first-order formulas by the analysis in the multisets domain.

The same mechanism is used for strengthening the sound (but incomplete) entailment operator of the domain of first-order formulas. We have implemented our techniques in a prototype tool and we have shown that our approach is powerful enough for automatic (1) generation of non-trivial procedure summaries, (2) pre/post-condition reasoning, and (3) procedure equivalence checking.

References

  1. D. Beyer, T.A. Henzinger, R. Majumdar, and A. Rybalchenko. Invariant synthesis for combined theories. In VMCAI, volume 4349 of LNCS, pages 378--394. Springer, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. A. Bouajjani, C. Drăgoi, C. Enea, A. Rezine, and M. Sighireanu. Invariant synthesis for programs manipulating lists with unbounded data. In CAV, volume 6174 of LNCS, pages 72--88. Springer, 2010. Google ScholarGoogle Scholar
  3. C. Calcagno, D. Distefano, P.W. O'Hearn, and H. Yang. Compositional shape analysis by means of bi-abduction. In POPL, pages 289--300. ACM, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. CEA. Frama-C Platform. htp://frama-c.com.Google ScholarGoogle Scholar
  5. Celia plugin. http://www.liafa.jussieu.fr/celia.Google ScholarGoogle Scholar
  6. B.-Y.E. Chang and X. Rival. Relational inductive shape analysis. In POPL, pages 247--260. ACM, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. P. Cousot and R. Cousot. Abstract interpretation: A unified lattice model for static analysis of programs by construction or approximation of fixpoints. In POPL, pages 238--252. ACM, 1977. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. P. Cousot and R. Cousot. Static determination of dynamic properties of recursive procedures. In IFIP Conf. on Formal Description of Programming Concepts, pages 237--277. North-Holland Publishing Company, 1977.Google ScholarGoogle Scholar
  9. P. Cousot and R. Cousot. Systematic design of program analysis frameworks. In POPL, pages 269--282. ACM, 1979. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. P. Cousot and R. Cousot. Abstract interpretation frameworks. Journal of Logic and Computation, 2(4):511--547, 1992.Google ScholarGoogle ScholarCross RefCross Ref
  11. A. Deutsch. On determining lifetime and aliasing of dynamically allocated data in higher-order functional specifications. In POPL, pages 157--168. ACM, 1990. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. S. Gulwani, T. Lev-Ami, and S. Sagiv. A combination framework for tracking partition sizes. In POPL, pages 239--251. ACM, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. S. Gulwani, B. McCloskey, and A. Tiwari. Lifting abstract interpreters to quantified logical domains. In POPL, pages 235--246. ACM, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. A. Gupta, R. Majumdar, and A. Rybalchenko. From tests to proofs. In TACAS, volume 5505 of LNCS, pages 262--276. Springer, 2009. Google ScholarGoogle Scholar
  15. N. Halbwachs and M. Péron. Discovering properties about arrays in simple programs. In PLDI, pages 339--348. ACM, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. B. Jeannet. Fixpoint. http://gforge.inria.fr/.Google ScholarGoogle Scholar
  17. B. Jeannet and A. Miné. Apron: A library of numerical abstract domains for static analysis. In CAV, volume 5643 of LNCS, pages 661--667. Springer, 2009. Google ScholarGoogle Scholar
  18. R. Jhala and K.L. McMillan. Array abstractions from proofs. In CAV, volume 4590 of LNCS, pages 193--206. Springer, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. R. Manevich, E. Yahav, G. Ramalingam, and S. Sagiv. Predicate abstraction and canonical abstraction for singly-linked lists. In VMCAI, volume 3385 of LNCS, pages 181--198. Springer, 2005. Google ScholarGoogle Scholar
  20. B. McCloskey, T.W. Reps, and S. Sagiv. Statically inferring complex heap, array, and numeric invariants. In SAS, volume 6337 of LNCS, pages 71--99. Springer, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. V. Perrelle and N. Halbwachs. An analysis of permutations in arrays. In VMCAI, volume 5944 of LNCS, pages 279--294, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. J. C. Reynolds. Separation logic: A logic for shared mutable data structures. In LICS, pages 55--74. IEEE Computer Society, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. N. Rinetzky, J. Bauer, T.W. Reps, S. Sagiv, and R. Wilhelm. A semantics for procedure local heaps and its abstractions. In POPL, pages 296--309. ACM, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. N. Rinetzky, S. Sagiv, and E. Yahav. Interprocedural shape analysis for cutpoint-free programs. In SAS, volume 3672 of LNCS, pages 284--302. Springer, 2005. Google ScholarGoogle Scholar
  25. X. Rival and B.-Y.E. Chang. Calling context abstraction with shapes. In POPL, pages 173--186. ACM, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. X. Rival and L. Mauborgne. The trace partitioning abstract domain. ACM Transactions on Programming Languages and Systems, 29, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. S. Sagiv, T.W. Reps, and R. Wilhelm. Parametric shape analysis via 3-valued logic. ACM Transactions on Programming Languages and Systems, 24(3):217--298, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. M. Sharir and A. Pnueli. Two approaches to interprocedural data flow analysis. In Program Flow Analysis: Theory and Applications, pages 189--234. New York University, 1981.Google ScholarGoogle Scholar
  29. V. Vafeiadis. Shape-value abstraction for verifying linearizability. In VMCAI, volume 5403 of LNCS, pages 335--348. Springer, 2009. Google ScholarGoogle Scholar

Index Terms

  1. On inter-procedural analysis of programs with lists and data

                  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

                  • Published in

                    cover image ACM SIGPLAN Notices
                    ACM SIGPLAN Notices  Volume 46, Issue 6
                    PLDI '11
                    June 2011
                    652 pages
                    ISSN:0362-1340
                    EISSN:1558-1160
                    DOI:10.1145/1993316
                    Issue’s Table of Contents
                    • cover image ACM Conferences
                      PLDI '11: Proceedings of the 32nd ACM SIGPLAN Conference on Programming Language Design and Implementation
                      June 2011
                      668 pages
                      ISBN:9781450306638
                      DOI:10.1145/1993498
                      • General Chair:
                      • Mary Hall,
                      • Program Chair:
                      • David Padua

                    Copyright © 2011 ACM

                    Publisher

                    Association for Computing Machinery

                    New York, NY, United States

                    Publication History

                    • Published: 4 June 2011

                    Check for updates

                    Qualifiers

                    • research-article

                  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!