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.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
References
Ahmad, F., Qaisar, Z.H.: Scenario based functional regression testing using petri net models. In: ICMLA (2), pp. 572–577. IEEE (2013)
Anand, S., et al.: An orchestrated survey of methodologies for automated software test case generation. J. Syst. Softw. 86(8), 1978–2001 (2013)
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
Baluda, M., Denaro, G., Pezzè, M.: Bidirectional symbolic analysis for effective branch testing. IEEE Trans. Software Eng. 42(5), 403–426 (2016)
Bardin, S., et al.: Sound and quasi-complete detection of infeasible test requirements. In: ICST, pp. 1–10. IEEE Computer Society (2015)
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)
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)
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)
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)
Beyer, D., Chlipala, A., Henzinger, T.A., Jhala, R., Majumdar, R.: Generating tests from counterexamples. In: ICSE, pp. 326–335. IEEE Computer Society (2004)
Chariyathitipong, P., Vatanawood, W.: Dynamic slicing of time petri net based on MTL property. IEEE Access 10, 45207–45218 (2022)
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)
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
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)
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)
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
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
Fernandez, J., Bozga, M., Ghirvu, L.: State space reduction based on live variables analysis. Sci. Comput. Program. 47(2–3), 203–220 (2003)
Fraser, G., Wotawa, F., Ammann, P.: Testing with model checkers: a survey. Softw. Test. Verification Reliab. 19(3), 215–261 (2009)
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
Huang, J.C.: Error detection through program testing. Current Trends in Program. Methodol. II, 16–43 (1977)
Akers, S.B., Jr.: Binary decision diagrams. IEEE Trans. Comput. 27(6), 509–516 (1978)
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
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
Klai, K., Petrucci, L.: Modular construction of the symbolic observation graph. In: ACSD, pp. 88–97. IEEE (2008)
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
Kosmatov, N.: All-paths testgeneration for programs with internal aliases. In: ISSRE, pp. 147–156. IEEE Computer Society (2008)
Li, N., Li, F., Offutt, J.: Better algorithms to minimize the cost of test paths. In: ICST, pp. 280–289. IEEE Computer Society (2012)
Li, Y., Zhang, X., Zhang, Y., Guo, J., Rao, C.: A test cases generation method for atp. In: RSVT, pp. 21–26. ACM (2021)
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)
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)
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)
Mateescu, R., Wijs, A.: Sequential and distributed on-the-fly computation of weak tau-confluence. Sci. Comput. Program. 77(10–11), 1075–1094 (2012)
Meng, Y., Gay, G.: Understanding the impact of solver choice in model-based test generation. In: ESEM, pp. 22:1–22:11. ACM (2020)
Micskei, Z.: Model-based testing (MBT). http://mit.bme.hu/~micskeiz/pages/modelbased_testing.html#tools
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
Murata, T.: Petri nets: Properties, analysis and applications. Proc. IEEE 77(4), 541–580 (1989)
Nosrati, M., Haghighi, H., Vahidi-Asl, M.: Test data generation using genetic programming. Inf. Softw. Technol. 130, 106446 (2021)
Offutt, A.J., Pan, J.: Automatically detecting equivalent mutants and infeasible paths. Softw. Test. Verification Reliab. 7(3), 165–192 (1997)
Offutt, J., Thummala, S.: Testing concurrent user behavior of synchronous web applications with petri nets. Softw. Syst. Model. 18(2), 913–936 (2019)
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
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)
Shafique, M., Labiche, Y.: A systematic review of state-based test tools. Int. J. Softw. Tools Technol. Transf. 17(1), 59–76 (2015)
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)
Utting, M., Legeard, B., Bouquet, F., Fourneret, E., Peureux, F., Vernotte, A.: Recent Advances in Model-Based Testing, vol. 101 (2016)
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)
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)
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
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)
Zhang, J., Zhang, D., Huang, K.: A regular expression matching algorithm using transition merging. In: PRDC, pp. 242–246. IEEE Computer Society (2009)
Zhu, H., He, X.: A methodology of testing high-level petri nets. Inf. Softw. Technol. 44(8), 473–489 (2002)
Author information
Authors and Affiliations
Corresponding author
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
Copyright information
© 2023 The Author(s), under exclusive license to Springer Nature Switzerland AG
About this paper
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)