Repository navigation
Commit 71cbe74
authored
Strip the crate prefix from scanner names so contract metrics match again (#696)
All `*_under_contract` metrics have read 0 since #685: core dropped from
313 to 0 unsafe functions under contract in one run while its contract
count didn't change.
Since the nightly-2026-02-05 update (#613), the scanner reports
crate-prefixed names (`core::ptr::align_offset`) but `kani list` reports
`ptr::align_offset`, so nothing matches. Kani itself strips the prefix
(`strip_local_crate_prefix`); the scanner doesn't.
This applies the same stripping in `kani_std_analysis.py`, so the
metrics are correct regardless of Kani version. Core now reads 307 / 281
/ 323 (unsafe / safe-abstraction / safe under contract) instead of 0.
Fixing it in Kani's scanner is another option, happy to do that instead
if preferred.
By submitting this pull request, I confirm that my contribution is made
under the terms of the Apache 2.0 and MIT licenses.1 parent 29a6bf7 commit 71cbe74
3 files changed
Lines changed: 58 additions & 0 deletions
File tree
- .github/workflows
- scripts/kani-std-analysis
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
256 | 256 | | |
257 | 257 | | |
258 | 258 | | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
259 | 264 | | |
260 | 265 | | |
261 | 266 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
41 | 66 | | |
42 | 67 | | |
43 | 68 | | |
| |||
89 | 114 | | |
90 | 115 | | |
91 | 116 | | |
| 117 | + | |
92 | 118 | | |
93 | 119 | | |
94 | 120 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
0 commit comments