Skip to main content

A Hands-On Introduction to Spatial Model Checking Using VoxLogicA

– Invited Contribution

  • Conference paper
  • First Online:
Model Checking Software (SPIN 2021)

Abstract

This paper provides a tutorial-style introduction, and a guide, to the recent advancements in spatial model checking that have made some relevant results possible. Among these, we mention fully automated segmentation of regions of interest in medical images by short, unambiguous spatial-logical specifications. This tutorial is aimed both at domain experts in medical imaging who would like to learn simple (scripting-alike) techniques for image analysis, making use of a modern, declarative language, and at experts in Formal Methods in Computer Science and Model Checking who would like to grasp how the theory of Spatial Logic and Model Checking has been turned into logic-based, dataset-oriented imaging techniques.

Research partially supported by the MIUR PRIN 2017FTXR7S “IT-MaTTerS”.

This tutorial is meant to complement the invited talk in the 27th International SPIN Symposium on Model Checking of Software by Vincenzo Ciancia, therefore listed as the first author. All the authors equally contributed to developments of the presented research line and are primary authors of this paper.

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.

    See https://simpleitk.org/.

  2. 2.

    Indeed, it is not the intention of the research line around VoxLogicA to compete against machine-learning based approaches. Rather, we expect that the two can be complementary: VoxLogicA specifications can certainly be used to coordinate various machine-learning based steps in order to obtain procedures that have a degree of machine-learning based operation, but are still modifiable and explainable.

  3. 3.

    We use VoxLogicA version 1.0. It can be downloaded from https://github.com/vincenzoml/VoxLogicA. The example images and files of this paper are available at the same web site.

  4. 4.

    A VoxLogicA expression may return either an image – which can be Boolean-valued, number-valued, or have multiple number-valued channels – or a single value, which can be either a number or a Boolean value. No distinction is made between integer and floating point numbers; all numbers are treated as floating point internally.

  5. 5.

    In this respect, we consider our work still as the beginning of a research line, and we cannot predict if, for instance, novel logical operators will enable the development of very general specifications that operate on inhomogeneous domains.

  6. 6.

    Fluid-attenuated Inversion Recovery. See e.g. Wikipedia contributors, “Fluid-attenuated inversion recovery,” Wikipedia, The Free Encyclopedia, https://en.wikipedia.org/w/index.php?title=Fluid-attenuated_inversion_recovery.

  7. 7.

    This is a variant of the \(\rho \) operator used in [8], the difference being that with \(\rho \), the extremes of the path do not need to satisfy a.

  8. 8.

    The reader should now pause, and understand (even by experimenting) why actually, two reachability properties are needed.

  9. 9.

    In order to avoid issues related to overflow and low precision of 8-bit integers altogether, VoxLogicA can save images in the nifti format. Such format can use floating point values in pixels (and can also represent multi-dimensional images, for instance 3D MRI or CAT medical images). See https://nifti.nimh.nih.gov/.

  10. 10.

    We do not normalise the result to the maximum representable value 255, but just to 200, to make the lighter areas grey, which is more prominent on white paper.

