Engineering Smart Cyber Physical Systems