Regional Logic for Local Reasoning about Global Invariants

  • Authors:
  • Anindya Banerjee;David A. Naumann;Stan Rosenberg

  • Affiliations:
  • Kansas State University, Manhattan KS 66506 USA and, Microsoft Research, Redmond, USA WA 98052;Stevens Institute of Technology, Hoboken, USA NJ 07030;Stevens Institute of Technology, Hoboken, USA NJ 07030

  • Venue:
  • ECOOP '08 Proceedings of the 22nd European conference on Object-Oriented Programming
  • Year:
  • 2008

Quantified Score

Hi-index 0.00

Visualization

Abstract

Shared mutable objects pose grave challenges in reasoning, especially for data abstraction and modularity. This paper presents a novel logic for error-avoiding partial correctness of programs featuring shared mutable objects. Using a first order assertion language, the logic provides heap-local reasoning about mutation and separation, via ghost fields and variables of type `region' (finite sets of object references). A new form of modifies clause specifies write, read, and allocation effects using region expressions; this supports effect masking and a frame rule that allows a command to read state on which the framed predicate depends. Soundness is proved using a standard program semantics. The logic facilitates heap-local reasoning about object invariants: disciplines such as ownership are expressible but not hard-wired in the logic.