Protocols by Invariants, Cambridge International Series on Parallel Computation