SlideShare ist ein Scribd-Unternehmen logo
1 von 36
Downloaden Sie, um offline zu lesen
Correctness Attraction: A Study of Stability
of Software Behavior Under Runtime
Perturbation
Benjamin DANGLOT
December 6th
, 2017
benjamin.danglot@inria.fr
Kungliga Tekniska H¨ogskolan (KTH) - European Chaos Engineering Day
1/16
Introduction
Dijkstra:
“the smallest possible perturbations – i.e. changes of a single
bit – can have the most drastic consequences.”
2/16
Goal: Explore The Perturbability Envelop of Software
RQ: How does Software behave under perturbation?
3/16
Goal: Explore The Perturbability Envelop of Software
RQ: How does Software behave under perturbation?
Perturbation is a change that occurs runtime (= mutant).
3/16
Goal: Explore The Perturbability Envelop of Software
RQ: How does Software behave under perturbation?
Perturbation is a change that occurs runtime (= mutant).
Attract Protocol: Explore the perturbability of Software:
3/16
Goal: Explore The Perturbability Envelop of Software
RQ: How does Software behave under perturbation?
Perturbation is a change that occurs runtime (= mutant).
Attract Protocol: Explore the perturbability of Software:
• Exploring exhaustively
3/16
Goal: Explore The Perturbability Envelop of Software
RQ: How does Software behave under perturbation?
Perturbation is a change that occurs runtime (= mutant).
Attract Protocol: Explore the perturbability of Software:
• Exploring exhaustively
• Using perfect oracle
3/16
The Attract Protocol
The Attract Protocol: Example
input: bound = 8
Iteration acc i
1 2 8
2 3 7
3 3 6
4 3 5
5 3 4
6 3 3
7 3 2
8 3 1
output: acc = 3
4/16
The Attract Protocol: Example
input: bound = 8
Iteration acc i
1 2 8
2 3 7
3 3 6
4 3 5
5 3 4
6 3 3
7 3 2
8 3 1
output: acc = 3
4/16
The Attract Protocol: Perturbation Points
5/16
The Attract Protocol: Perturbation Points
5/16
The Attract Protocol: Perturbation Points
5/16
The Attract Protocol: Perturbation Points
5/16
The Attract Protocol: Perturbed Execution
input: bound = 8
Iteration
acc i acc i
1 2 8 2 8
2 3 7 2 7 +1
3 3 6 3 6
4 3 5 3 5
5 3 4 3 4
6 3 3 3 3
7 3 2 3 2
8 3 1 3 1
output: acc = 3
6/16
The Attract Protocol: Perturbed Execution
input: bound = 8
Iteration
acc i acc i
1 2 8 2 8
2 3 7 2 7 +1
3 3 6 3 6
4 3 5 3 5
5 3 4 3 4
6 3 3 3 3
7 3 2 3 2
8 3 1 3 1
output: acc = 3
6/16
The Attract Protocol: Applied On The Example
• Inputs : bound ∈ [0; 100]
• 4950 perturbed executions
• 99.90% correctness ratio
• 5 failed executions (0.1%)
7/16
The Attract Protocol: Exhaustive Exploration
Reference Execution Perturbed Execution 1 Perturbed Execution 2 Perturbed Execution 5
It. acc i
1 2 8
2 3 7
3 3 6
4 3 5
5 3 4
6 3 3
7 3 2
8 3 1
acc i
2 8 +1
3 7
3 6
3 5
3 4
3 3
3 2
3 1
acc i
2 8
2 7+1
3 6
3 5
3 4
3 3
3 2
3 1
acc i
2 8
3 7
3 6
3 5
1 4 +1
1 3
1 2
1 1
output: acc = 3 output: acc = 3 output: acc = 3 output: acc = 1
8/16
The Attract Protocol: Perfect Oracle
Reference Execution Perturbed Execution 1 Perturbed Execution 2 Perturbed Execution 5
It. acc i
1 2 8
2 3 7
3 3 6
4 3 5
5 3 4
6 3 3
7 3 2
8 3 1
acc i
2 8 +1
3 7
3 6
3 5
3 4
3 3
3 2
3 1
acc i
2 8
2 7+1
3 6
3 5
3 4
3 3
3 2
3 1
acc i
2 8
3 7
3 6
3 5
1 4 +1
1 3
1 2
1 1
output: acc = 3 output: acc = 3 output: acc = 3 output: acc = 1
8/16
The Attract Protocol: Core Algorithm
1 instrument(prog);
2 for each input i in I do
3 n[pp, i] ← runWithoutPerturbation(prog, i)∀pp ∈ prog;
4 for each perturbation point pp in prog do
5 for j = 0, to n[pp, i] do
6 o ← runWithPerturbationAt(prog, i, pp, j);
7 if oracle.assert(i, o) then
8 success ← success + 1;
9 else
10 failure ← failure + 1;
11 end
12 end
13 end
14 end 9/16
Experiment
Experiment: PONE
+1 on every integer expression for each call of each perturbation point
10/16
Experiment: PONE
+1 on every integer expression for each call of each perturbation point
Subject Nint
pp —Search space— correctness ratio
quicksort 41 151444 ––––––– 77.6 %
zip 19 38840 ––––––– 76.09 %
sudoku 89 98211 –––––– 68.8 %
md5 164 237680 –– 29.67 %
rsa 117 2576 ––––– 54.97 %
rc4 115 165140 ––– 38.04 %
canny 450 616161 ––––––––– 94.55 %
lcs 79 231786 –––––––– 89.93 %
laguerre 72 423454 ––––––––– 90.64 %
linreg 75 543720 –––– 47.88 %
total 1221 2509012 –––––– 66.817 %
10/16
Answer
RQ: How does Software behave under perturbation?
11/16
Answer
RQ: How does Software behave under perturbation?
Answer:
• In 1676446(66.817%) of 2509012 perturbed executions,
the final output is perfectly correct.
• Software are able to recover from perturbation, and
produce the perfect output.
11/16
Answer: Correctness Attraction
perturbation
correctness
attraction
perturbation
correctness
wreckage
12/16
Demo
Demo: What it does?
First fine-grained chaos inside a “production” application.
• Explore the perturbability of a web application
• Running an instrumented version of a e-commerce app
• At each request, one perturbation point is enabled
• The perturbation is +1 on integer expressions
13/16
Demo: screen
14/16
Future Works
Future Works
• Future RQ1: How does the “strength” of the perturbation
impact the correctness ratio: i.e. +1000 instead of +1, or
50% of probability to enable each perturbation point? ⇒
increase the Chaos.
• Future RQ2: How does “production” Software behave under
the Attract protocol?
• Future RQ3: Does the correctness ratio can be used as proxy
to measure the “Antifragility” / “Resiliency” of Software?
• Future RQ4: Could we engineer our Software to increase the
Correctness and so increase the “Resiliency”?
15/16
Conclusion
Conclusion
perturbation
correctness
attraction
perturbation
correctness
wreckage
• Exhaustive Exploration
• Perfect Oracle
Subject
correctness ratio
quicksort ––––––– 77.6 %
zip ––––––– 76.09 %
sudoku –––––– 68.8 %
md5 –– 29.67 %
rsa ––––– 54.97 %
rc4 ––– 38.04 %
canny ––––––––– 94.55 %
lcs –––––––– 89.93 %
laguerre ––––––––– 90.64 %
linreg –––– 47.88 %
total –––––– 66.817 %
16/16
Correctness VS Approximate Computing
Approximate Computing accepts light degradation of the output
VS
Correctness expects a PERFECT output
17/16
Taxonomy
Taxonomy
Taxonomy of 7 reasons of Correctness Attraction:
• Natural randomness
• Relaxed problem
• Nullified perturbation
• Overfit to input data
• Potential alternative executions
• Fixed point effect
• Extra resources
18/16
Threats To Validity
Internal threats
• Bugs in the implementation
External threats
• Limited dataset: 10 projects, only Java
• Overfitting on input values
19/16

