arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 1803.09571cs.SE
收藏

使用等价突变体的Source Code优化

Source Code Optimization using Equivalent Mutants

Jorge López, Natalia Kushik, Nina Yevtushenko

摘要:

一个变种是通过语法修改程序的源代码获得的程序;一个等价变种是一个变种,它在功能上等价于原始程序。突变体主要用于\emph{mutation testing},在推导试验套件时,获得等效突变体被认为是高度阴性的,尽管这些等效突变体可用于其他目的。我们提出了一种方法,认为等价突变体的价值,并利用它们的源代码优化。源代码优化增强程序的源代码,保持其行为。我们展示了一个程序,以实现源代码优化的基础上等价的突变体,并讨论适当的变异算子。Java和C程序的实验评估证明了所提出的方法的适用性。提出了一种基于等价突变体的源代码优化算法。它表明,只要适用,该方法可以优于传统的编译器优化。

英文摘要:

A mutant is a program obtained by syntactically modifying a program's source code; an equivalent mutant is a mutant, which is functionally equivalent to the original program. Mutants are primarily used in \emph{mutation testing}, and when deriving a test suite, obtaining an equivalent mutant is considered to be highly negative, although these equivalent mutants could be used for other purposes. We present an approach that considers equivalent mutants valuable, and utilizes them for source code optimization. Source code optimization enhances a program's source code preserving its behavior. We showcase a procedure to achieve source code optimization based on equivalent mutants and discuss proper mutation operators. Experimental evaluation with Java and C programs demonstrates the applicability of the proposed approach. An algorithmic approach for source code optimization using equivalent mutants is proposed. It is showcased that whenever applicable, the approach can outperform traditional compiler optimizations.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