Git Product home page Git Product logo

sat-solver's People

Contributors

ebhardjan avatar limo1996 avatar ziweihuang94 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

zhenghaogithub

sat-solver's Issues

"Measure" difficulty of formulas

One of the main questions of the professors was:
"Why are the dots so spread for larger formulas?"

We should be able to answer that question in a "scientific" way, i.e. something like this:
"The formula on the top of the plot is very difficult to solve, the dpll algorithm needs to make 25 branching steps until it is able to solve the formula.
On the other hand the formula on the bottom is very easy to solve, the dpll algorithm doesn't need to branch at all".

We should come up with a numerical representation of the difficulty of a formula, one suggestion (used above) is to use the maximal branching depth until a solution is found or unsat is proven.
Note that that does not mean we can just count the number of "branches" taken during an execution, we need to associate true and false branches on the same variable and count them as one.
Effectively we need to find the depth of the tree.
But counting the number of branches in total would also be a metric, it would tell us how "bad" the decisions that our algorithm made are. I would suggest we do both...

A good starting point is to change the stderr output in dpll.cpp such that we record the necessary information.
We could then create a python script that reads the stderr output and comes up with the branching depth and the overall number of taken branches.

I suggest that we just do it on the sequential version, as it will be identical to the parallel one (this is a property of the cnf formula).

Fix DPLL

Looks like our DPLL is not working...
fail_example1.cnf and fail_example2.cnf are examples of such behavior...

Use a smarter encoding in DPLL

encode the cnf formulas as integer arrays and boolean arrays instead of using object structures -> should require a lot less space -> better spacial locality -> faster!

Cleanups and Code organization stuff

  • Move encoding and decoding of model to model class
  • change get_model to get_partial_model in CNF.cpp
  • implement get_model in CNF.cpp, and move the functionality from send_sat solver there
    Regarding the two last points: yes it's super confusing right now

Runtime performance measurements on euler

We should store some runtime measurements in files on euler.
Such that one can then manually download them, run a script and get a nice plot (x-axis: size of formula i.e. number of variables, y-axis: runtime)
There are 3 changes necessary as far as I can see:

  1. add information to how large randomly generated formulas are to the file names (overlaps with #8 )
  2. measure runtime in parallel_main.cpp and store it in a file
  3. write a script that given such files can create the plots

Additionally we should have far more and far larger formulas! -> #8

Use more than 48 cores on Euler

Whenever I try to run something on Euler on more than 48 cores I get the following error message:

virtual.40d: Queue has been closed. Job not submitted.

Weird...

Here's the full output of main.py:

please enter your nethz_account name : ebjan
Euler parameters:
           num_nodes: [16, 64, 128]
            num_runs: 4
             timeout: 15 [seconds]
 max_overall_runtime: 240 [minutes]
         test_folder: 3-sat_instances_medium
[email protected]'s password: *
to_euler.tar                                                                      100% 1860KB   1.8MB/s   00:00    
Pseudo-terminal will not be allocated because stdin is not a terminal.
[email protected]'s password: *
Generic job.
virtual.40d: Queue has been closed. Job not submitted.
#########################################################
unpacking tar archive...
calling run_me_on_euler.sh...
#########################################################
run_me_on_euler.sh is taking over
including necessary modules...
node counts: 16 64 128
choosing highest node count: 128
submitting compilation and run job to the batch system...
an error occurred during job submission, exiting
#########################################################

More than one CNF in file

Is it valid to have more than one CNF in a file? Parser seems to be able to parse multiple CNFs from one file...

Implement CDCL

If we want to get more overall performance we should implement CDCL!

Initial Progress Presentation

Create a google slides presentation.
I think it should cover the following aspects:

  1. how did we start (sequential algorithm that we took over)
  2. how did we parallelize it?
  3. how did we test it?
  4. some initial performance evaluations
  5. what do we plan to do next?

More test cases!

We need more test-cases!
Small ones and also large ones.
We should store them in the repository such that everyone can run the same tests.

2 things:

  1. just generate a lot of them (I would say 100 of size (number of variables) 10, 30, 50, 100, 200 at least)
  2. change the names of the test files such that we know how "large" these formulas are (useful for evaluation)

Move encoding and parsing of variables from worker to CNF

Jan, I think it would be better to move encoding and parsing of formula to CNF class so I can reuse it in Master class (I need to parse final formula and print it). I will push in few minutes data class named State that basically hold array of unsigned ints and its size + getter and setter.

Your methods can looks like:
State CNF::encode(); //cnf will encode itself to State object

CNF cnf = new CNF(State state); // cnf will parse itself from State object
// ---- or -----
CNF cnf = new CNF();
cnf.parse(State state);

What do you think about that?

Folder reorganisation

We have too much folders in main folder. After Mondays presentation we should move all tests to common test folder, rename python_wrapper to scrips, move randomCNF to scripts.

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.