Encoding, Decoding and Data Refinement

Abstract. Data refinement is the systematic replacement of a data structure with another one in program development. Data refinement between program statements can on an abstract level be described as a commutativity property where the abstraction relationship between the data structures involved is represented by an abstract statement (a decoding). We generalise the traditional notion of data refinement by defining an encoding operator that describes the least (most abstract) data refinement with respect to a given abstraction. We investigate the categorical and algebraic properties of encoding and describe a number of special cases, which include traditional notions of data refinement. The dual operator of encoding is decoding, which we investigate and give an intuitive interpretation to. Finally we show a number of applications of encoding and decoding.

[1]  C. A. R. Hoare,et al.  Proof of correctness of data representation , 1975, Language Hierarchies and Interfaces.

[2]  Kai Engelhardt,et al.  Data Refinement: Model-Oriented Proof Methods and their Comparison , 1998 .

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

[4]  Ralph-Johan Back,et al.  Correctness preserving program refinements: Proof theory and applications , 1980 .

[5]  Ralph-Johan Back,et al.  Changing data representation in the refinement calculus , 1989, [1989] Proceedings of the Twenty-Second Annual Hawaii International Conference on System Sciences. Volume II: Software Track.

[6]  Tony Hoare,et al.  Data Refinement in a Categorical Setting , 1987 .

[7]  C. A. R. Hoare,et al.  Prespecification in Data Refinement , 1987, Inf. Process. Lett..

[8]  Edsger W. Dijkstra,et al.  A Discipline of Programming , 1976 .

[9]  Ralph-Johan Back,et al.  Statement Inversion and Strongest Postcondition , 1993, Sci. Comput. Program..

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

[11]  J Von Wright The Lattice of Data Reenement , 1994 .

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

[13]  Carroll Morgan,et al.  The specification statement , 1988, TOPL.

[14]  Ralph-Johan Back,et al.  Refinement Calculus, Part I: Sequential Nondeterministic Programs , 1989, REX Workshop.

[15]  Wei Chen,et al.  Towards a Calculus of Data Refinement , 1989, MPC.