Weitere ähnliche Inhalte

Ähnlich wie Correctness attraction __kth_2017

Streaming Dataflow with Apache Flink
Streaming Dataflow with Apache Flink Streaming Dataflow with Apache Flink
Streaming Dataflow with Apache Flink huguk
 
Assessing Test Case Prioritization on Real Faults and Mutants
Assessing Test Case Prioritization on Real Faults and MutantsAssessing Test Case Prioritization on Real Faults and Mutants
Assessing Test Case Prioritization on Real Faults and MutantsKevin Moran
 
DARPA CGC and DEFCON CTF: Automatic Attack and Defense Technique
DARPA CGC and DEFCON CTF: Automatic Attack and Defense TechniqueDARPA CGC and DEFCON CTF: Automatic Attack and Defense Technique
DARPA CGC and DEFCON CTF: Automatic Attack and Defense TechniqueChong-Kuan Chen
 
Os2 2
Os2 2Os2 2
Os2 2issbp
 
Automated Program Repair, Distinguished lecture at MPI-SWS
Automated Program Repair, Distinguished lecture at MPI-SWSAutomated Program Repair, Distinguished lecture at MPI-SWS
Automated Program Repair, Distinguished lecture at MPI-SWSAbhik Roychoudhury
 
Event Stream Processing with BeepBeep 3
Event Stream Processing with BeepBeep 3Event Stream Processing with BeepBeep 3
Event Stream Processing with BeepBeep 3Sylvain Hallé
 
