摘要
提出了一种基于程序分析的代码查询技术,它能有效地应用于代码审查、程序自动插桩等常用的软件工程的研究场景。它通过代码静态分析获得程序元素信息,并将其保存为中间结构,作为代码查询过程的目标集合;查询过程以程序元素为目标,查询语言以谓词逻辑表达式的形式描述查询条件。基于此技术,实现了一个面向C/C++语言的代码查询工具。
A new code query technology based on program analysis was presented.It gives aid in several scenarios of software engineering and research,such as code review,program automated instrumentation and so on.By means of static analysis,program elements is gathered by an extractor,which is responsible for mapping sources to an intermediate structure used in process of query.Query language proposed in this paper depicts query condition in the formalism of predicate logic expression.On the basis of this technology,a tool for querying code in C/C++ language was implemented as an Eclipse plug-in.
出处
《计算机科学》
CSCD
北大核心
2012年第2期143-147,共5页
Computer Science
基金
核高基项目(2009ZX01036-001-001)资助
关键词
代码查询技术
查询语言
静态分析
Code query technology
Query language
Static analysis