[enhancement] Autogeneration of cover!() for branches
- Dominant language
- C++
- Stars
- 1.9k
- Forks
- 283
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 135
Description
### What's hard to do? (limit 100 words)
Covering every if/else branch and match arm requires a hand-written cover!() call at each site. Someone has to remember to insert each call, pick a unique label, and keep the set of covers in sync as branches are added or refactored. There is no way to say "cover all branches" and get complete, up-to-date branch/match coverage for a design.
### Current best alternative workaround (limit 100 words)
Add cover!() at the top of each branch and arm by hand, with a manually chosen label per site. This is repeated for every feature and re-reviewed after refactors, with no enforcement that a new branch got its cover or that labels stay unique. Coverage completeness depends on remembering every site, which does not scale across a large code base.
### Your view of the "best case XLS enhancement" (limit 100 words)
Have the compiler auto-insert a cover for every if/else branch and match arm, so branch/match coverage is produced automatically instead of by hand. Each synthesized cover should get a stable, unique identity that can be traced back to the source construct it measured, with no manual effort and nothing to keep in sync as control flow changes.
Contributor guide
Assessment
This issue has not been assessed yet.