-
Notifications
You must be signed in to change notification settings - Fork 18
BMC: encode properties using timeframe/handle pair #429
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
Conversation
b557160
to
1754d78
Compare
@@ -115,7 +115,45 @@ void property( | |||
instantiate(p, c, no_timeframes, ns); | |||
|
|||
auto handle = solver.handle(tmp); | |||
prop_handles.push_back(std::move(handle)); | |||
obligations[c].push_back(std::move(handle)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess this isn't really a hot path, but this could safely be written as
obligations.insert(c, {solver.handle(tmp)});
as each index is unique. I'm actually no longer sure why this needs to be exprt::operandst
as value type when it can only ever be a single exprt
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Give me a sec, there will be more than one expression per index, and they'll come separately.
src/trans-word-level/property.cpp
Outdated
@@ -87,14 +88,13 @@ void property( | |||
property_expr.id() == ID_sva_nexttime || | |||
property_expr.id() == ID_sva_s_nexttime) | |||
{ | |||
prop_handles.resize(no_timeframes, true_exprt()); | |||
if(no_timeframes > 0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not really for this PR, but still wondering: is no_timeframes == 0
actually a legitimate case at all? Should this perhaps be ruled out via a PRECONDITION
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I'll make it a PRECONDITION. BMC without any timeframes is not a thing.
The property encoding interface is changed to return a timeframe/handle pair, instead of just a condition per timeframe. This allows determining the appropriate size of the counterexample trace.
1754d78
to
0158a8b
Compare
The property encoding interface is changed to return a timeframe/handle pair, instead of just a condition per timeframe.
This allows determining the appropriate size of the counterexample trace.