Range test: validate range_1 variable intervals against Z3-derived bounds#11
Merged
Range test: validate range_1 variable intervals against Z3-derived bounds#11
range_1 variable intervals against Z3-derived bounds#11Conversation
Agent-Logs-Url: https://github.com/Coursant/RAP/sessions/f048d0cd-7958-4b02-93c1-d5485d87b226 Co-authored-by: Coursant <60531642+Coursant@users.noreply.github.com>
Agent-Logs-Url: https://github.com/Coursant/RAP/sessions/f048d0cd-7958-4b02-93c1-d5485d87b226 Co-authored-by: Coursant <60531642+Coursant@users.noreply.github.com>
Copilot created this pull request from a session on behalf of
Coursant
April 7, 2026 08:33
View session
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.
range_1previously validated range analysis by checking hardcoded output strings, which does not verify computed bounds semantically. This updates the test to assert per-variable interval equality between analyzer output and Z3-solved bounds.Range assertion model
test_range_analysiswith structured comparisons: parse each target local’sRegular [lb, ub]interval, then compare against Z3-derived(min, max)for the same constraints._20,_47,_25,_28,_39,_29,_41,_33,_34,_38,_40,_46) while making validation semantic instead of textual.Test utilities
parse_range_line(output, local_name)to extract concrete bounds from analysis output.z3_interval(local_name, lower_bound, upper_bound)usingz3::Optimizeto compute min/max bounds under interval constraints.Cleanup
test_interprocedual_range_analysistotest_interprocedural_range_analysisfor consistency/readability.