Scope Logic with Local Reasoning and Pre/Post-State Properties
Jianhua Zhao, Xuandong Li

TL;DR
This paper extends Hoare logic with local reasoning and pre/post-state properties to verify pointer programs, introducing memory scope functions and recursive definitions for precise state and memory access modeling.
Contribution
It introduces Memory Scope Functions and a novel approach to handle pointers and recursive functions in Hoare logic for program verification.
Findings
Successfully verified pointer programs using the new logic.
Extended Hoare logic to handle memory scope and recursive functions.
Proved the Shorre-Waite algorithm within this logical framework.
Abstract
This paper presents an extension to Hoare logic for pointer program verification. Logic formulas with user-defined recursive functions are used to specify properties on the program states before/after program executions. Three basic functions are introduced to represents memory access, record-field access and array-element access. Some axioms are introduced to specify these basic functions in our logic. The concept Memory Scope Function (MSF) is introduced in our logic. Given a recursive function , the MSF of computes the set of memory units accessed during the evaluation of . A set of rules are given to derive the definition of this MSF syntactically from the definition of . As MSFs are also recursive functions, they also have their MSFs. An axiom is given to specify that an MSF contains its MSF. Based on this axiom, local reasoning is supported with predicate…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsFormal Methods in Verification · Logic, programming, and type systems · Software Testing and Debugging Techniques
