Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Practical Techniques for Improving the Efficiency and Usability of Mutation Analysis for Java Programs

Practical Techniques for Improving the Efficiency and Usability of Mutation Analysis for Java Programs

Interested in learning more about this topic? Visit this web site to read a related post: https://www.gregorykapfhammer.com/testing/mutation/research/2014/10/25/Major-Mutation/

Gregory Kapfhammer

February 02, 2012
Tweet

More Decks by Gregory Kapfhammer

Other Decks in Technology

Transcript

  1. Practical Techniques for Improving the Efficiency and Usability of Mutation

    Analysis for Java Programs Gregory M. Kapfhammer† Department of Computer Science Allegheny College http://www.cs.allegheny.edu/∼gkapfham/ University of Sheffield – February 3, 2012 †Joint with Ren´ e Just and Franz Schweiggert (University of Ulm) and Jonathan Miller Kauffman (Allegheny College)
  2. Introduction Mutation Analysis Empirical Evaluation Conclusion Important Points Accessing the

    Presentation Scan this QR Code with your smartphone! ... or, visit this Web site: http://is.gd/rekiwo ... or, ask me for a USB drive! Kapfhammer Allegheny College Practical Techniques for Improving the Efficiency and Usability of Mutation Analysis for Java Programs
  3. Introduction Mutation Analysis Empirical Evaluation Conclusion Important Points Presenter Introduction:

    Gregory M. Kapfhammer test testing software suites prioritization components coverage empirically regression suite applications evaluating algorithm analysis data effectiveness empirical genetic performance understanding using approach commercialofftheshelf comparison comprehensive constrained creation databasecentric environments execution finding framework identifying interactive java methods multiplots mutation party prioritized reduction relational study third timeaware towards 105 adequacy approaches array automatically building call challenges chapter communication compare compressing computer conditional cost cots covering creating criteria database databaseaware databasedriven databases declarative dependable detection devices distributed distributing duringsearchbased dynamic efficiency efficient engineering environment evaluate examination executing experimental family flow forward frameworks free generation greedy gui hamiltonian handbook heaps implementation improve incorporating increase information initial intranode invariant javaspace javaspacebased kernel knapsack linux measurement memory method monitoring operators paths poster potential preliminary primitives prioritizations prioritizers prioritizing problematic receive remote reports resource resourceconstrained results role runtime science searchbased selection solutions solvers space studies studying supported synthetic techniques transmission transparently trees tuple unstructured wrappers Kapfhammer Allegheny College Practical Techniques for Improving the Efficiency and Usability of Mutation Analysis for Java Programs
  4. Introduction Mutation Analysis Empirical Evaluation Conclusion Software Testing What is

    a Test Case? Method Under Test Kapfhammer Allegheny College Practical Techniques for Improving the Efficiency and Usability of Mutation Analysis for Java Programs
  5. Introduction Mutation Analysis Empirical Evaluation Conclusion Software Testing What is

    a Test Case? Method Under Test Input Kapfhammer Allegheny College Practical Techniques for Improving the Efficiency and Usability of Mutation Analysis for Java Programs
  6. Introduction Mutation Analysis Empirical Evaluation Conclusion Software Testing What is

    a Test Case? Method Under Test Input Output Kapfhammer Allegheny College Practical Techniques for Improving the Efficiency and Usability of Mutation Analysis for Java Programs
  7. Introduction Mutation Analysis Empirical Evaluation Conclusion Software Testing What is

    a Test Case? Method Under Test Test Set Up Kapfhammer Allegheny College Practical Techniques for Improving the Efficiency and Usability of Mutation Analysis for Java Programs
  8. Introduction Mutation Analysis Empirical Evaluation Conclusion Software Testing What is

    a Test Case? Method Under Test Test Set Up Input Kapfhammer Allegheny College Practical Techniques for Improving the Efficiency and Usability of Mutation Analysis for Java Programs
  9. Introduction Mutation Analysis Empirical Evaluation Conclusion Software Testing What is

    a Test Case? Method Under Test Test Set Up Input Output Kapfhammer Allegheny College Practical Techniques for Improving the Efficiency and Usability of Mutation Analysis for Java Programs
  10. Introduction Mutation Analysis Empirical Evaluation Conclusion Software Testing What is

    a Test Case? Method Under Test Test Set Up Input Output Test Clean Up Kapfhammer Allegheny College Practical Techniques for Improving the Efficiency and Usability of Mutation Analysis for Java Programs
  11. Introduction Mutation Analysis Empirical Evaluation Conclusion Software Testing What is

    a Test Case? Method Under Test Test Set Up Input Output Test Clean Up Test Oracle Kapfhammer Allegheny College Practical Techniques for Improving the Efficiency and Usability of Mutation Analysis for Java Programs
  12. Introduction Mutation Analysis Empirical Evaluation Conclusion Software Testing What is

    a Test Case? Method Under Test Test Set Up Input Output Test Clean Up Test Oracle Expected Output Kapfhammer Allegheny College Practical Techniques for Improving the Efficiency and Usability of Mutation Analysis for Java Programs
  13. Introduction Mutation Analysis Empirical Evaluation Conclusion Software Testing What is

    a Test Case? Method Under Test Test Set Up Input Output Test Clean Up Test Oracle Expected Output Test Verdict Kapfhammer Allegheny College Practical Techniques for Improving the Efficiency and Usability of Mutation Analysis for Java Programs
  14. Introduction Mutation Analysis Empirical Evaluation Conclusion Software Testing What is

    a Test Case? Method Under Test Test Set Up Input Output Test Clean Up Test Oracle Expected Output Test Verdict Expected Output Output Kapfhammer Allegheny College Practical Techniques for Improving the Efficiency and Usability of Mutation Analysis for Java Programs
  15. Introduction Mutation Analysis Empirical Evaluation Conclusion Software Testing What is

    a Test Case? Method Under Test Test Set Up Input Output Test Clean Up Test Oracle Expected Output Test Verdict Expected Output Output Test Verdict The test case passes and the code is correct! Kapfhammer Allegheny College Practical Techniques for Improving the Efficiency and Usability of Mutation Analysis for Java Programs
  16. Introduction Mutation Analysis Empirical Evaluation Conclusion Software Testing What is

    a Test Case? Method Under Test Test Set Up Input Output Test Clean Up Test Oracle Expected Output Test Verdict Expected Output Output Kapfhammer Allegheny College Practical Techniques for Improving the Efficiency and Usability of Mutation Analysis for Java Programs
  17. Introduction Mutation Analysis Empirical Evaluation Conclusion Software Testing What is

    a Test Case? Method Under Test Test Set Up Input Output Test Clean Up Test Oracle Expected Output Test Verdict Expected Output Output Test Verdict The test case fails and a defect is found! Kapfhammer Allegheny College Practical Techniques for Improving the Efficiency and Usability of Mutation Analysis for Java Programs
  18. Introduction Mutation Analysis Empirical Evaluation Conclusion Software Testing What is

    a Test Suite? T1 T2 Kapfhammer Allegheny College Practical Techniques for Improving the Efficiency and Usability of Mutation Analysis for Java Programs
  19. Introduction Mutation Analysis Empirical Evaluation Conclusion Software Testing What is

    a Test Suite? T1 T2 T3 T4 Kapfhammer Allegheny College Practical Techniques for Improving the Efficiency and Usability of Mutation Analysis for Java Programs
  20. Introduction Mutation Analysis Empirical Evaluation Conclusion Software Testing What is

    a Test Suite? T1 T2 T3 T4 T5 T6 Kapfhammer Allegheny College Practical Techniques for Improving the Efficiency and Usability of Mutation Analysis for Java Programs
  21. Introduction Mutation Analysis Empirical Evaluation Conclusion Software Testing What is

    a Test Suite? T1 T2 T3 T4 T5 T6 T7 T8 Kapfhammer Allegheny College Practical Techniques for Improving the Efficiency and Usability of Mutation Analysis for Java Programs
  22. Introduction Mutation Analysis Empirical Evaluation Conclusion Software Testing What is

    a Test Suite? T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 Kapfhammer Allegheny College Practical Techniques for Improving the Efficiency and Usability of Mutation Analysis for Java Programs
  23. Introduction Mutation Analysis Empirical Evaluation Conclusion Software Testing What is

    a Test Suite? T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 Test Suite T = T1, T2, . . . , T9, T10 Kapfhammer Allegheny College Practical Techniques for Improving the Efficiency and Usability of Mutation Analysis for Java Programs
  24. Introduction Mutation Analysis Empirical Evaluation Conclusion Software Testing What is

    a Test Suite? T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 Test Suite T = T1, T2, . . . , T9, T10 R1 R2 Kapfhammer Allegheny College Practical Techniques for Improving the Efficiency and Usability of Mutation Analysis for Java Programs
  25. Introduction Mutation Analysis Empirical Evaluation Conclusion Software Testing What is

    a Test Suite? T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 Test Suite T = T1, T2, . . . , T9, T10 R1 R2 R3 R4 Kapfhammer Allegheny College Practical Techniques for Improving the Efficiency and Usability of Mutation Analysis for Java Programs
  26. Introduction Mutation Analysis Empirical Evaluation Conclusion Software Testing What is

    a Test Suite? T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 Test Suite T = T1, T2, . . . , T9, T10 R1 R2 R3 R4 R5 R6 Kapfhammer Allegheny College Practical Techniques for Improving the Efficiency and Usability of Mutation Analysis for Java Programs
  27. Introduction Mutation Analysis Empirical Evaluation Conclusion Software Testing What is

    a Test Suite? T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 Test Suite T = T1, T2, . . . , T9, T10 R1 R2 R3 R4 R5 R6 F1 F2 Kapfhammer Allegheny College Practical Techniques for Improving the Efficiency and Usability of Mutation Analysis for Java Programs
  28. Introduction Mutation Analysis Empirical Evaluation Conclusion Software Testing What is

    a Test Suite? T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 Test Suite T = T1, T2, . . . , T9, T10 R1 R2 R3 R4 R5 R6 F1 F2 F3 F4 Kapfhammer Allegheny College Practical Techniques for Improving the Efficiency and Usability of Mutation Analysis for Java Programs
  29. Introduction Mutation Analysis Empirical Evaluation Conclusion Software Testing What is

    a Test Suite? T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 Test Suite T = T1, T2, . . . , T9, T10 R1 R2 R3 R4 R5 R6 F1 F2 F3 F4 B1 B2 Kapfhammer Allegheny College Practical Techniques for Improving the Efficiency and Usability of Mutation Analysis for Java Programs
  30. Introduction Mutation Analysis Empirical Evaluation Conclusion Software Testing What is

    a Test Suite? T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 Test Suite T = T1, T2, . . . , T9, T10 R1 R2 R3 R4 R5 R6 F1 F2 F3 F4 B1 B2 Requirements R = {R1 , . . . , R6 }, Features F = {F1 , . . . , F4 }, Bug Fixes B = {B1 , B2 } Kapfhammer Allegheny College Practical Techniques for Improving the Efficiency and Usability of Mutation Analysis for Java Programs
  31. Introduction Mutation Analysis Empirical Evaluation Conclusion Software Testing What is

    a Test Suite? T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 Test Suite T = T1, T2, . . . , T9, T10 R1 R2 R3 R4 R5 R6 F1 F2 F3 F4 B1 B2 Requirements R = {R1 , . . . , R6 }, Features F = {F1 , . . . , F4 }, Bug Fixes B = {B1 , B2 } B2 B2 B2 B2 Kapfhammer Allegheny College Practical Techniques for Improving the Efficiency and Usability of Mutation Analysis for Java Programs
  32. Introduction Mutation Analysis Empirical Evaluation Conclusion Software Testing What is

    a Test Suite? T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 Test Suite T = T1, T2, . . . , T9, T10 R1 R2 R3 R4 R5 R6 F1 F2 F3 F4 B1 B2 Requirements R = {R1 , . . . , R6 }, Features F = {F1 , . . . , F4 }, Bug Fixes B = {B1 , B2 } B2 B2 B2 B2 B2 B2 Kapfhammer Allegheny College Practical Techniques for Improving the Efficiency and Usability of Mutation Analysis for Java Programs
  33. Introduction Mutation Analysis Empirical Evaluation Conclusion Software Testing What is

    a Test Suite? T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 Test Suite T = T1, T2, . . . , T9, T10 R1 R2 R3 R4 R5 R6 F1 F2 F3 F4 B1 B2 Requirements R = {R1 , . . . , R6 }, Features F = {F1 , . . . , F4 }, Bug Fixes B = {B1 , B2 } B2 B2 B2 B2 B2 B2 B2 B2 B2 B2 Kapfhammer Allegheny College Practical Techniques for Improving the Efficiency and Usability of Mutation Analysis for Java Programs
  34. Introduction Mutation Analysis Empirical Evaluation Conclusion Software Testing What is

    a Test Suite? T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 Test Suite T = T1, T2, . . . , T9, T10 R1 R2 R3 R4 R5 R6 F1 F2 F3 F4 B1 B2 Requirements R = {R1 , . . . , R6 }, Features F = {F1 , . . . , F4 }, Bug Fixes B = {B1 , B2 } Kapfhammer Allegheny College Practical Techniques for Improving the Efficiency and Usability of Mutation Analysis for Java Programs
  35. Introduction Mutation Analysis Empirical Evaluation Conclusion Software Testing What is

    a Test Suite? T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 Test Suite T = T1, T2, . . . , T9, T10 R1 R2 R3 R4 R5 R6 F1 F2 F3 F4 B1 B2 Requirements R = {R1 , . . . , R6 }, Features F = {F1 , . . . , F4 }, Bug Fixes B = {B1 , B2 } How Good is Test Suite T? Kapfhammer Allegheny College Practical Techniques for Improving the Efficiency and Usability of Mutation Analysis for Java Programs
  36. Introduction Mutation Analysis Empirical Evaluation Conclusion Software Testing What is

    a Test Suite? T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 Test Suite T = T1, T2, . . . , T9, T10 R1 R2 R3 R4 R5 R6 F1 F2 F3 F4 B1 B2 Requirements R = {R1 , . . . , R6 }, Features F = {F1 , . . . , F4 }, Bug Fixes B = {B1 , B2 } How Good is Test Suite T? Coverage Analysis Kapfhammer Allegheny College Practical Techniques for Improving the Efficiency and Usability of Mutation Analysis for Java Programs
  37. Introduction Mutation Analysis Empirical Evaluation Conclusion Software Testing What is

    a Test Suite? T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 Test Suite T = T1, T2, . . . , T9, T10 R1 R2 R3 R4 R5 R6 F1 F2 F3 F4 B1 B2 Requirements R = {R1 , . . . , R6 }, Features F = {F1 , . . . , F4 }, Bug Fixes B = {B1 , B2 } How Good is Test Suite T? Coverage Analysis Mutation Analysis Kapfhammer Allegheny College Practical Techniques for Improving the Efficiency and Usability of Mutation Analysis for Java Programs
  38. Introduction Mutation Analysis Empirical Evaluation Conclusion Fundamental Concepts Overview of

    Mutation Analysis Mutation Operator Kapfhammer Allegheny College Practical Techniques for Improving the Efficiency and Usability of Mutation Analysis for Java Programs
  39. Introduction Mutation Analysis Empirical Evaluation Conclusion Fundamental Concepts Overview of

    Mutation Analysis Mutation Operator Mutation Operator Kapfhammer Allegheny College Practical Techniques for Improving the Efficiency and Usability of Mutation Analysis for Java Programs
  40. Introduction Mutation Analysis Empirical Evaluation Conclusion Fundamental Concepts Overview of

    Mutation Analysis Mutation Operator Mutation Operator Mutation Operator Mutation Operator Kapfhammer Allegheny College Practical Techniques for Improving the Efficiency and Usability of Mutation Analysis for Java Programs
  41. Introduction Mutation Analysis Empirical Evaluation Conclusion Fundamental Concepts Overview of

    Mutation Analysis Mutation Operator Mutation Operator Mutation Operator Mutation Operator Kapfhammer Allegheny College Practical Techniques for Improving the Efficiency and Usability of Mutation Analysis for Java Programs
  42. Introduction Mutation Analysis Empirical Evaluation Conclusion Fundamental Concepts Overview of

    Mutation Analysis Mutation Operator Mutation Operator Mutation Operator Mutation Operator Methodically inject small syntactical faults into the program under test Kapfhammer Allegheny College Practical Techniques for Improving the Efficiency and Usability of Mutation Analysis for Java Programs
  43. Introduction Mutation Analysis Empirical Evaluation Conclusion Fundamental Concepts Overview of

    Mutation Analysis Mutation Operator Mutation Operator Mutation Operator Mutation Operator Methodically inject small syntactical faults into the program under test Kapfhammer Allegheny College Practical Techniques for Improving the Efficiency and Usability of Mutation Analysis for Java Programs
  44. Introduction Mutation Analysis Empirical Evaluation Conclusion Fundamental Concepts Overview of

    Mutation Analysis Mutation Operator Mutation Operator Mutation Operator Mutation Operator Methodically inject small syntactical faults into the program under test Kapfhammer Allegheny College Practical Techniques for Improving the Efficiency and Usability of Mutation Analysis for Java Programs
  45. Introduction Mutation Analysis Empirical Evaluation Conclusion Fundamental Concepts Overview of

    Mutation Analysis Mutation Operator Mutation Operator Mutation Operator Mutation Operator Methodically inject small syntactical faults into the program under test Kapfhammer Allegheny College Practical Techniques for Improving the Efficiency and Usability of Mutation Analysis for Java Programs
  46. Introduction Mutation Analysis Empirical Evaluation Conclusion Fundamental Concepts Overview of

    Mutation Analysis Mutation Operator Mutation Operator Mutation Operator Mutation Operator Kapfhammer Allegheny College Practical Techniques for Improving the Efficiency and Usability of Mutation Analysis for Java Programs
  47. Introduction Mutation Analysis Empirical Evaluation Conclusion Fundamental Concepts Overview of

    Mutation Analysis Test Case T1 Test Case T2 Test Case T3 Test Case T4 Execute the test suite after enabling a single mutant in the program under test Kapfhammer Allegheny College Practical Techniques for Improving the Efficiency and Usability of Mutation Analysis for Java Programs
  48. Introduction Mutation Analysis Empirical Evaluation Conclusion Fundamental Concepts Overview of

    Mutation Analysis Test Case T1 Test Case T2 Test Case T3 Test Case T4 Execute the test suite after enabling a single mutant in the program under test Kapfhammer Allegheny College Practical Techniques for Improving the Efficiency and Usability of Mutation Analysis for Java Programs
  49. Introduction Mutation Analysis Empirical Evaluation Conclusion Fundamental Concepts Overview of

    Mutation Analysis Test Case T1 Test Case T2 Test Case T3 Test Case T4 Execute the test suite after enabling a single mutant in the program under test Kapfhammer Allegheny College Practical Techniques for Improving the Efficiency and Usability of Mutation Analysis for Java Programs
  50. Introduction Mutation Analysis Empirical Evaluation Conclusion Fundamental Concepts Overview of

    Mutation Analysis Test Case T1 Test Case T2 Test Case T3 Test Case T4 Execute the test suite after enabling a single mutant in the program under test Kapfhammer Allegheny College Practical Techniques for Improving the Efficiency and Usability of Mutation Analysis for Java Programs
  51. Introduction Mutation Analysis Empirical Evaluation Conclusion Fundamental Concepts Overview of

    Mutation Analysis Test Case T1 Test Case T2 Test Case T3 Test Case T4 Execute the test suite after enabling a single mutant in the program under test Kapfhammer Allegheny College Practical Techniques for Improving the Efficiency and Usability of Mutation Analysis for Java Programs
  52. Introduction Mutation Analysis Empirical Evaluation Conclusion Fundamental Concepts Overview of

    Mutation Analysis Test Case T1 Test Case T2 Test Case T3 Test Case T4 Execute the test suite after enabling a single mutant in the program under test Kapfhammer Allegheny College Practical Techniques for Improving the Efficiency and Usability of Mutation Analysis for Java Programs
  53. Introduction Mutation Analysis Empirical Evaluation Conclusion Fundamental Concepts Overview of

    Mutation Analysis Test Case T1 Test Case T2 Test Case T3 Test Case T4 Execute the test suite after enabling a single mutant in the program under test Kapfhammer Allegheny College Practical Techniques for Improving the Efficiency and Usability of Mutation Analysis for Java Programs
  54. Introduction Mutation Analysis Empirical Evaluation Conclusion Fundamental Concepts Overview of

    Mutation Analysis Test Case T1 Test Case T2 Test Case T3 Test Case T4 Execute the test suite after enabling a single mutant in the program under test Kapfhammer Allegheny College Practical Techniques for Improving the Efficiency and Usability of Mutation Analysis for Java Programs
  55. Introduction Mutation Analysis Empirical Evaluation Conclusion Fundamental Concepts Overview of

    Mutation Analysis Test Case T1 Test Case T2 Test Case T3 Test Case T4 Execute the test suite after enabling a single mutant in the program under test Kapfhammer Allegheny College Practical Techniques for Improving the Efficiency and Usability of Mutation Analysis for Java Programs
  56. Introduction Mutation Analysis Empirical Evaluation Conclusion Fundamental Concepts Overview of

    Mutation Analysis Test Case T1 Test Case T2 Test Case T3 Test Case T4 Execute the test suite after enabling a single mutant in the program under test The test suite cannot kill the mutant – either a test suite weakness or an equivalent mutant! Kapfhammer Allegheny College Practical Techniques for Improving the Efficiency and Usability of Mutation Analysis for Java Programs
  57. Introduction Mutation Analysis Empirical Evaluation Conclusion Fundamental Concepts Overview of

    Mutation Analysis Test Case T1 Test Case T2 Test Case T3 Test Case T4 Execute the test suite after enabling a single mutant in the program under test Repeat this process for all of the test cases and mutants – calculate mutation score when finished Kapfhammer Allegheny College Practical Techniques for Improving the Efficiency and Usability of Mutation Analysis for Java Programs
  58. Introduction Mutation Analysis Empirical Evaluation Conclusion Fundamental Concepts Contributions of

    this Presentation Efficient Mutation Analysis Kapfhammer Allegheny College Practical Techniques for Improving the Efficiency and Usability of Mutation Analysis for Java Programs
  59. Introduction Mutation Analysis Empirical Evaluation Conclusion Fundamental Concepts Contributions of

    this Presentation Efficient Mutation Analysis Challenges Kapfhammer Allegheny College Practical Techniques for Improving the Efficiency and Usability of Mutation Analysis for Java Programs
  60. Introduction Mutation Analysis Empirical Evaluation Conclusion Fundamental Concepts Contributions of

    this Presentation Efficient Mutation Analysis Challenges Solutions Kapfhammer Allegheny College Practical Techniques for Improving the Efficiency and Usability of Mutation Analysis for Java Programs
  61. Introduction Mutation Analysis Empirical Evaluation Conclusion Fundamental Concepts Contributions of

    this Presentation Efficient Mutation Analysis Challenges Solutions Conditional Mutation Kapfhammer Allegheny College Practical Techniques for Improving the Efficiency and Usability of Mutation Analysis for Java Programs
  62. Introduction Mutation Analysis Empirical Evaluation Conclusion Fundamental Concepts Contributions of

    this Presentation Efficient Mutation Analysis Challenges Solutions Conditional Mutation Syntax Tree Transformation Kapfhammer Allegheny College Practical Techniques for Improving the Efficiency and Usability of Mutation Analysis for Java Programs
  63. Introduction Mutation Analysis Empirical Evaluation Conclusion Fundamental Concepts Contributions of

    this Presentation Efficient Mutation Analysis Challenges Solutions Conditional Mutation Syntax Tree Transformation Expressions and Statements Kapfhammer Allegheny College Practical Techniques for Improving the Efficiency and Usability of Mutation Analysis for Java Programs
  64. Introduction Mutation Analysis Empirical Evaluation Conclusion Fundamental Concepts Contributions of

    this Presentation Efficient Mutation Analysis Challenges Solutions Conditional Mutation Syntax Tree Transformation Expressions and Statements Compiler Integrated Kapfhammer Allegheny College Practical Techniques for Improving the Efficiency and Usability of Mutation Analysis for Java Programs
  65. Introduction Mutation Analysis Empirical Evaluation Conclusion Fundamental Concepts Contributions of

    this Presentation Efficient Mutation Analysis Challenges Solutions Conditional Mutation Syntax Tree Transformation Expressions and Statements Compiler Integrated Comprehensive Empirical Study Kapfhammer Allegheny College Practical Techniques for Improving the Efficiency and Usability of Mutation Analysis for Java Programs
  66. Introduction Mutation Analysis Empirical Evaluation Conclusion Fundamental Concepts Contributions of

    this Presentation Efficient Mutation Analysis Challenges Solutions Conditional Mutation Syntax Tree Transformation Expressions and Statements Compiler Integrated Comprehensive Empirical Study Efficient Technique - Fully Integrated into the Java 6 SE Compiler Kapfhammer Allegheny College Practical Techniques for Improving the Efficiency and Usability of Mutation Analysis for Java Programs
  67. Introduction Mutation Analysis Empirical Evaluation Conclusion Fundamental Concepts Understanding Mutation

    Analysis public int eval(int x){ int a=3, b=1, y; y = a * x; y += b; return y; } public int max(int a, int b){ int max = a; if(b>a){ max=b; } return max; } Kapfhammer Allegheny College Practical Techniques for Improving the Efficiency and Usability of Mutation Analysis for Java Programs
  68. Introduction Mutation Analysis Empirical Evaluation Conclusion Fundamental Concepts Understanding Mutation

    Analysis public int eval(int x){ int a=3, b=1, y; y = a * x; y += b; return y; } public int max(int a, int b){ int max = a; if(b>a){ max=b; } return max; } Methodically inject small syntactical faults into the program under test Kapfhammer Allegheny College Practical Techniques for Improving the Efficiency and Usability of Mutation Analysis for Java Programs
  69. Introduction Mutation Analysis Empirical Evaluation Conclusion Fundamental Concepts Understanding Mutation

    Analysis public int eval(int x){ int a=3, b=1, y; y = a * x; y += b; return y; } public int max(int a, int b){ int max = a; if(b>a){ max=b; } return max; } Kapfhammer Allegheny College Practical Techniques for Improving the Efficiency and Usability of Mutation Analysis for Java Programs
  70. Introduction Mutation Analysis Empirical Evaluation Conclusion Fundamental Concepts Understanding Mutation

    Analysis public int eval(int x){ int a=3, b=1, y; y = a * x; y += b; return y; } public int max(int a, int b){ int max = a; if(b>a){ max=b; } return max; } =⇒ =⇒ • y = a - x; • y = a + x; • y = a / x; • if(b < a) • if(b != a) • if(b == a) Kapfhammer Allegheny College Practical Techniques for Improving the Efficiency and Usability of Mutation Analysis for Java Programs
  71. Introduction Mutation Analysis Empirical Evaluation Conclusion Fundamental Concepts Understanding Mutation

    Analysis public int eval(int x){ int a=3, b=1, y; y = a * x; y += b; return y; } public int max(int a, int b){ int max = a; if(b>a){ max=b; } return max; } Unbiased and powerful method for assessing oracles and input values Kapfhammer Allegheny College Practical Techniques for Improving the Efficiency and Usability of Mutation Analysis for Java Programs
  72. Introduction Mutation Analysis Empirical Evaluation Conclusion Fundamental Concepts Understanding Mutation

    Analysis public int eval(int x){ int a=3, b=1, y; y = a * x; y += b; return y; } public int max(int a, int b){ int max = a; if(b>a){ max=b; } return max; } Unbiased and powerful method for assessing oracles and input values Useful method for fault seeding during the empirical study of testing techniques Kapfhammer Allegheny College Practical Techniques for Improving the Efficiency and Usability of Mutation Analysis for Java Programs
  73. Introduction Mutation Analysis Empirical Evaluation Conclusion Fundamental Concepts Mutation Analysis

    Challenges Mutant Generation Kapfhammer Allegheny College Practical Techniques for Improving the Efficiency and Usability of Mutation Analysis for Java Programs
  74. Introduction Mutation Analysis Empirical Evaluation Conclusion Fundamental Concepts Mutation Analysis

    Challenges Mutant Generation Mutation Operators Kapfhammer Allegheny College Practical Techniques for Improving the Efficiency and Usability of Mutation Analysis for Java Programs
  75. Introduction Mutation Analysis Empirical Evaluation Conclusion Fundamental Concepts Mutation Analysis

    Challenges Mutant Generation Mutation Operators Program Kapfhammer Allegheny College Practical Techniques for Improving the Efficiency and Usability of Mutation Analysis for Java Programs
  76. Introduction Mutation Analysis Empirical Evaluation Conclusion Fundamental Concepts Mutation Analysis

    Challenges Mutant Generation Mutation Operators Program Mutants Kapfhammer Allegheny College Practical Techniques for Improving the Efficiency and Usability of Mutation Analysis for Java Programs
  77. Introduction Mutation Analysis Empirical Evaluation Conclusion Fundamental Concepts Mutation Analysis

    Challenges Mutant Generation Mutation Operators Program Mutants Often Yields a Substantial Num- ber of Mutants Kapfhammer Allegheny College Practical Techniques for Improving the Efficiency and Usability of Mutation Analysis for Java Programs
  78. Introduction Mutation Analysis Empirical Evaluation Conclusion Fundamental Concepts Mutation Analysis

    Challenges Mutant Generation Mutation Operators Program Mutants Often Yields a Substantial Num- ber of Mutants High Time Over- head for Generation Kapfhammer Allegheny College Practical Techniques for Improving the Efficiency and Usability of Mutation Analysis for Java Programs
  79. Introduction Mutation Analysis Empirical Evaluation Conclusion Fundamental Concepts Mutation Analysis

    Challenges Mutant Generation Mutation Operators Program Mutants Often Yields a Substantial Num- ber of Mutants High Time Over- head for Generation Mutation Analysis Kapfhammer Allegheny College Practical Techniques for Improving the Efficiency and Usability of Mutation Analysis for Java Programs
  80. Introduction Mutation Analysis Empirical Evaluation Conclusion Fundamental Concepts Mutation Analysis

    Challenges Mutant Generation Mutation Operators Program Mutants Often Yields a Substantial Num- ber of Mutants High Time Over- head for Generation Mutation Analysis Tests Kapfhammer Allegheny College Practical Techniques for Improving the Efficiency and Usability of Mutation Analysis for Java Programs
  81. Introduction Mutation Analysis Empirical Evaluation Conclusion Fundamental Concepts Mutation Analysis

    Challenges Mutant Generation Mutation Operators Program Mutants Often Yields a Substantial Num- ber of Mutants High Time Over- head for Generation Mutation Analysis Tests Results Kapfhammer Allegheny College Practical Techniques for Improving the Efficiency and Usability of Mutation Analysis for Java Programs
  82. Introduction Mutation Analysis Empirical Evaluation Conclusion Fundamental Concepts Mutation Analysis

    Challenges Mutant Generation Mutation Operators Program Mutants Often Yields a Substantial Num- ber of Mutants High Time Over- head for Generation Mutation Analysis Tests Results Individually Executing the Mutants is Too Expensive Kapfhammer Allegheny College Practical Techniques for Improving the Efficiency and Usability of Mutation Analysis for Java Programs
  83. Introduction Mutation Analysis Empirical Evaluation Conclusion Fundamental Concepts Mutation Analysis

    Challenges Mutant Generation Mutation Operators Program Mutants Often Yields a Substantial Num- ber of Mutants High Time Over- head for Generation Mutation Analysis Tests Results Individually Executing the Mutants is Too Expensive Prior Solutions? Kapfhammer Allegheny College Practical Techniques for Improving the Efficiency and Usability of Mutation Analysis for Java Programs
  84. Introduction Mutation Analysis Empirical Evaluation Conclusion Fundamental Concepts Prior Work

    in Mutation Analysis Improving Mutation Analysis Kapfhammer Allegheny College Practical Techniques for Improving the Efficiency and Usability of Mutation Analysis for Java Programs
  85. Introduction Mutation Analysis Empirical Evaluation Conclusion Fundamental Concepts Prior Work

    in Mutation Analysis Improving Mutation Analysis Offutt and Untch Kapfhammer Allegheny College Practical Techniques for Improving the Efficiency and Usability of Mutation Analysis for Java Programs
  86. Introduction Mutation Analysis Empirical Evaluation Conclusion Fundamental Concepts Prior Work

    in Mutation Analysis Improving Mutation Analysis Offutt and Untch Do Fewer Kapfhammer Allegheny College Practical Techniques for Improving the Efficiency and Usability of Mutation Analysis for Java Programs
  87. Introduction Mutation Analysis Empirical Evaluation Conclusion Fundamental Concepts Prior Work

    in Mutation Analysis Improving Mutation Analysis Offutt and Untch Do Fewer Sampling Selection Kapfhammer Allegheny College Practical Techniques for Improving the Efficiency and Usability of Mutation Analysis for Java Programs
  88. Introduction Mutation Analysis Empirical Evaluation Conclusion Fundamental Concepts Prior Work

    in Mutation Analysis Improving Mutation Analysis Offutt and Untch Do Fewer Do Smarter Kapfhammer Allegheny College Practical Techniques for Improving the Efficiency and Usability of Mutation Analysis for Java Programs
  89. Introduction Mutation Analysis Empirical Evaluation Conclusion Fundamental Concepts Prior Work

    in Mutation Analysis Improving Mutation Analysis Offutt and Untch Do Fewer Do Smarter Distributed Weak Mutation Kapfhammer Allegheny College Practical Techniques for Improving the Efficiency and Usability of Mutation Analysis for Java Programs
  90. Introduction Mutation Analysis Empirical Evaluation Conclusion Fundamental Concepts Prior Work

    in Mutation Analysis Improving Mutation Analysis Offutt and Untch Do Fewer Do Smarter Do Faster Kapfhammer Allegheny College Practical Techniques for Improving the Efficiency and Usability of Mutation Analysis for Java Programs
  91. Introduction Mutation Analysis Empirical Evaluation Conclusion Fundamental Concepts Prior Work

    in Mutation Analysis Improving Mutation Analysis Offutt and Untch Do Fewer Do Smarter Do Faster Compiler Integrated Bytecode Transformation Mutant Schemata Kapfhammer Allegheny College Practical Techniques for Improving the Efficiency and Usability of Mutation Analysis for Java Programs
  92. Introduction Mutation Analysis Empirical Evaluation Conclusion Fundamental Concepts Prior Work

    in Mutation Analysis Improving Mutation Analysis Offutt and Untch Do Fewer Do Smarter Do Faster Higher Order Mutation Jia and Harman Kapfhammer Allegheny College Practical Techniques for Improving the Efficiency and Usability of Mutation Analysis for Java Programs
  93. Introduction Mutation Analysis Empirical Evaluation Conclusion Mutation Analysis with MAJOR

    Practical Mutation Analysis Practical (adjective): 1 Of or concerned with the actual doing or use of something rather than with theory and ideas 2 (of an idea, plan, or method) Likely to succeed or be effective in real circumstances; feasible 3 Suitable for a particular purpose Kapfhammer Allegheny College Practical Techniques for Improving the Efficiency and Usability of Mutation Analysis for Java Programs
  94. Introduction Mutation Analysis Empirical Evaluation Conclusion Mutation Analysis with MAJOR

    Practical Mutation Analysis Practical (adjective): 1 Of or concerned with the actual doing or use of something rather than with theory and ideas 2 (of an idea, plan, or method) Likely to succeed or be effective in real circumstances; feasible 3 Suitable for a particular purpose What are the practical techniques that MAJOR employs for improving the efficiency and usability of mutation analysis? Kapfhammer Allegheny College Practical Techniques for Improving the Efficiency and Usability of Mutation Analysis for Java Programs
  95. Introduction Mutation Analysis Empirical Evaluation Conclusion Mutation Analysis with MAJOR

    Conditional Mutation Conditional Mutation Kapfhammer Allegheny College Practical Techniques for Improving the Efficiency and Usability of Mutation Analysis for Java Programs
  96. Introduction Mutation Analysis Empirical Evaluation Conclusion Mutation Analysis with MAJOR

    Conditional Mutation Conditional Mutation Encapsulates all mutants within the same block Kapfhammer Allegheny College Practical Techniques for Improving the Efficiency and Usability of Mutation Analysis for Java Programs
  97. Introduction Mutation Analysis Empirical Evaluation Conclusion Mutation Analysis with MAJOR

    Conditional Mutation Conditional Mutation Encapsulates all mutants within the same block Can be inte- grated within the compiler Kapfhammer Allegheny College Practical Techniques for Improving the Efficiency and Usability of Mutation Analysis for Java Programs
  98. Introduction Mutation Analysis Empirical Evaluation Conclusion Mutation Analysis with MAJOR

    Conditional Mutation Conditional Mutation Encapsulates all mutants within the same block Transforms the abstract syntax tree (AST) Can be inte- grated within the compiler Kapfhammer Allegheny College Practical Techniques for Improving the Efficiency and Usability of Mutation Analysis for Java Programs
  99. Introduction Mutation Analysis Empirical Evaluation Conclusion Mutation Analysis with MAJOR

    Conditional Mutation Conditional Mutation Encapsulates all mutants within the same block Transforms the abstract syntax tree (AST) Stmt → Conditional Stmt (if-then-else, switch) Expr → Conditional Expr (conditional operator ?:) Can be inte- grated within the compiler Kapfhammer Allegheny College Practical Techniques for Improving the Efficiency and Usability of Mutation Analysis for Java Programs
  100. Introduction Mutation Analysis Empirical Evaluation Conclusion Mutation Analysis with MAJOR

    Transforming the AST public int eval(int x){ int a=3, b=1, y; y = a * x ; y += b; return y; } Kapfhammer Allegheny College Practical Techniques for Improving the Efficiency and Usability of Mutation Analysis for Java Programs
  101. Introduction Mutation Analysis Empirical Evaluation Conclusion Mutation Analysis with MAJOR

    Transforming the AST public int eval(int x){ int a=3, b=1, y; y = a * x ; y += b; return y; } ⇓ ASSIGN IDENT y BINARY ∗ a x Kapfhammer Allegheny College Practical Techniques for Improving the Efficiency and Usability of Mutation Analysis for Java Programs
  102. Introduction Mutation Analysis Empirical Evaluation Conclusion Mutation Analysis with MAJOR

    Transforming the AST public int eval(int x){ int a=3, b=1, y; y = a * x ; y += b; return y; } ⇓ ASSIGN IDENT y BINARY ∗ a x Kapfhammer Allegheny College Practical Techniques for Improving the Efficiency and Usability of Mutation Analysis for Java Programs
  103. Introduction Mutation Analysis Empirical Evaluation Conclusion Mutation Analysis with MAJOR

    Transforming the AST public int eval(int x){ int a=3, b=1, y; y = a * x ; y += b; return y; } ⇓ ASSIGN IDENT y BINARY ∗ a x =⇒ =⇒ ASSIGN IDENT y COND-EXPR THEN BINARY + a x COND (M NO ==2) ELSE COND-EXPR THEN BINARY - a x COND (M NO ==1) ELSE BINARY ∗ a x Kapfhammer Allegheny College Practical Techniques for Improving the Efficiency and Usability of Mutation Analysis for Java Programs
  104. Introduction Mutation Analysis Empirical Evaluation Conclusion Mutation Analysis with MAJOR

    Source Code View of Inserting Mutants public int eval(int x){ int a=3, b=1, y; y = a * x ; y += b; return y; } 1 Define mutation operators MOP(x ∗ y) = {x − y, x + y, x/y} 2 Determine whether current expression or statement is affected by mutation 3 Apply mutation operators Kapfhammer Allegheny College Practical Techniques for Improving the Efficiency and Usability of Mutation Analysis for Java Programs
  105. Introduction Mutation Analysis Empirical Evaluation Conclusion Mutation Analysis with MAJOR

    Source Code View of Inserting Mutants public int eval(int x){ int a=3, b=1, y; y = a * x ; y += b; return y; } 1 Define mutation operators MOP(x ∗ y) = {x − y, x + y, x/y} 2 Determine whether current expression or statement is affected by mutation 3 Apply mutation operators Kapfhammer Allegheny College Practical Techniques for Improving the Efficiency and Usability of Mutation Analysis for Java Programs
  106. Introduction Mutation Analysis Empirical Evaluation Conclusion Mutation Analysis with MAJOR

    Source Code View of Inserting Mutants public int eval(int x){ int a=3, b=1, y; y = a * x ; y += b; return y; } 1 Define mutation operators MOP(x ∗ y) = {x − y, x + y, x/y} 2 Determine whether current expression or statement is affected by mutation 3 Apply mutation operators Kapfhammer Allegheny College Practical Techniques for Improving the Efficiency and Usability of Mutation Analysis for Java Programs
  107. Introduction Mutation Analysis Empirical Evaluation Conclusion Mutation Analysis with MAJOR

    Source Code View of Inserting Mutants public int eval(int x){ int a=3, b=1, y; y = (M_NO==1)? a - x : a * x ; y += b; return y; } 1 Define mutation operators MOP(x ∗ y) = {x − y, x + y, x/y} 2 Determine whether current expression or statement is affected by mutation 3 Apply mutation operators Kapfhammer Allegheny College Practical Techniques for Improving the Efficiency and Usability of Mutation Analysis for Java Programs
  108. Introduction Mutation Analysis Empirical Evaluation Conclusion Mutation Analysis with MAJOR

    Source Code View of Inserting Mutants public int eval(int x){ int a=3, b=1, y; y = (M_NO==2)? a + x : (M_NO==1)? a - x : a * x ; y += b; return y; } 1 Define mutation operators MOP(x ∗ y) = {x − y, x + y, x/y} 2 Determine whether current expression or statement is affected by mutation 3 Apply mutation operators Kapfhammer Allegheny College Practical Techniques for Improving the Efficiency and Usability of Mutation Analysis for Java Programs
  109. Introduction Mutation Analysis Empirical Evaluation Conclusion Mutation Analysis with MAJOR

    Source Code View of Inserting Mutants public int eval(int x){ int a=3, b=1, y; y = (M_NO==3)? a / x : (M_NO==2)? a + x : (M_NO==1)? a - x : a * x ; y += b; return y; } 1 Define mutation operators MOP(x ∗ y) = {x − y, x + y, x/y} 2 Determine whether current expression or statement is affected by mutation 3 Apply mutation operators Kapfhammer Allegheny College Practical Techniques for Improving the Efficiency and Usability of Mutation Analysis for Java Programs
  110. Introduction Mutation Analysis Empirical Evaluation Conclusion Mutation Analysis with MAJOR

    Source Code View of Inserting Mutants public int eval(int x){ int a=3, b=1, y; y = (M_NO==3)? a / x : (M_NO==2)? a + x : (M_NO==1)? a - x : a * x ; y += b; return y; } Mutants that are not ex- ecuted cannot be killed 1 Define mutation operators MOP(x ∗ y) = {x − y, x + y, x/y} 2 Determine whether current expression or statement is affected by mutation 3 Apply mutation operators Kapfhammer Allegheny College Practical Techniques for Improving the Efficiency and Usability of Mutation Analysis for Java Programs
  111. Introduction Mutation Analysis Empirical Evaluation Conclusion Mutation Analysis with MAJOR

    Collecting and Using Mutation Coverage public int eval(int x){ int a=3, b=1, y; y = (M_NO==3)? a / x : (M_NO==2)? a + x : (M_NO==1)? a - x : a * x ; y += b; return y; } Mutants that are not ex- ecuted cannot be killed Kapfhammer Allegheny College Practical Techniques for Improving the Efficiency and Usability of Mutation Analysis for Java Programs
  112. Introduction Mutation Analysis Empirical Evaluation Conclusion Mutation Analysis with MAJOR

    Collecting and Using Mutation Coverage public int eval(int x){ int a=3, b=1, y; y = (M_NO==3)? a / x : (M_NO==2)? a + x : (M_NO==1)? a - x : (M_NO==0 && COVERED(1,3))? a * x : a * x ; y += b; return y; } Mutants that are not ex- ecuted cannot be killed Determine covered mutants with addi- tional instrumentation Kapfhammer Allegheny College Practical Techniques for Improving the Efficiency and Usability of Mutation Analysis for Java Programs
  113. Introduction Mutation Analysis Empirical Evaluation Conclusion Mutation Analysis with MAJOR

    Collecting and Using Mutation Coverage public int eval(int x){ int a=3, b=1, y; y = (M_NO==3)? a / x : (M_NO==2)? a + x : (M_NO==1)? a - x : (M_NO==0 && COVERED(1,3))? a * x : a * x ; y += b; return y; } Mutants that are not ex- ecuted cannot be killed Determine covered mutants with addi- tional instrumentation Only execute and investi- gate the covered mutants Kapfhammer Allegheny College Practical Techniques for Improving the Efficiency and Usability of Mutation Analysis for Java Programs
  114. Introduction Mutation Analysis Empirical Evaluation Conclusion Mutation Analysis with MAJOR

    MAJOR’s Compiler MAJOR’s Compiler Kapfhammer Allegheny College Practical Techniques for Improving the Efficiency and Usability of Mutation Analysis for Java Programs
  115. Introduction Mutation Analysis Empirical Evaluation Conclusion Mutation Analysis with MAJOR

    MAJOR’s Compiler MAJOR’s Compiler Enhanced Standard Java Compiler Kapfhammer Allegheny College Practical Techniques for Improving the Efficiency and Usability of Mutation Analysis for Java Programs
  116. Introduction Mutation Analysis Empirical Evaluation Conclusion Mutation Analysis with MAJOR

    MAJOR’s Compiler MAJOR’s Compiler Enhanced Standard Java Compiler Source Files Kapfhammer Allegheny College Practical Techniques for Improving the Efficiency and Usability of Mutation Analysis for Java Programs
  117. Introduction Mutation Analysis Empirical Evaluation Conclusion Mutation Analysis with MAJOR

    MAJOR’s Compiler MAJOR’s Compiler Enhanced Standard Java Compiler Source Files Common Compiler Options Kapfhammer Allegheny College Practical Techniques for Improving the Efficiency and Usability of Mutation Analysis for Java Programs
  118. Introduction Mutation Analysis Empirical Evaluation Conclusion Mutation Analysis with MAJOR

    MAJOR’s Compiler MAJOR’s Compiler Enhanced Standard Java Compiler Source Files Common Compiler Options Domain Specific Language Kapfhammer Allegheny College Practical Techniques for Improving the Efficiency and Usability of Mutation Analysis for Java Programs
  119. Introduction Mutation Analysis Empirical Evaluation Conclusion Mutation Analysis with MAJOR

    MAJOR’s Compiler MAJOR’s Compiler Enhanced Standard Java Compiler Source Files Common Compiler Options Domain Specific Language Bytecode with Embedded Mutants Kapfhammer Allegheny College Practical Techniques for Improving the Efficiency and Usability of Mutation Analysis for Java Programs
  120. Introduction Mutation Analysis Empirical Evaluation Conclusion Mutation Analysis with MAJOR

    Integration into the Java Compiler Kapfhammer Allegheny College Practical Techniques for Improving the Efficiency and Usability of Mutation Analysis for Java Programs
  121. Introduction Mutation Analysis Empirical Evaluation Conclusion Mutation Analysis with MAJOR

    Integration into the Java Compiler Kapfhammer Allegheny College Practical Techniques for Improving the Efficiency and Usability of Mutation Analysis for Java Programs
  122. Introduction Mutation Analysis Empirical Evaluation Conclusion Mutation Analysis with MAJOR

    Integration into the Java Compiler Kapfhammer Allegheny College Practical Techniques for Improving the Efficiency and Usability of Mutation Analysis for Java Programs
  123. Introduction Mutation Analysis Empirical Evaluation Conclusion Mutation Analysis with MAJOR

    Integration into the Java Compiler Kapfhammer Allegheny College Practical Techniques for Improving the Efficiency and Usability of Mutation Analysis for Java Programs
  124. Introduction Mutation Analysis Empirical Evaluation Conclusion Mutation Analysis with MAJOR

    MAJOR’s Domain Specific Language // variable declaration listCOR={&&, ||, ==, !=}; // Define replacement list BIN(+)<"org"> -> {-,*}; BIN(*)<"org"> -> {/,%}; // Define own operator myOp{ BIN(&&) -> listCOR; BIN(||) -> listCOR; COR; LVR; } // Enable built-in operator AOR AOR<"org">; // Enable operator myOp myOp<"java.lang.System@println">; Kapfhammer Allegheny College Practical Techniques for Improving the Efficiency and Usability of Mutation Analysis for Java Programs
  125. Introduction Mutation Analysis Empirical Evaluation Conclusion Mutation Analysis with MAJOR

    MAJOR’s Domain Specific Language // variable declaration listCOR={&&, ||, ==, !=}; // Define replacement list BIN(+)<"org"> -> {-,*}; BIN(*)<"org"> -> {/,%}; // Define own operator myOp{ BIN(&&) -> listCOR; BIN(||) -> listCOR; COR; LVR; } // Enable built-in operator AOR AOR<"org">; // Enable operator myOp myOp<"java.lang.System@println">; Specify mutation operators in detail Kapfhammer Allegheny College Practical Techniques for Improving the Efficiency and Usability of Mutation Analysis for Java Programs
  126. Introduction Mutation Analysis Empirical Evaluation Conclusion Mutation Analysis with MAJOR

    MAJOR’s Domain Specific Language // variable declaration listCOR={&&, ||, ==, !=}; // Define replacement list BIN(+)<"org"> -> {-,*}; BIN(*)<"org"> -> {/,%}; // Define own operator myOp{ BIN(&&) -> listCOR; BIN(||) -> listCOR; COR; LVR; } // Enable built-in operator AOR AOR<"org">; // Enable operator myOp myOp<"java.lang.System@println">; Specify mutation operators in detail Define own mutation operator groups Kapfhammer Allegheny College Practical Techniques for Improving the Efficiency and Usability of Mutation Analysis for Java Programs
  127. Introduction Mutation Analysis Empirical Evaluation Conclusion Mutation Analysis with MAJOR

    MAJOR’s Domain Specific Language // variable declaration listCOR={&&, ||, ==, !=}; // Define replacement list BIN(+)<"org"> -> {-,*}; BIN(*)<"org"> -> {/,%}; // Define own operator myOp{ BIN(&&) -> listCOR; BIN(||) -> listCOR; COR; LVR; } // Enable built-in operator AOR AOR<"org">; // Enable operator myOp myOp<"java.lang.System@println">; Specify mutation operators in detail Define own mutation operator groups Enable operators for a specific package, class, or method Kapfhammer Allegheny College Practical Techniques for Improving the Efficiency and Usability of Mutation Analysis for Java Programs
  128. Introduction Mutation Analysis Empirical Evaluation Conclusion Mutation Analysis with MAJOR

    Optimized Mutation Analysis Process 1 Embed and compile all mutants 2 Run test suite on instrumented program 3 Sort tests according to their runtime 4 Perform mutation analysis with reordered test suite Kapfhammer Allegheny College Practical Techniques for Improving the Efficiency and Usability of Mutation Analysis for Java Programs
  129. Introduction Mutation Analysis Empirical Evaluation Conclusion Mutation Analysis with MAJOR

    Optimized Mutation Analysis Process 1 Embed and compile all mutants 2 Run test suite on instrumented program 3 Sort tests according to their runtime 4 Perform mutation analysis with reordered test suite Kapfhammer Allegheny College Practical Techniques for Improving the Efficiency and Usability of Mutation Analysis for Java Programs
  130. Introduction Mutation Analysis Empirical Evaluation Conclusion Mutation Analysis with MAJOR

    Optimized Mutation Analysis Process 1 Embed and compile all mutants 2 Run test suite on instrumented program 3 Sort tests according to their runtime 4 Perform mutation analysis with reordered test suite Kapfhammer Allegheny College Practical Techniques for Improving the Efficiency and Usability of Mutation Analysis for Java Programs
  131. Introduction Mutation Analysis Empirical Evaluation Conclusion Mutation Analysis with MAJOR

    Optimized Mutation Analysis Process 1 Embed and compile all mutants 2 Run test suite on instrumented program 3 Sort tests according to their runtime 4 Perform mutation analysis with reordered test suite Kapfhammer Allegheny College Practical Techniques for Improving the Efficiency and Usability of Mutation Analysis for Java Programs
  132. Introduction Mutation Analysis Empirical Evaluation Conclusion Compilation Efficiency Mutant Generation

    and Compilation 1 2 3 4 5 6 7 8 9 10 11 12 0 20000 40000 60000 80000 100000 120000 140000 Compiler runtime in seconds Number of mutants apache ant jfreechart itext java pathfinder commons math commons lang numerics4j Overhead for generating and compiling mutants is negligible Kapfhammer Allegheny College Practical Techniques for Improving the Efficiency and Usability of Mutation Analysis for Java Programs
  133. Introduction Mutation Analysis Empirical Evaluation Conclusion Compilation Efficiency Mutant Generation

    and Compilation 1 2 3 4 5 6 7 8 9 10 11 12 0 20000 40000 60000 80000 100000 120000 140000 Compiler runtime in seconds Number of mutants apache ant jfreechart itext java pathfinder commons math commons lang numerics4j Overhead for generating and compiling mutants is negligible Kapfhammer Allegheny College Practical Techniques for Improving the Efficiency and Usability of Mutation Analysis for Java Programs
  134. Introduction Mutation Analysis Empirical Evaluation Conclusion Compilation Efficiency Time and

    Space Overhead Application Mutants Runtime of test suite Memory consumption original instrumented original instrumented wcs wcs+cov aspectj 406,382 4.3 4.8 5.0 559 813 apache ant 60,258 331.0 335.0 346.0 237 293 jfreechart 68,782 15.0 18.0 23.0 220 303 itext 124,184 5.1 5.6 6.3 217 325 java pathfinder 37,331 17.0 22.0 29.0 182 217 commons math 67,895 67.0 83.0 98.0 153 225 commons lang 25,783 10.3 11.8 14.8 104 149 numerics4j 5,869 1.2 1.3 1.6 73 90 • Runtime overhead is application dependent • Larger for CPU-bound applications • Small for I/O-bound applications • Even for large projects, applicable on commodity workstations Kapfhammer Allegheny College Practical Techniques for Improving the Efficiency and Usability of Mutation Analysis for Java Programs
  135. Introduction Mutation Analysis Empirical Evaluation Conclusion Compilation Efficiency Time and

    Space Overhead Application Mutants Runtime of test suite Memory consumption original instrumented original instrumented wcs wcs+cov aspectj 406,382 4.3 4.8 5.0 559 813 apache ant 60,258 331.0 335.0 346.0 237 293 jfreechart 68,782 15.0 18.0 23.0 220 303 itext 124,184 5.1 5.6 6.3 217 325 java pathfinder 37,331 17.0 22.0 29.0 182 217 commons math 67,895 67.0 83.0 98.0 153 225 commons lang 25,783 10.3 11.8 14.8 104 149 numerics4j 5,869 1.2 1.3 1.6 73 90 • Runtime overhead is application dependent • Larger for CPU-bound applications • Small for I/O-bound applications • Even for large projects, applicable on commodity workstations Kapfhammer Allegheny College Practical Techniques for Improving the Efficiency and Usability of Mutation Analysis for Java Programs
  136. Introduction Mutation Analysis Empirical Evaluation Conclusion Compilation Efficiency Time and

    Space Overhead Application Mutants Runtime of test suite Memory consumption original instrumented original instrumented wcs wcs+cov aspectj 406,382 4.3 4.8 5.0 559 813 apache ant 60,258 331.0 335.0 346.0 237 293 jfreechart 68,782 15.0 18.0 23.0 220 303 itext 124,184 5.1 5.6 6.3 217 325 java pathfinder 37,331 17.0 22.0 29.0 182 217 commons math 67,895 67.0 83.0 98.0 153 225 commons lang 25,783 10.3 11.8 14.8 104 149 numerics4j 5,869 1.2 1.3 1.6 73 90 • Runtime overhead is application dependent • Larger for CPU-bound applications • Small for I/O-bound applications • Even for large projects, applicable on commodity workstations Kapfhammer Allegheny College Practical Techniques for Improving the Efficiency and Usability of Mutation Analysis for Java Programs
  137. Introduction Mutation Analysis Empirical Evaluation Conclusion Compilation Efficiency Time and

    Space Overhead Application Mutants Runtime of test suite Memory consumption original instrumented original instrumented wcs wcs+cov aspectj 406,382 4.3 4.8 5.0 559 813 apache ant 60,258 331.0 335.0 346.0 237 293 jfreechart 68,782 15.0 18.0 23.0 220 303 itext 124,184 5.1 5.6 6.3 217 325 java pathfinder 37,331 17.0 22.0 29.0 182 217 commons math 67,895 67.0 83.0 98.0 153 225 commons lang 25,783 10.3 11.8 14.8 104 149 numerics4j 5,869 1.2 1.3 1.6 73 90 • Runtime overhead is application dependent • Larger for CPU-bound applications • Small for I/O-bound applications • Even for large projects, applicable on commodity workstations Kapfhammer Allegheny College Practical Techniques for Improving the Efficiency and Usability of Mutation Analysis for Java Programs
  138. Introduction Mutation Analysis Empirical Evaluation Conclusion Compilation Efficiency Time and

    Space Overhead Application Mutants Runtime of test suite Memory consumption original instrumented original instrumented wcs wcs+cov aspectj 406,382 4.3 4.8 5.0 559 813 apache ant 60,258 331.0 335.0 346.0 237 293 jfreechart 68,782 15.0 18.0 23.0 220 303 itext 124,184 5.1 5.6 6.3 217 325 java pathfinder 37,331 17.0 22.0 29.0 182 217 commons math 67,895 67.0 83.0 98.0 153 225 commons lang 25,783 10.3 11.8 14.8 104 149 numerics4j 5,869 1.2 1.3 1.6 73 90 • Runtime overhead is application dependent • Larger for CPU-bound applications • Small for I/O-bound applications • Even for large projects, applicable on commodity workstations Kapfhammer Allegheny College Practical Techniques for Improving the Efficiency and Usability of Mutation Analysis for Java Programs
  139. Introduction Mutation Analysis Empirical Evaluation Conclusion Mutation Analysis Efficiency Evaluating

    and Improving Mutation Analysis 0 20 40 60 80 100 120 140 160 180 0 20 40 60 80 100 Number of killed mutants Runtime in seconds optimized order (using coverage information) random order (using coverage information) original order (using coverage information) optimized order (without coverage information) random order (without coverage information) original order (without coverage information) • Mutation analysis is not feasible without coverage information • Reordering the test suite significantly speeds up the process, especially if runtimes of tests differ by orders of magnitude Kapfhammer Allegheny College Practical Techniques for Improving the Efficiency and Usability of Mutation Analysis for Java Programs
  140. Introduction Mutation Analysis Empirical Evaluation Conclusion Mutation Analysis Efficiency Evaluating

    and Improving Mutation Analysis 0 20 40 60 80 100 120 140 160 180 0 20 40 60 80 100 Number of killed mutants Runtime in seconds optimized order (using coverage information) random order (using coverage information) original order (using coverage information) optimized order (without coverage information) random order (without coverage information) original order (without coverage information) • Mutation analysis is not feasible without coverage information • Reordering the test suite significantly speeds up the process, especially if runtimes of tests differ by orders of magnitude Kapfhammer Allegheny College Practical Techniques for Improving the Efficiency and Usability of Mutation Analysis for Java Programs
  141. Introduction Mutation Analysis Empirical Evaluation Conclusion Mutation Analysis Efficiency Evaluating

    and Improving Mutation Analysis 0 20 40 60 80 100 120 140 160 180 0 20 40 60 80 100 Number of killed mutants Runtime in seconds optimized order (using coverage information) random order (using coverage information) original order (using coverage information) optimized order (without coverage information) random order (without coverage information) original order (without coverage information) • Mutation analysis is not feasible without coverage information • Reordering the test suite significantly speeds up the process, especially if runtimes of tests differ by orders of magnitude Kapfhammer Allegheny College Practical Techniques for Improving the Efficiency and Usability of Mutation Analysis for Java Programs
  142. Introduction Mutation Analysis Empirical Evaluation Conclusion Retrospective Revisiting Practical Mutation

    Analysis Practical (adjective): 1 Of or concerned with the actual doing or use of something rather than with theory and ideas 2 (of an idea, plan, or method) Likely to succeed or be effective in real circumstances; feasible 3 Suitable for a particular purpose Kapfhammer Allegheny College Practical Techniques for Improving the Efficiency and Usability of Mutation Analysis for Java Programs
  143. Introduction Mutation Analysis Empirical Evaluation Conclusion Retrospective Revisiting Practical Mutation

    Analysis Practical (adjective): 1 Of or concerned with the actual doing or use of something rather than with theory and ideas 2 (of an idea, plan, or method) Likely to succeed or be effective in real circumstances; feasible 3 Suitable for a particular purpose The evidence suggests that MAJOR is “likely to succeed or be effective” in real-world software testing circumstances Kapfhammer Allegheny College Practical Techniques for Improving the Efficiency and Usability of Mutation Analysis for Java Programs
  144. Introduction Mutation Analysis Empirical Evaluation Conclusion Retrospective Reviewing MAJOR’s Contributions

    Mutation Analysis Kapfhammer Allegheny College Practical Techniques for Improving the Efficiency and Usability of Mutation Analysis for Java Programs
  145. Introduction Mutation Analysis Empirical Evaluation Conclusion Retrospective Reviewing MAJOR’s Contributions

    Mutation Analysis Efficiency: MAJOR has ac- ceptable time and space over- heads and scales to large, real-world programs Kapfhammer Allegheny College Practical Techniques for Improving the Efficiency and Usability of Mutation Analysis for Java Programs
  146. Introduction Mutation Analysis Empirical Evaluation Conclusion Retrospective Reviewing MAJOR’s Contributions

    Mutation Analysis Efficiency: MAJOR has ac- ceptable time and space over- heads and scales to large, real-world programs Usability: MAJOR’s inte- gration into the Java SE compiler makes it a no- hassle, drop-in tool Kapfhammer Allegheny College Practical Techniques for Improving the Efficiency and Usability of Mutation Analysis for Java Programs
  147. Introduction Mutation Analysis Empirical Evaluation Conclusion Retrospective Reviewing MAJOR’s Contributions

    Mutation Analysis Efficiency: MAJOR has ac- ceptable time and space over- heads and scales to large, real-world programs Usability: MAJOR’s inte- gration into the Java SE compiler makes it a no- hassle, drop-in tool We will release MAJOR as free and open source software Kapfhammer Allegheny College Practical Techniques for Improving the Efficiency and Usability of Mutation Analysis for Java Programs
  148. Introduction Mutation Analysis Empirical Evaluation Conclusion Conclusions and Future Work

    Conclusion Key Concepts and Features: • Compiler-integrated solution • Conditional mutation with the abstract syntax tree • Furnishes its own domain specific language • Collects and leverages mutation coverage information Kapfhammer Allegheny College Practical Techniques for Improving the Efficiency and Usability of Mutation Analysis for Java Programs
  149. Introduction Mutation Analysis Empirical Evaluation Conclusion Conclusions and Future Work

    Conclusion Key Concepts and Features: • Compiler-integrated solution • Conditional mutation with the abstract syntax tree • Furnishes its own domain specific language • Collects and leverages mutation coverage information Characteristics of MAJOR: • Fast and scalable technique • Configurable and extensible mutation tool • Enables an optimized workflow for mutation analysis Kapfhammer Allegheny College Practical Techniques for Improving the Efficiency and Usability of Mutation Analysis for Java Programs
  150. Practical Techniques for Improving the Efficiency and Usability of Mutation

    Analysis for Java Programs Gregory M. Kapfhammer Department of Computer Science Allegheny College http://www.cs.allegheny.edu/∼gkapfham/ Thank you for your attention! I welcome your questions and comments.