Support --property with --reachability-slice#732
Merged
kroening merged 2 commits intodiffblue:masterfrom Apr 4, 2017
Merged
Conversation
0946363 to
399dcd8
Compare
Make the support for property-guided slicing the same for both --full-slice and --reachability-slice. Furthermore replace sliced code by assume(false) instead of unbounded (self-)loops.
399dcd8 to
dfc3b6e
Compare
tautschnig
added a commit
to tautschnig/cbmc
that referenced
this pull request
Dec 23, 2025
This commit merges the best aspects of two approaches to hash-based loop identification: - Clean implementation from PR diffblue#732 (bigweaver/clone-cbmc-private-20251130-231902) - Comprehensive testing from PR diffblue#786 (bigweaver/clone-cbmc-private-20251209-144542) Core Implementation (from PR diffblue#732): - Enhanced loop_idt struct with hash support and backward compatibility - compute_loop_hashes() using AST fingerprinting approach - Hash based on source location, loop structure, and body characteristics - Uses hash_combine() and hash_finalize() utilities - Clean separation of concerns with modular design Testing Infrastructure (from PR diffblue#786): - Unit tests: unit/goto-programs/loop_hash.cpp (Catch2-based) - Basic regression: 3 test suites (types, nested, stability) - Comprehensive suite: 21 automated test cases covering: * Position independence (11 tests) * Sensitivity to changes (4 tests) * Determinism (4 tests) * Special cases (2 tests) - Multiple test frameworks: Python (basic + enhanced) and Bash - Test utilities for hash comparison and extraction Key Benefits: - Loop identifiers stable across unrelated code changes - Hashes change appropriately when loop logic changes - Backward compatible with existing loop_number system - Comprehensive test coverage (21+ test cases) - Well-documented with extensive README files Files Modified: - Core: 5 implementation files in src/goto-programs/ - Tests: 52 test files (unit + regression) - Build: unit/Makefile updated See LOOP_HASH_MERGE_SUMMARY.md for detailed documentation.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Make the support for property-guided slicing the same for both
--full-slice and --reachability-slice. Furthermore replace sliced code
by assume(false) instead of unbounded (self-)loops.