Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
research-article

Neural Solving Uninterpreted Predicates with Abstract Gradient Descent

Published: 03 December 2024 Publication History

Abstract

Uninterpreted predicate solving is a fundamental problem in formal verification, including loop invariant and constrained horn clauses predicate solving. Existing approaches have been mostly in symbolic ways. While achieving sustainable progress, they still suffer from inefficiency and seem unable to leverage the ever-increasing computility, such as GPU. Recently, neural relaxation has been proposed to tackle this problem. They treat the uninterpreted predicate-solving task as an optimization problem by relaxing the discrete search process into a learning process of neural networks. However, two bottlenecks keep them from being valid. First, relaxed neural networks cannot match the original semantics of predicates rigorously; second, the neural networks are difficult to train to reach global optimization. Therefore, this article presents a novel discrete neural architecture with the Abstract Gradient Decent (AGD) algorithm to directly solve uninterpreted predicates in the discrete hypothesis space. The abstract gradient is for discrete neurons whose calculation rules are designed in an abstract domain. Our approach conforms to the original semantics of predicates, and the proposed AGD algorithm can achieve global optimization satisfactorily. We implement the tool Dasp in the Boxes abstract domain to solve uninterpreted predicates in the QF-NIA SMT theory. In the experiments, Dasp has outperformed seven state-of-the-art tools across three predicate synthesis tasks.

References

