Page 268 - 《软件学报》2021年第6期
P. 268
1842 Journal of Software 软件学报 Vol.32, No.6, June 2021
Fig.8 FSMActor CarLightNormal defining the operation of the car light controller in normal mode
图 8 CarLightNormal 车辆交通灯控制器
Fig.9 FSMActor PedestrianLightNormal defining the operation of the pedestrian light controller in normal mode
图 9 PedestrianLightNormal 行人交通灯控制器
如图 10,TrafficLight error 是 TrafficLight 中 error 状态的一个细化模型,表示系统在异常情况下,交通灯控制
器的详细模型.当 TrafficLight 处于 error 状态时,表示系统出现异常,其细化模型在 YellowOn 状态和 YellowOff
状态之间,以 1 个时间单元为周期来回跳转,输出接口 Cyel 交替输出 1,0,导致参数 Cyel 的值不断更新为 1,0,产
生黄灯闪烁的效果.
Fig.10 Refinement of error mode in TrafficLight
图 10 TrafficLight error 细化模型
5.3 核心时间自动机
图 11 是由有限状态机 CarLightNormal 转换而来并进行优化的时间自动机,输出接口 Cred,Cyel 和 Cgrn 连
接的组件与模型的整体逻辑无关,所以这些输出接口不再产生同步信号.输入接口 Sec 直接与上层 Sec 相连,共