Abstract
A lot of techniques try to improve the performance of explicit state model checking. Some techniques, like partial order reduction, are hard to apply effectively to high-level models, while others, like symmetry reduction, rarely apply to more complex real-life models. In this paper we present two techniques—state compression and operation caching—that are applicable to a wide range of models. These techniques were implemented in the ProB model checker and are available for B, Event-B, TLA+, Z and CSP\(\Vert \)B models. The combination of both techniques is surprisingly effective, reducing both memory consumption and runtimes on a set of benchmark programs. The techniques were inspired by the success of previous work integrating LTSMin and ProB. Earlier attempts of integrating the LTSMin techniques directly into ProB (to overcome limitations of the LTSMin integration) were not successful. Similarly, earlier attempts of making the LTSMin integration available to a wider range of models (e.g., combined CSP\(\Vert \)B models) were also not fruitful.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Similar content being viewed by others
Notes
- 1.
Collisions, however, do not lead to unsoundness, as full states need to be compared for a successful lookup.
- 2.
For example, for the drone model from [25] which we use later in the experiments, this feature was essential to detect an unbounded queue variable, and then put an upper bound on that queue for model checking.
- 3.
- 4.
This corresponds almost to B override operator, except that variables can have different types.
- 5.
This lemma could actually also serve as a semantic definition of \( reads ({Op})\) and \( writes ({Op})\).
- 6.
I.e., hash collisions reduce performance but do not affect correctness.
- 7.
The figures in Table 7 of [26] are wrong, however. Insertion sort is quadratic and the reported timings are almost constant.
- 8.
This version is also available as a separate artefact https://doi.org/10.5281/zenodo.6415347.
References
Abrial, J.-R.: The B-Book. Cambridge University Press, Cambridge (1996)
Abrial, J.-R.: Modeling in Event-B: System and Software Engineering. Cambridge University Press, Cambridge (2010)
Basile, D., et al.: Designing a demonstrator of formal methods for railways infrastructure managers. In: Margaria, T., Steffen, B. (eds.) ISoLA 2020. LNCS, vol. 12478, pp. 467–485. Springer, Cham (2020). https://doi.org/10.1007/978-3-030-61467-6_30
Bendisposto, J., et al.: Symbolic reachability analysis of B through ProB and LTSmin. In: Ábrahám, E., Huisman, M. (eds.) IFM 2016. LNCS, vol. 9681, pp. 275–291. Springer, Cham (2016). https://doi.org/10.1007/978-3-319-33693-0_18
Bendisposto, J., Leuschel, M.: Proof assisted model checking for B. In: Breitman, K., Cavalcanti, A. (eds.) ICFEM 2009. LNCS, vol. 5885, pp. 504–520. Springer, Heidelberg (2009). https://doi.org/10.1007/978-3-642-10373-5_26
Bernard, E., Legeard, B., Luck, X., Peureux, F.: Generation of test sequences from formal specifications: GSM 11–11 standard case study. Softw. Pract. Exp. 34(10), 915–948 (2004)
Blom, S., van de Pol, J., Weber, M.: LTSmin: distributed and symbolic reachability. In: Touili, T., Cook, B., Jackson, P. (eds.) CAV 2010. LNCS, vol. 6174, pp. 354–359. Springer, Heidelberg (2010). https://doi.org/10.1007/978-3-642-14295-6_31
Dobrikov, I., Leuschel, M.: Enabling analysis for Event-B. Sci. Comput. Program. 158, 81–99 (2018)
Frappier, M., Fraikin, B., Chossart, R., Chane-Yack-Fa, R., Ouenzar, M.: Comparison of model checking tools for information systems. In: Dong, J.S., Zhu, H. (eds.) ICFEM 2010. LNCS, vol. 6447, pp. 581–596. Springer, Heidelberg (2010). https://doi.org/10.1007/978-3-642-16901-4_38
Hansen, D., Leuschel, M.: Translating B to TLA\({}^{\text{+ }}\) for validation with TLC. Sci. Comput. Program. 131, 109–125 (2016)
Holzmann, G.J.: State compression in SPIN: recursive indexing and compression training runs. Technical report (1997)
Holzmann, G.J.: The model checker Spin. IEEE Trans. Softw. Eng. 23(5), 279–295 (1997)
Holzmann, G.J.: Explicit-state model checking. In: Handbook of Model Checking, pp. 153–171. Springer, Cham (2018). https://doi.org/10.1007/978-3-319-10575-8_5
Idani, A.: Meeduse: a tool to build and run proved DSLs. In: Dongol, B., Troubitsyna, E. (eds.) IFM 2020. LNCS, vol. 12546, pp. 349–367. Springer, Cham (2020). https://doi.org/10.1007/978-3-030-63461-2_19
James, P., Moller, F., Nguyen, H.N., Roggenbach, M., Schneider, S.A., Treharne, H.: On modelling and verifying railway interlockings: tracking train lengths. Sci. Comput. Program. 96, 315–336 (2014)
Kant, G., Laarman, A., Meijer, J., van de Pol, J., Blom, S., van Dijk, T.: LTSmin: high-performance language-independent model checking. In: Baier, C., Tinelli, C. (eds.) TACAS 2015. LNCS, vol. 9035, pp. 692–707. Springer, Heidelberg (2015). https://doi.org/10.1007/978-3-662-46681-0_61
Körner, P., Leuschel, M.: Towards practical partial order reduction for high-level formalisms (2022). (Submitted)
Körner, P., Leuschel, M., Meijer, J.: State-of-the-art model checking for B and event-B using ProB and LTSmin. In: Furia, C.A., Winter, K. (eds.) IFM 2018. LNCS, vol. 11023, pp. 275–295. Springer, Cham (2018). https://doi.org/10.1007/978-3-319-98938-9_16
Laarman, A., van de Pol, J., Weber, M.: Parallel recursive state compression for free. In: Groce, A., Musuvathi, M. (eds.) SPIN 2011. LNCS, vol. 6823, pp. 38–56. Springer, Heidelberg (2011). https://doi.org/10.1007/978-3-642-22306-8_4
Ladenberger, L., Leuschel, M.: Mastering the visualization of larger state spaces with projection diagrams. In: Butler, M., Conchon, S., Zaïdi, F. (eds.) ICFEM 2015. LNCS, vol. 9407, pp. 153–169. Springer, Cham (2015). https://doi.org/10.1007/978-3-319-25423-4_10
Leuschel, M.: The high road to formal validation. In: Börger, E., Butler, M., Bowen, J.P., Boca, P. (eds.) ABZ 2008. LNCS, vol. 5238, pp. 4–23. Springer, Heidelberg (2008). https://doi.org/10.1007/978-3-540-87603-8_2
Leuschel, M., Butler, M.J.: ProB: an automated analysis toolset for the B method. STTT 10(2), 185–203 (2008)
Leuschel, M., Massart, T.: Efficient approximate verification of B via symmetry markers. Ann. Math. Artif. Intell. 59(1), 81–106 (2010)
Leuschel, M., Mutz, M., Werth, M.: Modelling and validating an automotive system in classical B and Event-B. In: Raschke, A., Méry, D., Houdek, F. (eds.) ABZ 2020. LNCS, vol. 12071, pp. 335–350. Springer, Cham (2020). https://doi.org/10.1007/978-3-030-48077-6_27
Morris, K., Snook, C., Hoang, T.S., Hulette, G., Armstrong, R., Butler, M.: Formal verification of run-to-completion style statecharts using event-B. In: Muccini, H., Avgeriou, P., Buhnova, B., Camara, J., Caporuscio, M., Franzago, M., Koziolek, A., Scandurra, P., Trubiani, C., Weyns, D., Zdun, U. (eds.) ECSA 2020. CCIS, vol. 1269, pp. 311–325. Springer, Cham (2020). https://doi.org/10.1007/978-3-030-59155-7_24
Rivera, V., Cataño, N., Wahls, T., Rueda, C.: Code generation for event-B. STTT 19(1), 31–52 (2017)
Treharne, H., Schneider, S.: How to drive a B machine. In: Bowen, J.P., Dunne, S., Galloway, A., King, S. (eds.) ZB 2000. LNCS, vol. 1878, pp. 188–208. Springer, Heidelberg (2000). https://doi.org/10.1007/3-540-44525-0_12
Berg, F.I.: Recursive variable-length state compression for multi-core software model checking. In: Dutle, A., Moscato, M.M., Titolo, L., Muñoz, C.A., Perez, I. (eds.) NFM 2021. LNCS, vol. 12673, pp. 340–357. Springer, Cham (2021). https://doi.org/10.1007/978-3-030-76384-8_21
Yu, Y., Manolios, P., Lamport, L.: Model checking TLA+ specifications. In: Pierre, L., Kropf, T. (eds.) CHARME 1999. LNCS, vol. 1703, pp. 54–66. Springer, Heidelberg (1999). https://doi.org/10.1007/3-540-48153-2_6
Acknowledgements
Many thanks for Colin Snook for providing me with the UML-B drone example and to anonymous referees for their useful feedback. I am also grateful to Philipp Körner and Fabian Vu for insightful discussions.
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2022 Springer Nature Switzerland AG
About this paper
Cite this paper
Leuschel, M. (2022). Operation Caching and State Compression for Model Checking of High-Level Models. In: ter Beek, M.H., Monahan, R. (eds) Integrated Formal Methods. IFM 2022. Lecture Notes in Computer Science, vol 13274. Springer, Cham. https://doi.org/10.1007/978-3-031-07727-2_8
Download citation
DOI: https://doi.org/10.1007/978-3-031-07727-2_8
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-031-07726-5
Online ISBN: 978-3-031-07727-2
eBook Packages: Computer ScienceComputer Science (R0)