CustomDataStore

data class CustomDataStore(val persistent: CustomData = emptyMap(), val durable: CustomData = emptyMap(), val ephemeral: CustomData = emptyMap())

The CustomData attached to an it.unibo.tuprolog.solve.ExecutionContext (see it.unibo.tuprolog.solve.ExecutionContext.customData), split into three tiers by how long an entry is expected to survive, from longest- to shortest-lived: persistent, durable, and ephemeral. Resolution strategies decide when/how often each tier gets pruned (see discardEphemeral/preservePersistent); e.g. ephemeral data is typically discarded more eagerly (across backtracking or per solving step) than durable or persistent data.

Constructors

Link copied to clipboard
constructor(persistent: CustomData = emptyMap(), durable: CustomData = emptyMap(), ephemeral: CustomData = emptyMap())

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

Data expected to survive longer than ephemeral, but not necessarily as long as persistent.

Link copied to clipboard

Short-lived data, the first tier to be discarded (see discardEphemeral).

Link copied to clipboard

Data expected to survive for as long as the it.unibo.tuprolog.solve.Solver itself, e.g. across queries.

Functions

Link copied to clipboard

Returns a copy of this store with ephemeral cleared, keeping persistent and durable as-is.

Link copied to clipboard

Returns a copy of this store with both durable and ephemeral cleared, keeping only persistent.