Python API
pystalmarck
PyStalmarck - Python bindings for StalmarckSAT
A Python interface to the StalmarckSAT solver, which implements Stålmarck's method for Boolean satisfiability solving.
solve_cnf_file(file_path, verbosity=None, timeout=None)
builtin
Solve a CNF file directly (convenience function)
Parameters:
Name | Type | Description | Default |
---|---|---|---|
file_path
|
Path to the DIMACS CNF file |
required | |
verbosity
|
Verbosity level (0-2), default 0 |
None
|
|
timeout
|
Timeout in seconds, default 0.0 (no timeout) |
None
|
Returns:
Name | Type | Description |
---|---|---|
bool |
True if satisfiable, False if unsatisfiable |
Raises:
Type | Description |
---|---|
RuntimeError
|
If there's an error parsing or solving the file |