A checked, source-shaped port of Miri's allocation AddressGenerator.
The source RNG's 0..16 sample is represented by Fin 16, rather than by a
fixed seed or a chosen pseudo-random stream.
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]
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]
@[instance_reducible]
- invalidAlignment (error : ABI.AlignError) : AddressGeneratorError
- zeroAlignment : AddressGeneratorError
- slackAdditionOverflow (address slack : UInt64) : AddressGeneratorError
- alignmentRoundingOverflow (address align : UInt64) : AddressGeneratorError
- allocationEndOverflow (address length : UInt64) : AddressGeneratorError
- addressSpaceFull (next endAddr : UInt64) : AddressGeneratorError
Instances For
def
Miri.Memory.AllocAddresses.instDecidableEqAddressGeneratorError.decEq
(x✝ x✝¹ : AddressGeneratorError)
:
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]
@[instance_reducible]
Equations
- One or more equations did not get rendered due to their size.
- state : AddressGenerator
- outcome : Except AddressGeneratorError UInt64
Instances For
Equations
- Miri.Memory.AllocAddresses.AddressGenerator.new start stop = { nextBaseAddr := start, endAddr := stop }
Instances For
Equations
- generator.getRemaining = { start := generator.nextBaseAddr, stop := generator.endAddr }
Instances For
The source sample is from the half-open range 0..16.
Equations
- Miri.Memory.AllocAddresses.AddressGenerator.legalSlack slack = (↑slack < 16)
Instances For
theorem
Miri.Memory.AllocAddresses.AddressGenerator.slack_is_legal
(slack : Fin 16)
:
legalSlack slack
Source align_addr, with the strict_add overflow made explicit. This
preserves the source's evaluation order: it adds the whole alignment before
subtracting the remainder.
Equations
- One or more equations did not get rendered due to their size.
Instances For
def
Miri.Memory.AllocAddresses.AddressGenerator.generate
(generator : AddressGenerator)
(size : ABI.Size)
(align : ABI.Align)
(slack : Fin 16)
:
Execute one source generation step using a legal source random choice. The state includes the source mutation made before its final address-space check, including the updated next address on an exhaustion error.
Equations
- One or more equations did not get rendered due to their size.