Blogs (1) >>
POPL 2019
Sun 13 - Sat 19 January 2019 Cascais, Portugal
Thu 17 Jan 2019 11:42 - 12:04 at Sala I - Gradual Types Chair(s): Nikhil Swamy

Live programming environments aim to provide programmers (and sometimes audiences) with continuous feedback about a program’s dynamic behavior as it is being edited. The problem is that programming languages typically assign dynamic meaning only to programs that are complete, i.e. syntactically well-formed and free of type errors. Consequently, live feedback presented to the programmer exhibits temporal or perceptive gaps.

This paper confronts this “gap problem” from type-theoretic first principles by developing a dynamic semantics for incomplete functional programs, starting from the static semantics of Omar et al. [2017a]. 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 to restart evaluation after edits that amount to hole filling. Formally, the semantics borrows machinery from both gradual type theory (which supplies the basis for handling unfilled type holes) and contextual modal type theory (which supplies a logical basis for hole closures), combining these and developing additional machinery necessary to continue evaluation past holes while maintaining type safety. We have mechanized the metatheory of the core calculus, called Hazelnut Live, using the Agda proof assistant.

We have also implemented these ideas into the Hazel programming environment. The implementation inserts holes automatically, following the Hazelnut edit action calculus of Omar et al. [2017a], to guarantee that every editor state has some (possibly incomplete) type. Taken together with this paper’s type safety property, the result is a proof-of-concept live programming environment where rich dynamic feedback is truly available without gaps, i.e. for every reachable editor state.

Slides (hazel-popl19.pdf)3.0MiB

Thu 17 Jan
Times are displayed in time zone: Greenwich Mean Time : Belfast change

10:36 - 12:04: Gradual TypesResearch Papers at Sala I
Chair(s): Nikhil SwamyMicrosoft Research
10:36 - 10:58
Type-Driven Gradual Security with ReferencesTOPLAS
Research Papers
Matías ToroUniversity of Chile, Ronald GarciaUniversity of British Columbia, Éric TanterUniversity of Chile & Inria Paris
DOI Media Attached File Attached
10:58 - 11:20
Gradual Type Theory
Research Papers
Max NewNortheastern University, Dan LicataWesleyan University, Amal AhmedNortheastern University, USA
Link to publication DOI Media Attached File Attached
11:20 - 11:42
Gradual Parametricity, RevisitedDistinguished Paper
Research Papers
Matías ToroUniversity of Chile, Elizabeth LabradaUniversity of Chile, Éric TanterUniversity of Chile & Inria Paris
Link to publication DOI Pre-print Media Attached File Attached
11:42 - 12:04
Live Functional Programming with Typed Holes
Research Papers
Cyrus OmarUniversity of Chicago, Ian VoyseyCarnegie Mellon University, Ravi ChughUniversity of Chicago, Matthew HammerNone
Link to publication DOI Pre-print Media Attached File Attached