Questions tagged [sat4j]

Sat4j is a full featured boolean reasoning library designed to bring state-of-the-art SAT technologies to the Java Virtual Machine.

The Sat4j project started in 2004 as an implementation in Java of Niklas Een and Niklas Sorenson's MiniSAT specification: An extensible SAT solver, Niklas Eén and Niklas Sörensson. Proceedings of the Sixth International Conference on Theory and Applications of Satisfiability Testing, LNCS 2919, pp 502-518, 2003.

The original C++ implementation is available here.

Whereas the overall algorithmic of the solver was respected, the design has been adapted to Java practices and the initial design has been extended to allow testing several heuristics and learning schemes.

Over the years, the support for pseudo-boolean optimization (2005), CSP to SAT translation (2005), MaxSat (2006), and MUS (2011) has been added.

Since June 2008, the Eclipse platform relies on Sat4j to solve its software dependencies. As such, Sat4j is probably the most widely deployed and used Sat-based library in the world.

If you are a newcomer to the SATisfiability problem, you might want to take a look at wikipedia's page on the boolean satisfiability problem first.

You might also find those surveys of interest. For a deeper insight of the current interest on SAT solvers for software and hardware verification, Armin Biere's course on formal systems is a good start.

Eugene Goldberg has also a nice and somehow non standard way of introducing modern SAT solvers in his three part course on SAT.

We also gave a lecture on SAT for the Verification Technology, Systems and Applications summer school in october 2009.

There are many international competitions organized around those problems, where you can see sat4j in action:

Here is a list of softwares who are using SAT4J :

enter image description here

Here is the documentation to be able to use SAT4J : http://www.sat4j.org/doc.php.

23 questions
5
votes
3 answers

Input CNF for SAT4J solver

I a totally new to sat4j solver.. it says some cnf file should be given as input is there any possible way to give the rule as input and get whether it is satisfiable or not? my rule will be of the kind : Problem = ( ( staff_1 <=> …
karthi
  • 2,762
  • 4
  • 30
  • 28
2
votes
1 answer

time taken to parse and simplyify a CNF file

I have just starting to use the Sat4j libraries. Can you direct me how to calculate the time taken to parse and simplify a given CNF input. i have used ISolver solver = SolverFactory.newDefault(); Reader reader = new DimacsReader(solver); IProblem…
2
votes
0 answers

Best heuristics for instances with a 2-clause majority

My Java program generates a large CNF instance from its data. The instance contains mostly (>95% in most case) exclusive 2-clauses: (!a v !b). Currently I use Sat4j's default solver. When I enable all of the conditions in the program, then the…
Dávid Horváth
  • 4,050
  • 1
  • 20
  • 34
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

How to find solutions randomly (nondeterministically) in SAT4J?

In the code examples from the SAT4J documentation, calling the solver multiple times on the same SAT problem always yields the same solution, even if multiple possible solutions exist - that is, the result is deterministic. I'm looking for a way to…
1
vote
1 answer

How does SAT4J solve Pseudo-Boolean problems? Does it use a custom Pseudo-boolean solver or translates the constraints to CNF?

I would like to know how the Java SAT4j SAT solver API solves its pseudo-boolean problems. I've had a browse through the javadoc but im quite new to SAT problems. From the release doc…
Bread
  • 23
  • 4
1
vote
1 answer

"A JNI error has occurred, please check your installation and try again" Sat4J

I wrote a java programm using Sat4J and it works fine. Now I want to export it as a jar-File, but when I execute it, it allways says "A JNI error has occurred, please check your installation and try again Exception in thread "main"…
1
vote
1 answer

SAT Solver: SAT4J - more examples?

I haven't used before a SAT solver, so I started to learn how to use SAT4J. Mostly, I am using its API, but I am finding hard to understand sometimes what some arguments (in classes or methods) mean or what their format/type is acceptable. For…
Avah
  • 227
  • 3
  • 13
1
vote
1 answer

How to assign integer values to boolean formula's variables using sat4j in java?

I am totally new for sat4j solver and researching boolean satisfiable problems; and i am stuck.I want to make a program which solves integer variables which are in boolean formula like; x1 < x2 + x3 the user enter that formula and my program…
1
vote
0 answers

Optimization with SAT4J

I am trying to solve the problem below using SAT4J . My question is how to specify the problem to SAT4J using their API. Here is the problem: boolean[50][50][20] variables; int[50][50][20] utility; maximize Σ(over i,j,k) variables[i][j][k] *…
0
votes
0 answers

FileNotFoundException during Debug process of Equinox framework instantiation in IntelliJ IDEA under Windows

Below code was initially written in Linux (Deepin) version of IntelliJ IDEA and debugged well. Map map = new HashMap<>(); Framework a = new EquinoxFactory().newFramework(map); However, after relaying my work in a Windows machine and debugging, the…
Baytars
  • 103
  • 1
  • 8
0
votes
0 answers

How do I include the sat4j library in eclipse java IDE?

I've tried so many times to import the sat4j library (https://www.sat4j.org/index.php) into the java IDE eclipse by adding the jar files in the lib folder which came with the download of sat4j library (commons-beanutils.jar, commons-cli.jar,…
Msmat
  • 27
  • 4
0
votes
2 answers

How to iterate over optimal solutions with SAT4J DependencyHelper?

I am trying to use SAT4J and its DependencyHelper to solve an optimization problem. Finding single solutions works fine, but now I need to find all optimal solutions (or, alternatively, iterate over all solutions in order of optimality), and I can’t…
CWalther
  • 13
  • 4
0
votes
1 answer

Representing Minesweeper Constraints in Sat4J/CNF

I'm trying to implement a minesweeper solver using a SAT solver (sat4j) and I have a simple understanding of how they work. But one thing I can't figure out is how to represent the x+y+Z+....=2 for mines, since SAT solvers use Boolean input.…
FRRXX
  • 3
  • 2
0
votes
1 answer

About sat4j, how to use sat4j to solve pseudo boolean problems?

I have pseudo boolean problems and I need to solve it with sat4j. Can someone help me? Here's my problem: I have a list of variables named: a,b,c,d,e,f And I have a list of values represented by: #1, #2, #3..... h(a,#1) means assign #1 to a I have…
1
2