milu a higher order mutation testing tool
play

Milu: A Higher Order Mutation Testing Tool Yue Jia University - PowerPoint PPT Presentation

Milu: A Higher Order Mutation Testing Tool Yue Jia University College London Joint work with Mark Harman and William Langdon Agenda Why Higher Order Mutation Testing? Search for interesting HOMs Milu mutation testing tool Scalability and


  1. Milu: A Higher Order Mutation Testing Tool Yue Jia University College London Joint work with Mark Harman and William Langdon

  2. Agenda Why Higher Order Mutation Testing? Search for interesting HOMs Milu mutation testing tool Scalability and Extendability Performance Study

  3. Mutation Testing First Order Mutants : A single change Simple faults / FOMs Higher Order Mutant : Multiple changes Multiple faults / HOMs

  4. Mutation Testing Subset of First Order Mutants are used No Higher Order Mutants at all!

  5. Mutation Testing Subset of First Order Mutants are used No Higher Order Mutants at all!

  6. Higher Order Mutation Testing The space of all mutants (first and higher order) is a search space, We should apply search based optimisation techniques to find mutants that are fit for purpose.

  7. Higher Order Mutation Testing Search for a small set of highly fit mutants within an enormous space, rather than to enumerate a complete set. Particle Swarm Optimization Tabu Search Ant Colonies Genetic Algorithms Hill Climbing Genetic Programming Simulated Annealing Random Greedy LP Estimation of Distribution Algorithms

  8. Higher Order Mutation Testing Search for a small set of highly fit mutants within an enormous space, rather than to enumerate a complete set. Particle Swarm Optimization Tabu Search Ant Colonies Genetic Algorithms Hill Climbing Genetic Programming Simulated Annealing Random Greedy LP Estimation of Distribution Algorithms

  9. Higher Order Mutation Testing Search for a small set of highly fit mutants within an enormous space, rather than to enumerate a complete set. Particle Swarm Optimization Tabu Search Ant Colonies Genetic Algorithms Hill Climbing Genetic Programming Simulated Annealing Random Greedy LP Estimation of Distribution Algorithms

  10. Interesting HOMs Most common case FOM a is killed by Test set T { 1, 2, 3, 4 } 1 2 3 4 Ta

  11. Interesting HOMs Most common case FOM a is killed by Test set T { 1, 2, 3, 4 } 1 FOM b is killed by 2 3 { 3, 4, 5, 6 } 4 5 Ta 6 Tb

  12. Interesting HOMs Most common case FOM a is killed by Test set T { 1, 2, 3, 4 } 1 FOM b is killed by 2 3 { 3, 4, 5, 6 } 4 5 Ta HOM ab is killed by 6 {1, 2, 3, 4, 5, 6} Tb

  13. Interesting HOMs Subsuming HOM FOM a is killed by Test set T { 1, 2, 3, 4 } 1 FOM b is killed by 2 3 { 3, 4, 5, 6 } 4 5 Ta HOM ab is killed by 6 {2, 3, 5} Tb

  14. Interesting HOMs Strongly Subsuming HOM FOM a is killed by Test set T { 1, 2, 3, 4 } 1 FOM b is killed by 2 3 { 3, 4, 5, 6 } 4 5 Ta HOM ab is killed by 6 { 3 } Tb

  15. Interesting HOMs Anti Coupling Effect HOM FOM a is killed by Test set T { 1, 2, 3, 4 } 1 FOM b is killed by 2 3 { 3, 4, 5, 6 } 4 5 Ta HOM ab is killed by 6 { 7 } Tb 7

  16. Interesting HOMs Equivalent HOM FOM a is killed by Test set T { 1, 2, 3, 4 } 1 FOM b is killed by 2 3 { 3, 4, 5, 6 } 4 5 Ta HOM ab is killed by 6 { } Tb

  17. Milu Strong mutation First and Higher Order Mutants For C program Test harness

  18. Milu Data Representation ------------------- ------------------- + Index ------------------- / ------------------- Position ------------------- + ------------------- * ------------------- 0 0 0 0

  19. Milu Data Representation ------------------- ------------------- - Index ------------------- / ------------------- Position ------------------- + ------------------- * ------------------- 1 0 0 0

  20. Milu Data Representation ------------------- ------------------- + Index ------------------- / ------------------- Position ------------------- * ------------------- * ------------------- 1 0 0 0 0 0 2 0

  21. Milu Data Representation ------------------- ------------------- - Index ------------------- / ------------------- Position ------------------- * ------------------- * ------------------- 1 0 0 0 0 0 2 0 1 0 2 0

  22. Milu Data Representation ------------------- ------------------- - Index ------------------- / ------------------- Position ------------------- * ------------------- * ------------------- 1 0 0 0 0 0 2 0 Mutation Id 1 0 2 0

  23. Milu Data Representation ------------------- ------------------- - Index ------------------- / ------------------- Position ------------------- * ------------------- * ------------------- 1 0 0 0 0 0 2 0 Mutation Id 1 0 2 0

  24. Milu Limitations Cannot scale up Hard to extend

  25. Solutions Implement the mutation component as a pass into GCC

  26. GCC Internal Front End Middle End Back End C C++ GENERIC GIMPLE RTL Assembly Java Fortran

  27. GCC Internal Front End Middle End Back End C C++ GENERIC GIMPLE RTL Assembly Java Fortran

  28. GCC Internal Source Front End Middle End Back End C C++ GENERIC GIMPLE RTL Assembly Java Fortran Milu pass

  29. Gimple SIMPLE IR of McCat compiler 3 address representation Control flow lowering Cleanups and simplification

  30. Gimple t1 = a + b; t2 = foo (t1, c) if (t2 != 0) If (foo (a + b, c)) { c = b++ /a ; t3 = b return c b = b+ 1 c = t3 / a } return c

  31. Implementation typedef void (*plugin_callback_func) (void *gcc_data, void *user_data); struct register_pass_info { struct opt_pass *pass; const char *reference_pass_name; int ref_pass_instance_number; enum pass_positioning_ops pos_op; };

  32. Advantages Supports all major languages: C, C++, Java, Fortran 95, Ada, Objective-C, Objective-C++, Go, etc Large number of platforms

  33. Demo

  34. Performance Test set Mutant Mutant Mutant Mutant Source Source Source Source Mutant Mutant Mutant Source Mutant Binary Binary Binary Binary

  35. Mutant Mutant Test set Source Source Binary 100-300 Loc , 1000 mutants, 100 test 1min 7 secs 5-10mins Binary Injection Gimple MSG Test harness

  36. Conclusion GCC Pass / Plugin Mutating real world program Multiple language mutation Multiple platform http://gcc.gnu.org/onlinedocs/gccint/Plugins.html http://www.inf.kcl.ac.uk/pg/jiayue/milu/

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend