Reference. Filling typed holes with live GUIs

Cite

Cite as @omar-2021-filling (helia, typst) · \cite{omar-2021-filling} (LaTeX)
BibTeX
bibtex · 1 line
@inproceedings{omar-2021-filling, series={PLDI ’21}, title={Filling typed holes with live GUIs}, url={http://dx.doi.org/10.1145/3453483.3454059}, DOI={10.1145/3453483.3454059}, booktitle={Proceedings of the 42nd ACM SIGPLAN International Conference on Programming Language Design and Implementation}, publisher={ACM}, author={Omar, Cyrus and Moon, David and Blinn, Andrew and Voysey, Ian and Collins, Nick and Chugh, Ravi}, year={2021}, month=June, pages={511–525}, collection={PLDI ’21} }
hayagriva YAML (typst)
yaml · 18 lines
omar-2021-filling:
  type: article
  title: Filling typed holes with live GUIs
  author:
  - Omar, Cyrus
  - Moon, David
  - Blinn, Andrew
  - Voysey, Ian
  - Collins, Nick
  - Chugh, Ravi
  date: 2021-06
  page-range: 511-525
  serial-number:
    doi: 10.1145/3453483.3454059
  parent:
    type: proceedings
    title: Proceedings of the 42nd ACM SIGPLAN International Conference on Programming Language Design and Implementation
    publisher: ACM
Cites 45 works (4 here)
With notes (4)

Live functional programming with typed holes omar-2019-live

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 for incomplete functional programs 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 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, 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.
PDF · DOI · arXiv · pldb

Reasonably programmable literal notation omar-2018-reasonably

General-purpose programming languages typically define literal notation for only a small number of common data structures, like lists. This is unsatisfying because there are many other data structures for which literal notation might be useful, e.g. finite maps, regular expressions, HTML elements, SQL queries, syntax trees for various languages and chemical structures. There may also be different implementations of each of these data structures behind a common interface that could all benefit from common literal notation. This paper introduces typed literal macros (TLMs) , which allow library providers to define new literal notation of nearly arbitrary design at any specified type or parameterized family of types. Compared to existing approaches, TLMs are uniquely reasonable . TLM clients can reason abstractly, i.e. without examining grammars or generated expansions, about types and binding. The system only needs to convey to clients, via secondary notation, the inferred segmentation of each literal body, which gives the locations and types of spliced subterms. TLM providers can reason modularly about syntactic ambiguity and expansion correctness according to clear criteria. This paper incorporates TLMs into Reason, an emerging alternative front-end for OCaml, and demonstrates, through several non-trivial case studies, how TLMs integrate with the advanced features of OCaml, including pattern matching and the module system. We also discuss optional integration with MetaOCaml, which allows TLM providers to be more confident about type correctness. Finally, we establish these abstract reasoning principles formally with a detailed type-theoretic account of expression and pattern TLMs for “core ML”.
PDF · DOI · pldb

Hazelnut: a bidirectionally typed structure editor calculus omar-2017-hazelnut

PDF · DOI · arXiv · pldb

Safely Composable Type-Specific Languages omar-2014-safely

DOI · pldb
External (41)
omar-2021-filling reference entries/refs/omar-2021-filling/omar-2021-filling.hel