Skip to main content

pyglucose

Build Status (Travis-CI) Build status (AppVeyor) License

pybind11-based binding of glucose SAT solver.

Installation

pip install git+https://github.com/msakai/glucose-pybind11/

Basic Usage

The pyglucose module exports Solver and Lit.

A SAT problem can be solved as follows:

  1. Construct a solver instance using solver = Solver().
  2. Allocate variables using var = solver.new_var(). A variable is returned as integer value and can be converted to Lit by Lit(var). A literal lit can be negated as ~lit.
  3. Add clauses using solver.add_clause(clause). A clause is represented as Iterable[Lit].
  4. Solve the problem using solver.solve()
  5. If solver.okay property is True then the problem is SATISFIABLE, and satisfying assignment can be retrieved using solver.model property. Otherwise, the problem is UNSATISFIABLE.

License

MIT License

Release files for pyglucose 0.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyglucose 0.0.1
File Size Uploaded
pyglucose-0.0.1.tar.gz 84.4 kB Details

Release files / pyglucose-0.0.1.tar.gz

Download URL pyglucose-0.0.1.tar.gz
Size 84.4 kB
Tags Source
SHA-256 checksum
How to use checksums
97cd6e91b6b8aab8f7c33d0e6b029d50c0df04fe94671f7c88910da414461c27
BLAKE2b-256 checksum
How to use checksums
d0abc090ade934444eb4e4a56781ad2baed6e86675eb864f823975f9ef5ed69c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.2.0 requests-toolbelt/0.9.1 tqdm/4.26.0 CPython/3.7.0

Release history Release notifications | RSS feed

This release

0.0.1 This release

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page