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

Anyone know how to covert a signed bitvector to signed int in Z3?

(> (bv2int (bvxor ((_ int2bv 32) x1) ((_ int2bv 32) y1))) 0) x1 and y1 is two signed int, and after the xor. How can i convert them back as a signed int?
Shadow
  • 5
  • 1
  • 5
0
votes
1 answer

understanding the angr memory map

I'm working on one of the angr-doc challenges (https://github.com/angr/angr-doc/blob/2d45c9e6d9f91e83988719aa19940aec2cfd8747/examples/ekopartyctf2015_rev100/solve.py) but in my approach I have this situation: mov rdx, [rbp+var_150]; mov …
0
votes
1 answer

Control the solving strategy of Z3

So lets assume I have a large Problem to solve in Z3 and if i try to solve it in one take, it would take too much time. So i divide this problem in parts and solve them individually. As a toy example lets assume that my complex problem is to solve…
Sergey
  • 21
  • 2
0
votes
1 answer

Can't compile code with CVC4 C++ API

I am just trying to compile this file helloworld.cpp #include #include using namespace CVC4; int main() { ExprManager em; Expr helloworld = em.mkVar("Hello World!", em.booleanType()); SmtEngine…
rnbguy
  • 1,369
  • 1
  • 10
  • 28
0
votes
1 answer

Is it possible to estimate the running time of z3, or the running time of DPLL(T) algorithm? Even the worst case

I am working on visualize a prototype of microsoft z3. I wonder if it is possible to estimate the running time of z3 or the algorithm? Even it would be great if I could get a worst case running time. Also, in z3, is there any method to get the…
Steven
  • 13
  • 3
0
votes
1 answer

How to get solutions for an expression in Z3

I am trying to do something in theory very easy with Z3, but I am not sure how to do it. So imagine I have this code in C: int c; if (c>=65 && C<91) int d = c + 32; I would like to know possible solutions for d, for example 97. I try to express…
0
votes
1 answer

Changing order of Z3 fixepoint queries changes the result

I am trying to find out why swapping query orders may modify the answer of Z3 fixedpoint engine: (declare-rel fib (Int Int)) (declare-rel q1 ()) (declare-rel q2 ()) (declare-var n Int) (declare-var tmp1 Int) (declare-var tmp2 Int) (rule (=> (< n 2)…
dvvrd
  • 1,679
  • 11
  • 20
0
votes
1 answer

z3 incorrectly saying UNSAT

For the problem below, solution exists but z3 says UNSAT. (set-logic QF_UFNRA) (declare-fun a () Real) (declare-fun b () Real) (declare-fun c () Real) (declare-fun d () Real) (declare-fun e () Real) (declare-fun f () Real) (declare-fun g ()…
Logan
  • 161
  • 2
  • 10
0
votes
1 answer

How to create an interface for solver object and use it (Z3 solver)

I am new to C#. I have a class with some methods in it, who use the solver object. But, for each of the method i need to again create an instance of solver object to use it. Can some one tell me how to avoid doing this by using interfaces? Making an…
user5440565
  • 73
  • 1
  • 8
0
votes
1 answer

Satisfiability of a formula having forall quantifier

This is my Python code: s = z3.Solver() f = z3.Function('f', z3.IntSort(), z3.IntSort()) g = z3.Function('g', z3.IntSort(), z3.IntSort()) h = z3.Function('h', z3.IntSort(), z3.IntSort()) a, b, c = z3.Ints('a b c') imp_a = z3.And(f(a) == b, g(a)…
frogatto
  • 28,539
  • 11
  • 83
  • 129
0
votes
1 answer

Multiplication by constant in fewest adds and shifts

It is possible to multiply two numbers by using just addition, subtraction and shift. The important part of the procedure is to find the minimal (optimal) sequence of such operations. Using brute force to find the sequence leads to exponential…
Ecir Hana
  • 10,864
  • 13
  • 67
  • 117
0
votes
1 answer

z3 getting the size of a symbolic variable C++ API

I'm using Z3_parse_smtlib2_string to parse a smtlib2 formula. The fomula looks like: (set-logic QF_AUFBV)(declare-fun SymVar_0 () (_ BitVec 32))(declare-fun SymVar_1 () (_ BitVec 8))... I parse it using: Z3_ast ast = Z3_parse_smtlib2_string(ctx,…
user1618465
  • 1,813
  • 2
  • 32
  • 58
0
votes
1 answer

(check-sat) then (check-sat-using qfnra-nlsat)

What I want to do: I would like to call (check-sat), and then if the result is unknown, call (check-sat-using qfnra-nlsat). Why do I want to do this?: For my application the Z3 default tactics applied with (check-sat) are superior to anything I have…
Douglas B. Staple
  • 10,510
  • 8
  • 31
  • 58
0
votes
1 answer

CVC4 minimize/maximize model optimization

Does CVC4 an option to maximize or minimize the result model for bitvectors as Z3 does? Thanks.
user1618465
  • 1,813
  • 2
  • 32
  • 58
0
votes
1 answer

Z3 slow in QF_AUFBV mode

I have been checking the SMT-COMP 2015 benchmark results for the QF_AUFBV mode and they are shocking. Same thing for 2014. According to them Z3 is orders of magnitude slower than the rest of the SMT solvers. My understanding is that Z3 is as fast as…
user1618465
  • 1,813
  • 2
  • 32
  • 58