摘要
描述了利用基因表达式编程自动生成循环不变式的方法。该方法的基本思想是在每一次循环条件变化时记录下程序变量的值,产生相应的跟踪表,然后从跟踪表中获得程序变量之间的函数依赖关系,这种变量之间的依赖关系构成了循环不变式的主要部分。程序变量之间的函数依赖关系的获得是利用基因表达式编程对跟踪表中数据执行符号回归得到。利用VC++实现了基因表达式编程的函数挖掘,并通过一个实例说明了该方法的有效性。
This paper proposed an approach to automatically generate loop invariants. The approach is based on producing a trace table by recording the values of program variables each time the condition of a loop is evaluated. Functional dependencies between program variables, which are a vital part of loop invariant, can be extracted from the trace table. The extraction process is accomplished by using gene expression programming (GEP), which performs a symbolic regres- sion on the data of the trace table. The approach has been implemented in VC + +. The implementation has been used to automatically discover invariants from some programs.
出处
《计算机与数字工程》
2009年第7期7-10,共4页
Computer & Digital Engineering
基金
怀化学院资助科研项目(编号:HHUY2008-18)资助