Skip to main content
Log in

An operational guide to monitorability with applications to regular properties

  • Special Section Paper
  • Published:
Software and Systems Modeling Aims and scope Submit manuscript

Abstract

Monitorability underpins the technique of runtime verification because it delineates what properties can be verified at runtime. Although many monitorability definitions exist, few are defined explicitly in terms of the operational guarantees provided by monitors, i.e. the computational entities carrying out the verification. We view monitorability as a spectrum, where the fewer guarantees that are required of monitors, the more properties become monitorable. Accordingly, we present a monitorability hierarchy based on this trade-off. For regular specifications, we give syntactic characterisations in Hennessy–Milner logic with recursion for its levels. Finally, we map existing monitorability definitions into our hierarchy. Hence, our work gives a unified framework that makes the operational assumptions and guarantees of each definition explicit. This provides a rigorous foundation that can inform design choices and correctness claims for runtime verification tools.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2

Similar content being viewed by others

Notes

  1. In RV, it is commonplace to see the expected monitor behaviour described via an intermediary n-valued logic semantics [16, 17, 42] (e.g. mapping finite traces into the three verdicts called accepting, rejecting and inconclusive). Although convenient in certain cases, the approach goes against our tenet for the separation of concerns.

  2. We note that, as depicted in Fig. 1, partial monitorability does not imply any of these refinements.

  3. One could restrict the class of automata used, but then would also need to show that closure properties are preserved, the proof of which does not seem immediate.

  4. These are not related to the informative prefixes from [46] or to persistence from [59].

  5. It can be easily inferred from the outer maximal fixpoint and the exlusive use of existential modalities.

  6. A response is one where all of its infinite traces have an infinite number of prefixes satisfying the property as well. A persistence property is one where all of its infinite sequences contain a finite number of prefixes that do not satisfy the property.

