A generic complete dynamic logic for reasoning about purity and effects - Archive ouverte HAL Accéder directement au contenu
Article Dans Une Revue Formal Aspects of Computing Année : 2010

A generic complete dynamic logic for reasoning about purity and effects

Résumé

For a number of programming languages, among them Eiffel, C, Java, and Ruby, Hoare-style logics and dynamic logics have been developed. In these logics, pre- and postconditions are typically formulated using potentially effectful programs. In order to ensure that these pre- and postconditions behave like logical formulae (that is, enjoy some kind of referential transparency), a notion of purity is needed. Here, we introduce a generic framework for reasoning about purity and effects. Effects are modelled abstractly and axiomatically, using Moggi's idea of encapsulation of effects as monads. We introduce a dynamic logic (from which, as usual, a Hoare logic can be derived) whose logical formulae are pure programs in a strong sense. We formulate a set of proof rules for this logic, and prove it to be complete with respect to a categorical semantics. Using dynamic logic, we then develop a relaxed notion of purity which allows for observationally neutral effects such writing on newly allocated memory.
Fichier principal
Vignette du fichier
PEER_stage2_10.1007%2Fs00165-010-0153-4.pdf (247.08 Ko) Télécharger le fichier
Origine : Fichiers produits par l'(les) auteur(s)
Loading...

Dates et versions

hal-00587601 , version 1 (21-04-2011)

Identifiants

Citer

Till Mossakowski, Lutz Schröder, Sergey Goncharov. A generic complete dynamic logic for reasoning about purity and effects. Formal Aspects of Computing, 2010, 22 (3), pp.363-384. ⟨10.1007/s00165-010-0153-4⟩. ⟨hal-00587601⟩

Collections

PEER
39 Consultations
192 Téléchargements

Altmetric

Partager

Gmail Facebook X LinkedIn More