arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1703.08694cs.PL
收藏

程序编辑的语义基础

Toward Semantic Foundations for Program Editors

Cyrus Omar, Ian Voysey, Michael 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. As such, each tool designer has largely been left to develop their own ad hoc heuristics. 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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