Skip to main content

Symbolic Observation Graph-Based Generation of Test Paths

  • Conference paper
  • First Online:
Tests and Proofs (TAP 2023)

Abstract

The paper introduces a theoretical foundation for generating abstract test paths related to Petri net specifications. Based on the structure of the Petri net model of the system, we first define the notion of unobservable transition. Unless such a transition is unreachable, we prove that its firing is necessarily ensured by the firing of another transition (namely observable transition) of the Petri net. We show that the set of observable transitions is the smallest set that guarantees the coverage of all the transitions of the Petri net model, i.e., any set of firing sequences of the model, namely observable traces, involving all the observable transitions passes eventually through the unobservable transitions as well. If some unobservable transitions are mandatory to trigger the execution of a test sub-sequence, observable traces are completed with such transitions to enhance the controllability of the test scenario. In addition to structurally identifying observable (and unobservable) transitions, we mainly propose two algorithms: the first allows to generate a set of observable paths ensuring full coverage of all the system transitions. It is based on an on-the-fly construction of a hybrid graph called the symbolic observation graph. The second algorithm completes the observable paths in order to explicitly cover the whole set of system’s transitions. The approach is implemented within an available prototype, and the preliminary experiments are promising.

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://github.com/dianxiangxu/MISTA.

  2. 2.

    https://github.com/juhan/NModel.

  3. 3.

    https://cosyverif.lipn.univ-paris13.fr/.

  4. 4.

    https://mcc.lip6.fr.

