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

What is the "official" version of the PDR engine in Z3?

I was trying out the PDR engine in Z3 and I'm not sure which version of Z3 to use. The "official" master branch from git seems to work but is dated Nov 2012. I'm sure there have been improvements since then. The unstable branch, on the other hand,…
Dejan Jovanović
  • 2,085
  • 1
  • 16
  • 22
1
vote
0 answers

Z3 issues with propagating equalities under quantifiers

I have the following simple example for which Z3 times out: (set-option :produce-models true) (define-fun T_0 (($in1 Real) ($in2 Real) ($out Real) ($assms Bool) ($prop Bool)) Bool (and (= $assms (< $in1 $in2)) (= $prop (=> $assms…
1
vote
1 answer

How to extract an array of expr from an expr_vector

In order to use the following func_decl member c++ api: expr operator()(unsigned n, expr const * args) const I am looking for a way to transform an expr_vector in which I have all arguments to whom the function shall apply, into an array of expr.…
Heyji
  • 1,113
  • 8
  • 26
1
vote
1 answer

precompiled version that supports HORN?

I see from previous discussions that the stable version does not support (set-logic HORN). Is there a precompiled version for downloading that does support it ?
Ofer strichman
  • 161
  • 1
  • 13
1
vote
1 answer

What commandline is used for Z3 in rise4fun?

What are the command line options used for Z3 in rise4fun? I can solve the following problem on the web but not on my local installations which include z3_4.3.2 z3_3.2 and others... (declare-fun x () Int) (assert-soft false) (assert-soft…
Mauro
  • 23
  • 6
1
vote
1 answer

Dose SMTLIB 1.2 has a (get-value) function like like SMTLIB 2

I wonder if SMTLIB1.2 has an equivalent to the SMTLIB2's (get-value). I'm running different SMT encoding tests using Z3 SMT solver and SMTLIB1.2, the problem is in the output I keep getting all values the model mixed with 100s of auxiliary variable…
Hani
  • 13
  • 4
1
vote
1 answer

Z3 / c++ API for quantifiers

I am using z3 with the C++ API for the example: context c; sort I = c.int_sort(); sort B = c.bool_sort(); expr x = c.int_const("x"); expr x1 = c.int_const("x1"); func_decl p1 = function("p1", I, B); func_decl p2 = function("p2", I, B); solver…
Moun
  • 15
  • 3
1
vote
1 answer

Getting solver in SMT2 format

I am using the java API for generating code, but I would like to show the user the code in SMT2 format , is there any way to get it from the java API?? lets say I would like that some generated code like this... (forall ((task Task)) (not…
user3723800
  • 145
  • 7
1
vote
1 answer

Calling a function inside an expression. Z3

I am trying to express (assert(forall((t Task)) (not (mustPrecede t t)))) With the java API following the examples in JavaExample.java as follows FuncDecl must = ctx.mkFuncDecl("mustPrecede", new Sort[]{TASK,TASK},ctx.mkBoolSort()); …
user3723800
  • 145
  • 7
1
vote
1 answer

Exclusive datatypes in z3 (follow up)

I declared an exclusive datatype in z3 as well as a constant and a little assertion: (declare-datatypes () ((IntOrBool (bpart (b Bool)) (ipart (i Int))))) (declare-fun iob () (IntOrBool)) (assert (= true (b iob))) I get the expected result…
paubo147
  • 748
  • 4
  • 8
1
vote
1 answer

z3.prove is much faster than solver and check

I'm using latest z3 master code from Codeplex, tagged as v4.3.1. I want a function like prove that has a useful return value and does not print. So, I wrote what seemed obvious: def prove2(claim): s = Solver() s.add(Not(claim)) if…
Dan Halperin
  • 2,207
  • 1
  • 18
  • 25
1
vote
1 answer

Declaration of Arrays in Z3

I am new to Z3. I am confused about what the following declaration of a one dimensional array in Z3 means (declare-const a1 (Array t1 t2)) Is this a 1-D array of sort (type) t1 or of sort (type) t2? Is one of t1 or t2 the type of the indexing in…
suguman
  • 25
  • 2
1
vote
1 answer

Visual Studio 2013 error

The top line of my code 'module Title' is giving me a dual warning "The search directory 'C:\z3-4.3.0-x64\bin\' could not be found". One for my .fs (f#) file and one for some FSC file. I believe FSC is or has something to do with the main project…
Timothy Swan
  • 623
  • 3
  • 9
  • 21
1
vote
1 answer

Z3 opt-context in the opt-branch

I have a rather specific question about using the optimization features of the Z3 opt-branch. Namely, I can add assertions to the "opt" context using z3_optimize_assert, and those constraints do work. However, all constraints added to the original…
George Karpenkov
  • 2,094
  • 1
  • 16
  • 36
1
vote
1 answer

Is it legal to Interrupt() a Z3 context that is idle?

Is it legal to call Interrupt on a Z3 Context with the managed API when that context is idle (i.e. no solvers are running)?
usr
  • 168,620
  • 35
  • 240
  • 369
1 2 3
99
100