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

Refactor solver #1334

Merged
merged 6 commits into from Jan 10, 2019

Conversation

Projects
None yet
2 participants
@disconnect3d
Copy link
Contributor

disconnect3d commented Jan 10, 2019

Gives love to the solver:

  • reorganised imports (PyCharm auto optimize imports)
  • compile regular expressions just once (!)
  • refactored docstrings: fixed some parameter specifications, more type adnotations, use """ instead of ''' (see https://www.python.org/dev/peps/pep-0257/)
  • refactored the _recv method - moved its internal readline method to __readline_and_count method (so the readline method is not recreated each time we call _recv)
  • refactored _check() method: it is now named _is_sat() and returns bool (or raises a SolverUnknown exception) instead of returning 'sat' or 'unsat' string

As a side effect of optimizing imports, detectors file imports have been fixed.

Note that some of the changes should speed up the solver a bit.


This change is Reviewable

@disconnect3d disconnect3d requested review from feliam and mossberg Jan 10, 2019

@feliam

feliam approved these changes Jan 10, 2019

Copy link
Contributor

feliam left a comment

love!

@disconnect3d disconnect3d merged commit 8b9632e into master Jan 10, 2019

4 of 5 checks passed

continuous-integration/travis-ci/pr The Travis CI build failed
Details
codeclimate All good!
Details
codeclimate/total-coverage 71%
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
license/cla Contributor License Agreement is signed.
Details

@disconnect3d disconnect3d deleted the refactor-solver branch Jan 10, 2019

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