Optional structural-hash memo for already resolved transport graphs. The authoritative resolver still owns all input checks. Cached keys use the same Json equality and hash; collisions are never treated as equality. A raw noncanonical object, or an unexpected shape, disables this optimization.
Equations
- Miri.Input.JsonTraversalCache.instBEqKey = { beq := fun (a b : Miri.Input.JsonTraversalCache.Key) => a.value == b.value }
Equations
- Miri.Input.JsonTraversalCache.instHashableKey = { hash := fun (a : Miri.Input.JsonTraversalCache.Key) => a.digest }
Equations
- (Miri.Input.JsonTraversalCache.Node.cached key children).value = key.value
- (Miri.Input.JsonTraversalCache.Node.uncached value).value = value
Instances For
Equations
- (Miri.Input.JsonTraversalCache.Node.cached key children).key = key
- (Miri.Input.JsonTraversalCache.Node.uncached value).key = { value := value, digest := hash value, id := none }
Instances For
Identity keys are confined to a single document traversal. Sharing is supplied by the exporter, never inferred from hashes.
- node (id : Nat) : IdentityKey
- raw (key : Key) : IdentityKey
Instances For
Equations
- Miri.Input.JsonTraversalCache.instBEqIdentityKey.beq (Miri.Input.JsonTraversalCache.IdentityKey.node a) (Miri.Input.JsonTraversalCache.IdentityKey.node b) = (a == b)
- Miri.Input.JsonTraversalCache.instBEqIdentityKey.beq (Miri.Input.JsonTraversalCache.IdentityKey.raw a) (Miri.Input.JsonTraversalCache.IdentityKey.raw b) = (a == b)
- Miri.Input.JsonTraversalCache.instBEqIdentityKey.beq x✝¹ x✝ = false
Instances For
Equations
- One or more equations did not get rendered due to their size.
Equations
- One or more equations did not get rendered due to their size.
- (Miri.Input.JsonTraversalCache.Node.uncached value).identity = Miri.Input.JsonTraversalCache.IdentityKey.raw { value := value, digest := hash value, id := none }
Instances For
Inline children are traversed under their shared parent, without creating unique memo entries that can never be hit. Raw fallback keeps structural reuse.
Equations
- (Miri.Input.JsonTraversalCache.Node.cached key children).shouldMemo = key.id.isSome
- (Miri.Input.JsonTraversalCache.Node.uncached value).shouldMemo = true
Instances For
Child positions follow the actual array or object's inorder traversal. Only the internal builder supplies cached children; an absent child falls back to the real JSON value, preserving checks rather than treating it as visited.
Equations
- (Miri.Input.JsonTraversalCache.Node.cached key children).child index fallback = children[index]?.getD (Miri.Input.JsonTraversalCache.Node.uncached fallback)
- (Miri.Input.JsonTraversalCache.Node.uncached value).child index fallback = Miri.Input.JsonTraversalCache.Node.uncached fallback
Instances For
Only this constructor path creates the optional cache from the same input and resolver result. Fallback preserves arbitrary manually constructed Raw JSON. The cache performs no readiness or semantic validation of its own.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Diagnostic consistency check; deliberately expensive, never used as a readiness shortcut. It checks every cached child independently.