{"id":24391653,"url":"https://github.com/computational-problem-solving/sat","last_synced_at":"2025-12-12T03:08:40.299Z","repository":{"id":37785803,"uuid":"44271393","full_name":"computational-problem-solving/sat","owner":"computational-problem-solving","description":":satisfied: Boolean formula satisfiability algorithms for JavaScript","archived":false,"fork":false,"pushed_at":"2024-10-03T04:23:20.000Z","size":2694,"stargazers_count":6,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-10-08T09:35:40.678Z","etag":null,"topics":["agpl","algorithms","computer-science","javascript","k-sat","np-complete","reductions","sat-solver","sat0w"],"latest_commit_sha":null,"homepage":"https://computational-problem-solving.github.io/sat","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/computational-problem-solving.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":"2015-10-14T19:30:38.000Z","updated_at":"2024-10-03T04:23:22.000Z","dependencies_parsed_at":"2023-12-30T03:27:20.457Z","dependency_job_id":"615bd9f7-1b9e-4415-ad87-3edb4b6c8156","html_url":"https://github.com/computational-problem-solving/sat","commit_stats":{"total_commits":453,"total_committers":8,"mean_commits":56.625,"dds":0.609271523178808,"last_synced_commit":"70d56966a6acaff54979e3b6a29830ea41b4582f"},"previous_names":["aureooms/js-sat"],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/computational-problem-solving%2Fsat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/computational-problem-solving%2Fsat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/computational-problem-solving%2Fsat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/computational-problem-solving%2Fsat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/computational-problem-solving","download_url":"https://codeload.github.com/computational-problem-solving/sat/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248381788,"owners_count":21094528,"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":["agpl","algorithms","computer-science","javascript","k-sat","np-complete","reductions","sat-solver","sat0w"],"created_at":"2025-01-19T17:18:33.702Z","updated_at":"2025-12-12T03:08:34.972Z","avatar_url":"https://github.com/computational-problem-solving.png","language":"JavaScript","readme":":satisfied: [@problem-solving/sat](https://computational-problem-solving.github.io/sat)\n==\n\n\u003cp align=\"center\"\u003e\n\u003ca href=\"https://xkcd.com/1801\"\u003e\n\u003cimg src=\"https://imgs.xkcd.com/comics/decision_paralysis.png\" width=\"300\"\u003e\n\u003c/a\u003e\u003cbr/\u003e\n© \u003ca href=\"https://xkcd.com\"\u003exkcd.com\u003c/a\u003e\n\u003c/p\u003e\n\nBoolean formula satisfiability algorithms for JavaScript.\nSee [docs](https://computational-problem-solving.github.io/sat).\nParent is [js-algorithms](https://github.com/make-github-pseudonymous-again/js-algorithms).\nFor a polynomial time algorithm for the 2SAT problem see\n[@problem-solving/2sat](https://github.com/computational-problem-solving/2sat).\n\n```js\nlet instance = sat.from.signs( [ [ -1 , 2 , 3 ] , [ -2 , -4 , 5 ] , [ 1 , -5 ] ] ) ;\n// or\n// let instance = sat.from.keys(\n// [\n//   [ [ false , '1' ] , [ true , '2' ] , [ true , '3' ] ] ,\n//   [ [ false , '2' ] , [ false , '4' ] , [ true , '5' ] ] ,\n//   [ [ true , '1' ] , [ false , '5' ] ]\n// ]\n// ) ;\nsat.decide( instance ) ; // true\nsat.verify( instance , sat.solve( instance ).next( ).value ) ; // true\nfor ( let certificate of sat.solve( instance ) ) {\n    console.log( instance.assignment( certificate ) ) ;\n}\n```\n\n[![License](https://img.shields.io/github/license/computational-problem-solving/sat.svg)](https://raw.githubusercontent.com/computational-problem-solving/sat/main/LICENSE)\n[![Version](https://img.shields.io/npm/v/@problem-solving/sat.svg)](https://www.npmjs.org/package/@problem-solving/sat)\n[![Tests](https://img.shields.io/github/actions/workflow/status/computational-problem-solving/sat/ci.yml?branch=main\u0026event=push\u0026label=tests)](https://github.com/computational-problem-solving/sat/actions/workflows/ci.yml?query=branch:main)\n[![Dependencies](https://img.shields.io/librariesio/github/computational-problem-solving/sat.svg)](https://github.com/computational-problem-solving/sat/network/dependencies)\n[![GitHub issues](https://img.shields.io/github/issues/computational-problem-solving/sat.svg)](https://github.com/computational-problem-solving/sat/issues)\n[![Downloads](https://img.shields.io/npm/dm/@problem-solving/sat.svg)](https://www.npmjs.org/package/@problem-solving/sat)\n\n[![Code issues](https://img.shields.io/codeclimate/issues/computational-problem-solving/sat.svg)](https://codeclimate.com/github/computational-problem-solving/sat/issues)\n[![Code maintainability](https://img.shields.io/codeclimate/maintainability/computational-problem-solving/sat.svg)](https://codeclimate.com/github/computational-problem-solving/sat/trends/churn)\n[![Code coverage (cov)](https://img.shields.io/codecov/c/gh/computational-problem-solving/sat/main.svg)](https://codecov.io/gh/computational-problem-solving/sat)\n[![Code technical debt](https://img.shields.io/codeclimate/tech-debt/computational-problem-solving/sat.svg)](https://codeclimate.com/github/computational-problem-solving/sat/trends/technical_debt)\n[![Documentation](https://computational-problem-solving.github.io/sat/badge.svg)](https://computational-problem-solving.github.io/sat/source.html)\n[![Package size](https://img.shields.io/bundlephobia/minzip/@problem-solving/sat)](https://bundlephobia.com/result?p=@problem-solving/sat)\n\n## :scroll: Reference\n\n  - [Simple solver in Python](http://sahandsaba.com/understanding-sat-by-implementing-a-simple-sat-solver-in-python.html)\n  - [SATLIB](http://www.cs.ubc.ca/~hoos/SATLIB/benchm.html)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcomputational-problem-solving%2Fsat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcomputational-problem-solving%2Fsat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcomputational-problem-solving%2Fsat/lists"}