Hostname: page-component-7479d7b7d-wxhwt Total loading time: 0 Render date: 2024-07-12T04:39:21.645Z Has data issue: false hasContentIssue false

The logic of demand in Haskell

Published online by Cambridge University Press:  21 July 2005

WILLIAM L. HARRISON
Affiliation:
Department of Computer Science, University of Missouri, Columbia, MO, USA (email: HarrisonWL@missouri.edu)
RICHARD B. KIEBURTZ
Affiliation:
Pacific Software Research Center, OGI School of Science & Engineering, Oregon Health & Science University
Rights & Permissions [Opens in a new window]

Abstract

Core share and HTML view are not available for this content. However, as you have access to this content, a full PDF is available via the ‘Save PDF’ action button.

Haskell is a functional programming language whose evaluation is lazy by default. However, Haskell also provides pattern matching facilities which add a modicum of eagerness to its otherwise lazy default evaluation. This mixed or “non-strict” semantics can be quite difficult to reason with. This paper introduces a programming logic, P-logic, which neatly formalizes the mixed evaluation in Haskell pattern-matching as a logic, thereby simplifying the task of specifying and verifying Haskell programs. In p-logic, aspects of demand are reflected or represented within both the predicate language and its model theory, allowing for expressive and comprehensible program verification.

Type
Article
Copyright
2005 Cambridge University Press
Submit a response

Discussions

No Discussions have been published for this article.