Module type EdosSolver.T
Sat solver functor type
val lit_of_var : var -> bool -> litlit_of_vargiven a variable create a positive or a negative literal. By default the assigment of all variables (that is its value) is Unknown.
val initialize_problem : ?print_var:(Stdlib.Format.formatter -> int -> unit) -> ?buffer:bool -> int -> stateinitialize the solver
initialize_problem n- parameter print_var
a function to print a variable
- parameter buffer
decide weather or not to store a human readable representaion of the sat problem.
- parameter n
the size of the sat problem. that is the max number of variables to consider
val propagate : state -> unitval protect : state -> unitval reset : state -> unitresetreset the state of the solver to a state that would be obtained by re initializing the solver with an identical constraints set
val assignment : state -> value arrayassignment streturn the array of values associated to every variable.
val assignment_true : state -> var listassignment_true streturn the list of variables that are true
val add_rule : state -> lit array -> X.reason list -> unitadd_rule st ladd a disjuction to the solver of type \Bigvee l
val associate_vars : state -> lit -> var list -> unitassociate_vars st lit vlassociate a variable to a list of variables. The solver will use this information to guide the search heuristic
val solve_all : (state -> unit) -> state -> var -> boolval solve : state -> var -> boolsolve st vfinds a variable assignment that makes v True
val solve_lst : state -> var list -> boolsolve st lfinds a variable assignment that makesTrueall variables inl
val collect_reasons : state -> var -> X.reason listin case of failure return the list of associated reasons
val collect_reasons_lst : state -> var list -> X.reason listin case of failure return the list of associated reasons
val dump : state -> (int * bool) list listif the solver was initialized with
buffer = true, dump the state of the solver. Return an empty list otherwise
val stats : state -> unit