Cyber-Physical Systems Formal Methods and Language-based Security Hardware Security Design