Case studies of development of verified programs with Dafny for accessibility assessment

01/09/2023
by   João Pascoal Faria, et al.
0

Formal verification techniques aim at formally proving the correctness of a computer program with respect to a formal specification, but the expertise and effort required for applying formal specification and verification techniques and scalability issues have limited their practical application. In recent years, the tremendous progress with SAT and SMT solvers enabled the construction of a new generation of tools that promise to make formal verification more accessible for software engineers, by automating most if not all of the verification process. The Dafny system is a prominent example of that trend. However, little evidence exists yet about its accessibility. To help fill this gap, we conducted a set of 10 case studies of developing verified implementations in Dafny of some real-world algorithms and data structures, to determine its accessibility for software engineers. We found that, on average, the amount of code written for specification and verification purposes is of the same order of magnitude as the traditional code written for implementation and testing purposes (ratio of 1.14) – an “overhead” that certainly pays off for high-integrity software. The performance of the Dafny verifier was impressive, with 2.4 proof obligations generated per line of code written, and 24 ms spent per proof obligation generated and verified, on average. However, we also found that the manual work needed in writing auxiliary verification code may be significant and difficult to predict and master. Hence, further automation and systematization of verification tasks are possible directions for future advances in the field.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
04/22/2021

Cameleer: a Deductive Verification Tool for OCaml

OCaml is particularly well-fitted for formal verification. On one hand, ...
research
12/08/2018

A Verified Timsort C Implementation in Isabelle/HOL

Formal verification of traditional algorithms are of great significance ...
research
11/27/2018

Experience Report on Formally Verifying Parts of OpenJDK's API with KeY

Deductive verification of software has not yet found its way into indust...
research
02/07/2018

Experience Report: Formal Methods in Material Science

Increased demands in the field of scientific computation require that al...
research
07/16/2021

Verified Mutable Data Structures

Malfunctions in software like airplane control systems or nuclear plant ...
research
06/21/2023

Coqlex: Generating Formally Verified Lexers

A compiler consists of a sequence of phases going from lexical analysis ...
research
11/27/2018

Lightweight Interactive Proving inside an Automatic Program Verifier

Among formal methods, the deductive verification approach allows establi...

Please sign up or login with your details

Forgot password? Click here to reset