Data Abstraction and Relational Program Logic

10/31/2019
by   Mohammad Nikouei, et al.
0

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.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
07/31/2021

Solving Constrained Horn Clauses over ADTs by Finite Model Finding

First-order logic is a natural way of expressing the properties of compu...
research
01/25/2023

Proving Correctness of Parallel Implementations of Transition System Specifications

The overall problem addressed in this paper is the long-standing problem...
research
08/24/2018

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...
research
04/09/2021

Beyond the Elementary Representations of Program Invariants over Algebraic Data Types

First-order logic is a natural way of expressing properties of computati...
research
09/25/2019

CLN2INV: Learning Loop Invariants with Continuous Logic Networks

Program verification offers a framework for ensuring program correctness...
research
10/16/2020

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

The theory of program modules is of interest to language designers not o...
research
03/01/2019

Relational Differential Dynamic Logic

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

Please sign up or login with your details

Forgot password? Click here to reset