Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Showcase Overview

The showcase is a curated set of 8 examples that together cover all commonly-used language features, represent diverse domains, and range from trivial to strenuous.

SpecDomainLinesKey features
PetersonMutual exclusion70Dict, Bool, parameterized actions, program counter
Dining PhilosophersConcurrency43Modular arithmetic, multi-key dict update
Two-Phase CommitTransactions96all/any quantifiers, implies
G-CounterCRDTs78Nested dicts, let, func, conditional comprehension
MESICache coherence146Full dict comprehension with if/then/else
PaxosConsensus95powerset, set comprehensions, nested quantifiers
RedlockDistributed locking153Set, union, intentional invariant violation
RaftConsensus (complex)386Seq, Set[Seq[Int]], message passing, slicing

Quick verification results

SpecCommandStates
Petersonspecl check peterson.specl --no-deadlock17
Dining Philosophersspecl check dining-philosophers.specl --no-deadlock~100
Two-Phase Commitspecl check two-phase-commit.specl -c N=2 --no-deadlock134
G-Counterspecl check g-counter.specl -c N=2 -c Max=3 --no-deadlock54K
MESIspecl check mesi.specl -c C=2 -c V=1 --no-deadlock34
Paxosspecl check paxos.specl -c N=2 -c MaxBallot=3 -c V=2 --no-deadlock316K
Redlockspecl check redlock.specl -c N=2 -c M=1 -c TTL=3 -c MaxTime=8violation in 15 steps
Raftspecl check raft.specl -c N=1 -c MaxVal=0 -c MaxElections=2 --no-deadlock956

Strenuous checks

SpecParamsStatesTime
RaftN=2, MaxVal=1, MaxElections=2, MaxLogLen=3166M~4 min
PaxosN=3, MaxBallot=3, V=23.35M~9s
Paxos (symbolic)N=10, MaxBallot=10, V=3k-induction~90s

All showcase specs are in specl/examples/showcase/.