Z3

Performance issues about Z3 for Java

拜拜、爱过 提交于 2020-01-02 09:38:10
问题 I am running into some performance issues in my current project with Z3 for Java: Basically most of my current constraints are pretty simple: e.g: (f(x) = 2 && f(y) <= 3) || f(x) <=5 I am using static context and solver instances shared by the whole project: public class ConstraintManager { static Context ctx; static Solver solver; ... } If I generate expr by the same instance of ctx for billions of times, is that going to an issue? When is the best time to invoke ctx.Dispose() , or, what's

When will the Z3 parallel version be reactivated? [closed]

回眸只為那壹抹淺笑 提交于 2020-01-02 08:13:36
问题 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 7 years ago . What are the current plans for reactivating the parallel version of Z3? 回答1: Z3 never had extensive support for parallelism. In version 2.x, we included an experimental feature that allowed users to execute several copies in parallel using different configuration options. The different copies could also share

When will the Z3 parallel version be reactivated? [closed]

China☆狼群 提交于 2020-01-02 08:12:21
问题 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 7 years ago . What are the current plans for reactivating the parallel version of Z3? 回答1: Z3 never had extensive support for parallelism. In version 2.x, we included an experimental feature that allowed users to execute several copies in parallel using different configuration options. The different copies could also share

When will the Z3 parallel version be reactivated? [closed]

半世苍凉 提交于 2020-01-02 08:12:10
问题 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 7 years ago . What are the current plans for reactivating the parallel version of Z3? 回答1: Z3 never had extensive support for parallelism. In version 2.x, we included an experimental feature that allowed users to execute several copies in parallel using different configuration options. The different copies could also share

Array select and store using the C++ API

烂漫一生 提交于 2020-01-02 07:49:07
问题 I am using z3 v 4.1. I am using the C++ API and I am trying to add some array constraints in the context. I dont see the select and sort functions in the C++ API. I tried mixing of the C and C++ API. In the example array_example1() provided with the C API if I change the context variable from Z3_Context (i.e. C API) to context (i.e. C++ API) I get a segmentation fault at the "create antecedent" statement void array_example1(){ context ctx; //Z3_context ctx; Z3_sort int_sort, array_sort; Z3

Error when building 64-bit Z3 on Windows

泪湿孤枕 提交于 2020-01-01 12:14:06
问题 I followed the instructions to build Z3 on a 64-bit Windows 8.1 system with Visual Studio Community 2015 by running python scripts/mk_make.py -x but when I run nmake, I get the following error: C:\Program Files (x86)\Windows Kits\8.1\include\um\winbase.h(8848): error C3861: '_InterlockedIncrement64': identifier not found C:\Program Files (x86)\Windows Kits\8.1\include\um\winbase.h(8879): error C3861: '_InterlockedDecrement64': identifier not found C:\Program Files (x86)\Windows Kits\8.1

Z3 statistics: what does time measure?

半世苍凉 提交于 2019-12-31 03:01:25
问题 I am getting strange statistics results when run Z3 3.1 with -st command option. If you press Ctrl-C, Z3 reports total_time < time. Otherwise, if you wait until Z3 finishes: total_time > time. What does "total-time" and "time" measure? Is it a bug(minor though)(the difference described above)? Thanks! 回答1: This is a bug in Z3 for Linux (versions 3.0 and 3.1). The bug does not affect the Windows version. The fix will be available in the next release (Z3 3.2). The timer used to track time is

z3 C++ API & ite

点点圈 提交于 2019-12-30 18:53:12
问题 Maybe I missed something, but what is the way of constructing an if-then-else expression using the z3 C++ API ? I could use the C API for that, but I'm wondering why there is no such function in the C++ API. regards, Julien 回答1: We can mix the C and C++ APIs. The file examples/c++/example.cpp contains an example using the C API to create the if-then-else expression. The function to_expr is essentially wrapping a Z3_ast with the C++ "smart pointer" expr that automatically manages the reference

Sum of all the bits in a Bit Vector of Z3

≡放荡痞女 提交于 2019-12-30 07:43:52
问题 Given a bit vector in Z3 , I am wondering how can I sum up each individual bit of this vector? E.g., a = BitVecVal(3, 2) sum_all_bit(a) = 2 Is there any pre-implemented APIs/functions that support this? Thank you! 回答1: It isn't part of the bit-vector operations. You can create an expression as follows: def sub(b): n = b.size() bits = [ Extract(i, i, b) for i in range(n) ] bvs = [ Concat(BitVecVal(0, n - 1), b) for b in bits ] nb = reduce(lambda a, b: a + b, bvs) return nb print sub(BitVecVal

Interpretation of Z3 Statistics

我怕爱的太早我们不能终老 提交于 2019-12-30 04:49:08
问题 I obtained several statistics from runs of Z3. I need to understand what these mean. I am rather rusty and non up to date for the recent developments of sat and SMT solving, for this reason I tried to find explanations myself and I might be dead wrong. So my questions are mainly: 1) What do the measures' names mean? 2) If wrong, can you give me pointers to understand better to what they refer to? Other observations are made below and conceptually belong to the two questions above. Thanks in