smt

The “pull-nested-quantifiers” option seems to cause problems in the context for UFBV?

最后都变了- 提交于 2019-12-23 12:27:10
问题 I am currently experimenting with Z3 as bounded engine for specifications written in Alloy (a relational logic/language). I am using the UFBV as target language. I detect a problem using the Z3 option (set-option :pull-nested-quantifiers true) . For two semantically identical SMT specifications Spec1 and Spec2, Z3 times out (200 sec) for proving Spec1 but proves Spec2. The only different between Spec1 and Spec2 is that they have different function identifiers (because I use java hash names).

How are Int sort (of SMT-LIB 2.0 Ints theory) and dynamically declared sorts defined in z3?

懵懂的女人 提交于 2019-12-23 12:17:30
问题 Here is an SMT-LIB 2.0 benchmark which I executed with z3 : (set-logic AUFLIA) (declare-sort PZ 0) (declare-fun MS (Int PZ) Bool) (assert (forall ((x Int)) (exists ((X PZ)) (and (MS x X) (forall ((y Int)) (=> (MS y X) (= y x))))))) (check-sat) I expected the result to be sat , with at least a model where PZ is the powerset of Z (integers) and MS is a predicate which tests the membership of an integer into a subset of Z (an element of the sort PZ ). But z3 answered unsat . Could you help me

how to use elim-quantifiers using .net API in Z3?

ε祈祈猫儿з 提交于 2019-12-23 04:02:07
问题 I can not find .net api for (elim-quantifiers (exists ((x Int)) (and (< t1 x) (< x t2)))) is it a Tactic? Could someone help me using .net API of Z3 to implement the following scripts? (declare-const t1 Int) (declare-const t2 Int) (elim-quantifiers (exists ((x Int)) (and (< t1 x) (< x t2)))) 回答1: Yes, you can use a tactic. Here is an example using the .NET API (I didn't run this particular example so it may need some minor modification, but I use roughly the same in a program of mine). //

how to use elim-quantifiers using .net API in Z3?

北城以北 提交于 2019-12-23 04:02:05
问题 I can not find .net api for (elim-quantifiers (exists ((x Int)) (and (< t1 x) (< x t2)))) is it a Tactic? Could someone help me using .net API of Z3 to implement the following scripts? (declare-const t1 Int) (declare-const t2 Int) (elim-quantifiers (exists ((x Int)) (and (< t1 x) (< x t2)))) 回答1: Yes, you can use a tactic. Here is an example using the .NET API (I didn't run this particular example so it may need some minor modification, but I use roughly the same in a program of mine). //

How to get z3 to return multiple unsat cores, multiple satisfying assignments

柔情痞子 提交于 2019-12-21 21:27:30
问题 I am working on a component of a research tool; I am interested in retrieving (for QF_LRA) -multiple (minimal or otherwise) UNSAT cores and -multiple SAT assignments I have checked the forum for earlier discussions on this topic e.g., How to get different unsat cores when using z3 on logic QF_LRA They refer to the z3 Python tutorial(s) e.g, http://rise4fun.com/Z3Py/tutorial/musmss which seems to be offline for now. I have tried other suggestions of github etc to find the mentioned tutorial,

Use Z3 and SMT-LIB to define sqrt function with a real number

蹲街弑〆低调 提交于 2019-12-20 04:38:06
问题 How I can write sqrt function in smt-libv2 format. Note: To get a maximum of two values, i found a useful link here: Use Z3 and SMT-LIB to get a maximum of two values. 回答1: Suppose that your formula is quantifier free, then you can define square-roots implicitly by introducing fresh variables and adding constraints. For example you can write: (define-fun is_sqrt ((x Real) (y Real)) Bool (= y (* x x))) Then 'x' is a square root of 'y'; and if you just want the non-negative square roots, then:

Surprising behaviour when trying to prove a forall

北慕城南 提交于 2019-12-20 02:45:10
问题 Consider the following SMT-LIB code: (set-option :auto_config false) (set-option :smt.mbqi false) ; (set-option :smt.case_split 3) (set-option :smt.qi.profile true) (declare-const x Int) (declare-fun trigF (Int Int Int) Bool) (declare-fun trigF$ (Int Int Int) Bool) (declare-fun trigG (Int) Bool) (declare-fun trigG$ (Int) Bool) ; Essentially noise (declare-const y Int) (assert (! (not (= x y)) :named foo )) ; Essentially noise (assert (forall ((x Int) (y Int) (z Int)) (! (= (trigF$ x y z)

Which statistics indicate an efficient run of Z3?

北战南征 提交于 2019-12-20 02:34:31
问题 The SMTLib2 directive (get-info all-statistics) displays several numbers, e.g. num. conflicts: 4 num. propagations: 0 (binary: 0) num. qa. inst: 23 In order to test different axiomatisations and encodings I'd like to know which of those numbers are appropriate to declare that one Z3 run is better/more efficient than another. Guessing from the names I'd say that num. qa. inst - the number of quantifier instantiations - is a good indicator (lower = better), but what about the others? 回答1:

Z3 patterns and injectivity

99封情书 提交于 2019-12-19 09:46:38
问题 In the Z3 tutorial, section 13.2.3, there is a nice example on how to reduce the number of patterns that have to be instantiated when dealing with the axiomatisation of injectivity. In the example, the function f that has to be stated injective, takes an object of type A as input and return an object of type B. As far as I understand the sorts A and B are disjunct. I have an SMT problem (FOL+EUF) on which Z3 seems not to terminate, and I am trying to isolate the cause. I have a function f:A-

Z3 patterns and injectivity

此生再无相见时 提交于 2019-12-19 09:46:00
问题 In the Z3 tutorial, section 13.2.3, there is a nice example on how to reduce the number of patterns that have to be instantiated when dealing with the axiomatisation of injectivity. In the example, the function f that has to be stated injective, takes an object of type A as input and return an object of type B. As far as I understand the sorts A and B are disjunct. I have an SMT problem (FOL+EUF) on which Z3 seems not to terminate, and I am trying to isolate the cause. I have a function f:A-