References

  1. Ahmad, F., Qaisar, Z.H.: Scenario based functional regression testing using petri net models. In: ICMLA (2), pp. 572–577. IEEE (2013)

    Google Scholar 

  2. Anand, S., et al.: An orchestrated survey of methodologies for automated software test case generation. J. Syst. Softw. 86(8), 1978–2001 (2013)

    Article  Google Scholar 

  3. Arias, J., Bennani, M.T., Desel, J., Klai, K., Ochi, H.: sogMBT: Symbolic observation graph-based generator of test paths (2023). https://depot.lipn.univ-paris13.fr/PMC-SOG/sogMBT

  4. Baluda, M., Denaro, G., Pezzè, M.: Bidirectional symbolic analysis for effective branch testing. IEEE Trans. Software Eng. 42(5), 403–426 (2016)

    Article  Google Scholar 

  5. Bardin, S., et al.: Sound and quasi-complete detection of infeasible test requirements. In: ICST, pp. 1–10. IEEE Computer Society (2015)

    Google Scholar 

  6. Bardin, S., Kosmatov, N., Marcozzi, M., Delahaye, M.: Specify and measure, cover and reveal: A unified framework for automated test generation. Sci. Comput. Program. 207, 102641 (2021)

    Article  Google Scholar 

  7. Beckman, N.E., Nori, A.V., Rajamani, S.K., Simmons, R.J., Tetali, S., Thakur, A.V.: Proofs from tests. IEEE Trans. Software Eng. 36(4), 495–508 (2010)

    Article  Google Scholar 

  8. Bernardino, M., Rodrigues, E.M., Zorzo, A.F., Marchezan, L.: Systematic mapping study on MBT: tools and models. IET Softw. 11(4), 141–155 (2017)

    Article  Google Scholar 

  9. Bertolino, A., Marré, M.: Automatic generation of path covers based on the control flow analysis of computer programs. IEEE Trans. Software Eng. 20(12), 885–899 (1994)

    Article  Google Scholar 

  10. Beyer, D., Chlipala, A., Henzinger, T.A., Jhala, R., Majumdar, R.: Generating tests from counterexamples. In: ICSE, pp. 326–335. IEEE Computer Society (2004)

    Google Scholar 

  11. Chariyathitipong, P., Vatanawood, W.: Dynamic slicing of time petri net based on MTL property. IEEE Access 10, 45207–45218 (2022)

    Article  Google Scholar 

  12. Chusho, T.: Test data selection and quality estimation based on the concept of esssential branches for path testing. IEEE Trans. Software Eng. 13(5), 509–517 (1987)

    Article  Google Scholar 

  13. Darvas, D., Fernández Adiego, B., Vörös, A., Bartha, T., Blanco Viñuela, E., González Suárez, V.M.: Formal verification of complex properties on PLC programs. In: Ábrahám, E., Palamidessi, C. (eds.) FORTE 2014. LNCS, vol. 8461, pp. 284–299. Springer, Heidelberg (2014). https://doi.org/10.1007/978-3-662-43613-4_18

    Chapter  Google Scholar 

  14. Desel, J., Oberweis, A., Zimmer, T., Zimmermann, G.: Validation of information system models: Petri nets and test case generation. In: ICSMC, vol. 4, pp. 3401–3406. IEEE (1997)

    Google Scholar 

  15. Ding, J., Argote-Garcia, G., Clarke, P.J., He, X.: Evaluating test adequacy coverage of high level petri nets using spin. In: AST, pp. 71–78. ACM (2008)

    Google Scholar 

  16. Ding, Z., Jiang, M., Chen, H., Jin, Z., Zhou, M.: Petri net based test case generation for evolved specification. SCIENCE CHINA Inf. Sci. 59(8), 1–25 (2016). https://doi.org/10.1007/s11432-016-5598-5

    Article  Google Scholar 

  17. Emerson, E.A., Wahl, T.: Dynamic symmetry reduction. In: Halbwachs, N., Zuck, L.D. (eds.) TACAS 2005. LNCS, vol. 3440, pp. 382–396. Springer, Heidelberg (2005). https://doi.org/10.1007/978-3-540-31980-1_25

    Chapter  Google Scholar 

  18. Fernandez, J., Bozga, M., Ghirvu, L.: State space reduction based on live variables analysis. Sci. Comput. Program. 47(2–3), 203–220 (2003)

    Article  Google Scholar 

  19. Fraser, G., Wotawa, F., Ammann, P.: Testing with model checkers: a survey. Softw. Test. Verification Reliab. 19(3), 215–261 (2009)

    Article  Google Scholar 

  20. Haddad, S., Ilié, J.-M., Klai, K.: Design and evaluation of a symbolic and abstraction-based model checker. In: Wang, F. (ed.) ATVA 2004. LNCS, vol. 3299, pp. 196–210. Springer, Heidelberg (2004). https://doi.org/10.1007/978-3-540-30476-0_19

    Chapter  Google Scholar 

  21. Huang, J.C.: Error detection through program testing. Current Trends in Program. Methodol. II, 16–43 (1977)

    Google Scholar 

  22. Akers, S.B., Jr.: Binary decision diagrams. IEEE Trans. Comput. 27(6), 509–516 (1978)

    Article  Google Scholar 

  23. Klai, K., Abid, C.A., Arias, J., Evangelista, S.: Hybrid parallel model checking of hybrid LTL on hybrid state space representation. In: Nouri, A., Wu, W., Barkaoui, K., Li, Z.W. (eds.) VECoS 2021. LNCS, vol. 13187, pp. 27–42. Springer, Cham (2022). https://doi.org/10.1007/978-3-030-98850-0_3

    Chapter  Google Scholar 

  24. Klai, K., Bennani, M.T., Arias, J., Desel, J., Ochi, H.: sogMBT benchmarks (2023). https://depot.lipn.univ-paris13.fr/PMC-SOG/experiments/test-paths

  25. Klai, K., Petrucci, L.: Modular construction of the symbolic observation graph. In: ACSD, pp. 88–97. IEEE (2008)

    Google Scholar 

  26. Klai, K., Poitrenaud, D.: MC-SOG: An LTL model checker based on symbolic observation graphs. In: van Hee, K.M., Valk, R. (eds.) PETRI NETS 2008. LNCS, vol. 5062, pp. 288–306. Springer, Heidelberg (2008). https://doi.org/10.1007/978-3-540-68746-7_20

    Chapter  Google Scholar 

  27. Kosmatov, N.: All-paths testgeneration for programs with internal aliases. In: ISSRE, pp. 147–156. IEEE Computer Society (2008)

    Google Scholar 

  28. Li, N., Li, F., Offutt, J.: Better algorithms to minimize the cost of test paths. In: ICST, pp. 280–289. IEEE Computer Society (2012)

    Google Scholar 

  29. Li, Y., Zhang, X., Zhang, Y., Guo, J., Rao, C.: A test cases generation method for atp. In: RSVT, pp. 21–26. ACM (2021)

    Google Scholar 

  30. Liu, Z., Liu, T., Cai, L., Yang, G.: Test coverage for collaborative workflow application based on petri net. In: CSCWD, pp. 213–218. IEEE (2010)

    Google Scholar 

  31. Marcozzi, M., Bardin, S., Kosmatov, N., Papadakis, M., Prevosto, V., Correnson, L.: Time to clean your test objectives. In: ICSE, pp. 456–467. ACM (2018)

    Google Scholar 

  32. Martin-Lopez, A., Arcuri, A., Segura, S., Ruiz-Cortés, A.: Black-box and white-box test case generation for restful apis: Enemies or allies? In: ISSRE, pp. 231–241. IEEE (2021)

    Google Scholar 

  33. Mateescu, R., Wijs, A.: Sequential and distributed on-the-fly computation of weak tau-confluence. Sci. Comput. Program. 77(10–11), 1075–1094 (2012)

    Article  Google Scholar 

  34. Meng, Y., Gay, G.: Understanding the impact of solver choice in model-based test generation. In: ESEM, pp. 22:1–22:11. ACM (2020)

    Google Scholar 

  35. Micskei, Z.: Model-based testing (MBT). http://mit.bme.hu/~micskeiz/pages/modelbased_testing.html#tools

  36. Miller, T., Padgham, L., Thangarajah, J.: Test coverage criteria for agent interaction testing. In: Weyns, D., Gleizes, M.-P. (eds.) AOSE 2010. LNCS, vol. 6788, pp. 91–105. Springer, Heidelberg (2011). https://doi.org/10.1007/978-3-642-22636-6_6

    Chapter  Google Scholar 

  37. Murata, T.: Petri nets: Properties, analysis and applications. Proc. IEEE 77(4), 541–580 (1989)

    Article  Google Scholar 

  38. Nosrati, M., Haghighi, H., Vahidi-Asl, M.: Test data generation using genetic programming. Inf. Softw. Technol. 130, 106446 (2021)

    Article  Google Scholar 

  39. Offutt, A.J., Pan, J.: Automatically detecting equivalent mutants and infeasible paths. Softw. Test. Verification Reliab. 7(3), 165–192 (1997)

    Article  Google Scholar 

  40. Offutt, J., Thummala, S.: Testing concurrent user behavior of synchronous web applications with petri nets. Softw. Syst. Model. 18(2), 913–936 (2019)

    Article  Google Scholar 

  41. Pelánek, R.: Fighting state space explosion: review and evaluation. In: Cofer, D., Fantechi, A. (eds.) FMICS 2008. LNCS, vol. 5596, pp. 37–52. Springer, Heidelberg (2009). https://doi.org/10.1007/978-3-642-03240-0_7

    Chapter  Google Scholar 

  42. van der Sanden, B., Geilen, M., Reniers, M.A., Basten, T.: Partial-order reduction for supervisory controller synthesis. IEEE Trans. Autom. Control 67(2), 870–885 (2022)

    Article  Google Scholar 

  43. Shafique, M., Labiche, Y.: A systematic review of state-based test tools. Int. J. Softw. Tools Technol. Transf. 17(1), 59–76 (2015)

    Article  Google Scholar 

  44. Teodorov, C., Leroux, L., Drey, Z., Dhaussy, P.: Past-free[ze] reachability analysis: reaching further with dag-directed exhaustive state-space analysis. Softw. Test. Verification Reliab. 26(7), 516–542 (2016)

    Article  Google Scholar 

  45. Utting, M., Legeard, B., Bouquet, F., Fourneret, E., Peureux, F., Vernotte, A.: Recent Advances in Model-Based Testing, vol. 101 (2016)

    Google Scholar 

  46. Villalobos-Arias, L., Quesada-López, C., Martínez, A., Jenkins, M.: Model-based testing areas, tools and challenges: A tertiary study. CLEI Electron. J. 22(1) (2019)

    Google Scholar 

  47. Wang, C.C., Pai, W., Chiang, D.J.: Using a petri net model approach to object-oriented class testing. In: ICSMC, vol. 1, pp. 824–828. IEEE (1999)

    Google Scholar 

  48. Xu, D.: A tool for automated test code generation from high-level petri nets. In: Kristensen, L.M., Petrucci, L. (eds.) PETRI NETS 2011. LNCS, vol. 6709, pp. 308–317. Springer, Heidelberg (2011). https://doi.org/10.1007/978-3-642-21834-7_17

    Chapter  Google Scholar 

  49. Xu, D., Tu, M., Sanford, M., Thomas, L., Woodraska, D., Xu, W.: Automated security test generation with formal threat models. IEEE Trans. Dependable Secur. Comput. 9(4), 526–540 (2012)

    Article  Google Scholar 

  50. Zhang, J., Zhang, D., Huang, K.: A regular expression matching algorithm using transition merging. In: PRDC, pp. 242–246. IEEE Computer Society (2009)

    Google Scholar 

  51. Zhu, H., He, X.: A methodology of testing high-level petri nets. Inf. Softw. Technol. 44(8), 473–489 (2002)

    Article  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Jaime Arias .

