Package-level declarations

Types

Link copied to clipboard
typealias CustomData = Map<String, Any>

A named bag of arbitrary, implementation- or library-defined values attached to an it.unibo.tuprolog.solve.ExecutionContext (see CustomDataStore), read/written by predicates such as get_persistent/2, get_durable/2, get_ephemeral/2 and their set_persistent/2, set_durable/2, set_ephemeral/2 counterparts (it.unibo.tuprolog.solve.stdlib.primitive). Lets libraries/primitives stash their own bookkeeping on a context without :solve needing to know about it.

Link copied to clipboard
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.