论文标题
上下文感知的解析树
Context-Aware Parse Trees
论文作者
论文摘要
在Aroma中提出的简化解析树(SPT)是一种最先进的代码建议系统,是一种树结构的表示,用于通过捕获程序\ Emph {struction}而不是程序\ Emph {syntax}来推断代码语义。这与经典的抽象语法树不同,该树主要由编程语言语法驱动。尽管我们认为需要语义驱动的表示,但SPT构造的细节会影响其性能。 We analyze these nuances and present a new tree structure, heavily influenced by Aroma's SPT, called a \emph{context-aware parse tree} (CAPT).上尉通过提供更丰富的语义表示来增强SPT。具体而言,上尉为语言特定技术提供了额外的绑定支持,以添加语义含量的功能,以及用于删除语法上存在但语义上的irretrelevant功能的语言敏捷技术。我们的研究定量地证明了我们提出的语义含量特征的价值,使我们在分析的48,610个程序中,特定的上尉配置比SPT更准确。
The simplified parse tree (SPT) presented in Aroma, a state-of-the-art code recommendation system, is a tree-structured representation used to infer code semantics by capturing program \emph{structure} rather than program \emph{syntax}. This is a departure from the classical abstract syntax tree, which is principally driven by programming language syntax. While we believe a semantics-driven representation is desirable, the specifics of an SPT's construction can impact its performance. We analyze these nuances and present a new tree structure, heavily influenced by Aroma's SPT, called a \emph{context-aware parse tree} (CAPT). CAPT enhances SPT by providing a richer level of semantic representation. Specifically, CAPT provides additional binding support for language-specific techniques for adding semantically-salient features, and language-agnostic techniques for removing syntactically-present but semantically-irrelevant features. Our research quantitatively demonstrates the value of our proposed semantically-salient features, enabling a specific CAPT configuration to be 39\% more accurate than SPT across the 48,610 programs we analyzed.