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