摘要
不变量的检测是提高软件质量的一种有效方法。针对传统静态检测方法可能带来无效的不变量、缺失不变量等缺陷,文中提出一种以抽象解释理论为基础的非函数依赖不变量的静态检测方法。首先利用词法语法分析得到抽象语法树,然后将抽象语法树转化成抽象域图,接着对抽象域图进行抽象执行得到程序中可执行的路径,最后依据定义的非函数依赖不变量表现形式对可执行路径分析得到程序中潜在的非函数依赖不变量。同时通过一个C程序为例对该方法进行验证说明。
The discovery of invariants is an effective method for improving software quality.As the traditional static detecting may contain invalid invariant and absence of invariant defects,it proposes an Abstract interpretation based static detecting method for non-functional dependence invariant.Firstly get the Abstract syntax tree by lexical analysis and syntax analysis.Secondly use Abstract interpretation to obtain the executable path of program after the Abstract syntax tree has transfered to the Abstract domain map.Finally get potential invariants by analyzing the executable path of program referring to non-functional dependence invariant forms.At the same time validate this method with C program.
出处
《计算机技术与发展》
2012年第4期5-8,共4页
Computer Technology and Development
基金
国家自然科学基金(60674100)
南京航空航天大学青年科学创新基金(NS2010069)
关键词
不变量
静态检测
抽象解释
非函数依赖
invariant
static detecting
Abstract interpretation
non-functional dependence