Skip to main content
Log in

Efficient Safety Enforcement for Maude Programs via Program Specialization in the ÁTAME System

  • Published:
Mathematics in Computer Science Aims and scope Submit manuscript

Abstract

Program specialization is mainly recognized as a powerful technique for optimizing software systems. Nonetheless, it can also be productively employed in other application areas. This paper presents an assertion-guided program specialization methodology for efficiently imposing safety properties on software systems. The program specializer takes as input a set \(\mathcal {A}\) of logical assertions that specifies the expected system behavior plus a software system that is modeled as a Maude program \(\mathcal {R}\) that may violate some of the assertions in \(\mathcal {A}\). The outcome is a safe refinement \(\mathcal {R}^\triangleright \) of \(\mathcal {R}\) in which every system computation is a good run of \(\mathcal {R}\), i.e., it satisfies the assertions in \(\mathcal {A}\). The specialization technique has been fully automated in the ÁTAME system and ensures that no good run of \(\mathcal {R}\) is removed from \(\mathcal {R}^\triangleright \), while the number of bad runs is reduced to zero. The efficiency and scalability of our technique is empirically demonstrated by means of a thorough experimental evaluation of the ÁTAME system, which shows fast specialization times and good performance of the computed specializations, even for large assertion sets.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7
Fig. 8

Similar content being viewed by others

Notes

  1. Maude’s syntax is hopefully self-explanatory. Due to space limitations and for the sake of clarity, we only highlight those details of the system that are relevant to this work. A complete Maude specification of the dam controller is available at the ÁTAME website at http://safe-tools.dsic.upv.es/atame. For more information about the Maude language, see [8].

  2. Empty syntax operators are supported in Maude by treating blank spaces as binary, infix, operators. Hence, the associative and commutative operator __ naturally defines multisets as terms of the form \(\mathtt e_1\ e_2\ \ldots \ e_n\) where blanks are used to juxtapose elements.

  3. Note that, in the case of mixfix operators, we just rename one operator symbol. For instance, the constructor operator for system states \(\mathtt \{\_ ; \_ ; \_ ; \_\}\) is renamed \(\mathtt \{\_ ; \_ ; \_ ; \_\}^\triangleright \).

  4. We do not include rewrite rules in the computation of the program size of \(\mathcal {R}\) and \(\mathcal {R}^\triangleright \), since both programs have the same number of rewrite rules.

References

  1. Alpuente, M., Ballis, D., Frechina, F., Romero, D.: Using conditional trace slicing for improving maude programs. Sci. Comput. Program. 80(Part B), 385–415 (2014)

    Article  Google Scholar 

  2. Alpuente, M., Ballis, D., Frechina, F., Sapiña, J.: Slicing-based trace analysis of rewriting logic specifications with iJulienne. In: Proceedings of the 22nd European Symposium on Programming (ESOP 2013). LNCS, vol. 7792, pp. 121–124. Springer (2013)

  3. Alpuente, M., Ballis, D., Frechina, F., Sapiña, J.: Assertion-based analysis via slicing with ABETS. Theory Pract. Log. Program. 16(5–6), 515–532 (2016)

    Article  MathSciNet  Google Scholar 

  4. Alpuente, M., Ballis, D., Sapiña, J.: Inferring safe Maude programs with ÁTAME. In: Mathematical Software—ICMS 2018—6th International Conference. LNCS, vol. 10931, pp. 1–10. Springer (2018)

  5. Alpuente, M., Ballis, D., Sapiña, J.: Imposing assertions in Maude via program transformation. MethodsX 6, 2577–2583 (2019)

    Article  Google Scholar 

  6. Alpuente, M., Ballis, D., Sapiña, J.: Static correction of Maude programs with assertions. J. Syst. Softw. 153, 64–85 (2019)

    Article  Google Scholar 

  7. Alpuente, M., Cuenca-Ortega, A., Escobar, S., Meseguer, J.: Partial evaluation of order-sorted equational programs modulo axioms. In: Proceedings of the 26th International Symposium on Logic-Based Program Synthesis and Transformation (LOPSTR 2016). LNCS, vol. 10184, pp. 3–20. Springer (2016)

  8. Clavel, M., Durán, F., Eker, S., Escobar, S., Lincoln, P., Martí-Oliet, N., Meseguer, J., Talcott, C.: Maude manual (version 3.0). Technical report, SRI International Computer Science Laboratory (2019). http://maude.lcc.uma.es/maude30-manual-html/maude-manual.html. Accessed 24 Jan 2020

  9. Colcombet, T., Fradet, P.: Enforcing trace properties by program transformation. In: Proceedings of POPL 2000, pp. 54–66. ACM (2000)

  10. Danvy, O., Glück, R., Thiemann, P. (eds.): Proceedings of the International Seminar on Partial Evaluation (Dagstuhl 1996). LNCS, vol. 1110. Springer (1996)

  11. Joiner, R., Reps, T., Jha, S., Dhawan, M., Ganapathy, V.: Efficient runtime-enforcement techniques for policy weaving. In: Proceedings of the 22nd ACM SIGSOFT International Symposium on Foundations of Software Engineering (FSE 2014), pp. 224–234. ACM (2014)

  12. Khoo, S.C., Shi, K.: Program adaptation via output-constraint specialization. High. Order Symb. Comput. 17(1), 93–128 (2004)

    Article  Google Scholar 

  13. Meseguer, J.: Conditional rewriting logic as a unified model of concurrency. Theor. Comput. Sci. 96(1), 73–155 (1992)

    Article  MathSciNet  Google Scholar 

  14. Puebla, G., Bueno, F., Hermenegildo, M.V.: Combined static and dynamic assertion-based debugging of constraint logic programs. In: Proceedings of the 9th International Workshop on Logic Programming Synthesis and Transformation (LOPSTR 1999), Selected Papers. LNCS, vol. 1817, pp. 273–292. Springer (2000)

  15. The Anima Website (2015). http://safe-tools.dsic.upv.es/anima. Accessed 24 Jan 2020

  16. Vazou, N., Seidel, E.L., Jhala, R.: LiquidHaskell: experience with refinement types in the real world. In: Proceedings of the 2014 ACM SIGPLAN Symposium on Haskell, pp. 39–51 (2014)

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to D. Ballis.

Additional information

Publisher's Note

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

This work has been partially supported by the EU (FEDER) and the Spanish Ministry of Science, Innovation and Universities under grant RTI2018-094403-B-C32, and by Generalitat Valenciana ref. PROMETEO/2019/098 and ref. APOSTD/2019/127.

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Alpuente, M., Ballis, D. & Sapiña, J. Efficient Safety Enforcement for Maude Programs via Program Specialization in the ÁTAME System. Math.Comput.Sci. 14, 591–606 (2020). https://doi.org/10.1007/s11786-020-00455-3

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s11786-020-00455-3

Keywords

Mathematics Subject Classification

Navigation