Skip to main content

Timely Specification Repair for Alloy 6

  • Conference paper
  • First Online:
Software Engineering and Formal Methods (SEFM 2022)

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.

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

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 54.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 69.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Notes

  1. 1.

    https://alloytools.org/citations/courses.html.

  2. 2.

    http://alloy4fun.inesctec.pt/.

  3. 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. 4.

    https://github.com/Kaixi26/TAR.

  5. 5.

    https://hub.docker.com/r/kaixi26/tar.

  6. 6.

    https://doi.org/10.5281/zenodo.4676413.

References

  1. Brida, S.G., et al.: BeAFix: an automated repair tool for faulty alloy models. In: ASE, pp. 1213–1217. IEEE (2021)

    Google Scholar 

  2. Brida, S.G., et al.: Bounded exhaustive search of alloy specification repairs. In: ICSE, pp. 1135–1147. IEEE (2021)

    Google Scholar 

  3. 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

    Article  Google Scholar 

  4. Clarisó, R., Cabot, J.: Fixing defects in integrity constraints via constraint mutation. In: QUATIC, pp. 74–82. IEEE Computer Society (2018)

    Google Scholar 

  5. Edwards, J., Jackson, D., Torlak, E.: A type system for object models. ACM SIGSOFT Softw. Eng. Notes 29(6), 189–199 (2004)

    Article  Google Scholar 

  6. Gazzola, L., Micucci, D., Mariani, L.: Automatic software repair: a survey. IEEE Trans. Softw. Eng. 45(1), 34–67 (2019)

    Article  Google Scholar 

  7. Goues, C.L., Pradel, M., Roychoudhury, A.: Automated program repair. Commun. ACM 62(12), 56–65 (2019)

    Article  Google Scholar 

  8. Jackson, D.: Software Abstractions: Logic, Language, and Analysis. MIT Press, revised edn. (2012)

    Google Scholar 

  9. Jackson, D.: Alloy: a language and tool for exploring software designs. Commun. ACM 62(9), 66–76 (2019)

    Article  Google Scholar 

  10. 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

    Chapter  Google Scholar 

  11. 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)

    Google Scholar 

  12. 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)

    Google Scholar 

  13. 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)

    Google Scholar 

  14. 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

    Chapter  Google Scholar 

  15. 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

    Chapter  Google Scholar 

  16. Sullivan, A., Wang, K., Khurshid, S.: Aunit: a test automation tool for alloy. In: ICST, pp. 398–403. IEEE Computer Society (2018)

    Google Scholar 

  17. 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)

    Google Scholar 

  18. Wang, K., Sullivan, A., Khurshid, S.: Automated model repair for alloy. In: ASE, pp. 577–588. ACM (2018)

    Google Scholar 

  19. Wang, K., Sullivan, A., Khurshid, S.: Arepair: a repair framework for alloy. In: ICSE (Companion Volume), pp. 103–106. IEEE / ACM (2019)

    Google Scholar 

  20. Wang, K., Sullivan, A., Marinov, D., Khurshid, S.: Fault localization for declarative models in alloy. In: ISSRE, pp. 391–402. IEEE (2020)

    Google Scholar 

  21. Zheng, G., et al.: ATR: template-based repair for alloy specifications. In: ISSTA, pp. 666–677. ACM (2022)

    Google Scholar 

  22. Zheng, G., et al.: FLACK: counterexample-guided fault localization for alloy models. In: ICSE, pp. 637–648. IEEE (2021)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Nuno Macedo .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2022 The Author(s), under exclusive license to Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

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)

Publish with us

Policies and ethics