Skip to main content

Solving SMT over Non-linear Real Arithmetic via Numerical Sampling and Symbolic Verification

  • Conference paper
  • First Online:
Dependable Software Engineering. Theories, Tools, and Applications (SETTA 2023)

Abstract

Popular SMT solvers have achieved great success in tackling Nonlinear Real Arithmetic (NRA) problems, but they struggle when dealing with literals involving highly nonlinear polynomials. Current symbolic-numerical algorithms can efficiently handle the conjunction of highly nonlinear literals but are limited in addressing complex logical structures in satisfiability problems. This paper proposes a new algorithm for SMT(NRA), providing an efficient solution to satisfiability problems with highly nonlinear literals. When given an NRA formula, the new algorithm employs a random sampling algorithm first to obtain a floating-point sample that approximates formula satisfaction. Then, based on this sample, the formula is simplified according to some strategies. We apply a DPLL(T)-based process to all equalities in the formula, decomposing them into several groups of equalities. A fast symbolic algorithm is then used to obtain symbolic samples from the equality sets and verify whether the samples also satisfy the inequalities. It is important to note that we adopt a sampling and rapid verification approach instead of the sampling and conflict analysis steps in some complete algorithms. Consequently, if our algorithm fails to verify the satisfiability, it terminates and returns ‘unknown’. We validated the effectiveness of our algorithm on instances from SMTLIB and the literature. The results indicate that our algorithm exhibits significant advantages on SMT(NRA) formulas with high-degree polynomials, and thus can be a good complement to popular SMT solvers as well as other symbolic-numerical algorithms.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 59.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 79.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Notes

  1. 1.

    \(d=10^{-2}\) has nothing special. In our experiment, the numbers between \(10^{-1}\) and \(10^{-5}\) make no significant difference. We just need a number several orders of magnitude larger than the precision of the numerical algorithm here.

  2. 2.

    The function, IncreasePrecision, escalates the precision level of the cube by a factor of \(2^{-8}\). After 5 iterations, the precision ascends by a factor of \(2^{-40}\), which, as per our judgment, is deemed adequate.

  3. 3.

    https://clc-gitlab.cs.uiowa.edu:2443/SMT-LIB-benchmarks/QF_NRA.

  4. 4.

    https://gitee.com/wuyulunPM/etsolver.

  5. 5.

    https://www.math.uic.edu/~jan.

