Authors:
Paul Bailes
and
Colin Kemp
Affiliation:
The University of Queensland, Australia
Keyword(s):
Catamorphism, Church Numeral, Foldr, Functional Programming, Fusion Theorem, Haskell.
Related
Ontology
Subjects/Areas/Topics:
Formal Methods
;
Service-Oriented Software Engineering and Management
;
Simulation and Modeling
;
Software and Systems Development Methodologies
;
Software Engineering
;
Software Engineering Methods and Techniques
Abstract:
Functional or “zoetic” representations of data embody the behaviours that we hypothesise are characteristic to all datatypes. The advantage of such representations is that they avoid the need, in order to realize these characteristic behaviours, to implement interpretations of symbolic data at each use. Zoetic data are not unheard-of in computer science, but support for them by current software technology remains limited. Even though the first-class function capability of functional languages inherently supports the essentials of zoetic data, the creation of zoetic data from symbolic data would have to be by repeated application of a characteristic interpreter. This impairs the effectiveness of the “Totally Functional” approach to programming of which zoetic data are the key enabler. Accordingly, we develop a scheme for synthesis of generator functions for zoetic data which correspond to symbolic data constructors but which entirely avoid the need for a separate interpretation stage.
This avoidance allows us to achieve a clear separation of concerns between the definitions of datatypes on the one hand and their various applications on the other.
(More)