Skip to main content
Log in

Fully automated runtime enforcement of component-based systems with formal and sound recovery

  • Regular Paper
  • Published:
International Journal on Software Tools for Technology Transfer Aims and scope Submit manuscript

Abstract

We introduce runtime enforcement of specifications on component-based systems (CBS) modeled in the behavior, interaction and priority (BIP) framework. Runtime enforcement is an increasingly popular and effective dynamic validation technique aiming to ensure the correct runtime behavior (w.r.t. a formal specification) of a system using a so-called enforcement monitor. BIP is a powerful and expressive component-based framework for the formal construction of heterogeneous systems. Because of BIP expressiveness, however, it is difficult to enforce complex behavioral properties at design-time. We first introduce a theoretical runtime enforcement framework for component-based systems where we delineate a hierarchy of enforceable properties (i.e., properties that can be enforced) according to the number of observational steps a system is allowed to deviate from the property (i.e., the notion of k-step enforceability). To ensure the observational equivalence between the correct executions of the initial system and the monitored system, we show that (i) only stutter-invariant properties should be enforced on CBS with our monitors, and (ii) safety properties are 1-step enforceable. Second, given an abstract enforcement monitor for some 1-step enforceable property, we define a series of formal transformations to instrument (at relevant locations) a CBS described in the BIP framework to integrate the monitor. At runtime, the monitor observes and automatically avoids any error in the behavior of the system w.r.t. the property. Third, our approach is fully implemented in RE-BIP, an available tool integrated in the BIP tool suite. Fourth, to validate our approach, we use RE-BIP to (i) enforce deadlock-freedom on a dining philosophers benchmark, and (ii) ensure the correct placement of robots on a map.

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
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7
Fig. 8
Fig. 9
Fig. 10
Fig. 11
Fig. 12

Similar content being viewed by others

Notes

  1. In Sect. 6, we shall concretely define the instrumentation function for CBSs defined in the BIP framework.

  2. Contrarily to other runtime enforcement frameworks such as [33, 42], we do not consider specifications over infinite sequences but finite sequences. Considering only finite sequences avoids dealing with the enforceability issues due to the semantics of the specification formalism (over infinite sequences). For monolithic systems, using enforcement monitors with storing capabilities such as the one in [33] or [28], all properties over finite sequences are enforceable (see [25] for a detailed explanation).

  3. The complexity of the instrumentation depends on the number of steps one wants to be able to rollback the system (see Sect. 6). Considering more than one step is left for future work.

  4. The runtime oracle is synthesized from a specification, using some monitor-synthesis algorithm. We assume the oracle to be consistent: in any state, it should evaluate logically equivalent events in the same way.

  5. Variables created by the transformations have fresh name w.r.t. existing variables of the input system.

  6. http://ujf-aub.bitbucket.org/re-bip/.

