A Platform-Based Design Methodology With Contracts and Related Tools for the Design of Cyber-Physical Systems