This project was developed by Thomas Hashem and Basel Khouri as part of the course "Algorithms in Logic - 00960265" taught by Prof. Ofer Strichman at the Technion Israel Institute of Technology.
The project implements Simple Bounded Variable Addition (BVA) into the EDUSAT SAT solver. It is designed to be modular and can be integrated into other SAT solvers. The algorithm is based on the paper Automated Reencoding of Boolean Formulas.
Additionally, as part of this project, we extended EDUSAT to produce DRAT UNSAT proofs in cases where the CNF is unsatisfiable.
We utilize cadical, a state-of-the-art reference SAT solver, and drat-trim, a tool for verifying UNSAT DRAT proofs, to ensure the correctness of our results.
Ensure that you clone the repository with its submodules. Use the following command:
git clone --recurse-submodules <repository-url>If you have already cloned the repository without submodules, you can initialize and update them using:
git submodule update --init --recursiveTo build the project, follow these steps:
- Release Build: Run
make releaseto create a release build. - Debug Build: Run
make debugto create a debug build.
For the first-time setup, it is recommended to run the ./build.sh script. This script not only builds the project but also initializes and builds the required submodules: cadical and drat-trim.
This project includes several utility scripts to streamline the workflow:
This script initializes all the required aliases and environment variables. It should be run before executing any other script to ensure the environment is correctly configured.
This script processes all CNF files in a predefined folder (hardcoded in the script). It runs cadical on each CNF file and renames the files based on the result:
_yesis appended if the result is SAT._nois appended if the result is UNSAT._unknownis appended if the result is inconclusive.
This script verifies the correctness of SAT assignments produced by the edusat -bva command:
- It takes a folder containing CNF instances as input.
- Filters out all
_yesinstances. - Runs
edusat -bva YES_CNF_INPUTon each filtered instance to produce an assignment. - Concatenates the assignment to the original CNF and runs
cadicalto verify the result:- If
cadicalconfirms SAT, the result is verified. - Otherwise, the result is not verified, indicating a potential bug.
- If
Note: This script must be run from the tests folder only after running set_env.sh script.
This script verifies all UNSAT instances produced by the edusat -bva command:
- It takes a folder containing CNF instances as input.
- Filters out all
_noinstances. - Runs the
edusat -bva -proof PROOF_FILE NO_CNF_INPUTcommand to generate a DRAT proof. - Uses
drat-trimto validate the proof with the command:drat-trim NO_CNF_INPUT PROOF_FILE.- drat-trim either outputs: verified or not verified.
Note: This script must be run from the tests folder only after running set_env.sh script.