[1]
Haniel Barbosa, Clark W. Barrett, Martin Brain, Gereon Kremer, Hanna Lachnitt, Makai Mann, Abdalrhman Mohamed, Mudathir Mohamed, Aina Niemetz, Andres Nötzli, Alex Ozdemir, Mathias Preiner, Andrew Reynolds, Ying Sheng, Cesare Tinelli, and Yoni Zohar. 2022. cvc5: A Versatile and Industrial-Strength SMT Solver. In Proceedings of the Tools and Algorithms for the Construction and Analysis of Systems—28th International Conference, TACAS 2022, Held as Part of the European Joint Conferences on Theory and Practice of Software (ETAPS ’22), Part I (Lecture Notes in Computer Science), Vol. 13243. Dana Fisman and Grigore Rosu (Eds.), Springer, 415–442. DOI:
[2]
Clark Barrett, Pascal Fontaine, and Cesare Tinelli. 2016. The Satisfiability Modulo Theories Library (SMT-LIB). Retrieved from www.SMT-LIB.org.
[3]
Clark W. Barrett, Roberto Sebastiani, Sanjit A. Seshia, and Cesare Tinelli. 2021. Satisfiability Modulo Theories. In Handbook of Satisfiability (2nd ed.), Frontiers in Artificial Intelligence and Applications, Vol. 336. Armin Biere, Marijn Heule, Hans van Maaren, and Toby Walsh (Eds.), IOS Press, 1267–1329. DOI:
[4]
Julien Bertrane, Patrick Cousot, Radhia Cousot, Jérôme Feret, Laurent Mauborgne, Antoine Miné, and Xavier Rival. 2015. Static Analysis and Verification of Aerospace Software by Abstract Interpretation. Foundations and Trends in Programming Languages 2, 2–3 (2015), 71–190. DOI:
[5]
Ahmed Bouajjani, Wael-Amine Boutglay, and Peter Habermehl. 2022. Data-Driven Numerical Invariant Synthesis with Automatic Generation of Attributes. In Proceedings of the Computer Aided Verification—34th International Conference (CAV ’22), Part I (Lecture Notes in Computer Science), Vol. 13371. Sharon Shoham and Yakir Vizel (Eds.), Springer, 282–303. DOI:
[6]
Jörg Brauer, Thomas Noll, and Bastian Schlich. 2010. Interval Analysis of Microcontroller Code Using Abstract Interpretation of Hardware and Software. In Proceedings of the 13th International Workshop on Software & Compilers for Embedded Systems. 1–10.
[7]
Shaowei Cai, Bohan Li, and Xindi Zhang. 2023. Local Search for Satisfiability Modulo Integer Arithmetic Theories. ACM Transactions on Computational Logic 24, 4, Article 32 (July 2023), 26 pages. DOI:
[8]
Swarat Chaudhuri, Kevin Ellis, Oleksandr Polozov, Rishabh Singh, Armando Solar-Lezama, and Yisong Yue. 2021. Neurosymbolic Programming. Foundations and Trends in Programming Languages 7, 3 (2021), 158–243. DOI:
[9]
Liqian Chen, Jiangchao Liu, Antoine Miné, Deepak Kapur, and Ji Wang. 2014. An Abstract Domain to Infer Octagonal Constraints with Absolute Value. In Static Analysis. Markus Müller-Olm and Helmut Seidl (Eds.), Springer International Publishing, Cham, 101–117.
[10]
Yu-Fang Chen, Chih-Duo Hong, Bow-Yaw Wang, and Lijun Zhang. 2015. Counterexample-Guided Polynomial Loop Invariant Generation by Lagrange Interpolation. In Proceedings of the Computer Aided Verification—27th International Conference (CAV’15), Part I (Lecture Notes in Computer Science), Vol. 9206. Daniel Kroening and Corina S. Pasareanu (Eds.), Springer, 658–674. DOI:
[11]
Alonzo Church. 1963. Applications of Recursive Arithmetic to the Problem of Circuit Synthesis. The Journal of Symbolic Logic 28, 4 (1963), 289–290. DOI:
[12]
Patrick Cousot. 1996. Abstract Interpretation. ACM Computing Surveys (CSUR) 28, 2 (1996), 324–328.
[13]
Patrick Cousot and Radhia Cousot. 1977a. Abstract Interpretation: A Unified Lattice Model for Static Analysis of Programs by Construction or Approximation of Fixpoints. In Proceedings of the Conference Record of the 4th ACM Symposium on Principles of Programming Languages. Robert M. Graham, Michael A. Harrison, and Ravi Sethi (Eds.), ACM, New York, NY, 238–252. DOI:
[14]
Patrick Cousot and Radhia Cousot. 1977b. Abstract Interpretation: A Unified Lattice Model for Static Analysis of Programs by Construction or Approximation of Fixpoints. In Proceedings of the 4th ACM SIGACT-SIGPLAN Symposium on Principles of Programming Languages. 238–252.
[15]
Guofeng Cui and He Zhu. 2021. Differentiable Synthesis of Program Architectures. In Proceedings of the Advances in Neural Information Processing Systems 34: Annual Conference on Neural Information Processing Systems 2021 (NeurIPS’21). Marc’Aurelio Ranzato, Alina Beygelzimer, Yann N. Dauphin, Percy Liang, and Jennifer Wortman Vaughan (Eds.), 11123–11135. Retrieved from https://proceedings.neurips.cc/paper/2021/hash/5c5a93a042235058b1ef7b0ac1e11b67-Abstract.html
[16]
Artur S. d’Avila Garcez, Marco Gori, Luís C. Lamb, Luciano Serafini, Michael Spranger, and Son N. Tran. 2019. Neural-Symbolic Computing: An Effective Methodology for Principled Integration of Machine Learning and Reasoning. FLAP 6, 4 (2019), 611–632. Retrieved from https://collegepublications.co.uk/ifcolog/?00033
[17]
Isil Dillig, Thomas Dillig, Boyang Li, and Kenneth L. McMillan. 2013. Inductive Invariant Generation Via Abductive Inference. In Proceedings of the 2013 ACM SIGPLAN International Conference on Object Oriented Programming Systems Languages & Applications (OOPSLA ’13). Antony L. Hosking, Patrick Th. Eugster, and Cristina V. Lopes (Eds.), ACM, New York, NY, 443–456. DOI:
[18]
David A. Duffy. 1991. Principles of Automated Theorem Proving. Wiley.
[19]
Marc Fischer, Mislav Balunovic, Dana Drachsler-Cohen, Timon Gehr, Ce Zhang, and Martin T. Vechev. 2019. DL2: Training and Querying Neural Networks with Logic. In Proceedings of the 36th International Conference on Machine Learning (ICML ’19), Vol. 97. Kamalika Chaudhuri and Ruslan Salakhutdinov (Eds.), PMLR, 1931–1941. DOI: http://proceedings.mlr.press/v97/fischer19a.html
[20]
Pranav Garg, Christof Löding, P. Madhusudan, and Daniel Neider. 2014. ICE: A Robust Framework for Learning Invariants. In Proceedings of the Computer Aided Verification—26th International Conference, CAV 2014, Held as Part of the Vienna Summer of Logic (VSL ’14) (Lecture Notes in Computer Science), Vol. 8559. Armin Biere and Roderick Bloem (Eds.), Springer, 69–87. DOI:
[21]
Pranav Garg, Daniel Neider, P. Madhusudan, and Dan Roth. 2016. Learning Invariants Using Decision Trees and Implication Counterexamples. In Proceedings of the 43rd Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL ’16). Rastislav Bodík and Rupak Majumdar (Eds.), ACM, New York, NY, 499–512. DOI:
[22]
Arie Gurfinkel. 2022. Program Verification with Constrained Horn Clauses (Invited Paper). In Computer Aided Verification. Sharon Shoham and Yakir Vizel (Eds.), Springer International Publishing, Cham, 19–29.
[23]
Arie Gurfinkel and Sagar Chaki. 2010. Boxes: A Symbolic Abstract Domain of Boxes. In Proceedings of the Static Analysis—17th International Symposium (SAS ’10) (Lecture Notes in Computer Science), Vol. 6337. Radhia Cousot and Matthieu Martel (Eds.), Springer, 287–303. DOI:
[24]
Arie Gurfinkel, Temesghen Kahsai, Anvesh Komuravelli, and Jorge A. Navas. 2015. The SeaHorn Verification Framework. In Proceedings of the Computer Aided Verification—27th International Conference (CAV ’15), Part I (Lecture Notes in Computer Science), Vol. 9206. Daniel Kroening and Corina S. Pasareanu (Eds.), Springer, 343–361. DOI:
[25]
Petr Hájek. 1998. Metamathematics of Fuzzy Logic. Trends in Logic, Vol. 4. Kluwer. DOI:
[26]
C. A. R. Hoare. 1969. An Axiomatic Basis for Computer Programming. Communications of the ACM 12, 10 (1969), 576–580. DOI:
[27]
Hossein Hojjat and Philipp Rümmer. 2018. The ELDARICA Horn Solver. In Proceedings of the Formal Methods in Computer Aided Design (FMCAD ’18). Nikolaj S. Bjorner and Arie Gurfinkel (Eds.), IEEE, 1–7. DOI:
[28]
Alfred Horn. 1951. On Sentences Which Are True of Direct Unions of Algebras. Journal of Symbolic Logic 16, 1 (1951), 14–21. DOI:
[29]
Kangjing Huang, Xiaokang Qiu, Peiyuan Shen, and Yanjun Wang. 2020. Reconciling Enumerative and Deductive Program Synthesis. In Proceedings of the 41st ACM SIGPLAN International Conference on Programming Language Design and Implementation (PLDI ’20). Alastair F. Donaldson and Emina Torlak (Eds.), ACM, New York, NY, 1159–1174. DOI:
[30]
Hari Govind Vediramana Krishnan, Yuting Chen, Sharon Shoham, and Arie Gurfinkel. 2020. Global Guidance for Local Generalization in Model Checking. In Proceedings of the Computer Aided Verification—32nd International Conference (CAV ’20), Part II (Lecture Notes in Computer Science), Vol. 12225. Shuvendu K. Lahiri and Chao Wang (Eds.), Springer, 101–125. DOI:
[31]
Ton Chanh Le, Timos Antonopoulos, Parisa Fathololumi, Eric Koskinen, and ThanhVu Nguyen. 2020. DynamiTe: Dynamic Termination and Non-Termination Proofs. Proceedings of the ACM on Programming Languages 4, OOPSLA (2020), 189: 1–189:30. DOI:
[32]
Zenan Li, Zehua Liu, Yuan Yao, Jingwei Xu, Taolue Chen, Xiaoxing Ma, and Jian Lu. 2023. Learning with Logical Constraints but Without Shortcut Satisfaction. In Proceedings of the 11th International Conference on Learning Representations. Retrieved from https://openreview.net/forum?id=M2unceRvqhh
[33]
Roger Conant Lyndon. 1959. An Interpolation Theorem in the Predicate Calculus. Pacific Journal of Mathematics 9, 1 (1959), 129–142. DOI:
[34]
Antoine Miné. 2006. The Octagon Abstract Domain. Higher-Order and Symbolic Computation 19, 31–100.
[35]
Antoine Miné. 2014. Backward Under-Approximations in Numeric Abstract Domains to Automatically Infer Sufficient Program Conditions. Science of Computer Programming 93, 154–182. DOI:
[36]
Pasquale Minervini, Sebastian Riedel, Pontus Stenetorp, Edward Grefenstette, and Tim Rocktäschel. 2020. Learning Reasoning Strategies in End-to-End Differentiable Proving. In Proceedings of the 37th International Conference on Machine Learning (ICML ’20), Vol. 119. PMLR, 6938–6949. Retrieved from http://proceedings.mlr.press/v119/minervini20a.html
[37]
Yatin Nandwani, Abhishek Pathak, Mausam, and Parag Singla. 2019. A Primal Dual Formulation for Deep Learning with Constraints. In Proceedings of the Advances in Neural Information Processing Systems 32: Annual Conference on Neural Information Processing Systems 2019 (NeurIPS ’19). Hanna M. Wallach, Hugo Larochelle, Alina Beygelzimer, Florence d’Alché-Buc, Emily B. Fox, and Roman Garnett (Eds.), 12157–12168. Retrieved from https://proceedings.neurips.cc/paper/2019/hash/cf708fc1decf0337aded484f8f4519ae-Abstract.html
[38]
ThanhVu Nguyen, Timos Antonopoulos, Andrew Ruef, and Michael Hicks. 2017. Counterexample-Guided Approach to Finding Numerical Invariants. In Proceedings of the 2017 11th Joint Meeting on Foundations of Software Engineering (ESEC/FSE ’17). Eric Bodden, Wilhelm Schäfer, Arie van Deursen, and Andrea Zisman (Eds.), ACM, New York, NY, 605–615. DOI:
[39]
Matan Peled, Bat-Chen Rothenberg, and Shachar Itzhaky. 2023. SMT Sampling via Model-Guided Approximation. In Proceedings of the Formal Methods—25th International Symposium (FM ’23) (Lecture Notes in Computer Science), Vol. 14000. Marsha Chechik, Joost-Pieter Katoen, and Martin Leucker (Eds.), Springer, 74–91. DOI:
[40]
Daniel Riley and Grigory Fedyukovich. 2022a. Multi-Phase Invariant Synthesis. In Proceedings of the ACM Joint European Software Engineering Conference and Symposium on the Foundations of Software Engineering (ESEC/FSE). Retrieved from https://2022.esec-fse.org/details/fse-2022-research-papers/88/Multi-Phase-Invariant-Synthesis
[41]
Daniel Riley and Grigory Fedyukovich. 2022b. Multi-Phase Invariant Synthesis. In Proceedings of the 30th ACM Joint European Software Engineering Conference and Symposium on the Foundations of Software Engineering (ESEC/FSE ’22). Abhik Roychoudhury, Cristian Cadar, and Miryung Kim (Eds.), ACM, New York, NY, 607–619. DOI:
[42]
Enric Rodríguez-Carbonell and Deepak Kapur. 2004. An Abstract Interpretation Approach for Automatic Generation of Polynomial Invariants. In Proceedings of the Static Analysis, 11th International Symposium (SAS ’04) (Lecture Notes in Computer Science), Vol. 3148. Roberto Giacobazzi (Ed.), Springer, 280–295. DOI:
[43]
Gabriel Ryan, Justin Wong, Jianan Yao, Ronghui Gu, and Suman Jana. 2020. CLN2INV: Learning Loop Invariants with Continuous Logic Networks. In Proceedings of the 8th International Conference on Learning Representations (ICLR ’20). OpenReview.net. Retrieved from https://openreview.net/forum?id=HJlfuTEtvB
[44]
Sriram Sankaranarayanan, Michael A. Colón, Henny Sipma, and Zohar Manna. 2006. Efficient Strongly Relational Polyhedral Analysis. In Proceedings of the International Workshop on Verification, Model Checking, and Abstract Interpretation. Springer, 111–125.
[45]
Daniel Selsam, Matthew Lamm, Benedikt Bünz, Percy Liang, Leonardo de Moura, and David L. Dill. 2019. Learning a SAT Solver from Single-Bit Supervision. In Proceedings of the 7th International Conference on Learning Representations (ICLR ’19). OpenReview.net. Retrieved from https://openreview.net/forum?id=HJMC_iA5tm
[46]
Xujie Si, Hanjun Dai, Mukund Raghothaman, Mayur Naik, and Le Song. 2018. Learning Loop Invariants for Program Verification. In Proceedings of the Advances in Neural Information Processing Systems 31: Annual Conference on Neural Information Processing Systems 2018 (NeurIP ’18). Samy Bengio, Hanna M. Wallach, Hugo Larochelle, Kristen Grauman, Nicolo Cesa-Bianchi, and Roman Garnett (Eds.), 7762–7773. Retrieved from https://proceedings.neurips.cc/paper/2018/hash/65b1e92c585fd4c2159d5f33b5030ff2-Abstract.html
[47]
Jianan Yao, Gabriel Ryan, Justin Wong, Suman Jana, and Ronghui Gu. 2020. Learning Nonlinear Loop Invariants with Gated Continuous Logic Networks. In Proceedings of the 41st ACM SIGPLAN International Conference on Programming Language Design and Implementation (PLDI ’20). Alastair F. Donaldson and Emina Torlak (Eds.), ACM, New York, NY, 106–120. DOI:
[48]
Banghu Yin, Liqian Chen, Jiangchao Liu, and Ji Wang. 2020. Hierarchical Analysis of Loops With Relaxed Abstract Transformers. IEEE Transactions on Reliability 69, 1 (2020), 203–215. DOI:
[49]
Shiwen Yu, Ting Wang, and Ji Wang. 2023. Loop Invariant Inference Through SMT Solving Enhanced Reinforcement Learning. In Proceedings of the 32nd ACM SIGSOFT International Symposium on Software Testing and Analysis (ISSTA ’23). ACM, New York, NY, 175–187. DOI:

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Transactions on Software Engineering and Methodology
ACM Transactions on Software Engineering and Methodology  Volume 33, Issue 8
November 2024
975 pages
EISSN:1557-7392
DOI:10.1145/3613733
Issue’s Table of Contents

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 03 December 2024
Online AM: 02 July 2024
Accepted: 19 June 2024
Revised: 21 May 2024
Received: 01 October 2023
Published in TOSEM Volume 33, Issue 8

Check for updates

Author Tags

  1. Software verification
  2. neural relaxation
  3. uninterpreted predicate synthesis

Qualifiers

  • Research-article

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • 0
    Total Citations
  • 207
    Total Downloads
  • Downloads (Last 12 months)207
  • Downloads (Last 6 weeks)17
Reflects downloads up to 08 Feb 2025

Other Metrics

Citations

View Options

Login options

Full Access

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Full Text

View this article in Full Text.

Full Text

Figures

Tables

Media

Share

Share

Share this Publication link

Share on social media