Abstract
This paper proposes the first mutation-based technique for the repair of Alloy 6 first-order temporal logic specifications. This technique was developed with the educational context in mind, in particular, to repair submissions for specification challenges, as allowed, for example, in the Alloy4Fun web-platform. Given an oracle and an incorrect submission, the proposed technique searches for syntactic mutations that lead to a correct specification, using previous counterexamples to quickly prune the search space, thus enabling timely feedback to students. Evaluation shows that, not only is the technique feasible for repairing temporal logic specifications, but also outperforms existing techniques for non-temporal Alloy specifications in the context of educational challenges.
This work is financed by National Funds through the Portuguese funding agency, FCT – Fundação para a Ciência e a Tecnologia within project EXPL/CCI-COM/1637/2021.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Notes
- 1.
- 2.
- 3.
Note that in this challenge the evolution of the system is not restricted and files are not required to be created before being sent to the trash. The goal of the exercise was precisely to train students to write the weakest specifications of the stated requirement, independent of concrete system implementations.
- 4.
- 5.
- 6.
References
Brida, S.G., et al.: BeAFix: an automated repair tool for faulty alloy models. In: ASE, pp. 1213–1217. IEEE (2021)
Brida, S.G., et al.: Bounded exhaustive search of alloy specification repairs. In: ICSE, pp. 1135–1147. IEEE (2021)
Cai, C.-H., Sun, J., Dobbie, G.: Automatic B-model repair using model checking and machine learning. Autom. Softw. Eng. 26(3), 653–704 (2019). https://doi.org/10.1007/s10515-019-00264-4
Clarisó, R., Cabot, J.: Fixing defects in integrity constraints via constraint mutation. In: QUATIC, pp. 74–82. IEEE Computer Society (2018)
Edwards, J., Jackson, D., Torlak, E.: A type system for object models. ACM SIGSOFT Softw. Eng. Notes 29(6), 189–199 (2004)
Gazzola, L., Micucci, D., Mariani, L.: Automatic software repair: a survey. IEEE Trans. Softw. Eng. 45(1), 34–67 (2019)
Goues, C.L., Pradel, M., Roychoudhury, A.: Automated program repair. Commun. ACM 62(12), 56–65 (2019)
Jackson, D.: Software Abstractions: Logic, Language, and Analysis. MIT Press, revised edn. (2012)
Jackson, D.: Alloy: a language and tool for exploring software designs. Commun. ACM 62(9), 66–76 (2019)
Krishnamurthi, S., Nelson, T.: The human in formal methods. In: ter Beek, M.H., McIver, A., Oliveira, J.N. (eds.) FM 2019. LNCS, vol. 11800, pp. 3–10. Springer, Cham (2019). https://doi.org/10.1007/978-3-030-30942-8_1
Macedo, N., Brunel, J., Chemouil, D., Cunha, A., Kuperberg, D.: Lightweight specification and analysis of dynamic systems with rich configurations. In: SIGSOFT FSE, pp. 373–383. ACM (2016)
Macedo, N., Cunha, A., Pereira, J., Carvalho, R., Silva, R., Paiva, A.C.R., Ramalho, M.S., Silva, D.C.: Experiences on teaching alloy with an automated assessment platform. Sci. Comput. Program. 211, 102690 (2021)
McBroom, J., Koprinska, I., Yacef, K.: A survey of automated programming hint generation: the hints framework. ACM Comput. Surv. 54(8), 172:1–172:27 (2022)
Pei, Yu., Furia, C.A., Nordio, M., Meyer, B.: Automatic program repair by fixing contracts. In: Gnesi, S., Rensink, A. (eds.) FASE 2014. LNCS, vol. 8411, pp. 246–260. Springer, Heidelberg (2014). https://doi.org/10.1007/978-3-642-54804-8_17
Schmidt, J., Krings, S., Leuschel, M.: Repair and generation of formal models using synthesis. In: Furia, C.A., Winter, K. (eds.) IFM 2018. LNCS, vol. 11023, pp. 346–366. Springer, Cham (2018). https://doi.org/10.1007/978-3-319-98938-9_20
Sullivan, A., Wang, K., Khurshid, S.: Aunit: a test automation tool for alloy. In: ICST, pp. 398–403. IEEE Computer Society (2018)
Toll, D., Wingkvist, A., Ericsson, M.: Current state and next steps on automated hints for students learning to code. In: FIE, pp. 1–5. IEEE (2020)
Wang, K., Sullivan, A., Khurshid, S.: Automated model repair for alloy. In: ASE, pp. 577–588. ACM (2018)
Wang, K., Sullivan, A., Khurshid, S.: Arepair: a repair framework for alloy. In: ICSE (Companion Volume), pp. 103–106. IEEE / ACM (2019)
Wang, K., Sullivan, A., Marinov, D., Khurshid, S.: Fault localization for declarative models in alloy. In: ISSRE, pp. 391–402. IEEE (2020)
Zheng, G., et al.: ATR: template-based repair for alloy specifications. In: ISSTA, pp. 666–677. ACM (2022)
Zheng, G., et al.: FLACK: counterexample-guided fault localization for alloy models. In: ICSE, pp. 637–648. IEEE (2021)
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2022 The Author(s), under exclusive license to Springer Nature Switzerland AG
About this paper
Cite this paper
Cerqueira, J., Cunha, A., Macedo, N. (2022). Timely Specification Repair for Alloy 6. In: Schlingloff, BH., Chai, M. (eds) Software Engineering and Formal Methods. SEFM 2022. Lecture Notes in Computer Science, vol 13550. Springer, Cham. https://doi.org/10.1007/978-3-031-17108-6_18
Download citation
DOI: https://doi.org/10.1007/978-3-031-17108-6_18
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-031-17107-9
Online ISBN: 978-3-031-17108-6
eBook Packages: Computer ScienceComputer Science (R0)