Computer Engineering & Science ›› 2022, Vol. 44 ›› Issue (06): 1063-1071.
• Computer Network and Znformation Security • Previous Articles Next Articles
ZUO Zheng-kang1,LIANG Zan-yang1,SU Wei1,HUANG Qing1,WANG Yuan2,WANG Chang-jing1
Received:
Revised:
Accepted:
Online:
Published:
Abstract: Formal derivation is the program development under the theory of program correctness proof, and finally obtains the completely correct algorithm program. Regarding the problem of sequence dimidiate partition, the existing formal derivation method alternates the derivation and proof in the derivation process. The derivation process is cumbersome and most of them cannot directly obtain the executable program. To solve the above problems, this paper proposes a new formal derivation method for the sequence dimidiate partition problem. This method is based on the core idea of partition and recursion, applies the specification transformation technology to transform the problem specification and strictly guarantee its consistency, so that there is no need to proof in the derivation process. Then, the recurrence relations are derived and a highly reliable Apla program is obtained. Finally, the conversion tool is used to automatically generates executable programs. It realizes the complete process of program refinement from the program specification to the specific executable program. By taking two algorithms as examples, the effectiveness and feasibility of the method are verified. It has guided significance for the formal derivation of related problems.
Key words: dimidiate partition, formal derivation, partition and recursion, program refinement
ZUO Zheng-kang, LIANG Zan-yang, SU Wei, HUANG Qing, WANG Yuan, WANG Chang-jing. Formal derivation of the sequence dimidiate partition problem[J]. Computer Engineering & Science, 2022, 44(06): 1063-1071.
0 / / Recommend
Add to citation manager EndNote|Ris|BibTeX
URL: http://joces.nudt.edu.cn/EN/
http://joces.nudt.edu.cn/EN/Y2022/V44/I06/1063