OperatorSet

class OperatorSet(operators: Sequence<Operator>) : Set<Operator>

An immutable Set of Operators, used by pretty-printing/parsing code (e.g. TermFormatter.prettyExpressions) to know which functors should be rendered/read as prefix, infix, or postfix expressions. DEFAULT (same as STANDARD) bundles the usual arithmetic, comparison, and control-flow operators; plus/minus let a program layer its own operators on top of (or remove some from) an existing set without mutating it.

Constructors

Link copied to clipboard
constructor(operators: Sequence<Operator>)
constructor(vararg operator: Operator)
constructor(operators: Iterable<Operator>)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
open override val size: Int

Functions

Link copied to clipboard
open operator override fun contains(element: Operator): Boolean
Link copied to clipboard
open override fun containsAll(elements: Collection<Operator>): Boolean
Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
open override fun isEmpty(): Boolean
Link copied to clipboard
open operator override fun iterator(): Iterator<Operator>
Link copied to clipboard
operator fun minus(operator: Operator): OperatorSet
operator fun minus(other: OperatorSet): OperatorSet

Creates a new OperatorSet removing from this the other operators

Link copied to clipboard
operator fun plus(operator: Operator): OperatorSet

Creates a new OperatorSet adding to this the other Operator, overriding already present operator if one

operator fun plus(other: OperatorSet): OperatorSet

Creates a new OperatorSet adding to this the other operators, overriding already present operators

Link copied to clipboard

Builds an OperatorsIndex out of this collection of Operators, for fast functor/specifier lookups.

Link copied to clipboard
open override fun toString(): String
Link copied to clipboard

Converts this Iterable of Terms into a logic List. Shorthand for List.of.