Skip to main content

Scope Logic: An Extension to Hoare Logic for Pointers and Recursive Data Structures

  • Conference paper

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

Abstract

This paper presents an extension to Hoare Logic for pointer program verification. The main observation leading to this logic is that the value of an expression e depends only on the contents stored in a finite set of memory units. This set can be specified using another expression (called the memory scope of e) constructed syntactically from e. A set of construction rules are given in this paper for expressions which may contain recursive functions (predicates). It is also observed that the memory scope of e is a super set of the memory scope of the memory scope of e. Based on this, local reasoning can be supported using assertion variables which represent arbitrary assertions. Program-point-specific expressions are used to specify the relations between different program points. Another feature of this logic is that for formulas with no user-defined functions, the weakest-preconditions can be calculated w.r.t. assignments.

This paper is supported by the Chinese National 863 Project, NO.2011AA010103

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

Buying options

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

Learn about institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Hoare, C.A.R.: An axiomatic basis for computer programming. Communications of the ACM 12(10), 576–580 (1969)

    Article  MATH  Google Scholar 

  2. Burstall, R.M.: Some techniques for proving correctness of programs which alter data structures. In: Machine Intelligence, vol. 7, pp. 23–50. Edinburgh University Press, Edinburgh (1972)

    Google Scholar 

  3. Cook, S.A., Oppen, D.C.: An assertion language for data structures. In: Conference Record of 2nd ACM Symposium on Priciples of Programming Languages, New York, pp. 160–166 (1975)

    Google Scholar 

  4. Morris, J.M.: A general axiom of assignment; assignment and linked data structures; a proof of the Schorr-Waite algorithm. In: Theoretical Foundations of Programming Methodology, pp. 25–51. D. Reidel, Dordrecht (1982)

    Chapter  Google Scholar 

  5. Reynolds, J.C.: An overview of separation logic. In: Proceedings of Verified Software: Theories, Tools, Experiments 2005, Zurich, Switzerland, October 10-13 (2005) Revised Selected Papers and Discussions

    Google Scholar 

  6. Yang, H.: An example of local reasoning in BI pointer logic: The Schorr-Waite graph marking algorithm. In: Henglein, F., Hughes, J., Makholm, H., Niss, H. (eds.) SPACE 2001: Informal Proceedings of Workshop on Semantics, Program Analysis and Computing Environments for Memory Management, pp. 41–68. IT University of Copenhagen (2001)

    Google Scholar 

  7. Jones, C.B., Middelburg, C.A.: A typed logic of partial functions reconstructed classically. Acta Inform 31(5), 399–430 (1994)

    Article  MathSciNet  MATH  Google Scholar 

  8. Banerjee, A., Naumann, D.A., Rosenberg, S.: Regional logic for local reasoning about global invariants. In: Vitek, J. (ed.) ECOOP 2008. LNCS, vol. 5142, pp. 387–411. Springer, Heidelberg (2008)

    Chapter  Google Scholar 

  9. Parkinson, M.J., Summers, A.J.: The Relationship Between Separation Logic and Implicit Dynamic Frames. Logical Methods in Computer Science 8(3) (2012)

    Google Scholar 

  10. Smans, J., Jacobs, B., Piessens, F.: Implicit dynamic frames. ACM Trans. on Programgramming Language and Systems 34(1) (2012)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2013 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Jianhua, Z., Xuandong, L. (2013). Scope Logic: An Extension to Hoare Logic for Pointers and Recursive Data Structures. In: Liu, Z., Woodcock, J., Zhu, H. (eds) Theoretical Aspects of Computing – ICTAC 2013. ICTAC 2013. Lecture Notes in Computer Science, vol 8049. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-39718-9_24

Download citation

  • DOI: https://doi.org/10.1007/978-3-642-39718-9_24

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-642-39717-2

  • Online ISBN: 978-3-642-39718-9

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics