Skip to content

SVA-to-LTL: refactoring to use vector #1112

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
May 18, 2025
Merged

Conversation

kroening
Copy link
Member

This refactors the SVA-to-LTL sequence translation to return a vector instead of an expression. This makes it easier to implement the sequence repetition operators.

@kroening kroening force-pushed the sva-to-ltl-refactoring branch from 4bd6b87 to 3125442 Compare May 17, 2025 22:07
@kroening kroening marked this pull request as ready for review May 17, 2025 22:08
Comment on lines 34 to 36
explicit ltl_sequence_matcht(exprt __cond)
{
cond_vector.push_back(std::move(__cond));
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
explicit ltl_sequence_matcht(exprt __cond)
{
cond_vector.push_back(std::move(__cond));
}
explicit ltl_sequence_matcht(exprt __cond) : cond_vector(1, std::move(__cond))
{
}

{
auto &c = cond_vector[i];
if(!c.is_true())
conjuncts.push_back(n_Xes(i, cond_vector[i]));
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
conjuncts.push_back(n_Xes(i, cond_vector[i]));
conjuncts.push_back(n_Xes(i, c));

This refactors the SVA-to-LTL sequence translation to return a vector
instead of an expression.  This makes it easier to implement the sequence
repetition operators.
@kroening kroening force-pushed the sva-to-ltl-refactoring branch from 3125442 to 2edd9ab Compare May 18, 2025 12:27
@kroening kroening merged commit 3f0410b into main May 18, 2025
9 checks passed
@kroening kroening deleted the sva-to-ltl-refactoring branch May 18, 2025 12:36
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