A Calculus for Protocol Specification and Validation