Fix COVERIGN on SVA goto repetition (#8118)

Signed-off-by: Artur Bieniek <[email protected]>
This commit is contained in:
Artur Bieniek
2026-08-14 13:52:10 -04:00
committed by GitHub
parent 621a67e819
commit 0b50390359
3 changed files with 11 additions and 9 deletions
+4 -6
View File
@@ -912,12 +912,10 @@ class SvaNfaBuilder final {
UASSERT_OBJ(maxN >= minN, repp, "GotoRep range max < min (V3Width invariant)");
if (exceedsAssertUnrollLimit(repp, maxN)) return BuildResult::failWithError();
// IEEE 1800-2023 16.14.3: a ranged goto repetition b[->M:N] ends at every
// M..N-th match, but only the shared merge vertex below reaches the
// terminal, so a cover sequence would under-count. Reject the ranged form
// (the single-count b[->N] has one end and is enumerated correctly).
if (m_isCoverSeq && hasMax && maxN > minN) {
warnEndpointUnsupported(flp, "a ranged goto repetition");
if (m_isCoverSeq) {
// Several matches may wait across false cycles, but the NFA stores only one bit for
// them, so a cover sequence action block could run too few times.
warnEndpointUnsupported(flp, "a goto repetition");
return BuildResult::failWithError();
}