On the Complexity of Fixed-Size Bit-Vector Logics with Binary Encoded Bit-Width

On the Complexity of Fixed-Size Bit-Vector Logics with Binary Encoded Bit-Width

On the Complexity of Fixed-Size Bit-Vector Logics with Binary Encoded Bit-Width Gergely Kov´asznai, Andreas Fr¨ohlich,Armin Biere Institute for Formal Models and Verification Johannes Kepler University, Linz, Austria http://fmv.jku.at SMT 2012 June 30 - July 1, 2012 Manchester, UK 1 Gergely Kov´asznai, Andreas Fr¨ohlich,Armin Biere Complexity of Bit-Vector Logics with Binary Encoded Bit-Width Motivation How the encoding of the bit-widths affects the complexity of satisfiability checking for BV logics? In practice logarithmic (e.g. binary, decimal, hexadecimal) encoding is used (in contrast with unary encoding) Example in SMT2 (set-logic QF_BV) (declare-fun x () (_ BitVec 1000000)) (declare-fun y () (_ BitVec 1000000)) (assert (distinct (bvadd x y) (bvadd y x))) Using Boolector: 103 MB in AIGER format; 1 GB in DIMACS format Bit-width of 10 million ! cannot be bit-blasted (due to integer overflow) 2 Gergely Kov´asznai, Andreas Fr¨ohlich,Armin Biere Complexity of Bit-Vector Logics with Binary Encoded Bit-Width Motivation How the encoding of the bit-widths affects the complexity of satisfiability checking for BV logics? In practice logarithmic (e.g. binary, decimal, hexadecimal) encoding is used (in contrast with unary encoding) Example in SMT2 (set-logic QF_BV) (declare-fun x () (_ BitVec 1000000)) (declare-fun y () (_ BitVec 1000000)) (assert (distinct (bvadd x y) (bvadd y x))) Using Boolector: 103 MB in AIGER format; 1 GB in DIMACS format Bit-width of 10 million ! cannot be bit-blasted (due to integer overflow) 3 Gergely Kov´asznai, Andreas Fr¨ohlich,Armin Biere Complexity of Bit-Vector Logics with Binary Encoded Bit-Width Preliminaries quantifiers no yes uninterpreted functions uninterpreted functions no yes no yes QF BV QF UFBV BV UFBV 4 Gergely Kov´asznai, Andreas Fr¨ohlich,Armin Biere Complexity of Bit-Vector Logics with Binary Encoded Bit-Width Preliminaries quantifiers no yes uninterpreted functions uninterpreted functions no yes no yes unary QF BV1 QF UFBV1 BV1 UFBV1 encoding binary QF BV2 QF UFBV2 BV2 UFBV2 Assume common (SMT-LIB) operators ! bit-blasting is polynomial in bit-width 5 Gergely Kov´asznai, Andreas Fr¨ohlich,Armin Biere Complexity of Bit-Vector Logics with Binary Encoded Bit-Width Complexity: completeness results QF BV QF UFBV BV UFBV unary ? ? ? ? binary ? ? ? ? encoding QF BV1 is NP-complete bit-blasting to SAT QF UFBV1 is NP-complete using Ackermann constraints BV1 is PSpace-complete bit-blasting to QBF UFBV1 is NExpTime-complete proved in: C. M. Wintersteiger, Termination Analysis for Bit-Vector Programs. PhD Thesis, ETH Z¨urich,2011. C. M. Wintersteiger, Y. Hamadi, L. Mendon¸cade Moura, Efficiently Solving Quantified Bit-Vector Formulas. Proc. FMCAD, 2010. 6 Gergely Kov´asznai, Andreas Fr¨ohlich,Armin Biere Complexity of Bit-Vector Logics with Binary Encoded Bit-Width Complexity: completeness results QF BV QF UFBV BV UFBV unary NP ? ? ? binary ? ? ? ? encoding QF BV1 is NP-complete bit-blasting to SAT QF UFBV1 is NP-complete using Ackermann constraints BV1 is PSpace-complete bit-blasting to QBF UFBV1 is NExpTime-complete proved in: C. M. Wintersteiger, Termination Analysis for Bit-Vector Programs. PhD Thesis, ETH Z¨urich,2011. C. M. Wintersteiger, Y. Hamadi, L. Mendon¸cade Moura, Efficiently Solving Quantified Bit-Vector Formulas. Proc. FMCAD, 2010. 7 Gergely Kov´asznai, Andreas Fr¨ohlich,Armin Biere Complexity of Bit-Vector Logics with Binary Encoded Bit-Width Complexity: completeness results QF BV QF UFBV BV UFBV unary NP NP ? ? binary ? ? ? ? encoding QF BV1 is NP-complete bit-blasting to SAT QF UFBV1 is NP-complete using Ackermann constraints BV1 is PSpace-complete bit-blasting to QBF UFBV1 is NExpTime-complete proved in: C. M. Wintersteiger, Termination Analysis for Bit-Vector Programs. PhD Thesis, ETH Z¨urich,2011. C. M. Wintersteiger, Y. Hamadi, L. Mendon¸cade Moura, Efficiently Solving Quantified Bit-Vector Formulas. Proc. FMCAD, 2010. 8 Gergely Kov´asznai, Andreas Fr¨ohlich,Armin Biere Complexity of Bit-Vector Logics with Binary Encoded Bit-Width Complexity: completeness results QF BV QF UFBV BV UFBV unary NP NP PSPACE ? binary ? ? ? ? encoding QF BV1 is NP-complete bit-blasting to SAT QF UFBV1 is NP-complete using Ackermann constraints BV1 is PSpace-complete bit-blasting to QBF UFBV1 is NExpTime-complete proved in: C. M. Wintersteiger, Termination Analysis for Bit-Vector Programs. PhD Thesis, ETH Z¨urich,2011. C. M. Wintersteiger, Y. Hamadi, L. Mendon¸cade Moura, Efficiently Solving Quantified Bit-Vector Formulas. Proc. FMCAD, 2010. 9 Gergely Kov´asznai, Andreas Fr¨ohlich,Armin Biere Complexity of Bit-Vector Logics with Binary Encoded Bit-Width Complexity: completeness results QF BV QF UFBV BV UFBV unary NP NP PSpace NEXPTIME binary ? ? ? ? encoding QF BV1 is NP-complete bit-blasting to SAT QF UFBV1 is NP-complete using Ackermann constraints BV1 is PSpace-complete bit-blasting to QBF UFBV1 is NExpTime-complete proved in: C. M. Wintersteiger, Termination Analysis for Bit-Vector Programs. PhD Thesis, ETH Z¨urich,2011. C. M. Wintersteiger, Y. Hamadi, L. Mendon¸cade Moura, Efficiently Solving Quantified Bit-Vector Formulas. Proc. FMCAD, 2010. 10 Gergely Kov´asznai, Andreas Fr¨ohlich,Armin Biere Complexity of Bit-Vector Logics with Binary Encoded Bit-Width Complexity: completeness results QF BV QF UFBV BV UFBV unary NP NP PSpace NExpTime binary NEXPTIME ? ? ? encoding QF BV2 is NExpTime-complete: QF BV2 2 NExpTime: exponentially QF BV2 −−−−−−−! QF BV1 2 NP QF BV2 is NExpTime-hard: polynomially DQBF −−−−−−−! QF BV2 11 Gergely Kov´asznai, Andreas Fr¨ohlich,Armin Biere Complexity of Bit-Vector Logics with Binary Encoded Bit-Width Complexity: completeness results QF BV QF UFBV BV UFBV unary NP NP PSpace NExpTime binary NEXPTIME ? ? ? encoding QF BV2 is NExpTime-complete: QF BV2 2 NExpTime: exponentially QF BV2 −−−−−−−! QF BV1 2 NP QF BV2 is NExpTime-hard: polynomially DQBF −−−−−−−! QF BV2 12 Gergely Kov´asznai, Andreas Fr¨ohlich,Armin Biere Complexity of Bit-Vector Logics with Binary Encoded Bit-Width polynomially Complexity: DQBF −−−−−−! QF BV2 Dependency Quantified Boolean Formulas (DQBF): Applying Henkin quantifiers: variable dependencies represent a partial order Dependencies are explicitly specified Example DQBF 8u0; u1; u29x(u0); y(u1; u2) : (x _ y _:u0 _:u1) ^ (x _:y _ u0 _:u1 _:u2) ^ (x _:y _:u0 _:u1 _ u2) ^ (:x _ y _:u0 _:u2) ^ (:x _:y _ u0 _ u1 _:u2) DQBF is NExpTime-complete G. L. Peterson, J. H. Reif, Multiple-Person Alternation. Foundations of Computer Science, 1979. 13 Gergely Kov´asznai, Andreas Fr¨ohlich,Armin Biere Complexity of Bit-Vector Logics with Binary Encoded Bit-Width polynomially Complexity: DQBF −−−−−−! QF BV2 [8] [8] [8] [8] [8] (X j Y |∼U0 |∼U1 )&(X |∼Y j U0 |∼U1 |∼U2 )& (X |∼Y |∼U0 |∼U1 j U2)&(∼X j Y |∼U0 |∼U2)& [8] (∼X |∼Y j U0 j U1 |∼U2) = ∼0 1 Eliminate the quantifier prefix 2 Replace logical connectives with bit-wise operators 3 Replace Boolean variables with bit-vector variables of bit-width 2k k: number of universal variables in the DQBF 14 Gergely Kov´asznai, Andreas Fr¨ohlich,Armin Biere Complexity of Bit-Vector Logics with Binary Encoded Bit-Width polynomially Complexity: DQBF −−−−−−! QF BV2 [8] [8] [8] [8] [8] (X j Y |∼U0 |∼U1 )&(X |∼Y j U0 |∼U1 |∼U2 )& (X |∼Y |∼U0 |∼U1 j U2)&(∼X j Y |∼U0 |∼U2)& [8] (∼X |∼Y j U0 j U1 |∼U2) = ∼0 4 Universal vars Assign binary magic numbers to Ui s! 2 0 3 2 0 3 2 0 3 6 1 7 6 0 7 6 0 7 6 7 6 7 6 7 6 0 7 6 1 7 6 0 7 6 7 6 7 6 7 6 1 7 6 1 7 6 0 7 U0 := 6 7 ; U1 := 6 7 ; U2 := 6 7 6 0 7 6 0 7 6 1 7 6 7 6 7 6 7 6 1 7 6 0 7 6 1 7 6 7 6 7 6 7 4 0 5 4 1 5 4 1 5 1 1 1 15 Gergely Kov´asznai, Andreas Fr¨ohlich,Armin Biere Complexity of Bit-Vector Logics with Binary Encoded Bit-Width polynomially Complexity: DQBF −−−−−−! QF BV2 [8] [8] [8] [8] [8] (X j Y |∼U0 |∼U1 )&(X |∼Y j U0 |∼U1 |∼U2 )& (X |∼Y |∼U0 |∼U1 j U2)&(∼X j Y |∼U0 |∼U2)& [8] (∼X |∼Y j U0 j U1 |∼U2) = ∼0 4 Universal vars Assign binary magic numbers to Ui s! 2 0 3 2 0 3 2 0 3 6 1 7 6 0 7 6 0 7 6 7 6 7 6 7 6 0 7 6 1 7 6 0 7 6 7 6 7 6 7 6 1 7 6 1 7 6 0 7 U0 := 6 7 ; U1 := 6 7 ; U2 := 6 7 6 0 7 6 0 7 6 1 7 6 7 6 7 6 7 6 1 7 6 0 7 6 1 7 6 7 6 7 6 7 4 0 5 4 1 5 4 1 5 1 1 1 16 Gergely Kov´asznai, Andreas Fr¨ohlich,Armin Biere Complexity of Bit-Vector Logics with Binary Encoded Bit-Width polynomially Complexity: DQBF −−−−−−! QF BV2 [8] [8] [8] [8] [8] (X j Y |∼U0 |∼U1 )&(X |∼Y j U0 |∼U1 |∼U2 )& (X |∼Y |∼U0 |∼U1 j U2)&(∼X j Y |∼U0 |∼U2)& [8] (∼X |∼Y j U0 j U1 |∼U2) = ∼0 4 Universal vars Assign binary magic numbers to Ui s! k 2(2 ) − 1 U := i 2(2i ) + 1 17 Gergely Kov´asznai, Andreas Fr¨ohlich,Armin Biere Complexity of Bit-Vector Logics with Binary Encoded Bit-Width polynomially Complexity: DQBF −−−−−−! QF BV2 [8] [8] [8] [8] [8] (X j Y |∼U0 |∼U1 )&(X |∼Y j U0 |∼U1 |∼U2 )& (X |∼Y |∼U0 |∼U1 j U2)&(∼X j Y |∼U0 |∼U2)& [8] (∼X |∼Y j U0 j U1 |∼U2) = ∼0 4 Universal vars Assign binary magic numbers to Ui s! k 2(2 ) − 1 U := i 2(2i ) + 1 [2k ] (Ui (1 i)) + Ui = ∼0 18 Gergely Kov´asznai, Andreas Fr¨ohlich,Armin Biere Complexity of Bit-Vector Logics with Binary Encoded Bit-Width polynomially Complexity: DQBF −−−−−−! QF BV2 [8] [8] [8] [8] [8] (X j Y |∼U0 |∼U1 )&(X |∼Y j U0 |∼U1 |∼U2 )& (X |∼Y |∼U0 |∼U1 j U2)&(∼X j Y |∼U0 |∼U2)& [8] (∼X |∼Y j U0 j U1 |∼U2) = ∼0 ^ [8] ^ (Ui (1 i)) + Ui = ∼0 i2f0;1;2g 4 Universal vars Assign binary magic numbers to Ui s! [2k ] (Ui (1 i)) + Ui = ∼0 19 Gergely Kov´asznai, Andreas Fr¨ohlich,Armin Biere Complexity of Bit-Vector Logics with Binary Encoded Bit-Width polynomially Complexity: DQBF −−−−−−! QF BV2 [8] [8] [8] [8] [8] (X j Y |∼U0 |∼U1 )&(X |∼Y j U0 |∼U1 |∼U2 )& (X |∼Y |∼U0 |∼U1 j U2)&(∼X j Y |∼U0 |∼U2)& [8] (∼X |∼Y j U0 j U1 |∼U2) = ∼0 ^ [8] ^ (Ui (1 i)) + Ui = ∼0 i2f0;1;2g 5 Existential vars Represent Skolem-functions as bit-vectors! 2 3 2 3 x7 0 6 x6 7 6 0 7 6 7 6 7 6 x5 7 6 1 7 6 7 6 7 6 x4 7 6 1 7 X = 6 7 is independent of U1 = 6 7 6 x3 7 6 0 7 6 7 6 7 6 x2 7 6 0 7 6 7 6 7 4 x1 5 4 1 5 x0 1 20 Gergely Kov´asznai, Andreas Fr¨ohlich,Armin Biere Complexity of Bit-Vector Logics with Binary Encoded Bit-Width polynomially Complexity: DQBF −−−−−−! QF BV2 [8] [8] [8] [8] [8] (X j Y |∼U0 |∼U1 )&(X |∼Y j U0 |∼U1 |∼U2 )& (X |∼Y |∼U0 |∼U1 j U2)&(∼X j Y |∼U0 |∼U2)& Positive and negative cofactors of a Skolem-function w.r.t.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    32 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us