References

  1. Aiello, M., Pratt-Hartmann, I., Benthem, van, J.: Handbook of Spatial Logics. Springer (2007). https://doi.org/10.1007/978-1-4020-5587-4

  2. Audrito, G., Casadei, R., Damiani, F., Stolz, V., Viroli, M.: Adaptive distributed monitors of spatial properties for cyber–physical systems. J. Syst. Softw. 175, 110908 (2021). https://doi.org/10.1016/j.jss.2021.110908

  3. Banci Buonamici, F., Belmonte, G., Ciancia, V., Latella, D., Massink, M.: Spatial logics and model checking for medical imaging. Int. J. Softw. Tools Technol. Transfer 22(2), 195–217 (2019). https://doi.org/10.1007/s10009-019-00511-9

    Article  Google Scholar 

  4. Bartocci, E., Bortolussi, L., Loreti, M., Nenzi, L.: Monitoring mobile and spatially distributed cyber-physical systems. In: 15th ACM-IEEE International Conference on Formal Methods and Models for System Design, MEMOCODE, pp. 146–155. ACM (2017). https://doi.org/10.1145/3127041.3127050

  5. Belmonte, G., Broccia, G., Bussi, L., Ciancia, V., Latella, D., Massink, M.: Querying medical imaging datasets using spatial logics (position paper). In: HEDA2021: The International Health Data Workshop 2021 in conjunction with 10th International Conference on Model and Data Engineering (MEDI 2021). Communications in Computer and Information Science. Springer (2021, to Appear)

    Google Scholar 

  6. Belmonte, G., Broccia, G., Vincenzo, C., Latella, D., Massink, M.: Feasibility of spatial model checking for nevus segmentation. In: Proceedings of the 9th International Conference on Formal Methods in Software Engineering (FormalieSE’21), pp. 1–12. IEEE (2021). https://doi.org/10.1109/FormaliSE52586.2021.00007

  7. Belmonte, G., Ciancia, V., Latella, D., Massink, M.: Innovating medical image analysis via spatial logics. In: ter Beek, M.H., Fantechi, A., Semini, L. (eds.) From Software Engineering to Formal Methods and Tools, and Back. LNCS, vol. 11865, pp. 85–109. Springer, Cham (2019). https://doi.org/10.1007/978-3-030-30985-5_7

    Chapter  Google Scholar 

  8. Belmonte, G., Ciancia, V., Latella, D., Massink, M.: VoxLogicA: a spatial model checker for declarative image analysis. In: Vojnar, T., Zhang, L. (eds.) TACAS 2019. LNCS, vol. 11427, pp. 281–298. Springer, Cham (2019). https://doi.org/10.1007/978-3-030-17462-0_16

    Chapter  Google Scholar 

  9. van Benthem, J., Bezhanishvili, G.: Modal logics of space. In: Handbook of Spatial Logics [1], pp. 217–298. https://doi.org/10.1007/978-1-4020-5587-4_5

  10. Bezhanishvili, N., Ciancia, V., Gabelaia, D., Grilletti, G., Latella, D., Massink, M.: Geometric model checking of continuous space (2021). https://arxiv.org/abs/2105.06194

  11. Broccia, G., Milazzo, P., Ölveczky, P.C.: Formal modeling and analysis of safety-critical human multitasking. Innov. Syst. Softw. Eng. 15(3-4), 169–190 (2019). https://doi.org/10.1007/s11334-019-00333-7

  12. Bussi, L., Ciancia, V., Gadducci, F.: A spatial model checker in GPU (extended version). CoRR abs/2010.07284 (2020). https://arxiv.org/abs/2010.07284

  13. Bussi, L., Ciancia, V., Gadducci, F.: Towards a spatial model checker on GPU. In: Peters, K., Willemse, T.A.C. (eds.) Formal Techniques for Distributed Objects, Components, and Systems FORTE 2021. LNCS, vol. 12719, pp. 188–196. Springer, Cham (2021). https://doi.org/10.1007/978-3-030-78089-0_12

  14. Castelnovo, D., Miculan, M.: Closure hyperdoctrines, with paths. CoRR abs/2007.04213 (2020). https://arxiv.org/abs/2007.04213

  15. Ciancia, V., Grilletti, G., Latella, D., Loreti, M., Massink, M.: An experimental spatio-temporal model checker. In: Bianculli, D., Calinescu, R., Rumpe, B. (eds.) SEFM 2015. LNCS, vol. 9509, pp. 297–311. Springer, Heidelberg (2015). https://doi.org/10.1007/978-3-662-49224-6_24

    Chapter  Google Scholar 

  16. Ciancia, V., Latella, D., Loreti, M., Massink, M.: Specifying and verifying properties of space. In: Diaz, J., Lanese, I., Sangiorgi, D. (eds.) TCS 2014. LNCS, vol. 8705, pp. 222–235. Springer, Heidelberg (2014). https://doi.org/10.1007/978-3-662-44602-7_18

    Chapter  Google Scholar 

  17. Ciancia, V., Latella, D., Loreti, M., Massink, M.: Model checking spatial logics for closure spaces. Logical Methods Comput. Sci. 12(4) (2016). https://doi.org/10.2168/LMCS-12(4:2)2016

  18. Ciancia, V., Latella, D., Massink, M., Paškauskas, R., Vandin, A.: A tool-chain for statistical spatio-temporal model checking of bike sharing systems. In: Margaria, T., Steffen, B. (eds.) ISoLA 2016. LNCS, vol. 9952, pp. 657–673. Springer, Cham (2016). https://doi.org/10.1007/978-3-319-47166-2_46

    Chapter  Google Scholar 

  19. Ciancia, V., Gilmore, S., Grilletti, G., Latella, D., Loreti, M., Massink, M.: Spatio-temporal model checking of vehicular movement in public transport systems. Int. J. Softw. Tools Technol. Transfer 20(3), 289–311 (2018). https://doi.org/10.1007/s10009-018-0483-8

    Article  Google Scholar 

  20. Ciancia, V., Latella, D., Massink, M.: Embedding RCC8D in the collective spatial logic CSLCS. In: Boreale, M., Corradini, F., Loreti, M., Pugliese, R. (eds.) Models, Languages, and Tools for Concurrent and Distributed Programming. LNCS, vol. 11665, pp. 260–277. Springer, Cham (2019). https://doi.org/10.1007/978-3-030-21485-2_15

    Chapter  Google Scholar 

  21. Ciancia, V., Latella, D., Massink, M., de Vink, E.: Towards spatial bisimilarity for closure models: Logical and coalgebraic characterisations. CoRR abs/2005.05578 (2020). https://arxiv.org/abs/2005.05578

  22. Ciancia, V., Latella, D., Massink, M., de Vink, E.: On bisimilarities for closure spaces - preliminary version (2021). https://arxiv.org/abs/2105.06690

  23. Ciancia, V., Latella, D., Massink, M., Paškauskas, R.: Exploring spatio-temporal properties of bike-sharing systems. In: 2015 IEEE International Conference on Self-Adaptive and Self-Organizing Systems Workshops, SASO Workshops, pp. 74–79. IEEE Computer Society (2015). https://doi.org/10.1109/SASOW.2015.17

  24. Grilletti, G.: Spatio-temporal model checking: explicit and abstraction-based methods. Master’s thesis, University of Pisa (2016). https://etd.adm.unipi.it/t/etd-06282016-191103/

  25. Grosu, R., Smolka, S., Corradini, F., Wasilewska, A., Entcheva, E., Bartocci, E.: Learning and detecting emergent behavior in networks of cardiac myocytes. Commun. ACM 52(3), 97–105 (2009). https://doi.org/http://doi.acm.org/10.1145/1467247.1467271

  26. Haghighi, I., Jones, A., Kong, Z., Bartocci, E., Grosu, R., Belta, C.: Spatel: A novel spatial-temporal logic and its applications to networked systems. In: Proceedings of the 18th International Conference on Hybrid Systems: Computation and Control, HSCC ’15, pp. 189–198. ACM (2015). https://doi.org/10.1145/2728606.2728633

  27. Linker, S., Papacchini, F., Sevegnani, M.: Analysing spatial properties on neighbourhood spaces. In: 45th International Symposium on Mathematical Foundations of Computer Science, MFCS, LIPIcs, vol. 170, pp. 66:1–66:14. Schloss Dagstuhl - Leibniz-Zentrum für Informatik (2020). https://doi.org/10.4230/LIPIcs.MFCS.2020.66

  28. Loreti, M., Quadrini, M.: A spatial logic for a simplicial complex model (2021). https://arxiv.org/abs/2105.08708

  29. Luca De Angelis, F., Di Marzo Serugendo, G.: A logic language for run time assessment of spatial properties in self-organizing systems. In: 2015 IEEE International Conference on Self-Adaptive and Self-Organizing Systems Workshops, pp. 86–91 (2015). https://doi.org/10.1109/SASOW.2015.19

  30. Menze, B.H., et al.: The multimodal brain tumor image segmentation benchmark (brats). IEEE Trans. Med. Imag. 34(10), 1993–2024 (2015). https://doi.org/10.1109/TMI.2014.2377694

  31. Ciancia, V., Gilmore, S., Grilletti, G., Latella, D., Loreti, M., Massink, M.: Spatio-temporal model checking of vehicular movement in public transport systems. STTT 20(3), 289–311 (2018). https://doi.org/10.1007/s10009-018-0483-8

  32. Nenzi, L., Bortolussi, L.: Specifying and monitoring properties of stochastic spatio-temporal systems in signal temporal logic. In: Haviv, M., Knottenbelt, W.J., Maggi, L., Miorandi, D. (eds.) 8th International Conference on Performance Evaluation Methodologies and Tools, VALUETOOLS. ICST (2014). https://doi.org/10.4108/icst.valuetools.2014.258183

  33. Nenzi, L., Bortolussi, L., Ciancia, V., Loreti, M., Massink, M.: Qualitative and quantitative monitoring of spatio-temporal properties. In: Bartocci, E., Majumdar, R. (eds.) RV 2015. LNCS, vol. 9333, pp. 21–37. Springer, Cham (2015). https://doi.org/10.1007/978-3-319-23820-3_2

    Chapter  Google Scholar 

  34. Ruscheinski, A., Wolpers, A., Henning, P., Warnke, T., Haack, F., Uhrmacher, A.M.: Pragmatic logic-based spatio-temporal pattern checking in particle-based models. In: Winter Simulation Conference, WSC 2020, pp. 2245–2256. IEEE (2020). https://doi.org/10.1109/WSC48552.2020.9383908

  35. Tsigkanos, C., Kehrer, T., Ghezzi, C.: Modeling and verification of evolving cyber-physical spaces. In: Proceedings of the 11th Joint Meeting on Foundations of Software Engineering, ESEC/FSE 2017, pp. 38–48. ACM (2017). https://doi.org/10.1145/3106237.3106299