References

  1. Aceto, L., Achilleos, A., Francalanza, A., Ingólfsdóttir, A.: Monitoring for silent actions. In: Lokam, S., Ramanujam, R. (eds.) FSTTCS, LIPIcs, vol. 93, pp. 7:1–7:14. Schloss Dagstuhl-Leibniz-Zentrum fuer Informatik, Dagstuhl (2017)

    Google Scholar 

  2. Aceto, L., Achilleos, A., Francalanza, A., Ingólfsdóttir, A.: A Framework for Parameterized Monitorability. In: Foundations of Software Science and Computation Structures—21st International Conference, FOSSACS 2018, LNCS, vol. 10803, pp. 203–220 (2018). https://doi.org/10.1007/978-3-319-89366-2_11

  3. Aceto, L., Achilleos, A., Francalanza, A., Ingólfsdóttir, A., Kjartansson, S.Ö.: Determinizing monitors for HML with recursion. CoRR (2016). arXiv:1611.10212

  4. Aceto, L., Achilleos, A., Francalanza, A., Ingólfsdóttir, A., Kjartansson, S.Ö.: On the complexity of determinizing monitors. In: Carayol, A., Nicaud, C. (eds.) Implementation and Application of Automata–22nd International Conference, CIAA 2017, LNCS, vol. 10329, pp. 1–13. Springer, Berlin (2017). https://doi.org/10.1007/978-3-319-60134-2_1

  5. Aceto, L., Achilleos, A., Francalanza, A., Ingólfsdóttir, A., Lehtinen, K.: Adventures in monitorability: from branching to linear time and back again. In: Proceedings of the ACM on Programming Languages, vol. 3, No. POPL, pp. 52:1–52:29 (2019). https://dl.acm.org/citation.cfm?id=3290365

  6. Aceto, L., Achilleos, A., Francalanza, A., Ingólfsdóttir, A., Lehtinen, K.: An operational guide to monitorability. In: Ölveczky, P.C., Salaün, G. (eds.) Software Engineering and Formal Methods–17th International Conference, SEFM 2019, Oslo, Norway, September 18–20, 2019, Proceedings. Lecture Notes in Computer Science, vol. 11724, pp. 433–453. Springer (2019). https://doi.org/10.1007/978-3-030-30446-1_23

  7. Aceto, L., Cassar, I., Francalanza, A., Ingólfsdóttir, A.: On runtime enforcement via suppressions. In: 29th International Conference on Concurrency Theory, CONCUR 2018, LIPIcs, vol. 118, pp. 34:1–34:17. Schloss Dagstuhl (2018). https://doi.org/10.4230/LIPIcs.CONCUR.2018.34

  8. Aceto, L., Ingólfsdóttir, A., Larsen, K.G., Srba, J.: Reactive Systems: Modelling. Specification and Verification. Cambridge Univ. Press, New York (2007)

    Book  Google Scholar 

  9. Alpern, B., Schneider, F.B.: Defining liveness. Inf. Process. Lett. 21(4), 181–185 (1985)

    Article  MathSciNet  Google Scholar 

  10. Arnold, A., Niwinski, D.: Rudiments of \(\mu \)-Calculus, Studies in Logic and the Foundations of Mathematics, vol. 146. North-Holland, Amsterdam (2001)

    MATH  Google Scholar 

  11. Attard, D.P., Cassar, I., Francalanza, A., Aceto, L., Ingolfsdottir, A.: A runtime monitoring tool for actor-based systems. In: Gay, S., Ravara, A. (eds.) Behavioural Types: From Theory to Tools, pp. 49–74. River Publishers, Gistrup (2017)

    Google Scholar 

  12. Attard, D.P., Francalanza, A.: A monitoring tool for a branching-time logic. In: Falcone, Y., Sánchez, C. (eds.) Runtime Verification—16th International Conference, RV 2016, LNCS, vol. 10012, pp. 473–481. Springer (2016). https://doi.org/10.1007/978-3-319-46982-9_31

  13. Baier, C., Tinelli, C. (eds.): Tools and Algorithms for the Construction and Analysis of Systems—21st International Conference, TACAS 2015, LNCS, vol. 9035. Springer (2015)

  14. Barringer, H., Rydeheard, D., Havelund, K.: Rule systems for run-time monitoring: from Eagle to RuleR. J. Logic Comput. 20(3), 675–706 (2008)

    Article  MathSciNet  Google Scholar 

  15. Bartocci, E., Falcone, Y., Francalanza, A., Reger, G.: Introduction to runtime verification. In: Bartocci, E., Falcone, Y. (eds.) Lectures on Runtime Verification—Introductory and Advanced Topics, LNCS, vol. 10457, pp. 1–33. Springer (2018). https://doi.org/10.1007/978-3-319-75632-5_1

  16. Bauer, A., Leucker, M., Schallhart, C.: Comparing LTL semantics for runtime verification. J. Logic Comput. 20(3), 651–674 (2010)

    Article  MathSciNet  Google Scholar 

  17. Bauer, A., Leucker, M., Schallhart, C.: Runtime verification for LTL and TLTL. ACM Trans. Softw. Eng. Methodol. 20(4), 14:1–14:64 (2011). https://doi.org/10.1145/2000799.2000800

    Article  Google Scholar 

  18. Bauer, A., Leucker, M., Schallhart, C.: Runtime verification for LTL and TLTL. ACM Trans. Softw. Eng. Methodol. 20(4), 14 (2011)

    Article  Google Scholar 

  19. Bérard, B., Bidoit, M., Finkel, A., Laroussinie, F., Petit, A., Petrucci, L., Schnoebelen, P.: Systems and Software Verification: Model-Checking Techniques and Tools. Springer, Berlin (2013)

    MATH  Google Scholar 

  20. Bielova, N., Massacci, F.: Do you really mean what you actually enforced? Int. J. Inf. Secur. 10(4), 239–254 (2011). https://doi.org/10.1007/s10207-011-0137-2

    Article  Google Scholar 

  21. Chang, E.Y., Manna, Z., Pnueli, A.: Characterization of temporal property classes. In: Kuich, W. (ed.) Automata, Languages and Programming, 19th International Colloquium, ICALP 1992, LNCS, vol. 623, pp. 474–486. Springer (1992). https://doi.org/10.1007/3-540-55719-9_97

  22. Chen, F., Rosu, G.: Mop: an efficient and generic runtime verification framework. In: Gabriel, R.P., Bacon, D.F., Lopes, C.V., Steele Jr., G.L. (eds.) Proceedings of the 22nd Annual ACM SIGPLAN Conference on Object-Oriented Programming, Systems, Languages, and Applications, OOPSLA 2007, pp. 569–588. ACM (2007). https://doi.org/10.1145/1297027.1297069

  23. Chen, Z., Wu, Y., Wei, O., Sheng, B.: Poster: Deciding weak monitorability for runtime verification. In: 2018 IEEE/ACM 40th International Conference on Software Engineering: Companion (ICSE-Companion), pp. 163–164 (2018)

  24. Cimatti, A., Tian, C., Tonetta, S.: Assumption-based runtime verification with partial observability and resets. In: International Conference on Runtime Verification, pp. 165–184. Springer (2019)

  25. Cini, C., Francalanza, A.: An LTL proof system for runtime verification. In: Baier and Tinelli [13], pp. 581–595. https://doi.org/10.1007/978-3-662-46681-0_54

  26. Clarke, E.M., Grumberg, O., Peled, D.: Model Checking. MIT Press, Cambridge (1999)

    MATH  Google Scholar 

  27. Convent, L., Hungerecker, S., Leucker, M., Scheffel, T., Schmitz, M., Thoma, D.: TeSSLa: temporal stream-based specification language. In: Formal Methods: Foundations and Applications—21st Brazilian Symposium, SBMF 2018, LNCS, vol. 11254, pp. 144–162 (2018). https://doi.org/10.1007/978-3-030-03044-5_10

  28. D’Angelo, B., Sankaranarayanan, S., Sánchez, C., Robinson, W., Finkbeiner, B., Sipma, H.B., Mehrotra, S., Manna, Z.: Lola: Runtime monitoring of synchronous systems. In: 12th International Symposium on Temporal Representation and Reasoning (TIME’05), pp. 166–174. IEEE Computer Society Press (2005)

  29. David, A., Larsen, K.G., Legay, A., Mikucionis, M., Poulsen, D.B.: Uppaal SMC tutorial. Int. J. Softw. Tools Technol. Transf. 17(4), 397–415 (2015). https://doi.org/10.1007/s10009-014-0361-y

    Article  Google Scholar 

  30. De Giacomo, G., Vardi, M.Y.: Linear temporal logic and linear dynamic logic on finite traces. In: Rossi, F. (ed.) IJCAI 2013, Proceedings of the 23rd International Joint Conference on Artificial Intelligence, pp. 854–860. IJCAI/AAAI (2013). http://www.aaai.org/ocs/index.php/IJCAI/IJCAI13/paper/view/6997

  31. Decker, N., Leucker, M., Thoma, D.: jUnit\({}^{\text{rv}}\)-adding runtime verification to jUnit. In: NASA Formal Methods, 5th International Symposium, NFM, LNCS, vol. 7871, pp. 459–464 (2013). https://doi.org/10.1007/978-3-642-38088-4_34

  32. Diekert, V., Gastin, P.: First-order definable languages. In: Logic and Automata: History and Perspectives, Texts in Logic and Games, pp. 261–306. Amsterdam University Press (2008)

  33. Diekert, V., Leucker, M.: Topology, monitorable properties and runtime verification. Theor. Comput. Sci. 537, 29–41 (2014). https://doi.org/10.1016/j.tcs.2014.02.052

    Article  MathSciNet  MATH  Google Scholar 

  34. Falcone, Y., Fernandez, J.C., Mounier, L.: What can you verify and enforce at runtime? Int. J. Softw. Tools Technol. Transf. 14(3), 349–382 (2012)

    Article  Google Scholar 

  35. Ferrère, T., Henzinger, T.A., Saraç, N.E.: A theory of register monitors. In: Dawar, A., Grädel, E. (eds.) Proceedings of the 33rd Annual ACM/IEEE Symposium on Logic in Computer Science, LICS 2018, pp. 394–403. ACM (2018). https://doi.org/10.1145/3209108.3209194

  36. Francalanza, A.: A theory of monitors (extended abstract). In: Foundations of Software Science and Computation Structures—19th International Conference, FOSSACS, Eindhoven, The Netherlands, LNCS, vol. 9634, pp. 145–161 (2016)

  37. Francalanza, A.: Consistently-detecting monitors. In: 28th International Conference on Concurrency Theory (CONCUR), LIPIcs, vol. 85, pp. 8:1–8:19. Schloss Dagstuhl (2017). https://doi.org/10.4230/LIPIcs.CONCUR.2017.8

  38. Francalanza, A., Aceto, L., Achilleos, A., Attard, D.P., Cassar, I., Monica, D.D., Ingólfsdóttir, A.: A foundation for runtime monitoring. In: Runtime Verification—17th International Conference, RV 2017, LNCS, vol. 10548, pp. 8–29. Springer (2017). https://doi.org/10.1007/978-3-319-67531-2_2

  39. Francalanza, A., Aceto, L., Ingólfsdóttir, A.: Monitorability for the Hennessy–Milner logic with recursion. Formal Methods Syst. Des. 51(1), 87–116 (2017). https://doi.org/10.1007/s10703-017-0273-z

    Article  MATH  Google Scholar 

  40. Francalanza, A., Seychell, A.: Synthesising correct concurrent runtime monitors. Formal Methods Syst. Des. (FMSD) 46(3), 226–261 (2015). https://doi.org/10.1007/s10703-014-0217-9

    Article  MATH  Google Scholar 

  41. Francalanza, A., Xuereb, J.: On implementing symbolic controllability. In: Bliudze, S., Bocchi, L. (eds.) Coordination Models and Languages—22nd IFIP WG 6.1 International Conference, COORDINATION 2020, Lecture Notes in Computer Science, vol. 12134, pp. 350–369. Springer (2020). https://doi.org/10.1007/978-3-030-50029-0_22

  42. Havelund, K., Peled, D.: Runtime verification: from propositional to first-order temporal logic. In: Runtime Verification—18th International Conference, RV 2018, Limassol, Cyprus, November 10–13, 2018, Proceedings, LNCS, vol. 11237, pp. 90–112. Springer (2018). https://doi.org/10.1007/978-3-030-03769-7_7

  43. Hennessy, M., Milner, R.: Algebraic laws for nondeterminism and concurrency. J. ACM 32(1), 137–161 (1985). https://doi.org/10.1145/2455.2460

    Article  MathSciNet  MATH  Google Scholar 

  44. Hopcroft, J.E., Motwani, R., Ullman, J.D.: Introduction to automata theory, languages, and computation. ACM Sigact News 32(1), 60–65 (2001)

    Article  Google Scholar 

  45. Kozen, D.C.: Results on the propositional \(\mu \)-calculus. Theor. Comput. Sci. 27, 333–354 (1983)

    Article  MathSciNet  Google Scholar 

  46. Kupferman, O., Vardi, M.Y.: Model checking of safety properties. Formal Methods Syst. Des. 19(3), 291–314 (2001)

    Article  Google Scholar 

  47. Kupferman, O., Vardi, M.Y., Wolper, P.: An automata-theoretic approach to branching-time model checking. J. ACM 47(2), 312–360 (2000)

    Article  MathSciNet  Google Scholar 

  48. Larsen, K.G.: Proof systems for satisfiability in Hennessy–Milner logic with recursion. Theor. Comput. Sci. 72(2), 265–288 (1990). https://doi.org/10.1016/0304-3975(90)90038-J

    Article  MathSciNet  MATH  Google Scholar 

  49. Larsen, K.G., Lorber, F., Nielsen, B.: 20 years of UPPAAL enabled industrial model-based validation and beyond. In: Margaria, T., Steffen, B. (eds.) Leveraging Applications of Formal Methods, Verification and Validation, Industrial Practice—8th International Symposium, ISoLA 2018, Limassol, Cyprus, November 5-9, 2018, Proceedings, Part IV, Lecture Notes in Computer Science, vol. 11247, pp. 212–229. Springer (2018). https://doi.org/10.1007/978-3-030-03427-6_18

  50. Laurent, J., Goodloe, A., Pike, L.: Assuring the guardians. In: Runtime Verification (RV), LNCS, vol. 9333, pp. 87–101 (2015)

  51. Leucker, M.: Sliding between model checking and runtime verification. In: International Conference on Runtime Verification, pp. 82–87. Springer (2012)

  52. Ligatti, J., Bauer, L., Walker, D.: Edit automata: enforcement mechanisms for run-time security policies. Int. J. Inf. Secur. 4(1–2), 2–16 (2005). https://doi.org/10.1007/s10207-004-0046-8

    Article  Google Scholar 

  53. Manna, Z., Pnueli, A.: Completing the temporal picture. Theor. Comput. Sci. 83(1), 97–130 (1991). https://doi.org/10.1016/0304-3975(91)90041-Y

    Article  MATH  Google Scholar 

  54. Neykova, R., Bocchi, L., Yoshida, N.: Timed runtime monitoring for multiparty conversations. Formal Asp. Comput. 29(5), 877–910 (2017). https://doi.org/10.1007/s00165-017-0420-8

    Article  MathSciNet  MATH  Google Scholar 

  55. Phillips, I.: Refusal testing. Theor. Comput. Sci. 50, 241–284 (1987). https://doi.org/10.1016/0304-3975(87)90117-4

    Article  MathSciNet  MATH  Google Scholar 

  56. Pnueli, A., Zaks, A.: PSL model checking and run-time verification via testers. In: Misra, J., Nipkow, T., Sekerinski, E. (eds.) FM 2006: Formal Methods, 14th International Symposium on Formal Methods, LNCS, vol. 4085, pp. 573–586. Springer (2006). https://doi.org/10.1007/11813040_38

  57. Rabin, M.O., Scott, D.: Finite automata and their decision problems. IBM J. Res. Dev. 3(2), 114–125 (1959)

    Article  MathSciNet  Google Scholar 

  58. Reger, G., Cruz, H.C., Rydeheard, D.E.: MarQ: Monitoring at runtime with QEA. In: Baier and Tinelli [13], pp. 596–610. https://doi.org/10.1007/978-3-662-46681-0_55

  59. Rosu, G.: On safety properties and their monitoring. Sci. Ann. Comput. Sci. 22(2), 327–365 (2012)

    MathSciNet  MATH  Google Scholar 

  60. Safra, S.: Exponential determinization for \(\omega \)-automata with strong-fairness acceptance condition (extended abstract). In: Proceedings of the Twenty-Fourth Annual ACM Symposium on Theory of Computing, STOC ’92, pp. 275–282. Association for Computing Machinery, New York, NY, USA (1992). https://doi.org/10.1145/129712.129739

  61. Sánchez, C., Leucker, M.: Regular linear temporal logic with past. In: Barthe, G., Hermenegildo, M. (eds.) Verification, Model Checking, and Abstract Interpretation, pp. 295–311. Springer, Berlin Heidelberg (2010)

    Chapter  Google Scholar 

  62. Schneider, F.B.: Enforceable security policies. ACM Trans. Inf. Syst. Secur. 3(1), 30–50 (2000)

    Article  Google Scholar 

  63. Steffen, B., Ingólfsdóttir, A.: Characteristic formulae for processes with divergence. Inf. Comput. 110(1), 149–163 (1994). https://doi.org/10.1006/inco.1994.1028

    Article  MathSciNet  MATH  Google Scholar 

  64. Stucki, S., Sánchez, C., Schneider, G., Bonakdarpour, B.: Gray-box monitoring of hyperproperties. In: ter Beek, M.H., McIver, A., Oliveira, J.N. (eds.) Formal Methods—The Next 30 Years, pp. 406–424. Springer, Cham (2019)

    Chapter  Google Scholar 

  65. Thomas, W.: Chapter 4–automata on infinite objects. In: Leeuwen, J.V. (ed.) Formal Models and Semantics, Handbook of Theoretical Computer Science, pp. 133–191. Elsevier, Amsterdam (1990). https://doi.org/10.1016/B978-0-444-88074-1.50009-3

    Chapter  Google Scholar 

  66. Viswanathan, M., Kim, M.: Foundations for the run-time monitoring of reactive systems–fundamentals of the MaC language. In: Liu, Z., Araki, K. (eds.) Theoretical Aspects of Computing—ICTAC 2004, First International Colloquium, LNCS, vol. 3407, pp. 543–556. Springer (2004). https://doi.org/10.1007/978-3-540-31862-0_38

  67. Wolper, P.: Temporal logic can be more expressive. Inf. Control 56(1/2), 72–99 (1983). https://doi.org/10.1016/S0019-9958(83)80051-5

    Article  MathSciNet  MATH  Google Scholar 

