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).').

Throws

Properties

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

Functions

Link copied to clipboard

Parses text as Prolog source, then either appends its clauses/operators/flags to the solver's current ones (used by Consult) or, if not append, replaces them wholesale (used by SetTheory itself, which always calls this with append = false).