Download references

Acknowledgements

The authors wish to explicitly thank the current collaborators Nick Bezhanisvili, Giovanna Broccia, Laura Bussi, David Gabelaia, Fabio Gadducci, Gianluca Grilletti, Erik de Vink, and the coordinator of the Formal Methods and Tools laboratory of ISTI-CNR Maurice ter Beek, for their continuative support in turning the early developments of Spatial Model Checking, and the more recent work on VoxLogicA, into a solid research line, with several promising ongoing developments. The authors gratefully thank the Program Committee members of the 27th International SPIN Symposium on Model Checking of Software (PC chairs Alfons Laarman and Ana Sokolova) for giving us the opportunity to disseminate our results to such an amazing audience.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Vincenzo Ciancia .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2021 Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Ciancia, V., Belmonte, G., Latella, D., Massink, M. (2021). A Hands-On Introduction to Spatial Model Checking Using VoxLogicA. In: Laarman, A., Sokolova, A. (eds) Model Checking Software. SPIN 2021. Lecture Notes in Computer Science(), vol 12864. Springer, Cham. https://doi.org/10.1007/978-3-030-84629-9_2

Download citation

  • DOI: https://doi.org/10.1007/978-3-030-84629-9_2

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-030-84628-2

  • Online ISBN: 978-3-030-84629-9

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics