{"id":18933505,"url":"https://github.com/positiveblue/simplesatsolver","last_synced_at":"2025-09-10T11:40:09.147Z","repository":{"id":70775797,"uuid":"57122375","full_name":"positiveblue/SimpleSatSolver","owner":"positiveblue","description":"A Simple Sat Solver","archived":false,"fork":false,"pushed_at":"2019-06-17T15:15:48.000Z","size":242,"stargazers_count":1,"open_issues_count":2,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-01T14:10:37.899Z","etag":null,"topics":["algorithm","cpp17","sat-solver"],"latest_commit_sha":null,"homepage":"","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/positiveblue.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-04-26T11:22:08.000Z","updated_at":"2025-01-08T02:20:54.000Z","dependencies_parsed_at":null,"dependency_job_id":"107e6731-0e6f-4c0f-ae9b-c35733d34c1c","html_url":"https://github.com/positiveblue/SimpleSatSolver","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/positiveblue/SimpleSatSolver","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/positiveblue%2FSimpleSatSolver","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/positiveblue%2FSimpleSatSolver/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/positiveblue%2FSimpleSatSolver/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/positiveblue%2FSimpleSatSolver/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/positiveblue","download_url":"https://codeload.github.com/positiveblue/SimpleSatSolver/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/positiveblue%2FSimpleSatSolver/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274455981,"owners_count":25288558,"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","status":"online","status_checked_at":"2025-09-10T02:00:12.551Z","response_time":83,"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":["algorithm","cpp17","sat-solver"],"created_at":"2024-11-08T11:54:57.794Z","updated_at":"2025-09-10T11:40:09.061Z","avatar_url":"https://github.com/positiveblue.png","language":"C++","readme":"# A Simple Sat Solver (SSS)\n\nGiven a formula, the **Boolean satisfiability problem (SAT)** is to check whether it is satisfiable or not. In other words, assinging\nconsistently a value to each variable  (*TRUE* or *FALSE*) in such a way that the formula evaluates to *TRUE*.\n\n**SAT** is one of the first problems that was proven to be **NP-complete** and \nthere is no known algorithm that efficiently solves each **SAT** problem. It is generally believed that no such algorithm exists.\n\nMany real world problems can be codified as a **SAT** formula so **Sat solvers** are becoming more and more popular these days. Looking\nforware to learn more about the topic I decided to implement a Simple Sat Solver (SSS) using the DPLL algorithm. I got some inspiration/ideas \nfrom many papers, here a list of the most relevants:\n\n- [Heuristic average-case analysis of the\nbacktrack resolution of random 3-Satisfiability\ninstances](https://arxiv.org/pdf/cs/0401011.pdf)\n- [A Decision Procedure for Separation Logic in SMT](https://arxiv.org/pdf/1603.06844.pdf)\n- [Improving DPLL Solver Performance with\nDomain-Specific Heuristics: the ASP Case](https://arxiv.org/pdf/1102.2125.pdf)\n\n\n## Examples\n\nSimple Sat Solver can be used as a command line tool. After compaline and installing the software the command `sss` is going to read\na file in cnf format and print if the problem is satisfatible or not. \n\nThere are some example in the random3SAT folder with a distinct number of variables (from 100 to 300).\n\n```bash\n    sss \u003c random3SAT/vars-200-1.cnf\n    SATISFIABLE 346 8986 328\n```\n\nThe output contains the number of *decisions*, *propagations* and *backtracks* that sss did.\n\n## Quick start\n\nFirst, you must download the SimpleSatSolver code from our [Git repository](https://github.com/jomsdev/SimpleSatSolver).\n\nTo clone the project from Git, `cd` to a suitable location and run\n```\ngit clone https://github.com/jomsdev/SimpleSatSolver.git\n```\n\nThis will clone the entire contents of the repository. You can check out to the current development branch\nif you want to use the last stable version.\n\nTo update the project from within the project's folder, you can run the following command:\n```\ngit pull\n```\n\nOnce you have downloaded the source code, you can `cd` into the source code directory and build and install sss with\n```\nmkdir build\ncd build\ncmake ..\nmake\n# it install the files under /usr/local\nmake install\n```\n\n\n## Future Work\n\nThis is an open ended project. There is not hard deadline but I have some ideas I would like to implement:\n\n- **Distributed SatSolver**: Almost all the SatSolvers do not implmenet a distributed version of the algorithms. Given the size/complexity of some inputs would be really interesting implement some solutions using MPI. \n\n- **Newer algorithms**: There are hundreds of ideas/modifications trying to speed up sat solvers. It is a hot topic in research so implement some cut-edge algorithms would be great.\n\n## Issue tracker\n\nFound a problem? Want a new feature? First of all see if your issue or idea has [already been reported](../../issues).\nIf it hasn't, just open a [new clear and descriptive issue](../../issues/new).\n\n\n## License\n\nSimple Sat Solver (SSS) is under the MIT license. See the [LICENSE](https://github.com/jomsdev/SimpleSatSolver/blob/master/LICENSE) file for details.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpositiveblue%2Fsimplesatsolver","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpositiveblue%2Fsimplesatsolver","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpositiveblue%2Fsimplesatsolver/lists"}