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

Basic solver stats #2415

Merged
merged 13 commits into from
Apr 20, 2021
Merged

Basic solver stats #2415

merged 13 commits into from
Apr 20, 2021

Conversation

ggrieco-tob
Copy link
Contributor

This small PR includes a global dictionary that keeps tracks of when each solver is used succefully, timeouts or returns unknown. At the end, the result will be saved in a plain text file called global.solver_stats. If the solver returned either timeout or unknown, the user will be warned about it.

@ggrieco-tob ggrieco-tob marked this pull request as ready for review April 5, 2021 18:03
manticore/core/manticore.py Outdated Show resolved Hide resolved
context["time_ended"] = time_ended
context["time_elapsed"] = time_elapsed
else:
logger.info("Warning: manticore failed to run")
Copy link
Contributor

Choose a reason for hiding this comment

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

  • See above re: info/warning disconnect
  • "Manticore failed to run" seems a little bit aggressive. Maybe "Run start time not found in context. Was save_run_data called without calling run?"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The log level for this was changed to warning. This error will happen if you provide manticore with incorrect binary code or bytecode. Typically, when a smart contract is not properly compiled. Right now, this is output:

2021-04-06 09:15:54,463: [13997] m.c.manticore:INFO: Generated testcase No. 0 - NO STATE RESULT (?)(0 txs)
2021-04-06 09:15:54,464: [13997] m.c.plugin:WARNING: Caught will_solve in state None, but failed to capture its initialization
2021-04-06 09:15:54,475: [13984] m.c.manticore:INFO: Results in /home/g/Data/manticore-benchmarks/mcore_mkg0pep9

Here manticore does not provide any good feedback that it failed to run beyond the "NO STATE RESULT (?)", that's why "Manticore failed to run" can be appropriated (but I'm open to suggestions).

manticore/core/smtlib/solver.py Outdated Show resolved Hide resolved
@ehennenfent ehennenfent merged commit eb4f208 into master Apr 20, 2021
@ehennenfent ehennenfent deleted the dev-solver-stats branch April 20, 2021 16:29
ekilmer added a commit that referenced this pull request May 11, 2021
* master:
  Add support for multiple compilation units (#2444)
  Basic solver stats (#2415)
@ehennenfent ehennenfent mentioned this pull request May 24, 2021
ekilmer added a commit that referenced this pull request Jul 15, 2021
* master:
  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)
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.

3 participants