Optimization of Boolean satisfiability solver by caching intermediate results
Abstract
Recently, a number of dynamic analysis tools were developed that perform tainted data flow tracing and use algorithms for solving the CNF SAT problem for input data generation and path alteration. SAT problem is known to be NP-complete and it requires a lot of optimizations to partially solve the exponential growth problem. The problem appeared in Avalanche dynamic analysis project for automatic defect detection. In this paper we propose a modification of Davis—Putnam—Logemann—Loveland (DPLL) algorithm using intermediate result caching.
For path condition solving Avalanche uses STP which uses MiniSAT solver for Boolean formula satisfiability checking. MiniSAT main mechanism is based on variation of DPLL algorithm. We describe special properties of formula sets generated with dynamic analysis tools. Some formulas in generated set frequently have common parts. We introduce a DPLL optimization based on these peculiarity. Formula solving is performed on previously cached solver results and uses backtracking mechanism in case of failure. Described optimization is illustrated on simple examples.
Described mechanism was examined on random generated sets of Boolean formulas using implemented SAT solver prototype. Modified algorithm applications features a noteworthy increase in efficiency in comparison with standard DPLL approach.References
1. Isaev I. K., Sidorov D. V. Primenenie dinamicheskogo analiza dlya generatsii vkhodnykh dannykh, demonstriruyushhikh kriticheskie oshibki i uyazvimosti v programmakh [The Use of Dynamic Analysis for Generation of Input Data that Demonstrates Critical Bugs and Vulnerabilities in Programs]. Programmirovanie [Programming and Computer Software]. 2010. # 4. P. 1-16.
2. S. V. Zelenov, S. А. Zelenova. Аvtomaticheskoe opredelenie vypolnimosti naborov formul dlya operatsij sravneniya [Automatic solving of set of formulas satisfiability problem for comparison operators]. Trudy ISP RАN, tom 14 [The Proceedings of ISP RAS, vol. 14]. 109-118 s. Moskva, 2008.
3. Davis M., Logemann G., Loveland D. A machine program for theorem proving. Communication of the ACM. 1962. P. 394-397.
4. Novikova N. M. Osnovy optimizatsii [Basics of Optimization]. M.: MGU [MSU], 1998. 17–22 p.
5. Eén N., Sörensson N. MiniSat solver [HTML] [1]. (http://minisat.se/)
6. Katelman M., Soos M. STP Constraint Solver [HTML] (http://sites.google.com/site/stpfastprover/)
Review
For citations:
Vartanov S., Sidorov D. Optimization of Boolean satisfiability solver by caching intermediate results. Proceedings of the Institute for System Programming of the RAS (Proceedings of ISP RAS). 2012;22. (In Russ.)