Skip to main content
Log in

Model checking strategy-controlled systems in rewriting logic

  • Published:
Automated Software Engineering Aims and scope Submit manuscript

Abstract

Rewriting logic and its implementation Maude are an expressive framework for the formal specification and verification of software and other kinds of systems. Concurrency is naturally represented by nondeterministic local transformations produced by the application of rewriting rules over algebraic terms in an equational theory. Some aspects of the global behavior of the systems or additional constraints sometimes require restricting this nondeterminism. Rewriting strategies are used as a higher-level and modular resource to cleanly capture these requirements, which can be easily expressed in Maude with an integrated strategy language. However, strategy-aware specifications cannot be verified with the builtin LTL model checker, making strategies less useful and attractive. In this paper, we discuss model checking for strategy-controlled systems, and present a strategy-aware extension of the Maude LTL model checker. The expressivity of the strategy language is discussed in relation to model checking, the model checker is illustrated with multiple application examples, and its performance is compared.

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

Similar content being viewed by others

Availability of data and material

The model checker, the examples introduced in this paper, and the material for the tests in Sect. 9 are available in https://maude.ucm.es/strategies.

Code availability

The source code of the model checker is available at https://github.com/fadoss/maudesmc, and the source code of the examples is available in https://maude.ucm.es/strategies and https://github.com/fadoss/strat-examples.

Notes

  1. Büchi automata are very similar to finite automata for regular languages, but, since infinite words do not end, final states are replaced by acceptance conditions. Unlike finite automata, deterministic Büchi automata are less expressive than their nondeterministic counterpart.

  2. In previous papers (Rubio et al. 2019a), we extended the standard definition with an additional symbol \(\lambda : S^+ \rightarrow {\mathscr {P}}(S) \cup \{\top \}\) to indicate the end of finite executions, but it causes unneeded complications.

  3. In the automata-theoretic approach (see Sect. 2.3), the intersection of the model automaton \(L({\mathscr {K}})\) and the negated property automaton \(L(\lnot \varphi )\) is calculated to decide \({\mathscr {K}} \vDash \varphi\). In this case, the automaton for \(L({\mathscr {K}})\) has trivial Büchi conditions and the intersection algorithm is simpler. However, if \(L({\mathscr {K}})\) is replaced by an \(\ell (E)\) with non-trivial Büchi conditions, a similar intersection algorithm can be applied, although the required space may double (Clarke et al. 2018).

  4. Another rewriting-based operational semantics had been proposed before for the language (Martí-Oliet et al. 2009). However, tracing the rewriting sequence of a term out of the executions of this semantics is more complicated than with the semantics used in this paper.

  5. Maude allows declaring rules with free variables in its righthand side and condition, but they must be marked with the nonexec attribute, and can only be further used at the metalevel after instantiation or for narrowing ((Clavel et al. 2020), § 4.5.3).

  6. Assuming that the Kripke structure has a single initial state instead of finitely many is without loss of generality, since each initial state can be treated separately.

  7. The separation of the modules M and SM in the model specification is a matter of style. In general, we propose specifying the static model representation and the rules in a system module M, and describing how they are controlled in a strategy module SM being a protecting extension of M.

  8. Substates are entirely similar to states except that they are not part of the model, and consequently they are not linked as successors by other (sub)states, but as dependencies, from which successors are copied instead.

  9. The fixed value of 128.8 for the memory usage of Spin in the smaller cases is due to a hash table reserved by the model checker in its default setting, which we have not changed.

References

  • Andrei, O., Lucanu, D.: Strategy-based proof calculus for membrane systems. In: Roşu, G. (ed), Proceedings of the Seventh International Workshop on Rewriting Logic and its Applications, WRLA 2008, Budapest, Hungary, March 29-30, 2008, Elsevier, Electronic Notes in Theoretical Computer Science, vol. 238(3), pp. 23–43 (2009). https://doi.org/10.1016/j.entcs.2009.05.011

  • Andrei, O., Ibanescu, L., Kirchner, H.: Non-intrusive formal methods and strategic rewriting for a chemical application. In: Futatsugi, K., Jouannaud, J., Meseguer, J. (eds), Algebra, Meaning, and Computation, Essays Dedicated to Joseph A. Goguen on the Occasion of His 65th Birthday, Springer, Lecture Notes in Computer Science, vol. 4060, pp. 194–215 (2006). https://doi.org/10.1007/11780274_11

  • Andrei, O., Ciobanu, G., Lucanu, D.: A rewriting logic framework for operational semantics of membrane systems. Theor. Comput. Sci. 373(3), 163–181 (2007). https://doi.org/10.1016/j.tcs.2006.12.016

    Article  MathSciNet  MATH  Google Scholar 

  • Asarin, E., Maler, O., Pnueli, A.: Symbolic controller synthesis for discrete and timed systems. In: Antsaklis, P.J., Kohn, W., Nerode, A., Sastry, S. (eds), Hybrid Systems II, Proceedings of the Third International Workshop on Hybrid Systems, Ithaca, NY, USA, October 1994, Springer, Lecture Notes in Computer Science, vol. 999, pp. 1–20 (1995). https://doi.org/10.1007/3-540-60472-3_1

  • Atzei, N., Bartoletti, M., Lande, S., Yoshida, N., Zunino, R.: Developing secure bitcoin contracts with BitML. In: Dumas, M., Pfahl, D., Apel, S., Russo, A. (eds), Proceedings of the ACM Joint Meeting on European Software Engineering Conference and Symposium on the Foundations of Software Engineering, ESEC/SIGSOFT FSE 2019, Tallinn, Estonia, August 26-30, 2019, ACM, pp 1124–1128 (2019), https://doi.org/10.1145/3338906.3341173

  • Baader, F., Nipkow, T.: Term Rewriting and All That. Cambridge University Press, Cambridge (1998). https://doi.org/10.1017/CBO9781139172752

    Book  MATH  Google Scholar 

  • Balland, E., Brauner, P., Kopetz, R., Moreau, P., Reilles, A.: Tom: Piggybacking rewriting on Java. In: Baader, F. (ed) Term Rewriting and Applications, 18th International Conference, RTA 2007, Paris, France, June 26–28, 2007, Proceedings, Springer, Lecture Notes in Computer Science, vol. 4533, pp. 36–47 (2007).https://doi.org/10.1007/978-3-540-73449-9_5

  • Barendregt, H.: The Lambda Calculus: Its Syntax and Semantics, vol. 131, 2nd edn. North Holland (2014)

  • Borovanský, P., Kirchner, C., Kirchner, H., Ringeissen, C.: Rewriting with strategies in ELAN: a functional semantics. Int. J. Found. Comput. Sci. 12(1), 69–95 (2001). https://doi.org/10.1142/S0129054101000412

    Article  MathSciNet  MATH  Google Scholar 

  • Bouajjani, A., Esparza, J., Maler, O.: Reachability analysis of pushdown automata: Application to model-checking. In: Mazurkiewicz, A.W., Winkowski, J. (eds), CONCUR ’97: Concurrency Theory, 8th International Conference, Warsaw, Poland, July 1-4, 1997, Proceedings, Springer, Lecture Notes in Computer Science, vol. 1243, pp. 135–150 (1997). https://doi.org/10.1007/3-540-63141-0_10

  • Bouhoula, A., Jouannaud, J.P., Meseguer, J.: Specification and proof in membership equational logic. In: Bidoit, M., Dauchet, M. (eds), TAPSOFT’97: Theory and Practice of Software Development, 7th International Joint Conference CAAP/FASE, Lille, France, April 14-18, 1997, Proceedings, Springer, Lecture Notes in Computer Science, vol. 1214, pp. 67–92 (1997). https://doi.org/10.1007/BFb0030589

  • Bourdier, T., Cirstea, H., Dougherty, D.J., Kirchner, H.: Extensional and intensional strategies. In: Fernández, M. (ed) Proceedings Ninth International Workshop on Reduction Strategies in Rewriting and Programming, WRS 2009, Brasilia, Brazil, 28th June 2009, EPTCS, vol. 15, pp. 1–19 (2009). https://doi.org/10.4204/EPTCS.15.1

  • Braga, C., Verdejo, A.: Modular structural operational semantics with strategies. In: van Glabbeek, R., Mosses, P.D. (eds) Proceedings of the Third Workshop on Structural Operational Semantics, SOS 2006, Bonn, Germany, August 26, 2006, Elsevier, Electronic Notes in Theoretical Computer Science, vol. 175(1), pp. 3–17 (2007). https://doi.org/10.1016/j.entcs.2006.10.024

  • Bravenboer, M., Kalleberg, K.T., Vermaas, R., Visser, E.: Stratego/XT 0.17. A language and toolset for program transformation. Science of Computer Programming 72(1–2), 52–70 (2008). https://doi.org/10.1016/j.scico.2007.11.003

    Article  MathSciNet  Google Scholar 

  • Clarke, E.M., Emerson, E.A.: Design and synthesis of synchronization skeletons using branching-time temporal logic. In: Kozen, D. (ed), Logics of Programs, Workshop, Yorktown Heights, New York, USA, May 1981, Springer, Lecture Notes in Computer Science, vol. 131, pp. 52–71 (1981). https://doi.org/10.1007/BFb0025774

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

    MATH  Google Scholar 

  • Clarke, E.M., Henzinger, T.A., Veith, H., Bloem, R. (eds.): : Handbook of Model Checking. Springer (2018). https://doi.org/10.1007/978-3-319-10575-8

  • Clavel, M., Durán, F., Eker, S., Lincoln, P., Martí-Oliet, N., Meseguer, J., Talcott, C.L.: All About Maude...A High-Performance Logical Framework, How to Specify, Program and Verify Systems in Rewriting Logic, Lecture Notes in Computer Science, vol. 4350. Springer (2007). https://doi.org/10.1007/978-3-540-71999-1

  • Clavel, M., Durán, F., Eker, S., Escobar, S., Lincoln, P., Martí-Oliet, N., Meseguer, J., Rubio, R., Talcott, C.: (2020) Maude Manual v3.1. http://maude.lcc.uma.es/maude31-manual-html/maude-manual.html

  • David, A., Jensen, P.G., Larsen, K.G., Mikucionis, M., Taankvist, J.H.: Uppaal Stratego. In: Baier, C., Tinelli, C. (eds), Tools and Algorithms for the Construction and Analysis of Systems, 21st International Conference, TACAS 2015, Held as Part of the European Joint Conferences on Theory and Practice of Software, ETAPS 2015, London, UK, April 11-18, 2015, Proceedings, Springer, Lecture Notes in Computer Science, vol. 9035, pp. 206–211 (2015). https://doi.org/10.1007/978-3-662-46681-0_16

  • Dijkstra, E.W.: On the Role of Scientific Thought, Springer, pp 60–66. Texts and Monographs in Computer Science (1982). https://doi.org/10.1007/978-1-4612-5695-3_12

  • Durán, F., Eker, S., Escobar, S., Martí-Oliet, N., Meseguer, J., Rubio, R., Talcott, C.: Programming and symbolic computation in Maude. J. Logical Algebra. Methods Comput. Program. 110, 1–58 (2020). https://doi.org/10.1016/j.jlamp.2019.100497

    Article  MathSciNet  MATH  Google Scholar 

  • Eker, S., Meseguer, J., Sridharanarayanan, A.: The Maude LTL model checker. In: Gadducci, F., Montanari, U. (eds) Proceedings of the Fourth International Workshop on Rewriting Logic and its Applications, WRLA 2002, Pisa, Italy, September 19–21, 2002. Elsevier, Electronic Notes in Theoretical Computer Science, vol. 71, pp. 162–187 (2004). https://doi.org/10.1016/S1571-0661(05)82534-4

  • Eker, S., Martí-Oliet, N., Meseguer, J., Verdejo, A.: Deduction, strategies, and rewriting. In: Archer, M., de la Tour, T.B., Muñoz, C. (eds) Proceedings of the 6th International Workshop on Strategies in Automated Deduction, STRATEGIES 2006, Seattle, WA, USA, August 16, 2006, Elsevier, Electronic Notes in Theoretical Computer Science, vol. 174(11), pp. 3–25 (2007). https://doi.org/10.1016/j.entcs.2006.03.017

  • Eker, S., Martí-Oliet, N., Meseguer, J., Pita, I., Rubio, R., Verdejo, A.: Strategy language for Maude (2021). https://maude.ucm.es/strategies

  • Ene, N.C., Fernández, M., Pinaud, B.: A strategic graph rewriting model of rational negligence in financial markets. In: Jaiani, G., Natroshvili, D. (eds), Applications of Mathematics and Informatics in Natural Sciences and Engineering, Springer, Springer Proceedings in Mathematics and Statistics, vol. 334, pp. 117–134 (2020). https://doi.org/10.1007/978-3-030-56356-1_8

  • Fernández, M., Varga, J.: Finding candidate keys and 3nf via strategic port graph rewriting. In: PPDP ’20: 22nd International Symposium on Principles and Practice of Declarative Programming, Bologna, Italy, 9–10 September, 2020, ACM, pp. 10:1–10:14 (2020). https://doi.org/10.1145/3414080.3414090

  • Fernández, M., Kirchner, H., Pinaud, B., Vallet, J.: Labelled graph strategic rewriting for social networks. J. Log. Algebra. Methods Program. 96, 12–40 (2018). https://doi.org/10.1016/j.jlamp.2017.12.005

    Article  MathSciNet  MATH  Google Scholar 

  • Fernández, M., Kirchner, H., Pinaud, B.: Strategic port graph rewriting: an interactive modelling framework. Math. Struct. Comput. Sci. 29(5), 615–662 (2019). https://doi.org/10.1017/S0960129518000270

    Article  MathSciNet  MATH  Google Scholar 

  • Finkel, O.: Ambiguity of omega-languages of Turing machines. Logical Methods in Computer Science 10(3), (2014). https://doi.org/10.2168/LMCS-10(3:12)2014

  • Gastin, P., Oddoux, D.: Fast LTL to Büchi automata translation. In: Berry, G., Comon, H., Finkel, A. (eds), Computer Aided Verification, 13th International Conference, CAV 2001, Paris, France, July 18-22, 2001, Proceedings, Springer, Lecture Notes in Computer Science, vol. 2102, pp. 53–65 (2001). https://doi.org/10.1007/3-540-44585-4_6

  • Hidalgo-Herrero, M., Verdejo, A., Ortega-Mallén, Y.: Using Maude and its strategies for defining a framework for analyzing Eden semantics. In: Antoy, S. (ed), Proceedings of the Sixth International Workshop on Reduction Strategies in Rewriting and Programming, WRS 2006, Seattle, WA, USA, August 11, 2006, Elsevier, Electronic Notes in Theoretical Computer Science, vo. 174(10), pp. 119–137 (2007). https://doi.org/10.1016/j.entcs.2007.02.051

  • Hoare, C.A.R.: Communicating Sequential Processes. Prentice-Hall, London (1985)

    MATH  Google Scholar 

  • Holzmann, G., et al.: Spin - Formal verification (2021). https://spinroot.com

  • Holzmann, G.J., Peled, D.A., Yannakakis, M.: On nested depth first search. In: Grégoire, J.C., Holzmann, G.J., Peled, D.A. (eds), The Spin Verification System, Proceedings of a DIMACS Workshop, New Brunswick, New Jersey, USA, August, 1996, DIMACS/AMS, DIMACS Series in Discrete Mathematics and Theoretical Computer Science, vol. 32, pp. 23–31 (1997). https://doi.org/10.1090/dimacs/032/03

  • Kirchner, C., Kirchner, F., Kirchner, H.:) Strategic computation and deduction. In: Benzmüller, C., Brown, C.E., Siekmann, J., Statman, R. (eds), Reasoning in Simple Type Theory. Festchrift in Honour of Peter B. Andrews on His 70th Birthday, Studies in Logic and the Foundations of Mathematics, vol. 17, College Publications, pp. 339–364 (2008). https://hal.inria.fr/inria-00433745

  • Kowalski, R.A.: Algorithm = logic + control. Commun. ACM 22(7), 424–436 (1979). https://doi.org/10.1145/359131.359136

    Article  MATH  Google Scholar 

  • Lamport, L.: “Sometime” is sometimes “not never” - on the temporal logic of programs. In: Abrahams, P.W., Lipton, R.J., Bourne, S.R. (eds), Conference Record of the Seventh Annual ACM Symposium on Principles of Programming Languages, Las Vegas, Nevada, USA, January 1980, ACM Press, pp. 174–185 (1980). https://doi.org/10.1145/567446.567463

  • Lescanne, P.: Implementations of completion by transition rules + control: ORME. In: Kirchner, H., Wechler, W. (eds). Algebraic and Logic Programming, Second International Conference, Nancy, France, October 1-3, 1990, Proceedings, Springer, Lecture Notes in Computer Science, vol. 463, pp. 262–269 (1990). https://doi.org/10.1007/3-540-53162-9_44

  • Löding, C., Tollkötter, A.: Transformation between regular expressions and \(\omega\)-automata. In: Faliszewski, P., Muscholl, A., Niedermeier, R. (eds), 41st International Symposium on Mathematical Foundations of Computer Science, MFCS 2016, August 22-26, 2016 - Kraków, Poland, Schloss Dagstuhl - Leibniz-Zentrum für Informatik, LIPIcs, vol. 58, pp. 88:1–88:13 (2016). https://doi.org/10.4230/LIPIcs.MFCS.2016.88

  • Marin, M., Kutsia, T.: Foundations of the rule-based system \(\rho\)log. J. Appl. Non Class Logics 16(1–2), 151–168 (2006). https://doi.org/10.3166/jancl.16.151-168

    Article  MathSciNet  MATH  Google Scholar 

  • Marin, M., Kutsia, T., Dundua, B.: A rule-based approach to the decidability of safety of abac\(\alpha\). In: Kerschbaum, F., Mashatan, A., Niu, J., Lee, A.J. (eds), Proceedings of the 24th ACM Symposium on Access Control Models and Technologies, SACMAT 2019, Toronto, ON, Canada, June 03–06, 2019, ACM, pp. 173–178 (2019). https://doi.org/10.1145/3322431.3325416, https://dl.acm.org/citation.cfm?id=3322431

  • Martí-Oliet, N., Meseguer, J., Verdejo, A.: Towards a strategy language for Maude. In: Martí-Oliet, N. (ed), Proceedings of the Fifth International Workshop on Rewriting Logic and its Applications, WRLA 2004, Barcelona, Spain, March 27-April 4, 2004, Elsevier, Electronic Notes in Theoretical Computer Science, vol. 117, pp. 417–441 (2004). https://doi.org/10.1016/j.entcs.2004.06.020

  • Martí-Oliet, N., Meseguer, J., Verdejo, A.: A rewriting semantics for Maude strategies. In: Roşu, G. (ed.), Proceedings of the Seventh International Workshop on Rewriting Logic and its Applications, WRLA 2008, Budapest, Hungary, March 29–30, 2008, Elsevier, Electronic Notes in Theoretical Computer Science, vol. 238(3), pp. 227–247 (2009). https://doi.org/10.1016/j.entcs.2009.05.022

  • Meseguer, J.: Conditional rewriting logic as a unified model of concurrency. Theor. Comput. Sci. 96(1), 73–155 (1992). https://doi.org/10.1016/0304-3975(92)90182-F

    Article  MathSciNet  MATH  Google Scholar 

  • Meseguer, J.: Twenty years of rewriting logic. J. Log Algebr. Program. 81(7–8), 721–781 (2012). https://doi.org/10.1016/j.jlap.2012.06.003

    Article  MathSciNet  MATH  Google Scholar 

  • Mogavero, F., Murano, A., Perelli, G., Vardi, M.Y.: Reasoning about strategies: on the model-checking problem. ACM Trans. Comput. Log. 15(4), 34:1-34:47 (2014). https://doi.org/10.1145/2631917

    Article  MathSciNet  MATH  Google Scholar 

  • Nieuwenhuis, R., Oliveras, A., Tinelli, C.: Solving SAT and SAT modulo theories: from an abstract Davis-Putnam-Logemann-Loveland procedure to DPLL(T). J. ACM 53(6), 937–977 (2006). https://doi.org/10.1145/1217856.1217859

    Article  MathSciNet  MATH  Google Scholar 

  • Pearl, J.: Heuristics. Addison-Wesley series in artificial intelligence, Addison-Wesley (1984)

  • Perrin, D., Pin, J.E.: Infinite words, Pure and Applied Mathematics Series, vol. 141. Elsevier Morgan Kaufmann, Burlington (2004). https://doi.org/10.1016/S0079-8169(04)80002-3

    Book  Google Scholar 

  • Pnueli, A.: The temporal logic of programs. In: 18th Annual Symposium on Foundations of Computer Science, Providence, Rhode Island, USA, 31 October - 1 November 1977, IEEE Computer Society, pp. 46–57 (1977). https://doi.org/10.1109/SFCS.1977.32

  • Rosa-Velardo, F., Segura, C., Verdejo, A.: Typed mobile ambients in Maude. In: Cirstea, H., Martí-Oliet, N. (eds), Proceedings of the 6th International Workshop on Rule-Based Programming, RULE 2005, Nara, Japan, April 23, 2005, Elsevier, Electronic Notes in Theoretical Computer Science, vol. 147(1), pp. 135–161 (2006). https://doi.org/10.1016/j.entcs.2005.06.041

  • Rubio, R.: Unified Maude model-checking tool (umaudemc) (2020). https://github.com/fadoss/umaudemc

  • Rubio, R., Martí-Oliet, N., Pita, I., Verdejo, A.: Model checking strategy-controlled rewriting systems. In: Geuvers, H. (ed.), 4th International Conference on Formal Structures for Computation and Deduction, FSCD 2019, June 24-30, 2019, Dortmund, Germany, Schloss Dagstuhl - Leibniz-Zentrum für Informatik, LIPIcs, vol. 131, pp. 34:1–34:18 (2019a). https://doi.org/10.4230/LIPIcs.FSCD.2019.31

  • Rubio, R., Martí-Oliet, N., Pita, I., Verdejo, A.: Parameterized strategies specification in Maude. In: Fiadeiro, J., Ţuţu, I. (eds.), Recent Trends in Algebraic Development Techniques, Springer, Lecture Notes in Computer Science, vol. 11563, pp. 27–44 (2019b). https://doi.org/10.1007/978-3-030-23220-7_2

  • Rubio, R., Martí-Oliet, N., Pita, I., Verdejo, A.: Metalevel transformation of strategies. J. Logical Algebra. Methods Comput. Program. 124, pp. 1–21 (2021a). https://doi.org/10.1016/j.jlamp.2021.100728

  • Rubio, R., Martí-Oliet, N., Pita, I., Verdejo, A.: Simulating and model checking membrane systems using strategies in Maude. J. Logical Algebra. Methods Comput. Program. 124, pp. 1–25 (2021b). https://doi.org/10.1016/j.jlamp.2021.100727

  • Rubio, R., Martí-Oliet, N., Pita, I., Verdejo, A.: Strategies, model checking and branching-time properties in Maude. J. Logical Algebra. Methods Comput. Program. 123, pp. 1–28 (2021c). https://doi.org/10.1016/j.jlamp.2021.100700

  • Santos-García, G., Palomino, M.: Solving Sudoku puzzles with rewriting rules. In: Denker, G., Talcott, C. (eds.), Proceedings of the 6th International Workshop on Rewriting Logic and its Applications, WRLA 2006, Vienna, Austria, April 1-2, 2006, Elsevier, Electronic Notes in Theoretical Computer Science, vol. 176, pp. 79–93 (2007). https://doi.org/10.1016/j.entcs.2007.06.009

  • Santos-García, G., Palomino, M., Verdejo, A.: Rewriting logic using strategies for neural networks: An implementation in Maude. In: Corchado, J.M., Rodríguez, S., Llinas, J., Molina, J.M. (eds.), International Symposium on Distributed Computing and Artificial Intelligence, DCAI 2008, University of Salamanca, Spain, 22th-24th October 2008, Springer, Advances in Soft Computing, vol. 50, pp. 424–433 (2009). https://doi.org/10.1007/978-3-540-85863-8_50

  • Somenzi, F., Bloem, R.: Efficient Büchi automata from LTL formulae. In: Emerson, E.A., Sistla, A.P. (eds.), Computer Aided Verification, 12th International Conference, CAV 2000, Chicago, IL, USA, July 15-19, 2000, Proceedings, Springer, Lecture Notes in Computer Science, vol. 1855, pp. 248–263 (2000). https://doi.org/10.1007/10722167_21

  • Staiger, L.: \(\omega\)-languages. In: Rozenberg, G., Salomaa, A. (eds.) Handbook of Formal Languages, 339th edn., p. 387. Springer, Berlin (1997). https://doi.org/10.1007/978-3-642-59126-6_6

    Chapter  Google Scholar 

  • Straffin, P.D.: Game Theory and Strategy, Anneli Lax New Mathematical Library, vol. 36. American Mathematical Society (1993)

  • Tanenbaum, A.S., Bos, H.: Modern operating systems, 4th edn. Pearson, New York (2018)

    Google Scholar 

  • Tarjan, R.E.: Depth-first search and linear graph algorithms. SIAM J. Comput. 1(2), 146–160 (1972). https://doi.org/10.1137/0201010

    Article  MathSciNet  MATH  Google Scholar 

  • Terese: Term Rewriting Systems. Cambridge University Press, Cambridge (2003)

  • Verdejo, A., Martí-Oliet, N.: Basic completion strategies as another application of the Maude strategy language. In: Escobar, S. (ed.), Proceedings 10th International Workshop on Reduction Strategies in Rewriting and Programming, WRS 2011, Novi Sad, Serbia, 29 May 2011, EPTCS, vol. 82, pp. 17–36 (2011). https://doi.org/10.4204/EPTCS.82.2

