为了有效解决程序修复进化中搜索空间过大和正常功能牺牲的问题,提出了一种基于不变量约束的扩展的程序修复进化模型(extended repair evolutionary model,EREM),利用程序不变量约束对搜索空间进行划分和约简以降低消耗,通过使用表达程序正常功能的正测试用例学习的不变量约束(称为正不变量约束)来保证程序不牺牲正常的功能,在适应度函数的设计上考虑测试用例通过数的同时也考虑了正不变量约束的保持数,对于破坏正不变量约束的个体适应度给予一定的惩罚值。最后通过实验对模型进行了验证,结果表明了模型的可行性和有效性。
To effectively solve the search space explosion problem and the normal function sacrifice problem,this paper presented an invariants based program repair evolutionary extended model called EREM. EREM reduced consumption using the invariant constraints to divide and reduce the search space,and maintained the mainly functions according to the invariant constraints learned from normal program execution. And considered the number of the maintained invariants and the number of the violated invariants in the design of the fitness function. Illustrated the model and the work process. Experimental results show the feasibility and effectiveness of this extended model.