Install & Compatibility
Where this runs
No compatibility data collected yet for this library.
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
KissatSolver
✓ from passagemath_kissat import KissatSolver
✗ from passagemath.kissat import KissatSolver
Basic usage: create a KissatSolver instance, add clauses (variables as positive integers), call solve(), and access satisfiability and model.
from passagemath.kissat import KissatSolver
solver = KissatSolver()
# Example: solve a simple SAT problem (a ∨ b) ∧ (¬a ∨ c)
solver.add_clause([1, 2]) # a (var 1) or b (var 2)
solver.add_clause([-1, 3]) # not a or c (var 3)
result = solver.solve()
print('SAT' if result.satisfiable else 'UNSAT')
if result.satisfiable:
print('Model:', result.model)
# Model is a list of variable assignments (e.g., [-2, 1, 3] meaning b=False, a=True, c=True)
Debug
Known issues
gotchaVariable indices must be positive integers. Zero and negative non-zero values are not allowed for variable numbers in add_clause(). Only negative literals (e.g., -1) are used to denote negation.fixUse positive integers for variables, and negate by prefixing with '-' (e.g., -1).
affects: all
breakingThe API changed significantly from the standalone 'kissat' package. The standalone version used 'kissat.solve()' with different return types. In passagemath-kissat, the solver is a class with a different interface.fixUse the new import: 'from passagemath.kissat import KissatSolver' and instantiate before solving.
affects: >=10.0 (standalone) vs passagemath-kissat 10.8.x
deprecatedThe function 'solve_sat' that returns a dictionary is deprecated in favor of the KissatSolver class which returns an object with attributes.fixSwitch to KissatSolver.solve() which returns a result object with .satisfiable and .model.
affects: 10.8.0+
Upgrade
Version history
10.8.4latest on PyPI · released Apr 20, 2026
Audit
Dependencies
cysignalsrequiredRequired for interrupt handling and signal support in SAT solving.