Skip to content

Move cbmc_solvers as solver_factory to new goto-checker module [blocks: 3564, 3565] #3557

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
merged 2 commits into from
Dec 17, 2018

Conversation

peterschrammel
Copy link
Member

@peterschrammel peterschrammel commented Dec 10, 2018

First of a series of PRs relating to #2883

  • 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.
  • [n/a] 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).
  • [n/a] 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.

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: 57c66e2).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/94355641
Status will be re-evaluated on next push.
Please contact @peterschrammel, @thk123, or @allredj for support.

Common spurious failures:

  • 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).

The incompatibility may have been introduced by an earlier PR. In that case merging this
PR should be avoided unless it fixes the current incompatibility.

@peterschrammel
Copy link
Member Author

TG bump is passing

@peterschrammel peterschrammel changed the title Move cbmc_solvers as solver_factory to new goto-checker module Move cbmc_solvers as solver_factory to new goto-checker module [blocks 3564] Dec 12, 2018
options.get_unsigned_int_option("max-node-refinement");

info.refine_arrays=options.get_bool_option("refine-arrays");
info.refine_arithmetic=options.get_bool_option("refine-arithmetic");
Copy link
Contributor

Choose a reason for hiding this comment

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

some formatting changes unrelated to the commit are mixed here

Copy link
Member Author

Choose a reason for hiding this comment

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

Now the split should be correct. Please re-check.

@@ -50,19 +50,18 @@ class cbmc_solverst
{
}

explicit solvert(std::unique_ptr<prop_convt> p):prop_conv_ptr(std::move(p))
explicit solvert(std::unique_ptr<prop_convt> p)
Copy link
Contributor

Choose a reason for hiding this comment

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

Not directly related to this PR but I find it a bit strange that the product of the factory is defined in the factory itself. And it seems also this should have been factory functions rather than a factory class as most fields are constant and I guess it's only used to produce one solver.

Copy link
Member Author

Choose a reason for hiding this comment

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

Noted here: #3574

@peterschrammel peterschrammel force-pushed the solver-factory branch 2 times, most recently from b5b62e8 to 5af9fed Compare December 15, 2018 16:19
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: 5af9fed).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/94870273
Status will be re-evaluated on next push.
Please contact @peterschrammel, @thk123, or @allredj for support.

Common spurious failures:

  • 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).

The incompatibility may have been introduced by an earlier PR. In that case merging this
PR should be avoided unless it fixes the current incompatibility.

@peterschrammel peterschrammel changed the title Move cbmc_solvers as solver_factory to new goto-checker module [blocks 3564] Move cbmc_solvers as solver_factory to new goto-checker module [blocks: 3564, 3565] Dec 16, 2018
src/cbmc/bmc.cpp Outdated
opts,
symbol_table,
ui,
ui.get_ui() == ui_message_handlert::uit::XML_UI);
std::unique_ptr<cbmc_solverst::solvert> cbmc_solver;
std::unique_ptr<solver_factoryt::solvert> cbmc_solver;
cbmc_solver = solvers.get_solver();
Copy link
Contributor

Choose a reason for hiding this comment

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

⛏️ assignment could be on same line as declaration

Copy link
Member Author

Choose a reason for hiding this comment

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

Done

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: 699fcc2).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/94956330
Status will be re-evaluated on next push.
Please contact @peterschrammel, @thk123, or @allredj for support.

Common spurious failures:

  • 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).

The incompatibility may have been introduced by an earlier PR. In that case merging this
PR should be avoided unless it fixes the current incompatibility.

Copy link
Collaborator

@tautschnig tautschnig left a comment

Choose a reason for hiding this comment

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

Looks great to me, just more cleanup-wishlist-requests.

src/cbmc/bmc.cpp Outdated
opts,
symbol_table,
ui,
ui.get_ui() == ui_message_handlert::uit::XML_UI);
std::unique_ptr<cbmc_solverst::solvert> cbmc_solver;
std::unique_ptr<solver_factoryt::solvert> cbmc_solver;
Copy link
Collaborator

Choose a reason for hiding this comment

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

As this is also done below: assign directly in the declaration.

#ifndef CPROVER_CBMC_CBMC_SOLVERS_H
#define CPROVER_CBMC_CBMC_SOLVERS_H
#ifndef CPROVER_GOTO_CHECKER_SOLVER_FACTORY_H
#define CPROVER_GOTO_CHECKER_SOLVER_FACTORY_H
Copy link
Collaborator

Choose a reason for hiding this comment

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

Wishlist, possibly to be done in a separate PR: could a lot of includes be purged from the header file and the implementation of several methods be moved to the .cpp file? Really nothing needs to be inlined for performance reasons. With such a move we would eventually end up with a clean and readable interface.

Copy link
Member Author

Choose a reason for hiding this comment

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

This is the first step of introducing the goto-checker module
which will hold the language-agnostic BMC classes.
@peterschrammel peterschrammel merged commit 8065b10 into diffblue:develop Dec 17, 2018
@peterschrammel peterschrammel deleted the solver-factory branch December 17, 2018 18:34
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: 700d7bb).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/95012430
Status will be re-evaluated on next push.
Please contact @peterschrammel, @thk123, or @allredj for support.

Common spurious failures:

  • 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).

The incompatibility may have been introduced by an earlier PR. In that case merging this
PR should be avoided unless it fixes the current incompatibility.

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.

6 participants