Need for Async: Hot pursuit for scalable applications
Need for Async: Hot pursuit for scalable applicationsNeed for Async: Hot pursuit for scalable applications
Need for Async: Hot pursuit for scalable applicationsKonrad Malawski
 
Risking Everything with Akka Streams
Risking Everything with Akka StreamsRisking Everything with Akka Streams
Risking Everything with Akka Streamsjohofer
 
All-Solution Satisfiability Modulo Theories: applications, algorithms and ben...
All-Solution Satisfiability Modulo Theories: applications, algorithms and ben...All-Solution Satisfiability Modulo Theories: applications, algorithms and ben...
All-Solution Satisfiability Modulo Theories: applications, algorithms and ben...Quoc-Sang Phan
 
Print Testing
Print TestingPrint Testing
Print Testingdonwelch
 
Convergence
ConvergenceConvergence
Convergencedonwelch
 
EXTENT-2016: Industry Practices of Advanced Program Analysis
EXTENT-2016: Industry Practices of Advanced Program AnalysisEXTENT-2016: Industry Practices of Advanced Program Analysis
EXTENT-2016: Industry Practices of Advanced Program AnalysisIosif Itkin
 
The Ring programming language version 1.7 book - Part 85 of 196
The Ring programming language version 1.7 book - Part 85 of 196The Ring programming language version 1.7 book - Part 85 of 196
The Ring programming language version 1.7 book - Part 85 of 196Mahmoud Samir Fayed
 
Building resilient services in go
Building resilient services in goBuilding resilient services in go
Building resilient services in goJaehue Jang
 
啄木鸟Twisted
啄木鸟Twisted啄木鸟Twisted
啄木鸟TwistedXuYj
 
Apache Spark 2.0: A Deep Dive Into Structured Streaming - by Tathagata Das
Apache Spark 2.0: A Deep Dive Into Structured Streaming - by Tathagata Das Apache Spark 2.0: A Deep Dive Into Structured Streaming - by Tathagata Das
Apache Spark 2.0: A Deep Dive Into Structured Streaming - by Tathagata Das Databricks
 

Ähnlich wie Correctness attraction __kth_2017 (20)

