https://github.com/bwconrad/dpll-sat-solver
SAT solver using the DPLL algorithm
https://github.com/bwconrad/dpll-sat-solver
artificial-intelligence python3 sat
Last synced: 12 months ago
JSON representation
SAT solver using the DPLL algorithm
- Host: GitHub
- URL: https://github.com/bwconrad/dpll-sat-solver
- Owner: bwconrad
- Created: 2018-01-05T22:06:36.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-01-12T04:14:18.000Z (over 8 years ago)
- Last Synced: 2025-03-18T14:49:15.996Z (over 1 year ago)
- Topics: artificial-intelligence, python3, sat
- Language: Python
- Homepage:
- Size: 17.6 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# DPLL SAT Solver
SAT solver using the Davis–Putnam–Logemann–Loveland algorithm implemented in Python 3.
To run use an instances file as input to the program:
```
python3 dpll.py small_instances.txt
```
## File Syntax
### Instances:
Each clause is written in single line with literals from 0 to N that are negated with a prepending '-'.
```
2 -0 4 -3 -1
```
SAT problems are divided by a newline between the clauses.
```
-0 -1
0 1
-0 -1 3
0 -2 3
2 -1 0
```
### Assignments
Each line denotes the positive or negative assignments to the literals for the corresponding SAT problem in the instances file.
```
-0 1
0 -1 2 3
```