Partial Algebras Flow From Algebraic Specifications

The aim of this paper is to introduce and to investigate a method for specifying algebras with partial functions, while maintaining the simpler framework of total algebras and conventional specifications. For this purpose, an ordinary algebraic specification SPEC is equipped with a subspecification BASE, and each SPEC-algebra is equipped with a BASE-homomorphism distinguishing a BASE-part of the SPEC-algebra. These modifications, yielding the notions of based specification and of based algebra, do not seriously affect the semantic properties of algebraic specifications. In particular, the initial SPEC-algebra can simply be transformed into an initial based algebra. Then one can restrict a SPEC-algebra to its distinguished BASE-part. In this way, one gets a SPEC-algebra with operations that may be partial. The construction applies especially to the initial based algebra, the operations of which can be shown to be computable in a certain sense. Conversely, it turns out that each computable function on natural numbers can be specified as an operation of the initial based algebra of a based specification.