Editor information

Editors and Affiliations

Appendices

A Proof of Lemma 1

Proof

Let t be an unobservable transition, p be a place in \(t^{\sim }\) and \(t'\in {p}^\bullet \). Assume that there exists a firing sequence \(\sigma .t'\). Given that place p is not marked initially and that no transition, except t, can produce a token in p, t must be fired before \(t'\) to produce the necessary token in p.

B Proof of Lemma 2

Proof

Let \((\mathcal {N},m_0)\) be a marked Petri net, \(t_0 \in UnObs \) be an unobservable transition, \(p\in t_0^\sim \) be an output place of \(t_0\) having \(t_0\) as unique input transition, and \(t_1\in {p}^\bullet \) be an output transition of p. Then, by Lemma 1, \(t_1\triangleright t_0\). If \(t_1\) is observable, then the lemma is proved. Else, by an iterative application of this reasoning, by the transitivity of the coverage relation \(\triangleright \) and by the fact that the number of transitions in a Petri net is finite, we end on two possible cases: (1) there exists a transition \(t_n \in Obs \) s.t. \(t_n \triangleright t_{n-1} \triangleright \dots \triangleright t_0\), or (2) \(t_0\) belongs to an unobservable cycle, which proves the Lemma.

C Proof of Lemma 3

Proof

Let t be a transition of the cycle, and \(p\in \,\!^\bullet {t}\) be the input place of t that belongs to the cycle. p is initially empty because the (unique) transition \(t'\in \,\!^\bullet {p}\) belongs to the cycle and hence is unobservable. Thus, place p will never be marked because \(t'\) is dead by a successive application of Corollary 1 from t.

D Proof of Theorem 2

Proof

Assume that \( Obs ' \subset Obs \) is the smallest subset of transitions satisfying Theorem 1. Let \(t \in Obs \setminus Obs '\), there exists then a transition \(t' \in Obs '\) s.t. \(t'\triangleright t\), i.e., \(\forall \) firing sequence \(t_1 \dots t_n.t'\) (for \(n \ge 1\)), \(\exists i\in \{1,\dots ,n\}\) s.t., \(t=t_i\). Let \(p\in {t}^\bullet \cap \,\!^\bullet {t^\prime }\). Then, by Definition 7, p is necessarily not marked, otherwise the sequence \(t_{i+1}\dots t_n.t'\) is a firing sequence that does not contain t. Also, there exists a transition \(t_i'\ne t\) in \(\,\!^\bullet {p}\), otherwise t is unobservable. If \(t_i'\) is observable, then there exists a firing sequence \(\beta .t_i'\) which makes the sequence \(\beta .t_i'.t_{i+1} \dots t_n.t'\) a firing sequence not involving t, and that is not possible. If \(t_i'\) is unobservable, then, by using Lemma 2, there exists a transition \(t_i'' \in Obs \) s.t. \(t_i'' \triangleright t_i'\). By hypothesis, there exists a sequence \(\alpha .t_i'.\gamma .t_i''\). Thus, the sequence \(\alpha .t_i'.t_{i+1}\dots t_n.t'\) covers \(t'\) but not t, which is impossible. To conclude, such a transition t could not exist and \( Obs '\) is necessarily equal to \( Obs \).

Rights and permissions

Reprints and permissions

Copyright information

© 2023 The Author(s), under exclusive license to Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Klai, K., Bennani, M.T., Arias, J., Desel, J., Ochi, H. (2023). Symbolic Observation Graph-Based Generation of Test Paths. In: Prevosto, V., Seceleanu, C. (eds) Tests and Proofs. TAP 2023. Lecture Notes in Computer Science, vol 14066. Springer, Cham. https://doi.org/10.1007/978-3-031-38828-6_8

Download citation

  • DOI: https://doi.org/10.1007/978-3-031-38828-6_8

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-031-38827-9

  • Online ISBN: 978-3-031-38828-6

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics