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

Function return bad value based on parameter (Z3, Python)

I am emulating an array with simple function (Tab) and it doesn't work as expected. If I code it in SMT2, it works well, but in Z3py it doesn't work. from z3 import * A = BitVec('A', 8) B1 = BitVec('B1', 8) B2 = BitVec('B2', 8) B3 = BitVec('B3',…
z3_test
  • 19
  • 6
0
votes
1 answer

Display all values from Z3 model (Python)

When I want to get the values of all variables in an SMT2 instance, I use the command (set-option :auto-config false). In Z3py, setting this option doesn't work - the model doesn't display variables that I define but do not use in any constraints.…
z3_test
  • 19
  • 6
0
votes
1 answer

Get expression using Z3 solver

I am new to Z3 solver and SMTLib2. I want to obtain expressions for each variable in the constraints. Assume, I have this program. (declare-const x Int) (declare-const y Int) (declare-const z Int) (assert (= x (+ y 1))) (assert (= z (+ x…
Maggie
  • 5,923
  • 8
  • 41
  • 56
0
votes
2 answers

Z3 Java API - get unsat core

I am trying to figure out how to get the unsat core using the Java API for Z3. Our scenario is as follows (code is underneath, which works in rise4fun): We create the SMT2 input programtically The input contains function definitions, datatype…
r-k
  • 65
  • 3
0
votes
1 answer

Z3: Finding all satisfying model in java

Below solution i am not able to implement in java. Please help me. Below is snippet code which i am trying to implement. I found the same question: Z3: finding all satisfying models (Z3Py) checking all solutions for equation BitVecExpr a =…
Ajit
  • 31
  • 6
0
votes
1 answer

Does the time reported in z3 (v4.4.0) statistics include the time required to read the SMT constraint file?

Or is it purely the solving time? This question is for the case when z3 is being called as an external binary. I am asking this as in some of my examples, the constraint solving time is small and I suspect will become comparable to file read time.…
user1779685
  • 283
  • 2
  • 8
0
votes
1 answer

z3py: How to set Tactic configuration options whose names contain "."?

The correct way of configuring tactics in z3.py is using "With". E.g. t = With(Tactic('simplify'), som=True) However, some option names contain a "." in it, such as "arith.solver" in tactic "qflia". If we code in the same way t =…
Mark Jin
  • 2,616
  • 3
  • 25
  • 37
0
votes
0 answers

Implementation if condition in z3

I am facing problem implementing verilog if condition in z3. if(reset == 1){ G5 <= 0; } else { G5 <= G10; } I am trying to implement above code using ofollowing code in z3 smt. s.add( (BoolExpr) ctx.mkITE(…
Ajit
  • 31
  • 6
0
votes
1 answer

z3py: What is a correct way of asserting a constraint of "something does not exist"

I want to assert a constraint of "something must not exist" in z3py. I tried using "Not(Exists(...))". A simple example is as follows. I want to find a assignment for a and b, so that such c does not exist. from z3 import * s = Solver() a =…
Mark Jin
  • 2,616
  • 3
  • 25
  • 37
0
votes
2 answers

Z3 Managed Exception : Java API while trying to use propagate-ineqs tactic

(declare-const a Int) (declare-const b Int) (declare-const c Int) (assert (exists ((a0 Int) (b0 Int) (c0 Int)) (and (<= a 3) (>= a 0) (<= b 3) (>= b 0) (<= c 3) (>= c 0) (= 3 (+ a b c)) (> a 1) (= a0…
0
votes
1 answer

Z3py SMT coding following variables and the formulas

I am really new to Z3 and SMT solvers. I have the following problem which I don't know how to code in Z3py. In the above diagram N is set of nodes, thus N = {Node1, Node2, Node3, Node4, Node5, Node6, Node7} I is set of Inputs, I = {I1, I2, I3,…
Priyanka
  • 107
  • 13
0
votes
1 answer

ANTLR grammar for SMT formulae

I am trying to make a grammar for SMT formulae and this is what I have so far grammar Z3input; startRule : formulaList? EOF; LEFT_PAREN : '('; RIGHT_PAREN : ')'; COMMA : ','; SEMICOLON : ';'; PLUS : '+'; MINUS : '-'; TIMES : '*'; DIVIDE :…
0
votes
0 answers

Building disjunction automatically

I have to build disjunctive/conjunctive formula automatically, all I know is the length of list from where I have to acquire the values of variables, e.g: x=Int('x') list= [0,1,2,3] solver=Solver() one approach to do this…
Rauf
  • 27
  • 6
0
votes
0 answers

Z3 Java Possible Memory Leak?

I have a strange memory problem with Java library of Z3 which I couldn't figure where the problem is. Oddly, I can't reproduce the problem on a Windows machine where I have Java 7 (I most probably have slightly older version of Z3 there though). The…
fturkmen
  • 324
  • 3
  • 11
0
votes
1 answer

Getting Unsat Core in Z3 using C++, with Z3_parse_smtlib2_string

I need to use Z3_parse_smtlib2_string to parse some SMTLIB strings into Z3 using the C++ API, and the use the Z3 C++ API to find the unsat core of this. I know that there are other ways to find the unsat core as described here and here that are…
ndb
  • 127
  • 1
  • 10