References

  1. Collins, G.E.: Quantifier elimination for real closed fields by cylindrical algebraic decomposition: a synopsis. ACM SIGSAM Bull. 10(1), 10–12 (1976)

    Article  Google Scholar 

  2. Mouraford, R., Davenport, J.H., England, M., McCallum, S., Wilson, D.: Truth table invariant cylindrical algebraic decomposition. J. Symb. Comput. 76, 1–35 (2016)

    Article  MathSciNet  Google Scholar 

  3. de Moura, L., Jovanović, D.: A model-constructing satisfiability calculus. In: Giacobazzi, R., Berdine, J., Mastroeni, I. (eds.) Verification, Model Checking, and Abstract Interpretation, pp. 1–12 (2013)

    Google Scholar 

  4. Jovanović, D., de Moura, L.: Solving non-linear arithmetic. In: Gramlich, B., Miller, D., Sattler, U. (eds.) Automated Reasoning, pp. 339–354 (2012)

    Google Scholar 

  5. De Moura, L., Bjørner, N.: Z3: an efficient SMT solver. In: TACAS, pp. 337–340 (2008)

    Google Scholar 

  6. Barbosa, H., et al.: CVC5: a versatile and industrial-strength SMT solver. In: TACAS, pp. 415–442 (2022)

    Google Scholar 

  7. Dutertre, B.: Yices 2.2. In: CAV, pp. 737–744 (2014)

    Google Scholar 

  8. Cimatti, A., Griggio, A., Schaafsma, B.J., Sebastiani, R.: The MathSAT5 SMT solver. In: Piterman, N., Smolka, S.A. (eds.) TACAS 2013. LNCS, vol. 7795, pp. 93–107. Springer, Heidelberg (2013). https://doi.org/10.1007/978-3-642-36742-7_7

    Chapter  Google Scholar 

  9. Gao, S., Kong, S., Clarke, E.M.: dReal: an SMT solver for nonlinear theories over the reals. In: Bonacina, M.P. (ed.) CADE 2013. LNCS (LNAI), vol. 7898, pp. 208–214. Springer, Heidelberg (2013). https://doi.org/10.1007/978-3-642-38574-2_14

    Chapter  Google Scholar 

  10. Li, H., Xia, B., Zhao, T.: Local search for solving satisfiability of polynomial formulas. In: Enea, C., Lal, A. (eds.) CAV, pp. 87–109 (2023)

    Google Scholar 

  11. Li, B., Cai, S.: Local search for SMT on linear and multilinear real arithmetic, arXiv preprint arXiv:2303.06676 (2023)

  12. Cimatti, A., Griggio, A., Lipparini, E., Sebastiani, R.: Handling polynomial and transcendental functions in SMT via unconstrained optimisation and topological degree test. In: Bouajjani, A., Holík, L., Wu, Z. (eds.) ATVA 2022. LNCS, vol. 13505, pp. 137–153. Springer, Cham (2022). https://doi.org/10.1007/978-3-031-19992-9_9

    Chapter  Google Scholar 

  13. Wu, W.-T.: On the decision problem and the mechanization of theorem proving in elementary geometry. Sci. Sinica 21(2), 159–172 (1978)

    MathSciNet  Google Scholar 

  14. Buchberger, B.: Ein Algorithmus zum Auffinden der Basiselemente des Restklassenringes nach einem nulldimensionalen Polynomideal. Ph.D. thesis, Math. Inst., University of Innsbruck (1965)

    Google Scholar 

  15. Bose, N.K.: Gröbner bases: an algorithmic method in polynomial ideal theory. In: Buchberger, B. (ed.) Multidimensional Systems Theory and Applications, pp. 89–127. Springer, Dordrecht (1985). https://doi.org/10.1007/978-94-017-0275-1_4

    Chapter  Google Scholar 

  16. Li, T.-Y.: Numerical solution of multivariate polynomial systems by homotopy continuation methods. Acta Numerica 6, 399–436 (1997)

    Article  MathSciNet  Google Scholar 

  17. Lasserre, J.B., Laurent, M., Rostalski, P.: Semidefinite characterization and computation of zero-dimensional real radical ideals. Found. Comput. Math. 8, 607–647 (2008)

    Article  MathSciNet  Google Scholar 

  18. Yang, Z., Zhi, L., Zhu, Y.: Verified error bounds for real solutions of positive-dimensional polynomial systems. In: Proceedings of ISSAC, pp. 371–378 (2013)

    Google Scholar 

  19. Yang, Z., Zhao, H., Zhi, L.: Verifyrealroots: a matlab package for computing verified real solutions of polynomials systems of equations and inequalities. J. Syst. Sci. Compl. 36(2), 866–883 (2023)

    Article  MathSciNet  Google Scholar 

  20. Eriksson, F.: Which triangles are plane sections of regular tetrahedra? Amer. Math. Monthly 101(8), 788–789 (1994)

    Article  MathSciNet  Google Scholar 

  21. Li, H., Xia, B., Zhao, T.: Square-free pure triangular decomposition of zero-dimensional polynomial systems. J. Syst. Sci. Compl. (2023)

    Google Scholar 

  22. Xia, B., Zhang, T.: Real solution isolation using interval arithmetic. Comput. Math. Appl. 52(6), 853–860 (2006)

    Article  MathSciNet  Google Scholar 

  23. Xia, B., Yang, L.: Automated Inequality Proving and Discovering. World Scientific (2016)

    Google Scholar 

Download references

Acknowledgements

This work was supported by the National Key R & D Program of China (No. 2022YFA1005102).

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Bican Xia .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2024 The Author(s), under exclusive license to Springer Nature Singapore Pte Ltd.

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Ni, X., Wu, Y., Xia, B. (2024). Solving SMT over Non-linear Real Arithmetic via Numerical Sampling and Symbolic Verification. In: Hermanns, H., Sun, J., Bu, L. (eds) Dependable Software Engineering. Theories, Tools, and Applications. SETTA 2023. Lecture Notes in Computer Science, vol 14464. Springer, Singapore. https://doi.org/10.1007/978-981-99-8664-4_10

Download citation

  • DOI: https://doi.org/10.1007/978-981-99-8664-4_10

  • Published:

  • Publisher Name: Springer, Singapore

  • Print ISBN: 978-981-99-8663-7

  • Online ISBN: 978-981-99-8664-4

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics