-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Welcome to the SAT-tfg wiki!
For downloading and installing see README.md file.
For full documentation check the thesis document.
- Quick examples
- Boolean formula
- Pseudo-Boolean optimisation
- Introduction
- Features
- Boolean formula
- Pseudo-Boolean optimisation
- Features
- Download
- Install
- Compile and execute
- License
Follow these steps in order to create, compile and execute a simple program.
Create a file named main.cpp
#include "BoolFunc.h"
#include "CnfConverter.h"
int main () {
Formula a = BoolFunc::newLit("a");
Formula b = BoolFunc::newLit("b");
Formula c = a + b;
Cnf tseitin = CnfConverter::tseitin(c);
tseitin.print();
}
This program converts c into a CNF using the Tseitin transformation. The output will be
3 -1
3 -2
1 2 -3
3
This library has functionalities for two type of problems: Boolean logic and Pseudo-Boolean minimisation problems. Its aim is to simplify the representation of the representation of this problems and solve them.
Check Boolean formulas for full documentation.
- Boolean formulas representation
- CNF encodings
- Tseytin transformation
- Extracting primes transformation
- Mix transformation
- Execute a SAT Solver
- BDD conversion
Check Pseudo-Boolean minimisation for full documentation.
- Pseudo-Boolean minimisation problems representation
- Pseudo-Boolean constraints
- Cost function
- Pseudo-Boolean minimisation problem
- How to solve it
- Search strategy
- Binary
- Linear
- Solver
- Without timeout
- Timeout per SAT solver execution
- Global timeout
- Search strategy
It is recommended to download always stable versions:
$ wget https://github.com/marcbenedi/SAT-tfg/archive/v1.1.zip
$ unzip v1.1.zip
$ chmod +x installer.sh
$ ./installer.sh
The fastest way to compile the file is placing it inside the library folder such as SAT-tfg/main.cpp
Then execute
make main
This command compiles, links and executes the program. Alternatively, this three steps can be executed separately:
make compile_main
make link_main
./main
This project is licensed under the MIT License - see the LICENSE.md file for details
MIT License
Copyright (c) 2018 Marc Benedí
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.