Questions tagged [z3]

Z3 is a high-performance theorem prover being developed at Microsoft Research.

Z3 is a high-performance theorem prover being developed at Microsoft Research. Z3 supports linear real and integer arithmetic, fixed-size bit-vectors, extensional arrays, uninterpreted functions, and quantifiers.

Some key features of Z3 are:

  • High-performance theorem prover
  • Integrating efficient constraint solving technologies
  • Checking satisfiability of logical formulas with quantifiers
  • Highly customizable with an extensive API
  • Including support for custom theories

For more information about Z3, visit the Z3 homepage or try Z3 in your browser.

See also Z3 tutorial guide for more in-depth introduction about Z3.

2824 questions
1
vote
1 answer

Potential configuration bug in Z3 4.3.2

I might have found a configuration bug related to mbqi. Consider the following, short program: (set-option :smt.mbqi true) ; Set to false and the warnings disappear (set-option :smt.relevancy 2) ; On my local machine I got ; 0 and 1 - three…
Malte Schwerhoff
  • 12,684
  • 4
  • 41
  • 71
1
vote
1 answer

soft timeout crashes main instance of Scala program using Scala^Z3

I'm using Scala^Z3 for using Z3 within Scala. Now for some experiments I'm doing, which involves solving problems which become very complex, in order to cancel the current calculation. I have tried a soft timeout, which from the documentation…
1
vote
1 answer

z3 @ command line behaving differently than online

the (rather small) query that I have here: http://rise4fun.com/Z3/W4sf works just fine on the website (above) but hangs when I run it on my mac, with z3 -in followed by pasting in the exact text above, which is: (declare-const x Real) (assert…
Ranjit Jhala
  • 1,242
  • 8
  • 18
1
vote
0 answers

How to use a BAPA Z3 theory plugin?

I'm trying to run this Boolean Algebra with Presburger Arithmetic Plug-In for the Z3 solver. I installed Z3 and ScalaZ3 and sbt test runs fine. However, I have no idea how to put it all together. All I could find in the (old) Z3 documentation was…
ivan
  • 11
  • 2
1
vote
1 answer

Z3: how to convert an int sort to a boolean sort

I want to transform the bitvector theory into int theory in Z3, and when encounter the "bvnot" operation, I relpace it with "not", here is a simple example: (assert (= (bvnot (ite (bvsle t0 #x0a) #b1 #b0)) #b1)) and after transformation : (assert…
J.Huang
  • 35
  • 5
1
vote
1 answer

Z3 Java API: when to dispose expressions / Z3 objects?

In my Java code, I'm invoking Z3 in a loop to check a formula (which depends on the loop index and is different for every iteration) until the formula becomes satisfiable, as sketched in the following pseudo code fragment: int n = 0; do { n +=…
Dan
  • 1,539
  • 12
  • 23
1
vote
0 answers

Accessing a function through z3py that's already been defined

Does anybody please know if there's a way to interact with a function through z3py that I've already defined in Z3 and parsed using parse_smt2_string ? I'm a Z3 and python and Z3Py newbie so apologies if this is obvious, but I've not found any…
PJB09
  • 33
  • 4
1
vote
1 answer

z3 OCaml bindings - toplevel

I've built z3 as described here using the ml-ng branch. Everything seems to have completed fine, except when I want to use z3 in the OCaml toplevel (I try to use the FindLib #require command to import what's needed) I get this error: Error: The…
1
vote
1 answer

How can I use Z3 SMT locally

Any one have an idea how to use Z3 SMT locally instead of using the website? I know how to use z3.py but I need to use SMT. rise4fun.com is down which makes it difficult to check my models.
Moody
  • 137
  • 1
  • 9
1
vote
1 answer

Using Z3 to return model with least value

I thought I read somewhere that Z3 has some option for returning the model with the "least" value eg given something like x >= 2 Z3 would return 2. I could swear that I saw some reference to this recently, but I am unable to find it now. Can anyone…
Motorhead
  • 928
  • 6
  • 16
1
vote
2 answers

Dynamic loading of libz3.dll

Dynamic load of a dll statically linked to libz3.dll fails, GetlastError after failed LoadLibrary returns "Invalid access to memory location" error. Is it possible to dynamically load libz3.dll?
nevilad
  • 932
  • 1
  • 7
  • 14
1
vote
0 answers

Worse performance of Z3 on CNF benchmarks

I am working on an approach which basis on the CNF (i.e., NNF + SNF + PNF + AND-pull-out/Tseitin) of the input problem -- an FOL formula. I observed that (for all most benchmarks) the performance of Z3 on CNF formulas is much more worser compared…
1
vote
1 answer

Z3 significance of Z3_get_ast_id

I want to know the semantics of Z3_get_ast_id(). When will two expressions have same id? If two expressions are created using same context using same arguments and opcodes, will the id be same? I also see that there is Z3_get_ast_hash(). Please tell…
Manjeet Dahiya
  • 485
  • 1
  • 4
  • 15
1
vote
2 answers

z3py throws parser error for a valid SMT2 file

1 (set-logic UFLIA) 2 (set-info :source | Simple list theorem |) 3 (set-info :smt-lib-version 2.0) 4 (set-info :category "crafted") 5 (set-info :status unsat) 6 (declare-sort List 0) 7 (declare-sort Elem 0) 8 (declare-fun cons (Elem…
1
vote
2 answers

Is there any function readily available for calculating logarithm to the base 2 in Z3/cvc4?

I want to prove a simplification which involves calculating log to the base 2. Is there any function available in z3/cvc4 for calculating it?
sarda
  • 213
  • 2
  • 7