POPL 2017
Sun 15 - Sat 21 January 2017
Wed 18 Jan 2017 11:20 - 11:45 at Auditorium - Type Systems 1 Chair(s): Avik Chaudhuri

Structure editors allow programmers to edit the tree structure of a program directly. This can have cognitive benefits, particularly for novice and end-user programmers (as evidenced by the popularity of structure editors like Scratch.) It also simplifies matters for tool designers, because they do not need to contend with malformed program text.

This paper defines Hazelnut, a structure editor based on a small bidirectionally typed lambda calculus extended with holes and a cursor (ala Huet’s zipper.) Hazelnut goes one step beyond syntactic well-formedness: it’s edit actions operate over statically meaningful (i.e. well-typed) terms. Naïvely, this prohibition on ill-typed edit states would force the programmer to construct terms in a rigid “outside-in” manner. To avoid this problem, the action semantics automatically places terms assigned a type that is inconsistent with the expected type inside a hole. This safely defers the type consistency check until the term inside the hole is finished.

Hazelnut is a foundational type-theoretic account of typed structure editing, rather than an end-user tool itself. To that end, we describe how Hazelnut’s rich metatheory, which we have mechanized in Agda, guides the definition of an extension to the calculus. We also discuss various plausible evaluation strategies for terms with holes, and in so doing reveal connections with gradual typing and contextual modal type theory (the Curry-Howard interpretation of contextual modal logic.) Finally, we discuss how Hazelnut’s semantics lends itself to implementation as a functional reactive program. Our reference implementation is written using js_of_ocaml .

Wed 18 Jan (GMT+02:00) Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna change

10:30 - 12:10: POPL - Type Systems 1 at Auditorium
Chair(s): Avik ChaudhuriFacebook
POPL-2017-papers10:30 - 10:55
Stephen Dolan, Alan MycroftUniversity of Cambridge
POPL-2017-papers10:55 - 11:20
Radu GrigoreUniversity of Kent
POPL-2017-papers11:20 - 11:45
Cyrus OmarCarnegie Mellon University, Ian VoyseyCarnegie Mellon University, Michael HiltonOregon State University, USA, Jonathan AldrichCarnegie Mellon University, Matthew HammerUniversity of Colorado, Boulder
POPL-2017-papers11:45 - 12:10
Karl CraryCarnegie Mellon University