Skip to main content

Abstract Alloy Instances

  • Conference paper
  • First Online:
Formal Methods (FM 2023)

Abstract

Alloy is a textual modeling language for structures and behaviors of software designs. One of the reasons for Alloy to become a popular light-weight formal method is its support for automated, bounded analyses, which is provided through the Analyzer toolset. The Analyzer provides the means to compute, visualize, and browse instances that either satisfy a model or violate an assertion. Understanding instances for the given analysis often requires much effort and there is no guarantee on the order or level of information of computed instances. To help address this, we introduce the concept of abstract Alloy instances, which abstract information common to all instances, while preserving information specific to the analysis. Our abstraction is based on introducing lower and upper bounds for elements that may appear in Alloy’s instances. We evaluate computation times and sizes of abstract instances on a set of benchmark Alloy models.

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 84.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 109.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.

    The Alloy Analyzer requires analysis scopes as cardinalities for signatures. Our bounds are refinements of the bounds induced by those scopes, see Sect. 4.

  2. 2.

    We oversimplify the case of inheritance and relations for illustrative purposes, see our implementation in Sect. 5.1 for a more thorough handling.

  3. 3.

    Alloy distinguishes between primary and subset signatures where atoms of subset signatures always also belong to primary signatures.

References

  1. Akhawe, D., Barth, A., Lam, P.E., Mitchell, J.C., Song, D.: Towards a formal foundation of web security. In: Proceedings of the 23rd IEEE Computer Security Foundations Symposium, CSF 2010, Edinburgh, United Kingdom, 17–19 July 2010, pp. 290–304. IEEE Computer Society (2010). https://doi.org/10.1109/CSF.2010.27

  2. Alloy: Alloy Tools GitHub. https://github.com/AlloyTools (2022). Accessed 5 2022

  3. Alloy 6 Language Reference. https://alloytools.org/spec.html (2022). Accessed 8 2022

  4. Anastasakis, K., Bordbar, B., Georg, G., Ray, I.: On challenges of model transformation from UML to alloy. Softw. Syst. Model. 9(1), 69–86 (2010). https://doi.org/10.1007/s10270-008-0110-3

    Article  Google Scholar 

  5. Cunha, A., Garis, A., Riesco, D.: Translating between Alloy specifications and UML class diagrams annotated with OCL. Softw. Syst. Model. 14(1), 5–25 (2013). https://doi.org/10.1007/s10270-013-0353-5

    Article  Google Scholar 

  6. Dini, N., Yelen, C., Alrmaih, Z., Kulkarni, A., Khurshid, S.: Korat-API: a framework to enhance Korat to better support testing and reliability techniques. In: SAC (2018)

    Google Scholar 

  7. Dyer, T., Nelson, T., Fisler, K., Krishnamurthi, S.: Applying cognitive principles to model-finding output: the positive value of negative information. Proc. ACM Program. Lang. 6(OOPSLA), 1–29 (2022). https://doi.org/10.1145/3527323

  8. Jackson, D.: Alloy: a lightweight object modelling notation. ACM Trans. Softw. Eng. Methodol. 11(2), 256–290 (2002)

    Article  MathSciNet  Google Scholar 

  9. Jackson, D.: Software Abstractions: Logic, Language, and Analysis. MIT Press, Cambridge (2006)

    Google Scholar 

  10. Jackson, D.: Alloy: a language and tool for exploring software designs. Commun. ACM 62(9), 66–76 (2019). https://doi.org/10.1145/3338843

    Article  Google Scholar 

  11. Khurshid, S., Marinov, D., Shlyakhter, I., Jackson, D.: A case for efficient solution enumeration. In: Giunchiglia, E., Tacchella, A. (eds.) SAT 2003. LNCS, vol. 2919, pp. 272–286. Springer, Heidelberg (2004). https://doi.org/10.1007/978-3-540-24605-3_21

    Chapter  Google Scholar 

  12. Maoz, S., Ringert, J.O., Rumpe, B.: CD2Alloy: class diagrams analysis using alloy revisited. In: Whittle, J., Clark, T., Kühne, T. (eds.) MODELS 2011. LNCS, vol. 6981, pp. 592–607. Springer, Heidelberg (2011). https://doi.org/10.1007/978-3-642-24485-8_44

    Chapter  Google Scholar 

  13. Marinov, D., Khurshid, S.: TestEra: a novel framework for automated testing of Java programs. In: ASE (2001)

    Google Scholar 

  14. Nelson, T., Danas, N., Dougherty, D.J., Krishnamurthi, S.: The power of “why” and “why not”: enriching scenario exploration with provenance. In: Bodden, E., Schäfer, W., van Deursen, A., Zisman, A. (eds.) Proceedings of the 2017 11th Joint Meeting on Foundations of Software Engineering, ESEC/FSE 2017, Paderborn, Germany, 4–8 September 2017, pp. 106–116. ACM (2017). https://doi.org/10.1145/3106237.3106272

  15. Nelson, T., Saghafi, S., Dougherty, D.J., Fisler, K., Krishnamurthi, S.: Aluminum: principled scenario exploration through minimality. In: Notkin, D., Cheng, B.H.C., Pohl, K. (eds.) 35th International Conference on Software Engineering, ICSE’13, San Francisco, CA, USA, 18–26 May 2013, pp. 232–241. IEEE Computer Society (2013). https://doi.org/10.1109/ICSE.2013.6606569

  16. Nelson, T., Barratt, C., Dougherty, D.J., Fisler, K., Krishnamurthi, S.: The Margrave tool for firewall analysis. In: LISA (2010)

    Google Scholar 

  17. Ponzio, P., Aguirre, N., Frias, M.F., Visser, W.: Field-exhaustive testing. In: FSE (2016)

    Google Scholar 

  18. Porncharoenwase, S., Nelson, T., Krishnamurthi, S.: CompoSAT: specification-guided coverage for model finding. In: Havelund, K., Peleska, J., Roscoe, B., de Vink, E. (eds.) FM 2018. LNCS, vol. 10951, pp. 568–587. Springer, Cham (2018). https://doi.org/10.1007/978-3-319-95582-7_34

    Chapter  Google Scholar 

  19. Ringert, J.O., Sullivan, A.K.: Abstract alloy instances artefact (2022). https://doi.org/10.5281/zenodo.7339931

  20. Ringert, J.O., Sullivan, A.K.: Abstract alloy instances code (2022). https://github.com/jringert/alloy-absinst

  21. Samimi, H., Aung, E.D., Millstein, T.: Falling back on executable specifications. In: D’Hondt, T. (ed.) ECOOP 2010. LNCS, vol. 6183, pp. 552–576. Springer, Heidelberg (2010). https://doi.org/10.1007/978-3-642-14107-2_26

    Chapter  Google Scholar 

  22. Shlyakhter, I.: Generating effective symmetry-breaking predicates for search problems. In: SAT (2001)

    Google Scholar 

  23. Sullivan, A.: Hawkeye: user-guided enumeration of scenarios. In: Jin, Z., Li, X., Xiang, J., Mariani, L., Liu, T., Yu, X., Ivaki, N. (eds.) 32nd IEEE International Symposium on Software Reliability Engineering, ISSRE 2021, Wuhan, China, 25–28 October 2021, pp. 569–578. IEEE (2021). https://doi.org/10.1109/ISSRE52982.2021.00064

  24. Sullivan, A.: Hawkeye: user guided enumeration of scenarios. In: ISSRE (2021)

    Google Scholar 

  25. Sullivan, A., Jovanovic, A.: Reach: refining alloy scenarios by size. In: ISSRE (2022)

    Google Scholar 

  26. Sullivan, A., Marinov, D., Khurshid, S.: Solution enumeration abstraction: a modeling idiom to enhance a lightweight formal method. In: Ait-Ameur, Y., Qin, S. (eds.) ICFEM 2019. LNCS, vol. 11852, pp. 336–352. Springer, Cham (2019). https://doi.org/10.1007/978-3-030-32409-4_21

    Chapter  Google Scholar 

  27. Sullivan, A., Wang, K., Zaeem, R.N., Khurshid, S.: Automated test generation and mutation testing for alloy. In: 2017 IEEE International Conference on Software Testing, Verification and Validation, ICST 2017, Tokyo, Japan, 13–17 March 2017, pp. 264–275. IEEE Computer Society (2017). https://doi.org/10.1109/ICST.2017.31

  28. Torlak, E., Jackson, D.: Kodkod: a relational model finder. In: Grumberg, O., Huth, M. (eds.) TACAS 2007. LNCS, vol. 4424, pp. 632–647. Springer, Heidelberg (2007). https://doi.org/10.1007/978-3-540-71209-1_49

    Chapter  Google Scholar 

  29. Trippel, C., Lustig, D., Martonosi, M.: Security verification via automatic hardware-aware exploit synthesis: the CheckMate approach. IEEE Micro 39(3), 84–93 (2019)

    Article  Google Scholar 

  30. Nokhbeh Zaeem, R., Khurshid, S.: Contract-based data structure repair using alloy. In: D’Hondt, T. (ed.) ECOOP 2010. LNCS, vol. 6183, pp. 577–598. Springer, Heidelberg (2010). https://doi.org/10.1007/978-3-642-14107-2_27

    Chapter  Google Scholar 

  31. Zave, P.: Reasoning about identifier spaces: how to make chord correct. IEEE Trans. Softw. Eng. 43(12), 1144–1156 (2017). https://doi.org/10.1109/TSE.2017.2655056

    Article  Google Scholar 

  32. Zeller, A., Hildebrandt, R.: Simplifying and isolating failure-inducing input. IEEE Trans. Soft. Eng. 28(2), 183–200 (2002). https://doi.org/10.1109/32.988498

    Article  Google Scholar 

  33. Zhang, C., et al.: Alloymax: bringing maximum satisfaction to relational specifications. In: Proceedings of the 29th ACM Joint Meeting on European Software Engineering Conference and Symposium on the Foundations of Software Engineering, pp. 155–167. ESEC/FSE 2021, Association for Computing Machinery, New York, NY, USA (2021)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Allison Sullivan .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2023 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

Ringert, J.O., Sullivan, A. (2023). Abstract Alloy Instances. In: Chechik, M., Katoen, JP., Leucker, M. (eds) Formal Methods. FM 2023. Lecture Notes in Computer Science, vol 14000. Springer, Cham. https://doi.org/10.1007/978-3-031-27481-7_21

Download citation

  • DOI: https://doi.org/10.1007/978-3-031-27481-7_21

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-031-27480-0

  • Online ISBN: 978-3-031-27481-7

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics