Skip to content

Latest commit

 

History

History
35 lines (24 loc) · 1000 Bytes

File metadata and controls

35 lines (24 loc) · 1000 Bytes

vector clock

Language: Python · Sphere: programming · Category: Distributed

Signature: () → None

What it does

Vector Clock implementation for detecting causal relationships between events in distributed systems.

Guarantee

When it runs, vector clock guarantees sum(merged.clock) == 5; c1.clock == [1, 0, 0]; c2.clock == [1, 1, 0] (proven by run).

Checkable constraints:

  • c1.clock == [1, 0, 0]
  • c2.clock == [1, 1, 0]
  • c2.clock == [1, 2, 0]
  • c3.clock == [0, 0, 2]
  • c1.happens_before(c2) is True
  • c2.happens_before(c1) is False
  • c1.compare(c2) == ClockComparison.BEFORE
  • c2.compare(c1) == ClockComparison.AFTER

Verification evidence

  • Green-run: ✓ passes (re-run under the extractor's gate)
  • Constraint strength: recovery (truth-pinned)
  • Independent oracle: — none yet (green-run candidate; not an axiom under the frozen ruler)
  • Peer review: unreviewed

△ AURA Pattern Library — © Reality Optimizer