Unifying Program Construction and Modification

We propose a method which integrates program modification to the refinement calculus style of program development. Given a program developed through stepwise refinement of a specification, we propose an approach to specify modifications and to derive a new program from the existing refinement steps. This approach is based on the refinement lattice operator meet. A modification to a specification is represented by taking the meet of the old specification and the new feature to add. A solution to the new specification is constructed by coercing the new feature to match the structure of the existing refinement steps. The method fosters reuse of refinement steps and their proofs. We also show that program construction is streamlined by using coercion1 .

[1]  Gunther Schmidt,et al.  Relations and Graphs , 1993, EATCS Monographs on Theoretical Computer Science.

[2]  Jules Desharnais,et al.  Embedding a demonic semilattice in a relation algebra , 1995 .

[3]  K. Rustan M. Leino,et al.  Joining Specification Statements , 1999, Theor. Comput. Sci..

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

[5]  Ali Mili,et al.  Heuristics for Constructing While Loops , 1992, Sci. Comput. Program..

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

[7]  Mary Sheeran,et al.  Designing Arithmetic Circuits by Refinement in Ruby , 1994, Sci. Comput. Program..

[8]  C. A. R. Hoare,et al.  Laws of programming , 1987, CACM.

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

[10]  Jean-Raymond Abrial,et al.  The B-book - assigning programs to meanings , 1996 .

[11]  M. Frappier A relational basis for program construction by parts , 1996 .

[12]  RepsThomas,et al.  A program integration algorithm that accommodates semantics-preserving transformations , 1992 .

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

[14]  Carroll Morgan,et al.  Data Refinement of Predicate Transformers , 1991, Theor. Comput. Sci..

[15]  Valdis Berzins,et al.  Software merge: semantics of combining changes to programs , 1994, TOPL.