sat-solvers

Z3 bindings on ocaml

梦想的初衷 提交于 2020-01-05 10:33:28
问题 I am currently using ocaml 4.06.0 and I am trying to use the Z3 sat solver. I am using opam's oasis to compile the files (which is building everything successfully). However, when I run the native code produced I am getting the following error: error while loading shared libraries: libz3.so . I tried reinstalling the z3 package but the error still persists. Can anyone help me solve this please because I have no idea what else to try? 回答1: Here is what I did just now to install z3 under Ubuntu

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

Which is better practice in SMT: to add multiple assertions or single and?

此生再无相见时 提交于 2019-12-24 05:04:33
问题 Lets say I have two clauses that I want to model in SMT, is it better to add them as separate assertions like (assert (> x y)) (assert (< y 2)) or to add one assertion with and operator like this (assert (and (> x y) (< y 2) )) Does this matter for large scale problems in terms of SMT solver performance. I am using Z3. 回答1: The conjunction gets split into multiple assertions, so it doesn't really matter too much. If you introduce a large conjunction, Z3's parser will create a term that

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

僤鯓⒐⒋嵵緔 提交于 2019-12-21 17:01:49
问题 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.

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.

(get-unsat-core) returns empty in Z3

喜你入骨 提交于 2019-12-18 04:11:25
问题 I am using Z3 to extract the unsat-core of an unsatisfiable formula. I am using Z3@Rise interface (web based) to write the following code, (set-logic QF_LIA) (set-option :produce-unsat-cores true) (declare-fun ph1 () Int) (declare-fun ph1p () Int) (declare-fun ph3 () Int) (declare-fun ph3p () Int) (declare-fun ph4 () Int) (declare-fun ph4p () Int) (define-fun one () Bool (= ph3p (+ ph1 1))) (define-fun two () Bool (= ph3 (+ ph1 1))) (define-fun three () Bool (= ph1p (+ ph1 1))) (define-fun

Incremental SMT solver with ability to drop specific constraint

本秂侑毒 提交于 2019-12-14 03:48:33
问题 Is there an incremental SMT solver or an API for some incremental SMT solver where I can add constraints incrementally, where I can uniquely identify each constraint by some label/name? The reason I want to identify the constraints uniquely is so that I can drop them later by specifying that label/name. The need for dropping constraints is due to the fact that my earlier constraints become irrelevant with time. I see that with Z3 I cannot use the push/pop based incremental approach because it

Z3py: print large formula with 144 variables

会有一股神秘感。 提交于 2019-12-10 10:47:08
问题 I use the Z3 theorem prover and I have a large formula (114 variables). Can I print a large formula with all clauses? A normal print str(f) truncates the output, and only "..." is printed at the end, not all the clauses. I tested print f.sexpr() and this always prints all the clauses. However only in the sexpr syntax. Can I print all the clauses of a formula but avoid the s-expression syntax? Note: the code example is much to small to show the problem, but posting a large formula takes too

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

巧了我就是萌 提交于 2019-12-04 07:31:32
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., PHI = (x=3 AND y>=1). The upper and lower bound for x are both 3. The lower bound for y is 1, and y does not have an upper bound. This is a very simple example, but is there a solution in general (perhaps using SMT solver)? This assumes the SAT/UNSAT domain of each variable is