{"id":16733229,"url":"https://github.com/msakai/glucose-pybind11","last_synced_at":"2026-05-21T04:04:23.457Z","repository":{"id":62580684,"uuid":"120424763","full_name":"msakai/glucose-pybind11","owner":"msakai","description":null,"archived":false,"fork":false,"pushed_at":"2019-04-14T07:51:34.000Z","size":166,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-23T13:22:19.094Z","etag":null,"topics":["python","sat-solver"],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/msakai.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}},"created_at":"2018-02-06T08:32:25.000Z","updated_at":"2019-04-14T15:08:08.000Z","dependencies_parsed_at":"2022-11-03T21:00:59.097Z","dependency_job_id":null,"html_url":"https://github.com/msakai/glucose-pybind11","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/msakai%2Fglucose-pybind11","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/msakai%2Fglucose-pybind11/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/msakai%2Fglucose-pybind11/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/msakai%2Fglucose-pybind11/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/msakai","download_url":"https://codeload.github.com/msakai/glucose-pybind11/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243785087,"owners_count":20347409,"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":["python","sat-solver"],"created_at":"2024-10-12T23:49:07.314Z","updated_at":"2026-05-21T04:04:18.412Z","avatar_url":"https://github.com/msakai.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pyglucose\n\n[![pypi](https://img.shields.io/pypi/v/pyglucose.svg)](https://pypi.python.org/pypi/pyglucose)\n[![Build Status (Travis-CI)](https://secure.travis-ci.org/msakai/glucose-pybind11.png?branch=master)](http://travis-ci.org/msakai/glucose-pybind11)\n[![Build status (AppVeyor)](https://ci.appveyor.com/api/projects/status/c3dve9477wgs49c1?svg=true)](https://ci.appveyor.com/project/msakai/glucose-pybind11)\n[![License](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)\n\n[pybind11](https://github.com/pybind/pybind11)-based binding of [glucose SAT solver](http://www.labri.fr/perso/lsimon/glucose/).\n\n## Installation\n\n```\npip install git+https://github.com/msakai/glucose-pybind11/\n```\n\n## Basic Usage\n\nThe `pyglucose` module exports `Solver` and `Lit`.\n\nA SAT problem can be solved as follows:\n\n1. Construct a solver instance using `solver = Solver()`.\n2. Allocate variables using `var = solver.new_var()`.\n   A variable is returned as integer value and can be converted to `Lit` by `Lit(var)`.\n   A literal `lit` can be negated as `~lit`.\n3. Add clauses using `solver.add_clause(clause)`. A clause is represented as `Iterable[Lit]`.\n4. Solve the problem using `solver.solve()`\n5. If `solver.okay` property is `True` then the problem is `SATISFIABLE`, and\n   satisfying assignment can be retrieved using `solver.model` property.\n   Otherwise, the problem is `UNSATISFIABLE`.\n   \n## License\n\n[MIT License](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmsakai%2Fglucose-pybind11","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmsakai%2Fglucose-pybind11","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmsakai%2Fglucose-pybind11/lists"}