Repository navigation
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.
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.
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. |
peterschrammel
left a comment
There was a problem hiding this comment.
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 == expras 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