Questions tagged [smt]

Satisfiability Modulo Theories (SMT) are decision problems for logical formulas with respect to combinations of background theories expressed in classical first-order logic with equality.

Satisfiability Modulo Theories (SMT) are decision problems for logical formulas with respect to combinations of background theories expressed in classical first-order logic with equality.

A SMT instance is a generalization of a Boolean SAT instance in which various sets of variables are replaced by predicates from a variety of underlying theories.

SMT problems are usually expressed by the SMT-LIB language and solved by high-performance SMT solvers. For a list of benchmarks, solvers and other information regarding SMT, please visit http://smtlib.org/.

845 questions
0
votes
1 answer

Boolean matrix times vector multiplication in Z3

How to multiply a variable Boolean matrix by a Boolean vector in Z3 in a nice way? The sizes of the matrix and of vectors are known and fixed. In my case there is only one matrix and there is no need to pass it as an argument or return it as a…
km9c3uwc
  • 51
  • 5
0
votes
0 answers

Inefficiency concerns with Z3 solver

As part of a static-time compiler analysis, I am using (the Java API of) Z3 solver to check whether a system of (in)equations is satisfiable. Everything seems to work correctly. However, the solver is too slow. For the system posted below, Z3 takes…
AmanNoug
  • 48
  • 5
0
votes
1 answer

cvc4 error with LANG_AUTO and antlr

I've built cvc4 from source according to their manual here. I ran make check which went perfect, then sudo make install. Then, I've tried running a simple example that works with z3: (declare-const i Int) (declare-const j Int) (assert (= i…
OrenIshShalom
  • 5,974
  • 9
  • 37
  • 87
0
votes
1 answer

Using the Pure SMT-LIB2 in Z3 to check for consistency in rules

If have a set of rules - 1 : If x then a 2 : If x then b Then these rules shall be conflicting as we shall not know what is the action to be performed when x is triggered. Therefore - Now suppose I want to check for consistency of rules such as -…
Razor21
  • 59
  • 1
  • 6
0
votes
1 answer

In Z3Py, prove returns no counterexample

How can Z3 return a valid counterexample? The following code from z3 import * set_param(proof=True) x = Real('x') f = ForAll(x, x * x > 0) prove(f) outputs counterexample []. I don't have to use prove, but I want to find a valid counterexample to a…
yokke
  • 99
  • 7
0
votes
1 answer

Retracting facts in Z3's datalog engine

Is it possible to retract facts in Z3's datalog engine? The closest I can find in the documentation is Z3_fixedpoint_update_rule which I haven't been able to get to work the way I want. I have seen other questions deal with retraction using…
dropkick
  • 65
  • 5
0
votes
1 answer

Find possible values

I want to verify a formula of the form: Exists p . ForAll x != 0 . f(x, p) > 0 and g(x, p) < 0 All variables are reals. As suggested here, I add this list to the solver: [ForAll([x0, x1], Implies(Or(x0 != 0, x1 != 0), And(P0*x0*x0 +…
nyuw
  • 13
  • 2
0
votes
1 answer

How can I change the standard behavior of z3 functions?

I have a (get-model) query for Z3 which returns this function: (define-fun rules ((x!0 Tree)) Bool (ite (= x!0 (node "mann" (cons (node "adam" nil) nil))) true (ite (= x!0 (node "mensch" (cons (node "adam" nil) nil))) true true))) When using this…
M3tag
  • 3
  • 1
0
votes
0 answers

Two z3 solvers with same assertions give different satisfiability output

I am playing around with Java Z3 API for a research problem and I am really confused about how this is happening: I create a Solver object and add a number of assertions, and repeatedly call the check() method, adding additional assertions each…
chittychitty
  • 419
  • 5
  • 12
0
votes
1 answer

to_smt2() for Optimize class

Is there a function to_smt2() for Optimize class which does the same thing as the function with the same name in Solver class, that us create an smt-lib file with the optimization problem. Thanks!
0
votes
1 answer

Microsoft Z3 - How to use tactic combinators in the C# API

I am currently going through following documents: https://rise4fun.com/z3/tutorial/strategies http://z3prover.github.io/api/html/namespace_microsoft_1_1_z3.html In one of our academic research project, we are using Z3 for problem-solving. It is…
Amarjit Datta
  • 251
  • 2
  • 7
0
votes
1 answer

Running boolector binary

I tried to run the code below (taken directly from how to print output in hexadecimal format, who claimed it worked): (set-logic QF_BV) (set-info :smt-lib-version 2.0) (declare-const val1 (_ BitVec 16)) (declare-const val2 (_ BitVec…
lightning
  • 389
  • 1
  • 9
0
votes
1 answer

optimization of non-linear objective functions using Z3

I have two equations, one of them is linear while the second one is non-linear. I have to minimize the first one while maximizing the second one at the same time. Is this achievable with Z3? it seems that it can't optimize non-linear equations. it…
Rehab11
  • 483
  • 2
  • 7
  • 16
0
votes
1 answer

z3 tutorial: why does this return UNSAT?

I am new to Z3 (and SMT solvers in general), and I've been going through the Z3 tutorial. In the section on quantifiers, it has me run the following code: (declare-fun f (Int) Int) (declare-fun g (Int) Int) (declare-const a Int) (declare-const b…
0
votes
1 answer

Change the type of a z3 bitvector operation

Is it possible to change the argument types and the return value of a z3 bitvector operation after it has been created? For example, given: x = BitVec('x', 32) y = BitVec('y', 32) mul = x * y` Is there a way to substitute x and y in mul with…
waskyo
  • 3
  • 2