Code modification requires developers to comprehend code, plan changes, articulate intent, and validate outcomes, making it cognitively demanding. While natural language (NL) code summaries offer a promising external representation of this process, existing approaches remain limited. Systems grounded in exploratory data analysis are restricted to narrow domains, while general-purpose systems enforce fixed NL representations and assume that developers can directly translate vague intent into precise textual edits. We present NaturalEdit, which treats NL code summaries as interactive representations tightly linked to source code. Grounded in the Cognitive Dimensions of Notations, NaturalEdit introduces three key features: (1) adaptive, multi-faceted code summaries with a flexible Abstraction Gradient; (2) interactive mapping mechanisms between summaries and code that ensure tight, structurally stable Closeness of Mapping; and (3) intent-driven bidirectional synchronization that reduces Viscosity during editing while preserving Visibility and Consistency through incremental diffs. A technical evaluation confirms the viability of NaturalEdit, and a user study with 20 developers shows that it improves comprehension, intent articulation, and validation while increasing developers' confidence and sense of control.


翻译:代码修改要求开发者理解代码、规划变更、表达意图并验证结果,这一过程对认知能力要求极高。尽管自然语言代码摘要为此过程提供了有前景的外部表示方法,但现有方法仍存在局限。基于探索性数据分析的系统局限于狭窄领域,而通用系统则强制使用固定自然语言表示,并假设开发者能够将模糊意图直接转化为精确文本编辑。我们提出NaturalEdit,将自然语言代码摘要视为与源代码紧密关联的交互式表示。基于符号认知维度理论,NaturalEdit引入三个关键特性:(1)具有灵活抽象梯度的自适应多层面代码摘要;(2)摘要与代码之间的交互映射机制,确保紧密、结构稳定的映射贴近性;(3)意图驱动的双向同步,通过增量差异减少编辑过程中的粘滞性,同时保持可见性和一致性。技术评估证实了NaturalEdit的可行性,针对20名开发者的用户研究表明,该方法能提升理解、意图表达和验证能力,同时增强开发者的信心和掌控感。

0
下载
关闭预览

相关内容

代码(Code)是专知网的一个重要知识资料文档板块,旨在整理收录论文源代码、复现代码,经典工程代码等,便于用户查阅下载使用。
自然语言处理中的文本表示研究
专知会员服务
58+阅读 · 2022年1月10日
【新书】自然语言处理表示学习技术,349页pdf,清华大学
专知会员服务
174+阅读 · 2020年7月11日
自然语言生成资源列表
专知
17+阅读 · 2020年1月4日
自然语言处理NLP之旅(NLP文章/代码集锦)
自然语言处理精品资料
人工智能前沿讲习班
14+阅读 · 2019年3月13日
学会原创 | 自然语言的语义表示学习方法与应用
中国人工智能学会
11+阅读 · 2019年3月7日
自然语言处理中的语言模型预训练方法
PaperWeekly
14+阅读 · 2018年10月21日
【干货】深入理解自编码器(附代码实现)
从语言学到深度学习NLP,一文概述自然语言处理
人工智能学家
13+阅读 · 2018年1月28日
TextInfoExp:自然语言处理相关实验(基于sougou数据集)
全球人工智能
12+阅读 · 2017年11月12日
Natural 自然语言处理(NLP)「全解析」
人工智能学家
15+阅读 · 2017年9月23日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
8+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
Arxiv
12+阅读 · 2023年5月22日
VIP会员
最新内容
边缘计算的军事应用
专知会员服务
2+阅读 · 8月9日
一种考虑资源机动性的武器目标分配混合算法
专知会员服务
5+阅读 · 8月8日
《多域冲突比较支持模型》60页
专知会员服务
11+阅读 · 8月7日
相关VIP内容
自然语言处理中的文本表示研究
专知会员服务
58+阅读 · 2022年1月10日
【新书】自然语言处理表示学习技术,349页pdf,清华大学
专知会员服务
174+阅读 · 2020年7月11日
相关资讯
自然语言生成资源列表
专知
17+阅读 · 2020年1月4日
自然语言处理NLP之旅(NLP文章/代码集锦)
自然语言处理精品资料
人工智能前沿讲习班
14+阅读 · 2019年3月13日
学会原创 | 自然语言的语义表示学习方法与应用
中国人工智能学会
11+阅读 · 2019年3月7日
自然语言处理中的语言模型预训练方法
PaperWeekly
14+阅读 · 2018年10月21日
【干货】深入理解自编码器(附代码实现)
从语言学到深度学习NLP,一文概述自然语言处理
人工智能学家
13+阅读 · 2018年1月28日
TextInfoExp:自然语言处理相关实验(基于sougou数据集)
全球人工智能
12+阅读 · 2017年11月12日
Natural 自然语言处理(NLP)「全解析」
人工智能学家
15+阅读 · 2017年9月23日
相关基金
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
8+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员