10. Delta debugging Flashcards
General Delta Debugging Algorithm
Divides input into larger blocks and tests all subsets for failures.
smaller and smaller if still failing, remove the passing ones
R
set of possible inputs
rp E R
corresponds to an input that passes
rf E R
corresponds to an input that fails
Change (represented by a backwards 6)
is a mapping R->R which takes one input and changes it to another input
test:Powerset(cf)->
either P, F or ?
Goal of delta debugging
find the smallest test case c such that test(c) = F
global minimum
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
1-minimal
Find a set of changes that cause the failure but removing any change causes the failure to go away
local minimum: failing test case c in cf
if for all c’ in c, test(c’) != F
c’ is all things not c
n-minimal: failing test case c in cf
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
1-minimal: failing test case c in cf
if for all changes in c, test(c-{change}) != F
if we remove a change from c and it doesn’t = false
Naive Algorithm for 1 minimal subset
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
Naive Algorithm for 1 minimal worst case runtime
O(N^2)
work is potentially N+ (n-1) + (n-2)…
Minimization algorithms
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