A Mechanized Theory of Program Refinement

We present a mechanized theory of program refinement that allows for the stepwise development of imperative programs in the Coq proof assistant. We formalize a design language with support for gradual refinement and a calculus which enforces correctness-by-construction. A notion of program design captures the hierarchy of refinement steps resulting from a development. The underlying theory follows the predicative programming paradigm where programs and specifications are both easily expressed as predicates, which fit naturally in the dependent type theory of the proof assistant.

[1]  Eric C. R. Hehner Specified Blocks , 2005, VSTTE.

[2]  Jules Desharnais,et al.  A Relation Division Operator: The Conjugate Kernel , 1993, Theor. Comput. Sci..

[3]  Wouter Swierstra,et al.  Embedding the refinement calculus in Coq , 2018, Sci. Comput. Program..

[4]  Sylvain Boulmé,et al.  Intuitionistic Refinement Calculus , 2007, TLCA.

[5]  Matthieu Sozeau,et al.  Subset Coercions in Coq , 2006, TYPES.

[6]  Ralph-Johan Back,et al.  Refinement Calculus: A Systematic Introduction , 1998 .

[7]  Eric C. R. Hehner,et al.  Predicative programming Part I , 1984, CACM.

[8]  Roland Carl Backhouse,et al.  Demonic operators and monotype factors , 1993, Mathematical Structures in Computer Science.

[9]  Carroll Morgan The Refinement Calculus, and Literate Development , 1993, Formal Program Development.

[10]  Niklaus Wirth,et al.  Program development by stepwise refinement , 1971, CACM.

[11]  C. A. R. Hoare,et al.  Proof of correctness of data representations , 1972, Acta Informatica.

[12]  Marc Frappier,et al.  A Relational Calculus for Program Construction by Parts , 1996, Sci. Comput. Program..

[13]  Rudolf Berghammer,et al.  Relational Algebraic Semantics of Deterministic and Nondeterministic Programs , 1986, Theor. Comput. Sci..

[14]  Edsger W. Dijkstra,et al.  Notes on structured programming , 1970 .

[15]  Ali Mili A relational approach to the design of deterministic programs , 2004, Acta Informatica.

[16]  Emil Sekerinski A Calculus for Predicative Programming , 1992, MPC.

[17]  C. A. R. Hoare,et al.  The Weakest Prespecification , 1987, Information Processing Letters.

[18]  Eric C. R. Hehner,et al.  A Practical Theory of Programming , 1993, Texts and Monographs in Computer Science.

[19]  Michael J. Butler,et al.  Program Derivation Using the Refinement Calculator , 1996, TPHOLs.

[20]  Derrick G. Kourie,et al.  The Correctness-by-Construction Approach to Programming , 2012, Springer Berlin Heidelberg.

[21]  Donald E. Knuth,et al.  Literate Programming , 1984, Comput. J..