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
0
votes
1 answer

Implementation for decision procedure for the theory of the reals

Is there an implementation for the first-order theory of the reals? I know there exists one technique by Collins based on cylindrical algebraic decomposition but I don't know of any theorem provers that implement it.
user1868607
  • 2,558
  • 1
  • 17
  • 38
0
votes
0 answers

Marabou NNet Example unhashable type: 'numpy.ndarray'

I'm trying out Marabou tool and the provided examples in https://neuralnetworkverification.github.io/Marabou/Examples/0_NNetExample.html The NNet Example throws the following error. How could that be fixed? Traceback (most recent call last): File…
monade
  • 1
  • 1
0
votes
0 answers

SMT2Lib slows after a non-negativity assert

We're trying to build a solver for a weighted mean function. The code is written in SMT2Lib, and ran by CVC5 or Z3. However, after adding an assert that indicates the non-negativity of the denominator, the code does not terminate. ("(assert (>…
Fusen
  • 311
  • 2
  • 3
  • 10
0
votes
1 answer

Unexpected `Unknown' result in theory with finite set

I want to show satisfiability of a simple vehicle configuration problem, in which any vehicle must have one wheel. Here is the encoding: (set-logic ALL) (set-option :produce-models true) (declare-sort Vehicle 0) ; type Vehicle (declare-sort Wheel…
Pierre Carbonnelle
  • 2,305
  • 19
  • 25
0
votes
1 answer

Extracting boolean terms from Z3 model when using quantifiers

I am trying to use Z3 to explore the difference between two predicates, but the model contains exist-expressions where I would expect boolean constants. I have the following program in smtlib: (set-option :produce-models true) (declare-fun a…
Manos
  • 3
  • 2
0
votes
0 answers

Is there a quantifier elimination functionality in CVC5 or CVC4 (I am using Python API)?

I am using CVC5 in Python and realize that I need something that does the equivalent to the following Z3-Py code: t = Tactic("qe") phi = Goal() phi.add(Exists(var_list, psi)) phi_qe = t(phi) #print(phi_qe) That is: given a…
Theo Deep
  • 666
  • 4
  • 15
0
votes
1 answer

How to print formulae and literals when using CVC5?

I am playing with the CVC5 example at https://github.com/cvc5/cvc5/blob/main/examples/api/python/pythonic/linear_arith.py. from cvc5.pythonic import * slv = SolverFor('QF_LIRA') x = Int('x') y = Real('y') slv += And(x >= 3 * y, x <= y, -2 <…
Theo Deep
  • 666
  • 4
  • 15
0
votes
1 answer

How to compute the upper part of a product of two bit-vectors?

How to compute the upper part of a product of two bit-vectors? I could use vectors of double the width, do the normal multiplication and then right shift, but that seems rather inefficient. Is there a better way? Perhaps split the vectors into four…
Ecir Hana
  • 10,864
  • 13
  • 67
  • 117
0
votes
1 answer

Why does CVC4 SMT solver return unknown (incomplete)?

I am fiddling around with the CVC4 SMT solver online version (with lang = cvc4). I am not using the standard SMT-LIB format, but the native language implemented by CVC4, because it's a lot simpler. However, I am not able to prove very…
mateleco
  • 519
  • 7
  • 15
0
votes
1 answer

How to debug SMT scripts that have quantifiers?

Currently, I have a somewhat superficial understanding of how SMT solvers work (the basics of algorithms like E-matching, MBQI, and CVC4/5's inductive reasoning). However, it's very frustrating to debug by trial-and-error. Is there any guidance on…
Mike Manilone
  • 582
  • 4
  • 17
0
votes
1 answer

Is it possible to declare a function sort in smtlib?

For example, $ z3 -in (declare-fun f (Int Real) Int) (assert (= f f)) (check-sat) sat This is OK. However, I'd like to qualify it by as? $ z3 -in (declare-fun f (Int Real) Int) (assert (= (as f ???) (as f ???))) (check-sat) sat What should I fill…
chansey
  • 1,266
  • 9
  • 20
0
votes
1 answer

Produce multiple models for CVC4 SMT queries

Can I get multiple models for a query like the following? (set-logic LIA) (set-option :produce-models true) (declare-const x Int) (assert (< x 20)) (check-sat) (get-model) Instead of just sat ( (define-fun x () Int 0) ) I'd like to get 0, 1, -1,…
Alex Coleman
  • 607
  • 1
  • 4
  • 11
0
votes
2 answers

How to access the AST for constraints in the input sygus file in CVC4 tool

I want to mutate the internal representation of constraints from the sygus file generated by CVC4. For e.g. (constraint (and (<= x (f x y)) (<= y (f x y)))) is a constraint from small.sl which I give to cvc4 qas input to synthesize a program. I know…
Ravi Raja
  • 61
  • 9
0
votes
1 answer

Support for integer division in SMT solvers

I have executed z3 and CVC4 on the following SMT input. Both return unknown. ;!(a,b,c).(0<=a & 0<=b & 1<=c ; => ; (a+(b mod c)) mod c = (a+b) mod c) ; ; (set-logic NIA) (set-option :print-success false) (declare-fun a ()…
dde
  • 150
  • 6
0
votes
1 answer

Is there a way to parse SMT-LIB2 strings through the CVC4 C++ API?

I have a program that can dynamically generate expressions in SMT-LIB format and I am trying to connect these expressions to CVC4 to test satisfiability and get the models. I am wondering if there is a convenient way to parse these strings through…
Orson Baines
  • 83
  • 1
  • 5