States and exceptions considered as dual effects

Abstract : 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.
Document type :
Preprints, Working Papers, ...
Complete list of metadatas
Contributor : Dominique Duval <>
Submitted on : Thursday, May 19, 2011 - 4:05:41 PM
Last modification on : Thursday, July 4, 2019 - 9:54:02 AM
Long-term archiving on : Saturday, August 20, 2011 - 2:27:55 AM


Files produced by the author(s)


  • HAL Id : hal-00445873, version 4
  • ARXIV : 1001.1662



Jean-Guillaume Dumas, Dominique Duval, Laurent Fousse, Jean-Claude Reynaud. States and exceptions considered as dual effects. 2011. ⟨hal-00445873v4⟩



Record views


Files downloads