Faster Mutation Analysis via Equivalence Modulo States
Bo Wang, Yingfei Xiong, Yangqingwei Shi, Lu Zhang, Dan Hao Peking University July 12, 2017
Equivalence Modulo States Bo Wang, Yingfei Xiong , Yangqingwei Shi, - - PowerPoint PPT Presentation
Faster Mutation Analysis via Equivalence Modulo States Bo Wang, Yingfei Xiong , Yangqingwei Shi, Lu Zhang, Dan Hao Peking University July 12, 2017 Mutation Analysis Mutation analysis is a fundamental software analysis technique Mutation
Bo Wang, Yingfei Xiong, Yangqingwei Shi, Lu Zhang, Dan Hao Peking University July 12, 2017
Program Mutants Mutants Mutants Mutants Mutants Test Results Compile & Test Mutate
lines of code
Program Mutants Mutants Mutants Mutants Mutants Test Results Compile & Test Mutate
equivalent
p(): 1: a=x(); 2: a=a/2; 3: y(a); p(): 1: a=x(); 2: a=a-2; 3: y(a); p(): 1: a=x(); 2: a=a+2; 3: y(a); p(): 1: a=x(); 2: a=a*2; 3: y(a); test: p(); assert(β¦);
πΆππππ π§1 πππ‘π£ππ’1 Mutate Compile Execute πΆππππ π§2 πππ‘π£ππ’2 πΆππππ π§3 πππ‘π£ππ’3
mutants, but they are compile three times
p(): 1: a=x(); 2: a=a-2; 3: y(a); x(): β¦ y(): β¦ p(): 1: a=x(); 2: a=a+2; 3: y(a); x(): β¦ y(): β¦ p(): 1: a=x(); 2: a=a*2; 3: y(a); x(): β¦ y(): β¦
parameters
p(): 1: a=x(); 2: a=a-2; 3: y(a); p(): 1: a=x(); 2: a=a+2; 3: y(a); p(): 1: a=x(); 2: a=a*2; 3: y(a); p(): 1: a=x(); 2: if(mut==1) a=a-2 else if (mut==2) a=a+2 else a=a*2; 3: y(a);
statement are redundant
1: a=x(); 2: a=a-2; 3: y(a); 1: a=x(); 2: a=a+2; 3: y(a); 1: a=x(); 2: a=a*2; 3: y(a); 1 2 3 1 2 3 1 2 3
a=x(); a=x(); a=x(); a=a-2 a=a+2 a=a*2 y(a); y(a); y(a); [King, Offutt, 1991][Tokumoto et al., 2016][Gopinath, Jensen, Groce, 2016]
encountered
1: a=x(); 2: a=a-2; 3: y(a); 1: a=x(); 2: a=a+2; 3: y(a); 1: a=x(); 2: a=a*2; 3: y(a); 1 2 3 1 2 3 1 2 3
a=x(); a=a-2 a=a+2 a=a*2 y(a); y(a); y(a); fork() fork()
1: a=x(); 2: a=a-2; 3: y(a); 1: a=x(); 2: a=a+2; 3: y(a); 1: a=x(); 2: a=a*2; 3: y(a); 1 2 3 1 2 3 1 2 3
a=a-2 a=a+2 a=a*2 a==2 a==2 a==2 a==0 a==4 a==4
if executing them leads to the same state from the current state
classes modulo the current state
1 2 3 1 2 3
a=a-2 a=a+2 a=a*2 m1,m2,m3 m2,m3 m1 m2,m3 m1 m2,m3 m1 Process 1 Process 2
between statements?
1 2 3 1 2 3
a=a-2 a=a+2 a=a*2 m1,m2,m3 m2,m3 m1 m2,m3 m1 m2,m3 m1 Process 1 Process 2
record their changes to states
changes
compared
2 4 6 8 10 12 Time (hours) Our Approach Split-Stream Execution Mutation Schemata
2.56X speedup over SSE, and 8.95X speedup over MS
50 100 150 200 250 flex gzip grep printtokens printtokens2 vim7.4 Our Approach Split-Stream Execution Mutation Schemata 10 20 30 40 50 replace schedule schedule2 tcas totinfo Our Approach Split-Stream Execution Mutation Schemata
current state are common in mutation analysis
π β₯ π π > π + 1 π > π π > π
level
address scalability
speedup over SSE
discussion helping scope the paper