State-Based Techniques For Designing, Verifying And Debugging Message Passing Systems