Modelling behaviour of cyber-physical system and verifying its safety based on algebra of event. (2018)