In:
Wuhan University Journal of Natural Sciences, EDP Sciences, Vol. 26, No. 6 ( 2021-12), p. 481-488
Abstract:
We propose a systematic method to deduce and synthesize the Dafny programs. First, the specification of problem is described in strict mathematical language. Then, the derivation process uses program specification transformation technology to perform equivalent transformation. Furthermore, Dafny program is synthesized through the obtained recursive relationship and loop invariants. Finally, the functional correctness of Dafny program is automatically verified by Dafny verifier or online tool. Through this method, we deduce and synthesize Dafny programs for many typical problems such as the cube sum problem, the minimum (or maximum) contiguous subarray problems, several searching problems, several sorting problems, and so on. Due to space limitation, we only illustrate the development process of Dafny programs for two typical problems: the minimum contiguous subarray problem and the new local bubble sorting problem. It proves that our method can effectively improve the correctness and reliability of Dafny program developed. What’s more, we demonstrate the potential of the deductive synthesis method by developing a new local bubble Sorting program.
Type of Medium:
Online Resource
ISSN:
1007-1202
,
1993-4998
DOI:
10.1051/wujns/2021266481
Language:
English
Publisher:
EDP Sciences
Publication Date:
2021
detail.hit.zdb_id:
2365459-4
SSG:
11
Permalink