Abstract
A lattice theoretic framework for the calculus of program refinement is presented. Specifications and program statements are combined into a single (infinitary) language of commands which permits miraculous, angelic and demonic statements to be used in the description of program behavior. The weakest precondition calculus is extended to cover this larger class of statements and a game-theoretic interpretation is given for these constructs. The language is complete, in the sense that every monotonic predicate transformer can be expressed in it. The usual program constructs can be defined as derived notions in this language. The notion of inverse statements is defined and its use in formalizing the notion of data refinement is shown.
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
R. J. R. Back. On the Correctness of Refinement Steps in Program Development. PhD thesis, Department of Computer Science, University of Helsinki, Helsinki, 1978. Report A-1978-4.
R. J. R. Back. Correctness Preserving Program Refinements: Proof Theory and Applications, volume 131 of Mathematical Center Tracts. Mathematical Centre, Amsterdam, 1980.
R. J. R. Back. On correct refinement of programs. J. Computer and Systems Sciences, 23(1):49–68, August 1981.
R. J. R. Back. Procedural abstraction in the refinement calculus. Reports on computer science and mathematics 55, Åbo Akademi, 1987.
R. J. R. Back. A calculus of refinements for program derivations. Acta Informatica, 25:593–624, 1988.
R. J. R. Back. Changing data representation in the refinement calculus. In 21st Hawaii International Conference on System Sciences, January 1989. Also available as Åbo Akademi reports on computer science and mathematics no. 68, 1988.
R. J. R. Back. Refining atomicity in parallel algorithms. In PARLE Conference on Parallel Architectures and Languages Europe, volume 366 of Lecture Notes in Computer Science, Eindhoven, the Netherlands, June 1989. Springer Verlag. Also available as Åbo Akademi reports on computer science and mathematics no. 57, 1988.
R. J. R. Back and K. Sere. Refinement of action systems. In Mathematics of Program Construction, volume 375 of Lecture Notes in Computer Science, Groningen, The Netherlands, June 1989. Springer-Verlag.
R. J. R. Back and J. von Wright. Combining angels, demons and miracles in program specifications. Reports on computer science and mathematics 86, Åbo Akademi, 1989.
R. J. R. Back and J. von Wright. Command lattices, variable environments and data refinement. Reports on computer science and mathematics (in preparation), Åbo Akademi, 1989.
R. J. R. Back and J. von Wright. Duality in specification languages: a lattice-theoretical approach. Reports on computer science and mathematics 77, Åbo Akademi, 1989. To appear in Acta Informatica.
R. J. R. Back and J. von Wright. A lattice-theoretical basis for a specification language. In Mathematics of Program Construction, volume 375 of Lecture Notes in Computer Science, Groningen, The Netherlands, June 1989. Springer-Verlag.
R. J. R. Back and J. von Wright. Statement inversion and strongest postcondition. Reports on computer science and mathematics (in preparation), Åbo Akademi, 1989.
G. Birkhoff. Lattice Theory. American Mathematical Society, Providence, 1961.
R. M. Burstall and J. Darlington. Some transformations for developing recursive programs. J. ACM, 24(1):44–67, 1977.
W. Chen and J. T. Udding. Towards a calculus of data refinement. In Mathematics of Program Construction, volume 375 of Lecture Notes in Computer Science, Groningen, The Netherlands, June 1989. Springer-Verlag.
J. W. de Bakker. Mathematical Theory of Program Correctness. Prentice-Hall, 1980.
E. W. Dijkstra. Notes on structured programming. In E. D. Dahl, O.J. and C. Hoare, editors, Structured Programming. Academic Press, 1971.
E. W. Dijkstra. A Discipline of Programming. Prentice-Hall International, 1976.
P. Gardiner and C. C. Morgan. Data refinement of predicate transformers. Manuscript (to appear in Theoretical Computer Science), 1988.
S. L. Gerhart. Correctness preserving program transformations. In Proc. 2nd ACM Conference of Principles of Programming Languages, pages 54–66, 1975.
G. Grätzer. General Lattice Theory. Birkhäuser Verlag, Basel, 1978.
D. Gries. The Science of Programming. Springer-Verlag, New York, 1981.
P. Guerreiro. Another characterization of weakest preconditions. In Lecture Notes in Computer Science 137. Springer-Verlag, 1982.
W. H. Hesselink. An algebraic calculus of commands. Report CS 8808, Department of Mathematics and Computer Science, University of Groningen, 1988.
W. H. Hesselink. Command algebras, recursion and program transformation. Report CS 8812, Department of Mathematics and Computer Science, University of Groningen, 1988.
C. A. R. Hoare. Proofs of correctness of data representation. Acta Informatica, 1(4):271–281, 1972.
C. A. R. Hoare, I. J. Hayes, J. He, C. C. Morgan, A. W. Roscoe, J. W. Sanders, I. H. Sorensen, J. Spivey, and A. Sufrin. Laws of programming. Communications of the ACM, 30(8):672–686, August 1987.
C. C. Morgan. Data refinement by miracles. Information Processing Letters, 26:243–246, January 1988.
C. C. Morgan. The specification statement. ACM Transactions on Programming Languages and Systems, 10(3):403–419, July 1988.
C. C. Morgan. Programming from specifications. Manuscript, 1989.
C. C. Morgan. Types and invariants in the refinement calculus. In Mathematics of Program Construction, volume 375 of Lecture Notes in Computer Science, Groningen, The Netherlands, June 1989. Springer-Verlag.
C. C. Morgan and P. Gardiner. Data refinement by calculation. Technical report, Programming Research Group, Oxford University, 1988.
J. M. Morris. A theoretical basis for stepwise refinement and the programming calculus. Science of Computer Programming, 9:287–306, 1987.
J. M. Morris. Laws of data refinement. Acta Informatica, 26:287–308, 1989.
G. Nelson. A generalization of Dijkstra's calculus. Tech. Rep 16, Digital Systems Research Center, Palo Alto, Calif., April 1987.
N. Wirth. Program development by stepwise refinement. Communications of the ACM, 14:221–227, 1971.
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 1990 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Back, R.J.R., von Wright, J. (1990). Refinement calculus, part I: Sequential nondeterministic programs. In: de Bakker, J.W., de Roever, W.P., Rozenberg, G. (eds) Stepwise Refinement of Distributed Systems Models, Formalisms, Correctness. REX 1989. Lecture Notes in Computer Science, vol 430. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-52559-9_60
Download citation
DOI: https://doi.org/10.1007/3-540-52559-9_60
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-52559-2
Online ISBN: 978-3-540-47035-9
eBook Packages: Springer Book Archive