{"id":25940558,"url":"https://github.com/rorypoulter/sat-solver","last_synced_at":"2026-05-29T01:32:00.612Z","repository":{"id":279810801,"uuid":"940058755","full_name":"RoryPoulter/SAT-Solver","owner":"RoryPoulter","description":"Python SAT Solver","archived":false,"fork":false,"pushed_at":"2025-03-20T11:53:38.000Z","size":132,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-20T12:48:22.817Z","etag":null,"topics":["dimacs-cnf","python","sat-solver"],"latest_commit_sha":null,"homepage":"","language":"Python","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/RoryPoulter.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2025-02-27T14:49:10.000Z","updated_at":"2025-03-20T11:53:42.000Z","dependencies_parsed_at":"2025-02-27T21:09:03.697Z","dependency_job_id":"7d4bc184-e40c-4c36-b075-82e6b150cb7a","html_url":"https://github.com/RoryPoulter/SAT-Solver","commit_stats":null,"previous_names":["rorypoulter/sat-solver"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/RoryPoulter/SAT-Solver","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RoryPoulter%2FSAT-Solver","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RoryPoulter%2FSAT-Solver/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RoryPoulter%2FSAT-Solver/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RoryPoulter%2FSAT-Solver/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RoryPoulter","download_url":"https://codeload.github.com/RoryPoulter/SAT-Solver/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RoryPoulter%2FSAT-Solver/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33633468,"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-05-28T02:00:06.440Z","response_time":99,"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":["dimacs-cnf","python","sat-solver"],"created_at":"2025-03-04T05:17:28.833Z","updated_at":"2026-05-29T01:32:00.603Z","avatar_url":"https://github.com/RoryPoulter.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SAT-Solver\n\n![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/RoryPoulter/SAT-Solver/pylint.yml?style=for-the-badge\u0026logo=python\u0026logoColor=%23ffffff)\n![GitHub last commit](https://img.shields.io/github/last-commit/RoryPoulter/SAT-Solver?style=for-the-badge)\n![GitHub License](https://img.shields.io/github/license/RoryPoulter/SAT-Solver?style=for-the-badge)\n![GitHub Issues or Pull Requests](https://img.shields.io/github/issues/RoryPoulter/SAT-Solver?style=for-the-badge)\n![GitHub top language](https://img.shields.io/github/languages/top/RoryPoulter/SAT-Solver?style=for-the-badge)\n\n\n\nSAT Solver for Computational Thinking Coursework.\n\n## Usage\n### Using the `rlnf55.py` File\n* Write a .txt file in DIMACs format for the clause-set\n* Set the `PATH` constant to the path to the file relative to `rlnf55.py`, e.g.\n\n```python\nPATH = \"Examples\\Examples-for-SAT\\LNP-6.txt\"\n```\n* Run `rlnf55.py`\n\n### Importing `rlnf55.py`\nFunctions to import:\n* `load_dimacs(PATH)` - Loads a .txt file in DIMACs format and generates the corresponding clause-set\n* `simple_sat_solve(clause_set)` - SAT solver that uses brute force to check every assignment until either a satisfying assignment is found or all have been checked\n* `branching_sat_solve(clause_set, partial_assignment)` - SAT solver that uses recursion to branch on each literal\n* `dpll_sat_solve(clause_set, partial_assignment)` - SAT solver that uses the DPLL algorithm\n```py\nimport rlnf55 as ss\n\n\nif __name__ == \"__main__\":\n    PATH = \"relative/path/to/file\"\n    # Load the DIMACs file\n    clause_set = ss.load_dimacs(PATH)\n    # Use SAT solver to find satisfying assignment of if clause-set is unsatisfiable\n    assignment = ss.dpll_sat_solve(clause_set, [])\n    if assignment:\n        print(f\"Clause-set from {PATH} is satisfiable under the assignment: {assignment}.\")\n    else:\n        print(f\"Clause-set from {PATH} is unsatisfiable.\")\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frorypoulter%2Fsat-solver","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frorypoulter%2Fsat-solver","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frorypoulter%2Fsat-solver/lists"}