References

  1. Alur, R., Dill, D.L.: A theory of timed automata. Theor. Comput. Sci. 126, 183–235 (1994)

    Article  MathSciNet  MATH  Google Scholar 

  2. Arora, A., Kulkarni, S.S.: Detectors and correctors: a theory of fault-tolerance components. In: ICDCS 98: Proceedings of the 18th International Conference on Distributed Computing Systems, pp. 436–443 (1998)

  3. Basin, D.A., Jugé, V., Klaedtke, F., Zalinescu, E.: Enforceable security policies revisited. ACM Trans. Inf. Syst. Secur. 16(1), 3 (2013)

    Article  MATH  Google Scholar 

  4. Basu, A., Bensalem, S., Bozga, M., Combaz, J., Jaber, Mohamad, Nguyen, Thanh-Hung, Sifakis, Joseph: Rigorous component-based system design using the BIP framework. IEEE Softw. 28(3), 41–48 (2011)

    Article  Google Scholar 

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

    Article  MathSciNet  MATH  Google Scholar 

  6. Bauer, A.K., Falcone, Y.: Decentralised LTL monitoring. In: FM 2012: Proceedings of 18th International Symposium on Formal Methods, pp. 85–100 (2012)

  7. Bensalem, S., Bozga, M., Nguyen, T.-H., Sifakis, J.: D-finder: a tool for compositional deadlock detection and verification. In: Bouajjani, A., Maler, O. (eds.) Computer Aided Verification, 21st International Conference, CAV 2009, Grenoble, France, June 26–July 2, 2009. Proceedings of Lecture Notes in Computer Science, vol. 5643, pp. 614–619. Springer, Berlin (2009)

  8. Bensalem, S., Griesmayer, A., Legay, A., Nguyen, T.H., Sifakis, J., Yan, R.: D-finder 2: towards efficient correctness of incremental design. In: Bobaru, M.G., Havelund, K., Holzmann, G.J., Joshi, R. (eds.) NASA Formal Methods—Third International Symposium, NFM 2011, Pasadena, CA, USA, April 18–20, 2011. Proceedings of Lecture Notes in Computer Science, vol. 6617, pp. 453–458. Springer, Berlin (2011)

  9. Bliudze, S., Sifakis, J.: The algebra of connectors–structuring interaction in BIP. IEEE Trans. Comput. 57(10), 1315–1330 (2008)

    Article  MathSciNet  MATH  Google Scholar 

  10. Bliudze, S., Sifakis, J.: A notion of glue expressiveness for component-based systems. In: CONCUR—Concurrency Theory, Proceedings of the 19th International Conference. LNCS, vol. 5201, pp. 508–522. Springer, Berlin (2008)

  11. Bonakdarpour, B., Bozga, M., Gößler, G.: A theory of fault recovery for component-based models. In: SSS 2012: Proceedings of the 14th International Symposium on Stabilization, Safety, and Security of Distributed Systems. LNCS, vol. 7596, pp. 314–328. Springer, Berlin (2012)

  12. Bonakdarpour, B., Bozga, M., Jaber, M., Quilbeuf, J., Sifakis, Joseph: A framework for automated distributed implementation of component-based models. Distrib. Comput. 25(5), 383–409 (2012)

    Article  MATH  Google Scholar 

  13. Bouhadiba, T., Sabah, Q., Delaval, G., Rutten, E.: Synchronous control of reconfiguration in fractal component-based systems: a case study. In: Chakraborty, S., Jerraya, A., Baruah, S.K., Fischmeister, S. (eds.) Proceedings of the 11th International Conference on Embedded Software, EMSOFT 2011, part of the Seventh Embedded Systems Week, ESWeek 2011, Taipei, Taiwan, October 9–14, 2011, pp. 309–318. ACM, New York (2011)

  14. Boyer, F., Gruber, O., Pous, D.: Robust reconfigurations of component assemblies. In: Notkin, D., Cheng, B.H.C., Pohl, K. (eds.) 35th International Conference on Software Engineering, ICSE ’13, San Francisco, CA, USA, May 18–26, 2013, pp. 13–22. IEEE/ACM, New York (2013)

  15. Bozga, M., Jaber, M., Maris, N., Sifakis, J.: Modeling dynamic architectures using Dy-BIP. In: SC: Proceedings of Conference on High Performance Computing Networking, Storage and Analysis. LNCS, vol. 7306, pp. 1–16. Springer, Berlin (2012)

  16. Christos, G.C., Stephane, L.: Introduction to Discrete Event Systems. Springer, Secaucus (2006)

  17. Charafeddine, H., El-Harake, K., Falcone, Y., Jaber, M.: Runtime enforcement for component-based systems. In: Proceedings of the 30th Annual ACM Symposium on Applied Computing, Salamanca, Spain, April 13–17, 2015, pp. 1789–1796 (2015). doi:10.1145/2695664.2695879

  18. Chatzieleftheriou, G., Bonakdarpour, B., Smolka, S.A., Katsaros, P.: Abstract model repair. In: NFM. LNCS, vol. 7226, pp. 341–355. Springer, Berlin (2012)

  19. Colombo, C., Falcone, Y.: Organising LTL monitors over distributed systems with a global clock. In: Bonakdarpour, B., Smolka, S.A. (eds.) Runtime Verification—5th International Conference, RV 2014, Toronto, ON, Canada, September 22–25, 2014. Proceedings of Lecture Notes in Computer Science, vol. 8734, pp. 140–155. Springer, Berlin (2014)

  20. Dormoy, J., Kouchnarenko, O., Lanoix, A.: Using temporal logic for dynamic reconfigurations of components. In: FACS 2010: Proceedings of the 7th International Symposium on Formal Aspects of Component Software. LNCS, vol. 6921, pp. 200–217. Springer, Berlin (2010)

  21. Dormoy, J., Kouchnarenko, O., Lanoix, A.: Runtime verification of temporal patterns for dynamic reconfigurations of components. In: FACS 2011: Proceedings of 8th International Symposium on the Formal Aspects of Component Software. Revised Selected Papers. LNCS, vol. 7253, pp. 115–132. Springer, Berlin (2011)

  22. Falcone, Y.: You Should Better Enforce than Verify. In: RV. LNCS, vol. 6418, pp. 89–105. Springer, Berlin (2010)

  23. Falcone, Y., Cornebize, T., Fernandez, J.C.: Efficient and generalized decentralized monitoring of regular languages. In: Proceedings of Formal Techniques for Distributed Objects, Components, and Systems—34th IFIP WG 6.1 International Conference, FORTE 2014. LNCS, vol. 8461, pp. 66–83 (2014)

  24. Falcone, Y., Fernandez, J.C., Mounier, L.: Runtime verification of safety-progress properties. In: RV 2009: Proceedings of the 9th International Workshop on Runtime Verification. Selected Papers. LNCS, vol. 5779, pp. 40–59. Springer, Berlin (2009)

  25. Falcone, Y., Fernandez, J.C., Mounier, L.: What can you verify and enforce at runtime? STTT 14(3), 349–382 (2012)

    Article  Google Scholar 

  26. Falcone, Y., Jaber, M., Nguyen, T.H., Bozga, M., Bensalem, S.: Runtime verification of component-based systems in the BIP framework with formally proved sound and complete instrumentation. SOSYM (2013)

  27. Falcone, Y., Marchand, H.: Enforcement and validation (at runtime) of various notions of opacity. Discrete Event Dyn. Syst. 25(4), 531–570 (2015)

    Article  MathSciNet  MATH  Google Scholar 

  28. Falcone, Y., Mounier, L., Fernandez, J.C., Richier, J.L.: Runtime enforcement monitors: composition, synthesis, and enforcement abilities. Formal Methods Syst. Des. 38(3), 223–262 (2011)

    Article  MATH  Google Scholar 

  29. Gueye, S.M., De Palma, N., Rutten, E.: Component-based autonomic managers for coordination control. In: De Nicola, R., Julien, C. (eds.) Coordination Models and Languages, 15th International Conference, COORDINATION 2013, Held as Part of the 8th International Federated Conference on Distributed Computing Techniques, DisCoTec 2013, Florence, Italy, June 3–5, 2013. Proceedings of Lecture Notes in Computer Science, vol. 7890, pp. 75–89. Springer, Berlin (2013)

  30. Guillet, S., de Lamotte, F., Le Griguer, N., Rutten, E., Diguet, J.P., Gogniat, G.: Modeling and synthesis of a dynamic and partial reconfiguration controller. In: Koch, D., Singh, S., Tørresen, J. (eds.) 22nd International Conference on Field Programmable Logic and Applications (FPL), Oslo, Norway, August 29–31, 2012, pp. 703–706. IEEE, New York (2012)

  31. Havelund, K., Goldberg, A.: Verify your runs. In: VSTTE 2005: Proceedings of the First IFIP TC 2/WG 2.3 Conference on Verified Software: Theories, Tools, Experiments. Revised Selected Papers and Discussions, pp. 374–383 (2008)

  32. Kouchnarenko, O., Weber, J.-F.: Adapting component-based systems at runtime via policies with temporal patterns. In: Fiadeiro, J.L., Liu, Z., Xue, J. (eds.) Formal Aspects of Component Software—10th International Symposium, FACS 2013, Nanchang, China, October 27–29, 2013. Revised Selected Papers. Lecture Notes in Computer Science, vol. 8348, pp. 234–253. Springer, Berlin (2013)

  33. Ligatti, J., Bauer, L., Walker, D.: Run-time enforcement of nonsafety policies. ACM Trans. Inf. Syst. Secur. 12(3), 19:1–19:41 (2009)

    Article  Google Scholar 

  34. Manna, Z., Pnueli, A.: A hierarchy of temporal properties. In: PODC 90: Proceedings of the Ninth Annual ACM Symposium on Principles of Distributed Computing, pp. 377–410 (1990)

  35. Matteucci, I.: Automated synthesis of enforcing mechanisms for security properties in a timed setting. Electron. Notes Theor. Comput. Sci. 186, 101–120 (2007)

    Article  MathSciNet  MATH  Google Scholar 

  36. Pinisetty, S., Falcone, Y., Jéron, T., Marchand, H.: Runtime enforcement of parametric timed properties with practical applications. In: Lesage, J.J., Faure, J.M., Cury, J.E.R., Lennartson, B. (eds.) 12th International Workshop on Discrete Event Systems, WODES 2014, Cachan, France, May 14–16, 2014, pp. 420–427. International Federation of Automatic Control, USA (2014)

  37. Pinisetty, S., Falcone, Y., Jéron, T., Marchand, H., Rollet, Antoine, Nguena-Timo, Omer: Runtime enforcement of timed properties revisited. Formal Meth. Syst. Des. 45(3), 381–422 (2014)

    Article  MATH  Google Scholar 

  38. Pnueli, A., Zaks, A.: PSL model checking and run-time verification via testers. In: Misra, J., Nipkow, T., Sekerinski, E. (eds.) FM 2006: Proceedings of the 14th International Symposium on Formal Methods. LNCS, vol. 4085, pp. 573–586. Springer, Berlin (2006)

  39. Renard, M., Falcone, Y., Rollet, A., Pinisetty, S., Jéron, T., Marchand, H.: Enforcement of (timed) properties with uncontrollable events. In: Leucker, M., Rueda, C., Valencia, F.D. (eds.) Theoretical Aspects of Computing—ICTAC 2015—12th International Colloquium Cali, Colombia, October 29–31, 2015. Proceedings of Lecture Notes in Computer Science, vol. 9399, pp. 542–560. Springer, Berlin (2015)

  40. Runtime Verification. http://www.runtime-verification.org (2001–2015)

  41. Said, N.B., Abdellatif, T., Bensalem, S., Bozga, M.: Model-driven information flow security for component-based systems. In: Bensalem, S., Lakhneck, Y., Legay, A. (eds.) From Programs to Systems. The Systems perspective in Computing—ETAPS Workshop, FPS 2014. in Honor of Joseph Sifakis, Grenoble, France, April 6, 2014. Proceedings of Lecture Notes in Computer Science, vol. 8415, pp. 1–20. Springer, Berlin (2014)

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

    Article  Google Scholar 

  43. Wen, Q., Kumar, R., Huang, J., Liu, H.: A framework for fault-tolerant control of discrete event systems. IEEE Trans. Automat. Contr. 53(8), 1839–1849 (2008)

  44. Wilke, T.: Classifying discrete temporal properties. In: STACS. LNCS, vol. 1563, pp. 32–46. Springer, Berlin (1999)

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Yliès Falcone.

