Commit 69d2796
feat(ADR-022 M3): model mut-param call-aliasing in the Polonius extractor
Close the call-aliasing divergence (borrow_use_while_excl): passing `x` to
a `mut` parameter and reading `x` again in the SAME call —
`mut_then_read(x, x)` — was flagged by the lexical checker
(UseWhileExclusivelyBorrowed) but not by the Polonius extractor, so the
fixture sat on the parallel-run allowlist.
The extractor now mirrors the lexical checker's left-to-right argument
fold: a `mut`-param argument that denotes a place mints a CALL-SCOPED
exclusive loan (born at the enclosing point, killed at point+1 so it never
reaches the next statement), and any LATER argument of the SAME call whose
place overlaps an earlier `mut`-arg's loan emits a conflict. Order- and
call-scoped, exactly matching the fold: it cannot fire across statements,
so `just_mut(x); read_int(x)` stays accepted, and it over-approximates only
toward MORE real same-call conflicts the lexical checker also reports — no
false positive. The loans are emitted as raw borrow_at/killed/conflict_at
facts only (not pushed onto the loan list), so the generic use-while rule
and the move passes are untouched; the solver invalidates them via liveness.
Allowlist 7 -> 6 (borrow_use_while_excl pruned). Corpus parallel-run gate
stays green (117 fixtures, zero unexpected divergence). Adds two hardening
tests: the call-aliasing flag, and the call-scoped anti-over-rejection case.
528 -> 530 tests green.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent cb23c03 commit 69d2796
2 files changed
Lines changed: 110 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
401 | 401 | | |
402 | 402 | | |
403 | 403 | | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
404 | 483 | | |
405 | 484 | | |
406 | 485 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
181 | 181 | | |
182 | 182 | | |
183 | 183 | | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
184 | 202 | | |
185 | 203 | | |
186 | 204 | | |
| |||
302 | 320 | | |
303 | 321 | | |
304 | 322 | | |
305 | | - | |
306 | | - | |
307 | | - | |
308 | | - | |
309 | | - | |
310 | | - | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
311 | 329 | | |
312 | 330 | | |
313 | 331 | | |
314 | 332 | | |
315 | | - | |
316 | | - | |
317 | | - | |
318 | | - | |
319 | | - | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
320 | 338 | | |
321 | 339 | | |
322 | 340 | | |
| |||
377 | 395 | | |
378 | 396 | | |
379 | 397 | | |
| 398 | + | |
| 399 | + | |
380 | 400 | | |
381 | 401 | | |
382 | 402 | | |
| |||
0 commit comments