https://github.com/rnbguy/algosat
academic ventures into algorithms for SAT
https://github.com/rnbguy/algosat
Last synced: 12 months ago
JSON representation
academic ventures into algorithms for SAT
- Host: GitHub
- URL: https://github.com/rnbguy/algosat
- Owner: rnbguy
- Created: 2016-12-15T18:21:28.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2016-12-20T20:05:39.000Z (over 9 years ago)
- Last Synced: 2025-06-04T16:11:05.718Z (12 months ago)
- Language: C++
- Size: 359 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Algorithms for SAT
==================
This is a small academic project for my course work.
I have implemented the following SAT solving algorithms from D. E. Knuth's book.
* Backtrack
* Backtrack using watchee
* Cyclic DPLL
* Clause learning
* Random walk
To run them, just compile,
g++ test.cc -o test
Then execute it,
./test S [INPUTCNF [OUTPUTFILE]]
INPUTCNF is the CNF file and solution will be flushed to OUTPUTFILE. No value means `stdin` and `stdout` respectively.
`S` is
+ `b` for backtrack
+ `w` for BT with watchee
+ `d` for cyclic DPLL
+ `c` for clause learning
+ `r` for random walk
To generate CNF of extended N-queen problem, complie and run,
g++ gen_cnf.cc -o gen_cnf
./gen_cnf BOARDSIZE
`gen_cnf` will flush the output to `stdout`.
To run all the programs with N-queen CNFs, fire,
./runall.sh BOARDSIZE
This will run all the algorithms and verify if the output solution is correct.
It also shows taken time for each solvers.
Ranadeep