DOI QR코드

DOI QR Code

Test Case Generation for Simulink/Stateflow Model Based on a Modified Rapidly Exploring Random Tree Algorithm

변형된 RRT 알고리즘 기반 Simulink/Stateflow 모델 테스트 케이스 생성

  • Received : 2016.06.27
  • Accepted : 2016.08.24
  • Published : 2016.12.31

Abstract

This paper describes a test case generation algorithm for Simulink/Stateflow models based on the Rapidly exploring Random Tree (RRT) algorithm that has been successfully applied to path finding. An important factor influencing the performance of the RRT algorithm is the metric used for calculating the distance between the nodes in the RRT space. Since a test case for a Simulink/Stateflow (SL/SF) model is an input sequence to check a specific condition (called a test target in this paper) at a specific status of the model, it is necessary to drive the model to the status before checking the condition. A status maps to a node of the RRT. It is usually necessary to check various conditions at a specific status. For example, when the specific status represents an SL/SF model state from which multiple transitions are made, we must check multiple conditions to measure the transition coverage. We propose a unique distance calculation metric, based on the observation that the test targets are gathered around some specific status such as an SL/SF state, named key nodes in this paper. The proposed metric increases the probability that an RRT is extended from key nodes by imposing penalties to non-key nodes. A test case generation algorithm utilizing the proposed metric is proposed. Three models of Electrical Control Units (ECUs) embedded in a commercial vehicle are used for the performance evaluation. The performances are evaluated in terms of penalties and compared with those of the algorithm using a typical RRT algorithm.

본 논문에서는 경로탐색 분야에서 많이 사용되는 RRT 알고리즘을 기반으로 한 테스트 케이스 생성 알고리즘을 제안한다. RRT 알고리즘 성능에 영향을 주는 가장 중요한 요소는 RRT 공간 내 노드 사이의 거리를 계산하는 거리 함수이다. Simulink/Stateflow (SL/SF) 모델의 테스트 케이스는 모델의 특정 상태에서 특정한 조건(본 논문에서 테스트 타겟이라 명명함)을 검사하기 위해 필요한 입력 시퀀스이기 때문에, 특정 조건을 검사하기 위해서는 먼저 모델을 특정 상태로 이끌어가는 것이 필요하다. 여기서 모델의 상태는 RRT의 노드로 표현된다. 일반적으로 어느 한 상태의 경우 다수의 조건을 검사할 필요가 있다. 예를 들어, 모델의 특정 상태가 다수의 전이가 발생 가능한 SL/SF model의 한 상태로 표현될 때, 전이 커버리지를 측정하기 위해서는 반드시 다수의 조건을 모두 검사해야 한다. 본 논문에서는 테스트 타겟들이 키 노드라 불리는 SL/SF 상태로 표현되는 특정 상태에서 다수 발견되는 점에 착안해서 만든 거리 계산 함수를 제안한다. 제안된 거리 함수는 키 노드가 아닌 노드에 페널티를 부과해서 RRT가 키 노드로부터 확장될 확률을 증가시킨다. 본 논문에서는 제안된 거리 함수를 이용한 테스트 케이스 생성 알고리즘을 제안한다. 성능 평가를 위해 상업용 자동차에 들어가는 3가지 전자제어장치 모델이 사용된다. 제안된 테스트 케이스 생성 알고리즘의 성능은 페널티 측면에서 평가되고 기존의 RRT 알고리즘을 사용한 테스트 케이스 생성 알고리즘의 성능과 비교한다.

Keywords

