The Simulink/Stateflow is a model used for modeling and simulation for dynamic system. However, Simulink/Stateflow is not suitable for the automatic generation of test cases. This paper adopts the hierarchical interface automata to depict the test model and presents the transformation method from Simulink/Stateflow to hierarchical interface automata. The Simulink sub-model and Stateflow sub-model will be transformed to hierarchical interface automata respectively and then combined together. In the transformation method presented in this paper, the hierarchical structure of Simulink/Stateflow model has been analyzed, and the generated hierarchical interface automata will be consistent with the original Simulink/Stateflow model in structure.
Keywords-Simulink/Stateflow; Model Transformation; Hierarchical Interface Automata; Model Driven Testing
I INTRODUCTIONFor modeling and verification for the rationality and correctness of embedded software design, OMG presented the Model Driven Architecture (MDA) and the Model Driven Testing (MDT) [1,2], and test model is used to abstractly describe the expected behavior of the system in MDT. However, with the increasing scale and complexity of embedded system, the difficulty of manually generating test model exaggerates, and automatic generation of test model has become an urgent problem in MDT.Simulink/Stateflow is a model used for modeling and simulation for dynamic system and has become widely used in the modeling and simulation of linear system, non-linear system, digital control and digital signal processing after tens of years of improving [3,4,5]. Simulink/Stateflow constructs the dynamic, hierarchical and event-driven hybrid system model by using graphs and diagrams. It can depict both the event-driven concrete system behavior and the time-dependent continuous system behavior, and provide convenience for the system design. However, Simulink/Stateflow is not suitable for the automatic generation of test cases.The Simulink/Stateflow model should be transformed to a test model for the automatic generation of test cases in MDT. A common method is to transform the Simulink/Stateflow model to automata model. Aditya Agrawal presents the method of transforming Simulink/Stateflow to Hybrid automata [6], but this method uses graph transformation as the underlying procedure for transforming and composing models, which cannot fully capture the attributes of the Simulink/Stateflow model. Alur R. presents the method of transforming Simulink/Stateflow to Hybrid automata for the purpose of improving simulation coverage [7], but this method can only be applied in the Simulink/Stateflow model with no blocks which will cause simulation branches. The tool-kit Hylink developed by UIUC is also devoted to transform Simulink/Stateflow to Input/Output automata [8], but the tool-kit destroys the hierarchical structure of Stateflow model during the transformation.The transformation method mentioned above focuses on transforming Simulink/Stateflow model to automata. However, these transformation ...