Skip to main content

Template-Based Monte-Carlo Test Generation for Simulink Models

  • Conference paper
  • First Online:
Cyber Physical Systems. Design, Modeling, and Evaluation (CyPhy 2017)

Part of the book series: Lecture Notes in Computer Science ((LNISA,volume 11267))

Abstract

In this paper, we propose a Monte-Carlo test generation method that is able to conduct decision, condition and MC/DC coverage testing for practical Simulink models. To generate a test suite efficiently for models with dozens of thousands blocks, we introduce several techniques. Firstly, we propose using templates of input signals, which characterize shapes of entire waveforms of the signals with a few parameters. By using templates, we can easily generate candidate test cases and reduce a search space to plausible one. Secondly, we propose biased sampling framework to get efficiently test cases meeting uncovered objectives. In the framework, a biased distribution generating new candidate test cases is iteratively refined based on fitness values of the previous candidates. We performed two experiments for each of the techniques and confirmed that they are effective enough for Simulink models which cannot be dealt with a de-facto standard tool SLDV.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Notes

  1. 1.

    https://www.mathworks.com/products/matlab.html.

  2. 2.

    https://www.mathworks.com/products/simulink.html.

  3. 3.

    https://www.mathworks.com/products/sldesignverifier.html.

  4. 4.

    https://www.mathworks.com/products/simverification.html.

  5. 5.

    http://www.reactive-systems.com/.

  6. 6.

    true ane false mean activated and inactivated, respectively.

  7. 7.

    That is, the outcome is in \(\mathsf{DataPorts}(b)\) for a (multi-port) switch block b.

  8. 8.

    For simplicity, we omit trigger conditions in this paper.

  9. 9.

    Additionally, blocks in a subsystem with active-control ports are exercised only if the subsystem is activated. Therefore, we also need to correct a fitness for an objective related to the blocks.

  10. 10.

    For a Boolean argument, its range is treated as [0, 1], and a value greater (resp., less) than a half is interpreted as \(\mathtt{true}\) (resp., \(\mathtt{false}\)).

References

  1. Godefroid, P., Klarlund, N., Sen, K.: Dart: directed automated random testing. In: Proceedings of the 2005 ACM SIGPLAN Conference on Programming Language Design and Implementation, PLDI 2005, pp. 213–223. ACM, New York (2005)

    Google Scholar 

  2. Pacheco, C., Lahiri, S.K., Ernst, M.D., Ball, T.: Feedback-directed random test generation. In: Proceedings of the 29th International Conference on Software Engineering, ICSE 2007, pp. 75–84. IEEE Computer Society, Washington, DC (2007)

    Google Scholar 

  3. Chen, T.Y., Leung, H., Mak, I.K.: Adaptive random testing. In: Maher, M.J. (ed.) ASIAN 2004. LNCS, vol. 3321, pp. 320–329. Springer, Heidelberg (2004). https://doi.org/10.1007/978-3-540-30502-6_23

    Chapter  Google Scholar 

  4. Sims, S., DuVarney, D.C.: Experience report: the reactis validation tool. In: Proceedings of the 12th ACM SIGPLAN International Conference on Functional Programming, ICFP 2007, pp. 137–140. ACM, New York (2007)

    Google Scholar 

  5. Satpathy, M., Yeolekar, A., Ramesh, S.: Randomized directed testing (REDIRECT) for Simulink/Stateflow models. In: Proceedings of the 8th ACM International Conference on Embedded Software, EMSOFT 2008, pp. 217–226. ACM, New York (2008)

    Google Scholar 

  6. Matinnejad, R., Nejati, S., Briand, L.C., Bruckmann, T.: Automated test suite generation for time-continuous Simulink models. In: Proceedings of the 38th International Conference on Software Engineering, ICSE 2016, pp. 595–606. ACM, New York (2016)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Takashi Tomita .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2019 Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Tomita, T., Ishii, D., Murakami, T., Takeuchi, S., Aoki, T. (2019). Template-Based Monte-Carlo Test Generation for Simulink Models. In: Chamberlain, R., Taha, W., Törngren, M. (eds) Cyber Physical Systems. Design, Modeling, and Evaluation. CyPhy 2017. Lecture Notes in Computer Science(), vol 11267. Springer, Cham. https://doi.org/10.1007/978-3-030-17910-6_5

Download citation

  • DOI: https://doi.org/10.1007/978-3-030-17910-6_5

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-030-17909-0

  • Online ISBN: 978-3-030-17910-6

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics