smt

What is the unit of memory usage in Z3 statistics?

僤鯓⒐⒋嵵緔 提交于 2019-12-10 20:27:55
问题 What is the unit in which memory usage is measured in z3 statistics? Is it MB or KB? And what does the memory exactly means? Is it the maximum memory usage or the aggregate sum of all allocations during the execution? 回答1: It's an approximation of the maximum heap size during execution and it is added to the statistics object through the following function in cmd_context.cpp: void cmd_context::display_statistics(...) { statistics st; ... unsigned long long mem = memory::get_max_used_memory();

Z3 : strange behavior with non linear arithmetic

孤者浪人 提交于 2019-12-10 19:24:19
问题 I am just starting to use Z3 (v4.4.0), and I wanted to try one of the tutorial examples : (declare-const a Int) (assert (> (* a a) 3)) (check-sat) (get-model) (echo "Z3 will fail in the next example...") (declare-const b Real) (declare-const c Real) (assert (= (+ (* b b b) (* b c)) 3.0)) (check-sat) As said, the second example fails with "unknown", and by increasing the verbose level (to 3) I think I understand why : some problem with the simplifying process, then the tactic fails. In order

Z3 to show that if a^3=x*y*z then 3a <= x+y+z

我与影子孤独终老i 提交于 2019-12-10 19:19:10
问题 I'm a total newbie with Z3 (started today). So far liking it a lot. Great tool. Unfortunately the syntax confuses me a bit. I want to prove that if: a^3 = x y z = m ( with a, x, y, z, m (0..1) ) then: 3a <= (x+y+z) I do so by trying to find a model satisfying that: 3a > (x+y+z) Here is the Z3 code: (declare-const a Real) (declare-const x Real) (declare-const y Real) (declare-const z Real) (declare-const m Real) (assert (> a 0)) (assert (< a 1)) (assert (> x 0)) (assert (< x 1)) (assert (> y 0

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

How to hide variable with Z3

十年热恋 提交于 2019-12-10 14:49:36
问题 Say I have t1<x and x<t2 is it possible to hide variable x so that t1<t2 in Z3? 回答1: You can use quantifier elimination for doing that. Here is an example: (declare-const t1 Int) (declare-const t2 Int) (elim-quantifiers (exists ((x Int)) (and (< t1 x) (< x t2)))) You can try this example online at: http://rise4fun.com/Z3/kp0X 回答2: Possible solution using Redlog of Reduce: 来源: https://stackoverflow.com/questions/11625388/how-to-hide-variable-with-z3

SMT solver with custom theories?

♀尐吖头ヾ 提交于 2019-12-10 09:23:11
问题 I'm looking at doing some verification work where I've got regular tree grammars as an underlying theory. Z3 lets you define your own stuff with uninterpreted functions, but that doesn't tend to work well any time your decision procedures are recursive. They used to allow for plugins but that has been depricated, I think. I'm wondering, does anybody have a recommendation of a decent SMT solver that allows you to write decision procedures for custom theories? 回答1: There are several options

Avoiding quantifiers in Z3

不羁岁月 提交于 2019-12-10 03:24:21
问题 I am experimenting with Z3 where I combine the theories of arithmetic, quantifiers and equality. This does not seem to be very efficient, in fact it seems to be more efficient to replace the quantifiers with all instantiated ground instances when possible. Consider the following example, in which I have encoded the unique names axiom for a function f that takes two arguments of sort Obj and returns an interpreted sort S . This axiom states that each unique list of arguments to f returns a

With Hyper Threading, threads of one physical core are exchanging via what level of cache L1/L2/L3?

守給你的承諾、 提交于 2019-12-09 03:38:06
问题 Does the Hyper Threading allow to use of L1-cache to exchange the data between the two threads, which are executed simultaneously on a single physical core, but in two virtual cores? With the proviso that both belong to the same process, i.e. in the same address space. Page 85 (2-55) - Intel® 64 and IA-32 Architectures Optimization Reference Manual : http://www.intel.com/content/dam/www/public/us/en/documents/manuals/64-ia-32-architectures-optimization-manual.pdf 2.5.9 Hyper-Threading

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

Using SMT-LIB to count the number of modules using a formula

萝らか妹 提交于 2019-12-08 07:12:44
问题 I am not sure that this is possible using SMT-LIB, if it is not possible does an alternative solver exist that can do it? Consider the equations a < 10 and a > 5 b < 5 and b > 0 b < c < a with a , b and c integers The values for a and b where the maximum number of model exist that satisfy the equations when a=9 and b=1 . Do SMT-LIB support the following: For each values of a and b count the number of models that satisfy the formulas and give the value for a and b that maximize the count. 回答1: