protocol
souffle_protocol
Protocol for process-backed Souffle Datalog solving, source generation, and collected result inspection.
logtalk_load(souffle(loader))staticPublic predicates
solve/2
Solves a source with default options using the external Souffle CLI and returns a collected result after cleanup. Valid sources are object(Object), terms(Statements), codes(Codes), and file(Path). No .output/.printsize relations are decoded unless requested via the outputs/1/printsizes/1 options of solve/3.
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 souffle_problem_protocol:domain_error(souffle_source,Source)Statements is ground but not a list:type_error(list,Statements)domain_error(souffle_statement,Statement)domain_error(souffle_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(souffle_shell_argument,Argument)souffle executable or a shell dependency does not exist:existence_error(command,Command)existence_error(directory,Directory)permission_error(delete,source_sink,Path)representation_error(utf_8)souffle_transport(Stage,Status,Details)souffle_solver_error(Formal,Status,Diagnostics,SourceMap)solve/3
Solves a source using executable, parallelism, warning, compilation, EDB facts, and decoded-relation options. Repeated options use the first occurrence. Valid sources are object(Object), terms(Statements), codes(Codes), and file(Path). The outputs/1 option lists which .output relations to decode and their column types; the printsizes/1 option lists which .printsize relations to decode.
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 souffle_problem_protocol:domain_error(souffle_source,Source)Statements is ground but not a list:type_error(list,Statements)domain_error(souffle_statement,Statement)domain_error(souffle_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)facts/1 and facts_data/1 are given with non-default values:domain_error(souffle_facts_option,facts(Path)-facts_data(Pairs))facts_data/1 has a symbol column value containing a tab or newline character, or a value that is not an integer, float, or atom:domain_error(souffle_facts_value,Value)domain_error(souffle_shell_argument,Argument)souffle executable or a shell dependency does not exist:existence_error(command,Command)existence_error(directory,Directory)permission_error(delete,source_sink,Path)representation_error(utf_8)souffle_transport(Stage,Status,Details)souffle_solver_error(Formal,Status,Diagnostics,SourceMap)program/1
Generates and prints Datalog source to the current output, equivalent to program/2 followed by print_program/1, without invoking Souffle.
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 souffle_problem_protocol:domain_error(souffle_source,Source)Statements is ground but not a list:type_error(list,Statements)domain_error(souffle_statement,Statement)domain_error(souffle_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 Datalog source codes from object(Object), terms(Statements), codes(Codes), or file(Path) without invoking Souffle.
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 souffle_problem_protocol:domain_error(souffle_source,Source)Statements is ground but not a list:type_error(list,Statements)domain_error(souffle_statement,Statement)domain_error(souffle_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 Datalog character codes to the current output without adding a newline or invoking Souffle.
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)relation/4
Enumerates, by backtracking, decoded .output relations collected in a result: the relation name, its requested column types, and its rows (each row a list of decoded Prolog values, one per column).
staticrelation(Result,Name,Columns,Rows)relation(+compound,?atom,?list(atom),?list(list)) - zero_or_moreResult is not a ground term:instantiation_errorResult is not a valid collected Souffle result:domain_error(souffle_result,Result)size/3
Enumerates, by backtracking, decoded .printsize relation counts collected in a result.
staticsize(Result,Name,Count)size(+compound,?atom,?integer) - zero_or_moreResult is not a ground term:instantiation_errorResult is not a valid collected Souffle result:domain_error(souffle_result,Result)result_property/2
Enumerates, by backtracking, the stored result properties (raw_status/1, process_status/1, and diagnostics/1).
staticresult_property(Result,Property)result_property(+compound,?compound) - zero_or_moreResult is not a ground term:instantiation_errorResult is not a valid collected Souffle result:domain_error(souffle_result,Result)print_result/1
Prints collected relations and printsize counts to the current output, without invoking Souffle.
staticprint_result(Result)print_result(+compound) - one_or_errorResult is not a ground term:instantiation_errorResult is not a valid collected Souffle result:domain_error(souffle_result,Result)permission_error(output,stream,Stream)Protected predicates
(none)
Private predicates
(none)
Operators
(none)