-
Notifications
You must be signed in to change notification settings - Fork 1.5k
STL_Extension: Add bisect_failures debugging utility #9118
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Add new bisect_failures template function to help identify minimal failing test cases from complex input data. The utility uses a bisection-like approach to iteratively simplify data and locate the smallest subset that causes failures. Features: - Handles multiple failure types: CGAL exceptions, std::exceptions, exit codes - Automatic ratio adjustment (starts at 0.5, halves when no fault found) - Saves intermediate states for debugging (current, bad, error, final_bad) - Comprehensive test suite with 14 tests covering all combinations: * Edge cases (empty data, no failures) * Single element failures (each failure type independently) * Pair combinations (all 2-element permutations) * Triple combinations (all 3 failure types together) * Large datasets (up to 200 elements) The test suite demonstrates complete combinatorial coverage of three independent failure conditions and validates the algorithm's ability to isolate minimal failing cases. All tests pass in both Debug and Release configurations.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
STL_Extension/examples/STL_Extension/bisect_failures_example.cpp
Outdated
Show resolved
Hide resolved
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
Co-authored-by: Andreas Fabri <[email protected]>
This comment was marked as outdated.
This comment was marked as outdated.
|
/force-build:v0 |
|
The documentation is built. It will be available, after a few minutes, here: https://cgal.github.io/9118/v0/Manual/index.html |
ICPC version is 2025.1 on Christo, whereas the latest version is 2025.3. Maybe we should upgrade. |
That will ensure that the `clog` buffer is flushed before any output to `cerr`.
|
/build:v2 |
|
The documentation is built. It will be available, after a few minutes, here: https://cgal.github.io/9118/v2/Manual/index.html |
|
@afabri @sloriot Please re-review: |
sloriot
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like this version better! Still some occurrences of minimal and smallest remaining that I'd prefer being replaced with reduced for example.
afabri
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I made suggestions for replacing minimal @lrineau
lrineau
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have applied all of your suggestions in the last commit.
|
/build:v3 |
|
The documentation is built. It will be available, after a few minutes, here: https://cgal.github.io/9118/v3/Manual/index.html |
Summary
This PR adds a new debugging utility
bisect_failuresto the STL_Extension package. This function helps identify minimal failing test cases from complex input data by using a bisection-like approach.Small feature: bisect failures debugging utility
Features
current,bad,error,final_bad)Testing
Added comprehensive test suite (
test_bisect_failures.cpp) with 14 tests:All tests pass in both Debug and Release configurations.
Use Case
This utility is particularly useful for:
Example Usage
Files Changed
STL_Extension/include/CGAL/bisect_failures.h(new) - Main utility headerSTL_Extension/test/STL_Extension/test_bisect_failures.cpp(new) - Test suiteSTL_Extension/test/STL_Extension/CMakeLists.txt(modified) - Added testChecklist
Release Management
STL_Extension