States and exceptions considered as dual effects
mag(2010)
摘要
In this paper we consider the two major computational effects of states and
exceptions, from the point of view of diagrammatic logics. We get a surprising
result: there exists a symmetry between these two effects, based on the
well-known categorical duality between products and coproducts. More precisely,
the lookup and update operations for states are respectively dual to the throw
and catch operations for exceptions. This symmetry is deeply hidden in the
programming languages; in order to unveil it, we start from the monoidal
equational logic and we add progressively the logical features which are
necessary for dealing with either effect. This approach gives rise to a new
point of view on states and exceptions, which bypasses the problems due to the
non-algebraicity of handling exceptions.
更多查看译文
关键词
category theory,equational logic,programming language
AI 理解论文
溯源树
样例
生成溯源树,研究论文发展脉络
Chat Paper
正在生成论文摘要