A generic complete dynamic logic for reasoning about purity and effects

Till Mossakowski*, Lutz Schröder, Sergey Goncharov

*Corresponding author for this work

Research output: Chapter in Book/Report/Conference proceedingConference contribution

Abstract

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 modeled 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.

Original languageEnglish
Title of host publicationFundamental Approaches to Software Engineering - 11th International Conference, FASE 2008 - Held as Part of the Joint European Conferences on Theory and Practice of Software, ETAPS 2008, Proceedings
Pages199-214
Number of pages16
DOIs
Publication statusPublished - 2008
Event"11th International Conferenceon Fundamental Approaches to Software Engineering, FASE 2008" - Budapest, Hungary
Duration: 29 Mar 20086 Apr 2008

Publication series

NameLecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics)
Volume4961 LNCS
ISSN (Print)0302-9743
ISSN (Electronic)1611-3349

Conference

Conference"11th International Conferenceon Fundamental Approaches to Software Engineering, FASE 2008"
Country/TerritoryHungary
CityBudapest
Period29/03/086/04/08

ASJC Scopus subject areas

  • Theoretical Computer Science
  • General Computer Science

Fingerprint

Dive into the research topics of 'A generic complete dynamic logic for reasoning about purity and effects'. Together they form a unique fingerprint.

Cite this