{"id":19544160,"url":"https://github.com/sunset1995/ya-sat","last_synced_at":"2026-06-09T22:31:28.835Z","repository":{"id":94182864,"uuid":"73606940","full_name":"sunset1995/YA-SAT","owner":"sunset1995","description":"Yet Another SAT Solver. Term project of PACA.","archived":false,"fork":false,"pushed_at":"2017-01-23T10:15:53.000Z","size":124,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-26T05:41:33.187Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sunset1995.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-11-13T09:43:09.000Z","updated_at":"2023-01-12T19:09:56.000Z","dependencies_parsed_at":"2023-03-17T11:31:16.320Z","dependency_job_id":null,"html_url":"https://github.com/sunset1995/YA-SAT","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/sunset1995/YA-SAT","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sunset1995%2FYA-SAT","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sunset1995%2FYA-SAT/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sunset1995%2FYA-SAT/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sunset1995%2FYA-SAT/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sunset1995","download_url":"https://codeload.github.com/sunset1995/YA-SAT/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sunset1995%2FYA-SAT/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34129072,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-09T02:00:06.510Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-11T03:24:53.023Z","updated_at":"2026-06-09T22:31:28.812Z","avatar_url":"https://github.com/sunset1995.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# YA-SAT\nYet Another SAT Solver. Term project of PACA.\n\n\n## Tasks\n\n### TODO\n- Iterative BCP\n- Marked Learnt Clause\n- Memory usage\n- More preprocess\n\n### DONE\n- 2 Literal Watching\n- Iterative DPLL\n- Conflict Clause Learning\n- Nonchronological Backtracking\n- Learnt Clause Minimization\n- Split independent subproblems\n- Decision BCP result cache\n- Circular list watcher check list\n- VSIDS\n- Phase saving\n- ANRFA\n\n\n## How to\n- To build `./build.sh`  \n- To run `./yasat [options] benchmark.cnf`  \n\t- `-statistic` print statitic result to stderr\n    - `-stdout   ` print result to stdout instead of file\n    - `-nomom    ` disable init var score by MOM\n    - `-noruby   ` disable ruby sequence to restart\n    - `-stupid   ` restart rapidly stupidly\n    - `-novsids  ` disable Variable State Independent Decaying Sum heuristic\n    - `-nophase  ` disable phase saving\n    - `-noanrfa  ` disable Average Number Recently Flipped Assignments\n    - `-multi    ` enable multi-thread running all method concurrently\n    - `-rand     ` add random factor in VSISD\n    - `-pos      ` pick positive phase while tie\n- To run all benchmarks in *.cnf under directory `python3 test.py path-to-directory`  \n- To validate the sat result `python3 validator.py benchmark.cnf benchmark.sat`  \n- To run all SAT benchmarks  \n    1. put all SAT benchmarks under `benchmarks/SAT/`  \n    2. run `python3 testsat.py`  \n- To run all UNSAT benchmarks  \n    1. put all UNSAT benchmarks under `benchmarks/UNSAT/`\n    2. run `python3 testunsat.py`\n\n## Result\nRun-times obtained on Intel Pentium CPU N3540 @ 2.16GHz × 4 and recored in second.  \nTLE(time limit exceed) is set to 1200 seconds.  \n\n### Benchmark from course PACA  \nFor those whose correct answer is SAT, the answer is checked by my validator.  \n\n| M2 testcase              |      M2 |    5e3 |    704 |   416 |\n| ------------------------ | ------: | -----: | -----: | ----: |\n| aim-50-1_6-no-2.cnf      |   0.000 |  0.000 |  0.000 | 0.000 |\n| aim-50-1_6-no-3.cnf      |   0.000 |  0.000 |  0.000 | 0.000 |\n| aim-50-1_6-no-4.cnf      |   0.000 |  0.000 |  0.000 | 0.000 |\n| aim-50-1_6-yes1-1.cnf    |   0.000 |  0.000 |  0.000 | 0.000 |\n| aim-50-1_6-yes1-2.cnf    |   0.000 |  0.000 |  0.000 | 0.000 |\n| aim-50-1_6-yes1-3.cnf    |   0.000 |  0.000 |  0.000 | 0.000 |\n| aim-50-1_6-yes1-4.cnf    |   0.000 |  0.000 |  0.000 | 0.000 |\n| dubois26.cnf             |   0.005 |  0.007 |  0.006 | 0.022 |\n| dubois27.cnf             |   0.002 |  0.003 |  0.003 | 0.015 |\n| dubois28.cnf             |   0.002 |  0.005 |  0.008 | 0.015 |\n| dubois29.cnf             |   0.003 |  0.005 |  0.003 | 0.007 |\n| hole6.cnf                |   0.019 |  0.013 |  0.015 | 0.012 |\n| hole7.cnf                |   0.208 |  0.130 |  0.134 | 0.105 |\n| hole8.cnf                |   5.229 |  3.191 |  1.370 | 0.822 |\n| hole9.cnf                | 200.973 | 76.687 | 15.186 | 9.996 |\n| ii8a1.cnf                |   0.000 |  0.000 |  0.000 | 0.000 |\n| ii8a2.cnf                |   0.000 |  0.000 |  0.000 | 0.000 |\n| ii8a3.cnf                |   0.001 |  0.001 |  0.001 | 0.001 |\n| ii8a4.cnf                |   0.001 |  0.001 |  0.002 | 0.001 |\n| par8-1-c.cnf             |   0.000 |  0.000 |  0.000 | 0.000 |\n| par8-2-c.cnf             |   0.000 |  0.000 |  0.000 | 0.000 |\n| par8-3-c.cnf             |   0.000 |  0.000 |  0.001 | 0.001 |\n| par8-4-c.cnf             |   0.000 |  0.000 |  0.000 | 0.000 |\n| aim-100-1_6-no-1.cnf     |   0.001 |  0.000 |  0.000 | 0.000 |\n| aim-100-1_6-no-2.cnf     |   0.001 |  0.000 |  0.001 | 0.001 |\n| aim-100-1_6-no-3.cnf     |   0.001 |  0.001 |  0.001 | 0.001 |\n| aim-100-1_6-no-4.cnf     |   0.001 |  0.001 |  0.001 | 0.000 |\n| aim-100-1_6-yes1-1.cnf   |   0.000 |  0.000 |  0.000 | 0.000 |\n| aim-100-1_6-yes1-2.cnf   |   0.000 |  0.000 |  0.001 | 0.001 |\n| aim-100-1_6-yes1-3.cnf   |   0.001 |  0.000 |  0.001 | 0.001 |\n| aim-100-1_6-yes1-4.cnf   |   0.001 |  0.000 |  0.000 | 0.000 |\n| aim-200-1_6-no-1.cnf     |   0.001 |  0.001 |  0.001 | 0.001 |\n| aim-200-1_6-no-2.cnf     |   0.001 |  0.001 |  0.001 | 0.001 |\n| aim-200-1_6-no-3.cnf     |   0.002 |  0.001 |  0.002 | 0.001 |\n| aim-200-1_6-no-4.cnf     |   0.001 |  0.001 |  0.001 | 0.000 |\n| aim-200-1_6-yes1-1.cnf   |   0.001 |  0.001 |  0.001 | 0.001 |\n| aim-200-1_6-yes1-2.cnf   |   0.003 |  0.002 |  0.002 | 0.002 |\n| aim-200-1_6-yes1-3.cnf   |   0.001 |  0.001 |  0.001 | 0.001 |\n| aim-200-1_6-yes1-4.cnf   |   0.002 |  0.001 |  0.001 | 0.001 |\n| jnh201.cnf               |   0.001 |  0.001 |  0.001 | 0.001 |\n| jnh210.cnf               |   0.000 |  0.001 |  0.001 | 0.001 |\n| jnh301.cnf               |   0.004 |  0.003 |  0.003 | 0.004 |\n| jnh310.cnf               |   0.000 |  0.000 |  0.000 | 0.000 |\n| ii16a1.cnf               |   0.010 |  0.144 |  0.029 | 0.042 |\n| ii16a2.cnf               |   0.010 |  0.292 |  2.187 | 0.730 |\n| ii16b1.cnf               |   0.026 |  1.662 |  1.987 | 0.211 |\n| ii16b2.cnf               |   0.043 |  0.030 |  0.016 | 0.066 |\n| ii32b1.cnf               |   0.001 |  0.001 |  0.001 | 0.001 |\n| ii32b2.cnf               |   0.008 |  0.013 |  0.023 | 0.028 |\n| ii32b3.cnf               |   0.011 |  0.033 |  0.183 | 0.035 |\n| ii32b4.cnf               |   0.021 |  0.106 |  0.387 | 0.096 |\n| par16-1-c.cnf            |   0.054 |  0.178 |  0.087 | 0.094 |\n| par16-2-c.cnf            |   0.274 |  0.203 |  0.347 | 0.235 |\n| par16-3-c.cnf            |   0.538 |  0.402 |  0.671 | 1.068 |\n| par16-4-c.cnf            |   0.042 |  0.162 |  0.181 | 0.150 |\n\n\nBeside testcases provied by PACA, I also test online benchmarks from [SATLIB](http://www.cs.ubc.ca/~hoos/SATLIB/benchm.html).  \n`sat-100-430` means 100 variables and 430 clauses all satisfiable. Result record in `avg/max` format.   \n\n| Scale          |         5e3 |          704 |          416 |\n| -------------- | ----------: | -----------: | -----------: |\n| sat-20-91      |   0.00/0.00 |    0.00/0.00 |    0.00/0.00 |\n| sat-50-218     |   0.00/0.00 |    0.00/0.00 |    0.00/0.00 |\n| sat-75-325     |   0.00/0.01 |    0.00/0.01 |    0.00/0.01 |\n| sat-100-430    |   0.00/0.02 |    0.00/0.02 |    0.00/0.02 |\n| sat-125-538    |   0.01/0.06 |    0.01/0.05 |    0.01/0.04 |\n| sat-150-645    |   0.03/0.14 |    0.03/0.16 |    0.03/0.15 |\n| sat-250-1065   |  3.89/43.49 |   4.47/24.05 |   5.70/33.84 |\n| unsat-50-218   |   0.00/0.00 |    0.00/0.00 |    0.00/0.00 |\n| unsat-75-325   |   0.00/0.01 |    0.00/0.01 |    0.00/0.01 |\n| unsat-100-430  |   0.01/0.02 |    0.01/0.03 |    0.01/0.02 |\n| unsat-125-538  |   0.03/0.06 |    0.03/0.06 |    0.03/0.06 |\n| unsat-150-645  |   0.08/0.17 |    0.08/0.17 |    0.08/0.21 |\n| unsat-250-1065 | 23.02/79.67 | 19.95/114.28 | 29.16/111.99 |\n\n\nAlso I run SAT competition 2006’s benchmark_1 and compare the result with those competitor.  \n\n|               instance    |  ans  | compsat | HaifaSat | Jerusat1_2_c | minisat_stat | sat4j | SatELiteGTI | zchaff-2004 |    yasat |\n| ------------------------- | ----- | ------: | -------: | -----------: | -----------: | ----: | ----------: | ----------: | -------: |\n|    een-tipb-sr06-par1.cnf | UNSAT |    15.1 |     35.7 |         11.0 |          1.6 |   6.5 |         2.9 |         2.2 |    1.201 |\n|    een-tipb-sr06-tc6b.cnf | UNSAT |     2.4 |     52.8 |          2.0 |          0.3 |   1.7 |         1.0 |         0.5 |    0.509 |\n|     goldb-heqc-desmul.cnf | UNSAT |   372.6 |    124.6 |            X |         78.8 | 217.6 |        77.0 |       157.3 |  162.977 |\n|     goldb-heqc-rotmul.cnf | UNSAT |       X |    306.3 |            X |        165.0 |     X |       257.3 |       136.9 |  456.686 |\n|    grieu-vmpc-s05-24s.cnf |  SAT  |       X |    371.6 |        210.7 |         13.8 | 341.3 |        13.9 |           X |   81.745 |\n|    grieu-vmpc-s05-27r.cnf |  SAT  |       X |        X |         17.6 |        701.1 |     X |       691.8 |       462.9 |        X |\n|     hoons-vbmc-s04-05.cnf | UNSAT |       X |    106.3 |            X |        251.1 | 128.0 |        20.5 |       316.4 |  238.522 |\n|     hoons-vbmc-s04-07.cnf | UNSAT |       X |        X |        597.0 |        194.9 |     X |        53.3 |           X |  277.209 |\n|       manol-pipe-c10b.cnf | UNSAT |       X |        X |            X |        438.4 |     X |       618.2 |       618.4 |  375.224 |\n|    manol-pipe-c10ni_s.cnf | UNSAT |   130.6 |    124.7 |         40.8 |         19.6 |  70.4 |         8.5 |           X |  439.861 |\n|       manol-pipe-c6id.cnf | UNSAT |       X |    205.4 |            X |        156.1 | 364.7 |        68.4 |       480.1 |   36.683 |\n|        manol-pipe-c6n.cnf | UNSAT |   362.4 |    124.4 |            X |         53.7 | 230.0 |        34.6 |       110.2 |   82.242 |\n|    manol-pipe-c6nid_s.cnf | UNSAT |   125.2 |     31.5 |            X |         96.5 |  66.8 |        57.6 |       663.0 |        X |\n|       manol-pipe-c7_i.cnf | UNSAT |   243.5 |     43.8 |            X |         17.7 |  62.8 |         9.4 |         7.1 |  120.825 |\n|      manol-pipe-c7idw.cnf | UNSAT |       X |    357.6 |            X |        483.7 | 713.0 |       566.5 |       865.0 | 1123.455 |\n|       manol-pipe-c8_i.cnf | UNSAT |   279.4 |     45.6 |            X |         18.1 |  84.3 |        35.6 |         8.8 |        X |\n|      manol-pipe-c8b_i.cnf | UNSAT |       X |    544.2 |            X |        146.1 | 591.0 |        94.6 |       227.3 |        X |\n|        manol-pipe-c8n.cnf | UNSAT |       X |    638.1 |            X |        153.9 | 777.6 |        72.8 |       353.7 |   61.918 |\n|        manol-pipe-f6b.cnf | UNSAT |    25.0 |     30.7 |        111.5 |          4.1 |  25.9 |         2.8 |         5.8 |   29.550 |\n|        manol-pipe-f6n.cnf | UNSAT |    28.8 |     33.5 |        168.4 |          8.8 |  20.3 |         3.0 |         6.9 |   24.757 |\n|     manol-pipe-g10idw.cnf | UNSAT |       X |    237.4 |            X |        244.0 |     X |       482.7 |       541.6 |   15.363 |\n|        manol-pipe-g7n.cnf | UNSAT |    70.7 |     31.9 |        685.9 |          4.2 |  20.8 |         2.1 |        10.0 |   19.465 |\n|      manol-pipe-g6bid.cnf | UNSAT |    29.8 |     15.0 |        715.5 |          7.7 |  17.4 |         2.5 |        16.6 |        X |\n|         narai-vpn-10s.cnf | UNSAT |       X |        X |            X |        681.2 |     X |       866.7 |       605.4 |  412.016 |\n|    schup-l2s-s04-abp4.cnf | UNSAT |       X |    181.4 |            X |        170.9 |     X |       122.7 |           X |  708.045 |\n| simon-mixed-s02bis-01.cnf |  SAT  |       X |        X |            X |        215.2 | 186.2 |       607.0 |           X | 1042.069 |\n| simon-mixed-s02bis-03.cnf |  SAT  |       X |     30.5 |            X |        236.4 |     X |       164.2 |           X |  193.690 |\n| simon-mixed-s02bis-05.cnf |  SAT  |       X |        X |            X |            X |     X |       577.9 |           X |        X |\n|      stric-bmc-ibm-10.cnf |  SAT  |    32.1 |     25.0 |          3.6 |          2.9 |   9.7 |         2.3 |        11.1 |    7.140 |\n|      stric-bmc-ibm-12.cnf |  SAT  |    43.3 |     70.0 |         51.5 |          8.8 |  19.6 |         6.3 |        29.5 |   51.332 |\n|    vange-color-inc-54.cnf |  SAT  |    89.2 |    151.2 |         80.5 |         28.5 |  72.6 |         8.1 |           X |   14.600 |\n|  velev-eng-uns-1.0-04.cnf | UNSAT |    31.6 |     19.7 |         76.3 |         10.0 |  24.5 |         8.7 |        30.1 |   50.747 |\n| velev-eng-uns-1.0-04a.cnf | UNSAT |   215.9 |    171.6 |        358.2 |         55.1 | 119.9 |        49.1 |       549.1 |  133.157 |\n|  velev-fvp-sat-3.0-07.cnf |  SAT  |   396.2 |    114.8 |         57.3 |            X | 346.0 |           X |       890.7 |   30.603 |\n|  velev-fvp-sat-3.0-12.cnf |  SAT  |    71.0 |     50.2 |         57.0 |          6.3 |  25.4 |         3.8 |         3.0 |   25.085 |\n| velev-live-sat-1.0-03.cnf |  SAT  |   131.0 |        X |            X |         10.2 |  55.8 |       124.7 |           X |  345.989 |\n| velev-live-sat-1.0-01.cnf |  SAT  |   191.9 |    209.7 |            X |         13.4 |  28.8 |        23.8 |       626.6 |  443.933 |\n|      velev-npe-1.0-02.cnf | UNSAT |       X |     24.5 |        346.3 |         16.2 | 164.9 |        11.8 |        59.0 |  137.459 |\n|      velev-npe-1.0-03.cnf |  SAT  |   220.3 |     77.3 |            X |          5.9 | 359.4 |        35.6 |       327.0 |  149.678 |\n|     velev-pipe-1.0-08.cnf |  SAT  |    12.9 |     67.6 |        221.7 |            X |  43.2 |           X |        66.6 |  760.339 |\n|     velev-pipe-1.0-09.cnf |  SAT  |   683.4 |    288.3 |            X |          7.1 | 706.3 |       145.7 |           X |        X |\n|     velev-pipe-1.1-03.cnf |  SAT  |   789.5 |    404.3 |            X |          7.1 |     X |        29.7 |           X |        X |\n|     velev-pipe-1.1-05.cnf |  SAT  |   356.2 |    418.6 |            X |          4.9 | 339.2 |        29.8 |       202.6 |   99.089 |\n| velev-pipe-uns-1.0-08.cnf | UNSAT |       X |    638.0 |            X |            X |     X |           X |       843.3 |        X |\n| velev-pipe-uns-1.1-05.cnf | UNSAT |   345.3 |     14.5 |            X |            X | 389.6 |           X |        17.7 |        X |\n| velev-pipe-uns-1.1-07.cnf | UNSAT |       X |    161.0 |            X |            X |     X |           X |       195.5 |        X |\n|      velev-sss-1.0-cl.cnf | UNSAT |     0.9 |      0.5 |         61.1 |          0.4 |   1.6 |         0.3 |         0.4 |    2.765 |\n| velev-vliw-sat-2.0-02.cnf |  SAT  |    39.1 |        X |            X |         13.6 |  36.5 |        55.1 |        22.4 |  221.719 |\n| velev-vliw-sat-2.0-04.cnf |  SAT  |       X |        X |            X |            X |     X |       139.4 |           X |        X |\n| velev-vliw-uns-2.0-02.cnf | UNSAT |       X |        X |            X |            X |     X |           X |           X |        X |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsunset1995%2Fya-sat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsunset1995%2Fya-sat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsunset1995%2Fya-sat/lists"}