What is TLA+?
TLA+ (Temporal Logic of Actions) is a formal specification language used to design, model, and verify concurrent and distributed systems. It allows us to mathematically prove that certain properties always hold, regardless of execution order or timing.Verified Properties
The Styx specification formally verifies four critical properties:Property 7: Belief is Never Binary
Belief distributions must never collapse into absolute certainty (100% in any single state).Property 14: Finality is Irreversible
Once a node is declared dead, that decision is permanent and cannot be reversed.dead set only grows, never shrinks, ensuring finality is truly final.
Property 18: Confidence Sums to One
All belief distributions must be valid probability distributions (summing to 100%).Property 13: False Death Forbidden
Death can only be declared when dead confidence exceeds the safety threshold (85%).Core Invariants
Type Invariant
The specification enforces type safety across all system states:- All belief components are percentages (0-100)
- The dead set only contains valid nodes
- Time remains bounded
State Transitions
The specification models four key state transitions:1. Receive Report
Witnesses send belief reports about target nodes:2. Update Beliefs
Nodes update their beliefs based on received reports:3. Declare Death
Death declaration requires meeting the confidence threshold:4. Time Advancement
Logical time advances monotonically:Formal Guarantees
The TLA+ specification provides mathematical proof that:- Safety: The system never enters an invalid state
- Liveness: Progress is always possible (no deadlocks)
- Invariance: Critical properties hold in all reachable states
- Monotonicity: Certain decisions (like death) are irreversible
Verification Process
To verify the specification using TLC (the TLA+ model checker):Theoretical Foundation
The specification is based on:- Temporal Logic: Properties that must hold over time
- Set Theory: Modeling node sets and belief distributions
- Probability Theory: Ensuring valid probability distributions
Limitations
While the specification proves core properties, it:- Simplifies the actual implementation for tractability
- Assumes message delivery (eventual consistency)
- Models a bounded state space (finite nodes, finite time)