Call goals with reified IO and (exit) ports

Author(s): Jose F. Morales.

Predicates to delay the execution of the (exit) port of a goal and capture the OS standard output/error streams (stdout,stderr).

Usage and interface

Documentation on exports

Usage:io_once_port_reify(Goal,Port,OutString)

Executes Goal, Port is the state when the predicate finishes (true, fail). Its stdout is stored in OutString.

  • The following properties should hold upon exit:
    (basic_props:string/1)OutString is a string (a list of character codes).
Meta-predicate with arguments: io_once_port_reify(goal,?,?).

Usage:io_once_port_reify(Goal,Port,OutString,ErrString)

Executes Goal, Port is the state when the predicate finishes (true, fail). Its stdout and stderr are stored in OutString and ErrString respectively.

Meta-predicate with arguments: io_once_port_reify(goal,?,?,?).

No further documentation available for this predicate.

No further documentation available for this predicate.

Usage:call_with_std_redirect(Goal,OutChn,ErrChn)

Executes (a possibly non-deterministic) Goal with stdout and stderr redirection. If needed, redirections are reinstalled on backtracking.

    Meta-predicate with arguments: call_with_std_redirect(goal,?,?).

    Documentation on imports

    This module has the following direct dependencies: