The Maude strategy language (2402.00275v1)
Abstract: Rewriting logic is a natural and expressive framework for the specification of concurrent systems and logics. The Maude specification language provides an implementation of this formalism that allows executing, verifying, and analyzing the represented systems. These specifications declare their objects by means of terms and equations, and provide rewriting rules to represent potentially non-deterministic local transformations on the state. Sometimes a controlled application of these rules is required to reduce non-determinism, to capture global, goal-oriented or efficiency concerns, or to select specific executions for their analysis. That is what we call a strategy. In order to express them, respecting the separation of concerns principle, a Maude strategy language was proposed and developed. The first implementation of the strategy language was done in Maude itself using its reflective features. After ample experimentation, some more features have been added and, for greater efficiency, the strategy language has been implemented in C++ as an integral part of the Maude system. This paper describes the Maude strategy language along with its semantics, its implementation decisions, and several application examples from various fields.
- Samson Abramsky. 1994. Domain theory. Vol. 3. Clarendon Press, 1–168.
- Safety enforcement via programmable strategies in Maude. J. Log. Algebraic Methods Program. 132 (2023), 100849. https://doi.org/10.1016/j.jlamp.2023.100849
- Oana Andrei and Dorel Lucanu. 2009. Strategy-Based Proof Calculus for Membrane Systems. In Proceedings of the Seventh International Workshop on Rewriting Logic and its Applications, WRLA 2008, Budapest, Hungary, March 29-30, 2008 (Electronic Notes in Theoretical Computer Science, Vol. 238(3)), Grigore Roşu (Ed.). Elsevier, 23–43. https://doi.org/10.1016/j.entcs.2009.05.011
- Franz Baader and Tobias Nipkow. 1998. Term Rewriting and All That. Cambridge University Press. https://doi.org/10.1017/CBO9781139172752
- Leo Bachmair and Nachum Dershowitz. 1994. Equational Inference, Canonical Proofs, and Proof Orderings. J. ACM 41, 2 (1994), 236–276. https://doi.org/10.1145/174652.174655
- Tom: Piggybacking Rewriting on Java. In Term Rewriting and Applications, 18th International Conference, RTA 2007, Paris, France, June 26-28, 2007, Proceedings (Lecture Notes in Computer Science, Vol. 4533), Franz Baader (Ed.). Springer, 36–47. https://doi.org/10.1007/978-3-540-73449-9_5
- H.P. Barendregt. 2014. The Lambda Calculus: Its Syntax and Semantics (2 ed.). Studies in Logic and the Foundations of Mathematics, Vol. 131. North Holland.
- Rewriting with Strategies in ELAN: A Functional Semantics. Int. J. Found. Comput. Sci. 12, 1 (2001), 69–95. https://doi.org/10.1142/S0129054101000412
- Specification and Proof in Membership Equational Logic. In TAPSOFT’97: Theory and Practice of Software Development, 7th International Joint Conference CAAP/FASE, Lille, France, April 14-18, 1997, Proceedings (Lecture Notes in Computer Science, Vol. 1214), Michel Bidoit and Max Dauchet (Eds.). Springer, 67–92. https://doi.org/10.1007/BFb0030589
- Extensional and Intensional Strategies. In Proceedings Ninth International Workshop on Reduction Strategies in Rewriting and Programming, WRS 2009, Brasilia, Brazil, 28th June 2009 (Electronic Proceedings in Theoretical Computer Science, Vol. 15), Maribel Fernández (Ed.). 1–19. https://doi.org/10.4204/EPTCS.15.1
- Christiano Braga and Alberto Verdejo. 2007. Modular Structural Operational Semantics with Strategies. In Proceedings of the Third Workshop on Structural Operational Semantics, SOS 2006, Bonn, Germany, August 26, 2006 (Electronic Notes in Theoretical Computer Science, Vol. 175(1)), Rob van Glabbeek and Peter D. Mosses (Eds.). Elsevier, 3–17. https://doi.org/10.1016/j.entcs.2006.10.024
- Stratego/XT 0.17. A language and toolset for program transformation. Sci. Comput. Program. 72, 1-2 (2008), 52–70. https://doi.org/10.1016/j.scico.2007.11.003
- Faithful (meta-)encodings of programmable strategies into term rewriting systems. Log. Methods Comput. Sci. 13, 4 (2017).
- Manuel Clavel. 2003. Strategies and user interfaces in Maude at work. In Proceedings of the 3rd International Workshop on Reduction Strategies in Rewriting and Programming, WRS 2003, Valencia, Spain, June 8, 2003 (Electronic Notes in Theoretical Computer Science, Vol. 86(4)), Bernhard Gramlich and Salvador Lucas (Eds.). Elsevier, 570–592. https://doi.org/10.1016/S1571-0661(05)82612-X
- Maude Manual v3.3.1. https://maude.lcc.uma.es/maude-manual
- 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. https://doi.org/10.1007/978-3-540-71999-1
- Manuel Clavel and José Meseguer. 1996. Reflection and Strategies in Rewriting Logic. In Proceedings of the First International Workshop on Rewriting Logic and its Applications, WRLA’96, Asilomar, California, September 3-6, 1996 (Electronic Notes in Theoretical Computer Science, Vol. 4), José Meseguer (Ed.). Elsevier, 126–148. https://doi.org/10.1016/S1571-0661(04)00037-4
- Manuel Clavel and José Meseguer. 1997. Internal Strategies in a Reflective Logic. In Proceedings of the CADE-14 Workshop on Strategies in Automated Deduction, Bernhard Gramlich and Hélène Kirchner (Eds.). Townsville, Australia, 1–12.
- Programming and Symbolic Computation in Maude. J. Log. Algebraic Methods Program. 110 (2020), 58 pages. https://doi.org/10.1016/j.jlamp.2019.100497
- Francisco Durán and José Meseguer. 2012. On the Church-Rosser and coherence properties of conditional order-sorted rewrite theories. J. Log. Algebraic Methods Program. 81, 7-8 (2012), 816–850. https://doi.org/10.1016/j.jlap.2011.12.004
- Towards a Maude Formal Environment. In Formal Modeling: Actors, Open Systems, Biological Systems - Essays Dedicated to Carolyn Talcott on the Occasion of Her 70th Birthday (Lecture Notes in Computer Science, Vol. 7000), Gul Agha, Olivier Danvy, and José Meseguer (Eds.). Springer, 329–351. https://doi.org/10.1007/978-3-642-24933-4_17
- Strategy language for Maude. https://maude.ucm.es/strategies
- Deduction, Strategies, and Rewriting. In Proceedings of the 6th International Workshop on Strategies in Automated Deduction, STRATEGIES 2006, Seattle, WA, USA, August 16, 2006 (Electronic Notes in Theoretical Computer Science, Vol. 174(11)), Myla Archer, Thierry Boy de la Tour, and César Muñoz (Eds.). Elsevier, 3–25. https://doi.org/10.1016/j.entcs.2006.03.017
- Strategic port graph rewriting: an interactive modelling framework. Math. Struct. Comput. Sci. 29, 5 (2019), 615–662. https://doi.org/10.1017/S0960129518000270
- Joseph A. Goguen. 1984. Parameterized Programming. IEEE Trans. Software Eng. 10, 5 (1984), 528–544. https://doi.org/10.1109/TSE.1984.5010277
- Using Maude and Its Strategies for Defining a Framework for Analyzing Eden Semantics. In Proceedings of the Sixth International Workshop on Reduction Strategies in Rewriting and Programming, WRS 2006, Seattle, WA, USA, August 11, 2006 (Electronic Notes in Theoretical Computer Science, Vol. 174(10)), Sergio Antoy (Ed.). Elsevier, 119–137. https://doi.org/10.1016/j.entcs.2007.02.051
- Gérard P. Huet. 1981. A Complete Proof of Correctness of the Knuth-Bendix Completion Algorithm. J. Comput. Syst. Sci. 23, 1 (1981), 11–21. https://doi.org/10.1016/0022-0000(81)90002-7
- Hélène Kirchner. 2015. Rewriting Strategies and Strategic Rewrite Programs. In Logic, Rewriting, and Concurrency - Essays dedicated to José Meseguer on the Occasion of His 65th Birthday (Lecture Notes in Computer Science, Vol. 9200), Narciso Martí-Oliet, Peter Csaba Ölveczky, and Carolyn L. Talcott (Eds.). Springer, 380–403. https://doi.org/10.1007/978-3-319-23165-5_18
- Hélène Kirchner and Pierre-Etienne Moreau. 1995. Prototyping Completion with Constraints Using Computational Systems. In Rewriting Techniques and Applications, 6th International Conference, RTA-95, Kaiserslautern, Germany, April 5-7, 1995, Proceedings (Lecture Notes in Computer Science, Vol. 914), Jieh Hsiang (Ed.). Springer, 438–443. https://doi.org/10.1007/3-540-59200-8_79
- Donald E. Knuth and Peter B. Bendix. 1970. Simple Word Problems in Universal Algebras. In Computational Problems in Abstract Algebra. Proceedings of a Conference Held at Oxford Under the Auspices of the Science Research Council Atlas Computer Laboratory, 29th August to 2nd September 1967, John Leech (Ed.). Pergamon Press, 263–297. https://doi.org/10.1016/B978-0-08-012975-4.50028-X
- Robert A. Kowalski. 1979. Algorithm = Logic + Control. Commun. ACM 22, 7 (1979), 424–436. https://doi.org/10.1145/359131.359136
- Pierre Lescanne. 1990. Implementations of Completion by Transition Rules + Control: ORME. In Algebraic and Logic Programming, Second International Conference, Nancy, France, October 1-3, 1990, Proceedings (Lecture Notes in Computer Science, Vol. 463), Hélène Kirchner and Wolfgang Wechler (Eds.). Springer, 262–269. https://doi.org/10.1007/3-540-53162-9_44
- G. Malkin. 1998. RIP Version 2. RFC 2453. Internet Engineering Task Force. https://tools.ietf.org/html/rfc2453
- Mircea Marin and Temur Kutsia. 2006. Foundations of the rule-based system ρLog. J. Appl. Non Class. Logics 16, 1-2 (2006), 151–168. https://doi.org/10.3166/jancl.16.151-168
- Towards a Strategy Language for Maude. In Proceedings of the Fifth International Workshop on Rewriting Logic and its Applications, WRLA 2004, Barcelona, Spain, March 27-April 4, 2004 (Electronic Notes in Theoretical Computer Science, Vol. 117), Narciso Martí-Oliet (Ed.). Elsevier, 417–441. https://doi.org/10.1016/j.entcs.2004.06.020
- A Rewriting Semantics for Maude Strategies. In Proceedings of the Seventh International Workshop on Rewriting Logic and its Applications, WRLA 2008, Budapest, Hungary, March 29-30, 2008 (Electronic Notes in Theoretical Computer Science, Vol. 238(3)), Grigore Roşu (Ed.). Elsevier, 227–247. https://doi.org/10.1016/j.entcs.2009.05.022
- Strategies and simulations in a semantic framework. J. Algorithms 62, 3-4 (2007), 95–116. https://doi.org/10.1016/j.jalgor.2007.04.002
- José Meseguer. 1992. Conditional rewriting logic as a unified model of concurrency. Theor. Comput. Sci. 96, 1 (1992), 73–155. https://doi.org/10.1016/0304-3975(92)90182-F
- José Meseguer. 2012. Twenty years of rewriting logic. J. Log. Algebr. Program. 81, 7-8 (2012), 721–781. https://doi.org/10.1016/j.jlap.2012.06.003
- Pierre-Etienne Moreau. 2000. REM (Reduce Elan Machine): Core of the New ELAN Compiler. In Rewriting Techniques and Applications, 11th International Conference, RTA 2000, Norwich, UK, July 10-12, 2000, Proceedings (Lecture Notes in Computer Science, Vol. 1833), Leo Bachmair (Ed.). Springer, 265–269. https://doi.org/10.1007/10721975_19
- Alberto Pettorossi and Maurizio Proietti. 2002. Program Derivation = Rules + Strategies. In Computational Logic: Logic Programming and Beyond, Essays in Honour of Robert A. Kowalski, Part I (Lecture Notes in Computer Science, Vol. 2407), Antonis C. Kakas and Fariba Sadri (Eds.). Springer, 273–309. https://doi.org/10.1007/3-540-45628-7_12
- Gordon D. Plotkin. 1976. A Powerdomain Construction. SIAM J. Comput. 5, 3 (1976), 452–487. https://doi.org/10.1137/0205035
- Daniel Ratner and Manfred K. Warmuth. 1990. The (n2−1)superscript𝑛21(n^{2}-1)( italic_n start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT - 1 )-Puzzle and Related Relocation Problems. J. Symb. Comput. 10, 2 (1990), 111–138. https://doi.org/10.1016/S0747-7171(08)80001-6
- Typed Mobile Ambients in Maude. In Proceedings of the 6th International Workshop on Rule-Based Programming, RULE 2005, Nara, Japan, April 23, 2005 (Electronic Notes in Theoretical Computer Science, Vol. 147(1)), Horatiu Cirstea and Narciso Martí-Oliet (Eds.). Elsevier, 135–161. https://doi.org/10.1016/j.entcs.2005.06.041
- Rubén Rubio. 2022. Model checking of strategy-controlled systems in rewriting logic. Ph. D. Dissertation. Universidad Complutense de Madrid. https://eprints.ucm.es/71531
- QMaude: Quantitative Specification and Verification in Rewriting Logic. In Formal Methods - 25th International Symposium, FM 2023, Lübeck, Germany, March 6-10, 2023, Proceedings (Lecture Notes in Computer Science, Vol. 14000), Marsha Chechik, Joost-Pieter Katoen, and Martin Leucker (Eds.). Springer, 240–259. https://doi.org/10.1007/978-3-031-27481-7_15
- Model checking strategy-controlled rewriting systems. In 4th International Conference on Formal Structures for Computation and Deduction, FSCD 2019, June 24-30, 2019, Dortmund, Germany (LIPIcs, Vol. 131), Herman Geuvers (Ed.). Schloss Dagstuhl - Leibniz-Zentrum für Informatik, 34:1–34:18. https://doi.org/10.4230/LIPIcs.FSCD.2019.34
- Parameterized strategies specification in Maude. In Recent Trends in Algebraic Development Techniques (Lecture Notes in Computer Science, Vol. 11563), José Fiadeiro and Ionuț Țuțu (Eds.). Springer, 27–44. https://doi.org/10.1007/978-3-030-23220-7_2
- The semantics of the Maude strategy language. Technical Report 01/21. Departamento de Sistemas Informáticos y Computación, Universidad Complutense de Madrid. https://eprints.ucm.es/67449/
- Strategies, model checking and branching-time properties in Maude. J. Log. Algebr. Methods Program. 123 (2021), 28 pages. https://doi.org/10.1016/j.jlamp.2021.100700
- Metalevel transformation of strategies. J. Log. Algebr. Methods Program. 124 (2022), 21 pages. https://doi.org/10.1016/j.jlamp.2021.100728
- Model checking strategy-controlled systems in rewriting logic. Automat. Softw. Eng. 29, 1 (2022), 57 pages. https://doi.org/10.1007/s10515-021-00307-9
- Simulating and model checking membrane systems using strategies in Maude. J. Log. Algebr. Methods Program. 124 (2022), 25 pages. https://doi.org/10.1016/j.jlamp.2021.100727
- Gustavo Santos-García and Miguel Palomino. 2007. Solving Sudoku Puzzles with Rewriting Rules. In Proceedings of the 6th International Workshop on Rewriting Logic and its Applications, WRLA 2006, Vienna, Austria, April 1-2, 2006 (Electronic Notes in Theoretical Computer Science, Vol. 176(4)), Grit Denker and Carolyn Talcott (Eds.). Elsevier, 79–93. https://doi.org/10.1016/j.entcs.2007.06.009
- Rewriting Logic Using Strategies for Neural Networks: An Implementation in Maude. In International Symposium on Distributed Computing and Artificial Intelligence, DCAI 2008, University of Salamanca, Spain, 22th-24th October 2008 (Advances in Soft Computing, Vol. 50), Juan M. Corchado, Sara Rodríguez, James Llinas, and José M. Molina (Eds.). Springer, 424–433. https://doi.org/10.1007/978-3-540-85863-8_50
- Terese. 2003. Term Rewriting Systems. Cambridge University Press.
- Alberto Verdejo and Narciso Martí-Oliet. 2011. Basic completion strategies as another application of the Maude strategy language. In Proceedings 10th International Workshop on Reduction Strategies in Rewriting and Programming, WRS 2011, Novi Sad, Serbia, 29 May 2011 (Electronic Proceedings in Theoretical Computer Science, Vol. 82), Santiago Escobar (Ed.). 17–36. https://doi.org/10.4204/EPTCS.82.2
- Eelco Visser. 2005. A survey of strategies in rule-based program transformation systems. J. Symb. Comput. 40, 1 (2005), 831–873. https://doi.org/10.1016/j.jsc.2004.12.011
- Marian Vittek. 1996. A Compiler for Nondeterministic Term Rewriting Systems. In Rewriting Techniques and Applications, 7th International Conference, RTA-96, New Brunswick, NJ, USA, July 27-30, 1996, Proceedings (Lecture Notes in Computer Science, Vol. 1103), Harald Ganzinger (Ed.). Springer, 154–167. https://doi.org/10.1007/3-540-61464-8_50
- Language Design with the Spoofax Language Workbench. IEEE Softw. 31, 5 (2014), 35–43. https://doi.org/10.1109/MS.2014.100
- Éduard Lucas. 1992. Recréations mathématiques (2 ed.). Albert Blanchard, Paris.