Traits for Correct-by-Construction Programming

04/12/2022
by   Tobias Runge, et al.
0

We demonstrate that traits are a natural way to support correctness-by-construction (CbC) in an existing programming language in the presence of traditional post-hoc verification (PhV). With Correctness-by-Construction, programs are constructed incrementally along with a specification that is inherently guaranteed to be satisfied. CbC is complex to use without specialized tool support, since it needs a set of refinement rules of fixed granularity which are additional rules on top of the programming language. In this work, we propose TraitCbC, an incremental program construction procedure that implements correctness-by-construction on the basis of PhV by using traits. TraitCbC enables program construction by trait composition instead of refinement rules. It provides a programming guideline, which similar to CbC should lead to well-structured programs, and allows flexible reuse of verified program building blocks. We introduce TraitCbC formally and prove the soundness of our verification strategy. Additionally, we implement TraitCbC as a proof of concept.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
11/28/2022

Flexible Correct-by-Construction Programming

Correctness-by-Construction (CbC) is an incremental program construction...
research
08/04/2022

Information Flow Control-by-Construction for an Object-Oriented Language Using Type Modifiers

In security-critical software applications, confidential information mus...
research
02/26/2019

Iteratively Composing Statically Verified Traits

Metaprogramming is often used to programmatically generate faster specia...
research
10/23/2018

Programming Without Refining

To derive a program for a given specification R means to find an artifac...
research
07/30/2020

Correctness by construction for probabilistic programs

The "correct by construction" paradigm is an important component of mode...
research
04/29/2020

Compilation of Coordinated Choice

Recently, we have proposed coordinated choices, which are nondeterminist...
research
10/27/2018

Beyond Structured Programming

The correctness of a structured program is, at best, plausible. Though t...

Please sign up or login with your details

Forgot password? Click here to reset