Download references

Acknowledgements

We thank the anonymous reviewers for their useful comments, which led to improvements in the paper.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Adrian Francalanza.

Additional information

Communicated by Gwen Salaün and Peter Csaba Ölveczky.

Publisher's Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

This research was supported by the Icelandic Research Fund projects “TheoFoMon: Theoretical Foundations for Monitorability” (No:163406-051) and “Epistemic Logic for Distributed Runtime Monitoring” (No:184940-051), the EPSRC project “Solving parity games in theory and practice” (No: EP/P020909/1), project BehAPI, funded by the EU H2020 RISE programme under the Marie Skłodowska-Curie Grant agreement No:778233, project FouCo, funded by the EU H020 research and innovation programme under the Marie Skodowska-Curie grant agreement No: 892704, and the Italian MIUR project PRIN 2017FTXR7S IT MATTERS “Methods and Tools for Trustworthy Smart Systems”

A Appendix: The proof of Theorem 5.3

A Appendix: The proof of Theorem 5.3

In this appendix, we present the proof of Theorem 5.3, which was omitted from the main text.

We first define a notion for monitors that is similar to the one of Definition 5.3.

Definition A.1

Let \(m \) be a closed monitor and let \(n \) be a submonitor of \(m \). We say that:

  • \(n \) can reject (resp., accept) in \(m \) in 0 unfoldings, when \(\textsf {no}\) (resp., \(\textsf {yes}\)) appears in \(n \), and that

  • \(n \) can reject (resp., accept) in \(m \) in \(k+1\) unfoldings, when it can reject (resp., accept) in k unfoldings, or x appears in \(n \) and \(n \) is in the scope of a submonitor \(\textsf {rec}\,X.n '\) that can reject (resp., accept) in k unfoldings.

We simply say that \(n \) can reject (resp., accept) in \(m \) when it can reject (resp., accept) in \(m\) in k unfoldings, for some \(k \ge 0\). We may also simply say that \(n \) can reject (resp., accept) when \(m \) is evident or not relevant. \(\square \)

We now make explicit two straightforward lemmata that we will use.

Lemma A.1

Let \(\varphi = \textsf {max}\, X.\psi \) or \(\varphi = \textsf {min}\, X.\psi \). If \(\varphi \) can refute (resp., verify) in \(\varphi \), then it is also the case that \(\psi [\varphi /X]\) can refute (resp., verify) in \(\psi [\varphi /X]\).

Lemma A.2

  • If all subformulas of \({[}\alpha {]}\varphi \) or \(\varphi \wedge \psi \) or \(\psi \wedge \varphi \) or \({\langle }\alpha {\rangle }\varphi \) or \(\varphi \vee \psi \) or \(\psi \vee \varphi \) can refute (or, respectively, verify), then all subformulas of \(\varphi \) can refute (or verify).

  • Let \(\varphi = \textsf {max}\, X.\psi \) or \(\varphi = \textsf {min}\, X.\psi \). If all subformulas of \(\varphi \) can refute (resp., verify), then all subformulas of \(\psi [\varphi /X]\) can refute (resp., verify).

We define the box-depth of a formula from \(\textsc {eHML}\cap \textsc {sHML} \) recursively:

$$\begin{aligned} d_{B}\left( \bigwedge _{\gamma \in {Act} }{[}\gamma {]}\varphi _\gamma \right)&~=~ d_{B}(\textsf {ff}) ~=~ 0 ;\\ d_{B}(X)&~=~ d_{B}(\textsf {tt}) ~=~ \infty ;\\ d_{B}(\varphi _1 \wedge \varphi _2)&~=~ \min \{d_{B}(\varphi _1), d_{B}(\varphi _2)\} + 1; ~~~~~\text { and }\\ d_{B}(\max X.\varphi ')&~=~ d_{B}(\varphi ') + 1 . \end{aligned}$$

The box-depth of a formula measures how deep in the syntactic tree of the formula one can find a box or \(\textsf {ff} \).

Lemma A.3

For all possibly open \(\varphi , \psi \in \textsc {eHML}\cap \textsc {sHML} \), \(d_{B}(\varphi [\psi /X]) \le d_{B}(\varphi )\).

Proof

Straightforward induction on \(\varphi \). \(\square \)

Lemma A.4

Let \(\alpha \in {Act} \).

  • Let \(\varphi \in \textsc {eHML}\cap \textsc {sHML} \), where all subformulas of \(\varphi \) can refute. There is some \(\psi \in \textsc {eHML}\cap \textsc {sHML} \), such that all subformulas of \(\psi \) can refute, and for every \(f\in {{Act} ^\infty } \), \(\alpha f\in \llbracket \varphi \rrbracket \) implies that \(f\in \llbracket \psi \rrbracket \).

  • Let \(\varphi \in \textsc {eHML}\cap \textsc {cHML} \), where all subformulas of \(\varphi \) can verify. There is some \(\psi \in \textsc {eHML}\cap \textsc {cHML} \), such that all subformulas of \(\psi \) can verify, and for every \(f\in {{Act} ^\infty } \), \(f\in \llbracket \psi \rrbracket \) implies that \(\alpha f\in \llbracket \varphi \rrbracket \).

Proof

We assume that \(\varphi \in \textsc {eHML}\cap \textsc {sHML} \), as the case for \(\varphi \in \textsc {eHML}\cap \textsc {cHML} \) is similar. Since \(\varphi \) is a closed formula and can refute, \(\textsf {ff} \) appears in \(\varphi \), and therefore \(d_{B}(\varphi ) < \infty \). We proceed to prove the lemma by strong numerical induction on \(d_{B}(\varphi )\), similarly to the proof of Theorem 5.2.

If:

\(\varphi = \textsf {ff} \), then we are done immediately by taking \(\psi = \textsf {ff} \).

If:

\(\varphi = \bigwedge _{\gamma \in {Act} }{[}\gamma {]}\varphi _\gamma \), then we can set \(\psi = \varphi _\alpha \).

If:

\(\varphi = \varphi _1 \wedge \varphi _2\), then either \(d_{a}(\varphi _1) < \infty \) or \(d_{a}(\varphi _2) < \infty \), and we are done by the inductive hypothesis on one of the two subformulas.

If:

\(\varphi = \max X.\varphi '\), then \(\varphi '[\varphi /X] \in \textsc {eHML}\cap \textsc {sHML} \) and all subformulas of \(\varphi '[\varphi /X]\) can refute, by Lemma A.2. Furthermore, \(\llbracket \varphi \rrbracket = \llbracket \varphi '[\varphi /X]\rrbracket \), and we are done by the inductive hypothesis. \(\square \)

Lemma A.5

If \(\varphi \in \textsc {spHML}\) or \(\varphi \in \textsc {cpHML}\), then there is a regular monitor that is sound for \(\varphi \) and persistently rejecting, or, respectively, persistently accepting.

Proof

We assume that \(\varphi \in \textsc {spHML}\), as the case for \(\varphi \in \textsc {cpHML}\) is similar. Let \(\varphi = \psi \wedge \psi _*\), where \(\psi \in \textsc {eHML}\cap \textsc {sHML} \) and all of its subformulas can refute, and \(\psi _* \in \textsc {recHML} \). By Theorem 4.4, it suffices to prove that for every \(s\in {Act} ^*\), there is some \(r\in {Act} ^*\), such that \(sr\) negatively determines \(\varphi \). We prove this by structural induction on \(s\). If \(s= \varepsilon \), then as in the proof of Theorem 5.2, we can show that there is a finite trace that negatively determines \(\psi \). If \(s= a s'\), then by Lemma A.4. there is some \(\psi ' \in \textsc {eHML}\cap \textsc {sHML} \), such that all subformulas of \(\psi '\) can refute, and for every \(f\in {{Act} ^\infty } \), \(a f\in \llbracket \psi \rrbracket \) implies that \(f\in \llbracket \psi '\rrbracket \). By the inductive hypothesis, there is some \(r\), such that \(s'r\) negatively determines \(\psi '\), and therefore, \(sr\) negatively determines \(\psi \). \(\square \)

We define the depth of a variable x in a regular monitor \(m \) recursively:

$$\begin{aligned} d_x(x)&= 0; \\ d_x(y)&= d(\textsf {no}) = d(\textsf {yes}) = d(\textsf {end}) = \infty ,\\&\text { where } y \ne x; \\ d_{x}(m _1 + m _2)&= \min \{d_{x}(m _1), d_{x}(m _2)\}+1; \\ d_{x}(\alpha .m)&= d_{x}(m) + 1;&\text { and}\\ d_{x}(\textsf {rec}\,x.~m)&= d_{x}(\textsf {rec}\,y.~m) = d_{x}(m) + 1. \end{aligned}$$

Lemma A.6

Let \(m \) be a persistently rejecting, deterministic regular monitor. If \(A \subsetneq {Act} \), then \(\sum _{\alpha \in A}\alpha .m _\alpha \) can only appear in \(m \) as a submonitor of a larger sum.

Proof

Let \(a \in {Act} \setminus A\) and let \(m '\) be an open monitor and x a variable that does not appear in \(m \), such that \(m = m '[\sum _{\alpha \in A}\alpha .m _\alpha /x]\). It is clear that . Therefore, it suffices to prove that for every deterministic \(n \) with free variable x, if , then there is a finite trace \(s\), such that there is no regular monitor \(o \) for which . We proceed to prove this claim by induction on \(d_{x}(n)\), and the case for \(n = x\) is immediate. If \(n = n _1 + n _2\), then, as \(n \) is deterministic, \(n = b.n _1' + c.n _2'\), where \(b \ne c\), and we are done by the inductive hypothesis on either \(n _1'\) or \(n _2'\), and \(n '\). If \(n = b.n _1\), then if the inductive hypothesis on \(n _1'\) and \(n '\) gives trace \(r\), then we can set \(s=b r\). If \(n = \textsf {rec}\,y.n _1\), then we are done by the inductive hypothesis on \(n _1[n/y]\) (notice that \(d_x(n _1[n/y] < d_x(m)\)) and \(n '[n/y]\). \(\square \)

Here, we call a regular monitor explicit when it is generated by the grammar:

$$\begin{aligned} m \mathrel {::=}\textsf {end}~~\vert ~~ \textsf {no}~~\vert ~~ x ~~\vert ~~ \sum _{a \in Act}a.m _a ~~\vert ~~ \textsf {rec}\,x.m. \end{aligned}$$

Corollary A.1

Every persistently rejecting, deterministic regular monitor is explicit.

Proof

A consequence of Lemma A.6. \(\square \)

Lemma A.7

Let \(m \) be an explicit deterministic regular monitor, such that all of its submonitors can reject. Then, \(\textsf {f}(m) \in \textsc {eHML}\) and all of its subformulas can refute.

Proof

By induction on the construction of \(m\). \(\square \)

Lemma A.8

If \(\varphi \in \textsc {recHML} \) and there is a monitor that is sound for \(\varphi \) and persistently rejecting or persistently accepting, then there is some \(\psi \in \textsc {spHML}\), or, respectively, \(\psi \in \textsc {cpHML}\), such that \(\llbracket \psi \rrbracket = \llbracket \varphi \rrbracket \).

Proof

We treat the case where the monitor is persistently rejecting, as the case for a persistently accepting monitor is similar. From Theorem 4.1, there is a regular monitor, \(m \), that is sound for \(\varphi \) and persistently rejecting. By Theorem 4.1, we can assume that \(m \) is deterministic (Definition 4.2). From Corollary A.1, \(m \) is explicit. If there is a submonitor of \(m \) that cannot reject, then we can prove by induction on \(m \) that there is a finite trace \(s\), for which there is no finite trace \(r\), such that , which is a contradiction. Observe that \(\textsf {f}(m)\in \textsc {sHML} \). Then, from Lemma A.7, the sHML formula \(\textsf {f}(m)\) is in \(\textsc {eHML}\), and all of its subformulas can refute. Since \(m \) is sound for \(\varphi \) and sound and violation complete for \(\textsf {f}(m)\), it is the case that \({{Act} ^\infty } \setminus \llbracket \textsf {f}(m)\rrbracket \subseteq {{Act} ^\infty } \setminus \llbracket \varphi \rrbracket \), and therefore \(\textsf {f}(m) \wedge \varphi \in \textsc {spHML}\) and \(\llbracket \textsf {f}(m) \wedge \varphi \rrbracket = \llbracket \varphi \rrbracket \). \(\square \)

Theorem 5.3

Let \(\varphi \in \textsc {recHML} \). Then, \(\varphi \) is persistently informatively monitorable for violation if and only if there is some \(\psi \in \textsc {spHML}\), such that \(\llbracket \psi \rrbracket = \llbracket \varphi \rrbracket \); \(\varphi \) is persistently informatively monitorable for satisfaction if and only if there is some \(\psi \in \textsc {cpHML}\), such that \(\llbracket \psi \rrbracket = \llbracket \varphi \rrbracket \).

Proof

A consequence of Lemmata A.5 and A.8. \(\square \)

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Aceto, L., Achilleos, A., Francalanza, A. et al. An operational guide to monitorability with applications to regular properties. Softw Syst Model 20, 335–361 (2021). https://doi.org/10.1007/s10270-020-00860-z

Download citation

  • Received:

  • Revised:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s10270-020-00860-z

Keywords

Navigation