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

max recursive bound in z3

I wrote a benchmark below to generate cross product of two lists. Does z3 have some sort of max recursive bound? For some reason it can reason about lists of size 1 but not size 2. Or perhaps I have a mistake somewhere in my…
JRR
  • 6,014
  • 6
  • 39
  • 59
0
votes
0 answers

Extending `z3` with one way functions

I'm looking to use a one-way function in a z3 Python program. I'd like z3 to respect the following properties/tactics: if x = y, then f(x) = f(y) f is a computable Python function that I can provide when x is known if f(x) = y, attempt to resolve…
Peteris
  • 3,548
  • 4
  • 28
  • 44
0
votes
1 answer

Z3 pattern matching syntax

I'm trying to use pattern matching in z3 to work with algebraic datatypes. I'm exactly following the syntax given in the SMTLib standard on page 27, but z3 is giving me a syntax error. For example in the following program: (declare-datatype Dyn ((a)…
vijrox
  • 1,063
  • 1
  • 13
  • 33
0
votes
0 answers

How to assign a new value to a variable in Z3?

I have a variable x inside the SMT-Z3-Python-Solver and already assigned to it the value 23. How is it possible to reassign the value of x to e.g. 42? I am looking for a function like s.reassign(x == 42). # coding=utf-8 from z3 import * x =…
PatrickSteiner
  • 495
  • 4
  • 26
0
votes
1 answer

Get the corresponding python variable name of a Z3 model name

Is there a way to get the corresponding python variable name of a z3 model name? Suppose I have the following code: from z3 import * s = Solver() a = [Real('a_%s' % k) for k in range(10)] for i in range(10): s.add(a[i] > 10) s.check() m =…
Francis
  • 189
  • 1
  • 11
0
votes
0 answers

Z3 solver outputs CUT 2

I am working on a complex mapping problem. To get all Pareto-optimal solutions I used Pareto mod of Z3. Some wired things happened when I deleted some constraints which should be no effect on solutions, but the solutions were one less. When the last…
Frank Sai
  • 3
  • 3
0
votes
2 answers

Force Z3 to explore certain candidate space first?

I had a question on smt-solvers (like Z3) and was wondering if you know any Z3-tactic which can help me achieve my objective. I want to know whether it is possible to force Z3 to explore some variables before exploring other variables. For examples,…
brokendreams
  • 827
  • 2
  • 10
  • 29
0
votes
1 answer

ANTLR4 Parser error for a mini SMTLIB v2 Grammar

My SMTLib v2 Grammar is as follows : /** * Author : Sourav DAS * Group : Rigorous System Design * Lab : VERIMAG, IMAG Building, UGA * Date : 23/11/2018 * A Grammar for syntax, defined for test cases, to be run in Parametric Dead-lock Finder *…
0
votes
2 answers

pysmt z3 solver crashing?

I am having trouble with the pysmt solvers. I am getting the following error message: AttributeError: 'module' object has no attribute 'Z3_mk_and' whenever I try to both: (1) Instantiate a solver via Solver() and (2) Run pysmt-install --check Here…
HSC
  • 1
  • 1
0
votes
1 answer

Normal form of formula returned by Z3's qe tactic

I'm using Z3's quantifier elimination tactic via Z3py and have tried the following examples. from z3 import * x,y,xp,yp = Ints('x y xp yp') t = Tactic('qe') t(Exists((xp, yp), And(xp==x+1, yp==y+2, xp<=8, xp >=1, yp<=12, yp>=2))) #returns: [[y <=…
Akay
  • 225
  • 2
  • 8
0
votes
1 answer

Z3 does not solve quantifier expression, expression is sat

Using z3 v 4.8.1 - - 64 bit - build hashcode 016872a5e0f6 the script below evaluate to unsat but an result of sat is expected. Does z3 support solving expression like these? Can a different smt-solver solve expression like these? (set-option…
Johan
  • 575
  • 5
  • 21
0
votes
1 answer

How do I use the Z3Py dll?

I tried to use the Z3Py dll, but it didn't work. Here are my test programs and errors. I am very new to Python, I think I missed some important part everybody already knows. init("z3.dll") Traceback (most recent call last): File "test5.py", line 1,…
Frank Sai
  • 3
  • 3
0
votes
1 answer

Extracting Craig's Interpolants from a formula with string literals

I want to extract Craig's interpolants from a formula which includes String literals too. There are versions of Z3 which support extracting interpolants like McMillan's extension and SMTInterpol and iZ3 which support arithmetic and arrays but none…
0
votes
1 answer

Encoding partial maps in Z3

I wanted to encode partial maps in Z3, with support for asking whether the map is defined for a certain key. It should also support the operation (update_map m1 m2), which updates m1 with the mappings in m2 such that the mappings of m2 override…
Samuel Gruetter
  • 1,713
  • 12
  • 11
0
votes
1 answer

Proving injectivity of two-digit encoding in arbitrary base

I'd like to automatically prove the following statement about arbitrary size integers: forall base a b c d, 0 <= a < base -> 0 <= b < base -> 0 <= c < base -> 0 <= d < base -> base * a + b = base * c + d -> b = d This should be equivalent to the…
Samuel Gruetter
  • 1,713
  • 12
  • 11