aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/bisect/minimize/slice_test.go
Commit message (Collapse)AuthorAgeFilesLines
* all: remove loop variables scopingTaras Madan2025-02-171-1/+0
|
* pkg/bisect/minimize: introduce SliceWithFixedAleksandr Nogikh2024-08-271-0/+28
| | | | | The function is similar to minimize.Slice(), but it allows to designate a subset of slice elements that must always remain.
* pkg/bisect: add a generic slice minimization algorithmAleksandr Nogikh2023-07-071-0/+121
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.