A Structure Editor with Type-Safe Copy/Paste

Hans Hüttel*, Anja Elisasen Lumholtz Nielsen, Nana Gjerulf Sandberg, Christoffer Lind Andersen, Peter Mikkelsen

*Corresponding author for this work

Research output: Contribution to book/anthology/report/conference proceedingArticle in proceedingResearchpeer-review

Abstract

The editor calculus of Godiksen et al [2] describes the edit primitives of a syntax-directed editor for functional programs in a simply typed lambda calculus. However, a main shortcoming is that only top-down programming is allowed, meaning that we can only construct the AST from the root. This makes it difficult to refactor previously written code without having to potentially delete and re-insert large parts of a program. The present paper modifies the calculus to not only handle programs with Hindley-Milner-style let polymorphism but also to incorporate a notion of copy/paste functionality. We present an extended semantics and a type system of the new system and prove that it remains sound: Well-typed editor expressions will always produce a well-typed program.

Original languageEnglish
Title of host publicationProceedings of the 2022 34th Symposium on Implementation and Application of Functional Languages, IFL 2022
PublisherAssociation for Computing Machinery
Publication date31 Aug 2022
Article number5
ISBN (Electronic)9781450398312
DOIs
Publication statusPublished - 31 Aug 2022
Event34th Symposium on Implementation and Application of Functional Languages, IFL 2022 - Copenhagen, Denmark
Duration: 31 Aug 20222 Sept 2022

Conference

Conference34th Symposium on Implementation and Application of Functional Languages, IFL 2022
Country/TerritoryDenmark
CityCopenhagen
Period31/08/202202/09/2022
SeriesACM International Conference Proceeding Series

Bibliographical note

Publisher Copyright:
© 2022 ACM.

Keywords

  • copy
  • lambda calculus
  • paste
  • polymorphism
  • Structure editors
  • type systems

Fingerprint

Dive into the research topics of 'A Structure Editor with Type-Safe Copy/Paste'. Together they form a unique fingerprint.

Cite this