Skip to content

Commit 3a1cbf5

Browse files
Samuelsillsclaude
andcommitted
Remove advance_by harness (exceeds unwind bounds in CI)
Chars::advance_by has 3 internal loops that exceed any practical unwind bound. Truly unbounded verification of this function requires loop invariants on the advance_by implementation. The remaining 15/16 functions are verified with symbolic inputs. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent efdd165 commit 3a1cbf5

1 file changed

Lines changed: 3 additions & 13 deletions

File tree

library/core/src/str/iter.rs

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1660,19 +1660,9 @@ mod verify {
16601660
let _ = chars.as_str();
16611661
}
16621662

1663-
#[kani::proof]
1664-
#[kani::unwind(20)]
1665-
fn verify_chars_advance_by() {
1666-
let bytes: [u8; 4] = kani::any();
1667-
let len: usize = kani::any();
1668-
kani::assume(len <= 4);
1669-
kani::assume(crate::str::from_utf8(&bytes[..len]).is_ok());
1670-
let s = unsafe { crate::str::from_utf8_unchecked(&bytes[..len]) };
1671-
let n: usize = kani::any();
1672-
kani::assume(n <= 4);
1673-
let mut chars = s.chars();
1674-
let _ = chars.advance_by(n);
1675-
}
1663+
// Note: Chars::advance_by has 3 internal loops that exceed bounded
1664+
// unwind. Truly unbounded verification requires loop invariants on
1665+
// the advance_by implementation — a Kani enhancement opportunity.
16761666

16771667
// --- SplitInternal: symbolic string, concrete pattern ---
16781668
// Pattern correctness assumed per spec assumption #2

0 commit comments

Comments
 (0)