Programming And Proving With Distributed Protocols