Documentation

Miri.Interpreter.MachineHooks

Pinned Miri machine hooks for frame-local clocks, retag scopes and protector lifecycle. Compiler/memory leaves remain explicit effects.

Semantic FrameExtra fields; profiling-only timing is omitted.

Instances For

    Allocation race extras are keyed by the same canonical AllocId as live memory; this external index composes with the existing BorrowTree extra type. Allocation lifecycle adapters must install/remove entries with their allocation.

    Instances For
      @[reducible, inline]
      Equations
      • One or more equations did not get rendered due to their size.
      Instances For
        Equations
        • One or more equations did not get rendered due to their size.
        Instances For
          Equations
          • One or more equations did not get rendered due to their size.
          Instances For

            Source machine after_local_read. LocalAccess already skips this hook for indirect operands and while validation is in progress.

            Equations
            • One or more equations did not get rendered due to their size.
            Instances For
              def Miri.Interpreter.MachineHooks.afterLocalWrite {K User : Type} (localId : MIR.LocalId) (storageLive : Bool) :
              M K User Unit

              Source machine after_local_write. The storage-live bit changes the clock transition; it is never treated as an ordinary overwrite.

              Equations
              • One or more equations did not get rendered due to their size.
              Instances For

                LocalAccess's frame/state callback boundary, preserving the canonical frame-local clock map instead of copying it into an unrelated side state.

                Equations
                • One or more equations did not get rendered due to their size.
                Instances For

                  Required layout and stack-memory leaves. Whole-state storage operations below preserve FrameExtra changes made by afterLocalWrite and allocation.

                  Instances For
                    @[simp]

                    A successful stack result introduces no machine effect. This public rule lets client proofs use the storage driver without naming its private adapter.

                    @[simp]

                    Dead local storage owns no allocation to deallocate.

                    def Miri.Interpreter.MachineHooks.storageLiveDyn {K User : Type} (hooks : StorageHooks K User) (localId : MIR.LocalId) (metadata : MemPlaceMeta Memory.Provenance) :
                    M K User Unit

                    Canonical whole-state source storage_live_dyn. The generic Frame operation cannot itself install FrameExtra mutations made by a machine hook; this binding uses current Frame methods after each hook so local-race/protector state survives.

                    Equations
                    • One or more equations did not get rendered due to their size.
                    Instances For
                      def Miri.Interpreter.MachineHooks.storageDead {K User : Type} (hooks : StorageHooks K User) (localId : MIR.LocalId) :
                      M K User Unit
                      Equations
                      • One or more equations did not get rendered due to their size.
                      Instances For

                        Source init_frame semantic fields. New frames have empty protected-tag and local-clock sets exactly when their corresponding machine backend is enabled.

                        Equations
                        • One or more equations did not get rendered due to their size.
                        Instances For

                          Source after_local_moved_to_memory records declaration span before fetching allocation extras, then transfers local timestamps to every byte.

                          Equations
                          • One or more equations did not get rendered due to their size.
                          Instances For

                            Allocation-level vector-clock read/write binding. The outer machine memory hook must still perform weak-memory invalidation (writes), Tree Borrows and sync-object access in source order; this function is the data-race stage only.

                            Equations
                            • One or more equations did not get rendered due to their size.
                            Instances For
                              Equations
                              • One or more equations did not get rendered due to their size.
                              Instances For
                                Equations
                                • One or more equations did not get rendered due to their size.
                                Instances For
                                  def Miri.Interpreter.MachineHooks.withRetagMode {K User A : Type} (mode : TreeBorrows.RetagPolicy.RetagMode) (action : M K User A) :
                                  M K User A

                                  Source with_retag_mode restores the old mode after both success and error. A disabled borrow tracker runs the body directly, as in machine.rs.

                                  Equations
                                  • One or more equations did not get rendered due to their size.
                                  Instances For

                                    Required typed pointer queries and memory effects around the existing Tree Borrows core. prepare* returns all explicit RetagPipeline leaf results; no successful request is generated for missing compiler or pointer facts.

                                    Instances For
                                      Equations
                                      • One or more equations did not get rendered due to their size.
                                      Instances For

                                        This policy is exactly tb_protect_place's explicit NewPermission.

                                        Equations
                                        • One or more equations did not get rendered due to their size.
                                        Instances For

                                          Reuse the existing reborrow core with a policy whose equality to the source explicit protector policy is kernel checked below.

                                          Source protect-place retags first, then writes uninit through the newly protected tag. Errors retain allocated tags, tree effects and write effects.

                                          Equations
                                          • One or more equations did not get rendered due to their size.
                                          Instances For
                                            def Miri.Interpreter.MachineHooks.beforeStackPopWithEnsure {K User : Type} [DecidableEq K] (ensureTreeExtra : Memory.AllocId → M K User Unit) :
                                            M K User Unit

                                            Source on_stack_pop releases each live allocation's protector while all protectors remain registered, commits partial tree mutations on failure, and only removes global protectors once every release succeeds.

                                            Equations
                                            • One or more equations did not get rendered due to their size.
                                            Instances For
                                              def Miri.Interpreter.MachineHooks.beforeStackPop {K User : Type} [DecidableEq K] (hooks : Hooks K User) :
                                              M K User Unit

                                              Compatibility entrypoint for legacy request-based fixture dictionaries.

                                              Equations
                                              Instances For
                                                def Miri.Interpreter.MachineHooks.run {K User A : Type} (action : M K User A) (state : State K User) :
                                                StepResult (State K User) A

                                                Direct adapters for the Call/Rvalue hooks use these EStateM functions. This runner retains error-state effects in the canonical StepResult format.

                                                Equations
                                                Instances For