Skip to content

SVA: implement ranged s_eventually operator #691

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 1 commit into from
Sep 17, 2024
Merged

Conversation

kroening
Copy link
Member

This adds a BMC encoding for the ranged variant of the s_eventually operator.

This adds a BMC encoding for the ranged variant of the s_eventually
operator.
@kroening kroening force-pushed the sva_ranged_s_eventually branch from 2e85f45 to 1bf5a17 Compare September 14, 2024 20:07
@kroening kroening marked this pull request as ready for review September 14, 2024 20:07
Comment on lines +432 to +433
else if(expr.id() == ID_sva_ranged_s_eventually)
{
Copy link
Collaborator

Choose a reason for hiding this comment

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

Not that this change makes the decisive difference, but: instantiate_rec has become very very long and could do with breaking into smaller functions. Perhaps this opportunity could be taken to at least move this case to a function of its own?

Copy link
Member Author

Choose a reason for hiding this comment

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

Will do. What bugs me most is the duplication between instantiate_word_level.cpp and property.cpp.

Comment on lines +444 to +451
mp_integer to;

if(upper.id() == ID_infinity)
{
throw ebmc_errort()
<< "failed to convert SVA s_eventually to index (infinity)";
}
else
Copy link
Collaborator

Choose a reason for hiding this comment

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

I believe this check could be done earlier so that to could use RAII and also its handling would be symmetric to that of from.

Copy link
Member Author

Choose a reason for hiding this comment

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

RAII won't do it -- it's perfectly fine to initialize with infinity. What's missing here is the comment "the normalizer has rewritten this". I'll implement the case, since I want to rely less on the normalizer doing stuff. It's just one line.

@kroening kroening merged commit 5063c1a into main Sep 17, 2024
8 checks passed
@kroening kroening deleted the sva_ranged_s_eventually branch September 17, 2024 13:49
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