Toward Semantic Foundations for Program Editors

Toward Semantic Foundations for Program Editors
复制标题

为程序编辑奠定语义基础

DOI:
--
复制
发表时间:
2017
期刊:
Summit on Advances in Programming Languages
影响因子:
--
通讯作者:
Matthew A. Hammer
Matthew A. Hammer
中科院分区:
--
文献类型:
--
作者:
Cyrus Omar;Ian Voysey;Michael C Hilton;Joshua Sunshine;Claire Le Goues;Jonathan Aldrich;Matthew A. Hammer

文献摘要

被引文献

相似文献

编程语言定义为完整的程序赋予正式含义。然而,程序员花费大量时间与不完整的程序(有漏洞、类型不一致和绑定不一致的程序)进行交互,使用程序编辑器和实时编程环境(其中交叉编辑和评估)等工具。语义学家在正式表征(1)不完整程序的静态和动态语义方面所做的工作相对较少; (2) 程序员在编辑和检查不完整的程序时可以采取的行动; (3) 编辑器服务的行为,根据从正在编辑的不完整程序以及系统过去遇到的程序中提取的语义信息,向程序员建议可能的编辑操作。 本文作为一个研究项目的愿景陈述,旨在开发这些“缺失的”语义基础。我们希望,这些贡献将采用一系列简单的形式演算的形式,配备易于处理的元理论,将指导各种当前和未来的交互式编程工具的设计,就像各种 lambda 演算指导现代语言设计一样。我们自己的研究将在 Hazel 的设计中应用这些原则,Hazel 是一个专为数据科学任务设计的实验性实时实验室笔记本编程环境。我们计划与编辑器共同设计 Hazel 语言,以便我们可以探索诸如编辑时语义冲突解决机制和允许库提供商安装特定于库的编辑器服务的机制等概念。
Programming language definitions assign formal meaning to complete programs. Programmers, however, spend a substantial amount of time interacting with incomplete programs - programs with holes, type inconsistencies and binding inconsistencies - using tools like program editors and live programming environments (which interleave editing and evaluation). Semanticists have done comparatively little to formally characterize (1) the static and dynamic semantics of incomplete programs; (2) the actions available to programmers as they edit and inspect incomplete programs; and (3) the behavior of editor services that suggest likely edit actions to the programmer based on semantic information extracted from the incomplete program being edited, and from programs that the system has encountered in the past. This paper serves as a vision statement for a research program that seeks to develop these "missing" semantic foundations. Our hope is that these contributions, which will take the form of a series of simple formal calculi equipped with a tractable metatheory, will guide the design of a variety of current and future interactive programming tools, much as various lambda calculi have guided modern language designs. Our own research will apply these principles in the design of Hazel, an experimental live lab notebook programming environment designed for data science tasks. We plan to co-design the Hazel language with the editor so that we can explore concepts such as edit-time semantic conflict resolution mechanisms and mechanisms that allow library providers to install library-specific editor services.