Streaming Dataflow with Apache Flink
Streaming Dataflow with Apache Flink Streaming Dataflow with Apache Flink
Streaming Dataflow with Apache Flink
 
Assessing Test Case Prioritization on Real Faults and Mutants
Assessing Test Case Prioritization on Real Faults and MutantsAssessing Test Case Prioritization on Real Faults and Mutants
Assessing Test Case Prioritization on Real Faults and Mutants
 
Static Analysis and Verification of C Programs
Static Analysis and Verification of C ProgramsStatic Analysis and Verification of C Programs
Static Analysis and Verification of C Programs
 
DARPA CGC and DEFCON CTF: Automatic Attack and Defense Technique
DARPA CGC and DEFCON CTF: Automatic Attack and Defense TechniqueDARPA CGC and DEFCON CTF: Automatic Attack and Defense Technique
DARPA CGC and DEFCON CTF: Automatic Attack and Defense Technique
 
Fundamentals of Programming Chapter 7
Fundamentals of Programming Chapter 7Fundamentals of Programming Chapter 7
Fundamentals of Programming Chapter 7
 
C++ programming
C++ programmingC++ programming
C++ programming
 
C++ programming
C++ programmingC++ programming
C++ programming
 
Os2 2
Os2 2Os2 2
Os2 2
 
Automated Program Repair, Distinguished lecture at MPI-SWS
Automated Program Repair, Distinguished lecture at MPI-SWSAutomated Program Repair, Distinguished lecture at MPI-SWS
Automated Program Repair, Distinguished lecture at MPI-SWS
 
Event Stream Processing with BeepBeep 3
Event Stream Processing with BeepBeep 3Event Stream Processing with BeepBeep 3
Event Stream Processing with BeepBeep 3
 
Need for Async: Hot pursuit for scalable applications
Need for Async: Hot pursuit for scalable applicationsNeed for Async: Hot pursuit for scalable applications
Need for Async: Hot pursuit for scalable applications
 
Risking Everything with Akka Streams
Risking Everything with Akka StreamsRisking Everything with Akka Streams
Risking Everything with Akka Streams
 
All-Solution Satisfiability Modulo Theories: applications, algorithms and ben...
All-Solution Satisfiability Modulo Theories: applications, algorithms and ben...All-Solution Satisfiability Modulo Theories: applications, algorithms and ben...
All-Solution Satisfiability Modulo Theories: applications, algorithms and ben...
 
Print Testing
Print TestingPrint Testing
Print Testing
 
Convergence
ConvergenceConvergence
Convergence
 
EXTENT-2016: Industry Practices of Advanced Program Analysis
EXTENT-2016: Industry Practices of Advanced Program AnalysisEXTENT-2016: Industry Practices of Advanced Program Analysis
EXTENT-2016: Industry Practices of Advanced Program Analysis
 
The Ring programming language version 1.7 book - Part 85 of 196
The Ring programming language version 1.7 book - Part 85 of 196The Ring programming language version 1.7 book - Part 85 of 196
The Ring programming language version 1.7 book - Part 85 of 196
 
Building resilient services in go
Building resilient services in goBuilding resilient services in go
Building resilient services in go
 
啄木鸟Twisted
啄木鸟Twisted啄木鸟Twisted
啄木鸟Twisted
 
Apache Spark 2.0: A Deep Dive Into Structured Streaming - by Tathagata Das
Apache Spark 2.0: A Deep Dive Into Structured Streaming - by Tathagata Das Apache Spark 2.0: A Deep Dive Into Structured Streaming - by Tathagata Das
Apache Spark 2.0: A Deep Dive Into Structured Streaming - by Tathagata Das
 

Kürzlich hochgeladen

School management system project Report.pdf
School management system project Report.pdfSchool management system project Report.pdf
School management system project Report.pdfKamal Acharya
 
AIRCANVAS[1].pdf mini project for btech students
AIRCANVAS[1].pdf mini project for btech studentsAIRCANVAS[1].pdf mini project for btech students
AIRCANVAS[1].pdf mini project for btech studentsvanyagupta248
 
