Documentation

Miri.Interpreter.Projection

Executable projection rules from pinned rustc interpret/projection.rs. Compiler queries and machine-owned operations are required fallible callbacks. No projection reads memory, validates a discriminant, or erases provenance.

structure Miri.Interpreter.OpTy (Prov : Type) :
Instances For
    @[instance_reducible]
    instance Miri.Interpreter.instReprOpTy {Prov✝ : Type} [Repr Prov✝] :
    Repr (OpTy Prov✝)
    Equations
    def Miri.Interpreter.instReprOpTy.repr {Prov✝ : Type} [Repr Prov✝] :
    OpTy Prov✝ → Nat → Std.Format
    Equations
    • One or more equations did not get rendered due to their size.
    Instances For
      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

            Compiler/machine dependencies are explicit, including ABI checking of immediates and dynamic alignment computation (which may execute custom DST code). subsliceLayout must construct the array type or retain the slice type and run layout_of; sliceMetadata must use the target usize representation.

            Instances For
              def Miri.Interpreter.projectionMemoryOffset {Prov ProvExtra : Type} (target : Memory.PointerArithmetic) (resolve : Memory.PointerResolver Prov ProvExtra) (lookup : Memory.LiveAllocationLookup) (place : MemPlace Prov) (offset : ABI.Size) (mode : OffsetMode) (metadata : MemPlaceMeta Prov) :

              The actual memory adapter delegates to the existing pointer arithmetic semantics, retaining allocation identity, provenance and misalignment.

              Equations
              • One or more equations did not get rendered due to their size.
              Instances For
                def Miri.Interpreter.projectionImmediateOffset {Prov : Type} (validate : Immediate Prov → ABI.LayoutData → Except ProjectionError Unit) (value : Immediate Prov) (source : ABI.TyAndLayout MIR.TyId) (offset : ABI.Size) (target : ABI.TyAndLayout MIR.TyId) (debugAssertions : Bool := true) :

                Source ImmTy::offset_. ABI validation is required before extraction and on the resulting immediate, even for uninitialized/uninhabited/ZST values.

                Equations
                • One or more equations did not get rendered due to their size.
                Instances For
                  def Miri.Interpreter.OpTy.offsetWithMeta {Prov : Type} (cx : ProjectionCx Prov) (base : OpTy Prov) (offset : ABI.Size) (mode : OffsetMode) (metadata : MemPlaceMeta Prov) (layout : ABI.TyAndLayout MIR.TyId) :
                  Equations
                  • One or more equations did not get rendered due to their size.
                  Instances For
                    def Miri.Interpreter.OpTy.offset {Prov : Type} (cx : ProjectionCx Prov) (base : OpTy Prov) (offset : ABI.Size) (layout : ABI.TyAndLayout MIR.TyId) :
                    Equations
                    • One or more equations did not get rendered due to their size.
                    Instances For
                      def Miri.Interpreter.OpTy.transmute {Prov : Type} (cx : ProjectionCx Prov) (base : OpTy Prov) (layout : ABI.TyAndLayout MIR.TyId) :
                      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.projectField {Prov : Type} (cx : ProjectionCx Prov) (base : OpTy Prov) (field : Nat) :
                          Equations
                          • One or more equations did not get rendered due to their size.
                          Instances For
                            def Miri.Interpreter.projectDowncast {Prov : Type} (cx : ProjectionCx Prov) (base : OpTy Prov) (variant : Nat) :
                            Equations
                            • One or more equations did not get rendered due to their size.
                            Instances For
                              def Miri.Interpreter.projectIndex {Prov : Type} [Memory.PointerProvenance Prov] (cx : ProjectionCx Prov) (base : OpTy Prov) (index : UInt64) :
                              Equations
                              • One or more equations did not get rendered due to their size.
                              Instances For
                                def Miri.Interpreter.projectConstantIndex {Prov : Type} [Memory.PointerProvenance Prov] (cx : ProjectionCx Prov) (base : OpTy Prov) (offset minLength : UInt64) (fromEnd : Bool) :
                                Equations
                                • One or more equations did not get rendered due to their size.
                                Instances For
                                  def Miri.Interpreter.prepareSubslice {Prov : Type} [Memory.PointerProvenance Prov] (cx : ProjectionCx Prov) (base : OpTy Prov) (fromIndex to : UInt64) (fromEnd : Bool) :
                                  Equations
                                  • One or more equations did not get rendered due to their size.
                                  Instances For
                                    def Miri.Interpreter.projectSubslice {Prov : Type} [Memory.PointerProvenance Prov] (cx : ProjectionCx Prov) (base : OpTy Prov) (fromIndex to : UInt64) (fromEnd : Bool) :
                                    Equations
                                    • One or more equations did not get rendered due to their size.
                                    Instances For

                                      Iterator range state is advanced before projecting the element, even when that projection fails, matching Range::next followed by fallible offset.

                                      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

                                            Consume the existing source MIR projection syntax; oversized imported Nat indices fail explicitly rather than silently truncating to upstream u64.

                                            Equations
                                            Instances For