Abstract
We describe how the HOL theorem prover can be used to check and apply rules of program refinement. The rules are formulated in the refinement calculus, which is a theory of correctness preserving program transformations. We embed a general command notation with a predicate transformer semantics in the logic of the HOL system. Using this embedding, we express and prove rules for data refinement and superposition refinement of initialized loops. Applications of these proof rules to actual program refinements are checked using the HOL system, with the HOL system generating these conditions. We also indicate how the HOL system is used to prove the verification conditions. Thus, the HOL system can provide a complete mechanized environment for proving program refinements.
Similar content being viewed by others
References
R.J.R. Back. A calculus of refinements for program derivations.Acta Informatica, 25:593–624, 1988.
C.C. Morgan.Programming from Specifications. Prentice-Hall, 1990.
E.W. Dijkstra.A Discipline of Programming. Prentice-Hall International, 1976.
R.J.R. Back. Changing data representation in the refinement calculus. In21st Hawaii International Conference on System Sciences, January, 1989.
P.H. Gardiner and C.C. Morgan. Data refinement of predicate transformers.Theoretical Cumputer Science, 87(1):143–162, 1991.
J.M. Morris. Laws of data refinement.Acta Informatica, 26:287–308, 1989.
C.B. Jones.Systematic Software Development Using VDM. Prentice-Hall International, 1986.
K.M. Chandy and J. Misra.Parallel Program Design: A Foundation. Addison-Wesley, 1988.
L. Bougé and N. Francez. A compositional approach to superposition. InProc. 14th Conference on Principles of Programming Languages, San Diego, USA, January 1988, 240–249.
R.J.R. Back and K. Sere. Superposition refinement of parallel algorithms. InFormal Description Techniques IV, K.R. Parker and G.A. Rose, (eds.), Elsevier Science Publishers (North-Holland) 1992, 475–493.
D.M. Goldschlag. Mechanizing UNITY. InTC2 Working Conference on Programming Concepts and Methods, M. Broy, (ed.), Israel, 1990, IFIP, 374–401.
U. Engberg, P. Groenning and L. Lamport. Mechanical verification of concurrent systems with TLA. InProc. 4th Workshop on Computer-Aided Verification, Montreal, Canada. June, 1992, Springer-Verlag.
M. Aagard and M. Leeser. Verifying a logic synthesis tool in Nuprl. InProc. 4th Workshop on Computer-Aided Verification, Montreal, Canada, June, 1992, Springer-Verlag.
M.J.C. Gordon. HOL: A proof generating system for higher-order logic. InVLSI Specification, Verification and Synthesis, G. Birtwistle and P.A. Subrahmanyam (eds.), Kluwer Academic Publishers, 1988.
M.J.C. Gordon. Mechanizing programming logics in higher-order logic. InCurrent Trends in Hardware Verification and Theorem Proving, G. Birtwistle and P.A. Subrahmanyam (eds.), Springer-Verlag, 1989.
A.J. Camilleri. Mechanizing CSP trace theory in higher order logic.IEEE Transactions of Software Engineering, 16(9):993–1004, 1990.
F. Andersen. A Theorem Prover for UNITY in Higher Order Logic. PhD thesis, Technical University of Denmark, Lyngby Denmark, 1992.
S. Agerholm. Mechanizing program verification in HOL. DAIMI IR-111, Aarhus University, 1992.
R.J.R. Back and J. von Wright. Refinement concepts formalised in higher-order logic.Formal Aspects of Computing, 2:247–272, 1990.
J. Grundy. A window inference tool for refinement. InProc. 5th Refinement Workshop, Jones et al. (ed.), London, Jan. 1992, Springer-Verlag.
T. Vickers. An overview of a refinement editor. In5th Australian Software Engineering Conference, Sydney, May 1990.
L. Groves and R. Nickson. A tactic driven refinement tool. InProc. 5th Refinement Workshop, Jones et al. (ededs.), London, Jan., 1992, Springer-Verlag.
J. von Wright and K. Sere. Program transformations and refinements in HOL. InProc. 1991 International Workshop on Higher Order Logic Theorem Proving and its Applications, Davis, USA, August, 1991. IEEE/ACM.
A. Church. A formulation of the simple theory of types.Journal of Symbolic Logic, 5:56–68, 1940.
E.W. Dijkstra and C.S. Scholten.Predicate Calculus and Program Semantics. Springer-Verlag, 1990.
R.J.R. Back.Correctness Preserving Program Refinements: Proof Theory and Applications, volume 131 of Mathematical Center Tracts. Mathematical Centre, Amsterdam, 1980.
C.C. Morgan. Data refinement by miracles.Information Processing Letters, 26:243–246, January, 1988.
J.M. Morris. A theoretical basis for stepwise refinement and the programming calculus.Science of Computer Programming, 9:287–306, 1987.
R.J.R. Back and K. Sere. Stepwise refinement of action systems.Structured Programming, 12:17–30 1991.
R.J.R. Back. Refinement Calculus, part II: Parallel and reactive programs. InREX Workshop for Refinement of Distributed Systems, volume 430 of Lecture Notes in Computer Science, Nijmegen, The Netherlands, 1989, Springer-Verlag.
R.J.R. Back and J. von Wright. Refinement calculus, part 1: Sequential programs. InREX Workshop for Refinement of Distributed Systems, volume 430 of Lecture Notes in Computer Science, Nijmegen, the Netherlands, 1989, Springer-Verlag.
J. von Wright. The lattice of data refinement. Reports on computer science and mathematics 130, Åbo Akademi, 1992. To appear inActa Informatica
R.J.R., Back and J. von Wright. Combining angels, demons and miracles in program specifications.Theoretical Computer Science, 100:365–383, 1992.
J. He, C.A.R. Hoare and J.W. Sanders. Prespecification in data refinement.Information Processing Letters, 25:71–76, 1987.
B. Jonsson. On decomposing and refining specifications of distributed systems. InREX Workshop for Refinement of Distributed Systems, volume 430 of Lecture Notes in Computer Science, Nijmegen, The Netherlands, 1989, Springer-Verlag.
Author information
Authors and Affiliations
Rights and permissions
About this article
Cite this article
Von Wright, J., Hekanaho, J., Luostarinen, P. et al. Mechanizing some advanced refinement concepts. Form Method Syst Des 3, 49–81 (1993). https://doi.org/10.1007/BF01383984
Issue Date:
DOI: https://doi.org/10.1007/BF01383984