protocol
sat_protocol
Protocol for process-backed Kissat, CaDiCaL, Glucose, and Z3 CLI solving, source generation, and result inspection.
logtalk_load(sat(loader))staticPublic predicates
solve/2
Solves a source with default options using the external SAT solver CLI and returns a collected result after cleanup. Valid sources are object(Object), terms(Statements), codes(Codes), and file(Path).
staticsolve(Source,Result)solve(+compound,-compound) - one_or_errorSource is not a ground term:instantiation_errorSource is ground but not a supported source, or is object(Object) where Object does not implement sat_problem_protocol:domain_error(sat_source,Source)Statements is ground but not a list:type_error(list,Statements)domain_error(sat_statement,Statement)domain_error(sat_origins,Origins)Codes is ground but not a list of character codes:type_error(codes,Codes)Code of the list Codes is ground but not an integer:type_error(integer,Code)Code of the list Codes is an integer but not a valid character code:domain_error(character_code,Code)Path is ground but not an atom:type_error(atom,Path)Path does not exist:existence_error(source_sink,Path)Path cannot be opened for reading:permission_error(open,source_sink,Path)domain_error(sat_shell_argument,Argument)existence_error(command,Command)existence_error(directory,Directory)permission_error(delete,source_sink,Path)representation_error(utf_8)sat_transport(Stage,Status,Details)sat_solver_error(Formal,Status,Diagnostics,SourceMap)solve/3
Solves a source using solver/1, executable/1, time_limit/1, conflicts/1, decisions/1, seed/1, and witness/1 options. Repeated options use the first occurrence. Valid sources are object(Object), terms(Statements), codes(Codes), and file(Path).
staticsolve(Source,Result,Options)solve(+compound,-compound,+list(compound)) - one_or_errorSource is not a ground term:instantiation_errorSource is ground but not a supported source, or is object(Object) where Object does not implement sat_problem_protocol:domain_error(sat_source,Source)Statements is ground but not a list:type_error(list,Statements)domain_error(sat_statement,Statement)domain_error(sat_origins,Origins)Codes is ground but not a list of character codes:type_error(codes,Codes)Code of the list Codes is ground but not an integer:type_error(integer,Code)Code of the list Codes is an integer but not a valid character code:domain_error(character_code,Code)Path is ground but not an atom:type_error(atom,Path)Path does not exist:existence_error(source_sink,Path)Path cannot be opened for reading:permission_error(open,source_sink,Path)Options is a variable:instantiation_errorOptions is neither a variable nor a list:type_error(list,Options)Option of the list Options is a variable:instantiation_errorOption of the list Options is neither a variable nor a compound term:type_error(compound,Option)Option of the list Options is a compound term but not a valid option:domain_error(option,Option)domain_error(sat_shell_argument,Argument)existence_error(command,Command)existence_error(directory,Directory)permission_error(delete,source_sink,Path)representation_error(utf_8)sat_transport(Stage,Status,Details)sat_solver_error(Formal,Status,Diagnostics,SourceMap)program/1
Generates and prints DIMACS CNF source to the current output using default options, equivalent to program/2 followed by print_program/1, without invoking the solver.
staticprogram(Source)program(+compound) - one_or_errorSource is not a ground term:instantiation_errorSource is ground but not a supported source, or is object(Object) where Object does not implement sat_problem_protocol:domain_error(sat_source,Source)Statements is ground but not a list:type_error(list,Statements)domain_error(sat_statement,Statement)domain_error(sat_origins,Origins)Codes is ground but not a list of character codes:type_error(codes,Codes)Code of the list Codes is ground but not an integer:type_error(integer,Code)Code of the list Codes is an integer but not a valid character code:domain_error(character_code,Code)Path is ground but not an atom:type_error(atom,Path)Path does not exist:existence_error(source_sink,Path)Path cannot be opened for reading:permission_error(open,source_sink,Path)permission_error(output,stream,Stream)program/2
Returns DIMACS CNF source codes from object(Object), terms(Statements), codes(Codes), or file(Path) using default options, without invoking the solver.
staticprogram(Source,Codes)program(+compound,-list(integer)) - one_or_errorSource is not a ground term:instantiation_errorSource is ground but not a supported source, or is object(Object) where Object does not implement sat_problem_protocol:domain_error(sat_source,Source)Statements is ground but not a list:type_error(list,Statements)domain_error(sat_statement,Statement)domain_error(sat_origins,Origins)Codes is ground but not a list of character codes:type_error(codes,Codes)Code of the list Codes is ground but not an integer:type_error(integer,Code)Code of the list Codes is an integer but not a valid character code:domain_error(character_code,Code)Path is ground but not an atom:type_error(atom,Path)Path does not exist:existence_error(source_sink,Path)Path cannot be opened for reading:permission_error(open,source_sink,Path)program/3
Returns DIMACS CNF source codes from object(Object), terms(Statements), codes(Codes), or file(Path), using the embed_variables/1 option, without invoking the solver.
staticprogram(Source,Codes,Options)program(+compound,-list(integer),+list(compound)) - one_or_errorSource is not a ground term:instantiation_errorSource is ground but not a supported source, or is object(Object) where Object does not implement sat_problem_protocol:domain_error(sat_source,Source)Statements is ground but not a list:type_error(list,Statements)domain_error(sat_statement,Statement)domain_error(sat_origins,Origins)Codes is ground but not a list of character codes:type_error(codes,Codes)Code of the list Codes is ground but not an integer:type_error(integer,Code)Code of the list Codes is an integer but not a valid character code:domain_error(character_code,Code)Path is ground but not an atom:type_error(atom,Path)Path does not exist:existence_error(source_sink,Path)Path cannot be opened for reading:permission_error(open,source_sink,Path)Options is a variable:instantiation_errorOptions is neither a variable nor a list:type_error(list,Options)Option of the list Options is a variable:instantiation_errorOption of the list Options is neither a variable nor a compound term:type_error(compound,Option)Option of the list Options is a compound term but not a valid option:domain_error(option,Option)print_program/1
Prints DIMACS CNF character codes to the current output without adding a newline or invoking the solver.
staticprint_program(Codes)print_program(+list(integer)) - one_or_errorCodes is not a ground term:instantiation_errorCodes is ground but not a list of character codes:type_error(codes,Codes)Code of the list Codes is ground but not an integer:type_error(integer,Code)Code of the list Codes is an integer but not a valid character code:domain_error(character_code,Code)permission_error(output,stream,Stream)literal/2
Enumerates, by backtracking, the collected model literals (+Term or -Term) without starting a process. Fails when the result has no witness.
staticliteral(Result,Literal)literal(+compound,-compound) - zero_or_moreResult is not a ground term:instantiation_errorResult is not a valid collected SAT solver result:domain_error(sat_result,Result)result_property/2
Enumerates, by backtracking, status(Status) and the stored result properties.
staticresult_property(Result,Property)result_property(+compound,?compound) - zero_or_moreResult is not a ground term:instantiation_errorResult is not a valid collected SAT solver result:domain_error(sat_result,Result)print_result/1
Prints the collected status and, when present, the witness literals to the current output using Kissat-style s/v labels, without invoking the solver.
staticprint_result(Result)print_result(+compound) - one_or_errorResult is not a ground term:instantiation_errorResult is not a valid collected SAT solver result:domain_error(sat_result,Result)permission_error(output,stream,Stream)Protected predicates
(none)
Private predicates
(none)
Operators
(none)