States and exceptions considered as dual effects - Archive ouverte HAL Accéder directement au contenu
Rapport Année : 2011

States and exceptions considered as dual effects

Résumé

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.
Fichier principal
Vignette du fichier
dual-DDFR.pdf (522.06 Ko) Télécharger le fichier
Origine : Fichiers produits par l'(les) auteur(s)

Dates et versions

hal-00445873 , version 1 (11-01-2010)
hal-00445873 , version 2 (21-01-2010)
hal-00445873 , version 3 (07-04-2010)
hal-00445873 , version 4 (19-05-2011)

Identifiants

Citer

Jean-Guillaume Dumas, Dominique Duval, Laurent Fousse, Jean-Claude Reynaud. States and exceptions considered as dual effects. [Research Report] Université Grenoble Alpes. 2011. ⟨hal-00445873v4⟩
170 Consultations
243 Téléchargements

Altmetric

Partager

Gmail Facebook X LinkedIn More