Skip to content
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

Support to use boolector as the SMT solver #2410

Merged
merged 17 commits into from
Mar 26, 2021
Merged

Support to use boolector as the SMT solver #2410

merged 17 commits into from
Mar 26, 2021

Conversation

ggrieco-tob
Copy link
Contributor

@ggrieco-tob ggrieco-tob commented Mar 24, 2021

This branch includes initial support for boolector. Only recent versions (e.g 3.2.x) are supported. Ancient versions like the one in Ubuntu 18.04 (1.5.x) are not. Closes #2403

@ggrieco-tob ggrieco-tob changed the title Support to boolector as the SMT solver Support to use boolector as the SMT solver Mar 24, 2021
Copy link
Contributor

@ekilmer ekilmer left a comment

Choose a reason for hiding this comment

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

This is exciting! And the process for adding a new solver looks to be very easy :)

It would be nice to test basic functionality of boolector solver in CI as well.

We would need to figure out how to install it into the Ubuntu 18.04 environment and also add some tests that use boolector, which I think is as simple as following what's done here

class ExpressionTestYices(ExpressionTest):
def setUp(self):
self.solver = YicesSolver.instance()
class ExpressionTestCVC4(ExpressionTest):
def setUp(self):
self.solver = CVC4Solver.instance()

Something like the following:

class ExpressionTestBoolector(ExpressionTest):
    def setUp(self):
        self.solver = BoolectorSolver.instance()

manticore/core/smtlib/solver.py Outdated Show resolved Hide resolved
manticore/ethereum/parsetab.py Show resolved Hide resolved
manticore/core/smtlib/solver.py Outdated Show resolved Hide resolved
manticore/core/smtlib/solver.py Show resolved Hide resolved
Comment on lines 70 to 83
#install boolector
mkdir -p /tmp/build
cd /tmp/build
git clone https://github.com/boolector/boolector.git
cd boolector
git checkout "f61c0dcf4a76e2f7766a6358bfb9c16ca8217224"
git log -1 --oneline > ../boolector.commit
./contrib/setup-lingeling.sh
./contrib/setup-btor2tools.sh
./configure.sh
cd build
make -j4
mkdir -p /tmp/boolector
sudo make DESTDIR=/usr install
Copy link
Contributor

Choose a reason for hiding this comment

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

Ideally, we wouldn't have to rebuild boolector each time, but that might require messing with GH Actions caching, which can be annoying.

master branch has this Install dependencies step taking around 1:30 minutes, and now it's around 2:45 or 3 minutes.

@ehennenfent any strong feelings on this? I think maybe opening an issue to figure out caching would be fine?

Copy link
Contributor

@ekilmer ekilmer left a comment

Choose a reason for hiding this comment

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

Looking good!! Just a few minor things, and then I think we'll be ready for merge 🎉

manticore/core/smtlib/solver.py Outdated Show resolved Hide resolved
manticore/core/smtlib/solver.py Show resolved Hide resolved
manticore/core/smtlib/solver.py Outdated Show resolved Hide resolved
Copy link
Contributor

@ekilmer ekilmer left a comment

Choose a reason for hiding this comment

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

LGTM. Thank you!!

@ggrieco-tob
Copy link
Contributor Author

@ekilmer can you merge this? Github says:

You’re not authorized to merge this pull request.

for some reason.. 🤔

@ekilmer ekilmer merged commit fd83be7 into master Mar 26, 2021
@ekilmer ekilmer deleted the dev-boolector branch March 26, 2021 18:35
ekilmer added a commit that referenced this pull request Apr 7, 2021
* master:
  Removed use of global solver from Native Memory (#2414)
  Support to use boolector as the SMT solver (#2410)
  Update CI and suggest to use pip3 instead of pip (#2409)
  Expressions use keyword-only arguments for init (#2395)
  Use Slots on all Expression objects (#2394)
  Allow double-adding exact same config option (#2397)
  Don't run OSX tests on PR
  Attempt to Fix solc Installation MacOS (#2392)
  Syscall specific hooks (#2389)
  TUI Support Infrastructure (#1620)
  Fix coveralls upload (#2387)
  docs: fix simple typo, straigth -> straight (#2381)
  Attempt to allow symbolic balances from the start (#1818)
  Fix state.cpu.PC member (#1825)
  Bump black and mypy (#1824)
ekilmer added a commit that referenced this pull request Apr 10, 2021
* master: (22 commits)
  Fix the generation of EVM tests (#2426)
  Disabled EVM events in testcases by default (#2417)
  added proper timeouts for cvc4 and boolector (#2418)
  Removed use of global solver from Native Memory (#2414)
  Support to use boolector as the SMT solver (#2410)
  Update CI and suggest to use pip3 instead of pip (#2409)
  Expressions use keyword-only arguments for init (#2395)
  Use Slots on all Expression objects (#2394)
  Allow double-adding exact same config option (#2397)
  Don't run OSX tests on PR
  Attempt to Fix solc Installation MacOS (#2392)
  Syscall specific hooks (#2389)
  TUI Support Infrastructure (#1620)
  Fix coveralls upload (#2387)
  docs: fix simple typo, straigth -> straight (#2381)
  Attempt to allow symbolic balances from the start (#1818)
  Fix state.cpu.PC member (#1825)
  Bump black and mypy (#1824)
  Manticore 0.3.5 (#1808)
  Fix yices timeout argument (#1817)
  ...
@ehennenfent ehennenfent mentioned this pull request May 24, 2021
ekilmer added a commit that referenced this pull request Jul 27, 2021
* master: (35 commits)
  Track last_pc in StateDescriptors (#2471)
  Expose Result Register for Native CPU (#2470)
  Install pinned version of truffle to fix CI (#2467)
  Use fixed owner and attacker accounts in multi_tx_analysis (#2464)
  Manticore 0.3.6 (#2456)
  Fix IntrospectionAPIPlugin Name (#2459)
  Portfolio of parallel solvers (#2420)
  Replace Quick mode with Thorough mode (#2457)
  Fix incorrect comparison for symbolic file wildcards (#2454)
  Reduce the number of calls to the SMT solver in EVM (#2411)
  Fixes to Unicorn emulation - start/stop/resume (#1796)
  Add support for multiple compilation units (#2444)
  Basic solver stats (#2415)
  Fix the generation of EVM tests (#2426)
  Disabled EVM events in testcases by default (#2417)
  added proper timeouts for cvc4 and boolector (#2418)
  Removed use of global solver from Native Memory (#2414)
  Support to use boolector as the SMT solver (#2410)
  Update CI and suggest to use pip3 instead of pip (#2409)
  Expressions use keyword-only arguments for init (#2395)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add boolector support
2 participants