Owner-annotated compressed block layouts #
This module mirrors BlockLayout before scheduler annotations are erased. Each physical block
is represented by one ScheduleIndex, and the layout index records its persistent owner. This
makes owner alignment and duplicate-freedom available to the bounded runner while erasure remains
exactly the already-verified physical layout.
A ghost segment contains no scheduler index atom.
Equations
- IndexedGrammar.Aho.ScheduleIndexFree xs = ∀ (idx : IndexedGrammar.Aho.ScheduleIndex g input), IndexedGrammar.Aho.ScheduleAtom.index idx ∉ xs
Instances For
A ghost segment contains no scheduler $ atom.
Equations
Instances For
Erasing an index-free ghost gap produces an index-free physical gap.
Erasing a dollar-free ghost gap produces a dollar-free physical gap.
Mark one scheduler index used without changing its denotation or persistent owner.
Equations
Instances For
A ghost compressed visible-stack layout, indexed by the persistent owner of every selected
block. Gaps may contain tasks, terminals, and close, but neither another index nor $.
- nil {T : Type} {g : IndexedGrammar T} [Fintype g.nt] {input : List T} (tail : List (ScheduleAtom g input)) : ScheduleBlockLayout g input [] [] [] tail tail
- cons {T : Type} {g : IndexedGrammar T} [Fintype g.nt] {input : List T} {flags : List g.flag} {blocks : List (List g.flag)} {owners : List (Fin (10 * input.length))} {beta tail tail' : List (ScheduleAtom g input)} (idx : ScheduleIndex g input) (block_ne : idx.flags ≠ []) (indexFree : ScheduleIndexFree beta) (dollarFree : ScheduleDollarFree beta) (later : flags ≠ [] → idx.mark.later = true) (fresh : idx.owner ∉ owners) (rest : ScheduleBlockLayout g input flags blocks owners tail tail') : ScheduleBlockLayout g input (idx.flags ++ flags) (idx.flags :: blocks) (idx.owner :: owners) (beta ++ ScheduleAtom.index idx :: tail) (beta ++ ScheduleAtom.index idx.markUsed :: tail')
Instances For
Owner and block indices always have the same length.
Selected block owners are pairwise distinct.
A ghost layout directly supplies the generic persistent ownership carrier.
Equations
- layout.blockOwnership = { owners := owners, owners_length := ⋯, owners_nodup := ⋯ }
Instances For
Erasing ghost annotations produces the corresponding physical compressed layout.
The concrete visible prefix is exactly the flattening of the ghost block partition.
Re-selecting an already used ghost layout leaves every atom and owner unchanged.
Insert an index- and dollar-free ghost prefix before the first selected block.
Restrict a ghost layout to its first n whole blocks and aligned owners.
The selected ghost prefixes expose their owner list exactly; the arbitrary common tail may contain additional unselected indices.
Marking selected indices preserves every owner carried by an open frame.
Marking selected indices preserves every pending-task/terminal owner.
Marking changes no physical or ghost word length.
With no represented concrete flags there are no selected indices, so input and marked output words are definitionally the same common tail.
The selected-owner contribution is an exact prefix of the full index-owner list; the same unselected suffix occurs before and after marking.
Marking selected indices preserves the complete index-owner sequence.
Transport the global invariant across a cursor change which preserves all three owner lists and total ghost-word length.
Marking all selected blocks in the right segment preserves the complete scheduler invariant.