Analysis? René Just1 & Gregory M. Kapfhammer2 & Franz Schweiggert1 1Ulm University, Germany 2Allegheny College, USA 7th International Workshop on Mutation Analysis Montreal, Canada April 17, 2012
in Mutation Analysis Just & Kapfhammer & Schweiggert Ulm University, Allegheny College Do Redundant Mutants Affect the Effectiveness and Efficiency of Mutation Analysis?
in Mutation Analysis Equivalent Mutants Just & Kapfhammer & Schweiggert Ulm University, Allegheny College Do Redundant Mutants Affect the Effectiveness and Efficiency of Mutation Analysis?
in Mutation Analysis Equivalent Mutants Cannot be killed Just & Kapfhammer & Schweiggert Ulm University, Allegheny College Do Redundant Mutants Affect the Effectiveness and Efficiency of Mutation Analysis?
in Mutation Analysis Equivalent Mutants Cannot be killed Redundant Mutants Just & Kapfhammer & Schweiggert Ulm University, Allegheny College Do Redundant Mutants Affect the Effectiveness and Efficiency of Mutation Analysis?
in Mutation Analysis Equivalent Mutants Cannot be killed Redundant Mutants Subsumed by other mutants Just & Kapfhammer & Schweiggert Ulm University, Allegheny College Do Redundant Mutants Affect the Effectiveness and Efficiency of Mutation Analysis?
in Mutation Analysis Equivalent Mutants Cannot be killed Redundant Mutants Subsumed by other mutants Harmful to efficiency and effectiveness Just & Kapfhammer & Schweiggert Ulm University, Allegheny College Do Redundant Mutants Affect the Effectiveness and Efficiency of Mutation Analysis?
mutants Just & Kapfhammer & Schweiggert Ulm University, Allegheny College Do Redundant Mutants Affect the Effectiveness and Efficiency of Mutation Analysis?
mutants Operator for Condi- tional Expressions without redundancy Just & Kapfhammer & Schweiggert Ulm University, Allegheny College Do Redundant Mutants Affect the Effectiveness and Efficiency of Mutation Analysis?
mutants Operator for Condi- tional Expressions without redundancy Conditional Operator Replacement (COR) Just & Kapfhammer & Schweiggert Ulm University, Allegheny College Do Redundant Mutants Affect the Effectiveness and Efficiency of Mutation Analysis?
mutants Operator for Condi- tional Expressions without redundancy Conditional Operator Replacement (COR) Unary Operator Insertion (UOI) Just & Kapfhammer & Schweiggert Ulm University, Allegheny College Do Redundant Mutants Affect the Effectiveness and Efficiency of Mutation Analysis?
mutants Operator for Condi- tional Expressions without redundancy Conditional Operator Replacement (COR) Unary Operator Insertion (UOI) Empirical Study on the impact of redundant mutants Just & Kapfhammer & Schweiggert Ulm University, Allegheny College Do Redundant Mutants Affect the Effectiveness and Efficiency of Mutation Analysis?
mutants Operator for Condi- tional Expressions without redundancy Conditional Operator Replacement (COR) Unary Operator Insertion (UOI) Empirical Study on the impact of redundant mutants Efficiency Just & Kapfhammer & Schweiggert Ulm University, Allegheny College Do Redundant Mutants Affect the Effectiveness and Efficiency of Mutation Analysis?
mutants Operator for Condi- tional Expressions without redundancy Conditional Operator Replacement (COR) Unary Operator Insertion (UOI) Empirical Study on the impact of redundant mutants Efficiency Number of mutants and runtime Just & Kapfhammer & Schweiggert Ulm University, Allegheny College Do Redundant Mutants Affect the Effectiveness and Efficiency of Mutation Analysis?
mutants Operator for Condi- tional Expressions without redundancy Conditional Operator Replacement (COR) Unary Operator Insertion (UOI) Empirical Study on the impact of redundant mutants Efficiency Number of mutants and runtime Effectiveness Just & Kapfhammer & Schweiggert Ulm University, Allegheny College Do Redundant Mutants Affect the Effectiveness and Efficiency of Mutation Analysis?
mutants Operator for Condi- tional Expressions without redundancy Conditional Operator Replacement (COR) Unary Operator Insertion (UOI) Empirical Study on the impact of redundant mutants Efficiency Number of mutants and runtime Effectiveness Accuracy of mutation score Just & Kapfhammer & Schweiggert Ulm University, Allegheny College Do Redundant Mutants Affect the Effectiveness and Efficiency of Mutation Analysis?
b && || Just & Kapfhammer & Schweiggert Ulm University, Allegheny College Do Redundant Mutants Affect the Effectiveness and Efficiency of Mutation Analysis?
b && || Conditional Operator Replacement (COR) Just & Kapfhammer & Schweiggert Ulm University, Allegheny College Do Redundant Mutants Affect the Effectiveness and Efficiency of Mutation Analysis?
b && || Conditional Operator Replacement (COR) a && b a || b a == b a != b Just & Kapfhammer & Schweiggert Ulm University, Allegheny College Do Redundant Mutants Affect the Effectiveness and Efficiency of Mutation Analysis?
b && || Conditional Operator Replacement (COR) a && b a || b a == b a != b lhs rhs true false Just & Kapfhammer & Schweiggert Ulm University, Allegheny College Do Redundant Mutants Affect the Effectiveness and Efficiency of Mutation Analysis?
b && || Conditional Operator Replacement (COR) a && b a || b a == b a != b lhs rhs true false Unary Operator Insertion (UOI) Just & Kapfhammer & Schweiggert Ulm University, Allegheny College Do Redundant Mutants Affect the Effectiveness and Efficiency of Mutation Analysis?
b && || Conditional Operator Replacement (COR) a && b a || b a == b a != b lhs rhs true false Unary Operator Insertion (UOI) !a <op> b !(a <op> b) a <op> !b Just & Kapfhammer & Schweiggert Ulm University, Allegheny College Do Redundant Mutants Affect the Effectiveness and Efficiency of Mutation Analysis?
a b a && b 0 0 0 0 1 0 1 0 0 1 1 1 Literals Expression a b a b 0 0 0 0 1 1 1 0 1 1 1 1 Just & Kapfhammer & Schweiggert Ulm University, Allegheny College Do Redundant Mutants Affect the Effectiveness and Efficiency of Mutation Analysis?
patterns for short-circuit operators Just & Kapfhammer & Schweiggert Ulm University, Allegheny College Do Redundant Mutants Affect the Effectiveness and Efficiency of Mutation Analysis?
patterns for short-circuit operators public void foo(int x){ Var v; if(flag&&(v=getVar())!=null) { v.bar(x); } ... } Just & Kapfhammer & Schweiggert Ulm University, Allegheny College Do Redundant Mutants Affect the Effectiveness and Efficiency of Mutation Analysis?
patterns for short-circuit operators public void foo(int x){ Var v; if(flag&&(v=getVar())!=null) { v.bar(x); } ... } Just & Kapfhammer & Schweiggert Ulm University, Allegheny College Do Redundant Mutants Affect the Effectiveness and Efficiency of Mutation Analysis?
patterns for short-circuit operators public void foo(int x){ Var v; if(flag&&(v=getVar())!=null) { v.bar(x); } ... } Just & Kapfhammer & Schweiggert Ulm University, Allegheny College Do Redundant Mutants Affect the Effectiveness and Efficiency of Mutation Analysis?
patterns for short-circuit operators public void foo(int x){ Var v; if(flag&&(v=getVar())!=null) { v.bar(x); } ... } Just & Kapfhammer & Schweiggert Ulm University, Allegheny College Do Redundant Mutants Affect the Effectiveness and Efficiency of Mutation Analysis?
patterns for short-circuit operators public void foo(int x){ Var v; if(flag&&(v=getVar())!=null) { v.bar(x); } ... } public void foo(int x){ Var v; if(flag||(v=getVar())!=null) { v.bar(x); } ... } Just & Kapfhammer & Schweiggert Ulm University, Allegheny College Do Redundant Mutants Affect the Effectiveness and Efficiency of Mutation Analysis?
patterns for short-circuit operators public void foo(int x){ Var v; if(flag&&(v=getVar())!=null) { v.bar(x); } ... } public void foo(int x){ Var v; if(flag||(v=getVar())!=null) { v.bar(x); } ... } Just & Kapfhammer & Schweiggert Ulm University, Allegheny College Do Redundant Mutants Affect the Effectiveness and Efficiency of Mutation Analysis?
patterns for short-circuit operators public void foo(int x){ Var v; if(flag&&(v=getVar())!=null) { v.bar(x); } ... } public void foo(int x){ Var v; if(flag||(v=getVar())!=null) { v.bar(x); } ... } Just & Kapfhammer & Schweiggert Ulm University, Allegheny College Do Redundant Mutants Affect the Effectiveness and Efficiency of Mutation Analysis?
patterns for short-circuit operators public void foo(int x){ Var v; if(flag&&(v=getVar())!=null) { v.bar(x); } ... } Properly handled by MAJOR Just & Kapfhammer & Schweiggert Ulm University, Allegheny College Do Redundant Mutants Affect the Effectiveness and Efficiency of Mutation Analysis?
patterns for short-circuit operators public void foo(int x){ Var v; if(flag&&(v=getVar())!=null) { v.bar(x); } ... } public void foo(int x){ Var v; if(flag||(v=getVar())==null) { return; } v.bar(x); } Properly handled by MAJOR Properly handled by MAJOR Just & Kapfhammer & Schweiggert Ulm University, Allegheny College Do Redundant Mutants Affect the Effectiveness and Efficiency of Mutation Analysis?
patterns for short-circuit operators public void foo(int x){ Var v; if(flag&&(v=getVar())!=null) { v.bar(x); } ... } public void foo(int x){ Var v; if(flag||(v=getVar())==null) { return; } v.bar(x); } Properly handled by MAJOR Properly handled by MAJOR A reduction of up to 60% Just & Kapfhammer & Schweiggert Ulm University, Allegheny College Do Redundant Mutants Affect the Effectiveness and Efficiency of Mutation Analysis?
Subsumption hierarchy Conditional Operator Replacement (COR) Reduction of up to 60% Just & Kapfhammer & Schweiggert Ulm University, Allegheny College Do Redundant Mutants Affect the Effectiveness and Efficiency of Mutation Analysis?
Subsumption hierarchy Conditional Operator Replacement (COR) Reduction of up to 60% Relational Operator Replacement (ROR) Just & Kapfhammer & Schweiggert Ulm University, Allegheny College Do Redundant Mutants Affect the Effectiveness and Efficiency of Mutation Analysis?
Subsumption hierarchy Conditional Operator Replacement (COR) Reduction of up to 60% Relational Operator Replacement (ROR) Kaminski et al. AST’11 Just & Kapfhammer & Schweiggert Ulm University, Allegheny College Do Redundant Mutants Affect the Effectiveness and Efficiency of Mutation Analysis?
Subsumption hierarchy Conditional Operator Replacement (COR) Reduction of up to 60% Relational Operator Replacement (ROR) Kaminski et al. AST’11 Reduction of 50% Just & Kapfhammer & Schweiggert Ulm University, Allegheny College Do Redundant Mutants Affect the Effectiveness and Efficiency of Mutation Analysis?
Subsumption hierarchy Conditional Operator Replacement (COR) Reduction of up to 60% Relational Operator Replacement (ROR) Kaminski et al. AST’11 Reduction of 50% How prevalent are COR and ROR mutants? Just & Kapfhammer & Schweiggert Ulm University, Allegheny College Do Redundant Mutants Affect the Effectiveness and Efficiency of Mutation Analysis?
Mutants 0 20,000 40,000 60,000 80,000 numerics4j commons-io commons-lang commons-math 19.5% 14.5% 22.3% 5.1% 19.3% 26.9% 35.5% 24.3% Number of generated mutants All mutants ROR mutants COR mutants COR and ROR generate up to 58% of all mutants Just & Kapfhammer & Schweiggert Ulm University, Allegheny College Do Redundant Mutants Affect the Effectiveness and Efficiency of Mutation Analysis?
Mutants 0 20,000 40,000 60,000 80,000 numerics4j commons-io commons-lang commons-math 19.5% 14.5% 22.3% 5.1% 19.3% 26.9% 35.5% 24.3% Number of generated mutants All mutants ROR mutants COR mutants COR and ROR generate up to 58% of all mutants Indicates notable potential for improvements Just & Kapfhammer & Schweiggert Ulm University, Allegheny College Do Redundant Mutants Affect the Effectiveness and Efficiency of Mutation Analysis?
Mutants 0 20,000 40,000 60,000 80,000 numerics4j commons-io commons-lang commons-math 19.5% 14.5% 22.3% 5.1% 19.3% 26.9% 35.5% 24.3% Number of generated mutants All mutants ROR mutants COR mutants COR and ROR generate up to 58% of all mutants Indicates notable potential for improvements How much is the overall reduction? Just & Kapfhammer & Schweiggert Ulm University, Allegheny College Do Redundant Mutants Affect the Effectiveness and Efficiency of Mutation Analysis?
set) (reduced set) commons-math 300.77 271.10 (-09.9%) commons-lang 28.25 18.70 (-33.8%) commons-io 6.95 4.58 (-34.1%) numerics4j 2.85 2.08 (-26.9%) Divergence due to differences in test suite runtime and coverage Just & Kapfhammer & Schweiggert Ulm University, Allegheny College Do Redundant Mutants Affect the Effectiveness and Efficiency of Mutation Analysis?
set) (reduced set) commons-math 300.77 271.10 (-09.9%) commons-lang 28.25 18.70 (-33.8%) commons-io 6.95 4.58 (-34.1%) numerics4j 2.85 2.08 (-26.9%) Divergence due to differences in test suite runtime and coverage Significant speed-up for all applications Just & Kapfhammer & Schweiggert Ulm University, Allegheny College Do Redundant Mutants Affect the Effectiveness and Efficiency of Mutation Analysis?
Operator for conditional expressions without redundancy Decreased number of mutants and improved runtime Increased accuracy of the mutation score Just & Kapfhammer & Schweiggert Ulm University, Allegheny College Do Redundant Mutants Affect the Effectiveness and Efficiency of Mutation Analysis?
Operator for conditional expressions without redundancy Decreased number of mutants and improved runtime Increased accuracy of the mutation score Future Work: Investigate redundancies in other mutation operators Analyze whether sufficient mutants tend to be equivalent Apply constraint solver to identify equivalent mutants Just & Kapfhammer & Schweiggert Ulm University, Allegheny College Do Redundant Mutants Affect the Effectiveness and Efficiency of Mutation Analysis?