Sorts are used: * some are used for data values as in the algebraic approach to data types; and * others are used for states, as in the algebraic approach to abstract machines. The latter give objects. These two uses for sorts are dual: induction is used to establish properties of data types; while coinduction is used to establish (behavioral) properties of objects with states. Similarly, initiality is important for data types, while finality is important for states. However, we do not insist that implementations of abstract machines (or objects) must be final Because we use hidden sorts to specify classes of objects, order sorted algebra provides a very natural way to handle inheritance; it also allows specifying partial recursive functions, partially defined functions, subtypes of various kinds, error definition and recovery, coercions and multiple representations. The module system of parameterized programming gives us other forms of inheritance
Algebraic techniques have been very successful in specifying and reasoning about data types. Hidden algebra extends these techniques to systems with state. The hidden algebra approach takes as basic the notion of behavioural abstraction: this means that specifications characterise how objects (and systems) behave. Models of hidden specifications can be thought of as abstract machines that implement the specified behaviour. Behavioural satisfaction of equations means that the left and right sides of the equations denote states that cannot be distinguished by their outputs. In this sense, hidden algebra is an algebraic treatment of abstract automata. * visible sorts are used for data values, while * hidden sorts are used for states. In a sense, these two uses of sorts are dual: induction can be used to establish properties of data types, whereas coinduction establishes properties of objects with state.