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

SMTChecker: Fix reporting same target both as safe and unsafe #15853

Merged
merged 1 commit into from
Feb 12, 2025

Conversation

blishko
Copy link
Contributor

@blishko blishko commented Feb 12, 2025

The same verification target can be analyzed in the context of different contracts.
If the target is safe in the context of one contract, but can be violated in the context of another contract, model checker may report it both safe and unsafe (depending on the order of the analyzed contracts).

Note that if one violation of a target has been detected, the same target is ignored later.
However, if it was first shown safe, that information would be kept and displayed to the user.

The proposed fix checks if an unsafe target has previously been shown safe, and if so, this information is deleted.

Resolves #15849.

@blishko
Copy link
Contributor Author

blishko commented Feb 12, 2025

This actually affects several of SMTChecker tests. I've checked a few of them and it was indeed the same situation as in the linked issue.

@blishko blishko force-pushed the smt-fix-target-report branch from c8dfa93 to 4b2df57 Compare February 12, 2025 12:39
@blishko blishko added smt 🟡 PR review label labels Feb 12, 2025
The same verification target can be analyzed in the context of different
contracts.
If the target is safe in the context of one contract, but can be
violated in the context of another contract, model checker may report it
both safe and unsafe (depending on the order of the analyzed contract).

Note that if one violation of a target has been detected, the same
target if ignored later.
However, if it was first shown safe, that information would be kept and
displayed to the user.

The proposed fix checks if an unsafe target has previously been shown
safe, and if so, this information is deleted.
@blishko blishko force-pushed the smt-fix-target-report branch from 4b2df57 to b0485e4 Compare February 12, 2025 12:41
Copy link
Member

@ekpyron ekpyron left a comment

Choose a reason for hiding this comment

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

Not that I understand how these get into m_safeTargets in the first place, but if removing them there is simplest, fine with me!
EDIT: ah, sorry, should have read the PR description :-).

@blishko blishko merged commit cfd32a3 into develop Feb 12, 2025
74 checks passed
@blishko blishko deleted the smt-fix-target-report branch February 12, 2025 16:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
smt 🟡 PR review label
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SMTChecker: The same assertion is reported both as safe and violated
2 participants