NotableFlag

interface NotableFlag

A typed, well-known Prolog flag, i.e. a named switch whose legal values and default are known ahead of time -- as opposed to the arbitrary String → Termentries a plain [FlagStore] can also hold. Implemented as object`s for both ISO-standard flags (Unknown, DoubleQuotes) and implementation-specific ones (LastCallOptimization, TrackVariables, MaxArity).

See also

Inheritors

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

Every legal value this flag may take.

Link copied to clipboard
abstract val defaultValue: Term

The value this flag takes unless explicitly set otherwise.

Link copied to clipboard

Whether this flag's value can be changed at all (false for e.g. MaxArity).

Link copied to clipboard
abstract val name: String

This flag's name, as it appears as the key in a FlagStore (e.g. "unknown", "double_quotes").

Functions

Link copied to clipboard
open fun isAdmissibleValue(value: Term): Boolean

Whether value is one of admissibleValues.

Link copied to clipboard
open infix fun to(value: Term): Pair<String, Term>

This flag's name paired with value, ready to be inserted into a FlagStore.

Link copied to clipboard
open fun toPair(): Pair<String, Term>

This flag's name paired with its defaultValue, ready to be inserted into a FlagStore.