Cleanup RMC Flags#332
Conversation
nchong-at-aws
left a comment
There was a problem hiding this comment.
Good clean-up. Some suggested/requested changes on naming.
scripts/rmc_flags.py
Outdated
There was a problem hiding this comment.
Maybe proof_harness_flags?
scripts/rmc_flags.py
Outdated
There was a problem hiding this comment.
Consider pointing to the cbmc-viewer docs for more info
scripts/rmc_flags.py
Outdated
There was a problem hiding this comment.
retcode -> return code
scripts/rmc_flags.py
Outdated
bdalrhm
left a comment
There was a problem hiding this comment.
Appreciate the help messages 🙂
scripts/rmc_flags.py
Outdated
There was a problem hiding this comment.
| def add_flags( | |
| parser, | |
| exclude_flags=[], | |
| exclude_groups=[]): | |
| def add_flags(parser, exclude_flags=[], exclude_groups=[]): |
Consider using a formatter (like autopep)
scripts/cargo-rmc
Outdated
There was a problem hiding this comment.
| parser = argparse.ArgumentParser(description="Verify a Rust crate") | |
| parser = argparse.ArgumentParser(prog="cargo rmc", description="Verify a Rust crate") |
cargo-rmc script is usually called as cargo rmc.
scripts/cargo-rmc
Outdated
There was a problem hiding this comment.
nit: can we fail here instead of warn? Warnings are easy to overlook
scripts/cargo-rmc
Outdated
There was a problem hiding this comment.
I know this isn't your change, but should this give a more helpful message?
There was a problem hiding this comment.
The error is printed by dependencies_in_path, so we don't need to print anything here.
scripts/rmc
Outdated
There was a problem hiding this comment.
Should this specify in the last position?
There was a problem hiding this comment.
It doesn't have to be in the last position; actually putting it first can avoid issues with flags that take multiple arguments. The only thing that really matters is --cbmc-args last, or else some RMC flags might be interpretted as CBMC flags.
b965c5d to
36a2df5
Compare
623d9ed to
768573b
Compare
scripts/rmc_flags.py
Outdated
There was a problem hiding this comment.
Raise an error instead; "Error setting up command line parser..." + link to issue page for users to report bug.
c4fa758 to
0f2064c
Compare
scripts/cargo-rmc
Outdated
There was a problem hiding this comment.
Why do we exclude these flags? Add a comment explaining why.
scripts/rmc_flags.py
Outdated
scripts/rmc_flags.py
Outdated
45a7b6f to
d42f987
Compare
Description of changes:
This PR cleans up the flags in
rmcandcargo-rmcby unifying them into a shared file, adding group organization, and descriptions for each flag.Resolved issues:
Call-outs:
Testing:
How is this change tested? Existing regression suite.
Is this a refactor change? Yes.
Checklist
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 and MIT licenses.