Flexible Correct-by-Construction Programming

11/28/2022
by   Tobias Runge, et al.
0

Correctness-by-Construction (CbC) is an incremental program construction process to construct functionally correct programs. The programs are constructed stepwise 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 predefined refinement rules of fixed granularity which are additional rules on top of the programming language. Each refinement rule introduces a specific programming statement and developers cannot depart from these rules to construct programs. CbC allows to develop software in a structured and incremental way to ensure correctness, but the limited flexibility is a disadvantage of CbC. In this work, we compare classic CbC with CbC-Block and TraitCbC. Both approaches CbC-Block and TraitCbC, are related to CbC, but they have new language constructs that enable a more flexible software construction approach. We provide for both approaches a programming guideline, which similar to CbC, leads to well-structured programs. CbC-Block extends CbC by adding a refinement rule to insert any block of statements. Therefore, we introduce CbC-Block as an extension of CbC. TraitCbC implements correctness-by-construction on the basis of traits with specified methods. We formally introduce TraitCbC and prove soundness of the construction strategy. All three development approaches are qualitatively compared regarding their programming constructs, tool support, and usability to assess which is best suited for certain tasks and developers.

READ FULL TEXT
research
04/12/2022

Traits for Correct-by-Construction Programming

We demonstrate that traits are a natural way to support correctness-by-c...
research
07/30/2020

Correctness by construction for probabilistic programs

The "correct by construction" paradigm is an important component of mode...
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
07/28/2023

QbC: Quantum Correctness by Construction

Thanks to the rapid progress and growing complexity of quantum algorithm...
research
11/17/2017

Towards operational natural language

The multiplicity of software projects' stakeholders and activities leads...
research
05/13/2022

Design-by-Contract for Flexible Multiparty Session Protocols – Extended Version

Choreographic models support a correctness-by-construction principle in ...
research
02/10/2022

Forward Build Systems, Formally

Build systems are a fundamental part of software construction, but their...

Please sign up or login with your details

Forgot password? Click here to reset