Additional information

The work reported in this article has been done in the context of the COST Action ARVI IC1402, supported by COST (European Cooperation in Science and Technology). The work presented in this paper is supported by the University Research Board (URB) at American University of Beirut.

Appendix 1: On the correctness and behavior of the supervised system

Appendix 1: On the correctness and behavior of the supervised system

At an abstract level, the correctness of runtime enforcement of a property \(\varphi \) on a BIP system S stems from two facts regarding the behavior of the synthesized BIP enforcement monitor:

  • the enforcement monitor correctly observes S (see “Correctness of the observation [26]”); and

  • the enforcement monitor intervenes on S only when \(\varphi \) is violated and then restores S to the previous correct state (see “Correctness of the intervention”), otherwise it lets S execute normally.

Moreover, the observation and intervention of the monitor are done in such a way that the executions of S are preserved.

More precisely, from an input BIP system and a monitor, using the transformations in Sect. 6, we synthesize a system which runtime semantics is the composition between the initial system and the monitor, as described in Definition 16. Hence, the weak bisimulation and trace inclusion properties described at the abstract level in Sect. 5 apply to the transformed BIP system.

1.1 Correctness of the observation [26]

Correctly observing the system behavior relies on our instrumentation technique and follows the same correctness arguments as in [26]. We do not reiterate the proof but briefly recall the main arguments. First, in the instrumented system, the value of variables are the same as in the original system. Instrumentation only modifies the system to transfer the values of variables to the monitor. Second, the chosen priority model ensures the consistency of the events fed to the monitor: events are sent each time the system performs a transition relevant to the property, and the order of events faithfully reflects the execution.

