Skip to main content

Runtime Checking for Separation Logic

  • Conference paper
Verification, Model Checking, and Abstract Interpretation (VMCAI 2008)

Part of the book series: Lecture Notes in Computer Science ((LNTCS,volume 4905))

Abstract

Separation logic is a popular approach for specifying properties of recursive mutable data structures. Several existing systems verify a subclass of separation logic specifications using static analysis techniques. Checking data structure specifications during program execution is an alternative to static verification: it can enforce the sophisticated specifications for which static verification fails, and it can help debug incorrect specifications and code by detecting concrete counterexamples to their validity.

This paper presents Separation Logic Invariant ChecKer (SLICK), a runtime checker for separation logic specifications. We show that, although the recursive style of separation logic predicates is well suited for runtime execution, the implicit footprint and existential quantification make efficient runtime checking challenging. To address these challenges we introduce a coloring technique for efficiently checking method footprints and describe techniques for inferring values of existentially quantified variables. We have implemented our runtime checker in the context of a tool for enforcing specifications of Java programs. Our experience suggests that our runtime checker is a useful companion to a static verifier for separation logic specifications.

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. Barnett, M., Leino, K.R.M., Schulte, W.: The Spec# programming system: An overview. In: CASSIS 2004 (2004)

    Google Scholar 

  2. Berdine, J., et al.: Shape analysis for composite data structures. In: CAV 2007 (2007)

    Google Scholar 

  3. Berdine, J., Calcagno, C., O’Hearn, P.W.: Smallfoot: Modular automatic assertion checking with separation logic. In: FMCO, pp. 115–137 (2005)

    Google Scholar 

  4. Bodden, E., Hendren, L., Lhoták, O.: A staged static program analysis to improve the performance of runtime monitoring. In: Ernst, E. (ed.) ECOOP 2007. LNCS, vol. 4609, Springer, Heidelberg (2007)

    Chapter  Google Scholar 

  5. Calcagno, C., et al.: Footprint analysis: A shape analysis that discovers preconditions. In: Riis Nielson, H., Filé, G. (eds.) SAS 2007. LNCS, vol. 4634, Springer, Heidelberg (2007)

    Google Scholar 

  6. Calcagno, C., Yang, H., O’Hearn, P.: Computability and complexity results for a spatial assertion language for data structures. In: FSTTCS 2001 (2001)

    Google Scholar 

  7. Cartwright, R., Fagan, M.: Soft typing. In: PLDI 1991, pp. 278–292 (1991)

    Google Scholar 

  8. Chen, F., Roşu, G.: MOP: An Efficient and Generic Runtime Verification Framework. In: OOPSLA 2007 (2007)

    Google Scholar 

  9. Cheon, Y.: A Runtime Assertion Checker for the Java Modeling Language. PhD thesis, Iowa State University (April 2003)

    Google Scholar 

  10. Clarke, L.A., Rosenblum, D.S.: A historical perspective on runtime assertion checking in software development. SIGSOFT Softw. Eng. Notes 31(3), 25–37 (2006)

    Article  Google Scholar 

  11. Demsky, B., et al.: Efficient specification-assisted error localization. In: Second International Workshop on Dynamic Analysis (2004)

    Google Scholar 

  12. Findler, R.B., Felleisen, M.: Contracts for higher-order functions. In: ICFP (2002)

    Google Scholar 

  13. Guo, B., Vachharajani, N., August, D.I.: Shape analysis with inductive recursion synthesis. In: PLDI 2007 (2007)

    Google Scholar 

  14. Guttag, J., Horning, J.: Larch: Languages and Tools for Formal Specification. Springer, Heidelberg (1993)

    MATH  Google Scholar 

  15. Immerman, N.: Descriptive Complexity. Springer, Heidelberg (1998)

    Google Scholar 

  16. Ishtiaq, S., O’Hearn, P.W.: BI as an assertion language for mutable data structures. In: Proc. 28th ACM POPL 2001 (2001)

    Google Scholar 

  17. Kuncak, V.: Modular Data Structure Verification. PhD thesis, EECS Department, Massachusetts Institute of Technology (February 2007)

    Google Scholar 

  18. Kuncak, V., Rinard, M.: On spatial conjunction as second-order logic. Technical Report 970, MIT CSAIL (October 2004)

    Google Scholar 

  19. Lev-Ami, T.: TVLA: A framework for Kleene based logic static analyses. Master’s thesis, Tel-Aviv University, Israel (2000)

    Google Scholar 

  20. Lev-Ami, T., et al.: Putting static analysis to work for verification: A case study. In: Int. Symp. Software Testing and Analysis (2000)

    Google Scholar 

  21. Lo, D., Khoo, S.-C., Liu, C.: Efficient mining of iterative patterns for software specification discovery. In: SIGKDD 2007 (2007)

    Google Scholar 

  22. Nguyen, H.H., et al.: Automated verification of shape and size properties via separation logic. In: VMCAI 2007 (2007)

    Google Scholar 

  23. Nguyen, H.H., Kuncak, V., Chin, W.-N.: Runtime Checking for Separation Logic. EPFL Technical Report LARA-REPORT-2007-003 (2007)

    Google Scholar 

  24. Overton, D., Somogyi, Z., Stuckey, P.J.: Constraint-based mode analysis of mercury. In: PPDP, pp. 109–120. ACM Press, New York (2002)

    Chapter  Google Scholar 

  25. Perry, F., Jia, L., Walker, D.: Expressing heap-shape contracts in linear logic. In: GPCE, pp. 101–110. ACM Press, New York (2006)

    Chapter  Google Scholar 

  26. Reineke, J.: Shape analysis of sets. Master’s thesis, Universität des Saarlandes, Germany (June 2005)

    Google Scholar 

  27. Reynolds, J.C.: Separation logic: A logic for shared mutable data structures. In: 17th LICS, pp. 55–74 (2002)

    Google Scholar 

  28. Shankar, A., Bodik, R.: Ditto: Automatic incrementalization of data structure invariant checks. In: PLDI 2007 (2007)

    Google Scholar 

  29. Somogyi, Z.: A system of precise modes for logic programs. In: ICLP 1987 (1987)

    Google Scholar 

  30. Wies, T., et al.: Field constraint analysis. In: VMCAI 2006 (2006)

    Google Scholar 

  31. Zee, K., et al.: Runtime checking for program verification systems. In: RV (collocated with AOSD) (2007)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Francesco Logozzo Doron A. Peled Lenore D. Zuck

Rights and permissions

Reprints and permissions

Copyright information

© 2008 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Nguyen, H.H., Kuncak, V., Chin, WN. (2008). Runtime Checking for Separation Logic. In: Logozzo, F., Peled, D.A., Zuck, L.D. (eds) Verification, Model Checking, and Abstract Interpretation. VMCAI 2008. Lecture Notes in Computer Science, vol 4905. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-78163-9_19

Download citation

  • DOI: https://doi.org/10.1007/978-3-540-78163-9_19

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-78162-2

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

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics