DeepAI AI Chat
Log In Sign Up

Data Abstraction and Relational Program Logic

by   Mohammad Nikouei, et al.

In a paper published in 1972 Hoare articulated the fundamental notions of hiding invariants and simulations. Hiding: invariants on encapsulated data representations need not be mentioned in specifications that comprise the API of a module. Simulation: correctness of a new data representation and implementation can be established by proving simulation between the old and new implementations using a coupling relation defined on the encapsulated state. These results were formalized semantically and for a simple model of state, though the paper claimed this could be extended to encompass dynamically allocated objects. In recent years, progress has been made towards formalizing the claim, for simulation, though mainly in semantic developments. In this paper, the ideas are combined with the idea in Hoare's 1969 paper: a logic of programs. For a language with dynamically allocated shared mutable objects, we introduce a relational Hoare logic that formalizes encapsulation, hiding of invariants, and relating two implementations via coupling relations. Relations and other assertions are expressed in first order logic. The proof rules are shown sound with respect to a conventional operational semantics. Applicability to representative examples of data abstraction is demonstrated using an SMT-based implementation.


page 1

page 2

page 3

page 4


Solving Constrained Horn Clauses over ADTs by Finite Model Finding

First-order logic is a natural way of expressing the properties of compu...

Proving Correctness of Parallel Implementations of Transition System Specifications

The overall problem addressed in this paper is the long-standing problem...

Towards a constraint solver for proving confluence with invariant and equivalence of realistic CHR programs

Confluence of a nondeterministic program ensures a functional input-outp...

Beyond the Elementary Representations of Program Invariants over Algebraic Data Types

First-order logic is a natural way of expressing properties of computati...

CLN2INV: Learning Loop Invariants with Continuous Logic Networks

Program verification offers a framework for ensuring program correctness...

Logical Relations as Types: Proof-Relevant Parametricity for Program Modules

The theory of program modules is of interest to language designers not o...

Relational Differential Dynamic Logic

In the field of quality assurance of hybrid systems (that combine contin...