GithubHelp home page GithubHelp logo

fanosta / cadiback Goto Github PK

View Code? Open in Web Editor NEW

This project forked from meelgroup/cadiback

0.0 0.0 0.0 144 KB

CaDiCaL BackBone Analyzer

License: MIT License

Shell 4.95% C++ 94.88% Makefile 0.17%

cadiback's Introduction

CaDiBack BackBone Extractor

This is a tool using the CaDiCaL solver to determine the backbone of a satisfiable instance, which are those literals set to true in all models of the formula.

You need to get and compile CaDiCaL in the same directory in which you have the CaDiBack sources, i.e., before configuring and compiling it make sure to have

  • ../cadical/build/libcadical.a
  • ../cadical/src/cadical.hpp

Then issue ./configure && make to configure and compile it. To also test the library you also use make test (additionally or alternatively). There are further configuration options which can be listed with ./configure -h.

Usage of the tool is as follows. Given the following CNF in dimacs.cnf calling cadiback on it it will give:

$ cat dimacs.cnf
p cnf 3 4
1 2 0
1 -2 0
2 -3 0
-2 -3 0
$ cadiback -q dimacs.cnf
b 1
b -3
b 0
s SATISFIABLE

This example shows that exactly the two literals 1 and -3 are backbones and that there are models both with 2 and -2, i.e., the variable 2 is not a backbone variable. In general the tool can produce multiple b lines which are not ordered and can be interleaved with comment lines starting with c. After the extractor found all backbones it prints the b 0 line.

The backbones are printed as they are found and the output is flushed whenever a new backbone is found. This allows to use the tool in an any-time fashion. Without the -q option more comment lines are printed before, between and after the backbone section, and with higher verbosity or reporting enabled even in between 'b' lines. If the given CNF is unsatisfiable the extractor prints 's UNSATISFIABLE' instead at the end.

cadiback's People

Contributors

arminbiere avatar wenxiwang 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.