Declarative distributed algorithms as axiomatic theories in three-valued modal logic over semitopologies
This paper proposes a novel framework for formally specifying distributed algorithms as declarative axiomatic theories within a three-valued modal logic over semitopologies, offering a precise, high-level abstraction that captures essential system properties while enabling rigorous human and machine verification, as demonstrated by formalized proofs in Lean 4 for voting, broadcast, and agreement protocols.
Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer
Imagine you are trying to explain how a group of strangers, scattered across the world, can agree on a single decision (like "Yes" or "No") even if some of them are liars, some have bad internet, and some might try to sabotage the process.
This is the problem of distributed algorithms. Usually, computer scientists solve this by writing long, complex code that describes every single step: "If I get a message, wait 2 seconds, check my clock, send a reply..." It's like writing a recipe that lists every single chop, stir, and heat setting. It works, but it's hard to read, hard to prove is correct, and easy to mess up.
Murdoch Gabbay's paper proposes a radical new way to think about this. Instead of writing a recipe (code), he suggests writing a constitution (a set of rules).
Here is the breakdown of his idea using simple analogies:
1. The "Constitution" vs. The "Recipe"
- The Old Way (Imperative/Recipe): "First, Alice sends a message to Bob. Then Bob waits. If Bob hears from 5 people, he votes." This focuses on how the machine moves step-by-step.
- The New Way (Declarative/Constitution): "If a decision is made, it must be because a majority of honest people agreed on it." This focuses on what must be true, regardless of the steps taken to get there.
Gabbay argues that if you write the "Constitution" correctly, you don't need to worry about the messy details of the "Recipe." You just need to prove that the Constitution holds up.
2. The Three-Valued Logic (The "Maybe" Button)
In normal math, things are either True or False.
- True = The computer did the right thing.
- False = The computer made a mistake.
But in a distributed system, there is a third state: The Byzantine (or "Both") state.
Imagine a participant who is a liar. They might tell Alice "I voted Yes" and tell Bob "I voted No."
- True (t): Honest behavior.
- False (f): A clear error.
- Both (b): The "Byzantine" state. The participant is acting weirdly, sending conflicting messages.
Gabbay uses a special logic that handles this "Both" value automatically. It's like having a traffic light that has a "Maybe" light. If the light is "Maybe," the system knows to be extra careful, but it doesn't crash. This allows the math to handle liars without needing a separate "if-then" rule for every possible lie.
3. Semitopologies (The "Quorum" Map)
In these systems, a "Quorum" is a group large enough to make a decision (e.g., "We need 2 out of 3 people to agree").
Usually, mathematicians count people: "We need 51% of the group."
Gabbay uses a concept called Semitopology.
- Analogy: Imagine a map of a city. In a normal map, if you have two parks, their intersection is just a smaller park. In Gabbay's "Semitopology," the "open sets" (the parks) represent Quorums.
- The magic rule is: If you pick any three different Quorums, they must all overlap at least at one honest person.
- This ensures that no two groups can make conflicting decisions without at least one honest person being part of both groups, acting as a bridge to keep everyone aligned.
4. The "Time" Trick
Most computer science models treat time like a movie: Frame 1, Frame 2, Frame 3.
Gabbay's approach removes the "movie." There are no frames. There is just a snapshot of what is true now.
- Analogy: Instead of watching a movie of a ball being thrown, you just look at a photo of the ball in the air and ask, "Does this photo obey the laws of physics?"
- He uses Backward Rules (like a detective): "If you see a 'Delivered' message, it must be because a 'Ready' message existed before it."
- This creates a "Logical Time" (cause and effect) without needing to track "Clock Time" (seconds and milliseconds). It's much simpler because it ignores the messy implementation details of when things happened, focusing only on why they happened.
5. Why This Matters (The "Error Hunter")
The paper shows that by using this "Constitution" approach, they could:
- Simplify proofs: Proving a complex algorithm works became as easy as solving a logic puzzle.
- Find hidden bugs: They applied this to a real-world industrial protocol (Heterogeneous Paxos). The "recipe" (code) looked fine, but when they wrote the "Constitution" (axioms), the logic revealed a hidden flaw that the engineers had missed.
- Future-proofing: If you have a perfect Constitution, you can build many different "Recipes" (implementations) underneath it. As long as the Recipe follows the Constitution, it's guaranteed to be safe.
Summary
Gabbay is saying: "Stop trying to describe the dance steps. Describe the rules of the dance floor."
By using a special three-way logic (True, False, and "Liar") and a topological map of groups (Quorums), we can describe complex distributed systems as simple sets of logical rules. This makes it easier to prove they are safe, easier to find bugs, and easier to build new, better systems on top of them. It turns the chaotic problem of "how do computers agree?" into the clean, solvable problem of "does this logic hold up?"
Drowning in papers in your field?
Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.