Questions tagged [sat-solvers]

SAT solvers are a class of algorithms for solving satisfiability problem of boolean formulas.

SAT solvers are a class of algorithms for solving satisfiability problem of boolean formulas.

SAT was the first known example of an NP-complete problem. Since then, there are a lot of research regarding how to efficiently solve a large enough subset of SAT instances to be useful in various practical areas.

References:

80 questions
2
votes
1 answer

Z3py: print large formula with 144 variables

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…
mrsteve
  • 4,082
  • 1
  • 26
  • 63
2
votes
1 answer

SAT-Solving a system of one-hot constraints

I'm trying to solve a SAT problem that consists of one-hot constraints only. Right now I'm using the one-hot encoding proposed by Claessen in Sec. 4.2 of [1] and MiniSAT. I wonder if there is a better way of solving such a problem, e.g. a class of…
CliffordVienna
  • 7,995
  • 1
  • 37
  • 57
1
vote
1 answer

Java parser with control-flow enumeration

Is there an open-source java parsing tool that can enumerate control flow paths through a method and compute range constraints on integer variables? (A Sat-solver would be great as well) --EDIT -- This is the answer that triggered this question.…
hawkeye
  • 34,745
  • 30
  • 150
  • 304
1
vote
0 answers

The way Sat4j actually solves CNF clauses

I have two .cnf files containing CNF clauses. Both these files solve one problem, which means that the CNF clauses in the two files are the same, but the order of CNF clauses in each file is different. I've set timeout = 1800s, but only one .cnf…
Anh
  • 13
  • 5
1
vote
1 answer

Why is unit-propagation performed first in DPLL algorithm?

Why is the pure-literal rule performed after the unit propagation and not before?
Ronald
  • 157
  • 6
1
vote
1 answer

What is Z3Py FreshBool() function?

What is the difference between z3.Bool() and z3.FreshBool() functions? My code in z3 on python fails when I use Bool() (the solver returns unsat when it shouldn't), but works fine when I use FreshBool() (Desired behaviour is observed). I cannot give…
anon
  • 15
  • 4
1
vote
1 answer

Linear Sat Unsat vs Linear Unsat Sat

I know both the above algorithm come under iterative solutions to find an optimum for MAXSAT problems but I was wondering why is it that starting from the Satisfiable side while finding a solution for MAXSAT better than searching for it from the…
1
vote
1 answer

Unsat core in Minisat

Is there any API call in minisat to extract unsat core or any other method for the same. I want to extract the unsat core for every invocation of the solver and then work on the unsat core.
lava_07
  • 83
  • 1
  • 7
1
vote
0 answers

Solving SAT problems using minisat

I've been trying to solve SAT instances using minisat APIs but for some reason minisat is very slow when it comes to printing out the result. I am pretty sure that I am doing something wrong in the API calls as I've implemented sat solvers myself…
lava_07
  • 83
  • 1
  • 7
1
vote
1 answer

Atleast K out of N encoding in SAT solvers

I know that given an at most k out of N tool I can get an at least K out of N by changing it to at most (n-k) out of N. But I can't seem to wrap my head around how this is true. I might be missing something very trivial For example, if K=2 and N=6…
lava_07
  • 83
  • 1
  • 7
1
vote
1 answer

Tool/Language to check Satisfiability of First order logic?

In general, First Order logic is Undecidable. However, Some fragments of first-order logic as Monadic logics, BSR Fragments, Separated Fragments are decidable. There exist tools to solve SAT/SMT Solvers as Z3. Is there any tool/Language which…
Rituraj Singh
  • 579
  • 1
  • 5
  • 16
1
vote
1 answer

How to improve binary search based optimization in Z3py

I am trying to optimize with Z3py an instance of Set Covering Problem (SCP41) based on minimize. The results are the following: Using (1) I know that Z3 supports optimization (https://rise4fun.com/Z3/tutorial/optimization). Many times I get to the…
afdez
  • 89
  • 7
1
vote
1 answer

Z3 bindings on ocaml

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:…
CXB
  • 241
  • 5
  • 14
1
vote
2 answers

(get-unsat-core) Z3: unsat core is not available

Here is my program which return SAT when there exists a cycle in the graph and UNSAT when there is no cycle: (set-option :fixedpoint.engine datalog) (define-sort s () Int) (declare-rel edge (s s)) (declare-rel path (s s)) (declare-var a s)…
Inzo. Geo
  • 47
  • 4
1
vote
2 answers

How to convert a system of non-linear XOR equations to CNF

I'm trying to analyse phase shift fault analysis in trivium and came across a system of non-linear equations to solve. I read about sat-solvers and Gaussian elimination but unfortunately, none of the articles I found on the internet shows how to…