Questions tagged [cvc4]

CVC4 is an efficient open-source automatic theorem prover for satisfiability modulo theories (SMT) problems.

CVC4 is an efficient open-source automatic theorem prover for satisfiability modulo theories (SMT) problems. It can be used to prove the validity (or, dually, the satisfiability) of first-order formulas in a large number of built-in logical theories and their combination.

75 questions
2
votes
1 answer

Is the QF_NRA logic in SMT-LIB decidable?

Is the QF_NRA logic in SMT-LIB decidable? I know that Tarski proved that nonlinear arithmetic is decidable, in the sense that systems of polynomials in the real numbers are decidable. However, it's not obvious that QF_NRA falls under this umbrella,…
Douglas B. Staple
  • 10,510
  • 8
  • 31
  • 58
2
votes
1 answer

y=1/x, x=0 satisfiable in the reals?

In SMT-LIB: (declare-fun y () Real) (declare-fun x () Real) (assert (= 0.0 x)) (assert (= y (/ 1.0 x))) (check-sat) Should this model be SAT or UNSAT?
Douglas B. Staple
  • 10,510
  • 8
  • 31
  • 58
2
votes
1 answer

Accessing members of composite sorts (data types) in SMT-LIBv2

According to sec. 3.9.3 of The SMT-LIBv2 Language and Tools: A Tutorial it is possible to declare a composite sort like this in SMT-LIBv2: (set-logic QF_UF) (declare-sort Triple 3) (declare-fun state () (Triple Bool Bool Bool)) I am using CVC4 and…
CliffordVienna
  • 7,995
  • 1
  • 37
  • 57
2
votes
1 answer

Solving dimacs instances with an SMT solver seems slow (SMT2 format)

I'm converting my problem to SMT and I have noticed that the SMT solvers (MathSat5 and CVC4) are slow when solving sat instances. My suspension is that there is something in my translation that is making it go slow. I'm attaching a sample cnf…
fcimeson
  • 123
  • 1
  • 7
2
votes
0 answers

CVC4: using quantifiers in C++ interface

I am trying to figure out how to code quantifiers in CVC4, using the C++ interface. Here is an example I am trying to get to run, but cannot. int main() { SmtEngine smt(&em); smt.setLogic("AUFLIRA"); // Set the logic Expr three =…
ndb
  • 127
  • 1
  • 10
1
vote
1 answer

Why does smtlib/z3/cvc4 allow to declare the same constant more than once?

I have a question about declare-const in smtlib. For example, In z3/cvc4, the following program doesn't report an error: C:\Users\Chansey>z3 -in (declare-const x Int) (declare-const x Bool) In the smt-lib-reference, it says that (declare-fun f (s1…
chansey
  • 1,266
  • 9
  • 20
1
vote
1 answer

How to print the entire model in cvc4 using smtlib

so I have just started to learn cvc4 after I have spent some time learning boolector. With it, it is possible to print the model just using boolector_print_model. Unfortunately the doc page for cvc4 is down at the moment and I cannot understand how…
Alberto
  • 446
  • 5
  • 14
1
vote
1 answer

Invoking no-arg constructors of custom data types with type parameters in CVC4

I am trying to define a parameterized datatype option in CVC4 using the Java API. DATATYPE option[T] = None | Some(elem: T) END; My problem is that I don't know how to invoke the None constructor. I tried the following code: class…
Peter Zeller
  • 2,245
  • 19
  • 23
1
vote
0 answers

Problems Converting Z3 to CVC4

I have a satisfiability problem written in C++ with Z3, and I'm trying to translate it to SMT-LIB2 which I'm then feeding into CVC4 to solve. When I print the Z3_solver for the problem (using Z3_solver_to_string()), I believe it's printing in the…
1
vote
1 answer

What conversion operators are available in Z3 and CVC4 for Bit-Vectors?

I am writing a BV encoding of a problem which requires converting some Int to BitVec and viceversa. In mathsat/optimathsat one can use: ((_ to_bv BITS) ) ; Int => BitVec (sbv_to_int ) ; Signed BitVec => Int (ubv_to_int…
Patrick Trentin
  • 7,126
  • 3
  • 23
  • 40
1
vote
2 answers

Calculate the sum of an Int Set

Using the set theory of CVC4 (version 1.8-prerelease [git master a90b9e2b]) I have defined a set of integers with a fixed cardinality (set-logic ALL_SUPPORTED) (set-option :produce-models true) (declare-fun A () (Set Int)) (assert (= 5 (card…
John Smith
  • 771
  • 8
  • 25
1
vote
1 answer

Truncate Integers Like C in SMT-LIB 2

I'm passing the symbolic output of a symbolic execution engine to Z3 in SMT-LIB 2 format. I need it to truncate integers like they would be in C. So that (assert (= 1 (/ 3 2))) would be SAT. These formulas might also have floats, so not all…
HiDefender
  • 2,088
  • 2
  • 14
  • 31
1
vote
1 answer

Why is CVC4 product operator not applying to sets?

I am tinkering with CVC4 support for sets and relations and expected to be able to use the product operator to build the Cartesian product of two sets. However, this operator only applies to relations. This is a sample input fed to CVC4: (set-logic…
dde
  • 150
  • 6
1
vote
1 answer

Z3 might be inconsistent when solving this string problem?

I just encountered a SMTLIB problem in string theory that Z3 might have answered inconsistently. When envoking Z3 to solve the problem: with argument smt.string_solver=z3str3 it returns unsat; without any arguments it returns sat. I also used CVC4…
hsuhw
  • 11
  • 2
1
vote
0 answers

Isn't it possible to use an array of a custom datatype with CVC4?

using latest cvc4 as of 2018-07-10, this code: (set-info :smt-lib-version 2.6) (set-logic ALL) (declare-datatypes ( (Type 0) ) ( ((bool) (number) (tuple (tuple-type (Array Int Type)))) )) produces this output from cvc4: (error "Parse…
rixed
  • 96
  • 2