You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Verify all 38 NonZero functions listed in the challenge specification.
432 Kani proof harnesses across all 12 integer types, 0 failures.
Resolves#71
By submitting this pull request, I confirm that my contribution is made under
the terms of the Apache 2.0 and MIT licenses.
### Part 2: Absolute Value & Negation (signed only)
138
+
139
+
| Function | Harness | Types | Notes |
140
+
|----------|---------|-------|-------|
141
+
|`abs`|`nonzero_check_abs`| 6 signed | Excludes MIN (documented overflow) |
142
+
|`checked_abs`|`nonzero_check_checked_abs`| 6 signed ||
143
+
|`overflowing_abs`|`nonzero_check_overflowing_abs`| 6 signed ||
144
+
|`saturating_abs`|`nonzero_check_saturating_abs`| 6 signed ||
145
+
|`wrapping_abs`|`nonzero_check_wrapping_abs`| 6 signed | Covers MIN |
146
+
|`unsigned_abs`|`nonzero_check_unsigned_abs`| 6 signed ||
147
+
|`neg`|`nonzero_check_neg`| 6 signed | Excludes MIN (documented overflow) |
148
+
|`checked_neg`|`nonzero_check_checked_neg`| 6 signed ||
149
+
|`overflowing_neg`|`nonzero_check_overflowing_neg`| 6 signed | Covers MIN |
150
+
|`wrapping_neg`|`nonzero_check_wrapping_neg`| 6 signed | Covers MIN |
151
+
|`max`|`nonzero_check_max` (pre-existing) | all 12 ||
152
+
|`min`|`nonzero_check_min` (pre-existing) | all 12 ||
153
+
|`clamp`|`nonzero_check_clamp` (pre-existing) | all 12 ||
154
+
155
+
### Additional Changes
156
+
157
+
Strengthened `#[safety::loop_invariant]` on `checked_pow` in `uint_macros.rs` and `int_macros.rs` from `true` to a property that preserves the nonzero invariant through loop iterations. This is a verification annotation fix, not a runtime logic change.
0 commit comments