Keyboard shortcuts

Press ← or → to navigate between chapters

Press ? to show this help

Press Esc to hide this help

Archive Clock Recovery

Abstract

Finite synchronized executions characterize archive-clock recovery and bound its first ambiguity.

Definition 1.1 (Finite partial-action systems).

Formalization. D5/S3/ObserverMemory/Algorithms/ArchiveClockRecovery.System (✓ std3).

Source. Repository-derived.

Commentary.

A system assigns to each action a decidable domain, a total successor and integer cost, and a reading defined only on that action’s domain. Values outside the domain never enter a legal execution, so this preserves the source partial-map model, including empty reading types and empty domains.

Definition 1.2 (State after an action word).

Formalization. D5/S3/ObserverMemory/Algorithms/ArchiveClockRecovery.stateAfter (✓ std3).

Source. Repository-derived.

Commentary.

The state after the empty word is the initial state. For a nonempty word, the first action changes the state and the remaining actions are then evaluated.

Definition 1.3 (Legal executions).

Formalization. D5/S3/ObserverMemory/Algorithms/ArchiveClockRecovery.Legal (✓ std3).

Source. Repository-derived.

Commentary.

The empty execution is legal. A nonempty execution is legal exactly when its first action is defined at the current state and its tail is legal from the successor.

Definition 1.4 (Visible archives).

Formalization. D5/S3/ObserverMemory/Algorithms/ArchiveClockRecovery.visibleArchive (✓ std3).

Source. Repository-derived.

Commentary.

Each execution step records the chosen action together with the reading produced at the state where that action is taken.

Definition 1.5 (Accumulated clock).

Formalization. D5/S3/ObserverMemory/Algorithms/ArchiveClockRecovery.clock (✓ std3).

Source. Repository-derived.

Commentary.

The clock of an execution is the sum of the integer costs of its actions at their successive source states.

Definition 1.6 (Synchronized edges).

Formalization. D5/S3/ObserverMemory/Algorithms/ArchiveClockRecovery.SynchronizedEdge (✓ std3).

Source. Repository-derived.

Commentary.

A synchronized edge applies one action legally to two states and requires the two visible readings for that action to agree.

Definition 1.7 (Synchronized paths).

Formalization. D5/S3/ObserverMemory/Algorithms/ArchiveClockRecovery.SynchronizedPath (✓ std3).

Source. Repository-derived.

Commentary.

A synchronized path follows the same action word from two states, with a synchronized edge at every step.

Definition 1.8 (Synchronized pair traces).

Formalization. D5/S3/ObserverMemory/Algorithms/ArchiveClockRecovery.pairTrace (✓ std3).

Source. Repository-derived.

Commentary.

The pair trace contains the initial state pair and every successive pair reached by the common action word.

Definition 1.9 (Clock-difference sums).

Formalization. D5/S3/ObserverMemory/Algorithms/ArchiveClockRecovery.deltaSum (✓ std3).

Source. Repository-derived.

Commentary.

The delta sum accumulates, edge by edge, the first execution’s cost minus the second execution’s cost.

Definition 1.10 (Synchronous reachability).

Formalization. D5/S3/ObserverMemory/Algorithms/ArchiveClockRecovery.SynchronouslyReachable (✓ std3).

Source. Repository-derived.

Commentary.

A pair is synchronously reachable when a common synchronized word carries two allowed initial states to that pair.

Definition 1.11 (Recovery from visible archives).

Formalization. D5/S3/ObserverMemory/Algorithms/ArchiveClockRecovery.ArchiveRecoverable (✓ std3).

Source. Repository-derived.

Commentary.

Archive recoverability means that one integer-valued function of the visible archive equals the clock on every legal execution from every allowed initial state.

Theorem 1.12 (Archive recovery is equivalent to synchronized cost consistency).

Proof. Machine-checked in Lean as D5/S3/ObserverMemory/Algorithms/ArchiveClockRecovery.archive_clock_recovery_and_finite_ambiguity (✓ std3). ∎

Source. Repository-derived.

Commentary.

For finite configuration, action, and reading types, with n configurations and a nonempty allowed initial set, three conditions are equivalent: a single archive decoder recovers every legal clock, every synchronized path from allowed initial states has zero delta sum, and every synchronized edge whose source pair is synchronously reachable has zero cost difference.

Two synchronized executions have the same visible archive, and their delta sum is exactly the difference of their clocks. Conversely, equality of visible archives synchronizes the two executions. Prefix subtraction turns zero path sums into zero reachable-edge differences.

If recovery fails, choose a shortest synchronized word reaching the source of a nonzero edge. A repeated state pair would allow the intervening loop to be removed while preserving legality, readings, and the endpoint, contradicting minimality. Thus its pair trace has at most n squared vertices. According to whether the prefix delta is already nonzero, the prefix or the prefix followed by the bad edge gives equal archives, unequal clocks, and common length at most n squared.

References