- SAT-Solver
- .BC generation for CEC for 32bitAdder and our Adder Implementation
solver in java. takes in CNF format. Uses a Path finding SCC algorithm for satisfiability checking, and Graphing with DFS for 2SAT problems. Fallbacks to DPLL if the input CNF file is not a 2SAT problem.
Test files are in the test_files folder.
- Set your run configurations with the test file you want to run with as args[0].
- Increase your stack size if the .CNF file is big (a few hundred clauses), under VM arguments. (-Xss16M)
- If you are sure the 2SAT problem is satisfiable, set dangerous for args[1]. This will skip satisfiability checking for a faster speed.
- Run and win caifan money.
- Run 32addertobc.py to generate 32Adder.bc
- Run bkaddertobc.rb to generate bkAdder.bcsolver in java. takes in CNF format. Uses a Path finding SCC algorithm for satisfiability checking, and Graphing with DFS for 2SAT problems. Fallbacks to DPLL if the input CNF file describes other SAT problems.
- Merge the .bc files together
- Add a
Result:=sX:SX
into your combined .bc file at the end, where X is your desired bit to compare. - Make bc2cnf
- Convert the .bc file into .CNF.
- Check the result bit, and set it at the bottom of the .CNF with
X 0
, where X is your result bit. - Increase the clause variable at p to prevent an ArrayOutOfBoundsIndex.
- Run the resultant .CNF file with the SAT Solver. It should be unsatisfiable.