Skip to main content
Cornell University
Learn about arXiv becoming an independent nonprofit.
We gratefully acknowledge support from the Simons Foundation, member institutions, and all contributors. Donate
arxiv logo > cs > arXiv:1607.04180

Help | Advanced Search

arXiv logo
Cornell University Logo

quick links

  • Login
  • Help Pages
  • About

Computer Science > Programming Languages

arXiv:1607.04180 (cs)
[Submitted on 14 Jul 2016 (v1), last revised 4 Feb 2019 (this version, v5)]

Title:Hazelnut: A Bidirectionally Typed Structure Editor Calculus

Authors:Cyrus Omar, Ian Voysey, Michael Hilton, Jonathan Aldrich, Matthew A. Hammer
View a PDF of the paper titled Hazelnut: A Bidirectionally Typed Structure Editor Calculus, by Cyrus Omar and 4 other authors
View PDF
Abstract: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. 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. Hazelnut goes one step beyond syntactic well-formedness: its edit actions operate over statically meaningful incomplete terms. Naively, this 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.
Subjects: Programming Languages (cs.PL)
Cite as: arXiv:1607.04180 [cs.PL]
  (or arXiv:1607.04180v5 [cs.PL] for this version)
  https://doi.org/10.48550/arXiv.1607.04180
arXiv-issued DOI via DataCite
Journal reference: Proceedings of the 44th ACM SIGPLAN Symposium on Principles of Programming Languages (POPL 2017)
Related DOI: https://doi.org/10.1145/3093333.3009900
DOI(s) linking to related resources

Submission history

From: Cyrus Omar [view email]
[v1] Thu, 14 Jul 2016 16:07:29 UTC (190 KB)
[v2] Wed, 3 Aug 2016 09:39:21 UTC (217 KB)
[v3] Thu, 13 Oct 2016 12:00:55 UTC (171 KB)
[v4] Wed, 7 Dec 2016 20:45:12 UTC (204 KB)
[v5] Mon, 4 Feb 2019 02:12:51 UTC (204 KB)
Full-text links:

Access Paper:

    View a PDF of the paper titled Hazelnut: A Bidirectionally Typed Structure Editor Calculus, by Cyrus Omar and 4 other authors
  • View PDF
  • TeX Source
view license
Current browse context:
cs.PL
< prev   |   next >
new | recent | 2016-07
Change to browse by:
cs

References & Citations

  • NASA ADS
  • Google Scholar
  • Semantic Scholar

DBLP - CS Bibliography

listing | bibtex
Cyrus Omar
Ian Voysey
Michael Hilton
Jonathan Aldrich
Matthew A. Hammer
export BibTeX citation Loading...

BibTeX formatted citation

×
Data provided by:

Bookmark

BibSonomy logo Reddit logo

Bibliographic and Citation Tools

Bibliographic Explorer (What is the Explorer?)
Connected Papers (What is Connected Papers?)
Litmaps (What is Litmaps?)
scite Smart Citations (What are Smart Citations?)

Code, Data and Media Associated with this Article

alphaXiv (What is alphaXiv?)
CatalyzeX Code Finder for Papers (What is CatalyzeX?)
DagsHub (What is DagsHub?)
Gotit.pub (What is GotitPub?)
Hugging Face (What is Huggingface?)
Papers with Code (What is Papers with Code?)
ScienceCast (What is ScienceCast?)

Demos

Replicate (What is Replicate?)
Hugging Face Spaces (What is Spaces?)
TXYZ.AI (What is TXYZ.AI?)

Recommenders and Search Tools

Influence Flower (What are Influence Flowers?)
CORE Recommender (What is CORE?)
  • Author
  • Venue
  • Institution
  • Topic

arXivLabs: experimental projects with community collaborators

arXivLabs is a framework that allows collaborators to develop and share new arXiv features directly on our website.

Both individuals and organizations that work with arXivLabs have embraced and accepted our values of openness, community, excellence, and user data privacy. arXiv is committed to these values and only works with partners that adhere to them.

Have an idea for a project that will add value for arXiv's community? Learn more about arXivLabs.

Which authors of this paper are endorsers? | Disable MathJax (What is MathJax?)
  • About
  • Help
  • contact arXivClick here to contact arXiv Contact
  • subscribe to arXiv mailingsClick here to subscribe Subscribe
  • Copyright
  • Privacy Policy
  • Web Accessibility Assistance
  • arXiv Operational Status