cvc4

CVC4 minimize/maximize model optimization

不想你离开。 提交于 2021-02-11 18:26:11
问题 Does CVC4 an option to maximize or minimize the result model for bitvectors as Z3 does? Thanks. 回答1: Unfortunately, CVC4 does not (yet) support optimization. For bitvectors, you can always do it yourself using multiple queries and binary search, but it's not built-in. 来源: https://stackoverflow.com/questions/37304885/cvc4-minimize-maximize-model-optimization

CVC4 minimize/maximize model optimization

北慕城南 提交于 2021-02-11 18:26:07
问题 Does CVC4 an option to maximize or minimize the result model for bitvectors as Z3 does? Thanks. 回答1: Unfortunately, CVC4 does not (yet) support optimization. For bitvectors, you can always do it yourself using multiple queries and binary search, but it's not built-in. 来源: https://stackoverflow.com/questions/37304885/cvc4-minimize-maximize-model-optimization

How to execute the following SMT-LIB code using Alt-Ergo

与世无争的帅哥 提交于 2020-05-17 05:41:40
问题 The following SMT-LIB code runs without problems in Z3, MathSat and CVC4 but it is not running in Alt-Ergo, please let me know what happens, many thanks: (set-logic QF_UF) (set-option :incremental true) (set-option :produce-models true) (declare-fun m () Bool) (declare-fun p () Bool) (declare-fun b () Bool) (declare-fun c () Bool) (declare-fun r () Bool) (declare-fun al () Bool) (declare-fun all () Bool) (declare-fun la () Bool) (declare-fun lal () Bool) (declare-fun g () Bool) (declare-fun a

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

Get fractional part of real in QF_UFNRA

爱⌒轻易说出口 提交于 2019-12-13 13:48:52
问题 Using smtlib I would like to make something like modulo using QF_UFNRA. This disables me from using mod, to_int, to_real an such things. In the end I want to get the fractional part of z in the following code: (set-logic QF_UFNRA) (declare-fun z () Real) (declare-fun z1 () Real) (define-fun zval_1 ((x Real)) Real x ) (declare-fun zval (Real) Real) (assert (= z 1.5)); (assert (=> (and (<= 0.0 z) (< z 1.0)) (= (zval z) (zval_1 z)))) (assert (=> (>= z 1.0) (= (zval z) (zval (- z 1.0))))) (assert

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

吃可爱长大的小学妹 提交于 2019-12-11 05:48:28
问题 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? 回答1: The short answer is that support is unavailable directly for integers in either tool. For unbounded integers, decision procedures for Presburger exponentiation by a fixed constant exist. From this you can construct the logarithm function (or vice versa). I am not an expert but my understanding is that these are quite complicated. For more

Is division by zero included in QF_NRA?

二次信任 提交于 2019-12-11 04:21:40
问题 Is division by zero included in QF_NRA? The SMT-LIB standard is confusing in this matter. The paper where the standard is defined simply does not discuss this point, in fact NRA and QF_NRA do not appear anywhere in that document. Some information is provided on the standard website. Reals are defined as including: - all terms of the form (/ m n) or (/ (- m) n) where - m is a numeral other than 0, - n is a numeral other than 0 and 1, - as integers, m and n have no common factors besides 1.

Exactly what quantifiers is SMT complete for?

北城余情 提交于 2019-12-10 14:57:06
问题 I've been looking at various SMT solvers, mainly Z3, CVC4, and VeriT. They all have vague descriptions of their ability to solve SMT problems with quantifiers. Their documentation is primarily example based (Z3), or consists of academic papers, describing possible changes that may or may not actually be implemented. I know that there are decidable fragments of First-order logic, such as: Finitely-bounded quantifiers Monadic first-order logic What I'd like to know is, which (if any) classes of

What are the limits of reasoning in quantified arithmetic in SMT?

百般思念 提交于 2019-12-08 18:23:00
问题 I have tried several SMT solvers (CVC3, CVC4 and Z3) on the following seemingly trivial benchmark: (set-logic LIA) (set-info :smt-lib-version 2.0) (assert (forall (( x Int)) (forall ((y Int)) (= y x)))) (check-sat) (exit) The solvers all return unknown. I understand that this is an undecidable fragment (well non-linear) but I was expecting there would be some simple instantiation heuristics that could solve it. I also tried adding some extra assertions with constants but it didn't help. Is

Does z3 support rational arithmetic for its input constraints?

笑着哭i 提交于 2019-12-06 03:17:16
In fact, does the SMT-LIB standard have a rational (not just real) sort? Going by its website , it does not. If x is a rational and we have a constraint x^2 = 2, then we should get back ``unsatisfiable''. The closest I could get to encoding that constraint is the following: ;;(set-logic QF_NRA) ;; intentionally commented out (declare-const x Real) (assert (= (* x x) 2.0)) (check-sat) (get-model) for which z3 returns a solution, as there is a solution (irrational) in the reals. I do understand that z3 has its own rational library, which it uses, for instance, when solving QF_LRA constraints