Skip to content

Conversation

@blishko
Copy link
Collaborator

@blishko blishko commented Jul 10, 2024

This PR is a continuation of the effort (started in #15254 and #15251) to make the test suite more stable as a preparation for the change in the interaction with Z3 (#15252).

mapping (uint => uint8)[2] severalMaps8;
mapping (uint => uint)[2][2] severalMaps3d;
function f(mapping (uint => uint) storage map) internal {
// Accesses are safe but oob is reported because of aliasing.
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It seems the problem with aliasing of maps had been fixed somewhere along the way, because no oob was reported here anymore.

// ====
// SMTEngine: all
// SMTIgnoreCex: yes
// SMTTargets: assert
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

In this test, we want to focus on assertions, not the accesses.

@blishko blishko force-pushed the smt-more-test-simplification branch from d7d7773 to a8063fc Compare July 10, 2024 20:33
@blishko blishko force-pushed the smt-more-test-simplification branch from a8063fc to f53bb02 Compare July 11, 2024 07:54
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The only difference between this file and array_branches_3d.sol was that this has an option SMTShowUnproved: yes, but that is actually the default for that option, so this test was identical to the other one.
We can delete it without losing anything.

// ====
// SMTEngine: all
// SMTIgnoreOS: macos
// SMTTargets: assert
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The out of bounds checks seem to be difficult for Z3, but there is no point to test them, they are safe.
The point of this test is to test the assertion.

Copy link
Collaborator

@cameel cameel left a comment

Choose a reason for hiding this comment

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

Looks reasonable.

@blishko blishko merged commit e0ab0f2 into develop Jul 15, 2024
@blishko blishko deleted the smt-more-test-simplification branch July 15, 2024 14:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants