LOGICAL FOUNDATIONS OF CYBER-PHYSICAL SYSTEMS