Abstract
It is often the intent of an algebraic specification of a data structure to include an aspect of control. For example, a stack is either empty or nonempty and one expects to be able to perform different actions based on this test. The question of whether an algebraic specification correctly expresses the intended control is related to a categorical question concerning whether the equalizer completion of the theory is distributive.
A many-sorted algebraic theory T is distributive whenever its (product preserving) equalizer completion, or equivalently the dual of the category of finitely presented algebras, ε(T) = (Set Tf )op is a distributive category. This happens precisely when it has inhabited types and a weak form of “if...then...else” operator satisfying certain Horn clauses.
Of philosophical interest is the observation that if one drops the requirement that the types are inhabited the above correspondence fails. This means that the traditional method of adding control using conditional operators does not in general correspond to the categorical notion of control as given in distributive categories (or even locally predistributive categories).
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
J.R.B. Cockett, Introduction to distributive categories Maquarie Computing Report 90–0052C (1990).
S. Bloom and R. Tindell, Varieties of if…then…else SIAM Journal on Computing 12 (4) (1983) 677–707.
B.A. Davey and H. Werner, Distributivity of coproducts over products. Algebra Universalis, 12 (1981) 387–394.
Y. Diers Categories of boolean sheaves of simple algebras,Lecture Notes in Mathematics 1187, Springer-Verlag, Berlin, Heidelberg, New York(1985).
H. Ehrig and B. Mahr Fundamentals of algebraic specification I: equations and initial semantics. Springer Verlag, Berlin (1985).
H. Huwig and A. Poigne, A note on the inconsistencies caused by fixed points in a cartesian closed category, Theoretical Computer Science 73 (1989).
J.A. Goguen “Higher-order functions considered unnecessary for higher-order programming.” In Research topics in functional programming Ed. D.A. Turner, Addison-Wesley (1990).
P.T. Johnstone Topos Theory Academic Press, London (1977).
C. Kirchner, H. Kirchner and J. Meseguer “Operational Semantics of OBJ3.” In Proceedings of the 9th International Conference on Automata, Languages, and Programming. Lecture Notes in Computer Science, vol. 241. Springer-Verlag, Berlin (1988).
F.W. Lawvere Diagonal arguments and cartesian closed categories,Springer Lecture Notes in Mathematics 92, Springer-Verlag, Berlin (19) 134–145
R.F.C. Walters Datatypes in distributive categories, Bull. Australian Mathematics Society 40 (1989) 79–82.
R.F.C. Walters Category Theory, Logic, and Computer Science,course notes of lectures given at Sydney University 1988/1989.
C. Wells A generalization of the concept of a sketch, Journal of theoretical Computer Science 70 (1990) 159–178.
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 1991 British Computer Society
About this paper
Cite this paper
Robin, J., Cockett, B. (1991). Conditional Control is not quite Categorical Control. In: Birtwistle, G. (eds) IV Higher Order Workshop, Banff 1990. Workshops in Computing. Springer, London. https://doi.org/10.1007/978-1-4471-3182-3_12
Download citation
DOI: https://doi.org/10.1007/978-1-4471-3182-3_12
Publisher Name: Springer, London
Print ISBN: 978-3-540-19660-0
Online ISBN: 978-1-4471-3182-3
eBook Packages: Springer Book Archive