Modeling Method for Testing Railway Signal System Software
-
摘要:
针对铁路信号系统软件测试模型不能系统地描述测试需求的问题,提出风险时间状态机建模方法. 首先,分析铁路信号系统软件测试建模的特点,并提出建模需求;然后,以有限状态机理论为研究基础,在有限状态机的变迁和状态中分别扩展出时钟和风险等级元素,提出风险时间状态机建模方法,满足功能逻辑、时间约束和风险等级3个方面的建模需求,采用Z规格说明语言给出风险时间状态机的形式化定义和格局转移机制;最后,以计算机联锁系统中的道岔转换功能为例,建立风险时间状态机测试模型,并与时间自动机建模方法进行了对比,结果表明,建模方法上,所建立风险时间状态机比时间自动机节省62%的变迁数,描述能力更强,能够满足铁路信号系统软件测试的建模需求.
Abstract:As the testing model of railway signal system software fails to describe the test requirements systematically, a risk timed statechart (RTSC) modeling method is proposed. First, the characteristics of testing railway signal system software are analyzed, and its modeling requirements are proposed. Then, based on the finite state machine (FSM) theory, the clock and risk level elements are extended respectively in the transition and state of the FSM, and the RTSC modeling method is proposed to meet the modeling requirements of the functional logic, clock constraint and risk level. The formal definition and configuration mechanism of the RTSC are expressed by Z notation. Finally, the switching function of computer-based interlocking system is used as an example to build the RTSC testing model and the proposed method is compared with the timed automata modeling method. The results show that in contrast to the timed automata modeling method, the RTSC saves 62% of transition numbers and has stronger description ability, which can meet the modeling requirements of the railway signal system software testing.
-
Key words:
- railway signal system software /
- modeling method /
- clock constraint /
- risk level /
- risk timed statechart /
- Z notation
-
表 1 道岔子系统信号含义
Table 1. Meaning of signals in switch subsystem
信号 含义 信号 含义 信号 含义 e1 定位请求 e4 定位需求 e7 道岔定位 e2 道岔转换 e5 道岔锁闭 e8 转换成功 e3 转换超时 e6 反位请求 e9 选排一致 表 2 DRTSC与DTA 对比
Table 2. Comparison between DRTSC and DTA
模型 构件/个 状态/个 变迁/条 信号/个 DRTSC 1 11 19 11 DTA 4 24 49 18 表 3 RTSC与测试需求的关系
Table 3. Relationship between RTSC and test requirements
特性 功能性 实时性 风险 状态迁移 √ × × 层次性 √ × × 并发性 √ × × 时间约束 × √ × 风险等级 × × √ 注:“√”表示RTSC特性满足建模需求;“×”则相反. -
[1] 上官伟,胡福威,袁敏,等. 基于弹复力效应的列控车载设备可靠性分析方法[J]. 铁道学报,2018,40(6): 75-82. doi: 10.3969/j.issn.1001-8360.2018.06.010SHANGGUAN Wei, HU Fuwei, YUAN Min, et al. Reliability analysis method for on-board equipment of train control system based on resilience effect[J]. Journal of the China Railway Society, 2018, 40(6): 75-82. doi: 10.3969/j.issn.1001-8360.2018.06.010 [2] 梁茨,郑伟,李开成,等. 基于路径优化算法的测试序列自动生成及验证[J]. 铁道学报,2013,35(6): 53-58. doi: 10.3969/j.issn.1001-8360.2013.06.009LIANG Ci, ZHENG Wei, LI Kaicheng, et al. Automated generation of test cases and sequences based on path optimization algorithm[J]. Journal of the China Railway Society, 2013, 35(6): 53-58. doi: 10.3969/j.issn.1001-8360.2013.06.009 [3] 赵晓宇,杨志杰,吕旌阳. 基于有色Petri网的车载设备模式转换测试序列生成方法[J]. 中国铁道科学,2017,38(4): 115-123. doi: 10.3969/j.issn.1001-4632.2017.04.16ZHAO Xiaoyu, YANG Zhijie, LU Jingyang. Test sequence generation method of mode transition for on-board equipment based on colored petri net[J]. China Railway Science, 2017, 38(4): 115-123. doi: 10.3969/j.issn.1001-4632.2017.04.16 [4] 袁磊,吕继东,刘雨,等. 一种全覆盖的列控车载系统测试用例自动生成算法研究[J]. 铁道学报,2014,36(8): 55-62. doi: 10.3969/j.issn.1001-8360.2014.08.010YUAN Lei, LYU Jidong, LIU Yu, et al. Research on model-based test case generation method of onboard subsystem in CTCS-3[J]. Journal of the China Railway Society, 2014, 36(8): 55-62. doi: 10.3969/j.issn.1001-8360.2014.08.010 [5] 魏柏全,吕继东,陈柯行,等. 基于TAIO变异的CTCS-3列控系统测试案例生成方法[J]. 西南交通大学学报,2020,55(5): 937-945, 962. doi: 10.3969/j.issn.0258-2724.20180078WEI Baiquan, LYU Jidong, CHEN Kexing, et al. Mutation timed automata with input and output-based method of generating test suites for Chinese train control system level 3[J]. Journal of Southwest Jiaotong University, 2020, 55(5): 937-945, 962. doi: 10.3969/j.issn.0258-2724.20180078 [6] 曹雅鑫. 基于UML状态图的列控中心轨道电路编码功能测试用例生成方法研究[D]. 成都: 西南交通大学, 2017. [7] 黄平霞. 基于UML的地铁联锁软件测试用例生成方法的研究[D]. 兰州: 兰州交通大学, 2016. [8] 徐中伟. 安全软件测试理论与技术的研究及其在铁路信号安全软件测评中的实现[D]. 上海: 同济大学, 2000. [9] 王硕,郭进,张亚东. 面向列控系统安全软件黑盒测试的危险分析方法[J]. 铁道科学与工程学报,2019,16(3): 590-595.WANG Shuo, GUO Jin, ZHANG Yadong. Hazard analysis method for security software black-box testing of train control system[J]. Journal of Railway Science and Engineering, 2019, 16(3): 590-595. [10] 李耀,陈荣武,郭进,等. 基于TSSM的城市轨道交通CBTC区域控制器建模与验证[J]. 西南交通大学学报,2015,50(1): 27-35. doi: 10.3969/j.issn.0258-2724.2015.01.005LI Yao, CHEN Rongwu, GUO Jin, et al. Modeling and verification of TSSM-based CBTC zone controller for urban rail transit[J]. Journal of Southwest Jiaotong University, 2015, 50(1): 27-35. doi: 10.3969/j.issn.0258-2724.2015.01.005 [11] 李耀,郭进,杨扬,等. 铁路信号安全关键软件形式化建模[J]. 铁道学报,2017,39(9): 74-80. doi: 10.3969/j.issn.1001-8360.2017.09.011LI Yao, GUO Jin, YANG Yang, et al. Formal modeling of railway signal safety critical software[J]. Journal of the China Railway Society, 2017, 39(9): 74-80. doi: 10.3969/j.issn.1001-8360.2017.09.011 [12] HSIUNG P A, LIN Y H. Modeling and verification of safety-critical systems using safecharts[C]//Formal Techniques for Networked and Distributed Systems - FORTE 2005. Berlin: Springer Berlin Heidelberg, 2005: 290-304. [13] AMMANN P, OFFUTT J. Introduction to Software Testing[M]. Cambridge: Cambridge University Press, 2017: 3-24. [14] 张曙光. CTCS-3级列控系统总体技术方案[M]. 北京: 中国铁道出版社, 2008. [15] 铁道部科学技术司, 铁道部运输局. CTCS-3级列控系统测试案例(V3.0): 科技运[2009] 59号[S]. 北京: [出版者不详], 2009. [16] 饶畅,李楠,张亚东,等. 铁路信号安全关键软件的组合测试序列集约简[J]. 西南交通大学学报,2020,55(3): 596-603. doi: 10.3969/j.issn.0258-2724.20190157RAO Chang, LI Nan, ZHANG Yadong, et al. Combinatorial test sequence set reduction approach for railway signaling safety-critical software[J]. Journal of Southwest Jiaotong University, 2020, 55(3): 596-603. doi: 10.3969/j.issn.0258-2724.20190157 [17] 吴彪. 基于EFSM的测试用例自动生成方法的研究[D]. 杭州: 浙江理工大学, 2016. [18] 石佳. 基于CBTC的联锁系统进路控制形式化建模与验证[D]. 成都: 西南交通大学, 2016.