## Reasoning About Effects: Seeing the Wood Through the Trees (Extended Version)

### Cached

### Download Links

Citations: | 8 - 0 self |

### BibTeX

@MISC{Hutton_reasoningabout,

author = {Graham Hutton and Diana Fulger},

title = {Reasoning About Effects: Seeing the Wood Through the Trees (Extended Version)},

year = {}

}

### OpenURL

### Abstract

Pure functional languages such as Haskell support programming with impure effects by exploiting mathematical notions such as monads, applicative functors, and arrows. However, in contrast to the wealth of research on the use of these notions to write effectful programs, there has been comparatively little progress on reasoning about the resulting programs. In this article we focus on this problem, using a simple but instructive example concerned with relabelling binary trees. 1

### Citations

1347 | Imperative functional programming
- Jones, Wadler
- 1993
(Show Context)
Citation Context ...ds [Mog89], applicative functors [MP08] and arrows [Hug00] are now well established as mechanisms for pure programming with impure effects such as exceptions, non-determinism, state, and input/output =-=[Wad92a]-=-. In particular, these notions provide uniform interfaces for programming with effects, allowing programmers to focus on the essential high-level concepts, rather than the low-level implementation det... |

455 | Computational lambda-calculus and monads
- Moggi
- 1989
(Show Context)
Citation Context ...the resulting programs. In this article we focus on this problem, using a simple but instructive example concerned with relabelling binary trees. 25.1 INTRODUCTION Mathematical notions such as monads =-=[7]-=-, applicative functors [5] and arrows [3] are now well established as mechanisms for pure programming with impure effects such as exceptions, non-determinism, state, and input/output [11]. In particul... |

307 | Functional programming with bananas, lenses, envelopes, and barbed wire
- Meijer, Fokkinga, et al.
- 1991
(Show Context)
Citation Context ...oc (x,(y,z)) = ((x,y),z) unassoc :: ((a,b),c) → (a,(b,c)) unassoc ((x,y),z) = (x,(y,z)) These functions satisfy a number of familiar equational properties arising from the categorical nature of pairs =-=[MFP91]-=-, which will be used freely throughout the rest of this article. For example, for all functions of the appropriate types, the product (×) and split 〈−,−〉 operators satisfy the following fusion propert... |

225 |
Introduction to Functional Programming using Haskell
- Bird
- 1998
(Show Context)
Citation Context ...ful case study for other approaches to reasoning about effectful programs. The article is aimed at a reader who is familiar with the basics of reasoning about functional programs, say to the level of =-=[Bir98]-=-, but no specialist knowledge about effectful programming and reasoning is assumed. 2 RELABELLING A TREE In this section we introduce the example that will form the central focus of this article. Let ... |

176 | Generalising Monads to Arrows
- Hughes
- 2000
(Show Context)
Citation Context ...cus on this problem, using a simple but instructive example concerned with relabelling binary trees. 1 INTRODUCTION Mathematical notions such as monads [Mog89], applicative functors [MP08] and arrows =-=[Hug00]-=- are now well established as mechanisms for pure programming with impure effects such as exceptions, non-determinism, state, and input/output [Wad92a]. In particular, these notions provide uniform int... |

77 | Applicative programming with effects
- McBride, Paterson
(Show Context)
Citation Context ...this article we focus on this problem, using a simple but instructive example concerned with relabelling binary trees. 1 INTRODUCTION Mathematical notions such as monads [Mog89], applicative functors =-=[MP08]-=- and arrows [Hug00] are now well established as mechanisms for pure programming with impure effects such as exceptions, non-determinism, state, and input/output [Wad92a]. In particular, these notions ... |

50 | Merging monads and folds for functional programming
- Meijer, Jeuring
- 1995
(Show Context)
Citation Context ...rsion, and it would be interesting to see if there is any benefit to be gained from using a more structured approach to recursion, such as that provided by applicative traversals [5] or monadic folds =-=[6]-=-. Secondly, we would like to propose the relabelling problems as a simple but instructive case study for other approaches to reasoning about effects, such as rigid induction [1] and Hoare type theory ... |

47 | Elementary Strong Functional Programming
- Turner
- 1995
(Show Context)
Citation Context ...s from is equivalent to rmdups ◦from = from, which can then be verified by guarded coinduction, a special case of coinduction for infinite lists that avoids the explicit construction of bisimulations =-=[Tur95]-=-: rmdups (from n) = { applying from } rmdups (n : from (n + 1)) = { applying rmdups } n : rmdups (filter (�= n)(from (n + 1))) = { property of from (lemma 9) } n : rmdups (from (n + 1)) = { coinductio... |

46 | Programming in Haskell - Hutton - 2007 |

23 |
Hoare type theory, polymorphism and separation
- NANEVSKI, MORRISETT, et al.
- 2008
(Show Context)
Citation Context ...econdly, we would like to propose the relabelling problems as a simple but instructive case study for other approaches to reasoning about effects, such as rigid induction [FS07] and Hoare type theory =-=[NMB]-=-. And finally, it is important to consider how our approach can be adapted both to other effects, and to more substantial programming examples. In this direction, we have proved in a similar manner an... |

7 |
Fission for program comprehension
- Gibbons
- 2006
(Show Context)
Citation Context ...fused together to give a direct proof without the use of separate lemmas, but we find the separation of the proof into two parts in this manner to be more instructive. By analogy with program fission =-=[Gib06]-=-, the dual to program fusion, factorising a proof into component parts in this manner might be termed proof fission. Lemma 6 (factorising label) For all finite trees t: where (id × from) ◦ label t = (... |

4 | Inductive reasoning about effectful data types
- Filinski, Støvring
- 2007
(Show Context)
Citation Context ...8] or monadic folds [MJ95]. Secondly, we would like to propose the relabelling problems as a simple but instructive case study for other approaches to reasoning about effects, such as rigid induction =-=[FS07]-=- and Hoare type theory [NMB]. And finally, it is important to consider how our approach can be adapted both to other effects, and to more substantial programming examples. In this direction, we have p... |

1 |
Merging Monads and Folds for Functional
- Meijer, Jeuring
(Show Context)
Citation Context ...on, and it would be interesting to see if there is any benefit to be gained from using a more structured approach to recursion, such as that provided by applicative traversals [MP08] or monadic folds =-=[MJ95]-=-. Secondly, we would like to propose the relabelling problems as a simple but instructive case study for other approaches to reasoning about effects, such as rigid induction [FS07] and Hoare type theo... |