Dynamic Timed Automata for Reconfigurable System Modeling and Verification
Abstract
:1. Introduction
2. Related Work
- It enables the separation of concerns by modeling dynamic structures using GTSs, which explicitly model system features and component set evolution at two separate levels [40];
- It provides an unfolding algorithm that transforms DTA to semantic-equivalent TA, thereby making the design and verification of dynamic systems more efficient by reusing the existing TA tools in the analysis of DTA;
- All properties that are decidable in the TA formalism remain decidable in the new extension, since any given DTA can be unfolded to a plain TA that preserves the behavior of its original DTA.
3. Preliminaries
3.1. Timed Automata
- Initially, the value of x is zero;
- Its value increases simultaneously with other clocks by the same speed;
- It can be reset to zero with any edge.
- (1)
- S is a nonempty finite set of locations;
- (2)
- ⊂ S is a set of initial locations;
- (3)
- Σ is a finite set of actions containing an internal action denoted by τ;
- (4)
- C is a finite set of clocks;
- (5)
- is a set of edges between locations, where means the following;
- (a)
- s and are the source and the target locations, respectively;
- (b)
- σ is an action;
- (c)
- is an enabling condition built over C;
- (d)
- is a subset of clocks to be reset.
- (6)
- assigns invariants to locations.
- Let be a set of synchronizations, such that c! and c? represent the initiation and the acceptance, respectively, of synchronization over channel c, and “−” stands for no synchronization.
- Let be a set of variables.
- Let be the set of logical conditions built over .
- Let be the set of expressions built over .
- Let be the set of finite sequences of assignments of the form , where and .
- (1)
- Vl is a set of initialized local variables (a variable in UPPAAL can be a real or an integer);
- (2)
- , and I are as in Definition 1;
- (3)
- Guards(V) × Sync × 2c × Assign(V) × S is a set of edges, where for :
- (a)
- , and are as provided in Definition 1;
- (b)
- is an enabling condition built over V;
- (c)
- z is a synchronization on a channelc. Note that the synchronization can take place only if an edge e of automaton A is sending on c (i.e., c!) and an edge of automaton is receiving on c (i.e., c?);
- (d)
- α is a sequence of assignments updating the values of variables in V.
3.2. Graph Transformation: A Double-Pushout Approach
- L is a left-hand side (to be removed);
- I is a common interface;
- R is a right-hand side (to be inserted);
- is a graph morphism;
- is a graph morphism.
- 1.
- (such that “⊎” denotes the disjoint union);
- 2.
- .
4. Dynamic Timed Automata
- , if , then (Note that might be empty);
- and ;
- .
- 1.
- L is a left-hand side TA;
- 2.
- I is a common interface TA;
- 3.
- R is a right-hand side TA, , such that denotes the location set of A;
- 4.
- is a TA morphism;
- 5.
- is a TA morphism;
- 6.
- is a precondition of r such that s is a location and (resp. ) is an enabling condition built over clocks (respectively, variables);
- 7.
- is a post-condition (i.e., effect) of r such that δ is a set of clocks to be reset and α is a sequence of assignments.
- 1.
- is a TA;
- 2.
- is a set of transformation rules.
- 1.
- A is the current configuration of ;
- 2.
- There exists a TA C such that ;
- 3.
- is satisfied, that is, s is the current location of A, and the valuations of both guards and are true.
- 1.
- L, I, R, and are shown in Figure 4;
- 2.
- , such that repairing, "x < 20"and “true”;
- 3.
- , such that δ = {x} and (i.e., an empty sequence).
- Its precondition g is satisfied (i.e., the current location of A isrepairingand the value of clockxis less than 20);
- A morphism m finds an occurrence of L in A, such that the left and right locations of L are mapped torepairingandfail_safe, respectively;
- There exists a TA C, shown in Figure 4, such that .
5. DTA Transformation towards Basic TA
- 1.
- Let be a set of TA obtained by applying sequences of rules in to .
- 2.
- Let be the set of edges in .
- 3.
- Let be a set of edges.
- 4.
- Let .
- 5.
- Let be a set of transformations applicable to DTA , where r is an applicable rule to , and are its source and target configurations, respectively.
- 1.
- Let be an initial configuration of .
- 2.
- Let be an enumeration of configurations in by means of a natural ordering.
- 3.
- Let , where cfg is a bounded local integer variable (initialized to zero) used to represent the current configuration of , that is, if then the current configuration of is , where .
- 4.
- Let .
- 5.
- For each edge that is present in every configuration in , i.e., , insert e into E, i.e., .
- 6.
- For each edge that does not belong to certain configurations in , i.e., , do:
- (a)
- Build a condition le of the form “cfg==i||...||cfg==i” (|| and && stand for “logical or” and “logical and”, respectively), where ii are the indices, obtained by Enum, of configurations in .
- (b)
- Create , where “le && ” (6a).
- (c)
- Insert into E, i.e., .
- 7.
- For each transformation , do:
- (a)
- Let and be the pre- and postconditions of rule r.
- (b)
- Let “cfg==i && ”, where i = Enum.
- (c)
- Let “,cfg: = j”, where j = Enum.
- (d)
- Create an edge (recall that and “−” stand for internal action and no synchronization, respectively).
- (e)
- Insert e into E, i.e., .
- 8.
- Let , , , , and .
- 9.
- Let .
Algorithm 1: DTA transformation towards TA. |
Require: : DTA |
Ensure: : TA |
1: Initialization: |
2: Let |
3: cfg |
4: |
5: |
6: |
7: Apply rules in to |
8: Compute |
9: Compute |
10: Let be an enumeration |
11: |
12: for each do |
13: |
14: end for |
15: Represent edges of in : |
16: for each do |
17: if then |
18: |
19: else |
20: Pick arbitrarily A from |
21: |
22: for each do |
23: |
24: end for |
25: |
26: |
27: end if |
28: end for |
29: Represent rules of in : |
30: for each do |
31: |
32: |
33: |
34: |
35: end for |
36: Termination: |
37: |
- In the following, we use the proposed algorithm to create an equivalent TA Vl to .
- Initialization:First, we start the creation of automaton such that its sets of locations, initial locations, actions and clocks, and function I are identical to those in A. Additionally, we add a local variable, called cfg, initialized to zero, to those of A to create a local variable set of . Thus,
- Vl = {cfg}, where ;
- S = {working, repairing, fail_safe};
- = {working;}
- ;
- = {x};
- , wheretruemeans there are no invariants on location.
- Second, we apply rules in to A to yield two sets: (i) , where configurations A and H are illustrated in Figure 4, and (ii) . Finally, we enumerate the configurations in using a natural ordering; hence,Enum andEnum.
- Represent edges of in :First, we consider edges in that remain unchanged during reconfigurations, i.e., they exist in configurations of . These edges are:
- e1 = (working, τ, true, true, problem!, {x}, ε, repairing);
- e2 = (repairing, τ, “x < 15”, true, repaired!, {x}, ∅, ε, working);
- e3 = (fail_safe, τ, “x < 50”, true, repaired!, {x}, ∅, ε, working);
- wheretrueindicates “no guards”, and ε denotes “an empty sequences”.
- Consider edges that do not appear in every configuration of , namely:
- eA = (repaired, τ, “x >= 15”, true, delayed!, {x}, ε, fail_safe) in A;
- eH = (repaired, τ, “x < 10”, true, failsafe!, {x}, ε, fail_safe) in H;
- Since edge only belongs to configuration A, i.e., , the enabling condition (built over variables) of edge , which represents in , is computed as follows “cfg==0&&true”, wheretrueis the enabling condition of and 0 is the index of configuration A. Thus, = (repairing, τ, “x >= 15”, “cfg==0”, delayed!, {x}, ε, fail_safe). Similarly, , which represents , is defined as follows: = (repairing, τ, “x < 10”, “cfg==1”, failsafe!, {x}, ε, fail_safe). Finally, edges , , , , and are added to set E.
- Adding edges to emulate rules:An application of r to A results in H, where is no longer present and is newly added. In , r applies under the following conditions: (i) its current configuration is A, (ii) the value of clock x is less than 20, and (iii) the current location of A isrepairing. Hence, the preconditions of edge , which represent this application, are (i) “cfg==0” and (ii) “x < 20”; furthermore, (iii) the source and target location of isrepairing. Moreover, when r applies, (a) clockxis reset, and (b) the current configuration of is changed to H. Therefore, the postconditions of edge are (a) “x:=0” and (b) “cfg:=1”. Finally, we insert = (repairing, τ, “x < 20”, “cfg==0”, −, “{x}”, “cfg==1”, repairing) into E. Recall that τ and “−” stand for internal action and no synchronization, respectively.
- Termination:Finally, the equivalent TA Vl, to DTA is given as follows.
- Vl = {cfg};
- S = {working, repairing, fail_safe};
- S0 = {working};
- ;
- C = {x};
- ;
- .
6. Proofs of Termination and Equivalence
6.1. Graph Transformation Termination
- 1.
- Rules that decrease the number of edges, i.e., if , then ;
- 2.
- Rules that preserve the number of edges, i.e., if , then ;
- 3.
- Rules that increase the number of edges, i.e., if , then .
6.2. Unfolding Termination
6.3. Equivalence between DTA and Their Unfolding TA
7. Illustrative Example
- Each idle machine can only start manufacturing a product of type without requiring any tools;
- At least one of the machines that decided to produce a B product returns a picked tool and begins production of type ;
- The remaining machines continue to produce type B and once finished, start manufacturing a product of type .
- 1.
- The initial configuration of machines and a model of tools are depicted in Figure 6a,b, respectively;
- 2.
- The synchronization channels get_tool and put_tool are present;
- 3.
- Local clock x is used;
- 4.
- Constant t represents the number of tools;
- 5.
- Constants maxA, maxB and maxA_ correspond to the maximum number of products A, B, and to be manufactured, respectively;
- 6.
- Local variables a, b, and a_ and global variables f and w are used to store the number of manufactured products A, B, and , available tools, and waiting machines for a second tool, respectively;
- 7.
- We distinguish a variable d used to indicate the presence of a deadlock;
- 8.
- The use of local variable c is explained later.
8. Conclusions
Author Contributions
Funding
Data Availability Statement
Conflicts of Interest
References
- Dima, A.; Bugheanu, A.M.; Boghian, R.; Madsen, D.O. Mapping Knowledge Area Analysis in E-Learning Systems Based on Cloud Computing. Electronics 2023, 12, 62. [Google Scholar] [CrossRef]
- Souri, A.; Rahmani, A.M.; Navimipour, N.J.; Rezaei, R. A hybrid formal verification approach for QoS-aware multi-cloud service composition. Clust. Comput. 2020, 23, 2453–2470. [Google Scholar] [CrossRef]
- Jasim, A.M.; Jasim, B.H.; Neagu, B.C.; Alhasnawi, B.N. Efficient Optimization Algorithm-Based Demand-Side Management Program for Smart Grid Residential Load. Axioms 2023, 12, 33. [Google Scholar] [CrossRef]
- Ecer, F.; Böyükaslan, A.; Hashemkhani Zolfani, S. Evaluation of Cryptocurrencies for Investment Decisions in the Era of Industry 4.0: A Borda Count-Based Intuitionistic Fuzzy Set Extensions EDAS-MAIRCA-MARCOS Multi-Criteria Methodology. Axioms 2022, 11, 404. [Google Scholar] [CrossRef]
- Souri, A.; Ghobaei-Arani, M. Cloud manufacturing service composition in IoT applications: A formal verification-based approach. Multimed. Tools Appl. 2022, 81, 26759–26778. [Google Scholar] [CrossRef]
- Awan, K.A.; Ud Din, I.; Almogren, A.; Khattak, H.A.; Rodrigues, J.J.P.C. EdgeTrust: A Lightweight Data-Centric Trust Management Approach for IoT-Based Healthcare 4.0. Electronics 2023, 12, 140. [Google Scholar] [CrossRef]
- El Ballouli, R.; Bensalem, S.; Bozga, M.; Sifakis, J. Programming dynamic reconfigurable systems. Int. J. Softw. Tools Technol. Transf. 2021, 23, 701–719. [Google Scholar] [CrossRef]
- Alur, R.; Dill, D. Automata for modeling real-time systems. In Automata, Languages and Programming, Proceedings of the 17th International Colloquium, Warwick University, UK, 16–20 July 1990; Paterson, M.S., Ed.; Springer: Berlin/Heidelberg, Germany, 1990; pp. 322–335. [Google Scholar]
- Souri, A.; Rahmani, A.M.; Jafari Navimipour, N. Formal verification approaches in the web service composition: A comprehensive analysis of the current challenges for future research. Int. J. Commun. Syst. 2018, 31, e3808. [Google Scholar] [CrossRef]
- Vaandrager, F. A First Introduction to UPPAAL. In Industrial Handbook; 2011; pp. 18–48. Available online: https://www.researchgate.net/publication/228919420_A_First_Introduction_to_Uppaal (accessed on 30 December 2022).
- Behrmann, G.; David, A.; Larsen, K.G. A tutorial on UPPAAL. In Proceedings of the Formal Methods for the Design of Real-Time Systems, Bertinoro, Italy, 13–18 September 2004; Springer: Berlin/Heidelberg, Germany, 2004; pp. 200–236. [Google Scholar]
- Chan, C.C.; Yang, C.Z.; Fan, C.F. Security Verification for Cyber-Physical Systems Using Model Checking. IEEE Access 2021, 9, 75169–75186. [Google Scholar] [CrossRef]
- Valero, V.; Díaz, G.; Cambronero, M.E. Timed Automata Modeling and Verification for Publish-Subscribe Structures Using Distributed Resources. IEEE Trans. Softw. Eng. 2017, 43, 76–99. [Google Scholar] [CrossRef]
- Lin, Q.Q.; Wang, S.L.; Zhan, B.H.; Gu, B. Modelling and verification of real-time publish and subscribe protocol using UPPAAL and Simulink/Stateflow. J. Comput. Sci. Technol. 2020, 35, 1324–1342. [Google Scholar] [CrossRef]
- Moussa, B.; Kassouf, M.; Hadjidj, R.; Debbabi, M.; Assi, C. An Extension to the Precision Time Protocol (PTP) to Enable the Detection of Cyber Attacks. IEEE Trans. Ind. Inform. 2020, 16, 18–27. [Google Scholar] [CrossRef]
- Mouelhi, S.; Laarouchi, M.E.; Cancila, D.; Chaouchi, H. Predictive Formal Analysis of Resilience in Cyber-Physical Systems. IEEE Access 2019, 7, 33741–33758. [Google Scholar] [CrossRef]
- Murata, T. Petri nets: Properties, analysis and applications. Proc. IEEE 1989, 77, 541–580. [Google Scholar] [CrossRef]
- Kulcsár, G.; Lochau, M.; Schürr, A. Graph-rewriting Petri nets. In Proceedings of the International Conference on Graph Transformation (ICGT 2018), Toulouse, France, 25–26 June 2018; Springer: Berlin/Heidelberg, Germany, 2018; pp. 79–96. [Google Scholar]
- Tigane, S.; Kahloul, L.; Benharzallah, S.; Baarir, S.; Bourekkache, S. Reconfigurable GSPNs: A modeling formalism of evolvable discrete-event systems. Sci. Comput. Program. 2019, 183, 102302. [Google Scholar] [CrossRef]
- Wang, H.; Wu, J.; Zhu, X.; Chen, Y.; Zhang, C. Time-Variant Graph Classification. IEEE Trans. Syst. Man Cybern. Syst. 2020, 50, 2883–2896. [Google Scholar] [CrossRef] [Green Version]
- Tigane, S.; Kahloul, L.; Hamani, N.; Khalgui, M.; Ali, M.A. On Quantitative Properties Preservation in Reconfigurable Generalized Stochastic Petri Nets. IEEE Trans. Syst. Man Cybern. Syst. 2022. early access. [Google Scholar] [CrossRef]
- Heckel, R.; Küster, J.M.; Taentzer, G. Confluence of Typed Attributed Graph Transformation Systems. In Proceedings of the Graph Transformation; Springer: Berlin/Heidelberg, Germany, 2002; pp. 161–176. [Google Scholar]
- Jayaraman, P.; Whittle, J.; Elkhodary, A.M.; Gomaa, H. Model Composition in Product Lines and Feature Interaction Detection Using Critical Pair Analysis. In Proceedings of the Model Driven Engineering Languages and Systems, Nashville, TN, USA, 30 September–5 October 2007; Springer: Berlin/Heidelberg, Germany, 2007; pp. 151–165. [Google Scholar]
- Taentzer, G. AGG: A Graph Transformation Environment for Modeling and Validation of Software. In Proceedings of the Applications of Graph Transformations with Industrial Relevance, Charlottesville, VA, USA, 27 September–1 October 2003; Springer: Berlin/Heidelberg, Germany, 2004; pp. 446–453. [Google Scholar]
- Göttmann, H.; Luthmann, L.; Lochau, M.; Schürr, A. Real-Time-Aware Reconfiguration Decisions for Dynamic Software Product Lines. In Proceedings of the 24th ACM Conference on Systems and Software Product Line, Montreal, QC, Canada, 19–23 October 2020; Association for Computing Machinery: New York, NY, USA, 2020. [Google Scholar] [CrossRef]
- Göttmann, H.; Bacher, I.; Gottwald, N.; Lochau, M. Static Analysis Techniques for Efficient Consistency Checking of Real-Time-Aware DSPL Specifications. In Proceedings of the 15th International Working Conference on Variability Modelling of Software-Intensive Systems (VaMoS ’21), Krems, Austria, 9–11 February 2021; Association for Computing Machinery: New York, NY, USA, 2021. [Google Scholar] [CrossRef]
- Zhou, W.; Liu, L.; Lü, S.; Zhang, P. Toward Formal Modeling and Verification of Resource Provisioning as a Service in Cloud. IEEE Access 2019, 7, 26721–26730. [Google Scholar] [CrossRef]
- Aman, B.; Ciobanu, G. Dynamics of reputation in mobile agents systems and weighted timed automata. Inf. Comput. 2022, 282, 104653. [Google Scholar] [CrossRef]
- Alur, R.; Henzinger, T.A.; Vardi, M.Y. Parametric real-time reasoning. In Proceedings of the Twenty-Fifth Annual ACM Symposium on Theory of Computing, San Diego, CA, USA, 16–18 May 1993; pp. 592–601. [Google Scholar]
- Bundala, D.; Ouaknine, J. Advances in Parametric Real-Time Reasoning. In Proceedings of the Mathematical Foundations of Computer Science 2014, Budapest, Hungary, 26–29 August 2014; Springer: Berlin/Heidelberg, Germany, 2014; pp. 123–134. [Google Scholar]
- Cordy, M.; Schobbens, P.Y.; Heymans, P.; Legay, A. Behavioural Modelling and Verification of Real-Time Software Product Lines. In Proceedings of the 16th International Software Product Line Conference, Beijing, China, 16–23 September 2016; Association for Computing Machinery: New York, NY, USA, 2012; Volume 1, pp. 66–75. [Google Scholar] [CrossRef]
- Luthmann, L.; Stephan, A.; Bürdek, J.; Lochau, M. Modeling and Testing Product Lines with Unbounded Parametric Real-Time Constraints. In Proceedings of the 21st International Systems and Software Product Line Conference (SPLC ’17), Sevilla, Spain, 25–29 September 2017; Association for Computing Machinery: New York, NY, USA, 2017; Volume A, pp. 104–113. [Google Scholar] [CrossRef]
- Luthmann, L.; Gerecht, T.; Stephan, A.; Bürdek, J.; Lochau, M. Minimum/maximum delay testing of product lines with unbounded parametric real-time constraints. J. Syst. Softw. 2019, 149, 535–553. [Google Scholar] [CrossRef]
- Bürdek, J.; Lochau, M.; Bauregger, S.; Holzer, A.; von Rhein, A.; Apel, S.; Beyer, D. Facilitating Reuse in Multi-goal Test-Suite Generation for Software Product Lines. In Proceedings of the Fundamental Approaches to Software Engineering, London, UK, 11–18 April 2015; Springer: Berlin/Heidelberg, Germany, 2015; pp. 84–99. [Google Scholar]
- Latreche, F.; Belala, F. RDTA: Recursive and Dynamic Timed Automata for Web Services Composition Analysis. Int. J. Embed.-Real-Time Commun. Syst. (IJERTCS) 2014, 5, 42–67. [Google Scholar] [CrossRef]
- Campana, S.; Spalazzi, L.; Spegni, F. Dynamic Networks of Timed Automata for collaborative systems: A network monitoring case study. In Proceedings of the 2010 International Symposium on Collaborative Technologies and Systems, Chicago, IL, USA, 17–21 May 2010; pp. 113–122. [Google Scholar] [CrossRef]
- Attie, P.C.; Lynch, N.A. Dynamic input/output automata: A formal and compositional model for dynamic systems. Inf. Comput. 2016, 249, 28–75. [Google Scholar] [CrossRef]
- Bettira, R.; Kahloul, L.; Khalgui, M.; Li, Z. Reconfigurable Hierarchical Timed Automata: Modeling and Stochastic Verification. In Proceedings of the 2019 IEEE International Conference on Systems, Man and Cybernetics (SMC), Bari, Italy, 6–9 October 2019; pp. 2364–2371. [Google Scholar]
- Bettira, R.; Kahloul, L.; Khalgui, M. A Novel Approach for Repairing Reconfigurable Hierarchical Timed Automata. In Proceedings of the 15th International Conference on Evaluation of Novel Approaches to Software Engineering (ENASE 2020), Online, 5–6 May 2020; pp. 398–406. [Google Scholar]
- Tigane, S.; Kahloul, L.; Baarir, S.; Bourekkache, S. Dynamic GSPNs: Formal Definition, Transformation towards GSPNs and Formal Verification. In Proceedings of the 13th EAI International Conference on Performance Evaluation Methodologies and Tools (VALUETOOLS ’20), Tsukuba, Japan, 18–20 May 2020; Association for Computing Machinery: New York, NY, USA, 2020; pp. 164–171. [Google Scholar]
Property | Meaning |
---|---|
A<> m1.cfg==0 && m2.cfg==0 && m3.cfg==0 | The job shop can always return to its initial mode |
A<> m1.Idle && m2.Idle && m3.Idle | The job shop can always return to its initial state |
E<> m1.cfg!=0 && m2.cfg!=0 && m3.cfg!=0 | A state in which m, m, and m are either in or is reachable |
m1.Dead –> m1.cfg!=0 | Whenever m reaches location Dead, then it can always change its configuration |
A[] not (m1.cfg==2 && m2.cfg==2 && m3.cfg==2) | A state in which all machines are in at once is never reachable |
E<> m1.cfg==1 && m2.cfg==1 && m3.cfg==1 | A state in which all machines are in at once is reachable |
A[] m1.a<=maxA && m1.b<=maxB && m1.a_<=maxA_ | m never exceeds the production limit |
t1.taken –> t1.free | A tool currently used by a machine will always be free after a while |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2023 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Tigane, S.; Guerrouf, F.; Hamani, N.; Kahloul, L.; Khalgui, M.; Ali, M.A. Dynamic Timed Automata for Reconfigurable System Modeling and Verification. Axioms 2023, 12, 230. https://doi.org/10.3390/axioms12030230
Tigane S, Guerrouf F, Hamani N, Kahloul L, Khalgui M, Ali MA. Dynamic Timed Automata for Reconfigurable System Modeling and Verification. Axioms. 2023; 12(3):230. https://doi.org/10.3390/axioms12030230
Chicago/Turabian StyleTigane, Samir, Fayçal Guerrouf, Nadia Hamani, Laid Kahloul, Mohamed Khalgui, and Masood Ashraf Ali. 2023. "Dynamic Timed Automata for Reconfigurable System Modeling and Verification" Axioms 12, no. 3: 230. https://doi.org/10.3390/axioms12030230
APA StyleTigane, S., Guerrouf, F., Hamani, N., Kahloul, L., Khalgui, M., & Ali, M. A. (2023). Dynamic Timed Automata for Reconfigurable System Modeling and Verification. Axioms, 12(3), 230. https://doi.org/10.3390/axioms12030230