上下文感知解析树
Context-Aware Parse Trees
摘要:
Aroma是一种最先进的代码推荐系统,它提出的简化解析树(SPT)是一种树结构表示,用于通过捕获程序\emph{structure}而不是程序\emph{syntax}来推断代码语义。这与主要由程序设计语言语法驱动的经典抽象语法树不同。虽然我们相信语义驱动的表示是可取的,一个SPT的建设的细节可以影响其性能。我们分析了这些细微差别,并提出了一个新的树结构,严重影响芳香的SPT,称为\emph{context-aware parse tree}(CAPT)。CAPT通过提供更丰富层次的语义表示来增强SPT。具体地说,CAPT为特定于语言的技术提供了额外的绑定支持,用于添加语义突出的功能,并为语言无关的技术提供了额外的绑定支持,用于删除语法上存在但语义上不相关的功能。我们的研究定量地证明了我们提出的语义显著特征的价值,使特定的CAPT配置在我们分析的48,610个程序中比SPT准确39%。
英文摘要:
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.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。