Abstract
We present a general and efficient programming interface to Maude from Python and other programming languages. All relevant Maude entities and operations are exposed in a documented object-oriented library to facilitate the integration of Maude into external programs and vice versa. This paper describes the design and implementation of the library, explains how to use it, and discusses some mature applications.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Notes
- 1.
The official documentation of the cmd module and other Python features that may appear is available at docs.python.org.
- 2.
References
Alpuente, M., Ballis, D., Sapiña, J.: Efficient safety enforcement for Maude programs via program specialization in the ÁTAME system. Math. Comput. Sci. 14(3), 591–606 (2020). https://doi.org/10.1007/s11786-020-00455-3
Alpuente, M., Escobar, S., Sapiña, J., Ballis, D.: Symbolic analysis of Maude theories with Narval. Theory Pract. Log. Program. 19(5–6), 874–890 (2019). https://doi.org/10.1017/S1471068419000243
Barbosa, H. et al.: CVC5: A versatile and industrial-strength SMT solver. In: Fisman, D., Rosu, G. (eds.) TACAS 2022, Part I. LNCS, vol. 13243, pp. 415–442. Springer, Cham (2022). https://doi.org/10.1007/978-3-030-99524-9_24
Barrett, C., et al.: CVC4. In: Gopalakrishnan, G., Qadeer, S. (eds.) CAV 2011. LNCS, vol. 6806, pp. 171–177. Springer, Heidelberg (2011). https://doi.org/10.1007/978-3-642-22110-1_14
Casagrande, A.: pyModelChecking: a simple python model checking package (2020). https://pypi.org/project/pyModelChecking
Cimatti, A., et al.: NuSMV 2: an opensource tool for symbolic model checking. In: Brinksma, E., Larsen, K.G. (eds.) CAV 2002. LNCS, vol. 2404, pp. 359–364. Springer, Heidelberg (2002). https://doi.org/10.1007/3-540-45657-0_29
Clavel, M., Durán, F., Eker, S., Lincoln, P., Martí-Oliet, N., Meseguer, J., Talcott, C.: All About Maude - A High-Performance Logical Framework. LNCS, vol. 4350. Springer, Heidelberg (2007). https://doi.org/10.1007/978-3-540-71999-1
Clavel, M., et al.: Maude Manual v3.2.1 (2022)
Codescu, M., Mossakowski, T., Riesco, A., Maeder, C.: Integrating maude into hets. In: Johnson, M., Pavlovic, D. (eds.) AMAST 2010. LNCS, vol. 6486, pp. 60–75. Springer, Heidelberg (2011). https://doi.org/10.1007/978-3-642-17796-5_4
de Moura, L., Bjørner, N.: Z3: an efficient SMT solver. In: Ramakrishnan, C.R., Rehof, J. (eds.) TACAS 2008. LNCS, vol. 4963, pp. 337–340. Springer, Heidelberg (2008). https://doi.org/10.1007/978-3-540-78800-3_24
Moura, L., Ullrich, S.: The lean 4 theorem prover and programming language. In: Platzer, A., Sutcliffe, G. (eds.) CADE 2021. LNCS (LNAI), vol. 12699, pp. 625–635. Springer, Cham (2021). https://doi.org/10.1007/978-3-030-79876-5_37
The ROS developers. Robot Operating System (2020). https://www.ros.org/
The SWIG developers. Simplified Wrapper and Interface Generator (2020). http://www.swig.org/
Durán, F., et al.: Programming and symbolic computation in Maude. J. Log. Algebraic Methods Program. 110, 100497 (2020). https://doi.org/10.1016/j.jlamp.2019.100497
Durán, F., Rocha, C., Álvarez, J.M.: Tool interoperability in the Maude Formal Environment. In: Corradini, A., Klin, B., Cîrstea, C. (eds.) CALCO 2011. LNCS, vol. 6859, pp. 400–406. Springer, Heidelberg (2011). https://doi.org/10.1007/978-3-642-22944-2_30
Duret-Lutz, A., Lewkowicz, A., Fauchille, A., Michaud, T., Renault, É., Xu, L.: Spot 2.0 — a framework for LTL and \(\omega \)-automata manipulation. In: Artho, C., Legay, A., Peled, D. (eds.) ATVA 2016. LNCS, vol. 9938, pp. 122–129. Springer, Cham (2016). https://doi.org/10.1007/978-3-319-46520-3_8
Dutertre, B.: Yices 2.2. In: Biere, A., Bloem, R. (eds.) CAV 2014. LNCS, vol. 8559, pp. 737–744. Springer, Cham (2014). https://doi.org/10.1007/978-3-319-08867-9_49
Eker, S., Meseguer, J., Sridharanarayanan, A.: The Maude LTL model checker and its implementation. In: Ball, T., Rajamani, S.K. (eds.) SPIN 2003. LNCS, vol. 2648, pp. 230–234. Springer, Heidelberg (2003). https://doi.org/10.1007/3-540-44829-2_16
Giesl, J., et al.: Analyzing program termination and complexity automatically with AProVE. J. Autom. Reason. 58(1), 3–31 (2017). https://doi.org/10.1007/s10817-016-9388-y
Hensel, C., Junges, S., Katoen, J.-P., Quatmann, T., Volk, M.: The probabilistic model checker Storm. Int. J. Softw. Tools Technol. Transf. 23(4), 1–22 (2021). https://doi.org/10.1007/s10009-021-00633-z
Holzmann, G.J.: The SPIN Model Checker: Primer and Reference Manual. Addison-Wesley (2011)
Kwiatkowska, M., Norman, G., Parker, D.: PRISM 4.0: verification of probabilistic real-time systems. In: Gopalakrishnan, G., Qadeer, S. (eds.) CAV 2011. LNCS, vol. 6806, pp. 585–591. Springer, Heidelberg (2011). https://doi.org/10.1007/978-3-642-22110-1_47
Martin-Martin, E., Montenegro, M., Riesco, A., Rodríguez-Hortalá, J., Rubio, R.: Maude integration and verification for ROS Nav 2 (2021). https://github.com/demiourgoi/maudeROS
Martin-Martin, E., Montenegro, M., Riesco, A., Rodríguez-Hortalá, J., Rubio, R.: Verification of ROS Navigation using Maude. In: Martí-Oliet, N., (ed.) XX Jornadas de Programación y Lenguajes (PROLE). Sistedes (2021). http://hdl.handle.net/11705/PROLE/2021/008
Mason, I.A., Talcott, C.L.:. IOP: the interoperability platform & IMaude: an interactive extension of Maude. In: Martí-Oliet, N. (ed.) Proceedings of the Fifth International Workshop on Rewriting Logic and Its Applications, WRLA 2004, Barcelona, Spain, 27–28 March 2004. Electronic Notes in Theoretical Computer Science, vol. 117, pp. 315–333. Elsevier (2004). https://doi.org/10.1016/j.entcs.2004.06.016
Meier, S., Schmidt, B., Cremers, C., Basin, D.: The TAMARIN prover for the symbolic analysis of security protocols. In: Sharygina, N., Veith, H. (eds.) CAV 2013. LNCS, vol. 8044, pp. 696–701. Springer, Heidelberg (2013). https://doi.org/10.1007/978-3-642-39799-8_48
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
Rosu, G., Serbanuta, T.-F.: An overview of the K semantic framework. J. Log. Algebraic Methods Program. 79(6), 397–434 (2010). https://doi.org/10.1016/j.jlap.2010.03.012
Rubio, R., Martí-Oliet, N., Pita, I., Verdejo, A.: Model checking strategy-controlled systems in rewriting logic. Autom. Softw. Eng. 29(1), 1–62 (2021). https://doi.org/10.1007/s10515-021-00307-9
Rubio, R., Martí-Oliet, N., Pita, I., Verdejo, A.: Strategies, model checking and branching-time properties in Maude. J. Log. Algebr. Methods Program. 123, 100700 (2021). https://doi.org/10.1016/j.jlamp.2021.100700
Rubio, R., Martí-Oliet, N., Pita, I., Verdejo, A.: Metalevel transformation of strategies. J. Log. Algebr. Methods Program. 124, 100728 (2022). 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. Log. Algebr. Methods Program. 124, 100727 (2022). https://doi.org/10.1016/j.jlamp.2021.100727
Santiago, S., Talcott, C.L., Escobar, S., Meadows, C.A., Meseguer, J.: A graphical user interface for Maude-NPA. In: Lucio, P., Moreno, G., Peña, R., (eds.) Proceedings of the Ninth Spanish Conference on Programming and Languages (PROLE 2009), San Sebastián, Spain, 9–11 September, 2009, volume 258(1) of Electronic Notes Theory Computer Science, pp. 3–20. Elsevier (2009). https://doi.org/10.1016/j.entcs.2009.12.002
Sebastio, S., Vandin, A.: MultiVeStA: statistical model checking for discrete event simulators. In: Horváth, A., Buchholz, P., Cortellessa, V., Muscariello, L., Squillante, M.S., (eds.) 7th International Conference on Performance Evaluation Methodologies and Tools, ValueTools ’13, Torino, Italy, 10–12 December 2013, pp. 310–315. ICST/ACM (2013). https://doi.org/10.4108/icst.valuetools.2013.254377
Talcott, C.: Pathway logic. In: Bernardo, M., Degano, P., Zavattaro, G. (eds.) SFM 2008. LNCS, vol. 5016, pp. 21–53. Springer, Heidelberg (2008). https://doi.org/10.1007/978-3-540-68894-5_2
Zankl, H., Felgenhauer, B., Middeldorp, A.: CSI – a confluence tool. In: Bjørner, N., Sofronie-Stokkermans, V. (eds.) CADE 2011. LNCS (LNAI), vol. 6803, pp. 499–505. Springer, Heidelberg (2011). https://doi.org/10.1007/978-3-642-22438-6_38
Acknowledgments
I would like to thank Enrique Martin-Martin, Manuel Montenegro, Adrián Riesco, Juan Rodríguez-Hortalá, and Óscar Martín for the suggestions that brought this library into existence and their feedback to improve it. The first version of the bindings and extensions like custom operators were originally written for [24]. I also thank Narciso Martí-Oliet and Alberto Verdejo for their comments on this manuscript. This work was partially supported by the Spanish Ministry of Science and Innovation through projects TRACES (TIN2015-67522-C3-3-R) and ProCode (PID2019-108528RB-C22), and by the Spanish Ministry of Universities through the grant FPU17/02319.
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2022 Springer Nature Switzerland AG
About this paper
Cite this paper
Rubio, R. (2022). Maude as a Library: An Efficient All-Purpose Programming Interface. In: Bae, K. (eds) Rewriting Logic and Its Applications. WRLA 2022. Lecture Notes in Computer Science, vol 13252. Springer, Cham. https://doi.org/10.1007/978-3-031-12441-9_14
Download citation
DOI: https://doi.org/10.1007/978-3-031-12441-9_14
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-031-12440-2
Online ISBN: 978-3-031-12441-9
eBook Packages: Computer ScienceComputer Science (R0)