One scheduler phase #
A phase starts from a state whose first a records are accepted and whose last 2 ^ p records
are pending, and tests a fixed menu of direction tuples for the pending requests. For every menu
entry e, pending request i and scalar index c, the candidate point is the target of i
plus scalar c • menu e i; its bits are the target bits plus a fixed offset. A candidate is
occupied when it lies on an accepted line, and a duplicate when another request's candidate
for the same entry is the same point. A request is clean for an entry when none of its candidates
is occupied or a duplicate; this is exactly LineCode.IsClean (clean_iff). An entry succeeds
when at least half of the requests are clean, and the first successful entry is chosen. The
pending records, with their candidate lines for the chosen entry and their clean flags, are
sorted with clean records first; the first ⌈2 ^ p / 2⌉ of them are accepted (next).
For a universal menu some entry succeeds, so every accepted record is clean, which keeps the
state good (good_next).
Main definitions #
Cslib.Circuits.Boolean.MassProduction.Scheduler.candidate: the bits of a candidate point.Cslib.Circuits.Boolean.MassProduction.Scheduler.clean: the clean flags.Cslib.Circuits.Boolean.MassProduction.Scheduler.chosen: the first successful entry.Cslib.Circuits.Boolean.MassProduction.Scheduler.next: the state after the phase.
Main results #
Cslib.Circuits.Boolean.MassProduction.Scheduler.clean_iff: clean flags areIsClean.Cslib.Circuits.Boolean.MassProduction.Scheduler.good_next: a phase keeps the state good.
References #
- Adapted from MassProduction/Nonuniform/MenuClean.lean, MassProduction/Nonuniform/MenuSelection.lean, MassProduction/Nonuniform/PointConflicts.lean, MassProduction/Nonuniform/BufferedPhase.lean and MassProduction/Nonuniform/BufferStepCorrectness.lean in S. Schlesinger, Boolean circuit mass production formalization, using the sorting network of K. E. Batcher, Sorting Networks and Their Applications.
The position of pending request i.
Instances For
The position of accepted request m.
Instances For
The bits of candidate point c of request i for menu entry e: the target bits plus the
fixed bits of scalar c • menu e i.
Instances For
A candidate lies on an accepted line.
Instances For
Another candidate of the same menu entry is the same point.
Instances For
No candidate of request i for entry e is occupied or a duplicate.
Instances For
At least half of the pending requests are clean for entry e.
Instances For
Entry e is the first successful entry.
Instances For
Request i is clean for the chosen entry.
Instances For
Bit β of candidate point c of request i for the chosen entry.
Instances For
A pending record with its clean flag in front and its candidate line for the chosen entry.
Instances For
The enriched pending records, sorted with clean records first.
Instances For
The state after the phase: accepted records stay, and the sorted enriched pending records follow without their flags.
Instances For
Pending request i sits i positions after the accepted block.
Accepted request m sits at position m.
A phase keeps the accepted records.
After a phase, the pending block holds the sorted enriched records without their flags.
The occupied points are the points of the accepted lines.
A candidate lists the bits of its point.
A candidate is occupied exactly when its point lies on an accepted line.
A candidate is a duplicate exactly when another candidate of its entry is the same point.
The clean flags are exactly the clean requests of LineCode.IsClean, for nonzero menu
directions.
A phase with a universal menu keeps the state good and accepts ⌈2 ^ p / 2⌉ more
requests.