A Constructive Alternative to Axiomatic Data Type Definitions
Many computer scientists advocate using axiomatic methods (such as algebraic specification) to specify a program data domain - the universe of abstract data objects and operations manipulated by a program. Unfortunately, correct axiomatizations are difficult to write and to understand. Furthermore, their non-constructive nature precludes automatic implementation by a language processor. In this paper, we present a more disciplined, purely constructive alternative to axiomatic data domain specification. Instead of axiomatizing the program data domain, the programmer explicitly constructs it by using four type construction mechanisms: constructor generation, union generation, subset generation, and quotient generation. These mechanisms are rich enough to define all of the abstract data objects that programmers commonly use: integers, sequences, trees, sets, arrays, functions, etc. In contrast to axiomatic definitions, constructive definitions are easy to write and to understand. An unexpected advantage of the constructive approach is a limited capacity to support non-deterministic operations. As an illustration, we define a non-deterministic "choose" operation on sets.
computer science; technical report
Previously Published As