A Logic-based approach to verify distributed protocols