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

use configargparse to process halmos.toml #297

Closed
wants to merge 4 commits into from
Closed

Conversation

karmacoma-eth
Copy link
Collaborator

No description provided.

@karmacoma-eth karmacoma-eth requested a review from daejunpark May 25, 2024 01:22
@daejunpark
Copy link
Collaborator

daejunpark commented May 25, 2024

could you explain in which order options are applied? we now have four sources of options:

  1. default option values
  2. config file
  3. halmos custom natspec
  4. command line

i think the above order makes sense. wdyt?

@daejunpark
Copy link
Collaborator

daejunpark commented May 25, 2024

what's the semantics of sections? can we have multiple sections in a toml file, and choose which section to use when running halmos? do sections inherit from their parents? if so, what's the naming convention for section inheritance?


depth = 1_000_000
storage-layout = 'generic'
Copy link
Collaborator

Choose a reason for hiding this comment

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

perhaps for the next pr: instead of having an example file here, it would be better to provide a running toml file in the test directories, under the examples/ and tests/, where foundry.toml exists.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

yes!

src/halmos/__main__.py Outdated Show resolved Hide resolved
src/halmos/sevm.py Outdated Show resolved Hide resolved
@karmacoma-eth
Copy link
Collaborator Author

could you explain in which order options are applied? we now have four sources of options:

1. default option values

2. config file

3. halmos custom natspec

4. command line

i think the above order makes sense. wdyt?

almost but IMO it should be:

  1. defaults
  2. config
  3. command line
  4. natspec

natspec feels more specific to a contract/function than the command line, which applies to the whole repo

@karmacoma-eth
Copy link
Collaborator Author

what's the semantics of sections? can we have multiple sections in a toml file, and choose which section to use when running halmos? do sections inherit from their parents? if so, what's the naming convention for section inheritance?

left for future work, currently there is a single supported [global] section

but going forward I think it would be nice to support profiles, so you could have [ci] and [ci-long] sections for instance, and then you can enable them via an env var

@daejunpark
Copy link
Collaborator

almost but IMO it should be:

  1. defaults
  2. config
  3. command line
  4. natspec

natspec feels more specific to a contract/function than the command line, which applies to the whole repo

makes sense. that's also the existing behavior before this pr, right?

actually i was wondering what if users want to quickly override the natspec options using command line, but that might not worth supporting.

@daejunpark
Copy link
Collaborator

tests seem to become flaky. ci failed due to z3 model not found, and that also happened intermittently in my local:

z3.z3types.Z3Exception: model is not available

@karmacoma-eth
Copy link
Collaborator Author

I'm not happy with the hackiness and the flakiness, I'll close this one and put up something cleaner

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