Skip to content

Conversation

@kroening
Copy link
Collaborator

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
Collaborator 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
Collaborator 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
Romy15200 pushed a commit to Romy15200/nws that referenced this pull request Aug 19, 2025
SVA: implement ranged `s_eventually` operator
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