open
Implements open/3,4: validates the SourceSink/Mode/Stream/Options arguments (third is the Stream output argument, shared by both arities), opens the corresponding channel via it.unibo.tuprolog.solve.libs.io.openInputChannel/it.unibo.tuprolog.solve.libs.io.openOutputChannel, and registers it (under the alias(_) option, if given, or an auto-generated one) before replying with the new $stream(...) term unified with third.
Throws
if SourceSink, Mode or Options is unbound.
(source_sink, io_mode, stream_property) if SourceSink is not a valid Url, Mode is not read/write/append, or an element of Options is not a stream_property/2 shape.
if an element of Options is a stream property this implementation does not report (e.g. type(binary)).
if the resource cannot actually be opened (e.g. missing file, writing attempted on a non-file Url), converted into a it.unibo.tuprolog.solve.exception.error.SystemError.