Download references

Funding

This work was partially supported by the Spanish Ministry of Science and Innovation (PID2019-108528RB-C22). Rubén Rubio is partially supported by the Spanish Ministry of Universities (FPU17/02319).

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Rubén Rubio.

Ethics declarations

Conflicts of interest

The authors declare that there is no conflict of interest.

Additional information

Publisher's Note

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

Proofs

Proofs

Proposition 1

Given \(E \subseteq S^\omega\), there is a finite Kripke structure \({\mathscr {K}}'\) such that \(\ell (\varGamma ^\omega _{{\mathscr {K}}'}) = \ell (E)\) iff \(\ell (E)\) is closed and \(\omega\)-regular.

Proof

Notice that the finite Kripke structure \({\mathscr {K}}'\) can act as Büchi automaton and vice versa. Given a Kripke structure \((S, \rightarrow , I, AP, \ell )\), the automaton \((S \cup \{\iota \}, {\mathscr {P}}(AP), \delta , \iota , S \cup \{\iota \})\) with \(\delta (\iota , P) = \{ s \in I : \ell (s) = P \}\) and \(\delta (s, P) = \{ s' \in S : \ell (s') = P \;\wedge \; s \rightarrow s' \}\) is considered; and given an automaton \((Q, {\mathscr {P}}(AP), \delta , q_0, F)\), we consider the Kripke structure \((Q \times {\mathscr {P}}(AP), \rightarrow , \{ (s, \ell (s)) : s_0 \rightarrow s, s_0 \in I \}, AP, \pi _2)\) with \((s, P) \rightarrow (s', P')\) if \(s \rightarrow s'\) and \(\ell (s') = P'\). Checking that their word and execution coincides is straightforward, taking into account that E is closed and so F is irrelevant. \(\square\)

