TL;DR
This paper introduces Hazelnut Live, a dynamic semantics for incomplete functional programs with holes, enabling live feedback and seamless editing without evaluation restarts, combining gradual and modal type theories.
Contribution
It develops a formal semantics for incomplete programs with holes, enabling live programming with type safety and continuous evaluation, implemented in the Hazel environment.
Findings
Mechanized the core calculus in Agda.
Implemented live programming environment with automatic hole insertion.
Ensured type safety in incomplete program states.
Abstract
This paper develops a dynamic semantics for incomplete functional programs, starting from the static semantics developed in recent work on Hazelnut. We model incomplete functional programs as expressions with holes, with empty holes standing for missing expressions or types, and non-empty holes operating as membranes around static and dynamic type inconsistencies. Rather than aborting when evaluation encounters any of these holes as in some existing systems, evaluation proceeds around holes, tracking the closure around each hole instance as it flows through the remainder of the program. Editor services can use the information in these hole closures to help the programmer develop and confirm their mental model of the behavior of the complete portions of the program as they decide how to fill the remaining holes. Hole closures also enable a fill-and-resume operation that avoids the need…
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.
Code & Models
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
