Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
10.1145/3540250.3549161acmconferencesArticle/Chapter ViewAbstractPublication PagesfseConference Proceedingsconference-collections
research-article
Open access

SymMC: approximate model enumeration and counting using symmetry information for Alloy specifications

Published: 09 November 2022 Publication History

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.

References

[1]
2019. The On-Line Encyclopedia of Integer Sequences. https://oeis.org/
[2]
Devdatta Akhawe, Adam Barth, Peifung E Lam, John Mitchell, and Dawn Song. 2010. Towards a formal foundation of web security. In 2010 23rd IEEE Computer Security Foundations Symposium. 290–304.
[3]
Sven Apel, Wolfgang Scholz, Christian Lengauer, and Christian Kastner. 2010. Detecting dependences and interactions in feature-oriented design. In 2010 IEEE 21st International Symposium on Software Reliability Engineering. 161–170.
[4]
Rehan Abdul Aziz, Geoffrey Chu, Christian Muise, and Peter Stuckey. 2015. SAT: Projected Model Counting. In International Conference on Theory and Applications of Satisfiability Testing. 121–137.
[5]
Rolf Backofen and Sebastian Will. 1999. Excluding Symmetries in Constraint-Based Search. In Principles and Practice of Constraint Programming – CP’99, Joxan Jaffar (Ed.). Springer, Berlin, Heidelberg. 73–87.
[6]
Biljana Bajić-Bizumić, Claude Petitpierre, Hieu Chi Huynh, and Alain Wegmann. 2013. A model-driven environment for service design, simulation and prototyping. In International Conference on Exploring Services Science. 200–214.
[7]
Kacper Bąk, Krzysztof Czarnecki, and Andrzej Wąsowski. 2010. Feature and meta-models in Clafer: mixed, specialized, and coupled. In International Conference on Software Language Engineering. 102–122.
[8]
Fabian Büttner, Marina Egea, Jordi Cabot, and Martin Gogolla. 2012. Verification of ATL transformations using transformation models and model finders. In International Conference on Formal Engineering Methods. 198–213.
[9]
Supratik Chakraborty, Kuldeep S Meel, and Moshe Y Vardi. 2013. A scalable and nearly uniform generator of SAT witnesses. In International Conference on Computer Aided Verification. 608–623.
[10]
Supratik Chakraborty, Kuldeep S. Meel, and Moshe Y. Vardi. 2016. Algorithmic Improvements in Approximate Counting for Probabilistic Inference: From Linear to Logarithmic SAT Calls. In Proceedings of the Twenty-Fifth International Joint Conference on Artificial Intelligence. AAAI Press, 3569–3576.
[11]
I-Ming Chen and Joel W Burdick. 1998. Enumerating the non-isomorphic assembly configurations of modular robotic systems. The International Journal of Robotics Research, 17, 7 (1998), 702–719.
[12]
Thomas H. Cormen. 2009. Introduction to Algorithms, Third Edition. (3rd ed. ed.). MIT Press, Cambridge.
[13]
James Crawford, Matthew Ginsberg, Eugene Luks, and Amitabha Roy. 1996. Symmetry-breaking predicates for search problems. KR, 96 (1996), 148–159.
[14]
Jo Devriendt, Bart Bogaerts, and Maurice Bruynooghe. 2017. Symmetric explanation learning: Effective dynamic symmetry handling for SAT. In International Conference on Theory and Applications of Satisfiability Testing. 83–100.
[15]
Jo Devriendt, Bart Bogaerts, Broes de Cat, Marc Denecker, and Christopher Mears. 2012. Symmetry propagation: Improved dynamic symmetry breaking in SAT. In 2012 IEEE 24th International Conference on Tools with Artificial Intelligence. 1, 49–56.
[16]
Niklas Eén and Niklas Sörensson. 2003. An extensible SAT-solver. In International conference on theory and applications of satisfiability testing. 502–518.
[17]
Stefano Ermon, Carla Gomes, and Bart Selman. 2012. Uniform Solution Sampling Using a Constraint Solver as an Oracle. In Proceedings of the Twenty-Eighth Conference on Uncertainty in Artificial Intelligence (UAI’12). AUAI Press, Arlington, Virginia, USA. 255–264. isbn:9780974903989
[18]
Torsten Fahle, Stefan Schamberger, and Meinolf Sellmann. 2001. Symmetry Breaking. In Principles and Practice of Constraint Programming — CP 2001, Toby Walsh (Ed.). Springer, Berlin, Heidelberg. 93–107.
[19]
Filippo Focacci and Michaela Milano. 2001. Global Cut Framework for Removing Symmetries. In Principles and Practice of Constraint Programming — CP 2001, Toby Walsh (Ed.). Springer, Berlin, Heidelberg.
[20]
Ian P Gent and Barbara Smith. 2000. Symmetry Breaking in Constraint Programming. In ECAI.
[21]
Vibhav Gogate and Rina Dechter. 2006. A new algorithm for sampling CSP solutions uniformly at random. In International Conference on Principles and Practice of Constraint Programming. 711–715.
[22]
Vibhav Gogate and Rina Dechter. 2007. Approximate counting by sampling the backtrack-free search space. In AAAI. 198–203.
[23]
Vibhav Gogate and Rina Dechter. 2011. SampleSearch: Importance sampling in presence of determinism. Artificial Intelligence, 175, 2 (2011), 694–729.
[24]
Carla P Gomes, Joerg Hoffmann, Ashish Sabharwal, and Bart Selman. 2007. From Sampling to Model Counting. In IJCAI. 2007, 2293–2299.
[25]
Carla P Gomes, Ashish Sabharwal, and Bart Selman. 2006. Model counting: A new strategy for obtaining good bounds. In AAAI. 54–61.
[26]
Daniel Jackson. 2000. Automating first-order relational logic. In Proceedings of the 8th ACM SIGSOFT international symposium on Foundations of software engineering: twenty-first century applications. 130–139.
[27]
Daniel Jackson. 2012. Software Abstractions: logic, language, and analysis. MIT press.
[28]
Eunsuk Kang and Daniel Jackson. 2008. Formal modeling and analysis of a flash filesystem in Alloy. In International Conference on Abstract State Machines, B and Z. 294–308.
[29]
Shadi Abdul Khalek, Guowei Yang, Lingming Zhang, Darko Marinov, and Sarfraz Khurshid. 2011. Testera: A tool for testing java programs using alloy specifications. In 2011 26th IEEE/ACM International Conference on Automated Software Engineering (ASE 2011). 608–611.
[30]
Sarfraz Khurshid and Darko Marinov. 2004. TestEra: Specification-based testing of Java programs using SAT. Automated Software Engineering, 11, 4 (2004), 403–434.
[31]
Sarfraz Khurshid, Darko Marinov, Ilya Shlyakhter, and Daniel Jackson. 2003. A case for efficient solution enumeration. In International Conference on Theory and Applications of Satisfiability Testing. 272–286.
[32]
Sarfraz Khurshid, Corina S Păsăreanu, and Willem Visser. 2003. Generalized symbolic execution for model checking and testing. In International Conference on Tools and Algorithms for the Construction and Analysis of Systems. 553–568.
[33]
Lukas Kroc, Ashish Sabharwal, and Bart Selman. 2008. Leveraging belief propagation, backtrack search, and statistics for model counting. In International Conference on Integration of Artificial Intelligence (AI) and Operations Research (OR) Techniques in Constraint Programming. 127–141.
[34]
Jinguo Liu, Yuechao Wang, Shugen Ma, and Yangmin Li. 2010. Enumeration of the non-isomorphic configurations for a reconfigurable modular robot with square-cubic-cell modules. International Journal of Advanced Robotic Systems, 7, 4 (2010), 31.
[35]
Darko Marinov and Sarfraz Khurshid. 2001. TestEra: A novel framework for automated testing of Java programs. In Proceedings 16th Annual International Conference on Automated Software Engineering (ASE 2001). 22–31.
[36]
Darko Marinov and Sarfraz Khurshid. 2001. TestEra: A novel framework for automated testing of Java programs. In Proceedings 16th Annual International Conference on Automated Software Engineering (ASE 2001). 22–31.
[37]
Brendan D McKay and Adolfo Piperno. 2014. Practical graph isomorphism, II. Journal of symbolic computation, 60 (2014), 94–112.
[38]
C Mears. 2009. Automatic symmetry detection and dynamic symmetry breaking for constraint programming. Ph. D. Dissertation. Ph. D. thesis, Clayton School of Information Technology, Monash University.
[39]
Christopher Mears, Maria Garcia De La Banda, Bart Demoen, and Mark Wallace. 2014. Lightweight dynamic symmetry breaking. Constraints, 19, 3 (2014), 195–242.
[40]
Hakan Metin, Souheib Baarir, Maximilien Colange, and Fabrice Kordon. 2018. CDCLSym: Introducing effective symmetry breaking in SAT solving. In International Conference on Tools and Algorithms for the Construction and Analysis of Systems. 99–114.
[41]
Patryk Mikos. 2021. Efficient enumeration of non-isomorphic interval graphs. Discrete Mathematics & Theoretical Computer Science, 23 (2021).
[42]
Aleksandar Milicevic, Sasa Misailovic, Darko Marinov, and Sarfraz Khurshid. 2007. Korat: A tool for generating structurally complex test inputs. In 29th International Conference on Software Engineering (ICSE’07). 771–774.
[43]
Suhas Pai, Yash Sharma, Sunil Kumar, Radhika M Pai, and Sanjay Singh. 2011. Formal verification of OAuth 2.0 using Alloy framework. In 2011 International Conference on Communication Systems and Network Technologies. 655–659.
[44]
Karen E Petrie, Barbara M Smith, and Neil Yorke-Smith. 2004. Dynamic symmetry breaking in constraint programming and linear programming hybrids. In European starting AI researcher symp.
[45]
John A Rice. 2007. Mathematical statistics and data analysis, 3rd Edition. Thomson Higher Education.
[46]
Bas Schaafsma, Marijn JH Heule, and Hans Van Maaren. 2009. Dynamic symmetry breaking by simulating zykov contraction. In International Conference on Theory and Applications of Satisfiability Testing. 223–236.
[47]
Shubham Sharma, Subhajit Roy, Mate Soos, and Kuldeep S Meel. 2019. GANAK: a scalable probabilistic exact model counter. In Proceedings of the 28th International Joint Conference on Artificial Intelligence. 1169–1176.
[48]
Ilya Shlyakhter. 2007. Generating effective symmetry-breaking predicates for search problems. Discrete Applied Mathematics, 155, 12 (2007), 1539–1548.
[49]
Ilya Shlyakhter. 2007. Generating effective symmetry-breaking predicates for search problems. Discrete Applied Mathematics, 155, 12 (2007), 1539–1548.
[50]
Michael Sipser. 1983. A complexity theoretic approach to randomness. In Proceedings of the fifteenth annual ACM symposium on Theory of computing. 330–335.
[51]
Mate Soos and Kuldeep S Meel. 2019. Bird: Engineering an efficient CNF-XOR sat solver and its applications to approximate model counting. In Proceedings of the AAAI Conference on Artificial Intelligence. 33, 1592–1599.
[52]
Takahisa Toda and Takehide Soh. 2016. Implementing efficient all solutions SAT solvers. Journal of Experimental Algorithmics (JEA), 21 (2016), 1–44.
[53]
Emina Torlak. 2009. A constraint solver for software engineering: finding models and cores of large relational specifications. Ph. D. Dissertation. Massachusetts Institute of Technology.
[54]
Emina Torlak and Daniel Jackson. 2007. Kodkod: A relational model finder. In International Conference on Tools and Algorithms for the Construction and Analysis of Systems. 632–647.
[55]
Dat Hoang Tran and Ryuhei Uehara. 2020. Efficient enumeration of non-isomorphic ptolemaic graphs. In International Workshop on Algorithms and Computation. 296–307.
[56]
Caroline Trippel, Daniel Lustig, and Margaret Martonosi. 2018. Checkmate: Automated synthesis of hardware exploits and security litmus tests. In 2018 51st Annual IEEE/ACM International Symposium on Microarchitecture (MICRO). 947–960.
[57]
Muhammad Usman, Wenxi Wang, and Sarfraz Khurshid. 2020. TestMC: testing model counters using differential and metamorphic testing. In Proceedings of the 35th IEEE/ACM International Conference on Automated Software Engineering. 709–721.
[58]
Timothy Van Bremen, Vincent Derkinderen, Shubham Sharma, Subhajit Roy, and Kuldeep S Meel. 2021. Symmetric Component Caching for Model Counting on Combinatorial Instances. In Proceedings of the AAAI Conference on Artificial Intelligence. 35, 3922–3930.
[59]
Willem Visser, Corina S Pǎsǎreanu, and Sarfraz Khurshid. 2004. Test input generation with Java PathFinder. In Proceedings of the 2004 ACM SIGSOFT international symposium on Software testing and analysis. 97–107.
[60]
Wenxi Wang, Muhammad Usman, Alyas Almaawi, Kaiyuan Wang, Kuldeep S Meel, and Sarfraz Khurshid. 2020. A Study of Symmetry Breaking Predicates and Model Counting. In International Conference on Tools and Algorithms for the Construction and Analysis of Systems. 115–134.
[61]
Wei Wei and Bart Selman. 2005. A new approach to model counting. In International Conference on Theory and Applications of Satisfiability Testing. 324–339.
[62]
Jiayi Yang, Wenxi Wang, Darko Marinov, and Sarfraz Khurshid. 2020. AlloyMC: Alloy Meets Model Counting. In 28th ACM Joint European Software Engineering Conference and Symposium on the Foundations of Software Engineering, Demo Papers. 1541–1545.

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
ESEC/FSE 2022: Proceedings of the 30th ACM Joint European Software Engineering Conference and Symposium on the Foundations of Software Engineering
November 2022
1822 pages
ISBN:9781450394130
DOI:10.1145/3540250
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than the author(s) must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected].

Sponsors

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 09 November 2022

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. Alloy specifications
  2. Permutation Sampling
  3. Symmetry Breaking

Qualifiers

  • Research-article

Conference

ESEC/FSE '22
Sponsor:

Acceptance Rates

Overall Acceptance Rate 112 of 543 submissions, 21%

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • 0
    Total Citations
  • 215
    Total Downloads
  • Downloads (Last 12 months)123
  • Downloads (Last 6 weeks)18
Reflects downloads up to 26 Jan 2025

Other Metrics

Citations

View Options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Login options

Figures

Tables

Media

Share

Share

Share this Publication link

Share on social media