Z3

Determine upper/lower bound for variables in an arbitrary propositional formula [closed]

强颜欢笑 提交于 2019-12-21 17:01:23
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 5 years ago . Given an arbitrary propositional formula PHI (linear constraints on some variables), what is the best way to determine the (approximate) upper and lower bound for each variable? Some variables may be unbounded. In this case, an algorithm should conclude that there's no upper/lower bound for those variables. e.g.

Where can i get z3py tutorials

喜你入骨 提交于 2019-12-21 16:15:51
问题 rise4fun z3py is unavailable from several weeks due to some security issues. I tried to find out some resources for learning z3py but ended in vain. Please suggest some resources to learn z3py 回答1: I created a zip file with the Z3Py tutorials sources. It is basically a few HTML pages and a bunch of python files. Here is the link: https://github.com/leodemoura/leodemoura.github.com/blob/master/files/z3py.zip?raw=true Update (Jan 14, 2014) : the Z3Py tutorials are back online 回答2: The official

Getting a “good” unsat-core with z3 (logic QF_BV)

。_饼干妹妹 提交于 2019-12-21 12:55:49
问题 I am using the Z3 SMT solver to solve a problem that I have expressed in the logic QF_BV, using the SMTLIB 2 language. The model is unsatisfiable, and I am trying to get the solver to produce an unsat-core. My model consists of several 'mandatory' constraints, which I specify using assert statements. The assertions that I want to be considered for unsat-core generation, have been specified using the (assert (! (EXPR) :named NAME)) construct. Z3 gives me an unsat , as expected. However, Z3

Getting a “good” unsat-core with z3 (logic QF_BV)

╄→гoц情女王★ 提交于 2019-12-21 12:55:29
问题 I am using the Z3 SMT solver to solve a problem that I have expressed in the logic QF_BV, using the SMTLIB 2 language. The model is unsatisfiable, and I am trying to get the solver to produce an unsat-core. My model consists of several 'mandatory' constraints, which I specify using assert statements. The assertions that I want to be considered for unsat-core generation, have been specified using the (assert (! (EXPR) :named NAME)) construct. Z3 gives me an unsat , as expected. However, Z3

function declaration in z3

五迷三道 提交于 2019-12-21 05:44:20
问题 In z3 is it possible to declare a function that takes another function as an argument? For instance, this (declare-fun foo ( ((Int) Bool) ) Int) doesn't quite seem to work. Thanks. 回答1: As Leonardo mentioned, SMT-Lib does not allow higher-order functions. This is not merely a syntactic restriction: Reasoning with higher-order functions is (generally) beyond what SMT solvers can deal with. (Although uninterpreted functions can be used in some special cases.) If you do need to reason with

Can Z3 handle sinusoidal and exponential functions

和自甴很熟 提交于 2019-12-20 07:28:26
问题 Based on some non-linear constraints on $a_k$,$b_k$ , I have to find feasible set of the following fourier series expression: $ x(t)= {a_0+ \sum_{k=1}^{\infty} (a_k\cos(2\pi f_0 kt)+(b_k\sin(2\pi f_0 kt))} Whereas constraints on $a_k$,$b_k$ and $a_0$ are $ L \leq a_0 \leq U $ $ Lower_bound \leq a_k^2+b_k^2 \leq Upper_bound Can I do this using Z3? In addition to this can I use Z3 for exponential functions having complex powers, e.g. in fourier transform expression. 回答1: Unfortunately, Z3 does

Can Z3 handle sinusoidal and exponential functions

有些话、适合烂在心里 提交于 2019-12-20 07:28:02
问题 Based on some non-linear constraints on $a_k$,$b_k$ , I have to find feasible set of the following fourier series expression: $ x(t)= {a_0+ \sum_{k=1}^{\infty} (a_k\cos(2\pi f_0 kt)+(b_k\sin(2\pi f_0 kt))} Whereas constraints on $a_k$,$b_k$ and $a_0$ are $ L \leq a_0 \leq U $ $ Lower_bound \leq a_k^2+b_k^2 \leq Upper_bound Can I do this using Z3? In addition to this can I use Z3 for exponential functions having complex powers, e.g. in fourier transform expression. 回答1: Unfortunately, Z3 does

using floating point arithmetic with Z3 C++ APIs

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-20 06:15:07
问题 I am trying to solve a problem of nonlinear real numbers using Z3. I need the Z3 to generate multiple solutions. In the problem domain, precision is not a critical issue; I need just one or two decimal digits after the decimal point. so, I need to set Z3 not to explore all the search space of real numbers to minimize the time to find multiple solutions. I am trying to replace the real numbers with floating point numbers. I read the fpa example in the c_api.c file but I found it a little bit

Encoding returns “unknown”

蓝咒 提交于 2019-12-20 05:22:14
问题 For this example: http://pastebin.com/QyebfD1p z3 and cvc4 return "unknown" as result of check-sat. Both are not very verbose about the cause, is there a way to make z3 more verbose about its execution ? 回答1: Your script uses the tactic s = Then('simplify','smt').solver() This tactic applies the Z3 simplifier, and then executes a "general purpose" SMT solver available in Z3. This solver is not complete for nonlinear arithmetic. It is based on a combination of: Simplex, Interval Arithmetic and

Z3 4.3.1 C-API parse_smtlib2_string: Where to get declarations from?

倖福魔咒の 提交于 2019-12-20 04:50:08
问题 unfortunately I do not have enough reputation to comment answers of other questions. So I have to start a new question. Essentially I have the same problem as described here. I want to use Z3 for incremental solving. For getting the constraints into Z3, I use smtlib2 strings. Everything works fine for the first set of constraints, where I can put the declarations of variables etc. directly into the smtlib2 string. When adding additional constraints incrementally, Z3_parse_smtlib2_string needs