Descriptor identities/table and portable FileDescription behavior from pinned shims/files.rs. Host handles remain real external resources; no virtual filesystem or readiness-success environment is manufactured.
@[reducible, inline]
Instances For
Rust scope drop, including errors. A failing required destructor remains explicit and keeps its effects; it cannot be silently discarded.
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.
Instances For
@[instance_reducible]
Equations
- stdin {Handle Directory Other : Type} : Description Handle Directory Other
- stdout {Handle Directory Other : Type} : Description Handle Directory Other
- stderr {Handle Directory Other : Type} : Description Handle Directory Other
- nullOutput {Handle Directory Other : Type} : Description Handle Directory Other
- file {Handle Directory Other : Type} (handle : Handle) (readable writable : Bool) : Description Handle Directory Other
- directory {Handle Directory Other : Type} (handle : Directory) : Description Handle Directory Other
- other {Handle Directory Other : Type} (payload : Other) : Description Handle Directory Other
Instances For
- id : FdId
- value : Description
Instances For
@[instance_reducible]
Equations
- Miri.Interpreter.Files.instBEqRef = { beq := fun (left right : Miri.Interpreter.Files.Ref D) => left.id == right.id }
def
Miri.Interpreter.Files.Table.insertNew
{D : Type}
(table : Table D)
(value : D)
(hostUsizeBits : Nat)
:
Equations
Instances For
The runtime must retain the returned strong reference (including in pending callbacks). Table.remove transfers its strong reference rather than duplicating.
Equations
- table.get fd = Option.map (fun (x : Int32 × Miri.Interpreter.Files.Ref D) => x.snd) (Array.find? (fun (x : Int32 × Miri.Interpreter.Files.Ref D) => x.fst == fd) table.fds)
Instances For
def
Miri.Interpreter.Files.Table.init
{H D O : Type}
(mute : Bool)
(hostUsizeBits : Nat)
:
Except StepError (Table (Description H D O))
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.
Instances For
@[instance_reducible]
Equations
@[reducible, inline]
Equations
- Miri.Interpreter.Files.Result Host A = Except (Miri.Interpreter.IoError.Error Host) A
Instances For
@[reducible, inline]
Equations
Instances For
- family : ForeignItems.Family
- hostRead : Description Handle Directory Other → ByteArray → M S (Except (IoError.HostError Host) (Nat × ByteArray))
- hostWrite : Description Handle Directory Other → ByteArray → M S (Except (IoError.HostError Host) Nat)
- hostSeek : Handle → SeekFrom → M S (Except (IoError.HostError Host) UInt64)
- hostMetadata : Description Handle Directory Other → M S (Except (IoError.HostError Host) Metadata)
- hostIsTerminal : Description Handle Directory Other → M S Bool
- readBytes : Memory.Pointer (Option Memory.Provenance) → ABI.Size → M S ByteArray
- writeBytes : Memory.Pointer (Option Memory.Provenance) → ByteArray → M S Unit
- permissionDenied : M S (IoError.HostError Host)
- otherRead : Ref (Description Handle Directory Other) → Bool → Memory.Pointer (Option Memory.Provenance) → Nat → Finish S Host → M S Unit
Socket/pipe/event descriptions may block and invoke finish only later. Their real readiness/blocking implementation must retain captured strong refs.
- otherWrite : Ref (Description Handle Directory Other) → Bool → Memory.Pointer (Option Memory.Provenance) → Nat → Finish S Host → M S Unit
- otherShortOperations : Other → Bool
- otherHasReadinessWatched : Other → Bool
Instances For
def
Miri.Interpreter.Files.readFromHost
{S H D O E Meta : Type}
(h : Hooks S H D O E Meta)
(description : Description H D O)
(len : Nat)
(pointer : Memory.Pointer (Option Memory.Provenance))
:
Equations
- One or more equations did not get rendered due to their size.
Instances For
def
Miri.Interpreter.Files.writeToHost
{S H D O E Meta : Type}
(h : Hooks S H D O E Meta)
(description : Description H D O)
(len : Nat)
(pointer : Memory.Pointer (Option Memory.Provenance))
:
Equations
- One or more equations did not get rendered due to their size.
Instances For
def
Miri.Interpreter.Files.read
{S H D O E Meta : Type}
(h : Hooks S H D O E Meta)
(ref : Ref (Description H D O))
(communicate : Bool)
(pointer : Memory.Pointer (Option Memory.Provenance))
(len : Nat)
(finish : Finish S E)
:
Equations
- One or more equations did not get rendered due to their size.
Instances For
def
Miri.Interpreter.Files.write
{S H D O E Meta : Type}
(h : Hooks S H D O E Meta)
(ref : Ref (Description H D O))
(communicate : Bool)
(pointer : Memory.Pointer (Option Memory.Provenance))
(len : Nat)
(finish : Finish S E)
:
Equations
- One or more equations did not get rendered due to their size.
Instances For
def
Miri.Interpreter.Files.shortOperations
{S H D O E Meta : Type}
(h : Hooks S H D O E Meta)
:
Description H D O → Bool
Equations
- Miri.Interpreter.Files.shortOperations h (Miri.Interpreter.Files.Description.file handle readable writable) = true
- Miri.Interpreter.Files.shortOperations h (Miri.Interpreter.Files.Description.other value) = h.otherShortOperations value
- Miri.Interpreter.Files.shortOperations h x✝ = false
Instances For
def
Miri.Interpreter.Files.readiness
{S H D O E Meta : Type}
(h : Hooks S H D O E Meta)
:
Description H D O → M S (Option Readiness)
Equations
- Miri.Interpreter.Files.readiness h Miri.Interpreter.Files.Description.stdin = pure (some { readable := true, writable := true })
- Miri.Interpreter.Files.readiness h Miri.Interpreter.Files.Description.stdout = pure (some { writable := true })
- Miri.Interpreter.Files.readiness h Miri.Interpreter.Files.Description.stderr = pure (some { writable := true })
- Miri.Interpreter.Files.readiness h Miri.Interpreter.Files.Description.nullOutput = pure (some { writable := true })
- Miri.Interpreter.Files.readiness h (Miri.Interpreter.Files.Description.file handle readable writable) = pure none
- Miri.Interpreter.Files.readiness h (Miri.Interpreter.Files.Description.directory handle) = pure none
- Miri.Interpreter.Files.readiness h (Miri.Interpreter.Files.Description.other value) = h.otherReadiness value
Instances For
def
Miri.Interpreter.Files.hasReadinessWatched
{S H D O E Meta : Type}
(h : Hooks S H D O E Meta)
:
Description H D O → Bool
Equations
- Miri.Interpreter.Files.hasReadinessWatched h Miri.Interpreter.Files.Description.stdin = true
- Miri.Interpreter.Files.hasReadinessWatched h Miri.Interpreter.Files.Description.stdout = true
- Miri.Interpreter.Files.hasReadinessWatched h Miri.Interpreter.Files.Description.stderr = true
- Miri.Interpreter.Files.hasReadinessWatched h Miri.Interpreter.Files.Description.nullOutput = true
- Miri.Interpreter.Files.hasReadinessWatched h (Miri.Interpreter.Files.Description.file handle readable writable) = false
- Miri.Interpreter.Files.hasReadinessWatched h (Miri.Interpreter.Files.Description.directory handle) = false
- Miri.Interpreter.Files.hasReadinessWatched h (Miri.Interpreter.Files.Description.other value) = h.otherHasReadinessWatched value
Instances For
def
Miri.Interpreter.Files.isTty
{S H D O E Meta : Type}
(h : Hooks S H D O E Meta)
(communicate : Bool)
(description : Description H D O)
:
Equations
- One or more equations did not get rendered due to their size.
- Miri.Interpreter.Files.isTty h communicate Miri.Interpreter.Files.Description.stdin = if communicate = true then h.hostIsTerminal Miri.Interpreter.Files.Description.stdin else pure false
- Miri.Interpreter.Files.isTty h communicate Miri.Interpreter.Files.Description.stdout = if communicate = true then h.hostIsTerminal Miri.Interpreter.Files.Description.stdout else pure false
- Miri.Interpreter.Files.isTty h communicate Miri.Interpreter.Files.Description.stderr = if communicate = true then h.hostIsTerminal Miri.Interpreter.Files.Description.stderr else pure false
- Miri.Interpreter.Files.isTty h communicate (Miri.Interpreter.Files.Description.other value) = h.otherIsTerminal value communicate
- Miri.Interpreter.Files.isTty h communicate description = pure false
Instances For
def
Miri.Interpreter.Files.seek
{S H D O E Meta : Type}
(h : Hooks S H D O E Meta)
(communicate : Bool)
(description : Description H D O)
(offset : SeekFrom)
:
Equations
- One or more equations did not get rendered due to their size.
- Miri.Interpreter.Files.seek h communicate description offset = throw (Miri.Interpreter.StepError.unsupported "cannot seek this file description")