Skip to content

SystemVerilog: distinguish assertions #422

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
Mar 21, 2024
Merged

SystemVerilog: distinguish assertions #422

merged 1 commit into from
Mar 21, 2024

Conversation

kroening
Copy link
Member

This changes the front-end to distinguish three kinds of assertions/assumptions:

  1. concurrent assertions/assumptions ("assert property"), which can be module items or statements,

  2. immediate assertion/assumption statements, and

  3. SMV-style assertions/assumptions.

Front-end and BMC back-end support for initial concurrent assertion statements is added.

@kroening kroening force-pushed the initial-properties branch from 714e447 to a4c1904 Compare March 20, 2024 21:25
@kroening kroening marked this pull request as ready for review March 20, 2024 22:46
Comment on lines 75 to 95
for(std::size_t t = 0; t < no_timeframes; t++)
{
exprt prop_handle;
if(t == 0)
{
exprt tmp = instantiate(property_expr, t, no_timeframes, ns);
prop_handle = solver.handle(tmp);
}
else
prop_handle = true_exprt();

prop_handles.push_back(std::move(prop_handle));
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

How about:

std::size_t before = prop_handles.size();
if(no_timeframes > 0)
{
  exprt tmp = instantiate(property_expr, 0, no_timeframes, ns);
  prop_handles.push_back(solver.handle(tmp));
}
prop_handles.resize(before + no_timeframes, true_exprt{});

@kroening kroening force-pushed the initial-properties branch from a4c1904 to 7486c9e Compare March 21, 2024 19:41
This changes the front-end to distinguish three kinds of assertions/assumptions:

1) concurrent assertions/assumptions ("assert property"), which can be
module items or statements,

2) immediate assertion/assumption statements, and

3) SMV-style assertions/assumptions.

Front-end and BMC back-end support for initial concurrent assertion
statements is added.
@kroening kroening force-pushed the initial-properties branch from 7486c9e to b98e217 Compare March 21, 2024 19:42
@kroening kroening merged commit 2fc1c2d into main Mar 21, 2024
@kroening kroening deleted the initial-properties branch March 21, 2024 19:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants