Skip to content
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

Support concrete playback for arrays of length 65 or greater #3888

Merged
merged 2 commits into from
Feb 14, 2025

Conversation

carolynzech
Copy link
Contributor

@carolynzech carolynzech commented Feb 13, 2025

Problem

When CBMC generates a JSON trace for a nondeterministic array, it will output a key-value pair elements: [array], where array contains concrete values for each element in the array. If the array is length 64 or shorter, it will also output the elements of the array as separate values in the trace (so each element is in the trace twice). Prior to this PR, concrete playback relied on the latter output format to find elements of an array. However, when the array was length 65 or greater, those elements wouldn't be values in their own right, so we wouldn't find any values for the array and just output an empty array.

Solution

This PR changes our representation of concrete values to handle arrays explicitly; i.e., to look for the elements array and populate the concrete values of the array from that instead.

Callouts

For those wondering why the playback_already_existed test changed, it's because we're hashing ConcreteItem instead of ConcreteValue, so the hash changes.

Resolves #3787

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 and MIT licenses.

@carolynzech carolynzech changed the title fix issue 3787 Support concrete playback for arrays of length 65 or greater Feb 13, 2025
@carolynzech carolynzech force-pushed the issue-3787 branch 3 times, most recently from f1d8119 to 37aadf1 Compare February 13, 2025 19:39
@carolynzech carolynzech marked this pull request as ready for review February 13, 2025 19:41
@carolynzech carolynzech requested a review from a team as a code owner February 13, 2025 19:41
Copy link
Contributor Author

@carolynzech carolynzech left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

try to trigger CI

@rajath-mk rajath-mk added this pull request to the merge queue Feb 14, 2025
Merged via the queue into model-checking:main with commit ff3aea3 Feb 14, 2025
28 checks passed
@carolynzech carolynzech deleted the issue-3787 branch February 14, 2025 15:32
github-merge-queue bot pushed a commit that referenced this pull request Feb 19, 2025
Resolves #3891

By submitting this pull request, I confirm that my contribution is made
under the terms of the Apache 2.0 and MIT licenses.

---------

Co-authored-by: Michael Tautschnig <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Concrete playback feature generates tests that fail Kani assertions
2 participants