sgomber / cdcl-sat Goto Github PK
View Code? Open in Web Editor NEWA SAT Solver based on CDCL (Conflict Driven Clause Learning) implemented in python
A SAT Solver based on CDCL (Conflict Driven Clause Learning) implemented in python
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.