Multi-Objective Higher Order Mutation Testing with Genetic Programming

W. B. Langdon
King's College, London

Introduction

Mutation Testing

Higher Order Mutation Testing

Multi-Objective Search

Example of Multi-Objective Search showing Evolution of Pareto Front

Evolution of mutltiobjective high order mutants with NSGA-2 and GP

Evolving High Order Mutants

xfig schematic of combining NSGA-2 and GP

Triangle.c

int gettri(int side1, int side2, int side3){ 
   int triang ; 
    if( side1 <= 0 || side2 <= 0 || side3 <= 0){
        return 4;
    }
    triang = 0;
    if(side1 == side2){
        triang = triang + 1;
    }
    if(side1 == side3){
        triang = triang + 2;
    }
    if(side2 == side3){
        triang = triang + 3;
    }
Potential mutation sites (comparisons) in red

Triangle BNF syntax


<line1>	::=	"int gettriXXX(int side1, int side2, int side3)\n"
<line2>	::=	"{\n"
<line3>	::=	"    \n"
<line4>	::=	"int triang ;\n"
<line5>	::=	"    \n"
<line6>	::=	<line6A> <line6B> <line6C>
<line6A>	::=	"if( side1" <compare> "0 || side2"
<line6B>	::=	<compare> "0 || side3"
<line6C>	::=	 <compare> "0){\n"
<line7>	::=	"return 4;\n"
<line8>	::=	"}\n"
<line9>	::=	"  \n"
<line10>	::=	"triang = 0;\n"
<line11>	::=	"\n"
<line12>	::=	"if(side1" <compare> "side2){\n"
<line13>	::=	"triang = triang + 1;\n"
<line14>	::=	"}\n"
<line15>	::=	"if(side1" <compare> "side3){\n"
<line16>	::=	"triang = triang + 2;\n"
<line17>	::=	"}\n"
<line18>	::=	"if(side2" <compare> "side3){\n"

Triangle BNF syntax 2

<start>	::=	<line1> <line2> <line3> <line4> <line5> <line6-23> <line24-41>
		 <line42> <line43> <line44> <line45> <line46> 
<line6-23>	::=	<line6-14> <line15-23> 
<line6-14>	::=	<line6-9> <line10-12> <line13> <line14> 
<line6-9>		::=	<line6> <line7> <line8> <line9> 
<line10-12>	::=	<line10> <line11> <line12> 
<line15-23>	::=	<line15-19> <line20-23> 
<line15-19>	::=	<line15-16> <line17-18> <line19> 
<line15-16>	::=	<line15> <line16> 

<compare>	::=	 <compare0> | <compare1>
<compare0>	::=	 <compare00> | <compare01>
<compare00>	::=	 "<" | "<="
<compare01>	::=	 "==" | "!="
<compare1>	::=	 <compare10>
<compare10>	::=	 ">=" | ">"

Yue's Triangle Test Cases

-3 4 5 4
3 4 5 1
3 -4 5 4
3 4 -5 4
-3 -4 -5 4
3 -4 -5 4
-3 4 -5 4
-3 -4 5 4
-3 5 4 4
3 -5 4 4
5 3 -4 4
5 -3 4 4
3 3 5 2
5 3 5 2
3 4 4 2
3 4 8 4
3 9 5 4
12 4 5 4
4 5 12 4
-4 12 5 4

High Order Triangle Mutants

Yue's trainle.c predicate mutants, 60 tests

High Order Triangle Mutants

Yue's triagle.c predicate mutants, 60 tests

Schedule

High Order Schedule Mutants

Schedule first to fourth and random highest order comparsion mutants, SIR tests

tcas - aircraft collision avoidance

Evolution of tcas Mutants

Evolution of mutltiobjective high order mutants with NSGA-2 and GP

Evolved tcas Mutants

Evolved 3rd order tcas Mutant

Future Work

Conclusions

More information on GP

free to download introduction to genetic programming


W.B.Langdon 11 September 2009 (updated 2 Aug 2012)