Documentation

Miri.DataStructures.RangeObjectMap

A checked Lean port of Miri's allocation-object range map.

@[reducible, inline]
Equations
Instances For

    The half-open vector interval returned by an imperfect access classification.

    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

          The three classifications returned by RangeObjectMap::access_type.

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

              A binary-search result: either the containing object or its insertion slot.

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

                  Explicit forms of the panics and invalid vector operations in the Rust API.

                  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
                        @[instance_reducible]
                        Equations
                        • One or more equations did not get rendered due to their size.

                        One entry in the source Vec<Elem<T>>.

                        Instances For
                          def Miri.DataStructures.instDecidableEqRangeObject.decEq {α✝ : Type} [DecidableEq α✝] (x✝ x✝¹ : RangeObject α✝) :
                          Decidable (x✝ = x✝¹)
                          Equations
                          Instances For
                            Equations
                            • One or more equations did not get rendered due to their size.
                            Instances For

                              The map keeps the source's sorted vector representation.

                              Instances For
                                def Miri.DataStructures.instDecidableEqRangeObjectMap.decEq {α✝ : Type} [DecidableEq α✝] (x✝ x✝¹ : RangeObjectMap α✝) :
                                Decidable (x✝ = x✝¹)
                                Equations
                                Instances For
                                  Equations
                                  • One or more equations did not get rendered due to their size.
                                  Instances For

                                    Mutating Rust methods may panic after changing the vector. Keep that state alongside an explicit error so Lean callers can observe the exact partial effect.

                                    Instances For
                                      @[inline]
                                      Equations
                                      Instances For
                                        @[inline]
                                        Equations
                                        Instances For

                                          Checked read corresponding to Rust indexing.

                                          Equations
                                          Instances For

                                            Checked replacement corresponding to Rust IndexMut. Invalid indices leave the map unchanged.

                                            Equations
                                            • One or more equations did not get rendered due to their size.
                                            Instances For
                                              def Miri.DataStructures.RangeObjectMap.modifyAtPos {α : Type} (map : RangeObjectMap α) (position : Position) (modify : α → α) :

                                              Checked in-place data update corresponding to a borrow through IndexMut.

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

                                                Source iter() order, materialized as an array for the pure Lean API.

                                                Equations
                                                Instances For

                                                  Finds the object containing an offset, or the vector insertion position.

                                                  Equations
                                                  Instances For

                                                    Classify a byte access exactly as Miri does. In particular the end byte is computed as range.end() - 1; empty accesses can therefore produce the same underflow error as the source instead of receiving special treatment.

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

                                                      Insert before checking adjacency, as in Rust. The returned state therefore contains the inserted element when a subsequent size check or assertion fails.

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

                                                        Remove a vector interval, corresponding to Vec::drain(start..stop).

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

                                                          Remove one position, corresponding to Vec::remove.

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

                                                            Sorted, non-overlapping ranges, stated using checked exclusive endpoints.

                                                            Equations
                                                            • One or more equations did not get rendered due to their size.
                                                            Instances For
                                                              theorem Miri.DataStructures.RangeObjectMap.setAtPos_preserves_ranges {α : Type} (map : RangeObjectMap α) (position : Position) (data : α) (inBounds : position < map.objects.size) :
                                                              (map.setAtPos position data).state.ranges = map.ranges