SymMC: approximate model enumeration and counting using symmetry information for Alloy specifications
Wenxi Wang, Yang Hu, Kenneth L. McMillan, Sarfraz Khurshid
Abstract
Specifying and analyzing critical properties of software systems plays an important role in the development of reliable systems. Alloy is a mature tool-set that provides a first-order relational logic for writing specifications, and a fully automatic powerful backend for analyzing the specifications. It has been widely applied in areas including verification, security, and synthesis.
Symmetry breaking is a useful approach for pruning the search space to efficiently check the satisfiability of combinatorial problems. As the backend solver of Alloy, Kodkod does the partial symmetry breaking (PaSB) for Alloy specifications. While full symmetry breaking remains challenging to scale, a recent study showed that Kodkod PaSB could significantly reduce the model counting time, albeit at the cost of producing only partial model counts. However, the desired term is either the isomorphic count under no symmetry breaking, or the non-isomorphic models/count under full symmetry breaking. This paper presents an approach called SymMC, which utilizes the symmetry information to compute all the desired terms for Alloy specifications. To make SymMC scalable, we propose approximate algorithms based on sampling to estimate the desired terms. We show that our proposed estimators have consistency and upper bound properties. To our knowledge, SymMC is the first approach that automatically approximates non-isomorphic model enumeration/counting for Alloy specifications. Thanks to the non-isomorphic model counting, SymMC also provides the first automatic quantification measurement on the solution space pruning ability of Kodkod PaSB. Furthermore, empirical evaluations show that SymMC provides a competitive isomorphic counting approach for Alloy specifications compared to the state-of-the-art model counters.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext 843c2318-1d68-4207-b221-64458c3ede05Builds on2
- TestMC: Testing Model Counters using Differential and Metamorphic TestingMuhammad Usman, Wenxi Wang, Sarfraz KhurshidASE 2020 · 9 citations
- Symmetric Component Caching for Model Counting on Combinatorial InstancesTimothy van Bremen, Vincent Derkinderen, Shubham Sharma, Subhajit Roy et al.AAAI 2021 · 6 citations
Related papers
- A study of the learnability of relational properties: model counting meets machine learning (MCML)Muhammad Usman, Wenxi Wang, Marko Vasic, Kaiyuan Wang et al.PLDI 2020 · 5 citations
- Complete Symmetry Breaking for Finite ModelsMarek Danco, Mikolás Janota, Michael Codish, João Jorge AraújoAAAI 2025 · 2 citations
- Quantitative relational modelling with QAlloyPedro Silva, José N. Oliveira, Nuno Macedo, Alcino CunhaFSE 2022 · 3 citations
- AlloyMax: bringing maximum satisfaction to relational specificationsChangjian Zhang, Ryan Wagner, Pedro Orvalho, David Garlan et al.FSE 2021 · 10 citations
- Automated Combinatorial Test Generation for AlloyAgustín Borda, Germán Regis, Nazareno Aguirre, Marcelo F. Frias et al.ASE 2025
