Validating Specifications: A Contract-Based Approach