What the worklist search finds #
⚠️ Unreviewed by Bolton
The invariant of the search: the visited string is a list of distinct records, each the code of a configuration reachable from the initial one; the initial code is among them; and every record the counter has passed has both of its successors recorded.
Once the counter has passed every record — which it has after as many steps as there are configurations, since the records are distinct — the recorded codes are closed under the graph's steps, so every reachable configuration's code is there.
Main definitions #
Complexity.recordWidth— the width of one recordComplexity.SearchOk— the invariant
Main results #
Complexity.memFlag_records— the scan decides membership in the record listComplexity.searchStepPair_ok— one step preserves the invariantComplexity.SearchOk.mem_of_reachesCfg— a saturated search has found everything
Records #
The width of one record: a whole code.
Equations
Instances For
Appending a record #
The invariant #
The records of a list of configurations.
Equations
- Complexity.codesOf W cs = List.map (Complexity.Cobham.cfgCode W) cs
Instances For
The search state is sound: the visited string is the concatenation of the codes of finitely many reachable configurations, no two of them coded alike; the initial code is there; and every record the counter has passed has both successors recorded.
Equations
- One or more equations did not get rendered due to their size.
Instances For
One step preserves the invariant #
The two encoded successors of a reachable configuration are codes of reachable configurations.
One step of the search preserves the invariant.
A saturated search has found everything #
Once the counter has passed every record, the search is complete.
How long the visited string can get #
The visited string is bounded by the configuration count. The records are
distinct and each is the code of a reachable configuration, and distinct
configurations of the graph have distinct codes in the finite type of
Complexitylib.Classes.Containments.Internal.ConfigCount.