XSat: A Fast Floating-Point Satisfiability Solver
The Satisfiability Modulo Theory (SMT) problem over floating-point arithmetic is a major hurdle in applying SMT techniques to real-world floating-point code. Solving floating-point constraints is challenging in part because floating-point semantics is difficult to specify or abstract. State-of-the-art SMT solvers still often run into difficulties when solving complex, non-linear floating-point constraints.
This paper proposes a new approach to SMT solving that does not need to directly reason about the floating-point semantics. Our insight is to establish the equivalence between floating-point satisfiability and a class of mathematical optimization (MO) problems known as unconstrained MO. Our approach (1) systematically reduces floating-point satisfiability to MO, and (2) solves the latter via the Monte Carlo Markov Chain (MCMC) method.
We have compared our implementation, XSat, with MathSat, Z3 and Coral, state-of-the-art solvers that support floating-point arithmetic. Evaluated on 34 representative benchmarks from the SMT-Competition 2015, XSat significantly outperforms these solvers. In particular, it provides both 100 % consistent satisfiability results as MathSat and Z3, and an average speedup of more than 700X over MathSat and Z3, while Coral provides inconsistent results on 16 of the benchmarks.
KeywordsMonte Carlo Markov Chain Minimum Point Mathematical Optimization Symbolic Execution Satisfiability Modulo Theory
We thank the anonymous reviewers for their useful comments on earlier versions of this paper. Our special thanks go to Viktor Kuncak for his thoughtful feedback. This work was supported in part by NSF Grant No. 1349528. The information presented here does not necessarily reflect the position or the policy of the Government and no official endorsement should be inferred.
- 1.Benchmarks of the QF_FP track in SMT-COMP (2015). http://www.cs.nyu.edu/~barrett/smtlib/QF_FP_Hierarchy.zip. Accessed 29 Jan 2016
- 2.Boost c++ libraries. www.boost.org/. Accessed 27 Jan 2016
- 3.Coral input language. http://pan.cin.ufpe.br/coral/InputLanguage.html. Accessed 24 Jan 2016
- 4.The GNU C library (glibc). https://www.gnu.org/software/libc/. Accessed 28 Jan 2016
- 5.The main page for Java Pathfinder. http://babelfish.arc.nasa.gov/trac/jpf. Accessed 29 Jan 2016
- 6.Scipy optimization package. http://docs.scipy.org/doc/scipy-dev/reference/optimize.html#module-scipy.optimize. Accessed 29 Jan 2016
- 7.SMT-COMP (2015). http://smtcomp.sourceforge.net/2015/. Accessed 24 Jan 2016
- 8.Z3py API. http://z3prover.github.io/api/html/namespacez3py.html. Accessed 29 Jan 2016
- 10.Borges, M., d’Amorim, M., Anand, S., Bushnell, D., Pasareanu, C.S.: Symbolic execution with interval solving and meta-heuristic search. In: Proceedings of the 2012 IEEE Fifth International Conference on Software Testing, Verification and Validation, ICST 2012, Washington, DC, USA, pp. 111–120. IEEE Computer Society (2012)Google Scholar
- 11.Brillout, A., Kroening, D., Wahl, T.: Mixed abstractions for floating-point arithmetic. In: FMCAD, pp. 69–76 (2009)Google Scholar
- 12.Chen, Y., Zhendong, S.: Guided differential testing of certificate validation in SSL/TLS implementations. In: Proceedings of the 2015 10th Joint Meeting on Foundations of Software Engineering, ESEC/FSE 2015, Bergamo, Italy, 30 August–4 September 2015, pp. 793–804 (2015)Google Scholar
- 13.Chib, S., Greenberg, E.: Understanding the metropolis-hastings algorithm. Am. Stat. 49(4), 327–335 (1995)Google Scholar
- 18.Zhoulai, F., Bai, Z., Zhendong, S.: Automated backward error analysis for numerical code. In: OOPSLA, pp. 639–654 (2015)Google Scholar
- 22.Goldwasser, D., Strichman, O., Fine, S.: A theory-based decision heuristic for DPLL(T). In: FMCAD, pp. 1–8 (2008)Google Scholar
- 23.Haller, L., Griggio, A., Brain, M., Kroening, D.: Deciding floating-point logic with systematic abstraction. In: FMCAD, pp. 131–140 (2012)Google Scholar
- 24.Bayardo Jr., R.J., Schrag, R.: Using CSP look-back techniques to solve real-world SAT instances. In: Proceedings of the Fourteenth National Conference on Artificial Intelligence and Ninth Innovative Applications of Artificial Intelligence Conference, AAAI 1997, IAAI 1997, 27–31 July 1997, pp. 203–208. Providence, Rhode Island (1997)Google Scholar
- 29.Li, Z., Scheraga, H.A.: Monte Carlo-minimization approach to the multiple-minima problem in protein folding. In: Proceedings of the National Academy of Sciences of the United States of America, vol. 84, No. 19, pp. 6611–6615 (1987)Google Scholar
- 37.Rümmer, P., Wahl, T.: An SMT-LIB theory of binary floating-point arithmetic. In: Informal proceedings of 8th International Workshop on Satisfiability Modulo Theories (SMT) at FLoC, Edinburgh, Scotland (2010)Google Scholar
- 38.Schkufza, E., Sharma, R., Aiken, A.: Stochastic optimization of floating-point programs with tunable precision. In: PLDI, pp. 53–64 (2014)Google Scholar