Abstract
We present MoonLight, a tool for monitoring temporal and spatio-temporal properties of mobile, spatially distributed, and interacting entities such as biological and cyber-physical systems. In MoonLight the space is represented as a weighted graph describing the topological configuration in which the single entities are arranged. Both nodes and edges have attributes modeling physical quantities and logical states of the system evolving in time. MoonLight is implemented in Java and supports the monitoring of Spatio-Temporal Reach and Escape Logic (STREL). MoonLight can be used as a standalone command line tool, such as Java API, or via Matlab™ and Python interfaces. We provide here the description of the tool, its interfaces, and its scripting language using a sensor network and a bike sharing example. We evaluate the tool performances both by comparing it with other tools specialized in monitoring only temporal properties and by monitoring spatio-temporal requirements considering different sizes of dynamical and spatial graphs.
Article PDF
Similar content being viewed by others
Avoid common mistakes on your manuscript.
References
Abbas, H., Fainekos, G.E., Sankaranarayanan, S., et al.: Probabilistic temporal logic falsification of cyber-physical systems. ACM Trans. Embed. Comput. Syst. 12(s2), 95:1–95:30 (2013). https://doi.org/10.1145/2465787.2465797
Akyildiz, I.F., Su, W., Sankarasubramaniam, Y., et al.: A survey on sensor networks. IEEE Commun. Mag. 40(8), 102–114 (2002). https://doi.org/10.1109/MCOM.2002.1024422
Annpureddy, Y., Liu, C., Fainekos, G.E., et al.: S-TaLiRo: a tool for temporal logic falsification for hybrid systems. In: Proc. of TACAS 2011: The 17th International Conference on Tools and Algorithms for the Construction and Analysis of Systems, pp. 254–257 (2011). https://doi.org/10.1007/978-3-642-19835-9_21
Asarin, E., Caspi, P., Maler, O.: Timed regular expressions. J. ACM 49(2), 172–206 (2002). https://doi.org/10.1145/506147.506151
Bartocci, E., et al.: Teaching cardiac electrophysiology modeling to undergraduate students: laboratory exercises and GPU programming for the study of arrhythmias and spiral wave dynamics. Adv. Physiol. Educ. 35(4), 427–437 (2011). https://doi.org/10.1152/advan.00034.2011
Bartocci, E., Bortolussi, L., Milios, D., et al.: Studying emergent behaviours in morphogenesis using signal spatio-temporal logic. In: Proc. of HSB 2015. LNCS, vol. 9271, pp. 156–172. Springer, Berlin (2015). https://doi.org/10.1007/978-3-319-26916-0_9
Bartocci, E., Bortolussi, L., Nenzi, L., et al.: System design of stochastic models using robustness of temporal properties. Theor. Comput. Sci. 587, 3–25 (2015). https://doi.org/10.1016/j.tcs.2015.02.046
Bartocci, E., Bortolussi, L., Loreti, M., et al.: Monitoring mobile and spatially distributed cyber-physical systems. In: Proc. of MEMOCODE 2017: The 15th ACM-IEEE International Conference on Formal Methods and Models for System Design, pp. 146–155. ACM, New York (2017). https://doi.org/10.1145/3127041.3127050
Bartocci, E., Bloem, R., Nickovic, D., et al.: A counting semantics for monitoring LTL specifications over finite traces. In: Proc. of CAV 2018: The 30th International Conference on Computer Aided Verification. LNCS, vol. 10981, pp. 547–564. Springer, Berlin (2018). https://doi.org/10.1007/978-3-319-96145-3
Bartocci, E., Deshmukh, J., Donzé, A., et al.: Specification-based monitoring of cyber-physical systems: a survey on theory, tools and applications. In: Lectures on Runtime Verification. LNCS, vol. 10457, pp. 135–175. Springer, Berlin (2018). https://doi.org/10.1007/978-3-319-75632-5_5
Bartocci, E., Falcone, Y., Francalanza, A., et al.: Introduction to runtime verification. In: Lectures on Runtime Verification – Introductory and Advanced Topics. LNCS, vol. 10457, pp. 1–33. Springer, Berlin (2018). https://doi.org/10.1007/978-3-319-75632-5
Bartocci, E., Ferrère, T., Manjunath, N., et al.: Localizing faults in simulink/stateflow models with STL. In: Prandini, M., Deshmukh, J.V. (eds.) Proc. of HSCC 2018 the 21st International Conference on Hybrid Systems: Computation and Control, pp. 197–206. ACM, New York (2018). https://doi.org/10.1145/3178126.3178131
Bartocci, E., Gol, E.A., Haghighi, I., et al.: A formal methods approach to pattern recognition and synthesis in reaction diffusion networks. IEEE Trans. Control Netw. Syst. 5(1), 308–320 (2018). https://doi.org/10.1109/TCNS.2016.2609138
Bartocci, E., Manjunath, N., Mariani, L., et al.: Automatic failure explanation in CPS models. In: Ölveczky, P.C., Salaün, G. (eds.) Proc. of SEFM 2019: The 17th International Conference on Software Engineering and Formal Methods. LNCS, vol. 11724, pp. 69–86. Springer, Berlin (2019). https://doi.org/10.1007/978-3-030-30446-1_4
Bartocci, E., Bortolussi, L., Loreti, M., et al.: Moonlight: a lightweight tool for monitoring spatio-temporal properties. In: Deshmukh, J., Nickovic, D. (eds.) Proc. of RV 2020: The 20th International Conference on Runtime Verification. LNCS, vol. 12399, pp. 417–428. Springer, Berlin (2020). https://doi.org/10.1007/978-3-030-60508-7_23
Bartocci, E., Manjunath, N., Mariani, L., et al.: CPSDebug: a tool for explanation of failures in cyber-physical systems. In: Khurshid, S., Pasareanu, C.S. (eds.) Proc. of ISSTA ’20: The 29th ACM SIGSOFT International Symposium on Software Testing and Analysis, pp. 569–572. ACM, New York (2020). https://doi.org/10.1145/3395363.3404369
Baumeister, J., Finkbeiner, B., Schwenger, M., et al.: FPGA stream-monitoring of real-time properties. ACM Trans. Embed. Comput. Syst. 18(5s), 88:1–88:24 (2019). https://doi.org/10.1145/3358220
Belmonte, G., Ciancia, V., Latella, D., et al.: Voxlogica: a spatial model checker for declarative image analysis. In: Proc. of TACAS 2019: The 25th International Conference on Tools and Algorithms for the Construction and Analysis of Systems. LNCS, vol. 11427, pp. 281–298. Springer, Berlin (2019). https://doi.org/10.1007/978-3-030-17462-0_16
Bortolussi, L., Milios, D., Sanguinetti, G.: U-Check: model checking and parameter synthesis under uncertainty. In: Proc. of QEST 2015: 12th Inter. Conf. on Quantitative Evaluation of Systems. LNCS, vol. 9259, pp. 89–104. Springer, Berlin (2015). https://doi.org/10.1007/978-3-319-22264-6_6
City of Melbourne: Melbourne Bike Share Station Readings 2011-2017 [Dataset]. https://www.opendatanetwork.com/dataset/data.melbourne.vic.gov.au/74id-aqj9 (2018)
Donzé, A.: Breach, a toolbox for verification and parameter synthesis of hybrid systems. In: Proc. of CAV 2010: The 22nd International Conference on Computer Aided Verification. LNCS, vol. 6174, pp. 167–170. Springer, Berlin (2010). https://doi.org/10.1007/978-3-642-14295-6
Donzé, A., Maler, O.: Robust satisfaction of temporal logic over real-valued signals. In: Proc. of FORMATS, pp. 92–106. Springer, Berlin (2010)
Donzé, A., Clermont, G., Legay, A., et al.: Parameter synthesis in nonlinear dynamical systems: application to systems biology. In: Proc. of RECOMB 2009: The 13th Annual International Conference on Research in Computational Molecular Biology. LNCS, vol. 5541, pp. 155–169. Springer, Berlin (2009). https://doi.org/10.1007/978-3-642-02008-7_11
Donzé, A., Krogh, B., Rajhans, A.: Parameter synthesis for hybrid systems with an application to simulink models. In: Proc. of HSCC 2009: The 12th International Conference on Hybrid Systems: Computation and Control. LNCS, vol. 5469, pp. 165–179. Springer, Berlin (2009). https://doi.org/10.1007/978-3-642-00602-9_12
Donzé, A., Ferrère, T., Maler, O.: Efficient robust monitoring for STL. In: Proc. of CAV 2013: The 25th International Conference on Computer Aided Verification. LNCS, vol. 8044, pp. 264–279. Springer, Berlin (2013). https://doi.org/10.1007/978-3-642-39799-8_19
Fainekos, G.E., Pappas, G.J.: Robustness of temporal logic specifications for continuous-time signals. Theor. Comput. Sci. 410(42), 4262–4291 (2009). https://doi.org/10.1016/j.tcs.2009.06.021
Grosu, R., Smolka, S.A., Corradini, F., et al.: Learning and detecting emergent behavior in networks of cardiac myocytes. Commun. ACM 52(3), 97–105 (2009). https://doi.org/10.1145/1467247.1467271
Haghighi, I., Jones, A., Kong, Z., et al.: SpaTeL: a novel spatial-temporal logic and its applications to networked systems. In: Proc. of HSCC’15: The 18th International Conference on Hybrid Systems: Computation and Control, pp. 189–198. IEEE, New York (2015). https://doi.org/10.1145/2728606.2728633
Hoxha, B., Abbas, H., Fainekos, G.E.: Benchmarks for temporal logic requirements for automotive systems. In: Proc. of ARCH@CPSWeek 2014: The 1st and 2nd International Workshop on Applied veRification for Continuous and Hybrid Systems. EPiC Series in Computing, vol. 34, pp. 25–30. EasyChair (2015). https://doi.org/10.29007/xwrs
Jaksic, S., Bartocci, E., Grosu, R., et al.: Quantitative monitoring of STL with edit distance. Form. Methods Syst. Des. 53(1), 83–112 (2018). https://doi.org/10.1007/s10703-018-0319-x
Jaksic, S., Bartocci, E., Grosu, R., et al.: An algebraic framework for runtime verification. IEEE Trans. Comput.-Aided Des. Integr. Circuits Syst. 37(11), 2233–2243 (2018). https://doi.org/10.1109/TCAD.2018.2858460
Kane, A., Pirotta, E., Wischnewski, S., et al.: Spatio-temporal patterns of foraging behaviour in a wide-ranging seabird reveal the role of primary productivity in locating prey. Mar. Ecol. Prog. Ser. 646, 175–188 (2020). https://doi.org/10.3354/meps13386
Koymans, R.: Specifying real-time properties with metric temporal logic. Real-Time Syst. 2(4), 255–299 (1990). https://doi.org/10.1007/BF01995674
Lemire, D.: Streaming maximum-minimum filter using no more than three comparisons per element. Nord. J. Comput. 13(4), 328–339 (2006)
Leucker, M., Sánchez, C., Scheffel, T., et al.: Tessla: runtime verification of non-synchronized real-time streams. In: Proc. of SAC 2018: The 33rd Annual ACM Symposium on Applied Computing, pp. 1925–1933. ACM, New York (2018). https://doi.org/10.1145/3167132.3167338
Loreti, M., Hillston, J.: Modelling and analysis of collective adaptive systems with CARMA and its tools. In: Proc. of SFM 2016: Formal Methods for the Quantitative Evaluation of Collective Adaptive Systems – 16th International School on Formal Methods for the Design of Computer, Communication, and Software Systems. LNCS, vol. 9700, pp. 83–119. Springer, Berlin (2016). https://doi.org/10.1007/978-3-319-34096-8
Lukina, A., Esterle, L., Hirsch, C., et al.: ARES: adaptive receding-horizon synthesis of optimal plans. In: Proc. of TACAS 2017: The 23rd International Conference on Tools and Algorithms for the Construction and Analysis of Systems, pp. 286–302 (2017). https://doi.org/10.1007/978-3-662-54580-5_17
Ma, M., Bartocci, E., Lifland, E., et al.: SaSTL: spatial aggregation signal temporal logic for runtime monitoring in smart cities. In: 11th ACM/IEEE International Conference on Cyber-Physical Systems, ICCPS 2020, Sydney, Australia, April 21–25, 2020, pp. 51–62. IEEE, New York (2020). https://doi.org/10.1109/ICCPS48487.2020.00013
Maler, O., Ničković, D.: Monitoring temporal properties of continuous signals. In: Proc. of FORMATS/FTRTFT. Lecture Notes in Computer Science, vol. 3253, pp. 152–166. Springer, Berlin (2004). https://doi.org/10.1007/978-3-540-30206-3_12
Maler, O., Ničković, D.: Monitoring properties of analog and mixed-signal circuits. Int. J. Softw. Tools Technol. Transf. 15(3), 247–268 (2013). https://doi.org/10.1007/s10009-012-0247-9
Moosbrugger, P., Rozier, K.Y., Schumann, J.: R2U2: monitoring and diagnosis of security threats for unmanned aerial systems. Form. Methods Syst. Des. 51(1), 31–61 (2017). https://doi.org/10.1007/s10703-017-0275-x
Nenzi, L., Bortolussi, L., Loreti, M.: jSSTL – a tool to monitor spatio-temporal properties. In: Proc. of VALUETOOLS 2016: The 10th EAI International Conference on Performance Evaluation Methodologies and Tools, VALUETOOLS 2016. ACM, New York (2016). https://doi.org/10.4108/eai.25-10-2016.2266978
Nenzi, L., Bortolussi, L., Ciancia, V., et al.: Qualitative and quantitative monitoring of spatio-temporal properties with SSTL. Log. Methods Comput. Sci. 14(4), 1–38 (2018). https://doi.org/10.23638/LMCS-14(4:2)2018
Nenzi, L., Bartocci, E., Bortolussi, L., et al.: Monitoring spatio-temporal properties (invited tutorial). In: Proc. of RV 2020: The 20th International Conference on Runtime Verification. LNCS, vol. 12399, pp. 21–46. Springer, Berlin (2020). https://doi.org/10.1007/978-3-030-60508-7_2
Nenzi, L., Bartocci, E., Bortolussi, L., et al.: A logic for monitoring dynamic networks of spatially-distributed cyber-physical systems. Log. Methods Comput. Sci. 18(1), 4:1–4:30 (2022). https://lmcs.episciences.org/8936. https://doi.org/10.46298/lmcs-18(1:4)2022
Nickovic, D., Yamaguchi, T.: RTAMT: online robustness monitors from STL. In: Proc. of ATVA 2020: The 18th International Symposium on Automated Technology for Verification and Analysis – 18th International Symposium. LNCS, vol. 12302, pp. 564–571. Springer, Berlin (2020). https://doi.org/10.1007/978-3-030-59152-6
Nickovic, D., Lebeltel, O., Maler, O., et al.: AMT 2.0: qualitative and quantitative trace analysis with extended signal temporal logic. In: Proc. of TACAS 2018: The 24th International Conference on Tools and Algorithms for the Construction and Analysis of Systems. LNCS, vol. 10806, pp. 303–319. Springer, Berlin (2018). https://doi.org/10.1007/978-3-319-89963-3
Parr, T.: The Definitive ANTLR 4 Reference, 2nd edn. Pragmatic Bookshelf, Raleigh (2013)
Ratasich, D., Khalid, F., Geissler, F., et al.: A roadmap towards resilient Internet of things for cyber-physical systems. IEEE Access 7, 13260–13283 (2019). https://doi.org/10.1109/ACCESS.2019.2891969
Rodionova, A., Bartocci, E., Ničković, D., et al.: Temporal logic as filtering. In: Proc. of HSCC 2016, pp. 11–20. ACM, New York (2016). https://doi.org/10.1145/2883817.2883839
Sankaranarayanan, S., Kumar, S.A., Cameron, F., et al.: Model-based falsification of an artificial pancreas control system. SIGBED Rev. 14(2), 24–33 (2017). https://doi.org/10.1145/3076125.3076128
Silvetti, S., Policriti, A., Bortolussi, L.: An active learning approach to the falsification of black box cyber-physical systems. In: Proc. of IFM 2017: The 13th International Conference on Integrated Formal Methods. LNCS, vol. 10510, pp. 3–17. Springer, Berlin (2017). https://doi.org/10.1007/978-3-319-66845-1
Ulus, D.: Montre: a tool for monitoring timed regular expressions. In: Proc. of CAV 2017: The 29th International Conference on Computer Aided Verification. LNCS, vol. 10426, pp. 329–335. Springer, Berlin (2017). https://doi.org/10.1007/978-3-319-63387-9
Yaghoubi, S., Fainekos, G.: Hybrid approximate gradient and stochastic descent for falsification of nonlinear systems. In: Proc. ACC 2017: The 2017 American Control Conference, pp. 529–534. IEEE, New York (2017). https://doi.org/10.23919/ACC.2017.7963007
Funding
Open access funding provided by Università degli Studi di Trieste within the CRUI-CARE Agreement. This research has been partially supported by the Austrian FWF projects ZK-35 and W1255-N23, by the Italian PRIN project “SEDUCE” n. 2017TWRCNB and “IT-MaTTerS” n. 2017FTXR7S, and by the PNRR iNEST – Missione 4 Componente 2, Investimento 1.5 – D.D. 1058 \(23/06/2022\), ECS_00000043.
Author information
Authors and Affiliations
Corresponding author
Additional information
Publisher’s Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Rights and permissions
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article’s Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article’s Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by/4.0/.
About this article
Cite this article
Nenzi, L., Bartocci, E., Bortolussi, L. et al. MoonLight: a lightweight tool for monitoring spatio-temporal properties. Int J Softw Tools Technol Transfer 25, 503–517 (2023). https://doi.org/10.1007/s10009-023-00710-5
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s10009-023-00710-5