Skip to main content
Log in

Estimating the Volume of Solution Space for Satisfiability Modulo Linear Real Arithmetic

  • Published:
Theory of Computing Systems Aims and scope Submit manuscript

Abstract

Satisfiability Modulo Theories techniques can check if a formula is satisfiable. In many cases, not only the qualitative judgment (satisfiable or not) but also the quantitative judgment (the dimension and size of the solution space) are of practical interest. For instance, the volume of path condition formula reflects the probability of the corresponding program path being taken. However, existing algorithms are not practical because they only work for small instances. Given a formula with Boolean structures, its volume is typically obtained by first decomposing it to a series of conjunctions (of linear constraints) with disjoint solution spaces and then accumulating the volume of each one. For the former step, we propose a BDD-based search algorithm which sharply reduces the number of conjunctions. For the latter one, we propose a Monte-Carlo integration with a ray-based sampling strategy, which approximates the volume efficiently and accurately. Furthermore, degenerate solution spaces, which are not considered by other algorithms, could be handled properly by ours. Experimental results show that our method can handle formulas with up to 20 variables, which will cover many practical cases in software engineering

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

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7
Fig. 8
Fig. 9
Fig. 10
Fig. 11
Fig. 12
Fig. 13

Similar content being viewed by others

Notes

  1. Since linear constraints are by default conjuncted, we use “linear constraints” short for “a conjunction of linear constraints” if no ambiguity is caused.

  2. http://en.wikipedia.org/wiki/IEEE_floating_point

  3. This is done by checking whether the maximal and minimal value of s are both 0. The technique is similar to that used for implicit equation detection, which will be introduced later in Section 4.3.

  4. http://en.wikipedia.org/wiki/Curse_of_dimensionality

  5. http://en.wikipedia.org/wiki/Gaussian_elimination

  6. http://vlsi.colorado.edu/~fabio/CUDD/

  7. http://cgm.cs.mcgill.ca/~avis/C/lrs.html

  8. The reason is that their algorithm contains constants such as 801, 1600 in nested loops. It takes hundreds of seconds to solve a 3-dimensional case.

  9. http://code.google.com/p/rvc/

References

  1. Akers, S.B.: Binary decision diagrams. IEEE Trans. Comput. 100(6), 509–516 (1978)

    Article  Google Scholar 

  2. Athreya, K.: Unit ball in high dimensions. Resonance 13(4), 334–342 (2008)

    Article  MathSciNet  Google Scholar 

  3. Avis, D.: Computational experience with the reverse search vertex enumeration algorithm. Optim. Methods Softw. 10(2), 107–124 (1998)

    Article  MATH  MathSciNet  Google Scholar 

  4. Avis, D.: A revised implementation of the reverse search vertex enumeration algorithm. In: Polytopescombinatorics and Computation, pp. 177–198. Springer (2000)

  5. Ball, T., Larus, J.R.: Branch prediction for free. In: Proceedings of PLDI’93, pp. 300–313. ACM, New York (1993)

  6. Barrett, C., Sebastiani, R., Seshia, S.A., Tinelli, C.: Satisfiability modulo theories. Handb. Satisfiability 185, 825–885 (2009)

    Google Scholar 

  7. Barrett, C., Tinelli, C.: CVC3. In: Computer Aided Verification, pp. 298–302. Springer (2007)

  8. Büeler, B., Enge, A., Fukuda, K.: Exact volume computation for polytopes: a practical study. In: Polytopes-Combinatorics and Computation, pp. 131–154. Springer (2000)

  9. Buse, R. P., Weimer, W.: The road not taken: estimating path execution frequency statically. In: Proceedings of ICSE’09, pp. 144–154. IEEE Computer Society (2009)

  10. Dantzig, G. B.: Linear Programming and Extensions. Princeton university press (1998)

  11. De Moura, L., Bjørner, N.: Z3: An efficient SMT solver. In: Tools and Algorithms for the Construction and Analysis of Systems, pp. 337–340. Springer (2008)

  12. Dutertre, B., De Moura, L.: A fast linear-arithmetic solver for DPLL(T). In: Proceedings of CAV’06, pp. 81–94. Springer (2006)

  13. Dutertre, B., De Moura, L.: The yices SMT solver. Tool paper at http://yices.csl.sri.com/tool-paper.pdf, 2, 2, (2006)

  14. Dyer, M., Frieze, A., Kannan, R.: A random polynomial-time algorithm for approximating the volume of convex bodies. JACM 38(1), 1–17 (1991)

    Article  MATH  MathSciNet  Google Scholar 

  15. Dyer, M.E., Frieze, A.M.: On the complexity of computing the volume of a polyhedron. SIAM J. Comput. 17(5), 967–974 (1988)

    Article  MATH  MathSciNet  Google Scholar 

  16. Grötschel, M., Lovász, L., Schrijver, A.: Geometric Algorithms and Combinatorial Optimization. Springer (1988). http://eudml.org/doc/204187

  17. Huang, J., Darwiche, A.: Using DPLL for efficient OBDD construction. In: Theory and Applications of Satisfiability Testing, pp. 157–172. Springer (2005)

  18. Kannan, R., Lovász, L., Simonovits, M.: Random walks and an O (n 5) volume algorithm for convex bodies. Random Struct. Algoritm. 11(1), 1–50 (1997)

    Article  MATH  Google Scholar 

  19. King, J.C.: Symbolic execution and program testing. Commun. ACM 19(7), 385–394 (1976)

    Article  MATH  Google Scholar 

  20. Liu, S., Zhang, J.: Program analysis: from qualitative analysis to quantitative analysis (nier track). In: Proceedings of ICSE’11, pp. 956–959. IEEE (2011)

  21. Liu, S., Zhang, J., Zhu, B.: Volume computation using a direct monte carlo method. In: Computing and Combinatorics, pp. 198–209. Springer (2007)

  22. Lovász, L., Simonovits, M.: Random walks in a convex body and an improved volume algorithm. Random Struct. Algoritm. 4(4), 359–412 (1993)

    Article  MATH  Google Scholar 

  23. Lovász, L., Vempala, S.: Simulated annealing in convex bodies and an O (n 4) volume algorithm. J. Comput. Syst. Sci. 72(2), 392–417 (2006)

    Article  MATH  Google Scholar 

  24. Ma, F., Liu, S., Zhang, J.: Volume computation for boolean combination of linear arithmetic constraints. In: Proceedings of CADE’09, pp. 453–468. Springer (2009)

  25. Marsaglia, G.: Choosing a point from the surface of a sphere. Ann. Math. Stat. 43(2), 645–646 (1972)

    Article  MATH  Google Scholar 

  26. Necula, G. C.: Proof-Carrying Code. Design and Implementation. Springer (2002)

  27. Nelson, C. G.: Techniques for program verification. XEROX Research Center (1981)

  28. Nieuwenhuis, R., Oliveras, A., Tinelli, C.: Solving SAT and SAT modulo theories: From an abstract Davis–Putnam–Logemann–Loveland procedure to DPLL(T). JACM 53(6), 937–977 (2006)

    Article  MathSciNet  Google Scholar 

  29. Păsăreanu, C.S., Visser, W.: A survey of new trends in symbolic execution for software testing and analysis. Softw. Tools Technol. Transfer 11(4), 339–353 (2009)

    Article  Google Scholar 

  30. Poulding, S., Clark, J.A.: Efficient software verification: Statistical testing using automated search. IEEE Trans. Softw. Eng. 36(6), 763–777 (2010)

    Article  Google Scholar 

  31. Smale, S.: On the average number of steps of the simplex method of linear programming. Math. Program. 27(3), 241–262 (1983)

    Article  MATH  MathSciNet  Google Scholar 

  32. Wei, W., Selman, B.: A new approach to model counting. In: Theory and Applications of Satisfiability Testing, pp. 324–339. Springer (2005)

Download references

Acknowledgments

I would like to thank Feifei Ma, a coauthor of the related work [24], for the insightful suggestions. I benefited from discussing with her when carrying out this work.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Min Zhou.

Additional information

This work was supported by the Chinese National 973 Plan under grant No. 2010CB328003, the NSF of China under grants No. 11326070, 61272001, 60903030, 91218302, the Chinese National Key Technology R&D Program under grant No. SQ2012BAJY4052, the Tsinghua University Initiative Scientific Research Program, and the Importation and Development of High-Caliber Talents Project of Beijing Municipal Institutions under grant No. YETP0167

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Zhou, M., He, F., Song, X. et al. Estimating the Volume of Solution Space for Satisfiability Modulo Linear Real Arithmetic. Theory Comput Syst 56, 347–371 (2015). https://doi.org/10.1007/s00224-014-9553-9

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s00224-014-9553-9

Keywords

Navigation