-
摘要:
随着软件安全性的重要性日益增长,使用模型驱动的方法进行软件开发越来越受到重视。针对目前存在跨域模型的集成障碍,提出了一种基于元建模技术提取多视角模型信息进行存储的方法,并详细阐述了针对AADL、SysML、Simulink三种建模语言设计的建模元素解析、集成描述文件生成的方法框架。实验结果表明:按照所提方法实现的模型仓库能够准确提取出不同视角模型间的集成相关信息,在能够正确存储、查询的条件下,实现的元素数量覆盖率均在90%以上。
Abstract:The software safety is important factor in our daily life, model-driven software development gains more and more attention. For the existing integration barriers of cross-domain models, we popose a method based on meta-modeling techniques, which is applied for extracting multi-perspective model information. In order to provide a solution for model checking in the design phase, we elaborate a methodological framework for model element parsing and integration description file generation for three modeling languages: AADL, SysML and Simulink. The experiment shows that the model warehouse implemented according to the proposed method can accurately extract the integration-related information between models from different perspectives, with over 90% coverage rate of element number under the condition that it can be properly stored and queried.
-
表 1 建模语言与元模型的映射
Table 1. Mapping between modeling language and metamodel
组件类型 AADL SysML Simulink Component system, process, thread, processor, bus, device block LinkPoint port port port CommunicationChannel connection, bus access flow itemflow InvocationChannel bus access 无 无 MessageChannel connection itemflow flow DispatchChannel partition的连接 无 无 Bus bus 无 无 Device device device device State State 无 State Transition Transition 无 Transition Partition Partition 无 Partition Task process, thread block 无 Event Event 无 state转移条件 RTOS system Block system Exception propagation raisedException faultType faultTask 无 faultTask 无 errorpath Propagation的flow 无 无 表 2 温控系统架构
Table 2. Architecture of temperature control system
系统功能 功能描述 相关元素 温度监测 将外界温度输入系统 Temperature Sensor 温度调节 热源,负责调控温度 heat source 输入操作 外界的指令输入 “operator interface,输入接口,显示接口,输入设置,显示,设置接口,feedback接口” 警报 “温度不在阈值内时发出警报提示操作者” “alarm, 输入,输出,发出警报,温度检测,数据处理,输入(数据处理),数据验证,数据格式化,数据无效故障” 温度控制 “通过外界的输入信息设置温度范围,并根据该温度范围及温度传感器的输入调整热量输出” “thermostat,设置接口,feedback接口,输入,输出,设置温度范围, feedback,处理器LSP, 温度调节,数据处理,输入(数据处理),数据验证,数据格式化,数据无效故障” 表 3 空气压缩系统架构
Table 3. Architecture of air compression system
系统功能 功能描述 相关元素 输出功能 将VMC的指令传送给相应设备 输出功能 飞行管理计算机VMC 接受acc反馈的上电和周期自检数据,决策并发送正常工作、故障清除(FaultHandingFunction_init)等指令给acc VMC, acc 输入功能 将VMC的指令(VMCInstructionInput_init)、温度传感器采集的温度(TemperatureSensorAcquire_init)、压力传感器采集的压力(PressureAcquire_init)、旋转变压器采集的角速度和角位置等信息(RevolveAcquire_init)进行接收 温度传感器,压力传感器,旋转变压器,地面维护设备,acc,电机,加热器,VMC 上电 主要执行芯片、处理器、传感器状态等信息的自检,周期BIT(PeriodicBIT_init)主要执行电流、温度等信息自检。其中上电BIT在上电时自检,周期BIT在正常工作、安全保护或失效保护时自检 机上电源, VMC 控制功能 将控制指令通过输出功能(OutputFunction_init)传输给对应的设备 “控制电机(ElectroMechanicalControl_init),电磁阀(SOVcontrol_init), 加热器(HeaterControl_init)” 监控功能 对电路电流、电机寿命、电磁阀开关次数等进行监控 电磁阀 模式管理 根据VMC的命令,进行模式切换(ModelConvert_init)(如上电模式、正常工作模式、安全保护模式、失效保护模式、下电模式、地面维护模式) VMC 初始化功能 对电路进行初始化和软件的全局变量进行初始化 初始化功能 存储模式 将电磁阀的开关次数、电机寿命、电磁阀寿命、电流等信息进行存储 存储 故障处理 根据不同类别的故障处理指令进行处理 故障处理 表 4 温控系统模型的元素数量
Table 4. Element amount of temperature control system model
元素 模型元素个数 架构模型 需求模型 设计模型 Component 22 21 6 Task 13 13 0 Device 2 3 0 RTOS 4 5 6 Bus 0 0 0 Partition 2 0 0 LinkPoint 41 26 11 Exception 3 8 2 CommunicationChannel 25 17 5 dataobject 5 7 11 Event 2 0 28 Propagation 9 0 0 State 8 0 29 Transition 2 0 33 表 5 模型仓库对温控系统的解析结果
Table 5. Traverse results of model warehouse for temperature control system
元素 模型元素个数 架构模型 需求模型 设计模型 Component 20 24 6 Task 13 13 0 Device 2 2 0 RTOS 4 9 6 Bus 0 0 0 Partition 1 0 0 LinkPoint 39 22 11 Exception 1 11 2 CommunicationChannel 22 13 5 dataobject 9 10 11 Event 2 0 28 Propagation 6 0 0 State 2 0 29 Transition 2 0 33 表 6 空气压缩系统模型的元素数量
Table 6. Element amount of air compression system model
元素 模型元素个数 架构模型 需求模型 设计模型 Component 37 41 6 Task 9 9 0 Device 14 0 0 RTOS 7 32 6 Bus 7 0 0 Partition 0 0 0 LinkPoint 62 40 17 Exception 0 5 0 CommunicationChannel 51 20 11 dataobject 0 8 0 Event 53 0 18 Propagation 25 0 0 State 46 0 15 Transition 14 0 18 表 7 模型仓库对空气压缩系统的解析结果
Table 7. Traverse results of model warehouse for air compression system
元素 模型元素个数 架构模型 需求模型 设计模型 Component 30 33 6 Task 9 29 0 Device 14 0 0 RTOS 7 4 6 Bus 7 0 0 Partition 0 0 0 LinkPoint 58 40 17 Exception 0 5 2 CommunicationChannel 50 20 11 dataobject 0 8 4 Event 12 0 18 Propagation 20 0 0 State 18 0 13 Transition 12 0 18 表 8 元素覆盖
Table 8. Element coverage
安全性相关元素 集成描述元模型 AADL SysML Simulink Component 是 是 是 是 LinkPoint 是 是 是 是 Task 是 是 是 否 Bus 是 是 是 否 Exception 是 是 是 否 Partition 是 是 是 是 CommunicationChannel 是 是 是 是 Device 是 是 是 否 Event 是 是 否 是 MessageChannel 是 是 否 否 InvocationChannel 是 是 是 是 DispatchChannel 是 是 否 否 Propagation 是 是 否 否 RTOS 是 是 是 是 State 是 是 是 Transition 是 是 否 是 behavior 是 是 否 否 flow 是 是 否 否 表 9 温控模型元素映射
Table 9. Element mapping of temperature control model
原模型类型 源元素名称 目标模型类型 目标元素名称 AADL isolette SysML isolette SysML isolette Simulink isolette AADL Alarm.impl SysML Alarm SysML Alarm Simulink Alarm AADL currentT SysML Alarm: curr_tem_in SysML Alarm: curr_tem_in Simulink Alarm: cur_temperature AADL datadeal4alarm.impl SysML Alarm: 数据处理 AADL temdect.impl SysML 温度检测 SysML 温度检测 Simulink Checking -
[1] MEREIM A, ABDEL-AZIZ M. A meta-model for model-based testing technique: A review[J]. Journal of Software Engineering, 2018, 12(1): 1-11. http://scialert.net/qredirect.php?doi=jse.2018.1.11&linkid=pdf [2] STAHL T, VÖLTER M, BETTIN J, et al. Model-driven software development-technology, engineering, management[M]. New York: John Wiley & Sons, 2006. [3] BELETE G F, VOINOV A, LANIAK G F. An overview of the model integration process: From pre-integration assessment to testing[J]. Environmental Modelling & Software, 2017, 87: 49-63. http://pdfs.semanticscholar.org/dfe5/a4ea0b9a4bf2987c834dd8fbca72701e84ec.pdf [4] FRANK M, BROODNEY H, ORION U, et al. From common strategies and approaches to virtual integration[J]. INCOSE International Symposium, 2016, 26(1): 1988-1999. doi: 10.1002/j.2334-5837.2016.00275.x [5] DONG Y W, WEI X M, XIAO M R. Overview: System architecture virtual integration based on an AADL model[C]//Symposium on Real-Time and Hybrid Systems. Berlin: Springer, 2018: 105-115. [6] FEILER P H. Architecture-led requirements and safety analysis of an aircraft survivability situational awareness system: CMU/SEI-2015-SR-032[R]. Pittsburgh: Carnegie Mellon University, 2015. [7] MISBHAUDDIN M, ALSHAYEB M. An integrated metamodel-based approach to software model refactoring[J]. Software and Systems Modeling, 2019, 18(3): 2013-2050. doi: 10.1007/s10270-017-0628-3 [8] MEIER J, WINTER A. Model consistency ensured by metamodel integration[C]//Models Workshops, 2018: 408-415. [9] PHILIP G, SURESH V P, D'SOUZA M. Safety validation using AADL system architecture models[C]//ISEC'18, 2018: 1-10. [10] BOUZIDI A, HADDAR N, HADDAR K. Traceability and synchronization between BPMN and UML use case models[J]. Ingénierie des Systèmesd'Information, 2019, 24: 215-228. doi: 10.18280/isi.240214 [11] MEIER J, WINTER A. Traceability enabled by metamodel integration[J]. Softwaretechnik-Trends, 2018, 38: 21-26. [12] BEHJATI R, YUE T, NEJATI S, et al. An AADL-based SysML profile for architecture level systems engineering: Approach, metamodels, and experiments: 2011-03[R]. Lysaker: Simula Research Laboratory, 2011. [13] HANSSON J, HELTON S, FEILER P H. ROI analysis of the system architecture virtual integration initiative: CMU/SEI-2018-TR-002[R]. Pittsburgh: Carnegie Mellon University, 2018. [14] SOKOLSKY O, PAJIC M, BEZZO N, et al. Architecture-centric software development for cyber-physical systems[C]//Proceedings of the First Workshop on CPSArch 2014, 2014: 1-6. [15] FEILER P H, WRAGE L, HANSSON J. System architecture virtual integration: A case study: CMU/SEI-2009-TR-017[R]. Pittsburgh: Carnegie Mellon University, 2010. [16] FORTINO G, GUERRIERI A, RUSSO W, et al. Towards a development methodology for smart object-oriented IoT systems: A metamodel approach[C]//2015 IEEE International Conference on Systems, Man and Cybernetics. Piscataway: IEEE Press, 2015: 1297-1302. [17] CAVALCANTI Y, MACHADO I, NETO P, et al. Towards metamodel support for variability and traceability in software product lines[C]//VaMoS'11, 2011: 49-57. [18] MUHAMMAD W A, MUHAMMAD R. Extended meta-model for service-oriented development of embedded real-time systems[C]//2017 First International Conference on Latest Trends in Electrical Engineering and Computing Technologies. Piscataway: IEEE Press, 2018: 1-7. [19] CICIRELLI F, FORTINO G, GUERRIERI A, et al. A meta-model framework for the design and analysis of smart cyber-physical environments[C]//2016 IEEE 20th International Conference on Computer Supported Cooperative Work in Design. Piscataway: IEEE Press, 2016: 687-692. [20] ARCELLI D, CORTELLESSA V, POMPEO D D. A metamodel for the specification and verification of model refactoring actions[C]//Proceedings of the 2nd International Workshop on Refactoring. New York: ACM, 2018: 14-21. [21] BARANYI P. About AADL[EB/OL]. (2020-05-12)[2020-09-01]. http://www.openaadl.org. [22] BARANYI P. What is the systems modeling language[EB/OL]. (2020-05-12)[2020-09-01]. http://www.openaadl.org.