https://github.com/mbouzid/csp2sat
csp2sat
https://github.com/mbouzid/csp2sat
csp linear-inequations sat
Last synced: 2 months ago
JSON representation
csp2sat
- Host: GitHub
- URL: https://github.com/mbouzid/csp2sat
- Owner: mbouzid
- Created: 2019-02-13T19:26:07.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-02-13T19:56:14.000Z (over 6 years ago)
- Last Synced: 2024-10-06T04:04:24.413Z (8 months ago)
- Topics: csp, linear-inequations, sat
- Language: C++
- Size: 11.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# csp2sat
csp2sat is a full C++ program based on Tamura's et al. "Compiling finite linear CSP into SAT" (2008).
## Principle
Briefly, the paper introduces the 'order encoding', a method which basically transforms any input inequation aixi <= b into a set of elementary "primitive" ones (x <= a).
Each of these primitive comparisons are then encoded into literal p(x,i) that represents x <= i.
## How-to-use
In the main program there is an example of the encoding of the following inequation : 3x + 5y + 2z + t <= 14.
The clauses are written in a file (dimacs formatted) and can be tested with any sat solver.
## Usage
```
mkdir bin
mkdir obj
make
./bin/csp2sat
```
..Voilà!