Combining effects: Sum and tensor

被引:115
作者
Hyland, Martin
Plotkin, Gordon
Power, John
机构
[1] Univ Edinburgh, Sch Informat, Lab Fdn Comp Sci, Edinburgh EH9 3JZ, Midlothian, Scotland
[2] Univ Cambridge, Dept Math, Cambridge CB3 0WB, England
基金
英国工程与自然科学研究理事会;
关键词
computational effect; Lawvere theory; modularity; monad;
D O I
10.1016/j.tcs.2006.03.013
中图分类号
TP301 [理论、方法];
学科分类号
081202 ;
摘要
We seek a unified account of modularity for computational effects. We begin by reformulating Moggi's monadic paradigm for modelling computational effects using the notion of enriched Lawvere theory, together with its relationship with strong monads; this emphasises the importance of the operations that produce the effects. Effects qua theories are then combined by appropriate bifunctors on the category of theories. We give a theory for the sum of computational effects, which in particular yields Moggi's exceptions monad transformer and an interactive input/output monad transformer. We further give a theory of the commutative combination of effects, their tensor, which yields Moggi's side-effects monad transformer. Finally, we give a theory of operation transformers, for redefining operations when adding new effects; we derive explicit forms for the operation transformers associated to the above monad transformers. (C) 2006 Elsevier B.V. All rights reserved.
引用
收藏
页码:70 / 99
页数:30
相关论文
共 58 条
[31]   Wellfounded trees in categories [J].
Moerdijk, I ;
Palmgren, E .
ANNALS OF PURE AND APPLIED LOGIC, 2000, 104 (1-3) :189-218
[32]   NOTIONS OF COMPUTATION AND MONADS [J].
MOGGI, E .
INFORMATION AND COMPUTATION, 1991, 93 (01) :55-92
[33]  
Moggi E., 1989, Proceedings. Fourth Annual Symposium on Logic in Computer Science (Cat. No.89CH2753-2), P14, DOI 10.1109/LICS.1989.39155
[34]   Algebraic operations and generic effects [J].
Plotkin, G ;
Power, J .
APPLIED CATEGORICAL STRUCTURES, 2003, 11 (01) :69-94
[35]  
Plotkin G, 2002, LECT NOTES COMPUT SC, V2303, P342
[36]  
PLOTKIN G, 1983, DOMAINS
[37]  
Plotkin G. D., 1976, SIAM Journal on Computing, V5, P452, DOI 10.1137/0205035
[38]  
PLOTKIN GD, 2001, LNCS, V2030, P00001
[39]   WHY TRICATEGORIES [J].
POWER, AJ .
INFORMATION AND COMPUTATION, 1995, 120 (02) :251-262
[40]  
Schubert Horst., 1972, CATEGORIES