Skip to content

Clean up decision_proceduret #4440

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

Merged

Conversation

peterschrammel
Copy link
Member

@peterschrammel peterschrammel commented Mar 26, 2019

decision_proceduret is only used through prop_convt, because it is lacking essential conversion functions. Moving these functions into decision_proceduret will enable to replace prop_convt by decision_proceduret throughout the code base (which is much more intuitive and makes the code more readable).
prop_convt will then evolve into interfaces to support advanced features for incremental solving, etc.

  • Each commit message has a non-empty body, explaining why the change was made.
  • Methods or procedures I have added are documented, following the guidelines provided in CODING_STANDARD.md.
  • The feature or user visible behaviour I have added or modified has been documented in the User Guide in doc/cprover-manual/
  • Regression or unit tests are included, or existing tests cover the modified code (in this case I have detailed which ones those are in the commit message).
  • My commit message includes data points confirming performance improvements (if claimed).
  • My PR is restricted to a single feature or bugfix.
  • White-space or formatting changes outside the feature-related changed lines are in commits of their own.

@tautschnig
Copy link
Collaborator

clang-format asks for a minor reformatting.

Copy link
Contributor

@allredj allredj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️
This PR failed Diffblue compatibility checks (cbmc commit: 2f8e740).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/105913707
Status will be re-evaluated on next push.
Common spurious failures include: the cbmc commit has disappeared in the mean time (e.g. in a force-push); the author is not in the list of contributors (e.g. first-time contributors); compatibility was already broken by an earlier merge.

Copy link
Collaborator

@martin-cs martin-cs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Patch does what is described. I'm not sure why it has been moved out of util. I'm very pro SMT-LIB as an interface to solvers so I am going to be in favour of something conceptually like prop_convt becoming our base BUT we should consider if there are other decision procedures we might want to use that don't or can't fit this interface. For example : I think @dcattaruzza was using mixed integer or linear programming solvers, what about fuzzing approaches ( @cesaro was working on something like this?), are any of the people doing machine leaning things working on this?

@peterschrammel
Copy link
Member Author

there are other decision procedures we might want to use that don't or can't fit this interface.

There certainly are, but then they also can't be used as drop-in solvers in CBMC as it stands today.
I'm also in favour of building things in a general way, but there must be at least two (current, not future) use cases to enjoy the benefit; otherwise we'll waste our time maintaining generic frameworks that are not used.

Copy link
Contributor

@smowton smowton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One query otherwise lgtm

inline decision_proceduret &operator<<(
decision_proceduret &dest,
const exprt &src)
/// Push Boolean constraint \p src into decision procedure \p dest
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Push? Is that the same as add?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. I'll change it to add.

@martin-cs
Copy link
Collaborator

martin-cs commented Mar 27, 2019 via email

All modules that use decision_proceduret also use solvers.
So, there is no need to have this interface in util.
There is no instance in the code base of using decision_proceduret
without these functions.
According to comment in the code.
Complete documentation and reorder methods to make the interface
more readable.
Operator for conversion is not intuitive anyway.
@peterschrammel peterschrammel force-pushed the clean-up-decision-procedure branch from 2f8e740 to c56f992 Compare March 27, 2019 11:11
@peterschrammel peterschrammel merged commit ec2ee3c into diffblue:develop Mar 27, 2019
@peterschrammel peterschrammel deleted the clean-up-decision-procedure branch March 27, 2019 11:57
Copy link
Contributor

@allredj allredj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️
This PR failed Diffblue compatibility checks (cbmc commit: c56f992).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/105996039
Status will be re-evaluated on next push.
Common spurious failures include: the cbmc commit has disappeared in the mean time (e.g. in a force-push); the author is not in the list of contributors (e.g. first-time contributors); compatibility was already broken by an earlier merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants