计算机工程与科学 ›› 2024, Vol. 46 ›› Issue (03): 400-415.
唐傲1,王晓峰1,2,何飞1
收稿日期:
2023-09-12
修回日期:
2023-11-12
接受日期:
2024-03-25
出版日期:
2024-03-25
发布日期:
2024-03-15
基金资助:
TANG Ao1,WANG Xiao-feng1,2,HE Fei1
Received:
2023-09-12
Revised:
2023-11-12
Accepted:
2024-03-25
Online:
2024-03-25
Published:
2024-03-15
摘要: 可满足性模理论(SMT)是指判定一阶逻辑公式在特定背景理论下的可满足性问题。基于一阶逻辑的SMT相比SAT描述能力更强、抽象能力更高,能处理更加复杂的问题。SMT求解器在各个领域都有应用,已经成为重要的形式化验证引擎。目前,SMT已被广泛应用在人工智能、硬件RTL验证、自动化推理和软件工程等领域。根据近些年SMT的发展,首先阐述SMT基本知识和常见的背景理论;然后分析总结Eager方法、Lazy方法和DPLL(T)方法的实现流程,并进一步介绍主流求解器Z3、CVC5和MathSAT5的实现过程;接着介绍SMT的扩展问题#SMT、SMT应用在深度神经网络的SMTlayer方法和量子SMT求解器;最后对SMT的发展进行展望,并讨论其面临的挑战。
唐傲, 王晓峰, 何飞. 可满足性模理论综述[J]. 计算机工程与科学, 2024, 46(03): 400-415.
TANG Ao, WANG Xiao-feng, HE Fei. A survey of satisfiability modulo theories[J]. Computer Engineering & Science, 2024, 46(03): 400-415.
[1] | Cook S.The complexity of theorem-proving procedures[C]∥Proc of ACM Symposium on the Theory of Computation,1971:151-158. |
[2] | Brown C E.Reducing higher-order theorem proving to a sequence of SAT problems[J].Journal of Automated Reasoning,2013,51:57-77. |
[3] | Cordeiro L,Fischer B,Marques-Silva J.SMT-based bounded model checking for embedded ANSI-C software[J].IEEE Transactions on Software Engineering,2011,38(4):957-974. |
[4] | Ivani F,Yang Z,Ganai M K,et al.Efficient SAT-based bounded model checking for software verification[J].Theoretical Computer Science,2008,404(3):256-274. |
[5] | Cervera-Lierta A, Krenn M, Aspuru-Guzik A. Design of quantum optical experiments with logic artificial intelligence[J].arXiv:2109.13273,2022. |
[6] | Mirzaeian S,Zheng F,Cheng K T T.RTL error diagnosis using a word-level SAT-solver[C]∥Proc of 2008 IEEE International Test Conference,2008:1-8. |
[7] | Smith R. Aristotle prior analytics[M].1st ed. Indiana:Hackett Publishing,1989. |
[8] | Ansótegui C,Bonet M L,Levy J.SAT-based MaxSAT algorithms[J].Artificial Intelligence,2013,196:77-105. |
[9] | Ignatiev A, Morgado A,Marques-Silva J.RC2:An efficient MaxSAT solver[J].Journal on Satisfiability,Boolean Modeling and Computation,2019,11(1):53-64. |
[10] | Gomes C P,Sabharwal A,Selman B.Model counting[M]. 1st ed. Amsterdam:IOS Press,2021. |
[11] | Sharma S,Roy S,Soos M,et al.GANAK:A scalable probabilistic exact model counter[C]∥Proc of the 28th International Joint Conference on Artificial Intelligence,2019:1169-1176. |
[12] | 周俊萍,李睿智,曾志勇,等.求解#SMT 问题的局部搜索算法[J].软件学报,2016,27(9):2185-2198. |
Zhou Jun-ping,Li Rui-zhi,Zeng Zhi-yong,et al.Local search algorithm for solving #SMT problem[J].Journal of Software,2016,27(9):2185-2198. | |
[13] | Cimatti A, Griggio A,Schaafsma B J,et al.The MathSAT5 SMT solver[C]∥Proc of International Conference on Tools and Algorithms for the Construction and Analysis of Systems,2013:93-107. |
[14] | Barbosa H,Barrett C,Brain M,et al.CVC5:A versatile and industrial-strength SMT solver[C]∥Proc of International Conference on Tools and Algorithms for the Construction and Analysis of Systems,2022:415-442. |
[15] | Niemetz A, Preiner M,Biere A.Boolector 2.0[J].Journal on Satisfiability,Boolean Modeling and Computation,2014,9(1):53-58. |
[16] | Dutertre B.Yices 2.2[C]∥Proc of International Conference on Computer Aided Verification,2014:737-744. |
[17] | de Moura L, Bjrner N.Z3:An efficient SMT solver[C]∥Proc of International Conference on Tools and Algorithms for the Construction and Analysis of Systems,2008:337-340. |
[18] | Christ J,Hoenicke J,Nutz A.SMTInterpol:An interpolating SMT solver[C]∥Proc of International SPIN Workshop on Model Checking of Software,2012:248-254. |
[19] | Hyvrinen A E J,Marescotti M,Alt L,et al.OpenSMT2:An SMT solver for multi-core and cloud computing[C]∥Proc of the 19th International Conference on Theory and Applications of Satisfiability Testing,2016:547-553. |
[20] | Kremer G L,brahám E.Modular strategic SMT solving with SMT-RAT[J].Acta Universitatis Sapientiae,Informatica,2018,10(1):5-25. |
[21] | Winterer D,Zhang C,Su Z.Validating SMT solvers via semantic fusion[C]∥Proc of the 41st ACM SIGPLAN Confe- rence on Programming Language Design and Implementation,2020:718-730. |
[22] | Eleftheriadis C,Kekatos N,Katsaros P,et al.On neural network equivalence checking using SMT solvers[C]∥Proc of International Conference on Formal Modeling and Analysis of Timed Systems,2022:237-257. |
[23] | Garcia-Contreras I,Gurfinkel A,Navas J A.Efficient modular SMT-based model checking of pointer programs[C]∥Proc of International Static Analysis Symposium,2022:227-246. |
[24] | Lahiri S K,Nieuwenhuis R,Oliveras A.SMT techniques for fast predicate abstraction[C]∥Proc of the 18th International Conference on Computer Aided Verification,2006:424-437. |
[25] | Brinkmann R,Drechsler R.RTL-datapath verification using integer linear programming[C]∥Proc of the 15h International Conference on VLSI Design,2002:741-746. |
[26] | Peleska J, Vorobev E,Lapschies F.Automated test case generation with SMT-solving and abstract interpretation[C]∥Proc of the 3rd International Symposium on NASA Formal Methods,2011:298-312. |
[27] | Bierman G M,Gordon A D,Hri |
瘙塅cu C,et al.Semantic subtyping with an SMT solver[J].Journal of Functional Programming,2012,22(1):31-105. | |
[28] | 莫孝玲,许道云.CNF公式赋值空间上可满足解的概率性质[J].计算机科学与探索,2018,12(11):1852-1861. |
Mo Xiao-ling,Xu Dao-yun.Probabilistic properties of satisfiable solutions on space of assignments for CNF formula[J].Journal of Frontiers of Computer Science and Technology,2018,12(11):1852-1861. | |
[29] | 张建民,黎铁军,马柯帆,等.基于一阶逻辑的可满足求解方法研究进展[J].计算机工程与科学,2019,41(12):2119-2126. |
Zhang Jian-min,Li Tie-jun,Ma Ke-fan,et al. Research progress of satisfiable solutions based on first-order logic [J] Computer Engineering & Science,2019,41 (12):2119-2126. | |
[30] | Barrett C,Tinelli C.Satisfiability modulo theories[M].Berlin:Springer International Publishing,2018. |
[31] | Hfler A. SMT solver comparison[D].Graz:Institute for Software Technology,Graz University of Technology,2014. |
[32] | Cheng X,Zhou M,Song X,et al.Parallelizing SMT solving:Lazy decomposition and conciliation[J].Artificial Intelligence,2018,257:127-157. |
[33] | de Moura L,Bjrner N.Satisfiability modulo theories:An appetizer[C]∥Proc of Brazilian Symposium on Formal Methods,2009:23-36. |
[34] | Nelson G,Oppen D C.Simplification by cooperating decision procedures[J].ACM Transactions on Programming Languages and Systems,1979,1(2):245-257. |
[35] | Oppen D C. Complexity,convexity and combinations of theories[J].Theoretical Computer Science,1980,12(3):291-302. |
[36] | Nelson G,Oppen D C.Fast decision procedures based on congruence closure[J].Journal of the ACM,1980,27(2):356-364. |
[37] | Bozzano M,Bruttomesso R,Cimatti A,et al.Efficient sat- isfiability modulo theories via delayed theory combination[C]∥Proc of the 17th International Conference on Computer Aided Verification,2005:335-349. |
[38] | Bozzano M,Bruttomesso R,Cimatti A,et al.Efficient theory combination via boolean search[J].Information and Computation,2006,204(10):1493-1525. |
[39] | Tinelli C,Zarba C G.Combining nonstably infinite theories[J].Journal of Automated Reasoning,2005,34:209-238. |
[40] | Zarba C G.Combining sets with integers[C]∥Proc of International Workshop on Frontiers of Combining Systems,2002:103-116. |
[41] | Barrett C W, Dill D L, Stump A. A generalization of Shostaks method for combining decision procedures[C]∥Proc of the 4th International Workshop on Frontiers of Combining Systems,2002:132-146. |
[42] | Seshia S A.The eager approach to SMT[Z].Bay Area:University of California,2009. |
[43] | Barrett C W.SMT:Where do we go from here?[Z].New York:New York University,2014. |
[44] | Sebastiani R.Lazy satisfiability modulo theories[J].Journal on Satisfiability,Boolean Modeling and Computation,2007,3(3-4):141-224. |
[45] | Tinelli C.Foundations of lazy SMT and DPLL (T)[Z].Iowa:University of Iowa,2012. |
[46] | Ganzinger H,Hagen G,Nieuwenhuis R,et al.DPLL (T):Fast decision procedures[C]∥Proc of the 16th International Conference on Computer Aided Verification,2004:175-188. |
[47] | Nieuwenhuis R, Oliveras A,Tinelli C.Solving SAT and SAT modulo theories:From an abstract davis-putnam- logemann-loveland procedure to DPLL(T)[J].Journal of the ACM,2006,53(6):937-977. |
[48] | Barrett C,Deters M, de Moura L, et al.6 years of SMT-COMP[J].Journal of Automated Reasoning,2013,50:243-277. |
[49] | Weber T,Conchon S,Déharbe D,et al.The SMT competition 2015-2018[J].Journal on Satisfiability,Boolean Modeling and Computation,2019,11(1):221-259. |
[50] | Hadarean L,Hyvrinen A,Niemetz A,et al.SMT-COMP 2019[Z].Lowa:The University of Lowa,2019. |
[51] | Bjrner N.Z3 and SMT in industrial R&D[C]∥Proc of the 22nd International Symposium on Formal Methods,2018:675-678. |
[52] | Irfan A,Griggio A,Cimatti A,et al.MathSAT5 (nonlinear) at the SMT competition 2019[EB/OL].[2023-07-19]. https:∥smt-comp.github.io/2019/ system-descriptions/mathsat5.pdf. |
[53] | Barrett C,Barbosa H,Brain M,et al.CVC5 at the SMT competition 2021[EB/OL].[2023-07-19]. https:∥smt-comp.github.io/2021/system-descriptions/ cvc5.pdf. |
[54] | Barbosa H,Barrett C,Brain M,et al.CVC 5 at the SMT competition 2022[EB/OL].[2023-07-19]. https:∥smt-comp.github.io/2022/system-descriptions/ cvc5.pdf. |
[55] | Dutertre B. Yices manual version 2.6.2[EB/OL].[2023-07-19]. https:∥yices.csl.sri.com/papers/manual.pdf. |
[56] | Andreotti B,Barbosa H,Fontaine P,et al.veriT at SMT-COMP 2022[EB/OL].[2023-07-19]. https:∥smt-comp.github.io/2022/system-descriptions/veriT.pdf. |
[57] | Niemetz A, Preiner M,Wolf C,et al.BTOR2,BtorMC and Boolector 3.0[C]∥Proc of International Conference on Computer Aided Verification,2018:587-595. |
[58] | Cai S,Li B,Zhang X.Local search for SMT on linear integer arithmetic[C]∥Proc of the 34th International Conference on Computer Aided Verification,2022:227-248. |
[59] | Li B,Cai S.Local search for SMT on linear and multilinear real arithmetic[J].arXiv:2303.06676,2023. |
[60] | Barrett C,Conway C L,Deters M,et al.CVC4[C]∥Proc of the 23rd International Conference on Computer Aided Verification,2011:171-177. |
[61] | Barrett C, Stump A,Tinelli C.The SMT-LIB standard:Version 2.0[EB/OL].[2023-05-12]. http:∥smtlib.cs.uiowa.edu/papers/smt- lib-reference-v2.6-r2017-07-18.pdf. |
[62] | Chakraborty S, Meel K S,Mistry R,et al.Approximate probabilistic inference via word-level counting[C]∥Proc of the 30th AAAI Conference on Artificial Intelligence,2016:3218-3224. |
[63] | Ma F,Liu S,Zhang J.Volume computation for boolean combination of linear arithmetic constraints[C]∥Proc of International Conference on Automated Deduction,2009:453-468. |
[64] | Li X T,Yin M H.Application of differential evolution algorithm on self-potential data[J].PLoS ONE,2012,7(12):e51199. |
[65] | Li X,Yin M.An opposition-based differential evolution algorithm for permutation flow shop scheduling based on diversity measure[C]∥Proc of International Conference on Engineering Software,2013:10-31. |
[66] | Chistikov D,Dimitrova R,Majumdar R.Approximate counting in SMT and value estimation for probabilistic programs[J].Acta Informatica,2017,54:729-764. |
[67] | Borges M,Phan Q S,Filieri A,et al.Model-counting approaches for nonlinear numerical constraints[C]∥Proc of the 9th International Symposium on NASA Formal Methods,2017:131-138. |
[68] | Ge C,Ma F,Zhang J.VolCE:An efficient tool for solving# SMT (LA) problems[EB/OL].[2023-07-22]. https:∥ceur-ws.org/Vol-2157/paper8.pdf. |
[69] | Gao W,Lü H,Zhang Q,et al.Estimating the volume of the solution space of SMT (LIA) constraints by a flat histogram method[EB/OL].[2023-07-22]. https:∥doi.org/10.3390/a11090142. |
[70] | Kim S,McCamant S.Structural bit-vector model counting[C]∥Proc of the International Workshop on Satisfiability Modulo Theories,2020:26-36. |
[71] | Ge C,Ma F,Ma X,et al.Approximating integer solution counting via space quantification for linear constraints[C]∥Proc of the 28th International Joint Conference on Artificial Intelligence,2019:1697-1703. |
[72] | Ge C, Biere A. Decomposition strategies to count integer solutions over linear constraints[C]∥Proc of International Joint Conference on Artificial Intelligence,2021:1389-1395. |
[73] | Manhaeve R,Dumancic S,Kimmig A,et al.DeepProbLog:Neural probabilistic logic programming[C]∥Proc of the 32nd International Conference on Neural Information Processing Systems,2018:3753-3763. |
[74] | Wang P W,Donti P,Wilder B,et al.SATNet:Bridging deep learning and logical reasoning using a differentiable satisfiability solver[C]∥Proc of International Conference on Machine Learning,2019:6545-6554. |
[75] | Vlastelica M, Paulus A,Musil V,et al.Differentiation of blackbox combinatorial solvers[J].arXiv:1912.02175,2019. |
[76] | Fredrikson M,Lu K,Vijayakumar S,et al.Learning modulo theories[J].arXiv:2301.11435,2023. |
[77] | Huang J,Li Z,Chen B,et al.Scallop:From probabilistic deductive databases to scalable differentiable reasoning[C]∥Proc of International Conference on Neural Information Processing Systems,2021:25134-25145. |
[78] | Deng H,Peng Y,Hicks M,et al.Automating NISQ application design with meta quantum circuits with constraints (MQCC)[J].ACM Transactions on Quantum Computing,2023,4(3):1-29. |
[79] | Seino K, Yamashita S.An SMT-solver-based synthesis of NNA-compliant quantum circuits consisting of CNOT,H and T gates[C]∥Proc of the 28th Asia and South Pacific Design Automation Conference,2023:196-201. |
[80] | Murali P, Javadi-Abhari A, Chong F T, et al. Formal constraint-based compilation for noisy intermediate-scale quantum systems[J].Microprocessors and Microsystems,2019,66:102-112. |
[81] | Lin S W,Chen S H,Wang T F,et al.A quantum SMT solver for bit-vector theory[J].arXiv:2303.09353,2023. |
[82] | Grover L K.A fast quantum mechanical algorithm for database search[C]∥Proc of the 28th Annual ACM Symposium on Theory of Computing,1996:212-219. |
[1] | 马雪, 何星星, 兰咏琪, 李莹芳. 一阶逻辑中基于treelet图神经网络的前提选择[J]. 计算机工程与科学, 2024, 46(02): 374-380. |
[2] | 林玲瑜, 曹锋, 易见兵, 方旺盛, 李俊, 吴贯锋. 基于子句活跃度和复杂度的多元动态演绎算法及应用[J]. 计算机工程与科学, 2023, 45(12): 2256-2264. |
[3] | 张建民,黎铁军,马柯帆,肖立权. 基于一阶逻辑的可满足求解方法研究进展[J]. 计算机工程与科学, 2019, 41(12): 2119-2126. |
[4] | 徐亮,刘宏. 基于SMT的TECTL性质的限界模型检测方法[J]. J4, 2013, 35(10): 166-171. |
[5] | 李〓婧,刘万伟. SMT求解器理论组合技术研究[J]. J4, 2011, 33(10): 111-119. |
[6] | 张建民, 沈胜宇, 李思昆. 可满足性求解技术研究[J]. J4, 2010, 32(1): 50-54. |
阅读次数 | ||||||
全文 |
|
|||||
摘要 |
|
|||||
湘公网安备 43010502000083号
湘ICP备10006030号
版权所有 © 《计算机工程与科学》 编辑部
地址:中国湖南省长沙市开福区德雅路109号(410073) 电话:0731-87002567 Email: jsjgcykx@vip.163.com
本系统由北京玛格泰克科技发展有限公司设计开发 技术支持:support@magtech.com.cn