Igor Konnov@Protocols Made Fun
//
Igor Konnov has successfully completed full proofs of consistency for the two-phase commit (2PC) protocol using the Lean 4 theorem prover, starting from a functional specification. This work builds upon previous efforts in specifying, simulating, and property-based testing 2PC in Lean 4. The entire process, including specification and simulation from prior work, took approximately 45 hours, with the proof writing itself consuming 29 hours. The rapid proof development was attributed to a correct inductive invariant discovered using the Apalache model checker, underscoring the benefits of combining formal specification with interactive theorem proving.
The Lean 4 proofs involved a modular approach, breaking down the verification into functional, propositional, and inductive components. Statistics show that the proofs, propositional and inductive, are about 15 times longer than the system code. Specifically, Functional.lean and System.lean contained 139 lines of code, Propositional.lean had 90, PropositionalProofs.lean comprised 275, and InductiveProofs.lean reached 1077 lines of code. This ratio aligns with the empirical standard in software verification, where proofs typically range from 10 to 20 times the length of the source code.
Konnov also mentioned exploring an alternative route: proving equivalence between their specification in Propositional.lean and the Veil specification. The Veil examples repository already contains a version of two-phase commit, albeit slightly different from the TLA+ version and the Lean specification. He suggests that this could be a topic for future work. The consistency of the protocol was specified using TLA+, leveraging its methodology for defining TCConsistent. The Lean 4 code for the two-phase commit protocol can be found on GitHub.
References :
- Protocols Made Fun: Article on proving consistency of two-phase commit in Lean4
- github.com: Github repository which contains the code for TwoPhase Protocol
- github.com: Examples/IvyBench/TwoPhaseCommit.lean
- github.com: This GitHub repository contains Lean 4 code for the two-phase commit protocol.
- github.com: TwoPhase.tla
Classification:
- HashTags: #FormalVerification #DistributedSystems #Lean4
- Company: Leanda
- Target: Correctness
- Product: Logic
- Feature: Verification
- Type: Research
- Severity: Medium
|
- Investigate that Tech: LinkedIn - Nishanth Tharakan
- How Do Models Think, and Why Is There Chinese In My English Responses? - Nishanth Tharakan
- CERN - Nishanth Tharakan
- The Intersection of Mathematics, Physics, Psychology, and Music - Nishanth Tharakan
- Python: The Language That Won AI (And How Hype Helped) - Nishanth Tharakan
- Beginner’s Guide to Oscillations - Nishanth Tharakan
- Russian-American Race - tanyakh
- The Evolution of Feminized Digital Assistants: From Telephone Operators to AI - Nishanth Tharakan
- Epidemiology Part 2: My Journey Through Simulating a Pandemic - Nishanth Tharakan
- The Mathematics Behind Epidemiology: Why do Masks, Social Distancing, and Vaccines Work? - Nishanth Tharakan
- The Game of SET for Groups (Part 2), jointly with Andrey Khesin - tanyakh
- Pi: The Number That Has Made Its Way Into Everything - Nishanth Tharakan
- Beginner’s Guide to Sets - Nishanth Tharakan
- How Changing Our Perspective on Math Expanded Its Possibilities - Nishanth Tharakan
- Beginner’s Guide to Differential Equations: An Overview of UCLA’s MATH33B Class - Nishanth Tharakan
- Beginner’s Guide to Mathematical Induction - Nishanth Tharakan
- Foams and the Four-Color Theorem - tanyakh
- Beginner’s Guide to Game Theory - Nishanth Tharakan
- Forever and Ever: Infinite Chess And How to Visually Represent Infinity - Nishanth Tharakan
- Math Values for the New Year - Annie Petitt
- Happy 2025! - tanyakh
- Identical Twins - tanyakh
- A Puzzle from the Möbius Tournament - tanyakh
- A Baker, a Decorator, and a Wedding Planner Walk into a Classroom - Annie Petitt
- Beliefs and Belongings in Mathematics - David Bressoud
- Red, Yellow, and Green Hats - tanyakh
- Square out of a Plus - tanyakh
- The Game of SET for Groups (Part 1), jointly with Andrey Khesin - tanyakh
- Alexander Karabegov’s Puzzle - tanyakh
|