A CALCULUS OF REFINEMENTS FOR PROGRAM DERIVATIONS

被引:119
作者
BACK, RJR
机构
[1] Abo Acad, Finland
关键词
Computer Metatheory--Theory;
D O I
10.1007/BF00291051
中图分类号
TP [自动化技术、计算机技术];
学科分类号
0812 ;
摘要
A calculus of program refinements is described, to be used as a tool for the step-by-step derivation of correct programs. A derivation step is considered correct if the new program preserves the total correctness of the old program. This requirement is expressed as a relation of (correct) refinement between nondeterministic program statements. The properties of this relation are studied in detail. The usual sequential statement constructors are shown to be monotone with respect to this relation and it is shown how refinement between statements can be reduced to a proof of total correctness of the refining statement. A special emphasis is put on the correctness of replacement steps, where some component of a program is replaced by another component. A method by which assertions can be added to statements to justify replacements in specific context is developed. The paper extend the weakest precondition technique of E.W. Dijkstra to proving correctness of larger program derivation steps, thus providing a unified framework for the axiomatic, the stepwise refinement and the transformational approach to program construction and verification.
引用
收藏
页码:593 / 624
页数:32
相关论文
共 34 条
[1]   COUNTABLE NONDETERMINISM AND RANDOM ASSIGNMENT [J].
APT, KR ;
PLOTKIN, GD .
JOURNAL OF THE ACM, 1986, 33 (04) :724-767
[2]  
BACK RJ, 1980, MATH CTR TRACTS MATH, V131
[3]  
BACK RJ, 1978, A19784 U HELS DEP CO
[4]   PROVING TOTAL CORRECTNESS OF NONDETERMINISTIC PROGRAMS IN INFINITARY LOGIC [J].
BACK, RJR .
ACTA INFORMATICA, 1981, 15 (03) :233-249
[5]   ON CORRECT REFINEMENT OF PROGRAMS [J].
BACK, RJR .
JOURNAL OF COMPUTER AND SYSTEM SCIENCES, 1981, 23 (01) :49-68
[6]  
BACK RJR, 1987, REPORTS COMPUTER SCI, V55
[7]  
BACK RJR, 1983, ACM C PRINCIPLES PRO
[8]  
BACK RJR, UNPUB DERIVATION DAG
[9]  
BAUER FL, 1979, LECT NOTES COMPUT SC, V69
[10]  
BERLIOUX P, 1986, ALGORITHMS CONSTRUCT