A rigorous tool-supported methodology for assuring the security and safety of cyber-physical systems