10. Delta debugging Flashcards

1
Q

General Delta Debugging Algorithm

A

Divides input into larger blocks and tests all subsets for failures.
smaller and smaller if still failing, remove the passing ones

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

R

A

set of possible inputs

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

rp E R

A

corresponds to an input that passes

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

rf E R

A

corresponds to an input that fails

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Change (represented by a backwards 6)

A

is a mapping R->R which takes one input and changes it to another input

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

test:Powerset(cf)->

A

either P, F or ?

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Goal of delta debugging

A

find the smallest test case c such that test(c) = F

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

global minimum

A

a failing test case c of cf if every other smaller size test from cf does not cause the test to output F

smallest set of changes which will make the program fail
can require an exponential number of tests

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

1-minimal

A

Find a set of changes that cause the failure but removing any change causes the failure to go away

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

local minimum: failing test case c in cf

A

if for all c’ in c, test(c’) != F

c’ is all things not c

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

n-minimal: failing test case c in cf

A

if for all c’ in c, |c|-|c’| <= n –> test(c’) != F

if the difference in size between c and c’ is less than n then the test function applied to c’ does not return false

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

1-minimal: failing test case c in cf

A

if for all changes in c, test(c-{change}) != F

if we remove a change from c and it doesn’t = false

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Naive Algorithm for 1 minimal subset

A

if for all changesI in c, test(c-{changesI}) != F, then c is 1-minimal
else recurse on c-{change} for some change in c, test(c-{change}) = F

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Naive Algorithm for 1 minimal worst case runtime

A

O(N^2)

work is potentially N+ (n-1) + (n-2)…

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Minimization algorithms

A

Start with n=2
partition the set cf into delta1, delta2, …, deltan
define the complement of deltai as updsidedownDeltai=cf - deltai

test each test case defined by each partition and it complement
reduce the test case if a smaller failure inducing set is found, otherwise it refines the partition by n=n*2

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

minimization algorithm psuedo code

A
  1. n=2 and delta as test case
  2. test each delta and each nambla (upsidedown delta)
  3. Possible outcomes:
    3a. Some deltai causes failure: go to step 1 with delta =deltai and n=2
    3b. some namblai causes failure: go to step 1 with delta = namblai and n=n-1
    3c. no test causes failure: if granularity can be redefined, go to step1 with delta = delta and n=n*2. If not, Done. Found 1-minimal subset
17
Q

Example of minimization algo

A

lesson 10.28

18
Q

Use case of minimization?

A

fuzzing input
input find a failure but it is likely huge
so minimize the fuzz input

19
Q

Delta debugging is fully automatic

A

False

20
Q

Delta debugging finds the smallest failing subset of a failing input in polynomial time

A

false

21
Q

Delta Debugging finds 1-minimal instead of local minimum test case due to performance

A

true

22
Q

delta debugging may find a different sized subset of a failing input depending on the order in which it tests different input partitions

A

true

23
Q

delta debugging is also effective at reducing non-deterministically failing inputs

A

false

24
Q

Delta debugging bad news

A

probably must be re-implemented for each significant system to exploit knowledge changes
not portable

25
Q

delta debugging good news

A

relatively simple algorithm, big payoff

worth reimplementing