Package-level declarations

Types

Link copied to clipboard
interface Channel<T : Any>

Base type abstracting a channel of communication of T-typed elements between a it.unibo.tuprolog.solve.Solver and the outside world, without committing to a specific transport.

Link copied to clipboard
interface ChannelStore<T : Any, C : Channel<T>, Self : ChannelStore<T, C, Self>> : Map<String, C>

An immutable map of Channels keyed by alias, allowing a it.unibo.tuprolog.solve.Solver to hold several named I/O channels at once (e.g. to support Prolog's stream terms for format/3-style I/O redirection), rather than assuming a single channel per direction.

Link copied to clipboard
interface InputChannel<T : Any> : Channel<T>

A Channel a it.unibo.tuprolog.solve.Solver reads T-typed elements from, e.g. backing Prolog's read/1 or a solver's standard input.

Link copied to clipboard
typealias Listener<T> = (T) -> Unit

A callback invoked, by a Channel, with every element transiting it (see Channel.addListener).

Link copied to clipboard
interface OutputChannel<T : Any> : Channel<T>

A Channel a it.unibo.tuprolog.solve.Solver writes T-typed elements to, e.g. backing Prolog's write/1, a solver's standard output/error, or warning reporting.

Link copied to clipboard

A JVM AbstractOutputChannel writing every element to printStream via PrintStream.print.

Link copied to clipboard

A JVM AbstractInputChannel reading one character at a time from reader (or from inputStream, wrapped into one), reporting available as false (rather than throwing) if the underlying Reader raises an IOException.

Link copied to clipboard

A JVM AbstractOutputChannel writing every String to writer (or to outputStream, wrapped into one).