References

  1. MATLAB Simulink Stateflow, The MathWorks, Inc. [Internet], http://www.mathworks.com/products/stateflow/ 1994-2013.
  2. R. Alur, "Model checking of hierarchical state machines," in Proceedings of the 6th ACM SIGSOFT FSE, Vol.23, Iss.6, pp.175-188, 1998.
  3. T. A. Henzinger, P. W. Kopke, A. Puri, and P. Varaiya, "What's Decidable About Hybrid Automata?" Journal of Computer and System Sciences, Vol.57, Iss.1. pp.94-124, 1998. https://doi.org/10.1006/jcss.1998.1581
  4. T. Brihaye, "A note on the undecidability of the reach-ability problem for o-minimal dynamical systems," in Mathematical Logic Quarterly, Vol.52, Iss.2 pp.165-170, 2006. https://doi.org/10.1002/malq.200510024
  5. S. M. LaValle, "Rapidly-Exploring Random Trees: A New Tool for Path Planning," TR 98-11 Computer Science Dept., Iowa State Univ. , 1998.
  6. J. M. Esposito, J. Kim, and V. Kumar, "A Probabilistic Approach to Automated Test Case Generation for Hybrid Systems," in Hybrid Systems: Computation and Control, 2004.
  7. M. Satpathy, A. Yeolekar, and S. Ramesh, "Randomized Directed Testing (REDIRECT) for Simulink/Stateflow Models," in Proceedings of the 8th ACM International Conference on Embedded Software, pp.217-226, 2008.
  8. The Yices SMT Solver [Internet], http://www.csl.sri.com.
  9. C. S. Pasareanu, "Model Based Analysis and Test Gen-eration for Flight Software," in SMC-IT 2009, Third IEEE International Conference, pp.83-90, 2009.
  10. C. S. Pasareanu, P. C. Mehlitz, D. H. Bushnell, K. G. Burlet, M. Lowry, S. Person, and M. Pape, "Combining unit level symbolic execution and system level concrete execution for testing," in Proc. ISSTA'08 (to appear), NASA Softwrae, 2008.
  11. H. S. Hong, I. S. Lee, O. Sokolsky, and S. D. Cha, "Automatic Test Generation From Statecharts Using Model Checking," in Technical Report, Department of Computer & Information Science University of Pennsylvania, MS-CIS-01-07, 2001
  12. K. L. McMillan, "Symbolic Model Checking - an Ap-proach to the State Explosion Problem," Kluwer Academic Publishers, 1993.
  13. E. M. Clarke, E. A. Emerson, and A. P. Sistla, "Automatic Verification of Finite-State Concurrent Systems Using Temporal Logic Specifications," ACM Transitions on Programming Languages and Systems, Vol.8, No.2, pp.244-263, 1986. https://doi.org/10.1145/5397.5399
  14. S. Kansomkeat and W. Rivepiboon, "Automated-Generating Test Case Using UML Statechart Diagrams," Proceedings of the 2003 Annual Research Conference of the South African Institute of Computer Scientists and Information Technologists on Enablement Through Technology, pp.296-300, 2003.
  15. P. Samuel, R. Mall, and A. K. Bothra, "Automatic test case generation using unified model language (UML) state diagrams," IET Software, Vol.2, Iss.2, pp.79-93, 2008. https://doi.org/10.1049/iet-sen:20060061
  16. C. Dougsa-ard, K. Dahal, A. Hossain, and T. Suwannasart, "GA-based Automatic Test Data Generation for UML State Diagrams with Parallel Paths," Advanced design and manufacture to gain a competitive edge, pp.147-156, 2008.
  17. S. K. Swain, D. P. Mohapatra, and R. Mall, "Test case Generation Based on State and Activity Models," Journal of Object Technology, Vol.9, Iss.5, pp.1-27, 2010. https://doi.org/10.5381/jot.2010.9.5.a1
  18. P. Roy and N. Shankar, "SimCheck: a contract type system for Simulink," Journal of Innovations in Systems and Software Engineering, Vol.7, Iss.2, pp.73-83, 2011. https://doi.org/10.1007/s11334-011-0145-4
  19. Reactis, Reactive Systems, Inc. [Internet], http://www.reactive-systems.com/products.msp.
  20. T-VEC tester, T-VEC Technologies, Inc. [Internet], http://www.t-vec.com/solutions/products.php.
  21. Design Verifier, Mathworks, Inc. [Internet], http://www.mathworks.com/products/sldesignverifier/.
  22. SAV Solving In General [Internet], http://www.satisfiability.org/.
  23. T. A. Henzinger, "The Theory of Hybrid Automata," in Proceedings of Logic in Computer Science, Eleventh Annual IEEE Symposium, pp.278-292, 1996.
  24. A. Agrawal, G. Simun, and G. Karsai, "Semantic Translation of Simulink/Stateflow models to Hybrid Automata using Graph Transformations," in Proceedings of the Workshop on Graph Transformation and Visual Modelling Techniques, Vol.109, pp.43-56, 2004.
  25. J. M. Esposito, "Randomized Test Case Generation for Hybrid Systems: metric selection," in System Theory, Proceedings of the Thirty-Sixth Southeastern Symposium, pp.236-240, 2004.
  26. T. Dang and T. Nahhal, "Coverage-guided test generation for continuous and hybrid systems," Formal Methods in System Design, Vol.34, No.2, pp.183-213, 2009. https://doi.org/10.1007/s10703-009-0066-0
  27. S. N. Ahmadyan, J. A. Kumar, and S. Vasudevan, "Goaloriented stimulus generation for analog circuits," Design Automation Conference, pp.1018-1023, 2012.
  28. M. S. Branicky, M. M. Curtiss, and J. A. Levine, "RRTs for nonlinear, discrete, and hybrid planning and control," Proceedings 42nd IEEE conference Decision and Control, Vol.1, pp.657-663, 2003.
  29. J. C. Gower "A general coefficient of similarity and some of its properties," Biometrics, Vol.27, pp.857-871, 1971. https://doi.org/10.2307/2528823