Consult

Non-ISO, tuProlog-specific predicate: consult/1 fetches the text pointed at by the atom argument (parsed into a it.unibo.tuprolog.solve.libs.io.Url via it.unibo.tuprolog.solve.libs.io.Url.Companion.of, so both proper URLs and bare filesystem paths work) and loads it as a theory, exactly as SetTheory does for an inline source string.

?- consult('theory.pl').
?- consult('https://example.com/theory.pl').

Throws

(url) if it is an atom that does not parse into a valid Url.

if the resource cannot be fetched (e.g. missing file, unreachable host).

if the fetched text is not a well-formed theory.

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard