Giter VIP home page Giter VIP logo

cc-sat-solver's Introduction

#CC parallel SAT-Solver

High performance parallel implementation of a satisfability solver for the congruence closure, able to solve a set of literals in the quantifiers free fragment of first order logic, based on the union of the equality theory, list theory and array theory.

Author

Enrico Martini, VR445202 , Automatic Reasoning Course Project
@github/DoctorMartins9

Usage example

#include "sat.hpp"

std::string formula;

// Run CC-Closure procedure
bool is_sat = ccsat::SOLVE(formula,"S");

Run the example (Release mode)

For running an example, in build directory type:

cmake ..
make release
../bin/ccsat

At this point you can insert the formula and see how the algorithm works. An example of formula accepted is:

f(x)!=f(y)&x=y

Example of not allowed formulas:

(a)=b   ->  a=b             : useless parenthesis are not allowed 
a = b   ->  a=b             : space between literals are not allowed
F&(G|H) ->  (F&G)|(F&H)     : CNF form is not allowed, only DNF

Testing

More than 30 test was done to check the correctness and the strength of the algorithm, including axioms. For real-time test, in build directory type:

cmake ..
make -j
./test

Benchmarks

In build directory type:

cmake ..
make release
cd ../bin
./benchmark *mode* *path* *number*

Where mode is parallel ('P') or sequential ('S'), path is the path of the file .txt where the clauses are placed and number is the number of the line. For running example of the benchmark in bin directory type:

./benchmark S ../utils/benchmarks_formula_unsat.txt 10
./benchmark S ../utils/benchmarks_formula_sat.txt 10

Lisp parser

For benchmarking needs, in utils directory there is a python script called lisp_parser.py that allows you to translate SMT-LIB formulas from lisp language to DNF formulas that are legal input of the SAT solver.

Documentation

LaTex documentation pre-compiled can be found in doc directory.

Complexity informations

Using lizard library for complexity informations, in build directory type:

cmake ..
make cyclo

cc-sat-solver's People

Contributors

doctormartins9 avatar

Stargazers

 avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.