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

Add configuration in a monadic way, for now used only to configure SMT2 debugging #405

Merged
merged 29 commits into from
Oct 27, 2023

Conversation

msooseth
Copy link
Collaborator

@msooseth msooseth commented Oct 9, 2023

Description

This is a rather big change. It adds a monad that allows us to pass a global configuration down. This can be extremely helpful, e.g. also for abstraction-refinement, Expr debugging, and a bunch of other things. It required a bit of change here-and-there, but it's not that bad. It will allow us to pass a lot less parameters around for global configs.

This also adds dumping of SMT2 queries. This is done by adding one more field to the SMT2 datatype, the Expr that it was generated from. This is essential, otherwise we don't know from that place the SMT2 is coming from. It helps significantly with debugging the SMT2. Passing this Expr in any other way is not really possible, not in a clean way as far as I can see. It really does belong with the SMT2, I think.

Configurations supported:

  • SMT, Expression, Prop dumping
  • abstraction-refinement (revert 3b05c85 in case it's undesired)

Checklist

  • tested locally
  • added automated tests
  • updated the docs
  • updated the changelog

@msooseth msooseth force-pushed the fix-debugging-smt2-addreaderT-squashed branch from 990a76b to 1662425 Compare October 9, 2023 12:26
@msooseth msooseth requested review from arcz and d-xo October 9, 2023 13:47
@msooseth
Copy link
Collaborator Author

msooseth commented Oct 10, 2023

Note, as part of the Keccak PR I am making, I am moving more things to the Config. So let's hold off a bit on adding more things to the Config on this PR. I promise to extend Config with more options as part of the Keccak PR here: #382

@msooseth msooseth mentioned this pull request Oct 24, 2023
4 tasks
cli/cli.hs Outdated Show resolved Hide resolved
src/EVM/Fetch.hs Outdated Show resolved Hide resolved
Copy link
Collaborator

@d-xo d-xo left a comment

Choose a reason for hiding this comment

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

just a few small nits, but otherwise looks great!

cc @arcz this is a breaking change that may impact echidna.

@d-xo d-xo self-assigned this Oct 26, 2023
@msooseth msooseth merged commit 61aa81b into main Oct 27, 2023
7 checks passed
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.

2 participants