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.
Faculdade de Engenharia, Universidade do Porto(波尔图大学工程学院);LASIGE, Faculdade de Ciências, Universidade de Lisboa(里斯本大学理学院LASIGE);Toronto Metropolitan University(多伦多都会大学)
Search-Based Generation of Undetected Quantum Circuit Mutants
Simula Research Laboratory(Simula研究实验室);Oslo Metropolitan University(奥斯陆城市大学);Trinity College Dublin, School of Computer Science and Statistics(都柏林三一学院计算机科学与统计学院);National Institute of Informatics(信息学研究所)
Minimum Complete MR Subsets under Semantic-Mutation Fault Models: A Support-Set Domination Boundary
School of Computing, University of South China(南华大学计算机学院);Hunan Engineering Research Center of Software Evaluation and Testing for Intellectual Equipment(智能装备软件评测与测试湖南省工程研究中心);CNNC Key Laboratory on High Trusted Computing(中核集团高可信计算重点实验室)