CPSolver.Examples.SatSolver (Fixpoint v0.8.51)
This module solves SAT problems represented in CNF form.
It's a list of lists of integers, where a positive integer i
represents a boolean variable mapped to i
,
and a negative integer j
represents negation of a boolean variable mapped to j
.
Examples of CNF representation:
# x1 AND (NOT x1)
[[1], [-1]]
# x1 AND (x1 OR x2 OR x3)
[[1], [1, 2, 3]]
# x1 AND x2 AND x3
[[1], [2], [3]]
Summary
Functions
Link to this function
check_solution(solution, dimacs_instance)
Link to this function
clauses(dimacs_instance)
Link to this function
dimacs_instances()
Link to this function
model(dimacs_instance)
Link to this function
solve(clauses, opts \\ [])
Link to this function