{"id":21374790,"url":"https://github.com/radrow/satisfaction","last_synced_at":"2025-03-16T09:20:49.009Z","repository":{"id":137636775,"uuid":"347966211","full_name":"radrow/satisfaction","owner":"radrow","description":"A performant and elegant implementation of CDCL and DPLL SAT solving algorithms","archived":false,"fork":false,"pushed_at":"2021-03-15T12:48:06.000Z","size":1651,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-22T21:28:31.197Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/radrow.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2021-03-15T12:46:16.000Z","updated_at":"2025-01-03T10:24:24.000Z","dependencies_parsed_at":null,"dependency_job_id":"34feb460-ce4a-4223-995f-c3da310556da","html_url":"https://github.com/radrow/satisfaction","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/radrow%2Fsatisfaction","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/radrow%2Fsatisfaction/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/radrow%2Fsatisfaction/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/radrow%2Fsatisfaction/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/radrow","download_url":"https://codeload.github.com/radrow/satisfaction/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243847969,"owners_count":20357472,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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-22T08:45:26.089Z","updated_at":"2025-03-16T09:20:48.968Z","avatar_url":"https://github.com/radrow.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Rust/SAT-Solving\nBy Group F: Radosław Rowicki, Alexander Lankheit, Korbinian Federholzner\n\n# Project Discription\n\nThe goal of this project is to build a solver for the puzzle Tents,\nby encoding it as a SAT problem. \n\n## Satisfacton Solver\n\nA DPLL based SAT-Solver for solving simple CNF encoded SAT Problems.\n\n## Tents\n\nThe game tents is played on an n × m grid, with\na number written next to each row and column. Initially, each cell can either\nbe empty or contain a tree. Tents should be placed in empty cells, such that:\n* No two tents are adjacent in any of the (up to) 8 directions.\n* The number of tents in each row/column matches the number speci\fed.\n* It is possible to match tents to trees 1:1, such that each tree is orthogonally adjacent to its own tent (but may also be adjacent to other tents).\n\n\nAn online version of the game can be found at: https://www.chiark.greenend.org.uk/~sgtatham/puzzles/js/tents.html\n\n\n# Project Structure\n\nThe project consists of three parts:\n\n* __solver__:\n    The library containing the code for the actual solver.\n\n* __solver-cli__:\n    A binary executing the solver via command line.\n\n* __tents__:\n    A binary that uses SAT-solving to solve [Tents puzzles](https://brainbashers.com/tents.asp).\n\n* __solver-bench__: \n    A benchmarking tool, for benchmarking the SAT-Solver Heuristics\n\n# Executables\n\n## `solver-cli`\n\n### Usage\n\nBasic CLI for our solver.\n\nExecution:\n```\ncargo run --release --bin solver-cli -- [ARGS]\n```\n    \nSupported arguments:\n    \n  * `-i VALUE` or `--input=VALUE` – points to the input file with the\n  description of the SAT formula. If not specified, STDIN will be used\n  instead.\n  \n  * `--algorithm=VALUE` – chooses the algorithm. Following options are available:\n    - `bruteforce` – plain bruteforce \"try, check, backtrack\"\n    - `cadical` – references to the [cadical implementation](http://fmv.jku.at/cadical/)\n    - `dpll` – our prioprietary DPLL implementation. Supports following parameters:\n      - `dpll-branching` – branching strategy. Possible values:\n        - `naive`\n        - `DLIS`\n        - `DLCS`\n        - `MOM`\n        - `Jeroslaw-Wang`\n        Defaults to `DLCS`.\n    - `cdcl` – our prioprietary CDCL implementation. Supports following parameters:\n      - `cdcl-branching` – Branching strategy. Possible values:\n        - `VSIDS`\n        Defaults to `VSIDS`.\n      - `cdcl-restart` – Restart policy. Possible values:\n        - `fixed`\n        - `geom`\n        - `luby`\n        - `never`\n        Defaults to `luby`.\n      - `cdcl-deletion` – Clause deletion strategy. Possible values:\n        - `berk-min`\n        - `never`\n        Defaults to `berk-min`.\n      - `cdcl-learning` – Learning schema. Possible values:\n        - `relsat`\n        Defaults to `relsat`.\n      - `cdcl-preproc` – Preprocessing techniques. Takes mulitple arguments that shall be executed sequentially:\n        - `niver` – NiVER\n        - `tautologies` – Tautologies elimination\n        - `subsumption` – Self subsumption\n   Defaults to `cdcl`.\n  \n  * `-r` or `--return-code` – if set, instructs the solver to exit with return code `1`\n  if the given formula is satisfied, `0` if not or there was an execution error.\n  \n  * `--drup=FILE` – Output file for a DRUP proof. Currently supported only with `cdcl` algorithm.\n\n### Return value\n\nNormally the solver returns `0` if the formula was processed successfully and `2` on\nexecution error. If the `-r` or `--return-code` flag is set, this behaviour is changed [accordingly to the documentation](#Usage).\n\n\n## `solver-bench`\n\nBenchmarking utility. Will create an SVG plot file with comparison of several solvers.\n\nExecution:\n```\ncargo run --release --bin solver-bench -- [ARGS]\n```\n\nSupported arguments:\n\n  * `-i VALUE` or `--input=VALUE` – directory with test files\n  \n  * `-o VALUE` or `--output=VALUE` – output file for the plot\n  \n  * `-t VALUE` or `--time=VALUE` – time limit for a single instance in seconds\n\n## `tents`\n\nAn example GUI application that solves the famous [tents puzzle](https://brainbashers.com/tents.asp).\n\nExecution:\n```\ncargo run --release --bin tents\n```\n\n# Division of work\n\nMost of the parts of the project were developed in cooperation of all team members. However there are some focus points of the contributors that include:\n\n* Radosław Rowicki – Implementation of the CNF library and most of the formula generation algorithm for tents puzzle. Design and implementation of CLI.\n* Alexander Lankheit – Design and implementation of GUI, interruptible and timed solvers, property based testing, plotting, benchmarks.\n* Korbinian Fedelholzner – DPLL algorithm, random puzzle creation, parsing, unit tests.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fradrow%2Fsatisfaction","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fradrow%2Fsatisfaction","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fradrow%2Fsatisfaction/lists"}