Issue |
Wuhan Univ. J. Nat. Sci.
Volume 28, Number 3, June 2023
|
|
---|---|---|
Page(s) | 246 - 256 | |
DOI | https://doi.org/10.1051/wujns/2023283246 | |
Published online | 13 July 2023 |
Computer Science
CLC number: TP311
Nonlinear Program Construction and Verification Method Based on Partition Recursion and Morgan's Refinement Rules
1
College of Computer Information Engineering, Jiangxi Normal University, Nanchang 330022, Jiangxi, China
2
College of Digital Industry Academy, Jiangxi Normal University, Shangrao 334000, Jiangxi, China
† To whom correspondence should be addressed. E-mail: zhengkang2005@iscas.ac.cn
Received:
21
May
2022
The traditional program refinement strategy cannot be refined to an executable program, and there are issues such as low verification reliability and automation. To solve the above problems, this paper proposes a nonlinear program construction and verification method based on partition recursion and Morgan's refinement rules. First, we use recursive definition technique to characterize the initial specification. The specification is then transformed into GCL(Guarded Command Language) programs using loop invariant derivation and Morgan's refinement rules. Furthermore, VCG (Verification Condition Generator) is used in the GCL program to generate the verification condition automatically. The Isabelle theorem prover then validates the GCL program's correctness. Finally, the GCL code generates a C++ executable program automatically via the conversion system. The effectiveness of this method is demonstrated using binary tree preorder traversal program construction and verification as an example. This method addresses the problem that the construction process's loop invariant is difficult to obtain and the refinement process is insufficiently detailed. At the same time, the method improves verification process automation and reduces the manual verification workload.
Key words: program construction / partition recursion / Morgan's refinement rules / loop invariant / VCG / Isabelle theorem prover
Biography: WANG Changjing, male, Ph.D., Professor, research direction: software formal method, trustworthy software. E-mail: wcj771006@163.com
Fundation item: Supported by the National Natural Science Foundation of China (62262031), Science and Technology Key Project of Education Department of Jiangxi Province (GJJ2200302, GJJ210307), and the Graduate Innovative Special Fund Projects of Jiangxi Province (YJS2022064)
© Wuhan University 2023
This is an Open Access article distributed under the terms of the Creative Commons Attribution License (https://creativecommons.org/licenses/by/4.0), which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.
Current usage metrics show cumulative count of Article Views (full-text article views including HTML views, PDF and ePub downloads, according to the available data) and Abstracts Views on Vision4Press platform.
Data correspond to usage on the plateform after 2015. The current usage metrics is available 48-96 hours after online publication and is updated daily on week days.
Initial download of the metrics may take a while.