Extensions of ICP for SMT Vu Xuan Tung

  • Slides: 16
Download presentation
Extensions of ICP for SMT Vu Xuan Tung, Mizuhito Ogawa (Japan Advanced Institute of

Extensions of ICP for SMT Vu Xuan Tung, Mizuhito Ogawa (Japan Advanced Institute of Science and Technology, Japan) To Van Khanh (University of Engineering and Technology, Vietnam) Deduktionstreffen 2016, 26 th Sep 2016 1

Agenda 1. 2. 3. 4. SMT for Polynomial Constraints ra. SAT loop – an

Agenda 1. 2. 3. 4. SMT for Polynomial Constraints ra. SAT loop – an extension of ICP ra. SAT in annual SMT competitions Current cooperation with Loria – Inria and future works 2

SMT for Polynomial Constraints Ø Satisfiability of : where and is a polynomial. Ø

SMT for Polynomial Constraints Ø Satisfiability of : where and is a polynomial. Ø Example: is satisfiable with Ø Notion: UNSAT for Unsatisfiability, SAT for Satisfiability Applications: Invariants Generation, Round-off and Over-flow Error Analysis, Automatic Termination Prover for Term Rewriting Systems. 3

Methods for Solving Polynomial Constraints Ø CAD: complete for general quantified formulas, DEXP ü

Methods for Solving Polynomial Constraints Ø CAD: complete for general quantified formulas, DEXP ü Z 3, SMT-RAT, QEPCAD, Redlog Ø Virtual substitution: degree < 4, EXP ü SMT-RAT, Redlog Ø Gröbner basis: Equalities, EXP ü SMT-RAT, Mathematica, Maple, Reduce Ø Interval Constraint Propagation (ICP): Inequalities, incomplete ü i. SAT 3, d. Real, ra. SAT Ø Bit-blasting: Bounded variables and precision ü mini. Smt Ø Linearization using CORDIC: Bounded variables and precision ü CORD 4

ra. SAT loop – an extension of ICP Ø ra. SAT loop: ICP +

ra. SAT loop – an extension of ICP Ø ra. SAT loop: ICP + Testing + Intermediate Value Theorem (IVT). Inequality Equality ICP = Interval arithmetic + Constraint propagation + Box decomposition 5

Interval Arithmetic and Constraint Propagation Ø E. g. , x 2 + xy <

Interval Arithmetic and Constraint Propagation Ø E. g. , x 2 + xy < 4 x∈[-3, 1], y∈[-4, -2] [-4, 4] [0, 8] [-2. 8, 1] [-3, 1] [-4, 21] [-4, 4] [0, 9] [-2. 8, 1] Input: x ∈[-3, 1], y ∈[-4, -2] [-3, 1] [-2, 1] [-3, 1] [-4, 12] [-4, -2] Output: ICP-UNKNOWN, x ∈[-2, 1], y ∈[-4, -2] 6

IVT for a single equation 7

IVT for a single equation 7

Generalized IVT for Multiple Equations Ø The Generalized IVT† ü Multiple equations ü Requires

Generalized IVT for Multiple Equations Ø The Generalized IVT† ü Multiple equations ü Requires |Variables| ≧ |Equations| Ø Example: †Neumaier, A. : Interval Methods for Systems of Equations. Cambridge Middle East Library, Cambridge University Press (1990) 8

ra. SAT is Sound Ø Soundness under floating point arithmetic ü Outward rounding in

ra. SAT is Sound Ø Soundness under floating point arithmetic ü Outward rounding in Interval Arithmetic (library of Alliot et al. †) round-down l round-up h ü Confirming SAT instance by i. RRAM, an guaranteed round-off error bound package: http: //irram. uni-trier. de/ Ø Easily extended to constraints over Integers (NIA) by picking only integers as test data. † Alliot, J. M. , Gotteland, J. B. , Vanaret, C. , Durand, N. , Gianazza, D. : Implementing an interval 9 computation library for OCaml on x 86/amd 64 architectures. In: ICFP. ACM (2012)

ra. SAT is Incomplete Ø Inequality SAT Detection UNSAT Detection Kissing case Convergence Ø

ra. SAT is Incomplete Ø Inequality SAT Detection UNSAT Detection Kissing case Convergence Ø Equality üGeneralized IVT requires |Variables| ≧ |Equations| üPotentially 0 -dim ideal case when |Variables| < |Equations| 10

SMT-COMP results in QF_NRA and QF_NIA Ø 2014: ra. SAT 0. 1 (QF_NRA) solved

SMT-COMP results in QF_NRA and QF_NIA Ø 2014: ra. SAT 0. 1 (QF_NRA) solved 88 problems, 3 rd among 3. Ø 2015: ra. SAT 0. 2 (QF_NRA) solved 7952 problems, 3 rd among 6. (QF_NIA) solved 7917 problems, 2 nd among 7. Ø 2016: ra. SAT 0. 3/0. 4 QF_NRA Z 3 -4. 4. 1 Yices-2. 4. 2 SMT-RAT ra. SAT 0. 4 ra. SAT 0. 3 CVC 4 Solved No. 10056 10019 9026 (4 errors) 9024 8431 2694 Time (sec) 24785. 38 61989. 88 51053. 15 11176. 39 13576. 52 150. 24 QF_NIA Z 3 -4. 4. 1 Yices-2. 4. 2 SMT-RAT APro. VE CVC 4 Solved No. 8566 8451 Time (sec) 27718. 2 8523. 4 8231 ra. SAT 0. 4 Pro. B ra. SAT 0. 3 8017 7544 8443 8273 7557 6234. 5 8527. 66 161418. 04 159247. 55 13586. 05 70228. 9 https: //www. starexec. org/starexec/secure/details/job. jsp? id=16079, 16070 11

Observations from experiments Ø SAT is detected on several large constraints solely by ra.

Observations from experiments Ø SAT is detected on several large constraints solely by ra. SAT: (in comparison with d. Real, i. SAT 3, SMT-RAT, Z 3) ü zankl/matrix-2 -all-3. smt 2: 57 variables ü zankl/matrix-2 -all-8. smt 2: 17 variables ü zankl/matrix-3 -all-5. smt 2: 81 variables ü zankl/matrix-4 -all-3. smt 2: 139 variables ü zankl/matrix-4 -all-9. smt 2: 193 variables where Z 3 4. 4 solely solves many, among them some large ones are ü zankl/matrix-3 -all-7. smt 2: 75 variables ü zankl/matrix-4 -all-12. smt 2: 200 variables ü zankl/matrix-5 -all-6. smt 2: 258 variables Ø Not much good in UNSAT detection need improvement Ø Adding IVT to ra. SAT increased 1330 SAT detection on benchmarks. 12

Current Progress Ø Working with Thomas Sturm and Pascal Fontaine at Veridis Team –

Current Progress Ø Working with Thomas Sturm and Pascal Fontaine at Veridis Team – Loria – Inria Ø ICP + virtual substitution + CAD ra. SAT loop Redlog A theory solver of veri. T for QF_NRA Download: http: //www. jaist. ac. jp/~s 1310007/ra. SAT/, or google “ra. SAT SMT” 13

Future Work: Make ICP complete by Algebraic methods Ø Make the procedure complete: ICP

Future Work: Make ICP complete by Algebraic methods Ø Make the procedure complete: ICP + CAD ü Idea from Loup et al. † ü Call CAD when a box in ICP becomes small ü The small box of ICP guides CAD to reduce the numbers of polynomials / cells in Projection / Lifting phases. CAD of small box † Loup, U. , et. al. : A symbiosis of interval constraint propagation and cylindrical algebraic decomposition. 14 In: CADE. LNAI 7898, pp. 193– 207 (2013)

Improve UNSAT detection ability Ø When ICP-UNSAT or Test-UNSAT, reduce the search space by

Improve UNSAT detection ability Ø When ICP-UNSAT or Test-UNSAT, reduce the search space by clause learning. ü Idea from Jovanovic et al. ‡ ü Project only polynomials in ICP(Test)-UNSAT constraints ü Compute only the cell that contains the UNSAT box or UNSAT test case ü Learn the negation of the constraint representing such a cell ‡ Jovanovic, D. , de Moura, L. M. : Solving non-linear arithmetic. In: IJCAR, pp. 339– 354 (2012) 15

THANKS FOR ATTENTION 16

THANKS FOR ATTENTION 16