Repository navigation
Conversation
Extend Trusted.MirAst, Trusted.MirSemantics, Pass 2 Miri correspondence,
Anneal.MirWp, and bundled resources for Phase 2 Tier 1 scalar/control-flow
semantics:
- Scalar ops: Div, Rem (truncation-toward-zero + div-by-zero / INT_MIN/-1 UB),
AddWithOverflow, SubWithOverflow, MulWithOverflow, UnOp.{not,neg}, and
CastKind.intToInt across bool and signed/unsigned integer widths.
- Tuples and places: MirTy.tuple, SlotVal partial-init/move tracking, Place
with ProjectionElem.field, AggregateKind.tuple with field-by-field
writeAggregateTuple (corresponding directly to Miri.Interpreter.writeAggregate),
and fail-closed assignHasUnsupportedOverlap for destination-overlapping tuple
aggregates and non-ZST tuple self-copy/self-move.
- Control flow: Assert (with operand-free AssertKind + UnwindAction),
UnwindResume, and BasicBlock.cleanup with TerminalOut.unwound.
- Pass 2 correspondence: independent M_ref modeling against vendor/lean-miri
(25 required Miri primitives, 56 forbiddenAnneal helpers, 36 Pass 2 claims)
with 6 new non-vacuity canaries (D14-D19) and updated boundary audit / test
fixtures.
Source: https://github.com/joshlf/anneal/tree/7be4df1c99bed562d63afdb7242572b3381b37f7
Agent-authored-by: AI agent acting on joshlf's behalf
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f04eced344
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| if expected == b then | ||
| jumpToBlock { frame with locals := localsAfterCond } callerMem target | ||
| else if !isOperandFreeAssertKind msg then |
There was a problem hiding this comment.
Honor disabled optional overflow assertions
When using the repository's capture profile, trusted/rustc-capture/src/capture.rs:909 passes -Coverflow-checks=no, so rustc treats optional OverflowNeg and add/sub/mul/shl/shr assertions as a goto after evaluating cond. This branch instead unwinds whenever cond != expected, allowing verified Behavior to differ from the compiled binary. The proposed producer-side lowering is also incompatible with the required direct 1:1 MIR capture; model the compiler setting or reject these assertions instead.
AGENTS.md reference: anneal/AGENTS.md:L245-L249
Useful? React with 👍 / 👎.
| before evaluating any operand or writing `dst`. -/ | ||
| noncomputable def assignHasUnsupportedOverlap (dst : Place) (dstTy : MirTy) : | ||
| Rvalue → Bool | ||
| | .use opnd => isTupleTy dstTy && operandMayOverlapPlace dst opnd |
There was a problem hiding this comment.
Exclude ZST tuples from the overlap rejection
For a supported all-ZST tuple such as .tuple [.unit], a self-copy or self-move reaches this condition and faults as unsupported solely because isTupleTy is true. Zero-sized copies have no byte range to overlap—the vendored memory-copy path explicitly short-circuits zero-sized accesses—so this rejects valid MIR despite the change's stated guard being for non-ZST tuple self-copies. Test tuple size/layout rather than rejecting every tuple type.
AGENTS.md reference: anneal/AGENTS.md:L216-L220
Useful? React with 👍 / 👎.
Human review surface
Extend Trusted.MirAst, Trusted.MirSemantics, Pass 2 Miri correspondence,
Anneal.MirWp, and bundled resources for Phase 2 Tier 1 scalar/control-flow
semantics:
AddWithOverflow, SubWithOverflow, MulWithOverflow, UnOp.{not,neg}, and
CastKind.intToInt across bool and signed/unsigned integer widths.
with ProjectionElem.field, AggregateKind.tuple with field-by-field
writeAggregateTuple (corresponding directly to Miri.Interpreter.writeAggregate),
and fail-closed assignHasUnsupportedOverlap for destination-overlapping tuple
aggregates and non-ZST tuple self-copy/self-move.
UnwindResume, and BasicBlock.cleanup with TerminalOut.unwound.
(25 required Miri primitives, 56 forbiddenAnneal helpers, 36 Pass 2 claims)
with 6 new non-vacuity canaries (D14-D19) and updated boundary audit / test
fixtures.
Layer 9 of 19 in the migrated Anneal verification stack under
anneal/.Public Anneal source checkpoint.
Authored by an AI agent acting on joshlf's behalf.