towards automatic inference of inductive invariants
play

Towards Automatic Inference of Inductive Invariants Haojun Ma , Aman - PowerPoint PPT Presentation

Towards Automatic Inference of Inductive Invariants Haojun Ma , Aman Goel, Jean-Baptiste Jeannin Manos Kapritsos, Baris Kasikci, Karem A. Sakallah University of Michigan Distributed systems are subtle 1 The alternative: formal verification


  1. Towards Automatic Inference of Inductive Invariants Haojun Ma , Aman Goel, Jean-Baptiste Jeannin Manos Kapritsos, Baris Kasikci, Karem A. Sakallah University of Michigan

  2. Distributed systems are subtle 1

  3. The alternative: formal verification Formal specification or property Proving the system maintains the property Successful on distributed systems Drawback: Manual effort 2

  4. Existing verification approaches Verdi(Coq) IronFleet(Dafny) Ivy I4 Manual Effort Person-years Person-months Person-hours Automated All existing approaches require the human to find an inductive invariant We want to automatically find inductive invariants 3

  5. Formal verification in 2 minutes Goal: prove that the safety property holds at all times An execution: Initial . . . 0 1 2 k k+1 state Inductive proof Base case: prove initial state is safe ● Inductive step: if state k is safe, prove state k+1 is safe ● 4

  6. Safety property vs. inductive invariant All states Inductive Reachable invariant states Safe states 5

  7. Lock server protocol Client0 Server0 Safety property: no two clients can be linked to the same server Client1 Server1 Client2 6

  8. Finding an inductive invariant using Ivy Automatically checks if an invariant is inductive (Screenshot from Ivy) Requires the human to find an inductive invariant Existing approaches rely on lock_hold manual effort and human intuition Safety property Strengthening assertion 7

  9. Outline I4: a new approach Design of I4 Evaluation Future work 8

  10. I4: a new approach Goal: Find an inductive invariant without relying on human intuition. Insight: Distributed protocols exhibit regularity . • Behavior doesn’t fundamentally change as the size increases • E.g. lock server, Paxos, … Implication: We can use inductive invariants from small instances to infer a generalized inductive invariant that holds for all instances. 9

  11. Leveraging model checking Model checking J Fully automated L Doesn’t scale to distributed systems I4 applies model checking to small, finite instances … … and then generalizes the result to all instances. 10

  12. Outline Design of I4 Evaluation Future work 11

  13. Overview Invariant generation on Invariant Correct a finite instance generalization Protocol.ivy ✓ (Model Checking) (Ivy) Increase Size 12

  14. Invariant generation on a finite instance Debug Counterexample (manually) Invariant Protocol.v Create Small Model Correct generalization Protocol.ivy ✓ (Finite) Instance Checker (Ivy) Protocol.finv Increase Size 13

  15. Invariant Generalization Debug Strengthening Counterexample Weaken (manually) Assertion Violation Protocol.v Create Small Model Correct Protocol.ivy Protocol_inv.ivy Ivy ✓ (Finite) Instance Checker Safety Protocol.finv Generalize Property Violation Increase Size 14

  16. Outline Evaluation Future work 15

  17. Evaluation Lock Server Leader Election Distributed lock 1 server 3 nodes 2 nodes 2 clients 3 IDs 4 epochs ~3s ~8s ~12s ✓ ✓ ✓ 16

  18. Outline Future work 17

  19. Future work More automation Scalability to larger protocols Verification of Implementations 18

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend