Specification and Verification of Distributed Protocols

by Manos Kapritsos and Jon Howell

This course teaches a foundation of concepts that build up to the ability to model a distributed, asynchronous protocol and prove it safe. By the end of the course, participants will

Chapter 01: Dafny Basics

This chapter introduces the mathematical subset of Dafny needed to work the exercises in the rest of the course.

Lectures

Exercises

Associated Libraries

Chapter 02: Specification

Specification is how we write down what a protocol does. A verification result is only as good as its specification.

Lectures

Exercises

Chapter 03: State Machines

This chapter describes state machine models, a general tool we'll use to describe protocols and the environment they work in.

Lectures

Exercises

Chapter 04: Invariants

Invariants are the central tool used to prove safety properties of protocols.

Lectures

Exercises

Chapter 05: Distributed State Machines

Here we assemble state machines in an idiomatic way to represent a protocol and the environment the protocol operates in.

Lectures

Exercises

Associated Libraries

Project 01: Distributed Lock Server

This midterm project demonstrates mastery of the concepts in chapters 1—5.

Lectures

Exercises

Associated Libraries

Chapter 06: Refinement

Refinement helps us write a specification that abstracts away the implementation details of the protocol.

Lectures

Exercises

Associated Libraries

Chapter 07: Asynchronous Clients

Most specifications want to capture the idea of linearizability: that clients care about when their interactions happen in real time. This chapter develops a general technique for encoding this constraint into a specification.

Lectures

Exercises

Associated Libraries

Chapter 08: Application Correspondence

A refinement proof is meaningless if the verification engineer can hide real behavior behind a meaningless refinement abstraction function. This chapter develops a general technique for establishing a specification that prevents such flaws.

Lectures

Exercises

Associated Libraries

Project 02: Sharded Key-Value Store

This final project demonstrates mastery of the concepts in chapters 1—6.

Lectures

Exercises

Associated Libraries

Auxiliary Material:

Lectures