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
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
Hoare, C.A.R.: An axiomatic basis for computer programming. Communications of the ACM 12(10), 576–580 (1969)
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)
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)
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)
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
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)
Jones, C.B., Middelburg, C.A.: A typed logic of partial functions reconstructed classically. Acta Inform 31(5), 399–430 (1994)
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)
Parkinson, M.J., Summers, A.J.: The Relationship Between Separation Logic and Implicit Dynamic Frames. Logical Methods in Computer Science 8(3) (2012)
Smans, J., Jacobs, B., Piessens, F.: Implicit dynamic frames. ACM Trans. on Programgramming Language and Systems 34(1) (2012)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights 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)