-
Notifications
You must be signed in to change notification settings - Fork 284
move solver_hardness.* from solvers/ to goto-symex/ #6549
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
6fc9694 to
0dea53e
Compare
Codecov Report
@@ Coverage Diff @@
## develop #6549 +/- ##
========================================
Coverage 75.98% 75.98%
========================================
Files 1578 1578
Lines 181058 181047 -11
========================================
- Hits 137579 137573 -6
+ Misses 43479 43474 -5
Continue to review full report at Codecov.
|
| // FIXME I am wondering if there is a way to do this that is a bit less | ||
| // dynamically typed. | ||
| if( | ||
| auto prop_conv_solver = | ||
| dynamic_cast<prop_conv_solvert *>(&maybe_hardness_collector)) | ||
| { | ||
| if(auto hardness_collector = prop_conv_solver->get_hardness_collector()) | ||
| { | ||
| if(hardness_collector->solver_hardness) | ||
| { | ||
| auto &solver_hardness = static_cast<solver_hardnesst &>( | ||
| *(hardness_collector->solver_hardness)); | ||
| handler(solver_hardness); | ||
| } | ||
| } | ||
| } |
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.
This surely is better already, but don't we just need a Boolean function like virtual bool set_hardness_collector(solver_hardnesst *) { return false; } in prop_conv_solvert that will return true when the hardness collector was accepted?
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 the above go away, you'd need a get_solver_hardness_collector, or the like, in decision_proceduret. I can't get myself to do that.
This class is inherently linked to goto-programs and goto-symex, and introduces a surprising dependency on these corresponding includes into the solver classes. This commit moves these classes into the goto-symex directory, removing the dependency by introducing a base class for the callback.
0dea53e to
76cbf3e
Compare
The
solver_hardnesstclass is inherently linked to goto-programs and goto-symex, andintroduces a surprising dependency on these corresponding includes into the
solver classes.
This commit moves the class into the goto-symex directory, removing the
dependency by introducing a base class for the callback.