-
Notifications
You must be signed in to change notification settings - Fork 273
SMT back-end: Extend trace value evaluation #7310
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
SMT back-end: Extend trace value evaluation #7310
Conversation
Codecov ReportBase: 78.28% // Head: 78.29% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## develop #7310 +/- ##
========================================
Coverage 78.28% 78.29%
========================================
Files 1642 1642
Lines 190004 190012 +8
========================================
+ Hits 148744 148761 +17
+ Misses 41260 41251 -9
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
9508279
to
c83c1d2
Compare
if(eval_op.is_nil()) | ||
return nil_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.
I don't quite understand why we return nil if any operand could be nil? The old code here (e.g.) for arrays would leave the nil in place and return the larger expr.
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'd fear that we fail to notice problems. I'm not sure returning nil
ever is the right thing to do?
The question is whether the decision procedure or the user of the decision procedure ought to do the simplification. |
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.
Reason: full_lhs_value in assignment must not be nil
How does simplification make it non-nil?
@kroening said:
I accept that the changes introducing simplification to io_args could be factored out, they were a bit of a drive-by cleanup. We already do this in other branches of @peterschrammel said:
Would you mind elaborating for I'm not sure how this comment came about? |
I'm referring to the issue that is supposed to fixed here. I'm not entirely sure I understand how simplification fixes it. |
Ah! The issue is fixed by the changes in this PR as https://github.com/diffblue/cbmc/pull/7310/files#diff-0eb7414a51aacc433e17eec049af7ed61dd62d3ee3c4b466f991c60a861c7fccR390-R391 will now receive a non-nil value. Not a matter of simplification at all. |
We record the values of expressions by adding `expr == expr` as constraints in order to be able to fetch and display them in the GOTO trace (for declaration; we presently also introduce new symbols in other cases). Constructing a trace then requires the ability to evaluate all kinds of expressions to obtain the value for those expressions. Fixes: diffblue#7308
c83c1d2
to
f89af9d
Compare
I have removed the simplification changes from this PR and moved them to #7323 instead. |
We record the values of expressions by adding
expr == expr
as constraints in order to be able to fetch and display them in the GOTO trace (for declaration; we presently also introduce new symbols in other cases). Constructing a trace then requires the ability to evaluate all kinds of expressions to obtain the value for those expressions.Fixes: #7308