|
|
Given a set of chunks and a predicate, the algorithm does the following:
a) If the chunk is not needed (*), drop it.
b) Split the chunk in two and attempt to drop these halves individually.
Optimizations are applied to avoid unneeded predicate invokations.
Also, the algorithm proceeds from larger to smaller chunks, thus
providing on average the best possible result at each step.
This represents the generic functionality needed both for program
bisection in pkg/repro and kernel config bisection in pkg/kconfig.
(*) Needed means that the predicate returns true when the chunk is
present and false when it's removed.
|