Specifying Data Objects with Initial Algebras

Abstract

i This study presents a systematic approach to specifying data objects with the help of initial algebras. The primary aim is to describe the setup to be found in modern functional programming languages such as Haskell and ML, although it can also be applied to more general situations. The 'initial algebra semantics' philosophy has been propagated by the ADJ group consisting of J. example in [6], and is now well-established. The approach presented here can be seen as pushing this philosophy a stage further and consists of taking the following four steps. (1) Data types are specified by a signature and the 'fully-defined' data objects are then described by the carrier sets in an initial algebra. (2) The initial algebra is extended to include 'undefined' and 'partially defined' data objects, leading to what is known as a bottomed algebra. The correct bottomed algebra depends on the language being considered. However, it can always be defined to be an initial object in a class of bottomed algebras determined by a simple structure which we call a head type. This setup can deal with both lazy and strict languages as well as anything in between. (3) The third step is based on the observation that there is a unique family of partial orders defined on the carrier sets of the initial bottomed algebra such that each partial order can reasonably be interpreted as meaning 'being less-defined than'. This leads to what are called ordered algebras; these have partially ordered carrier sets and monotone operators. The initial bottomed algebra turns out to also be an initial object in an appropriate class of ordered algebras. (4) The final step involves what is called the initial (or ideal) completion of a partially ordered set. This is used to complete the ordered algebra to end up with a continuous algebra having complete partially ordered carrier sets and continuous operators. The resulting continuous algebra is again an initial object in the appropriate class of continuous algebras. The bottomed, ordered and continuous algebras which occur here are uniquely determined up to isomorphism by the signature and the head type, both of which are essentially finite structures in any practical case. The account includes a treatment of polymorphism, although to simplify things the approach is a bit more restrictive than that to be found in languages such as Haskell or ML. Moreover, the polymorphic types here do not involve …

Extracted Key Phrases

Cite this paper

@article{Preston2009SpecifyingDO, title={Specifying Data Objects with Initial Algebras}, author={Chris Preston}, journal={CoRR}, year={2009}, volume={abs/0909.3596} }