Algorithmic Verification of Invalidation-Based Protocols