Skip to content

BMC: implement weak/strong sequences #1070

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

Merged
merged 2 commits into from
Apr 25, 2025
Merged

BMC: implement weak/strong sequences #1070

merged 2 commits into from
Apr 25, 2025

Conversation

kroening
Copy link
Member

@kroening kroening commented Apr 18, 2025

This implements strong semantics for SVA sequences in the word-level BMC engine. Strong semantics are used with an explicit strong(...) operator or for SVA cover.

The difference between weak and strong semantics arises in BMC when the sequence reaches the end of the unwinding: using weak semantics, the sequence matches, whereas using strong semantics the sequence does not.

@kroening kroening force-pushed the sva-weak-strong branch 13 times, most recently from c92ff47 to 4046fea Compare April 22, 2025 19:55
@kroening kroening marked this pull request as ready for review April 22, 2025 19:55
@kroening kroening force-pushed the sva-weak-strong branch 2 times, most recently from 37334f8 to 86b4c58 Compare April 23, 2025 02:27
@tautschnig
Copy link
Collaborator

Wants a rebase; but can you now also flip back to CORE a bunch of KNOWNBUG tests that have become such for the lack of support for strong(...)?

@kroening kroening force-pushed the sva-weak-strong branch 4 times, most recently from fb3b24a to fd25950 Compare April 24, 2025 22:43
Comment on lines 681 to 688
// clang-format off
auto semantics =
property_expr.id() == ID_sva_strong ? sva_sequence_semanticst::STRONG
: property_expr.id() == ID_sva_weak ? sva_sequence_semanticst::WEAK
: property_expr.id() == ID_sva_implicit_strong ? sva_sequence_semanticst::STRONG
: property_expr.id() == ID_sva_implicit_weak ? sva_sequence_semanticst::WEAK
: sva_sequence_semanticst::WEAK;
// clang-format on
Copy link
Collaborator

Choose a reason for hiding this comment

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

That's the same code (except different expression variable) twice in the same file - should probably be moved to a (static) function.

Cases relating to sequence expressions are now fully handled in
property_obligations_rec.
This implements strong semantics for SVA sequences in the word-level BMC
engine.  Strong semantics are used with an explicit strong(...) operator or
for SVA cover.

The difference between weak and strong semantics arises in BMC when the
sequence reaches the end of the unwinding: using weak semantics, the
sequence matches, whereas using strong semantics the sequence does not.
@kroening kroening merged commit 0a1c5ce into main Apr 25, 2025
9 checks passed
@kroening kroening deleted the sva-weak-strong branch April 25, 2025 17:44
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.

2 participants