Double Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torqueDouble Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torqueBhangaleSonal
 
Standard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayStandard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayEpec Engineered Technologies
 
Rums floating Omkareshwar FSPV IM_16112021.pdf
Rums floating Omkareshwar FSPV IM_16112021.pdfRums floating Omkareshwar FSPV IM_16112021.pdf
Rums floating Omkareshwar FSPV IM_16112021.pdfsmsksolar
 
Design For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the startDesign For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the startQuintin Balsdon
 
Unleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapUnleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapRishantSharmaFr
 
A CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptx
A CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptxA CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptx
A CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptxmaisarahman1
 
Thermal Engineering Unit - I & II . ppt
Thermal Engineering  Unit - I & II . pptThermal Engineering  Unit - I & II . ppt
Thermal Engineering Unit - I & II . pptDineshKumar4165
 
Employee leave management system project.
Employee leave management system project.Employee leave management system project.
Employee leave management system project.Kamal Acharya
 
scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...
scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...
scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...HenryBriggs2
 
Online electricity billing project report..pdf
Online electricity billing project report..pdfOnline electricity billing project report..pdf
Online electricity billing project report..pdfKamal Acharya
 
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...Arindam Chakraborty, Ph.D., P.E. (CA, TX)
 
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptxS1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptxSCMS School of Architecture
 
notes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptnotes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptMsecMca
 
Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VDineshKumar4165
 
Thermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptThermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptDineshKumar4165
 
Tamil Call Girls Bhayandar WhatsApp +91-9930687706, Best Service
Tamil Call Girls Bhayandar WhatsApp +91-9930687706, Best ServiceTamil Call Girls Bhayandar WhatsApp +91-9930687706, Best Service
Tamil Call Girls Bhayandar WhatsApp +91-9930687706, Best Servicemeghakumariji156
 

Kürzlich hochgeladen (20)

School management system project Report.pdf
School management system project Report.pdfSchool management system project Report.pdf
School management system project Report.pdf
 
AIRCANVAS[1].pdf mini project for btech students
AIRCANVAS[1].pdf mini project for btech studentsAIRCANVAS[1].pdf mini project for btech students
AIRCANVAS[1].pdf mini project for btech students
 
Double Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torqueDouble Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torque
 
Standard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayStandard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power Play
 
Rums floating Omkareshwar FSPV IM_16112021.pdf
Rums floating Omkareshwar FSPV IM_16112021.pdfRums floating Omkareshwar FSPV IM_16112021.pdf
Rums floating Omkareshwar FSPV IM_16112021.pdf
 
Design For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the startDesign For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the start
 
Unleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapUnleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leap
 
A CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptx
A CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptxA CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptx
A CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptx
 
Thermal Engineering Unit - I & II . ppt
Thermal Engineering  Unit - I & II . pptThermal Engineering  Unit - I & II . ppt
Thermal Engineering Unit - I & II . ppt
 
Employee leave management system project.
Employee leave management system project.Employee leave management system project.
Employee leave management system project.
 
scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...
scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...
scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...
 
Online electricity billing project report..pdf
Online electricity billing project report..pdfOnline electricity billing project report..pdf
Online electricity billing project report..pdf
 
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
 
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptxS1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
 
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
 
notes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptnotes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.ppt
 
Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - V
 
Thermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptThermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.ppt
 
Tamil Call Girls Bhayandar WhatsApp +91-9930687706, Best Service
Tamil Call Girls Bhayandar WhatsApp +91-9930687706, Best ServiceTamil Call Girls Bhayandar WhatsApp +91-9930687706, Best Service
Tamil Call Girls Bhayandar WhatsApp +91-9930687706, Best Service
 
Integrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - NeometrixIntegrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - Neometrix
 

