ClausePartition

interface ClausePartition

The result of splitting a collection of Clauses (typically a whole Theory) into the pieces of state a it.unibo.tuprolog.solve.Solver must be seeded with when loading it: plain clauses bound for the static/dynamic knowledge bases, plus everything expressed via directives (:- Goal facts) -- declared operators, flags (flagStore), goals to run at load time (initialGoals), and other theories to load (includes).

Produced by ClausePartitioner (see it.unibo.tuprolog.solve.directives.partition extension functions), and consumed by AbstractSolver.initializeKb (see it.unibo.tuprolog.solve.impl.AbstractSolver) when a knowledge base is loaded into a solver.

See also

Inheritors

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
abstract val dynamicClauses: Theory

Clauses bound for the dynamic knowledge base (see it.unibo.tuprolog.solve.ExecutionContextAware.dynamicKb).

Link copied to clipboard
abstract val flagStore: FlagStore

Flags set via :- set_flag(Name, Value)/:- set_prolog_flag(Name, Value) directives.

Link copied to clipboard
abstract val includes: List<Atom>

Names of other theories to be loaded, declared via :- include(Name)/:- load(Name) directives.

Link copied to clipboard
abstract val initialGoals: List<Struct>

Goals to be solved once, at load time, declared via :- initialization(Goal)/:- solve(Goal) directives.

Link copied to clipboard
abstract val operators: OperatorSet

Operators declared via :- op(Priority, Specifier, Name) directives.

Link copied to clipboard
abstract val staticClauses: Theory

Clauses bound for the static knowledge base (see it.unibo.tuprolog.solve.ExecutionContextAware.staticKb).

Functions

Link copied to clipboard
open operator fun plus(other: ClausePartition): ClausePartition

Merges this partition with other, concatenating/summing each corresponding component.

Link copied to clipboard

Null-safe ClausePartition.plus: merges two possibly-null partitions, returning null only if both are.