Comments (4)
Hi Axel,
Thank you so much for that uint64_t
vs long unsigned
bug. Good find, I have already fixed it in e5d37b6
The CNF indeed gets significantly smaller! Regarding getting back the solution, basically, we need to save from CryptoMiniSat:
blockedClauses
fromoccsimplifier.h
- variable replacement information from
varreplacer.h
calledreverseTable
interToOuterMain
andvarData
fromcnf.h
Then we need to feed that to Solutionextender
along with the solution to the simplified CNF. This is basically what used to happen in the old system that extended a solution after pre-processing.
In arjun.cpp
file in Arjun there is a function called get_fully_simplified_renumbered_cnf()
. In that function there is a solver
object. That solver (and not the solver
object that's in arjun.h
's struct Arjun
) needs to call something like solver.save_state("toextend.dat")
at the end of the function (just before return cnf;
), to save the above 3 data pieces to file. This save_state()
function does not exist. It's probably best to re-write it, although you can take hints from old CryptoMiniSat that had a saveState
function that saved this (and more) information.
Once this data is saved, and the solution is found to the simplified CNF, we need to be able to extend the solution. For this, Arjun would need another function that loads the data of the 3 data pieces (blockedClauses
, reverseTable
and interToOuterMain
) from "toextend.dat"
, takes the solution, and extends the solution, kinda how Solutionextender
does it.
It's a little fiddly. However, if you can skip the BVA complexity (i.e. there are no BVA variables, so no XORs), then it's actually not that bad. Let me know if you wanna have a go at it!
from arjun.
OK, we now have preliminary support for this. You MUST re-build and reinstall CryptoMiniSat & Arjun. Then:
./arjun large.cnf simplified.cnf recovery
cadical simplified.cnf > solution
./solextend recovery solution > solution_final
./cnf-utils/verify_solution.py large.cnf solution_final
Where cadical is CaDiCaL from here: https://github.com/arminbiere/cadical but of course ANY sane SAT solver should work. And cnf-utils is: https://github.com/msoos/cnf-utils that provides solution verification.
The final solution is verified as correct. Note that there is likely an issue with so-called empty occurrence variables. These can be set to any value, but often NEED to be set to SOME value. These will likely make the system die. I'll work on that later.
For the moment, it seems to work, but has not been extensively tested. Handle with care. Will test later with a fuzzer.
from arjun.
BTW, this took 2 days and about 500 lines of total change, but should support our work on UniGen. I'm using Boost serialization library. Kinda cool, but it again had some weird compatibility issue with older gcc. So I had to work around that. Kinda painful. Otherwise it's kinda neat actually :)
from arjun.
Thank you!
I'm already feeling a bit guilty of time theft again.
from arjun.
Related Issues (10)
- In case there are many independent variables the --backbone 0 doesn't help HOT 1
- Looking for an Option to minimize without deleting variables. HOT 1
- CNF with 0 clauses output HOT 4
- [Feature Request] Mapping between variables of original and new formulas HOT 4
- Independent Set contains variables greater than numVars HOT 5
- Licence missing HOT 4
- Sometimes, we produce worse output than B+E HOT 7
- missing method to map back the solution HOT 2
- How to run example instance HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from arjun.