protocol
smt_protocol
Protocol for process-backed Z3, cvc5, Bitwuzla, and Yices 2 CLI solving, SMT-LIB 2 source generation, and collected result inspection.
logtalk_load(smt(loader))staticPublic predicates
solve/2
Solves a source with default options using the external SMT solver CLI and returns a collected result per check-sat command, in script order, after cleanup. Valid sources are object(Object), terms(Statements), codes(Codes), and file(Path).
staticsolve(Source,Results)solve(+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 smt_problem_protocol:domain_error(smt_source,Source)Statements is ground but not a list:type_error(list,Statements)domain_error(smt_statement,Statement)domain_error(smt_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(smt_shell_argument,Argument)existence_error(command,Command)existence_error(directory,Directory)permission_error(delete,source_sink,Path)representation_error(utf_8)smt_transport(Stage,Status,Details)smt_solver_error(Formal,Status,Diagnostics,SourceMap)solve/3
Solves a source using solver/1, executable/1, and time_limit/1 options. Repeated options use the first occurrence. Valid sources are object(Object), terms(Statements), codes(Codes), and file(Path).
staticsolve(Source,Results,Options)solve(+compound,-list(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 smt_problem_protocol:domain_error(smt_source,Source)Statements is ground but not a list:type_error(list,Statements)domain_error(smt_statement,Statement)domain_error(smt_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(smt_shell_argument,Argument)existence_error(command,Command)existence_error(directory,Directory)permission_error(delete,source_sink,Path)representation_error(utf_8)smt_transport(Stage,Status,Details)smt_solver_error(Formal,Status,Diagnostics,SourceMap)program/1
Generates and prints SMT-LIB 2 source to the current output, 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 smt_problem_protocol:domain_error(smt_source,Source)Statements is ground but not a list:type_error(list,Statements)domain_error(smt_statement,Statement)domain_error(smt_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 SMT-LIB 2 source codes from object(Object), terms(Statements), codes(Codes), or file(Path) 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 smt_problem_protocol:domain_error(smt_source,Source)Statements is ground but not a list:type_error(list,Statements)domain_error(smt_statement,Statement)domain_error(smt_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)print_program/1
Prints SMT-LIB 2 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)status/2
Returns the collected status (satisfiable, unsatisfiable, or unknown) of a single check-sat result.
staticstatus(Result,Status)status(+compound,-atom) - one_or_errorResult is not a ground term:instantiation_errorResult is not a valid collected SMT solver result:domain_error(smt_result,Result)model_binding/2
Enumerates, by backtracking, the collected model bindings (Symbol-Value pairs) without starting a process. Fails when the result has no model.
staticmodel_binding(Result,Binding)model_binding(+compound,-pair) - zero_or_moreResult is not a ground term:instantiation_errorResult is not a valid collected SMT solver result:domain_error(smt_result,Result)model_value/3
Looks up the collected model value bound to Symbol. Fails when the result has no model or no binding for Symbol.
staticmodel_value(Result,Symbol,Value)model_value(+compound,+atom,-term) - zero_or_oneResult or Symbol is a variable:instantiation_errorSymbol is neither a variable nor an atom:type_error(atom,Symbol)Result is not a valid collected SMT solver result:domain_error(smt_result,Result)unsat_core_name/2
Enumerates, by backtracking, the named assertions in the collected unsatisfiable core without starting a process. Fails when the result has no core.
staticunsat_core_name(Result,Name)unsat_core_name(+compound,-atom) - zero_or_moreResult is not a ground term:instantiation_errorResult is not a valid collected SMT solver result:domain_error(smt_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 SMT solver result:domain_error(smt_result,Result)print_result/1
Prints a single collected result (status and, when present, model bindings and unsat core names) to the current output, 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 SMT solver result:domain_error(smt_result,Result)permission_error(output,stream,Stream)print_results/1
Prints each collected result in Results, in order, separating consecutive results with a blank line.
staticprint_results(Results)print_results(+list(compound)) - one_or_errorResults is not a ground term:instantiation_errorResults is ground but not a list:type_error(list,Results)Results is not a valid collected SMT solver result:domain_error(smt_result,Result)permission_error(output,stream,Stream)capability/2
Enumerates, by backtracking, advisory Solver-Feature capability pairs. Purely informational: the library does not enforce these pairs and a solver call may still succeed, fail, or report unknown for a feature outside this table.
staticcapability(Solver,Feature)capability(?atom,?atom) - zero_or_more
Feature: One of
quantifiers,strings,linear_arithmetic,non_linear_arithmetic,unsat_cores,incremental,bit_vectors,arrays,floating_point, oralgebraic_datatypes.
Protected predicates
(none)
Private predicates
(none)
Operators
(none)