Author:
Breazu-Tannen Val,Subrahmanyam Ramesh
Abstract
Given an abstract data type(ADT), and algebra that
specifies
it, and an implementation of the data type in a certain language, if the implementation is “correct,” a certain principle of
modularity of reasoning
holds. Namely, one can safely reason about programs in the language extended by the ADT, by interpreting the ADT operation symbols according to the specification algebra. The main point of this paper is to formalize correctness as a local condition involving only the specification and the implementation and to prove the equivalence of such a condition to the modularity principle. We conduct our study in the context of a language without divergence (in subsection 2.1), and for languages with divergence and general recursion (in subsections 2.2 and 2.3). We also describe a sufficient condition under which, given an implementation, there may be a finite set of observational equivalences which imply the local condition. Further, we illustrate a technique for proving in a practical situation that a given implementation of an abstract data type is correct.
Publisher
Association for Computing Machinery (ACM)