Contract-Based Simulation and Verification of Cyber-Physical Systems