-
Notifications
You must be signed in to change notification settings - Fork 284
VSD - to predicate #6267
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
VSD - to predicate #6267
Conversation
45f7f56 to
5a900bd
Compare
Codecov Report
@@ Coverage Diff @@
## develop #6267 +/- ##
===========================================
+ Coverage 75.90% 75.97% +0.07%
===========================================
Files 1492 1503 +11
Lines 162711 163165 +454
===========================================
+ Hits 123508 123967 +459
+ Misses 39203 39198 -5
Continue to review full report at Codecov.
|
martin-cs
left a comment
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.
Looks good. The only thing missing is pointers, which should be relatively straight-forward.
bd75459 to
1f497fe
Compare
martin-cs
left a comment
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.
To make this more directly accessible, would it be possible to add to this PR an implementation of this interface:
Line 157 in d3dc560
| virtual exprt to_predicate(void) const |
( as variable_sensitivity_domaint::to_predicate ). All it needs to do is to iterate over the environment map, abstract_objectt::to_predicate() each entry and give the conjunct.
Further, would it also be possible to add overloadings of variable_sensitivity_domaint::to_predicate() for:
- a single exprt : it should
evalit and thenabstract_objectt::to_predicate()the result. - a vector of exprt :
evaleach one,abstract_objectt::to_predicate()and conjunct.
Very basic initial implementation - top, bottom, or unknown.
Relax to_predicate visibility from private to protected to enable this.
099ebbb to
a6e5567
Compare
Wrapper that calls down into abstract_environmentt::to_predicate
a6e5567 to
7af8e92
Compare
martin-cs
left a comment
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.
Thanks for this; looks good.
This is a way that a user of the abstract interpreter to produce a logical expression that is true for any of the possible states represented by a single domain.
For example, if we have three variables in scope and intervals for them:
then
to_predicatecould generate(0 <= x <= 20) && (-4 <= y <= 3000)