Unification: A case-study in data refinement
Justin M Spivey · Formal Aspects of Computing · 1995
Abstract In this paper, the Z notation is used to develop a small theory of terms and substitutions within which a simple unification algorithm can be specified and proved correct. Particular emphasis is placed on the use of Z's mathematical data types to simplify the development and structure of this theory. The correctness of an abstract version of the algorithm is proved first; this version operates on substitutions by composition. Then data refinement is used to show that the substitutions can be represented by ‘binding functions’ that make composition a particularly efficient operation. The approach taken in this paper is compared with the approaches of three previous papers based on VDM. The contribution of this paper is to show how data refinement can be used to explain the design decisions behind a non-trivial program, and to provide a point of comparison between Z and VDM approaches to the same problem.