Proceedings

Layered and Staged Monte Carlo Tree Search for SMT Strategy Synthesis

Download BibTeX Cite

Proceedings of the Thirty-Third International Joint Conference on Artificial Intelligence. Main Track. Pages 1907-1915.

https://doi.org/10.24963/ijcai.2024/211

Abstract

Modern SMT solvers, such as Z3, offer user-controllable strategies that allow solver users the ability to tailor solving strategies for their unique set of instances, thus dramatically enhancing the solver performance for their specific use cases. 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 automated 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 Z3.

  1. [Balunovic et al., 2018] Mislav Balunovic, Pavol Bielik, and Martin Vechev. Learning to solve SMT formulas. In Advances in Neural Information Processing Systems 31, pages 10337-10348.
  2. [Barrett et al., 2016] Clark Barrett, Pascal Fontaine, and Ce- sare Tinelli. The satisfiability modulo theories library (SMT-LIB). http://smtlib.cs.uiowa.edu/index.shtml, 2016. Accessed: 2024-01-16. Link
  3. [Berzish et al., 2017] Murphy Berzish, Vijay Ganesh, and Yunhui Zheng. Z3str3: A string solver with theory-aware heuristics. In 2017 Formal Methods in Computer Aided Design (FMCAD), pages 55-59. IEEE, 2017.
  4. [Berzish et al., 2021] Murphy Berzish, Mitja Kulczynski, Federico Mora, Florin Manea, Joel D Day, Dirk Nowotka, and Vijay Ganesh. An SMT solver for regular expressions and linear arithmetic over string length. In International Conference on Computer Aided Verification, pages 289- 312. Springer, 2021.
  5. [Bobot et al., 2023] Franc ¸ois Bobot, Martin Bromberger, and Jochen Hoenicke. SMT-COMP 2023. https:// smt-comp.github.io/2023/, 2023. Accessed: 2024-01-16. Link
  6. [Browne et al., 2012] Cameron B Browne, Edward Pow- ley, Daniel Whitehouse, Simon M Lucas, Peter I Cowl- ing, Philipp Rohlfshagen, Stephen Tavener, Diego Perez, Spyridon Samothrakis, and Simon Colton. A survey of monte carlo tree search methods. IEEE Transactions on Computational Intelligence and AI in games, 4(1):1-43, 2012.
  7. [Cadar et al., 2008] Cristian Cadar, Vijay Ganesh, Peter M Pawlowski, David L Dill, and Dawson R Engler. EXE: Au- tomatically generating inputs of death. ACM Transactions on Information and System Security (TISSEC), 12(2):1- 38, 2008.
  8. [Cameron et al., 2022] Chris Cameron, Jason Hartford, Tay- lor Lundy, Tuan Truong, Alan Milligan, Rex Chen, and Kevin Leyton-Brown. Monte carlo forest search: UNSAT solver synthesis via reinforcement learning. arXiv preprint arXiv:2211.12581, 2022.
  9. [Chen et al., 2021] Zhenbang Chen, Zehua Chen, Ziqi Shuai, Guofeng Zhang, Weiyu Pan, Yufeng Zhang, and Ji Wang. Synthesize solving strategy for symbolic execu- tion. In Proceedings of the 30th ACM SIGSOFT Interna- tional Symposium on Software Testing and Analysis, pages 348-360, 2021.
  10. [De Moura and Bjørner, 2008] Leonardo De Moura and Nikolaj Bjørner. Z3: An efficient SMT solver. In In- ternational conference on Tools and Algorithms for the Construction and Analysis of Systems, pages 337-340. Springer, 2008.
  11. [De Moura and Bjørner, 2011] Leonardo De Moura and Nikolaj Bjørner. Satisfiability modulo theories: intro- duction and applications. Communications of the ACM, 54(9):69-77, 2011.
  12. [De Moura and Passmore, 2013] Leonardo De Moura and Grant Olney Passmore. The strategy challenge in SMT solving. Automated Reasoning and Mathematics: Essays in Memory of William W. McCune, pages 15-44, 2013.
  13. [De Waard et al., 2016] Maarten De Waard, Diederik M Roi- jers, and Sander CJ Bakkes. 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.
  14. [Gelly and Silver, 2011] Sylvain Gelly and David Silver. Monte-carlo tree search and rapid action value estima- tion in computer go. Artificial Intelligence, 175(11):1856- 1875, 2011.
  15. [Gurfinkel et al., 2015] Arie Gurfinkel, Temesghen Kahsai, Anvesh Komuravelli, and Jorge A Navas. The SeaHorn verification framework. In International Conference on Computer Aided Verification, pages 343-361. Springer, 2015.
  16. [Jha et al., 2024] Piyush Jha, Zhengyu Li, Zhengyang Lu, Curtis Bright, and Vijay Ganesh. AlphaMapleSAT: An MCTS-based cube-and-conquer SAT solver for hard com- binatorial problems. arXiv preprint arXiv:2401.13770, 2024.
  17. [Johanson, 2013] Michael Johanson. Measuring the size of large no-limit poker games. arXiv preprint arXiv:1302.7008, 2013.
  18. [Khalil et al., 2022] Elias B Khalil, Pashootan Vaezipoor, and Bistra Dilkina. Finding backdoors to integer pro- grams: a monte carlo tree search framework. In Proceed- ings of the AAAI Conference on Artificial Intelligence, vol- ume 36, pages 3786-3795, 2022.
  19. [Kocsis and Szepesvári, 2006] Levente Kocsis and Csaba Szepesvári. Bandit based monte-carlo planning. In Eu- ropean conference on machine learning, pages 282-293. Springer, 2006.
  20. [Koza, 1994] John R Koza. Genetic programming as a means for programming computers by natural selection. Statistics and computing, 4:87-112, 1994.
  21. [Kroening and Strichman, 2016] Daniel Kroening and Ofer Strichman. Decision Procedures: An Alogorithm Point of View. Springer, 2016.
  22. [Lu, 2023] Zhengyang Lu. AlphaSMT: A reinforcement learning guided SMT solver. Master's thesis, University of Waterloo, 2023.
  23. [Mankowitz et al., 2023] Daniel J Mankowitz, Andrea Michi, Anton Zhernov, Marco Gelmi, Marco Selvi, Cosmin Paduraru, Edouard Leurent, Shariq Iqbal, Jean- Baptiste Lespiau, Alex Ahern, et al. Faster sorting algorithms discovered using deep reinforcement learning. Nature, 618(7964):257-263, 2023.
  24. [Microsoft, 2023] Microsoft. Online Z3 guide. https:// microsoft.github.io/z3guide/, 2023. Accessed: 2024-01- 16. Link
  25. [Mora et al., 2021] Federico Mora, Murphy Berzish, Mitja Kulczynski, Dirk Nowotka, and Vijay Ganesh. Z3str4: A multi-armed string solver. In Formal Methods: 24th Inter- national Symposium, FM 2021, Virtual Event, November 20-26, 2021, Proceedings 24, pages 389-406. Springer, 2021.
  26. [Poole and Mackworth, 2010] David L Poole and Alan K Mackworth. Artificial Intelligence: foundations of com- putational agents. Cambridge University Press, 2010.
  27. [Pulina and Tacchella, 2012] Luca Pulina and Armando Tac- chella. Challenging SMT solvers to verify neural net- works. Ai Communications, 25(2):117-135, 2012.
  28. [Ramírez et al., 2016] Nicolás Gálvez Ramírez, Youssef Hamadi, Eric Monfroy, and Frédéric Saubion. Evolving SMT strategies. In 2016 IEEE 28th International Confer- ence on Tools with Artificial Intelligence (ICTAI), pages 247-254. IEEE, 2016.
  29. [Robbins, 1952] Herbert Robbins. Some aspects of the se- quential design of experiments. Bull. Amer. Math. Soc., 58(5):527-535, 1952.
  30. [Ross et al., 2011] Stéphane Ross, Geoffrey Gordon, and Drew Bagnell. A reduction of imitation learning and struc- tured prediction to no-regret online learning. In Proceed- ings of the fourteenth international conference on artificial intelligence and statistics, pages 627-635. JMLR Work- shop and Conference Proceedings, 2011.
  31. [Sabharwal et al., 2012] Ashish Sabharwal, Horst Samu- lowitz, and Chandra Reddy. Guiding combinatorial op- timization with UCT. In Integration of AI and OR Tech- niques in Contraint Programming for Combinatorial Opti- mzation Problems: 9th International Conference, CPAIOR 2012, Nantes, France, May 28-June1, 2012. Proceedings 9, pages 356-361. Springer, 2012.
  32. [Silver et al., 2016] David Silver, Aja Huang, Chris J Maddi- son, Arthur Guez, Laurent Sifre, George Van Den Driess- che, Julian Schrittwieser, Ioannis Antonoglou, Veda Pan- neershelvam, Marc Lanctot, et al. Mastering the game of go with deep neural networks and tree search. nature, 529(7587):484-489, 2016.
  33. [Silver et al., 2017] David Silver, Thomas Hubert, Julian Schrittwieser, Ioannis Antonoglou, Matthew Lai, Arthur Guez, Marc Lanctot, Laurent Sifre, Dharshan Kumaran, Thore Graepel, et al. Mastering chess and shogi by self-play with a general reinforcement learning algorithm. arXiv preprint arXiv:1712.01815, 2017.
  34. [Song et al., 2008] Dawn Song, David Brumley, Heng Yin, Juan Caballero, Ivan Jager, Min Gyung Kang, Zhenkai Liang, James Newsome, Pongsin Poosankam, and Prateek Saxena. BitBlaze: A new approach to computer secu- rity via binary analysis. In Information Systems Security: 4th International Conference, ICISS 2008, Hyderabad, In- dia, December 16-20, 2008. Proceedings 4, pages 1-25. Springer, 2008.
  35. [Sun et al., 2023] Fangzheng Sun, Yang Liu, Jian-Xun Wang, and Hao Sun. Symbolic physics learner: Discov- ering governing equations via monte carlo tree search. In The Eleventh International Conference on Learning Rep- resentations, ICLR 2023, Kigali, Rwanda, May 1-5, 2023. OpenReview.net, 2023.
  36. [Sutton et al., 1999] Richard S Sutton, Doina Precup, and Satinder Singh. Between MDPs and semi-MDPs: A framework for temporal abstraction in reinforcement learning. Artificial intelligence, 112(1-2):181-211, 1999.
  37. [Zhang et al., 2018] Zhenya Zhang, Gidon Ernst, Sean Sed- wards, Paolo Arcaini, and Ichiro Hasuo. Two-layered fal- sification of hybrid systems guided by monte carlo tree search. IEEE Transactions on Computer-Aided Design of Integrated Circuits and Systems, 37(11):2894-2905, 2018.

References were extracted automatically from the PDF and may contain errors.

Welcome Future Conferences AI Journal Division IJCAI Proceedings About IJCAI IJCAI Awards