Abstract
Lazy evaluation is a powerful tool for functional programmers. It enables the concise expression of on-demand computation and a form of compositionality not available under other evaluation strategies. However, the stateful nature of lazy evaluation makes it hard to analyze a program's computational cost, either informally or formally. In this work, we present a novel and simple framework for formally reasoning about lazy computation costs based on a recent model of lazy evaluation: clairvoyant call-by-value. The key feature of our framework is its simplicity, as expressed by our definition of the clairvoyance monad. This monad is both simple to define (around 20 lines of Coq) and simple to reason about. We show that this monad can be effectively used to mechanically reason about the computational cost of lazy functional programs written in Coq.
| Original language | English |
|---|---|
| Article number | 80 |
| Number of pages | 28 |
| Journal | Proceedings of the ACM on Programming Languages |
| Volume | 5 |
| Issue number | ICFP |
| DOIs | |
| Publication status | Published - 1 Aug 2021 |
| Event | 26th ACM SIGPLAN International Conference on Functional Programming - Online Duration: 22 Aug 2021 → 27 Aug 2021 Conference number: 26 https://icfp21.sigplan.org/ |
Keywords / Materials (for Non-textual outputs)
- computation cost
- lazy evaluation
- formal verification
- monad
Fingerprint
Dive into the research topics of 'Reasoning about the Garden of Forking Paths'. Together they form a unique fingerprint.Cite this
- APA
- Author
- BIBTEX
- Harvard
- Standard
- RIS
- Vancouver