1.2 Proof of Proposition 3 (p. 10)

Proof

Let us consider the smallest relation \(R\subseteq (\mathrm {Sta} \times (\varTheta ^{\mathcal {O}}\cup \overline{\varTheta }^{\mathcal {O}})) \times \mathrm {Sta}\) defined as follows: \(((q_0, {\theta _{{\scriptscriptstyle \mathrm {init}}}^{{\mathcal {O}}}}), q_0)\in R\) and:

  1. (a)

    \((r, s) \in R \implies (r', s') \in R\), whenever \(s \xrightarrow { la }_{\mathrm {Trans}} s' \wedge r \xrightarrow { la }_{\mathrm {Mon}} r'\), or

  2. (b)

    \((r, s) \in R \implies (r', s) \in R\), whenever \(r \xrightarrow {\epsilon }_{\mathrm {Mon}} r'\).

The proof is a direct consequence of Definition 16 and the chosen definition of R. The three conditions of Proposition 3 hold for relation R.

  • Condition 1. holds because \(q_0\) and \({\theta _{{\scriptscriptstyle \mathrm {init}}}^{{\mathcal {O}}}}\) are the initial states of respectively \(\left\langle \mathrm {Lab}, \mathrm {Sta}, \mathrm {Trans} \right\rangle \) and the monitor.

  • Let us consider \((r,s) \in R, la \in \mathrm {Lab}\), and \(r' \in \mathrm {Sta}\times (\varTheta ^{\mathcal {O}}\cup \overline{\varTheta }^{\mathcal {O}})\) such that \(r \xrightarrow { la }_{\mathrm {Mon}} r'\). Let r and \(r'\) be \(\left\langle q,\theta \right\rangle \) and \(\left\langle q',\theta ' \right\rangle \) for some \(q,q' \in \mathrm {Sta}\) and \(\theta , \theta ' \in \varTheta ^{\mathcal {O}}\cup \overline{\varTheta }^{\mathcal {O}}\). According to the semantics rules in Definition 16, \(r \xrightarrow { la }_{\mathrm {Mon}} r'\) is possible only at two conditions. The first case is when rule (1) applies, that is when L moves from q to \(q'\) by \( la \) and \(\theta = \theta '\) (i.e., the instrumentation function does not produce an event), for some \( la \in \mathrm {Lab}\). According to (a), we have \(\left( \left\langle q',\theta \right\rangle , q'\right) \in R\). Similarly, when rule (2) applies, we can find \(\left( \left\langle q',\theta ' \right\rangle , q'\right) \in R\) where \(\theta '\) is such that \(\exists \theta _c \in {\varTheta }^{{\mathcal {O}}}, \exists e \in \varSigma : \theta \xrightarrow {e}_{{\mathcal {E}}} \theta _c \wedge \theta _c \xrightarrow { com }_{{\mathcal {E}}} \theta '\), with \(\theta ' \in \varTheta ^{\mathcal {O}}\). Hence, condition 2. holds.

  • Let us consider \((r,s) \in R\) and \(r' \in \mathrm {Sta} \times (\varTheta ^{\mathcal {O}}\cup \overline{\varTheta }^{\mathcal {O}})\) such that \(r \xrightarrow { \epsilon }_{\mathrm {Mon}} r'\). Let r and \(r'\) be \(\left\langle q,\theta \right\rangle \) and \(\left\langle q',\theta ' \right\rangle \) for some \(q,q' \in \mathrm {Sta}\) and \(\theta , \theta ' \in \varTheta ^{\mathcal {O}}\cup \overline{\varTheta }^{\mathcal {O}}\). According to the semantics rules in Definition 16, \(r \xrightarrow {\epsilon }_{\mathrm {Mon}} r'\) is possible only if \(q \xrightarrow { la }_{\mathrm {Trans}} q' \wedge \theta \xrightarrow {e}_{{\mathcal {E}}} \theta _e \wedge \theta _e\in \overline{\varTheta }^{\mathcal {O}}\wedge \theta _e \xrightarrow {\overline{e}}_{{\mathcal {E}}} \theta \), for some \( la \in \mathrm {Lab}, e = {{\mathrm{inst}}}( la , q'), \theta _e \in \overline{\varTheta }^{\mathcal {O}}\), and we have \(r = r'\). Hence, condition 3. holds. \(\square \)

1.3 Correctness of the intervention

In the following, we focus on the correctness of the behavior of enforcement monitors. The correctness stems from the fact that we consider safety properties and that, as it was similarly expressed at an abstract level in Proposition 1, enforcement monitors rollback the system by one step as soon as the system emits an event that violates the property.

Intuitively, the correctness proof of the transformations consists in showing that the supervised BIP system behaves in the same way as the composition of an abstract enforcement monitor with the LTS of the initial system. That is, the behavior of the supervised systems follows the semantics rules in Definition 16.

1.3.1 Preliminaries: partitioning interactions

Recall that a trace of length l of a BIP system \(\left\langle B, Init \right\rangle \) whose runtime semantics is \(\pi (C)=\left\langle Q, A, \mathop {\longrightarrow }\limits ^{}_\pi \right\rangle \) is the sequence of alternating states/configurations and interactions \(q^0\cdot a_0\cdot q^1\cdot a_1\cdots a_{l-1}\cdot q^l\) such that: \(q^0\) = \( Init \), and, \(\forall i\in [0,l-1]: q^i\in Q \wedge \exists a_i\in A: q^i \mathop {\longrightarrow }\limits ^{a_i}_\pi q^{i+1}\).

According to the transformations defined in Sect. 6, a trace \(q^0\cdot a_0\cdot q^1\cdot a_1\cdots a_{l-1}\cdot q^l\) of the monitored system \(C^\mathrm{rec}\) satisfies the following property.

Lemma 1

If \({\mathcal {E}}.p^m \in a^i\), then all other ports involved in \(a^i\) are \(p^m\) ports.

Proof

The lemma holds by construction, according to Definitions 21 (p. 13) and 23 (p. 14). \(\square \)

Similar lemmas hold for \({\mathcal {E}}.p^c\) and \({\mathcal {E}}.p^r\). A consequence of Lemma 1 is that the interactions of the supervised system can be grouped into four categories: the initial, recovery, continue, and monitor interactions. Consequently, we denote by \(\alpha _m\) (resp. \(\alpha _c\), \(\alpha _r\)) any interaction involving \({\mathcal {E}}.p^m\) (resp. \({\mathcal {E}}.p^c\), \({\mathcal {E}}.p^r\)).

Lemma 2

Let us consider \(i \in [1, m]\) s.t. \(q^i \cdot a^i \cdot q^{i+1}\), then \({\mathcal {E}}.p^m \in a^i\) iff \(q^{i+1} \cdot a^{i+1} \cdot q^{i+2}\) where \(\{{\mathcal {E}}.p^r, {\mathcal {E}}.p^c\} \cap a^{i+1} \ne \emptyset \).

Proof

First, according to Definitions 21 and 23 (p. 13 and 14), interactions \(\alpha ^c\) and \(\alpha ^r\) have more priority than the interactions of the initial BIP system. Second, according to Definition 17 (p. 11), any instrumented transition of an atomic component consists of two transitions (one for recovery and one for continue) just after a transition for interacting with the monitor (i.e., labeled with port \(p^m\)).

Lemma 2 states that, after an interaction with the monitor (\(a^i\) is an \(\alpha _m\) interaction), only two kinds of interactions can happen: either a recovery or a continue interaction (i.e., \(a_{i+1}\) is an \(\alpha _r\) or an \(\alpha _c\) interaction).

1.3.2 Proof of Proposition 4 (p. 15)

Let us consider a trace \(q^0\cdot a_0\cdot q^1\cdot a_1\cdots a_{l-1}\cdot q^l\) of the supervised system and the next step of the system after this trace which consists in performing an interaction a. We distinguish two cases according to whether a is connected to an instrumented transition (i.e., \(a \in {{\mathrm{rec\_i}}}\)) or not.

  1. 1.

    If \(a \notin {{\mathrm{rec\_i}}}\), then the execution of a does not modify the variables that affect the satisfiability of the property. This stems from the following facts. First, according to Definitions 21 and 23 (p. 13 and 14 respectively), interaction \(\alpha ^m\) has more priority than the interactions of the initial BIP system. Second, according to Definition 17 (p. 11), any instrumented transition of an atomic component consists of its previous transition followed by a transition to interact with the monitor (i.e., labeled with port \(p^m\)). After instrumentation, such interaction and the following state are mapped to \(\epsilon \). Consequently the first rule in Definition 16 (p. 9) applies.

  2. 2.

    If \(a \in {{\mathrm{rec\_i}}}\), then a is followed by the execution of an \(\alpha ^m\) interaction (i.e., an interaction with the enforcement monitor). After instrumentation, such interaction and the following state (where the values of variables are sent through port \(\mathcal{E}.p^m\) of the enforcement monitor) are mapped to an event \(e \in \varSigma \) in Definition 16. Recall that, according to Lemma 2, an \(\alpha _m\) interaction is followed by either an \(\alpha _c\) or an \(\alpha _r\) interaction. We distinguish two sub-cases:

    • The first sub-case is when a involves transitions that do not modify the variables of the property but at least one of these transitions has a port that is in an interaction modifying some variables of the property. Hence, e corresponds to the last emitted event in the trace. Because of stutter-invariance, the system keeps satisfying the property. Consequently, \(\alpha _m\) is followed by an \(\alpha _c\) interaction. This situation corresponds to rule number 2 in Definition 16.

    • The second sub-case is when a involves transitions that modify some variables of the property. We distinguish two subsub-cases.

      • The first subsub-case is when e brings the monitor to a good (with verdict \(\top \)) or currently good state (with verdict \(\top _c\)). Then, the system executes interaction \(\alpha ^c\) that moves the system to a next good state that is the same as in the original system. This situation is similar to the previous first sub-case and also corresponds to rule number 2 in Definition 16.

      • The second subsub-case is when e brings the monitor to a bad state (with verdict \(\bot \)). Then, the system executes interaction \(\alpha ^r\) that restores the values of the variables and brings the system back to its (correct) previous state. The execution of a recovery transition corresponds to \(\overline{e}\) in rule number 3 in Definition 16.

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Falcone, Y., Jaber, M. Fully automated runtime enforcement of component-based systems with formal and sound recovery. Int J Softw Tools Technol Transfer 19, 341–365 (2017). https://doi.org/10.1007/s10009-016-0413-6

Download citation

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s10009-016-0413-6

Keywords

Navigation