Proposition 2

The projection of the infinite traces of \({\mathscr {M}}_{\alpha , t}\) by \(\pi _1 \circ \mathrm {cterm}\) coincides with the stuttering-extension of \(E(\alpha , t)\).

Proof

Remember that \({\mathscr {M}}_{\alpha , t}\) is defined as \((\mathscr {X\!S}\times \{0\} \cup \mathrm {Sol}\times \{1\}, \twoheadrightarrow _\mathrm {Sol})\) where \((q, 0) \twoheadrightarrow _\mathrm {Sol}(q', 0)\) if \(q \twoheadrightarrow q'\) and \((q, k) \twoheadrightarrow _\mathrm {Sol}(q, 1)\) if \(q \in \mathrm {Sol}\) for \(k=0,1\). Consequently, all infinite traces of \({\mathscr {O}}\) are infinite traces of \({\mathscr {M}}_{\alpha , t}\) (with a zero in the second component), but these are exactly \(\mathrm {Ex}^\omega (\alpha , t)\) by definition. The finite traces \(q_1 \cdots q_n\) in \({\mathscr {O}}\) are finite traces \((q_1, 0) \cdots (q_n, 0)\) in \({\mathscr {M}}_{\alpha , t}\), but if and only if \(q_n \in \mathrm {Sol}\) they can be extended to the infinite traces \((q_1, 0) \cdots (q_n, 0) (q_n, 1) \cdots\). These are the traces in \(\mathrm {Ex}^*(\alpha , t)\), whose stuttering-extended projections in \(E(\alpha , t)\) are precisely \(\mathrm {cterm}(q_1) \cdots \mathrm {cterm}(q_n) \, \mathrm {cterm}(q_n) \cdots\), the projection of the extended executions ending in a halting state. Thus, \(\mathrm {cterm}(\pi _1(\varGamma ^\omega _{{\mathscr {M}}_{\alpha , t}}))\) is the stuttering-extension of \(E(\alpha , t)\), where \(\pi _1(x, y) = x\). \(\square\)

Lemma 1

If the underlying equational theory is decidable and the reachable states from \(t \,\hbox {@}\,\alpha\) are finitely many, \(\twoheadrightarrow\) and \(\rightarrow _{s,c}\) are decidable.

Proof

All the rules defining \(\rightarrow _c\) and \(\rightarrow _s\) but [else] are decidable, since they only involve immediate term manipulations, matching, substitution application, etc. The [else] rule is decidable on an execution state \(t \,\hbox {@}\,{ \,\beta \, \texttt {?} \,\gamma \, \texttt {:} \,\zeta }s\) if the reachable states from \(t \,\hbox {@}\,\beta \, \mathrm {vctx}(s)\) are finitely many. However, these are already embedded in the states reachable from the conditional, since \(t \,\hbox {@}\,{ \,\beta \, \texttt {?} \,\gamma \, \texttt {:} \,\zeta }s \rightarrow _c t \,\hbox {@}\,\beta \gamma s\) and all the successors of \(t \,\hbox {@}\,\beta \, \mathrm {vctx}(s)\) are successors of \(t \,\hbox {@}\,\beta \gamma s\) with \(\mathrm {vctx}(s)\) replaced by \(\gamma s\), since the same rules can be applied with their free variables s changed like this. In case of nested conditionals, this argument can be repeated from inside out conditional expressions, so all these states are reachable from the initial \(t \,\hbox {@}\,\alpha\), and so they are finitely many and the rule is decidable. Since the reachable states are a finite set, deciding \(q \twoheadrightarrow q'\) is finding a path via \(\rightarrow _c\) transitions from q to any predecessor of \(q'\) by a \(\rightarrow _s\) transition, so it is decidable. \(\square\)

Proposition 3

For any \(\infty\)-recursively enumerable language \(L \subseteq \varGamma _{{\mathscr {M}}}\), there is some strategy expression \(\alpha\) such that \(E(\alpha ) = L\).

Proof

The finite-word part \(L_*\) and the infinite-word part \(L_\omega\) of L can be considered separately. In effect, if there is a strategy expression \(\alpha\) such that \(E(\alpha ) = L_*\) and a strategy expression \(\beta\) such that \(E(\beta ) = L_\omega\), then \(E(\alpha { \texttt {|}}\beta ) = E(\alpha ) \cup E(\beta ) = L_* \cup L_\omega = L\).

Let us start with the finite-word part \(L_*\). Since it is recursively enumerable, there must be a Turing machine \(M = (Q, \varGamma , T_\varSigma , q_0, F, \delta )\) such that \(L_* = L(M)\). Turing machines can easily be represented in Maude, but for the sake of brevity we will see them as terms with two defined operators: accept that evaluates to true if the word in its tape is accepted, and append that puts a symbol on its tape. A generic specification including these functions is available at (Eker et al. 2021). The strategy that admits exactly \(L_*\) is defined as a recursive expression that carries a Turing machine as an argument and fills the tape with the visited terms while rewriting. At some point, it runs the Turing machine to decide if the accumulated word is accepted and can be yielded as a solution of the strategy.

figure bl

The initial strategy call is climb(M0, 0) where M0 is in its initial state with an empty tape. Observe that this nonterminating strategy climb fixes in advance the length of the executions to be recognized by run. This is a technical detail to avoid admitting infinite executions that are accumulation points of the finite words in the language. We claim that run(M0, n) admits all words in \(L_*\) of length n. In effect, the contents of the tape of M is the sequence of terms visited until but not including the current subject term S. If the second argument is positive, the current state is appended to the tape by append(M, S), a new rewrite step is performed, hence maintaining the invariant in the previous phrase, and run is called with \(n-1\). If the counter is zero, the Turing machine M is executed by accept(M’) after appending the last state S, which only evaluates to true if the word or execution in its tape is in \(L_*\), and only in this case the strategy yields a solution. Finally, the strategy climb clearly admits the union of all executions allowed by run(M, n) for all \(n \in {\mathbb {N}}\), which are all the bounded subsets of \(L_*\), so it admits \(L_*\). Moreover, it does not admit any other word since the infinite \(\rightarrow _{s,c}\)-execution repeating

$$\begin{aligned} t \,\hbox {@}\,\texttt {climb(M}, n\texttt {)} \rightarrow _c t \,\hbox {@}\,(\texttt {run(M}, n\texttt {) | climb(M}, n+1\texttt {)}) \rightarrow _c t \,\hbox {@}\,\texttt {climb(M,} n+1\texttt {)} \end{aligned}$$

does not contain a single system transition or \(\twoheadrightarrow\) step. Naively, we could have defined the strategy as simply

figure bm

However, while representing the language \(L_* = \{t\}^*\) for some term t, the infinite repetition of t will be inevitably allowed because of the execution that always takes the second branch.

The case of \(\omega\)-languages is more complicated, but the proof is similar. We assume that the language \(L_\omega\) is represented by a nondeterministic Turing machine with Büchi conditions and type 2 semantics (Finkel 2014). They are defined as tuples \(M = (Q, \varSigma , \varGamma , \delta , F, q_0)\) where Q is a finite set of states, \(\varSigma\) is a finite input alphabet (in our case, a subset of \(T_\varSigma\)), \(\varGamma\) is a finite tape alphabet with \(\varSigma \subseteq \varGamma\), F is a set of states to define the Büchi condition, \(q_0 \in Q\) is the initial state, and \(\delta : Q \times \varGamma \rightarrow {\mathscr {P}}(Q \times \varGamma \times \{L, R, S\})\) is the nondeterministic transition function. A run of M for a word w is an infinite sequence of configurations \(r = (q_i, w_i, j_i)^\infty _{i=1}\) with \(r_1 = (q_0, w, 0)\) and \(r_{k+1} = (q_{k+1}, w_k[j_k/s], j_k + m)\) if \((q_{k+1}, s, m) \in \delta (q_k, (w_k)_{j_k})\) where m is \(-1\) for L, 1 for R, and 0 for S. A run is complete if every position of the tape is eventually visited. A word is accepted if there is a run such that \(q_i \in F\) infinitely often.

figure bn

The climb definition is identical to the finite case, but now it fixes the next configuration where a final state of the Turing machine must be found, and it is called repeatedly to ensure that those are visited infinitely often. Since executing the Turing machine after writing an infinite word into the tape is not possible, we advance it while running the strategy and fill the tape lazily when required. When the machine moves right to a blank position, this is revealed by the needsInput predicate, a rewrite step is executed, and the new term is put in place of the blank before it can be read. Each step of the Turing machine consumes the counter and when it bumps into zero, the current state of the Turing machine is checked to be final. If it is not, the execution is discarded. Otherwise, a new call to climb ensures that a final state will be visited again.

Let \(\alpha\) be climb(M0, 0). First, \(E(\alpha ) \subseteq L(M)\). If \(w \in E(\alpha )\), by definition of \(E(\alpha )\) and \(\twoheadrightarrow\), there must be some \((q_n)_{k=0}^\infty \in \mathscr {X\!S}^\omega\) and \((n_k)_{k=0}^\infty \in {\mathbb {N}}^\omega\) such that \(q_n \rightarrow _{s,c} q_{n+1}\), \(q_{n_k} \twoheadrightarrow q_{n_{k+1}}\) and \(\mathrm {cterm}(q_{n_k}) = w_k\). The only rule application in the strategies involved is the all in the positive branch of the conditional of the second run definition. Hence, this branch must have been executed infinitely many times, and so the machine must have moved its head infinitely many times to positions of the tape that need input. The machine is moved only in the negative branch of the same definition by a strategy-call \(\rightarrow _c\) transition, so let \((m_k)_{k=0}^\infty\) be the indices of the states followed by these transitions. Taking the argument M of these calls, a run \((c_k)_{k=0}^\infty\) of the Turing machine can be constructed. In effect, \(c_k \vdash c_{k+1}\) by the meaning of step, the run is complete since it visits infinitely many positions of the tape, and so the entire tape since it moves only one cell at a time, and the contents of the tape is the word w since this is what put inserts each time a rule is executed. Moreover, the Büchi condition is satisfied because of the climb strategy: at any configuration \(c_k\), the number of steps until a new final state is reached can be read from the second argument of the run call. In conclusion, \((c_k)_{k=0}^\infty\) is an accepting run of the machine, and so \((w_k)_{k=0}^\infty \in L(M)\).

To prove the converse \(L(M) \subseteq E(\alpha )\), let \((c_k)_{k=0}^\infty\) be a complete and accepting run of the Turing machine for some word \(w \in L_\omega\). Since it is accepting, it must visit infinitely many final states, and there exists \((n_k)_{k=0}^\infty\) with \(n_k \ge 1\) such that \(c_{n_k}\) is in a final state. Moreover, since the run is complete, all the positions of the tape must be visited, so there is a \((m_k)_{k=0}^\infty\) such that the machine visits the position k for the first time in \(c_{m_k}\). With these ingredients, we can construct a nonterminating derivation of the operational semantics: starting at \(q_0 = t_0 \,\hbox {@}\,\alpha\), climb calls run with \(n_0\), and then the execution of run is deterministic until N reaches zero except for all and the selection of the move of the nondeterministic machine. Each time the second branch of the conditional has to be executed, we choose the next machine configuration \(c_k\) in the run in the matchrew. Similarly, when the first branch is executed, the result of all is chosen to match the value of the current cell in \(c_k\) and this is always possible since \((w_k)_{k=0}^\infty\) is a valid rewriting path of the uncontrolled system. When the counter descends to zero, the test in the run definition is satisfied, since the configuration is some final \(c_{n_k}\), and the new run argument generated by climb is chosen to be \(n_k - n_{k+1}\), and this procedure is repeated forever. The resulting \(\rightarrow _{s,c}\) derivation contains infinitely many \(\rightarrow _s\) transitions as a consequence of the completeness of the machine run, and so a \(\twoheadrightarrow\) derivation can be extracted whose projection is the expected word w since the all outputs have been chosen to match it. Therefore, \(w \in E(\alpha )\). \(\square\)

Proposition 4

If the reachable states from \(t \,\hbox {@}\,\alpha\) are finitely many, \(E(\alpha , t)\) is a closed \(\infty\)-regular language.

Proof

The Büchi automaton for \(E(\alpha , t)\) is \(A = (Q, \mathrm {cterm}(Q), \delta , \{\textit{start}\}, Q)\) where \(Q = \{\textit{start}\} \cup \{ q \in \mathscr {X\!S}\mid t \,\hbox {@}\,\alpha \twoheadrightarrow ^* q \} \cup \{ t' \,\hbox {@}\,\varepsilon : t \,\hbox {@}\,\alpha \rightarrow _{s,c}^* t' \,\hbox {@}\,\varepsilon \}\) and

$$\begin{aligned} \delta (\textit{start}, t)&= \{\; t \,\hbox {@}\,\alpha \;\}& \\ \delta (\textit{start}, t')&= \emptyset&\text {if } t' \neq t \\ \delta (q, t')&= \{\; q' : q \twoheadrightarrow q' \;\wedge \; \mathrm {cterm}(q') = t' \;\}&\text {for } q \in Q \,\backslash \, \{\textit{start}\} \\&\quad \cup \{\; t' \,\hbox {@}\,\varepsilon : \text {if } q \rightarrow _c^* t' \,\hbox {@}\,\varepsilon \;\} \end{aligned}$$

The identity \(L(A) = E(\alpha , t)\) follows from the fact that runs \(\pi\) in A yield executions \(\mathrm {cterm}(\pi )\) in \(E(\alpha , t)\) and vice versa. Proving this is straightforward, on account of the definitions of A and \(E(\alpha , t)\). The proof for finite words is identical. \(\square\)

Lemma 2

Given two terms \(t,t' \in T_\varSigma\) such that \(t \rightarrow ^1_R t'\), there is a strategy expression \(\alpha _{t,t'}\) of the form \(\texttt {matchrew} \; P \; \texttt {by} \; x \; \texttt {using} \; rl[\rho ]\{{\mathbf{\beta }}\} \; \texttt{;} \; \texttt{match} \; t'\) such that \(t \,\hbox {@}\,\alpha _{t,t'} \rightarrow _{s,c}^* u \,\hbox {@}\,\varepsilon\) iff \(t' = u\) and there are finitely many reachable states from \(\alpha _{t,t'}\).

Proof

Notice that the much simpler strategy all ; match \(t'\) also satisfies the first requirement, but not necessarily the second since the rewriting condition may have infinitely many solutions. If \(t \rightarrow ^1_R t'\), there must exist a (perhaps conditional) rule \(\textit{rl} : l \rightarrow r \; \mathrm {if}\; C\), a substitution \(\sigma\), and a position p in t such that \(t|_p = \sigma (l)\), \(t' = t[p/\sigma (r)]\) and \(\sigma (C)\) holds. Proceeding by induction on the number of rewriting conditions required to prove a step, we first suppose that C does not contain rewriting condition fragments. If \(x_1, \ldots , x_n\) are the variables that occur in l and C, and x is a fresh variable, the desired \(\alpha\) is then

$$\begin{aligned} \texttt {matchrew} \; t[p\,/\,x] \; \texttt {by} \; x \; \texttt {using} \; \textit{rl}\,[x_1 \leftarrow \sigma (x_1), \ldots , x_n \leftarrow \sigma (x_n)] \; \texttt{;} \; \texttt{match} \; t' \end{aligned}$$

This strategy forces the \(\textit{rl}\) rule application to the specific position p, with the specific substitution \(\sigma\). The only possible execution is

$$\begin{aligned} t \,\hbox {@}\,\alpha _{t,t'}&\rightarrow _c \mathrm {subterm}(x : t|_p \,\hbox {@}\,\textit{rl}\,[x_k \leftarrow \sigma (x_k)]_{k=1}^n; t[p\,/\,x]) \,\hbox {@}\;\texttt{match} \; t' \\&\rightarrow _s \mathrm {subterm}(x : \sigma (r) \,\hbox {@}\,\varepsilon ; t[p\,/\,x]) \,\hbox {@}\;\texttt{match} \; t' \rightarrow _c^* t' \,\hbox {@}\, \varepsilon \end{aligned}$$

If C contains rewriting conditions, we have to indicate strategies for these. Since \(t \rightarrow ^1_R t'\), for each rewriting condition \(l' \;\mathtt{=>}\;r'\), a sequence \(t_1 t_2 \cdots t_n\) must exist with \(\sigma (l') = t_1\), \(\sigma (r') = t_n\) and \(t_k \rightarrow ^1_R t_{k+1}\). Some of these steps may apply rules with rewriting conditions, but we are one level less, so the existence of \(\alpha _{t_k, t_{k+1}}\) can be assumed. Joining all the transitions with the concatenation operator of strategies, a strategy is built to solve one of the rewriting conditions. The same can be done for the other rewriting fragments, so the lemma holds. \(\square\)

Proposition 5

If L is a closed \(\infty\)-regular language, there is a strategy expression \(\beta\) such that \(E(\beta ) = L\) and the reachable states from \(t \,\hbox {@}\,\beta\) are finitely many for all \(t \in T_\varSigma\).

Proof

The proofs for the finite and the infinite cases are similar, so only the infinite case is considered. Approximately, the strategy expression \(\beta\) will be the translation of the \(\omega\)-regular expression for the language L. Since L is \(\omega\)-regular, there must be a Büchi automaton \(A = (Q, S, \delta , Q_0, F)\) for L. However, the symbols of the alphabet are states and our language is based on rules, so we have to translate it. The translation \(B = (S \times Q, RA, \varDelta , B_0, S \times F)\) is defined using the strategies of Lemma 2, \(RA = \{ \alpha _{t,t'} \mid t, t' \in S \}\) with \(\varDelta ((t, q), \alpha ) = \{\; (t', q') \mid t \,\hbox {@}\,\alpha \rightarrow _{s,c}^* t' \,\hbox {@}\,\varepsilon , \; q' \in \delta (q, t') \;\}\) and \(B_0 = \{\; (w_0, q) \mid w \in L, \; q \in \delta (q_0, t), \; q_0 \in Q_0 \;\}\). It is easy to prove that \(\alpha _{t, t'}\) satisfies the definition of \(\varDelta\) for any pair of terms and that \(L = \{ v \in T_\varSigma ^\omega \mid v_k \,\hbox {@}\,w_k \rightarrow _{s,c}^* v_{k+1} \,\hbox {@}\,\varepsilon \text { for all } k \in {\mathbb {N}}, w \in L(B)\}\).

Since L(B) is \(\omega\)-regular, it can be expressed as an \(\omega\)-regular expression (Löding and Tollkötter 2016), which always have the form \(r_1 s_1^\omega + \ldots r_n s_n^\omega\) for \(r_i, s_i\) regular expressions and \(\varepsilon \not \in L(s_i)\). The conversion from regular expressions to strategy expressions is almost an identity. \(\emptyset\) is translated as \({ \texttt {fail}}\), \(\varepsilon\) as \({ \texttt {idle}}\), alternation, concatenation, and iterations are the same in both languages. For each \(s_i\), to represent \(s_i^\omega\), we define a named strategy with label \(f_i\) without argument and defined as \(T(s_i) { \texttt {;}}f_i\) if T is the translation function.

Inductively, we will prove that any successful execution \(t \,\hbox {@}\,T(r)\) for any regular or \(\omega\)-regular expression r sequentially executes all strategies in a word \(w \in L(r)\), and that all words in L(r) can be successfully executed for some initial term. This implies, from what we have proved above, that the traces for T(r) are exactly L as we want to prove. Splitting the execution in RA atoms is always possible, since they are the only rule applications in the sequence enclosed by matchrew opening and closing transitions, with possibly some control steps between these atoms. The proof is by induction on the structure of regular and \(\omega\)-regular expressions. However, we should take care that the semantics of the iteration is different from that of the Kleene star, since the iteration body could be repeated indefinitely. Since \(E(\alpha , t)\) is closed, this infinite execution will be already included, so it makes no difference.

Finally, and since the strategy satisfies the conditions of the second statement of Proposition 6, the reachable states are finite. \(\square\)

Proposition 6

The reachable states from \(t \,\hbox {@}\,\alpha\) are finitely many if any of the following conditions holds:

  1. 1.

    \(\alpha\) does not contain iterations or recursive calls.

  2. 2.

    The reachable terms from \(t \,\hbox {@}\,\alpha\) are finitely many and all recursive calls in \(\alpha\) and the reachable strategy definitions are tail.

Proof

The first statement can be proved by induction on the execution states ranked by the lexicographic combination of the number of strategy constructors in their stacks, the number of execution state constructors, and the number of condition fragments in \(\mathrm {rewc}\) states. Looking at the rules, each possible execution state has a finite number of successors by the \(\rightarrow _{s,c}\) relation, and the induction hypothesis can be applied for all but iterations and calls. In case no recursive strategies are called, reachable states can be proved finite by induction on the finite and acyclic static call graph.

For the second statement, we know that the number of terms that can appear either as subject or as strategy call arguments in execution states is finite, so iteration and tail-recursive calls can be handled. The body \(\alpha\) of an iteration \(\alpha \texttt {*}\) cannot contain recursive strategy calls, because it would not be tail calls. Inductively on the number of nested iterations, there are finitely many reachable states from \(t \,\hbox {@}\,\alpha \texttt {*} \, s\) in addition to those from the reachable \(t' \,\hbox {@}\,s\) states at the end of the iteration. Assuming there are no iterations in \(\alpha\), the only successors of that state are \(t \,\hbox {@}\,\alpha \, \alpha \texttt {*} \, s\) and \(t \,\hbox {@}\,s\). The reachable states from \(t \,\hbox {@}\,\alpha \, \alpha \texttt {*} \, s\) are those reachable from \(t \,\hbox {@}\,\alpha \, \mathrm {vctx}(s)\) with \(\mathrm {vctx}(s)\) replaced by \(\alpha \texttt {*} \, s\), and those reachable from \(t' \,\hbox {@}\,\alpha \texttt {*} \, s\) for each solution yield by \(t \,\hbox {@}\,\alpha \, \mathrm {vctx}(s)\). The first are finitely many by the first statement, and the second case is the same we are proving now regardless of the particular t or \(t'\), which are finitely many. Hence, the reachable states before s are finitely many, and the same can be proven if \(\alpha\) contains iterations by continuing the induction.

Consider now an execution state \(t \,\hbox {@}\,\textit{sl}\,(t_1, \ldots , t_n) \, \sigma \, s\) where \(\textit{sl}\) is a recursive strategy. Its successors are \(t \,\hbox {@}\,\delta \, \sigma ' \, s\) for some definition \(\delta\) and substitution \(\sigma '\). If the expression \(\delta\) does not contain recursive strategies, finitely many states are reachable from \(t \,\hbox {@}\,\delta \, \sigma '\). Otherwise, all recursive calls are tail and this yields finitely many states plus some \(t_k \,\hbox {@}\,\textit{sl}_k(t_{k,1}, \ldots , t_{k,n_k}) \, \sigma ' \, s\) and their successors. More precisely, it should be proved that our syntactical definition of tail call ensures this, but it is a straightforward inductive check. Since the possible \(t_k\), \(t_{k, l}\), and \(\textit{sl}_k\) are finitely many, the successors of initial state before reducing s are finitely many, and combining all the results the whole reachable states are a finite set. \(\square\)

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Rubio, R., Martí-Oliet, N., Pita, I. et al. Model checking strategy-controlled systems in rewriting logic. Autom Softw Eng 29, 7 (2022). https://doi.org/10.1007/s10515-021-00307-9

Download citation

  • Received:

  • Accepted:

  • Published:

  • DOI: https://doi.org/10.1007/s10515-021-00307-9

Keywords

Navigation