Behavioral similarity matching using concrete source code templates in logic queries

Behavioral similarity matching using concrete source code templates in logic queries
复制标题

在逻辑查询中使用具体源代码模板进行行为相似度匹配

DOI:
10.1145/1244381.1244398
复制
发表时间:
2007
期刊:
ACM Trans. Archit. Code Optim.
影响因子:
--
通讯作者:
L. Duchien
L. Duchien
中科院分区:
--
文献类型:
--
作者:
Coen De Roover;T. D'Hondt;J. Brichau;Carlos Noguera;L. Duchien

文献摘要

被引文献

相似文献

程序查询语言和模式检测技术是程序分析和操作系统的重要组成部分。模型和模式允许通过专用于系统意图的表示来识别程序实现中感兴趣的部分(例如,用于检测行为缺陷的调用图,用于转换的抽象语法树,用于验证编程约定的具体源代码等)。这要求开发人员理解和管理所有不同的表示和技术,以便检测各种感兴趣的模式。为了减轻这种开销,我们提出了一种基于逻辑的语言,允许程序的实现使用具体的源代码模板进行查询。查询与结构和行为程序表示的组合相匹配,包括调用图、指向分析结果和抽象语法树。我们的方法的结果是,开发人员可以使用源代码摘录(嵌入在逻辑查询),作为原型样本的结构和行为,他们打算匹配的查询程序中检测模式。
Program query languages and pattern-detection techniques are an essential part of program analysis and manipulation systems. Queries and patterns permit the identification of the parts of interest in a program's implementation through a representation dedicated to the intent of the system (e.g. call-graphs to detect behavioral flaws, abstract syntax trees for transformations, concrete source code to verify programming conventions, etc). This requires that developers understand and manage all the different representations and techniques in order to detect various patterns of interest. To alleviate this overhead, we present a logic-based language that allows the program's implementation to be queried using concrete source code templates. The queries are matched against a combination of structural and behavioral program representations, including call-graphs, points-to analysis results and abstract syntax trees. The result of our approach is that developers can detect patterns in the queried program using source code excerpts (embedded in logic queries) which act as prototypical samples of the structure and behavior they intend to match.