Skip to content

docs: streamline README and improve CLI --help descriptions#979

Open
Stevengre wants to merge 5 commits intomasterfrom
docs/streamline-readme
Open

docs: streamline README and improve CLI --help descriptions#979
Stevengre wants to merge 5 commits intomasterfrom
docs/streamline-readme

Conversation

@Stevengre
Copy link
Contributor

@Stevengre Stevengre commented Mar 9, 2026

Summary

README.md:

  • Consolidate repeated setup instructions (rustup, git clone, submodule init) into a single Quick Start section
  • Replace verbose per-command CLI documentation with a command table — detailed options available via --help
  • Add "Typical proof workflow" section showing the prove → show → inspect cycle
  • Add "Debugging a stuck or failing proof" section covering --break-on-* flags, section-edge, prune, and module export/import
  • Reduce README from ~245 lines to ~163 lines with no information loss

CLI --help improvements (__main__.py):

  • run: clarify --bin (cargo target) vs --file (SMIR JSON) mutual exclusivity; --depth → "execution steps"
  • prove-rs: --max-depth explains KCFG edge semantics; --reload warns about discarding progress; --break-on-function clarifies substring matching
  • show: --full-printer notes default is compact; --minimize-proof notes dependency on --to-module; --rules describes Markdown link output; --node-deltas-pro documents auto-printing rules
  • prune: NODE explains subtree removal
  • section-edge: clearer edge format description
  • info --types: documents output format and behavior when omitted
  • link --output-file: shows default value

Test plan

  • Verify --help output renders correctly for all subcommands
  • README renders correctly on GitHub

@Stevengre Stevengre changed the title docs: streamline README, add proof workflow docs: streamline README and improve CLI --help descriptions Mar 9, 2026
@Stevengre Stevengre force-pushed the docs/streamline-readme branch from b04922b to e71120b Compare March 9, 2026 02:29
@Stevengre Stevengre mentioned this pull request Mar 9, 2026
@Stevengre Stevengre marked this pull request as ready for review March 9, 2026 02:35
@Stevengre Stevengre self-assigned this Mar 9, 2026

# Convenience script (also supports png/pdf/dot visualization)
./scripts/generate-smir-json.sh your_file.rs . png
```
Copy link
Collaborator

@mariaKt mariaKt Mar 9, 2026

Choose a reason for hiding this comment

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

The usage of the script is not entirely clear here, e.g., ./scripts/generate-smir-json.sh your_file.rs . for json generation. IT is not clear now that the convenience script can be used only to generate json, and additionally for visualization. I think Maybe [png/pdf/dot] ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point, thanks. I clarified the usage and added the optional [png|pdf|dot] argument to indicate visualization formats.

link_parser.add_argument('smir_files', nargs='+', metavar='SMIR_JSON', help='SMIR JSON files to link')
link_parser.add_argument(
'--output-file', '-o', metavar='FILE', help='Output file', default='linker_output.smir.json'
'--output-file', '-o', metavar='FILE', help='Output file (default: linker_output.smir.json)', default='linker_output.smir.json'
Copy link
Collaborator

Choose a reason for hiding this comment

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

What is the meaning of this? The output file name has a default value which is linker_output.smir.json?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes. You can see default='linker_output.smir.json' in the config.

@mariaKt
Copy link
Collaborator

mariaKt commented Mar 9, 2026

This adds a lot of clarity in many places. I asked something that wasn't clear to me, and proposed a minor change where I thought that one command's usage was not covered in as much detail as in the original description.

…flow

Consolidate repeated setup instructions (rustup, git clone, submodule init)
into a single Quick Start section. Replace verbose per-command CLI docs with
a command table (details available via --help). Add practical "Typical proof
workflow" and "Debugging a stuck or failing proof" sections covering show,
prune, section-edge, break-on-* flags, and module export/import.
- info --types: document output format and behavior when omitted
- show --node-deltas-pro: clarify it also prints rules for the edges
- show --rules: note output is Markdown links to K rule sources
- link --output-file: show default value (linker_output.smir.json)
- run: clarify --bin is cargo target, --file is SMIR JSON, note mutual exclusivity; --depth explains "execution steps"
- prove-rs: --max-depth explains KCFG edge semantics; --reload warns it discards progress; --break-on-function clarifies substring matching
- show: --full-printer notes default is compact; --minimize-proof notes it requires --to-module
- prune: NODE explains subtree removal
- section-edge: edge help uses clearer wording
- proof_args: PROOF_ID uses generic "operate on" instead of "view"
Updated script usage instructions in README.
@Stevengre Stevengre force-pushed the docs/streamline-readme branch from 7f8beae to 0c9f5d1 Compare March 10, 2026 03:11
@Stevengre Stevengre requested a review from mariaKt March 10, 2026 03:13
Copy link
Collaborator

@mariaKt mariaKt left a comment

Choose a reason for hiding this comment

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

Thank you, approved.

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