Layered and Staged Monte Carlo Tree Search for SMT Strategy Synthesis (2401.17159v2)
Abstract: Modern SMT solvers, such as Z3, offer user-controllable strategies, enabling users to tailor solving strategies for their unique set of instances, thus dramatically enhancing solver performance for their use case. However, this approach of strategy customization presents a significant challenge: handcrafting an optimized strategy for a class of SMT instances remains a complex and demanding task for both solver developers and users alike. In this paper, we address this problem of automatic SMT strategy synthesis via a novel Monte Carlo Tree Search (MCTS) based method. Our method treats strategy synthesis as a sequential decision-making process, whose search tree corresponds to the strategy space, and employs MCTS to navigate this vast search space. The key innovations that enable our method to identify effective strategies, while keeping costs low, are the ideas of layered and staged MCTS search. These novel heuristics allow for a deeper and more efficient exploration of the strategy space, enabling us to synthesize more effective strategies than the default ones in state-of-the-art (SOTA) SMT solvers. We implement our method, dubbed Z3alpha, as part of the Z3 SMT solver. Through extensive evaluations across six important SMT logics, Z3alpha demonstrates superior performance compared to the SOTA synthesis tool FastSMT, the default Z3 solver, and the CVC5 solver on most benchmarks. Remarkably, on a challenging QF_BV benchmark set, Z3alpha solves 42.7% more instances than the default strategy in the Z3 SMT solver.
- Learning to solve SMT formulas. In Advances in Neural Information Processing Systems 31, pages 10337–10348. Curran Associates, 2018.
- The satisfiability modulo theories library (SMT-LIB). http://smtlib.cs.uiowa.edu/index.shtml, 2016. Accessed: 2024-01-16.
- Z3str3: A string solver with theory-aware heuristics. In 2017 Formal Methods in Computer Aided Design (FMCAD), pages 55–59. IEEE, 2017.
- An SMT solver for regular expressions and linear arithmetic over string length. In International Conference on Computer Aided Verification, pages 289–312. Springer, 2021.
- SMT-COMP 2023. https://smt-comp.github.io/2023/, 2023. Accessed: 2024-01-16.
- A survey of monte carlo tree search methods. IEEE Transactions on Computational Intelligence and AI in games, 4(1):1–43, 2012.
- EXE: Automatically generating inputs of death. ACM Transactions on Information and System Security (TISSEC), 12(2):1–38, 2008.
- Monte carlo forest search: UNSAT solver synthesis via reinforcement learning. arXiv preprint arXiv:2211.12581, 2022.
- Synthesize solving strategy for symbolic execution. In Proceedings of the 30th ACM SIGSOFT International Symposium on Software Testing and Analysis, pages 348–360, 2021.
- Z3: An efficient SMT solver. In International conference on Tools and Algorithms for the Construction and Analysis of Systems, pages 337–340. Springer, 2008.
- Satisfiability modulo theories: introduction and applications. Communications of the ACM, 54(9):69–77, 2011.
- The strategy challenge in SMT solving. Automated Reasoning and Mathematics: Essays in Memory of William W. McCune, pages 15–44, 2013.
- Monte carlo tree search with options for general video game playing. In 2016 IEEE Conference on Computational Intelligence and Games (CIG), pages 1–8. IEEE, 2016.
- Monte-carlo tree search and rapid action value estimation in computer go. Artificial Intelligence, 175(11):1856–1875, 2011.
- The SeaHorn verification framework. In International Conference on Computer Aided Verification, pages 343–361. Springer, 2015.
- AlphaMapleSAT: An MCTS-based cube-and-conquer SAT solver for hard combinatorial problems. arXiv preprint arXiv:2401.13770, 2024.
- Michael Johanson. Measuring the size of large no-limit poker games. arXiv preprint arXiv:1302.7008, 2013.
- Finding backdoors to integer programs: a monte carlo tree search framework. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 36, pages 3786–3795, 2022.
- Bandit based monte-carlo planning. In European conference on machine learning, pages 282–293. Springer, 2006.
- John R Koza. Genetic programming as a means for programming computers by natural selection. Statistics and computing, 4:87–112, 1994.
- Decision Procedures: An Alogorithm Point of View. Springer, 2016.
- Faster sorting algorithms discovered using deep reinforcement learning. Nature, 618(7964):257–263, 2023.
- Microsoft. Online Z3 guide. https://microsoft.github.io/z3guide/, 2023. Accessed: 2024-01-16.
- Z3str4: A multi-armed string solver. In Formal Methods: 24th International Symposium, FM 2021, Virtual Event, November 20–26, 2021, Proceedings 24, pages 389–406. Springer, 2021.
- Artificial Intelligence: foundations of computational agents. Cambridge University Press, 2010.
- Challenging SMT solvers to verify neural networks. Ai Communications, 25(2):117–135, 2012.
- Evolving SMT strategies. In 2016 IEEE 28th International Conference on Tools with Artificial Intelligence (ICTAI), pages 247–254. IEEE, 2016.
- Herbert Robbins. Some aspects of the sequential design of experiments. Bull. Amer. Math. Soc., 58(5):527–535, 1952.
- A reduction of imitation learning and structured prediction to no-regret online learning. In Proceedings of the fourteenth international conference on artificial intelligence and statistics, pages 627–635. JMLR Workshop and Conference Proceedings, 2011.
- Guiding combinatorial optimization with UCT. In Integration of AI and OR Techniques in Contraint Programming for Combinatorial Optimzation Problems: 9th International Conference, CPAIOR 2012, Nantes, France, May 28–June1, 2012. Proceedings 9, pages 356–361. Springer, 2012.
- Mastering the game of go with deep neural networks and tree search. nature, 529(7587):484–489, 2016.
- Mastering chess and shogi by self-play with a general reinforcement learning algorithm. arXiv preprint arXiv:1712.01815, 2017.
- BitBlaze: A new approach to computer security via binary analysis. In Information Systems Security: 4th International Conference, ICISS 2008, Hyderabad, India, December 16-20, 2008. Proceedings 4, pages 1–25. Springer, 2008.
- Symbolic physics learner: Discovering governing equations via monte carlo tree search. In The Eleventh International Conference on Learning Representations, ICLR 2023, Kigali, Rwanda, May 1-5, 2023. OpenReview.net, 2023.
- Between MDPs and semi-MDPs: A framework for temporal abstraction in reinforcement learning. Artificial intelligence, 112(1-2):181–211, 1999.
Collections
Sign up for free to add this paper to one or more collections.