Results 1 
2 of
2
Chasing bottoms: A case study in program verification in the presence of partial and infinite values
 In MPC 2004, volume 3125 of LNCS
, 2004
"... Abstract. This work is a case study in program verification: We have written a simple parser and a corresponding prettyprinter in a nonstrict functional programming language with lifted pairs and functions (Haskell). A natural aim is to prove that the programs are, in some sense, each other’s inver ..."
Abstract

Cited by 9 (2 self)
 Add to MetaCart
Abstract. This work is a case study in program verification: We have written a simple parser and a corresponding prettyprinter in a nonstrict functional programming language with lifted pairs and functions (Haskell). A natural aim is to prove that the programs are, in some sense, each other’s inverses. The presence of partial and infinite values in the domains makes this exercise interesting, and having lifted types adds an extra spice to the task. We have tackled the problem in different ways, and this is a report on the merits of those approaches. More specifically, we first describe a method for testing properties of programs in the presence of partial and infinite values. By testing before proving we avoid wasting time trying to prove statements that are not valid. Then we prove that the programs we have written are in fact (more or less) inverses using first fixpoint induction and then the approximation lemma. 1
Chasing Bottoms A Case Study in Program Verification in the Presence of Partial and Infinite Values
"... 1 Introduction Infinite values are commonly used in (nonstrict) functional programs, often to improve modularity [5]. Partial values are seldom used explicitly, but they are still present in all nontrivial Haskell programs because of nontermination, pattern match failures, calls to the error func ..."
Abstract
 Add to MetaCart
1 Introduction Infinite values are commonly used in (nonstrict) functional programs, often to improve modularity [5]. Partial values are seldom used explicitly, but they are still present in all nontrivial Haskell programs because of nontermination, pattern match failures, calls to the error function etc. Unfortunately, proofs about functional programs often ignore details related to partial and infinite values. This text is a case study where we explore how one can go about testing and proving properties even in the presence of partial and infinite values. We use random testing (Sect. 5) and two proof methods, fixpoint induction (Sect. 7) and the approximation lemma (Sect. 8), both described in Gibbons ' and Hutton's tutorial [4].