[reduce] Add default error tester to circt-reduce
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 2.2k
- Forks
- 524
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 46
Description
As discussed in #1591, it would make sense to have `circt-reduce` provide a few default testers that cover the main things people want to check for in tool output: specific error messages or tool crashes. Something like:
- `--run-script foo.sh`
- `--reduce-error "error: sink ..."`
- `--reduce-crash`
Ideally the `--reduce-error` case would take a regex argument, and multiple `--reduce-error` would imply that all of them must be present in the output. Also, regarding tool options, it would be great to have the tester/tool and its arguments be a positional argument to `circt-reduce`, such that we can do things like:
```
circt-reduce foo.mlir -- firtool --verilog --lower-to-hw --some-magic-flag
```
Possibly even providing a placeholder in the command, like `firtool {} --verilog --lower-to-hw --some-magic-flag` where `{}` would be replaced with the output to be tested.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the existing circt-reduce command-line handling and the discussion in #1591. Trace how testers and tool arguments are currently passed, then define support for default error and crash testers, repeated regex conditions, and positional tool arguments or placeholders. Done means these workflows are documented, implemented, and verified by the project's relevant tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- cli, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100