.. index:: single: problog_process .. _problog_process/0: .. rst-class:: right **object** ``problog_process`` =================== Isolated operating-system shell transport for the ProbLog CLI. | **Availability:** | ``logtalk_load(problog(loader))`` | **Author:** Paulo Moura | **Version:** 1:0:0 | **Date:** 2026-11-12 | **Compilation flags:** | ``static, context_switching_calls`` | **Uses:** | :ref:`list ` | :ref:`os ` | :ref:`process ` | :ref:`reader ` | :ref:`type ` | :ref:`utf_8 ` | **Remarks:** | (none) | **Inherited public predicates:** | (none) .. contents:: :local: :backlinks: top Public predicates ----------------- .. index:: quote/3 .. _problog_process/0::quote/3: ``quote/3`` ^^^^^^^^^^^ Quotes an atom as one POSIX shell or Windows PowerShell literal, without interpolation. | **Compilation flags:** | ``static`` | **Template:** | ``quote(Platform,Argument,Quoted)`` | **Mode and number of proofs:** | ``quote(+atom,+atom,-atom)`` - ``one_or_error`` | **Exceptions:** | ``Platform`` is a variable: | ``instantiation_error`` | ``Platform`` is neither a variable nor an atom: | ``type_error(atom,Platform)`` | ``Platform`` is an atom but neither ``posix`` nor ``windows``: | ``domain_error(problog_shell_platform,Platform)`` | ``Argument`` is a variable: | ``instantiation_error`` | ``Argument`` is neither a variable nor an atom: | ``type_error(atom,Argument)`` | ``Argument`` is an atom but contains a null character: | ``domain_error(problog_shell_argument,Argument)`` ------------ .. index:: run/7 .. _problog_process/0::run/7: ``run/7`` ^^^^^^^^^ Runs the ProbLog CLI with an owned temporary source and separate UTF-8 output captures, returning only after cleanup. | **Compilation flags:** | ``static`` | **Template:** | ``run(Executable,Arguments,ProgramSource,Codes,Diagnostics,RawStatus,NormalizedStatus)`` | **Mode and number of proofs:** | ``run(+atom,+list(atom),+compound,-list(code),-list(code),-term,-compound)`` - ``one_or_error`` | **Exceptions:** | ``Executable`` is a variable: | ``instantiation_error`` | ``Executable`` is neither a variable nor an atom: | ``type_error(atom,Executable)`` | ``Arguments`` is a partial list or a list with an element ``Argument`` which is a variable: | ``instantiation_error`` | ``Arguments`` is neither a variable nor a list: | ``type_error(list(atom),Arguments)`` | An element ``Argument`` of the list ``Arguments`` is neither a variable nor an atom: | ``type_error(atom,Argument)`` | ``Executable`` or an element ``Argument`` of the list ``Arguments`` contains a null character: | ``domain_error(problog_shell_argument,Argument)`` | ``ProgramSource`` is not a ground term: | ``instantiation_error`` | ``ProgramSource`` is neither ``file(Path)`` nor ``codes(Codes)``: | ``domain_error(problog_process_source,ProgramSource)`` | A launcher dependency does not exist: | ``existence_error(command,Command)`` | A source or capture file does not exist: | ``existence_error(source_sink,Path)`` | A source or capture file cannot be opened: | ``permission_error(open,source_sink,Path)`` | An owned directory cannot be found during cleanup: | ``existence_error(directory,Directory)`` | An owned file or directory cannot be removed: | ``permission_error(delete,source_sink,Path)`` | A character sequence is not valid UTF-8: | ``representation_error(utf_8)`` | A launcher operation fails: | ``problog_transport(Stage,Status,Details)`` ------------ Protected predicates -------------------- (no local declarations; see entity ancestors if any) Private predicates ------------------ (no local declarations; see entity ancestors if any) Operators --------- (none)