2

I have switched from using Int to Bit Vectors in SMT. However, the logic QF_BV does not allow the use of any quantifiers in your script, and I need to define FOL rules. I know how to eliminate existential quantifiers, but universal quantifiers? How to do that?

Imagine a code like that:

(set-logic QF_AUFBV)

(define-sort Index () (_ BitVec 3))

(declare-fun P (Index) Bool)

(assert (forall ((i Index)) (= (P (bvadd i #b001)) (not (P i)) ) ) )
frogatto
  • 28,539
  • 11
  • 83
  • 129
Arya Pourtabatabaie
  • 705
  • 2
  • 7
  • 22

1 Answers1

2

Strictly speaking, you're out-of-luck. According to http://smtlib.cs.uiowa.edu/logics.shtml, there's no logic that contains quantifiers and bit-vectors at the same time.

Having said that, most solvers will allow non-standard combinations. Simply leave out the set-logic command, and you might get lucky. For instance, Z3 takes your query just fine without the set-logic part; I just tried..

alias
  • 28,120
  • 2
  • 23
  • 40
  • Indeed, Z3 also recognizes the UFBV and BV logics (without QF_). There are also some benchmarks in SMTLIB for those, so I expect they'll soon become official logics. – Christoph Wintersteiger Jul 14 '15 at 21:03
  • The new SMT-LIB 2.5 standard defines `(set-logic ALL)` for choosing the most general logic the solver supports. (SMT-LIB 2.5 was released on June 28, 2015.) – CliffordVienna Aug 05 '15 at 14:38