Repository navigation
Conversation
When a string's length is known but its contents are unconstrained, string_refinementt::get expands the backing array into one '?' per character. Large nondeterministic strings therefore produce enormous counterexample traces. Use array_of_exprt to represent the repeated placeholder while retaining the full length in the array type. This follows expr_initializer.cpp's existing use of array_of_exprt to avoid expanding large uniform arrays. Extend string-operation evaluation and Java trace validation to handle this compact representation. Add unit and regression coverage, including the reported reproducer with a string length of 4,194,304. Fixes diffblue#9165 Co-authored-by: GPT 6 Astra <noreply@openai.com>
lemmy
requested review from
TGWDB,
kroening,
martin-cs,
peterschrammel and
tautschnig
as code owners
September 22, 2026 12:59
Collaborator
|
Is the semantics correct ? There’s a difference between a string that contains a different nondet character at each position and one that contains the same single nondet character at each position. An alternative would be to elide the contents using ellipsis in the rendering of that term. |
This branch has not been deployed
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.
When a string's length is known but its contents are unconstrained, string_refinementt::get expands the backing array into one '?' per character. Large nondeterministic strings therefore produce enormous counterexample traces.
Use array_of_exprt to represent the repeated placeholder while retaining the full length in the array type. This follows expr_initializer.cpp's existing use of array_of_exprt to avoid expanding large uniform arrays. Extend string-operation evaluation and Java trace validation to handle this compact representation.
Add unit and regression coverage, including the reported reproducer with a string length of 4,194,304.
Fixes #9165
The feature or user visible behaviour I have added or modified has been documented in the User Guide in doc/cprover-manual/(nothing to document)