Stepping Lazy Programs
Stephen Chang, John Clements, Eli Barzilay, Matthias, Felleisen

TL;DR
This paper introduces an algebraic program stepper for lazy functional programs, providing a mathematically clear visualization of evaluation that aids understanding, especially for novices, by representing lazy evaluation as parallel rewriting.
Contribution
The paper presents a novel algebraic stepper tool that visualizes lazy evaluation as a mathematical rewriting sequence, bridging existing debugging approaches and enhancing comprehension.
Findings
The algebraic stepper accurately reconstructs standard lazy evaluation sequences.
Lazy semantics as parallel rewriting offers a new perspective on lazy evaluation.
The tool is particularly useful for novice programmers learning lazy evaluation.
Abstract
Debugging lazy functional programs poses serious challenges. In support of the "stop, examine, and resume" debugging style of imperative languages, some debugging tools abandon lazy evaluation. Other debuggers preserve laziness but present it in a way that may confuse programmers because the focus of evaluation jumps around in a seemingly random manner. In this paper, we introduce a supplemental tool, the algebraic program stepper. An algebraic stepper shows computation as a mathematical calculation. Algebraic stepping could be particularly useful for novice programmers or programmers new to lazy programming. Mathematically speaking, an algebraic stepper renders computation as the standard rewriting sequence of a lazy lambda-calculus. Our novel lazy semantics introduces lazy evaluation as a form of parallel program rewriting. It represents a compromise between Launchbury's store-based…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsLogic, programming, and type systems · Formal Methods in Verification · Model-Driven Software Engineering Techniques
