antifragile software and genetic improvement martin
play

Antifragile Software and Genetic Improvement Martin Monperrus - PowerPoint PPT Presentation

Antifragile Software and Genetic Improvement Martin Monperrus University of Lille & Inria, France CREST Open Workshop on Genetic Improvement Jan 2016 1 Martin Monperrus, University of Lille & Inria, France Exception Handling Analysis


  1. Antifragile Software and Genetic Improvement Martin Monperrus University of Lille & Inria, France CREST Open Workshop on Genetic Improvement Jan 2016 1 Martin Monperrus, University of Lille & Inria, France

  2. Exception Handling Analysis and Transformation Using Fault Injection: Study of Resilience Against Unanticipated Exceptions (IST 2014) try { prepare_meringue() add_cream() make_balls() add_chocolate_shavings() } catch (MissingChocolateEx e) { use_nutella(); } « Anticipated errors » 3 Martin Monperrus, University of Lille & Inria, France

  3. Expected errors in test suites Blue and white tests specify anticipated errors White tests specify resilience Test colors ● – Pink – Blue - White 4 Martin Monperrus, University of Lille & Inria, France

  4. Empirical results 100% 90% 80% 70% 60% 50% white 40% blue 30% pink 20% 10% 0% 3950 2046 2031 481 406 339 191 135 100 5 Martin Monperrus, University of Lille & Inria, France

  5. Our intuition: simulating unforeseen errors by perturbing test case execution 6 Martin Monperrus, University of Lille & Inria, France

  6. Why ? 7 Martin Monperrus, University of Lille & Inria, France

  7. Short circuit testing: Exception injection in test suites + White test throw new X() = 8 Martin Monperrus, University of Lille & Inria, France

  8. Source-Independence The try-catch blocks that keep the tests passing under exception injection are capable to handle unanticipated errors. We call them ''source-independent''. We call them ''source-independent''. Empirical assessment of resilience against unforeseen errors 9 Martin Monperrus, University of Lille & Inria, France

  9. Empirical Evaluation 45 40 35 30 25 dependent non agnostique independent agnostique 20 15 10 5 0 Commons-lang sonar core jbehave core sonar plugin api shindig-java-gadgets commons-codec shindig-common joda time spojo core 10 Martin Monperrus, University of Lille & Inria, France

  10. Test driver try{ // instrumentation code if(Controller.isCurrentTryCatchWithInjection()) IO throw new Exception(); } ... //normal try body ... } catch ( Exception e ) { IO // Genetic Improvement ... //normal catch body } 11 Martin Monperrus, University of Lille & Inria, France

  11. Limit cases Stack of try-catch at runtime // original // stretched Catch (OufofMemory) { Catch (OufofMemory) { Catch (NullPointer) { Catch (NullPointer) { Catch (IOException) { Catch (Exception) { throw new NullPointerException() } } } } } } 12 Martin Monperrus, University of Lille & Inria, France

  12. Empirical Evaluation shindig-common shindig-java-gadgets jbehave core sonar plugin dependent sonar core unstretchable independent stretchable spojo core joda time commons-codec commons-lang 0 5 10 15 20 25 30 35 13 Martin Monperrus, University of Lille & Inria, France

  13. Take-away “We inject exceptions during test suite execution to assess and improve resilience” References: Exception Handling Analysis and Transformation Using Fault Injection: Study of Resilience Against Unanticipated Exceptions (Benoit Cornu, Lionel Seinturier, Martin Monperrus), In Information and Software Technology, Elsevier, 2014. 14 Martin Monperrus, University of Lille & Inria, France

  14. Definition A thing is antifragile if it becomes better with stressors, shocks, volatility, noise, mistakes, faults, attacks, failures . . . (Antifragile, N. N. Taleb, 2013) 15 Martin Monperrus, University of Lille & Inria, France

  15. A software system is antifragile if it becomes better with failures, attacks, failures, misconfigurations, weird usages . . . (Principles of Antifragile Software, M. Monperrus, 2014) 16 Martin Monperrus, University of Lille & Inria, France

  16. Short circuit testing is antifragile: ● Better with exception injection ● Does not try to anticipate or predict 17 Martin Monperrus, University of Lille & Inria, France

  17. Chaos Monkey // Chaos Engineering // principlesofchaos.org, 2015 hypothesis ← perturbation, measure while (true) { perturb if (measure unacceptable) { report failure } } 18 Martin Monperrus, University of Lille & Inria, France

  18. Antifragile software engineering Core model: ● perturbation model ● perturbation controller ● perturbation cost ● perturbation gain http://www.monperrus.net/martin/antifragile-software 19 Martin Monperrus, University of Lille & Inria, France

Recommend


More recommend