Sound Invariant Checking Using Type Modifiers and Object Capabilities

02/26/2019
by   Isaac Oscar Gariano, et al.
0

In this paper we use pre existing language support for type modifiers and object capabilities to enable a system for sound runtime verification of invariants. Our system guarantees that class invariants hold for all objects involved in execution. Invariants are specified simply as methods whose execution is statically guaranteed to be deterministic and not access any externally mutable state. We automatically call such invariant methods only when objects are created or the state they refer to may have been mutated. Our design restricts the range of expressible invariants but improves upon the usability and performance of our system compared to prior work. In addition, we soundly support mutation, dynamic dispatch, exceptions, and non determinism, while requiring only a modest amount of annotation. We present a case study showing that our system requires a lower annotation burden compared to Spec#, and performs orders of magnitude less runtime invariant checks compared to the widely used `visible state semantics' protocols of D, Eiffel. We also formalise our approach and prove that such pre existing type modifier and object capability support is sufficient to ensure its soundness.

READ FULL TEXT
research
03/26/2020

Data-Driven Inference of Representation Invariants

A representation invariant is a property that holds of all values of abs...
research
08/09/2022

The Right Kind of Non-Determinism: Using Concurrency to Verify C Programs with Underspecified Semantics

We present a novel and well automatable approach to formal verification ...
research
04/30/2019

Targeted Synthesis for Programming with Data Invariants

Programmers frequently maintain implicit data invariants, which are rela...
research
08/08/2022

Simple Rigs Hold Fast

An important use of computational systems is updating the state of an ob...
research
09/14/2021

The concept of class invariant in object-oriented programming

Class invariants – consistency constraints preserved by every operation ...
research
05/19/2020

Pegasus: Sound Continuous Invariant Generation

Continuous invariants are an important component in deductive verificati...
research
06/01/2017

Shape and Positional Geometry of Multi-Object Configurations

In previous work, we introduced a method for modeling a configuration of...

Please sign up or login with your details

Forgot password? Click here to reset