Context

The context of an arg2p solver: clauses kept in branches (see ContextBranches), outside of the theory and of backtracking, which the context_* primitives change and read (see the files of the primitives of the context, on branches, assertions and lookups).

Constructors

Link copied to clipboard
constructor()

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
val active: Int

The active branch, as context_active/1

Link copied to clipboard
open override val alias: String
Link copied to clipboard
open override val baseContent: Library
Link copied to clipboard
open override val baseFlags: Iterable<ArgsFlag<*, *>>
Link copied to clipboard
open val theoryOperators: OperatorSet

Functions

Link copied to clipboard
fun assertAll(terms: Iterable<Term>)

The terms asserted in the active branch, in order, as context_assert_all/1

Link copied to clipboard
fun branch(from: Int): Int?

A new branch of the given one, made active, as context_branch/2; null if there is no branch from

Link copied to clipboard
open fun content(): Library
Link copied to clipboard
fun <T : Any> derived(functor: String, arity: Int, name: String, branch: Int? = null, compute: (List<Clause>) -> T): T

A value derived from the clauses of a predicate in the given branch, the active one if null (see ClauseStore.derived); for a branch that does not exist, computed on no clause

Link copied to clipboard
open fun flags(): Iterable<ArgsFlag<*, *>>
Link copied to clipboard
fun identifier(term: Term): Int

The identifier of term, as context_id/2 gives it

Link copied to clipboard
fun instances(goal: Term, branch: Int? = null): List<Term>

The instances of goal in the given branch (the active one if null), as context_all: for the native primitives reading the context, without solving a goal (see ContextAll.owner)

Link copied to clipboard
fun knownIdentifier(term: Term): Int?

The identifier of term if it has one already, without giving it one

Link copied to clipboard
fun term(identifier: Int): Term?

The term with identifier identifier (see identifier), if any