Hostname: page-component-84b7d79bbc-g7rbq Total loading time: 0 Render date: 2024-07-29T14:17:26.119Z Has data issue: false hasContentIssue false

Datatype laws without signatures

Published online by Cambridge University Press:  04 March 2009

Maarten M. Fokkinga
Affiliation:
University of Twente, dept. INF, P.O. Box 217, 7500 AE Enschede, The Netherlands Email: fokkinga@cs.utwente.nl

Abstract

Using the well-known categorical notion of ‘functor’, one may define the concept of datatype (algebra) without being forced to introduce a signature (that is, names and typings for the individual sorts (types) and operations involved). This has proved to be advantageous for those theory developments where one is not interested in the syntactic appearance of an algebra.

The categorical notion of ‘transformer’ developed in this paper allows the same approach to laws: without using signatures one can define the concept of law for datatypes (lawful algebras), and investigate the equational specification of datatypes in a syntax-free manner. A transformer is a special kind of functor and also a natural transformation on the level of dialgebras. Transformers are quite expressive, satisfy several closure properties, and are related to naturality and Wadler'' Theorems For Free Theorem. In fact, any colimit is an initial lawful algebra.

Type
Research Article
Copyright
Copyright © Cambridge University Press 1996

Access options

Get access to the full version of this content by using one of the access options below. (Log in options will check for institutional or personal access. Content may require purchase if you do not have access.)

References

Barr, M. and Wells, C. (1990) Category Theory for Computing Science, Prentice Hall.Google Scholar
Ehrig, H. and Mahr, B. (1985) Fundamentals of Equational Specification 1 – equations and initial semantics, Springer-Verlag.Google Scholar
Fokkinga, M. M. (1992) Calculate categorically! Formal Aspects ofComputing 4 (4) 673692.CrossRefGoogle Scholar
Fokkinga, M. M. (1992) Law and Order in Algorithmics, Ph.D. thesis, University of Twente, dept. Comp. Sc, Enschede, The Netherlands.Google Scholar
Hagino, T. (1987) Category Theoretic Approach to Data Types, Ph.D. thesis, University of Edinburgh.Google Scholar
Lehmann, D. J. (1978) On the algebra of order – extended abstract. In: 19th Symposium on the Foundations of Computer Science (FOCS), IEEE 214220.CrossRefGoogle Scholar
Lehmann, D. J. (1980) On the algebra of order. Journal of Computer and System Sciences 21 123.CrossRefGoogle Scholar
Lehmann, D. J. and Smyth, M. B. (1981) Algebraic specification of data types: A synthetic approach. Math. Systems Theory 14 97139.CrossRefGoogle Scholar
Malcolm, G. (1990) Algebraic Data Types and Program Transformation, Ph.D. thesis, University of Groningen, The Netherlands.Google Scholar
Malcolm, G. (1990) Data structures and program transformation. Science of Computer Programming 14 (2–3) 255280CrossRefGoogle Scholar
Manes, E. G. (1987) Algebraic Theories, Graduate Text in Mathematics 26, Springer-Verlag.Google Scholar
Manes, E. G. and Arbib, M. A. (1986) Algebraic Approaches to Program Semantics, Text and Monographs in Computer Science, Springer-Verlag.CrossRefGoogle Scholar
Meertens, L. (1986) Algorithmics – towards programming as a mathematical activity. In: de Bakker, J. W. and van Vliet, J. C. (eds.) Proceedings of the CWI Symposium on Mathematics and Computer Science, North-Holland289334.Google Scholar
Meertens, L. (1989) Constructing a calculus of programs. In: van de Snepscheut, J. L. A. (ed.) Mathematics of Program Construction. Springer-Verlag Lecture Notes in Computer Science 375 6690.CrossRefGoogle Scholar
Meijer, E., Fokkinga, M. M. and Paterson, R. (1991) Functional programming with bananas, lenses, envelopes and barbed wire. In: FPCA91: Functional Programming Languages and Computer Architecture. Springer-Verlag Lecture Notes in Computer Science 523 124144.CrossRefGoogle Scholar
Meijer, E. (1994) More Advice on Proving Compilers Correct: Improving Correct Compilers. (Submitted for publication)Google Scholar
Pierce, B. C. (1991) Basic Category Theory for Computer Scientists, MIT Press.CrossRefGoogle Scholar
Wadler, P. (1989) Theorems for free! In: Functional Programming Languages and Computer Architecture: FPCA '89, Imperial College, London, ACM Press 347359.Google Scholar