In programming, better tools often yield better results. For that, modern programming environments offer mechanisms to allow for their extensibility. The closer those tools are to the code, the easier it is for programmers to map the information provided by a tool to the code this information is about. However, existing extension mechanisms do not facilitate the close integration of tools with textual source code. Tools must be able to track program structures across edits to appear at the right positions but the parsing step of text complicates tracking structures. We propose hybrid structured editing, an approach that supports tool builders by providing structural guarantees while providing tool users with a familiar and consistent text editing interface. Hybrid structured editing allows tool builders to declare constraints on the structure that a program must conform to and ensures their observance. We present an implementation and several case studies of tools based on hybrid structured editing to demonstrate its effectiveness. Hybrid structured editing supports the safe extension of programming environments with tools that work on a structured representation of code and provide a consistent and reliable user experience.


翻译:在编程中,更好的工具往往能带来更好的成果。为此,现代编程环境提供了允许其扩展的机制。工具与代码的距离越近,程序员就越容易将工具提供的信息映射到该信息所对应的代码上。然而,现有的扩展机制并未促进工具与文本源代码的紧密集成。工具必须能够追踪程序结构在编辑过程中的变化,以出现在正确的位置,但文本的解析步骤使得结构追踪变得复杂。我们提出混合结构化编辑,这是一种为工具构建者提供结构保证,同时为工具用户提供熟悉且一致的文本编辑界面的方法。混合结构化编辑允许工具构建者声明程序必须遵守的结构约束,并确保这些约束得到遵守。我们展示了一个实现以及基于混合结构化编辑的多个工具案例研究,以证明其有效性。混合结构化编辑支持以安全的方式扩展编程环境,使工具能够基于代码的结构化表示工作,并提供一致且可靠的用户体验。

0
下载
关闭预览

相关内容

《软件定义网络元素与机器代码的形式化验证》
专知会员服务
14+阅读 · 2025年11月18日
【干货书】流畅的Python清晰、简洁和有效的编程,1011页pdf
【2020新书】如何认真写好的代码和软件,318页pdf
专知会员服务
66+阅读 · 2020年3月26日
【书籍推荐】简洁的Python编程(Clean Python),附274页pdf
专知会员服务
184+阅读 · 2020年1月1日
一个牛逼的 Python 调试工具
机器学习算法与Python学习
15+阅读 · 2019年4月30日
百闻不如一码!手把手教你用Python搭一个Transformer
大数据文摘
18+阅读 · 2019年4月22日
可能是 Android 上最好用的写作 App
少数派
11+阅读 · 2018年12月21日
国家自然科学基金
0+阅读 · 2017年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
5+阅读 · 2014年12月31日
国家自然科学基金
8+阅读 · 2014年12月31日
Arxiv
0+阅读 · 3月16日
VIP会员
最新内容
面向国防作战的最佳自主与蜂群无人机技术
专知会员服务
3+阅读 · 今天8:04
《异构人类团队的协作决策过程混合建模研究》
专知会员服务
3+阅读 · 今天7:59
博士论文 | 面向大模型推理的内存高效算法
专知会员服务
3+阅读 · 7月27日
美空军新型反无人机部队初探
专知会员服务
7+阅读 · 7月27日
《防空交战流程的概率建模研究》
专知会员服务
10+阅读 · 7月27日
ICML 2026 教程 | 数值优化理论还重要吗?
专知会员服务
6+阅读 · 7月26日
ICM 2026 | 陶哲轩:人工智能时代的数学
专知会员服务
9+阅读 · 7月26日
相关基金
国家自然科学基金
0+阅读 · 2017年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
5+阅读 · 2014年12月31日
国家自然科学基金
8+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员