Correctness attraction __kth_2017

  • 1. Correctness Attraction: A Study of Stability of Software Behavior Under Runtime Perturbation Benjamin DANGLOT December 6th , 2017 benjamin.danglot@inria.fr Kungliga Tekniska H¨ogskolan (KTH) - European Chaos Engineering Day 1/16
  • 2. Introduction Dijkstra: “the smallest possible perturbations – i.e. changes of a single bit – can have the most drastic consequences.” 2/16
  • 3. Goal: Explore The Perturbability Envelop of Software RQ: How does Software behave under perturbation? 3/16
  • 4. Goal: Explore The Perturbability Envelop of Software RQ: How does Software behave under perturbation? Perturbation is a change that occurs runtime (= mutant). 3/16
  • 5. Goal: Explore The Perturbability Envelop of Software RQ: How does Software behave under perturbation? Perturbation is a change that occurs runtime (= mutant). Attract Protocol: Explore the perturbability of Software: 3/16
  • 6. Goal: Explore The Perturbability Envelop of Software RQ: How does Software behave under perturbation? Perturbation is a change that occurs runtime (= mutant). Attract Protocol: Explore the perturbability of Software: • Exploring exhaustively 3/16
  • 7. Goal: Explore The Perturbability Envelop of Software RQ: How does Software behave under perturbation? Perturbation is a change that occurs runtime (= mutant). Attract Protocol: Explore the perturbability of Software: • Exploring exhaustively • Using perfect oracle 3/16
  • 9. The Attract Protocol: Example input: bound = 8 Iteration acc i 1 2 8 2 3 7 3 3 6 4 3 5 5 3 4 6 3 3 7 3 2 8 3 1 output: acc = 3 4/16
  • 10. The Attract Protocol: Example input: bound = 8 Iteration acc i 1 2 8 2 3 7 3 3 6 4 3 5 5 3 4 6 3 3 7 3 2 8 3 1 output: acc = 3 4/16
  • 11. The Attract Protocol: Perturbation Points 5/16
  • 12. The Attract Protocol: Perturbation Points 5/16
  • 13. The Attract Protocol: Perturbation Points 5/16
  • 14. The Attract Protocol: Perturbation Points 5/16
  • 15. The Attract Protocol: Perturbed Execution input: bound = 8 Iteration acc i acc i 1 2 8 2 8 2 3 7 2 7 +1 3 3 6 3 6 4 3 5 3 5 5 3 4 3 4 6 3 3 3 3 7 3 2 3 2 8 3 1 3 1 output: acc = 3 6/16
  • 16. The Attract Protocol: Perturbed Execution input: bound = 8 Iteration acc i acc i 1 2 8 2 8 2 3 7 2 7 +1 3 3 6 3 6 4 3 5 3 5 5 3 4 3 4 6 3 3 3 3 7 3 2 3 2 8 3 1 3 1 output: acc = 3 6/16
  • 17. The Attract Protocol: Applied On The Example • Inputs : bound ∈ [0; 100] • 4950 perturbed executions • 99.90% correctness ratio • 5 failed executions (0.1%) 7/16
  • 18. The Attract Protocol: Exhaustive Exploration Reference Execution Perturbed Execution 1 Perturbed Execution 2 Perturbed Execution 5 It. acc i 1 2 8 2 3 7 3 3 6 4 3 5 5 3 4 6 3 3 7 3 2 8 3 1 acc i 2 8 +1 3 7 3 6 3 5 3 4 3 3 3 2 3 1 acc i 2 8 2 7+1 3 6 3 5 3 4 3 3 3 2 3 1 acc i 2 8 3 7 3 6 3 5 1 4 +1 1 3 1 2 1 1 output: acc = 3 output: acc = 3 output: acc = 3 output: acc = 1 8/16
  • 19. The Attract Protocol: Perfect Oracle Reference Execution Perturbed Execution 1 Perturbed Execution 2 Perturbed Execution 5 It. acc i 1 2 8 2 3 7 3 3 6 4 3 5 5 3 4 6 3 3 7 3 2 8 3 1 acc i 2 8 +1 3 7 3 6 3 5 3 4 3 3 3 2 3 1 acc i 2 8 2 7+1 3 6 3 5 3 4 3 3 3 2 3 1 acc i 2 8 3 7 3 6 3 5 1 4 +1 1 3 1 2 1 1 output: acc = 3 output: acc = 3 output: acc = 3 output: acc = 1 8/16
  • 20. The Attract Protocol: Core Algorithm 1 instrument(prog); 2 for each input i in I do 3 n[pp, i] ← runWithoutPerturbation(prog, i)∀pp ∈ prog; 4 for each perturbation point pp in prog do 5 for j = 0, to n[pp, i] do 6 o ← runWithPerturbationAt(prog, i, pp, j); 7 if oracle.assert(i, o) then 8 success ← success + 1; 9 else 10 failure ← failure + 1; 11 end 12 end 13 end 14 end 9/16
  • 22. Experiment: PONE +1 on every integer expression for each call of each perturbation point 10/16
  • 23. Experiment: PONE +1 on every integer expression for each call of each perturbation point Subject Nint pp —Search space— correctness ratio quicksort 41 151444 ––––––– 77.6 % zip 19 38840 ––––––– 76.09 % sudoku 89 98211 –––––– 68.8 % md5 164 237680 –– 29.67 % rsa 117 2576 ––––– 54.97 % rc4 115 165140 ––– 38.04 % canny 450 616161 ––––––––– 94.55 % lcs 79 231786 –––––––– 89.93 % laguerre 72 423454 ––––––––– 90.64 % linreg 75 543720 –––– 47.88 % total 1221 2509012 –––––– 66.817 % 10/16
  • 24. Answer RQ: How does Software behave under perturbation? 11/16
  • 25. Answer RQ: How does Software behave under perturbation? Answer: • In 1676446(66.817%) of 2509012 perturbed executions, the final output is perfectly correct. • Software are able to recover from perturbation, and produce the perfect output. 11/16
  • 27. Demo
  • 28. Demo: What it does? First fine-grained chaos inside a “production” application. • Explore the perturbability of a web application • Running an instrumented version of a e-commerce app • At each request, one perturbation point is enabled • The perturbation is +1 on integer expressions 13/16
  • 31. Future Works • Future RQ1: How does the “strength” of the perturbation impact the correctness ratio: i.e. +1000 instead of +1, or 50% of probability to enable each perturbation point? ⇒ increase the Chaos. • Future RQ2: How does “production” Software behave under the Attract protocol? • Future RQ3: Does the correctness ratio can be used as proxy to measure the “Antifragility” / “Resiliency” of Software? • Future RQ4: Could we engineer our Software to increase the Correctness and so increase the “Resiliency”? 15/16
  • 33. Conclusion perturbation correctness attraction perturbation correctness wreckage • Exhaustive Exploration • Perfect Oracle Subject correctness ratio quicksort ––––––– 77.6 % zip ––––––– 76.09 % sudoku –––––– 68.8 % md5 –– 29.67 % rsa ––––– 54.97 % rc4 ––– 38.04 % canny ––––––––– 94.55 % lcs –––––––– 89.93 % laguerre ––––––––– 90.64 % linreg –––– 47.88 % total –––––– 66.817 % 16/16
  • 34. Correctness VS Approximate Computing Approximate Computing accepts light degradation of the output VS Correctness expects a PERFECT output 17/16
  • 35. Taxonomy Taxonomy Taxonomy of 7 reasons of Correctness Attraction: • Natural randomness • Relaxed problem • Nullified perturbation • Overfit to input data • Potential alternative executions • Fixed point effect • Extra resources 18/16
  • 36. Threats To Validity Internal threats • Bugs in the implementation External threats • Limited dataset: 10 projects, only Java • Overfitting on input values 19/16