A checked Lean port of Miri's allocation-object range map.
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
Equations
- One or more equations did not get rendered due to their size.
Instances For
The three classifications returned by RangeObjectMap::access_type.
- perfectlyOverlapping (position : Position) : AccessType
- empty (position : Position) : AccessType
- imperfectlyOverlapping (positions : PositionRange) : AccessType
Instances For
Equations
- One or more equations did not get rendered due to their size.
- Miri.DataStructures.instDecidableEqAccessType.decEq (Miri.DataStructures.AccessType.perfectlyOverlapping position) (Miri.DataStructures.AccessType.empty position_1) = isFalse ⋯
- Miri.DataStructures.instDecidableEqAccessType.decEq (Miri.DataStructures.AccessType.perfectlyOverlapping position) (Miri.DataStructures.AccessType.imperfectlyOverlapping positions) = isFalse ⋯
- Miri.DataStructures.instDecidableEqAccessType.decEq (Miri.DataStructures.AccessType.empty position) (Miri.DataStructures.AccessType.perfectlyOverlapping position_1) = isFalse ⋯
- Miri.DataStructures.instDecidableEqAccessType.decEq (Miri.DataStructures.AccessType.empty a) (Miri.DataStructures.AccessType.empty b) = if h : a = b then h ▸ isTrue ⋯ else isFalse ⋯
- Miri.DataStructures.instDecidableEqAccessType.decEq (Miri.DataStructures.AccessType.empty position) (Miri.DataStructures.AccessType.imperfectlyOverlapping positions) = isFalse ⋯
- Miri.DataStructures.instDecidableEqAccessType.decEq (Miri.DataStructures.AccessType.imperfectlyOverlapping positions) (Miri.DataStructures.AccessType.perfectlyOverlapping position) = isFalse ⋯
- Miri.DataStructures.instDecidableEqAccessType.decEq (Miri.DataStructures.AccessType.imperfectlyOverlapping positions) (Miri.DataStructures.AccessType.empty position) = isFalse ⋯
Instances For
Equations
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.
- found (position : Position) : OffsetSearch
- insertionPoint (position : Position) : OffsetSearch
Instances For
Equations
- One or more equations did not get rendered due to their size.
- Miri.DataStructures.instDecidableEqOffsetSearch.decEq (Miri.DataStructures.OffsetSearch.found a) (Miri.DataStructures.OffsetSearch.found b) = if h : a = b then h ▸ isTrue ⋯ else isFalse ⋯
- Miri.DataStructures.instDecidableEqOffsetSearch.decEq (Miri.DataStructures.OffsetSearch.found position) (Miri.DataStructures.OffsetSearch.insertionPoint position_1) = isFalse ⋯
- Miri.DataStructures.instDecidableEqOffsetSearch.decEq (Miri.DataStructures.OffsetSearch.insertionPoint position) (Miri.DataStructures.OffsetSearch.found position_1) = isFalse ⋯
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
Explicit forms of the panics and invalid vector operations in the Rust API.
- memory (error : Memory.MemoryError) : RangeObjectMapError
- positionOutOfBounds (position length : Nat) : RangeObjectMapError
- positionRangeReversed (start stop : Nat) : RangeObjectMapError
- positionRangeOutOfBounds (start stop length : Nat) : RangeObjectMapError
- previousObjectOverlaps (position : Position) (previousEnd newStart : ABI.Size) : RangeObjectMapError
- nextObjectOverlaps (position : Position) (newEnd nextStart : ABI.Size) : RangeObjectMapError
- internalIndexOutOfBounds (position length : Nat) : RangeObjectMapError
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
Equations
- One or more equations did not get rendered due to their size.
Equations
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
The map keeps the source's sorted vector representation.
- objects : Array (RangeObject α)
Instances For
Equations
Instances For
Equations
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.
- state : α
- outcome : Except RangeObjectMapError Unit
Instances For
Equations
Instances For
Instances For
Instances For
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
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
- map.findOffset offset = Miri.DataStructures.RangeObjectMap.findOffsetAux✝ map.objects offset 0 map.objects.size
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.