Skip to main content

Interprocedural Shape Analysis for Cutpoint-Free Programs

  • Conference paper
Static Analysis (SAS 2005)

Part of the book series: Lecture Notes in Computer Science ((LNPSE,volume 3672))

Included in the following conference series:

Abstract

We present a framework for interprocedural shape analysis, which is context- and flow-sensitive with the ability to perform destructive pointer updates. We limit our attention to cutpoint-free programs—programs in which reasoning on a procedure call only requires consideration of context reachable from the actual parameters. For such programs, we show that our framework is able to perform an efficient modular analysis. Technically, our analysis computes procedure summaries as transformers from inputs to outputs while ignoring parts of the heap not relevant to the procedure. This makes the analysis modular in the heap and thus allows reusing the effect of a procedure at different call-sites and even between different contexts occurring at the same call-site. We have implemented a prototype of our framework and used it to verify interesting properties of cutpoint-free programs, including partial correctness of a recursive quicksort implementation.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Almeida, P.S.: Balloon types: Controlling sharing of state in data types. In: European Conference on Object-Oriented Programming, ESOP (1997)

    Google Scholar 

  2. Ball, T., Rajamani, S.K.: Bebop: A path-sensitive interprocedural dataflow engine. In: Workshop on Program Analysis for Software Tools and Engineering, PASTE (2001)

    Google Scholar 

  3. Banerjee, A., Naumann, D.A.: Representation independence, confinement, and access control. In: Symp. on Princ. of Prog. Lang. POPL (2002)

    Google Scholar 

  4. Bokowski, B., Vitek, J.: Confined types. In: Conference on Object-Oriented Programming Systems, Languages, and Applications, OOPSLA (1999)

    Google Scholar 

  5. Boyapati, C., Liskov, B., Shrira, L.: Ownership types for object encapsulation. In: Symp. on Princ. of Prog. Lang. POPL (2003)

    Google Scholar 

  6. Chase, D.R., Wegman, M., Zadeck, F.: Analysis of pointers and structures. In: Conf. on Prog. Lang. Design and Impl. PLDI (1990)

    Google Scholar 

  7. Chong, S., Rugina, R.: Static analysis of accessed regions in recursive data structures. In: Cousot, R. (ed.) SAS 2003. LNCS, vol. 2694, p. 1075. Springer, Heidelberg (2003)

    Chapter  Google Scholar 

  8. Clarke, D., Noble, J., Potter, J.: Simple ownership types for object containment. In: European Conference on Object-Oriented Programming, ESOP (2001)

    Google Scholar 

  9. Clarke, D.G., Potter, J.M., Noble, J.: Ownership types for flexible alias protection. In: Conference on Object-Oriented Programming Systems, Languages, and Applications, OOPSLA (1998)

    Google Scholar 

  10. Cousot, P., Cousot, R.: Static determination of dynamic properties of recursive procedures. In: Neuhold, E.J. (ed.) Formal Descriptions of Programming Concepts, IFIP WG 2.2, St. Andrews, Canada, August 1977, pp. 237–277. North-Holland, Amsterdam (1978)

    Google Scholar 

  11. Das, M., Lerner, S., Seigle, M.: ESP: path-sensitive program verification in polynomial time. In: Conf. on Prog. Lang. Design and Impl., PLDI (2002)

    Google Scholar 

  12. Deutsch, A.: Interprocedural may-alias analysis for pointers: Beyond k-limiting. In: Conf. on Prog. Lang. Design and Impl., PLDI (1994)

    Google Scholar 

  13. Dor, N., Rodeh, M., Sagiv, M.: Checking cleanness in linked lists. In: Palsberg, J. (ed.) SAS 2000. LNCS, vol. 1824, pp. 115–135. Springer, Heidelberg (2000)

    Chapter  Google Scholar 

  14. Grothoff, C., Palsberg, J., Vitek, J.: Encapsulating objects with confined types. In: Conference on Object-Oriented Programming Systems, Languages, and Applications, OOPSLA (2001)

    Google Scholar 

  15. Hackett, B., Rugina, R.: Region-based shape analysis with tracked locations. In: Symp. on Princ. of Prog. Lang, POPL (2005)

    Google Scholar 

  16. Hoare, C.A.R.: Algorithm 64: Quicksort. Comm. of the ACM (CACM) 4(7), 321 (1961)

    Article  Google Scholar 

  17. Hogg, J.: Islands: Aliasing protection in object-oriented languages. In: Conference on Object-Oriented Programming Systems, Languages, and Applications, OOPSLA (1991)

    Google Scholar 

  18. Ishtiaq, S.S., O’Hearn, P.W.: BI as an assertion language for mutable data structures. In: Symp. on Princ. of Prog. Lang, POPL (2001)

    Google Scholar 

  19. Jeannet, B., Loginov, A., Reps, T., Sagiv, M.: A relational approach to interprocedural shape analysis. In: Giacobazzi, R. (ed.) SAS 2004. LNCS, vol. 3148, pp. 246–264. Springer, Heidelberg (2004)

    Chapter  Google Scholar 

  20. Knoop, J., Steffen, B.: The interprocedural coincidence theorem. In: Pfahler, P., Kastens, U. (eds.) CC 1992. LNCS, vol. 641, pp. 125–140. Springer, Heidelberg (1992)

    Google Scholar 

  21. Leino, K.R.M., Poetzsch-Heffter, A., Zhou, Y.: Using data groups to specify and check side effects. In: Conf. on Prog. Lang. Design and Impl, PLDI (2002)

    Google Scholar 

  22. Lev-Ami, T., Reps, T., Sagiv, M., Wilhelm, R.: Putting static analysis to work for verification: A case study. In: Int. Symp. on Software Testing and Analysis, ISSTA (2000)

    Google Scholar 

  23. Lev-Ami, T., Sagiv, M.: TVLA: A framework for Kleene based static analysis. In: Palsberg, J. (ed.) SAS, LNCS, vol. 1824, pp. 280–302. Springer, Heidelberg (2000), Available at, http://www.math.tau.ac.il/~tvla

  24. Manevich, R., Sagiv, M., Ramalingam, G., Field, J.: Partially disjunctive heap abstraction. In: Giacobazzi, R. (ed.) SAS 2004. LNCS, vol. 3148, pp. 265–279. Springer, Heidelberg (2004)

    Chapter  Google Scholar 

  25. Müller, P., Poetzsch-Heffter, A.: Universes: A type system for alias and dependency control. Technical Report 279, Fernuniversität Hagen (2001)

    Google Scholar 

  26. Nielson, F., Nielson, H.R., Hankin, C.: Principles of Program Analysis. Springer, Heidelberg (1999)

    MATH  Google Scholar 

  27. Noble, J., Biddle, R., Tempero, E., Potanin, A., Clarke, D.: Towards a model of encapsulation. In: The First International Workshop on Aliasing, Confinement and Ownership in Object-Oriented Programming, IWACO (2003)

    Google Scholar 

  28. Noble, J., Vitek, J., Potter, J.: Flexible alias protection. In: European Conference on Object-Oriented Programming, ESOP (1998)

    Google Scholar 

  29. Reps, T., Horwitz, S., Sagiv, M.: Precise interprocedural dataflow analysis via graph reachability. In: Symp. on Princ. of Prog. Lang, POPL (1995)

    Google Scholar 

  30. Reps, T., Sagiv, M., Loginov, A.: Finite differencing of logical formulas for static analysis. In: Degano, P. (ed.) ESOP 2003. LNCS, vol. 2618, pp. 380–398. Springer, Heidelberg (2003)

    Chapter  Google Scholar 

  31. Reynolds, J.: Separation logic: a logic for shared mutable data structures. In: Symp. on Logic in Computer Science, LICS (2002)

    Google Scholar 

  32. Rinetzky, N., Bauer, J., Reps, T., Sagiv, M., Wilhelm, R.: A semantics for procedure local heaps and its abstractions. Tech. Rep. 1, AVACS, (September 2004), Available at, http://www.avacs.org

  33. Rinetzky, N., Bauer, J., Reps, T., Sagiv, M., Wilhelm, R.: A semantics for procedure local heaps and its abstractions. In: Symp. on Princ. of Prog. Lang., POPL (2005)

    Google Scholar 

  34. Rinetzky, N., Sagiv, M.: Interprocedural shape analysis for recursive programs. In: Wilhelm, R. (ed.) CC 2001. LNCS, vol. 2027, p. 133. Springer, Heidelberg (2001)

    Chapter  Google Scholar 

  35. Rinetzky, N., Sagiv, M., Yahav, E.: Interprocedural shape analysis for cutpoint-free programs. Tech. Rep. 104/05, Tel Aviv Uni. (April 2005), Available at, http://www.math.tau.ac.il/~maon

  36. Sagiv, M., Reps, T., Wilhelm, R.: Parametric shape analysis via 3-valued logic. Trans. on Prog. Lang. and Syst (TOPLAS) 24(3), 217–298 (2002)

    Google Scholar 

  37. Shaham, R., Yahav, E., Kolodner, E.K., Sagiv, M.: Establishing local temporal heap safety properties with applications to compile-time memory management. In: Cousot, R. (ed.) SAS 2003. LNCS, vol. 2694, pp. 264–289. Springer, Heidelberg (2003)

    Chapter  Google Scholar 

  38. Sharir, M., Pnueli, A.: Two approaches to interprocedural data flow analysis. In: Muchnick, S.S., Jones, N.D. (eds.) Program Flow Analysis: Theory and Applications, ch. 7, pp. 189–234. Prentice-Hall, Englewood Cliffs (1981)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2005 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Rinetzky, N., Sagiv, M., Yahav, E. (2005). Interprocedural Shape Analysis for Cutpoint-Free Programs. In: Hankin, C., Siveroni, I. (eds) Static Analysis. SAS 2005. Lecture Notes in Computer Science, vol 3672. Springer, Berlin, Heidelberg. https://doi.org/10.1007/11547662_20

Download citation

  • DOI: https://doi.org/10.1007/11547662_20

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-28584-7

  • Online ISBN: 978-3-540-31971-9

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics