GithubHelp home page GithubHelp logo

sgomber / cdcl-sat Goto Github PK

View Code? Open in Web Editor NEW
14.0 14.0 4.0 14.28 MB

A SAT Solver based on CDCL (Conflict Driven Clause Learning) implemented in python

Jupyter Notebook 56.87% Python 43.13%
cdcl cdcl-algorithm python sat sat-solver satisfiability

cdcl-sat's People

Contributors

sgomber avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

cdcl-sat's Issues

Question regarding enumerating solutions

Hi there!

Got a question regarding modifying the code to continually enumerate SAT solutions (if they exist).
As I currently understand once a SAT is found, self.decide() returns -1 (i.e. we've assigned all variables, and no conflict is found).
After that, there the check for SAT occurs

if var_decided == -1: 
   ...
   break

Which then exits the main loop leaving us with just the first found solution. However I want to continue enumerating more solutions if they exist. However I'm not sure the best way to modify the code to do so. I've got many open questions but don't know where to start: Would a new Stats object need to be instantiated for every new search? Does the found solution need to be converted to a new conflict clause? Is it possible to just call self.backtrack(0,None) to restart after adding the just-learned SAT as a conflict clause?

I would be grateful if you have some advice on the above

cheers!

P.S. This codebase a masterpiece of code and commentary... thanks for the awesome release

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.