SetTheory
Non-ISO, tuProlog-specific predicate: set_theory/1 parses the atom argument as Prolog source text (using it.unibo.tuprolog.theory.parsing.ClausesParser with the context's current operators) and replaces the solver's static and dynamic knowledge base, operators and flags with what that text defines. See setTheory for the shared implementation (also used, with append = true, by Consult to load a theory fetched from a it.unibo.tuprolog.solve.libs.io.Url).
?- set_theory('parent(tom, bob). parent(bob, ann).').Content copied to clipboard
Throws
if the argument is unbound.
if it is bound but not an atom.
if it is not well-formed Prolog source text.