abstractions

package
v2.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 6, 2023 License: MIT Imports: 0 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AcceptClauseLike

type AcceptClauseLike interface {
	GetMessage() Expression
	SetMessage(message Expression)
}

type Accessible

type Accessible[V Value] interface {
	GetValue(index int) V
	GetValues(first int, last int) Sequential[V]
}

This interface defines the methods supported by all sequences whose values can be accessed using indices. The indices of an accessible sequence are ORDINAL rather than ZERO based (which is "SO last century"). This allows for positive indices starting at the beginning of the sequence, and negative indices starting at the end of the sequence as follows:

    1           2           3             N
[value 1] . [value 2] . [value 3] ... [value N]
   -N        -(N-1)      -(N-2)          -1

Notice that because the indices are ordinal based, the positive and negative indices are symmetrical.

type AngleLike

type AngleLike interface {
	Continuous
}

type Annotation

type Annotation any

type AssociationIteratorLike

type AssociationIteratorLike interface {
	Ratcheted[AssociationLike]
}

type AssociationLike

type AssociationLike interface {
	Binding[Primitive, ComponentLike]
}

type AssociationsLike added in v2.1.0

type AssociationsLike interface {
	Sequential[AssociationLike]
}

type Associative

type Associative[K Key, V Value] interface {
	GetKeys() Sequential[K]
	GetValues(keys Sequential[K]) Sequential[V]
	GetValue(key K) V
	SetValue(key K, value V)
	RemoveValue(key K) V
	RemoveValues(keys Sequential[K]) Sequential[V]
	RemoveAll()
}

This interface defines the methods supported by all associative sequences whose values consist of key-value pair associations.

type AttributeLike

type AttributeLike interface {
	GetVariable() string
	SetVariable(variable string)
	GetIndices() Sequential[Expression]
	SetIndices(indices Sequential[Expression])
}

type BinaryLike

type BinaryLike interface {
	Lexical
	Sequential[byte]
	Accessible[byte]
}

type BinaryOperationLike added in v2.1.0

type BinaryOperationLike interface {
	GetFirst() Expression
	SetFirst(first Expression)
	GetOperator() Operator
	SetOperator(operator Operator)
	GetSecond() Expression
	SetSecond(second Expression)
}

type Binding

type Binding[K Key, V Value] interface {
	GetKey() K
	GetValue() V
	SetValue(value V)
}

This interface defines the methods supported by all binding types. It binds a readonly key with a setable value.

type BlockLike

type BlockLike interface {
	GetExpression() Expression
	SetExpression(expression Expression)
	GetProcedure() ProcedureLike
	SetProcedure(procedure ProcedureLike)
}

type BooleanLike

type BooleanLike interface {
	Discrete
}

type Bounded

type Bounded[V Primitive] interface {
	GetFirst() V
	SetFirst(value V)
	GetExtent() Extent
	SetExtent(extent Extent)
	GetLast() V
	SetLast(value V)
}

This interface defines the methods supported by all ranges of primitive values that allow their endpoints to be changed. The type is parameterized to force the first and last endpoint values to be the same type.

type BreakClauseLike

type BreakClauseLike interface {
}

type ByteIteratorLike

type ByteIteratorLike interface {
	Ratcheted[byte]
}

type BytecodeLike

type BytecodeLike interface {
	Lexical
	Sequential[Instruction]
	Accessible[Instruction]
}

type CharacterLike added in v2.1.0

type CharacterLike interface {
	Discrete
}

type CheckoutClauseLike

type CheckoutClauseLike interface {
	GetRecipient() Recipient
	SetRecipient(recipient Recipient)
	GetLevel() Expression
	SetLevel(level Expression)
	GetMoniker() Expression
	SetMoniker(moniker Expression)
}

type Clause

type Clause any

type Collection

type Collection any

type CommentLike

type CommentLike interface {
	Sequential[string]
}

type Complex

type Complex interface {
	AsComplex() complex128
	GetReal() float64
	GetImaginary() float64
	GetMagnitude() float64
	GetPhase() AngleLike
}

type ComponentIteratorLike

type ComponentIteratorLike interface {
	Ratcheted[ComponentLike]
}

type ComponentLike

type ComponentLike interface {
	Encapsulated
}

type ConfiguratorLike

type ConfiguratorLike interface {
	Custodial
}

type ContextLike

type ContextLike interface {
	Sequential[ParameterLike]
	Associative[SymbolLike, ComponentLike]
}

type ContinueClauseLike

type ContinueClauseLike interface {
}

type Continuous

type Continuous interface {
	AsReal() float64
	IsZero() bool
	IsInfinite() bool
	IsUndefined() bool
}

type ContinuumLike

type ContinuumLike interface {
	Bounded[Continuous]
	Searchable[Continuous]
}

type ControllerLike

type ControllerLike interface {
	Mechanized
}

type Custodial

type Custodial interface {
	Exists() bool
	Load() []byte
	Store(configuration []byte)
	Delete()
}

type DiscardClauseLike

type DiscardClauseLike interface {
	GetDocument() Expression
	SetDocument(document Expression)
}

type Discrete

type Discrete interface {
	AsBoolean() bool
	AsInteger() int
}

type DurationLike

type DurationLike interface {
	Discrete
	Polarized
	Temporal
}

type Element

type Element any

type Encapsulated

type Encapsulated interface {
	IsParameterized() bool
	GetContext() ContextLike
	SetContext(context ContextLike)
	IsAnnotated() bool
	GetNote() NoteLike
	SetNote(note NoteLike)
	GetEntity() Entity
	SetEntity(entity Entity)
	ExtractAngle() AngleLike
	ExtractBinary() BinaryLike
	ExtractBoolean() BooleanLike
	ExtractCatalog() CatalogLike
	ExtractContinuum() ContinuumLike
	ExtractDuration() DurationLike
	ExtractInterval() IntervalLike
	ExtractList() ListLike
	ExtractMoment() MomentLike
	ExtractMoniker() MonikerLike
	ExtractNarrative() NarrativeLike
	ExtractNumber() NumberLike
	ExtractPattern() PatternLike
	ExtractPercentage() PercentageLike
	ExtractProbability() ProbabilityLike
	ExtractProcedure() ProcedureLike
	ExtractQueue() QueueLike
	ExtractQuote() QuoteLike
	ExtractResource() ResourceLike
	ExtractSet() SetLike
	ExtractSpectrum() SpectrumLike
	ExtractStack() StackLike
	ExtractSymbol() SymbolLike
	ExtractTag() TagLike
	ExtractVersion() VersionLike
}

type Entity

type Entity any

type Expression

type Expression any

type Extent

type Extent int
const (
	INCLUSIVE Extent
	LEFT
	RIGHT
	EXCLUSIVE
)

This type and its associated constants define whether or not each endpoint in a bounded collection is included in the range of possible values.

type FIFO

type FIFO[V Value] interface {
	GetCapacity() int
	AddValue(value V)
	RemoveHead() (head V, ok bool)
	CloseQueue()
}

This interface defines the methods supported by all sequences whose values are accessed using first-in-first-out (FIFO) semantics.

type Flexible

type Flexible[V Value] interface {
	AddValue(value V)
	AddValues(values Sequential[V])
	RemoveValue(value V)
	RemoveValues(values Sequential[V])
	RemoveAll()
}

This interface defines the methods supported by all sequences of values that allow values to be added and removed.

type IfClauseLike

type IfClauseLike interface {
	GetBlock() BlockLike
	SetBlock(block BlockLike)
}

type Instruction

type Instruction uint16

func InstructionFromBytes

func InstructionFromBytes(leftByte, rightByte byte) Instruction

func (Instruction) GetLeftByte

func (v Instruction) GetLeftByte() byte

func (Instruction) GetRightByte

func (v Instruction) GetRightByte() byte

type InstructionIteratorLike

type InstructionIteratorLike interface {
	Ratcheted[Instruction]
}

type IntegerLike

type IntegerLike interface {
	Discrete
	Polarized
}

type IntrinsicLike

type IntrinsicLike interface {
	GetFunction() string
	SetFunction(function string)
	GetArguments() Sequential[Expression]
	SetArguments(arguments Sequential[Expression])
}

type InvocationLike

type InvocationLike interface {
	IsSynchronous() bool
	GetTarget() Expression
	SetTarget(target Expression)
	GetOperator() Operator
	SetOperator(operator Operator)
	GetMethod() string
	SetMethod(method string)
	GetArguments() Sequential[Expression]
	SetArguments(arguments Sequential[Expression])
}

type Key

type Key any

type LIFO

type LIFO[V Value] interface {
	GetCapacity() int
	AddValue(value V)
	GetTop() V
	RemoveTop() V
	RemoveAll()
}

This interface defines the methods supported by all sequences whose values are accessed using last-in-first-out (LIFO) semantics.

type LetClauseLike

type LetClauseLike interface {
	HasRecipient() bool
	GetRecipient() (Recipient, Operator)
	SetRecipient(recipient Recipient, operator Operator)
	GetExpression() Expression
	SetExpression(expression Expression)
}

type Lexical

type Lexical interface {
	AsString() string
}

type Line

type Line string

type LineIteratorLike

type LineIteratorLike interface {
	Ratcheted[Line]
}

type Malleable

type Malleable[V Value] interface {
	AddValue(value V)
	AddValues(values Sequential[V])
	InsertValue(slot int, value V)
	InsertValues(slot int, values Sequential[V])
	RemoveValue(index int) V
	RemoveValues(first int, last int) Sequential[V]
	RemoveAll()
}

This interface defines the methods supported by all indexed sequences whose values may be added, inserted, or removed.

type Matchable

type Matchable interface {
	MatchesText(text string) bool
	GetMatches(text string) []string
}

type Mechanized

type Mechanized interface {
	GetState() int
	SetState(state int)
	TransitionState(event int) int
}

type MomentLike

type MomentLike interface {
	Discrete
	Temporal
}

type MonikerLike

type MonikerLike interface {
	Lexical
	Sequential[Name]
	Accessible[Name]
}

type Name

type Name string

type NameIteratorLike

type NameIteratorLike interface {
	Ratcheted[Name]
}

type NarrativeLike

type NarrativeLike interface {
	Lexical
	Sequential[Line]
	Accessible[Line]
}

type NotarizeClauseLike

type NotarizeClauseLike interface {
	GetDocument() Expression
	SetDocument(document Expression)
	GetMoniker() Expression
	SetMoniker(moniker Expression)
}

type NoteLike

type NoteLike interface {
	Sequential[rune]
}

type NumberLike

type NumberLike interface {
	Continuous
	Polarized
	Complex
}

type OnClauseLike

type OnClauseLike interface {
	GetFailure() SymbolLike
	SetFailure(failure SymbolLike)
	GetBlocks() Sequential[BlockLike]
	SetBlocks(blocks Sequential[BlockLike])
}

type Operator

type Operator int
const (
	ASSIGN     Operator // :=
	DEFAULT             // ?=
	SUM                 // +=
	DIFFERENCE          // -=
	PRODUCT             // *=
	QUOTIENT            // /=
	DOT                 // .
	ARROW               // <-
	AMPERSAND           // &
	AT                  // @
	BAR                 // |
	TILDA               // ~
	PLUS                // +
	MINUS               // -
	STAR                // *
	SLASH               // /
	MODULO              // //
	CARET               // ^
	LESS                // <
	EQUAL               // =
	UNEQUAL             // ≠
	MORE                // >
	IS                  // IS
	MATCHES             // MATCHES
	NOT                 // NOT
	AND                 // AND
	SANS                // SANS
	OR                  // OR
	XOR                 // XOR
	MAGNITUDE           // | |
	PRECEDENCE          // ( )
)

type Ordinal

type Ordinal uint

type OrdinalIteratorLike

type OrdinalIteratorLike interface {
	Ratcheted[Ordinal]
}

type ParameterIteratorLike added in v2.1.0

type ParameterIteratorLike interface {
	Ratcheted[ParameterLike]
}

type ParameterLike

type ParameterLike interface {
	Binding[SymbolLike, ComponentLike]
}

type PatternLike

type PatternLike interface {
	Lexical
	Matchable
}

type PercentageLike

type PercentageLike interface {
	Discrete
	Continuous
	Polarized
}

type Polarized

type Polarized interface {
	IsNegative() bool
}

type PostClauseLike

type PostClauseLike interface {
	GetMessage() Expression
	SetMessage(message Expression)
	GetBag() Expression
	SetBag(bag Expression)
}

type Primitive

type Primitive any

type ProbabilityLike

type ProbabilityLike interface {
	Discrete
	Continuous
}

type ProcedureLike

type ProcedureLike interface {
	Sequential[StatementLike]
}

type PublishClauseLike

type PublishClauseLike interface {
	GetEvent() Expression
	SetEvent(event Expression)
}

type QueueLike

type QueueLike interface {
	Sequential[ComponentLike]
	FIFO[ComponentLike]
}

type QuoteLike

type QuoteLike interface {
	Lexical
	Sequential[rune]
	Accessible[rune]
}

type Range

type Range any

type Ratcheted

type Ratcheted[V Value] interface {
	GetSlot() int
	ToSlot(slot int)
	ToStart()
	ToEnd()
	HasPrevious() bool
	GetPrevious() V
	HasNext() bool
	GetNext() V
}

This interface defines the methods supported by all ratcheted agents that are capable of moving forward and backward over the values in a sequence. It is used to implement the GoF Iterator Pattern:

A ratcheted agent locks into the slots that reside between each value in the sequence:

    [value 1] . [value 2] . [value 3] ... [value N]
  ^           ^           ^                         ^
slot 0      slot 1      slot 2                    slot N

It moves from slot to slot and has access to the values (if they exist) on each side of the slot.

type RealLike

type RealLike interface {
	Continuous
	Polarized
}

type Recipient

type Recipient any

type RejectClauseLike

type RejectClauseLike interface {
	GetMessage() Expression
	SetMessage(message Expression)
}

type ResourceLike

type ResourceLike interface {
	Lexical
	Segmented
}

type RetrieveClauseLike

type RetrieveClauseLike interface {
	GetRecipient() Recipient
	SetRecipient(recipient Recipient)
	GetBag() Expression
	SetBag(bag Expression)
}

type ReturnClauseLike

type ReturnClauseLike interface {
	GetResult() Expression
	SetResult(result Expression)
}

type RuneIteratorLike

type RuneIteratorLike interface {
	Ratcheted[rune]
}

type SaveClauseLike

type SaveClauseLike interface {
	GetDocument() Expression
	SetDocument(document Expression)
	GetRecipient() Recipient
	SetRecipient(recipient Recipient)
}

type Searchable

type Searchable[V Value] interface {
	GetIndex(value V) int
	ContainsValue(value V) bool
	ContainsAny(values Sequential[V]) bool
	ContainsAll(values Sequential[V]) bool
}

This interface defines the methods supported by all searchable sequences of values.

type Segmented

type Segmented interface {
	GetScheme() string
	GetAuthority() string
	GetPath() string
	GetQuery() string
	GetFragment() string
}

type SelectClauseLike

type SelectClauseLike interface {
	GetTarget() Expression
	SetTarget(control Expression)
	GetBlocks() Sequential[BlockLike]
	SetBlocks(blocks Sequential[BlockLike])
}

type Sequential

type Sequential[V Value] interface {
	IsEmpty() bool
	GetSize() int
	AsArray() []V
}

type Sortable

type Sortable[V Value] interface {
	SortValues()
	ReverseValues()
	ShuffleValues()
}

This interface defines the methods supported by all sequences whose values may be sorted using various sorting algorithms.

type SpectrumLike

type SpectrumLike interface {
	Bounded[Lexical]
	Searchable[Lexical]
}

type StackLike

type StackLike interface {
	Sequential[ComponentLike]
	LIFO[ComponentLike]
}

type StatementLike

type StatementLike interface {
	GetAnnotation() Annotation
	SetAnnotation(annotation Annotation)
	GetMainClause() Clause
	SetMainClause(mainClause Clause)
	GetOnClause() OnClauseLike
	SetOnClause(onClause OnClauseLike)
	GetNote() NoteLike
	SetNote(note NoteLike)
}

type String

type String any

type SubcomponentLike

type SubcomponentLike interface {
	GetComposite() Expression
	SetComposite(composite Expression)
	GetIndices() Sequential[Expression]
	SetIndices(indices Sequential[Expression])
}

type SymbolLike

type SymbolLike interface {
	Lexical
	Sequential[rune]
}

type TagLike

type TagLike interface {
	Lexical
	Sequential[byte]
}

type Temporal

type Temporal interface {
	// Return the entire time in specific units.
	AsMilliseconds() float64
	AsSeconds() float64
	AsMinutes() float64
	AsHours() float64
	AsDays() float64
	AsWeeks() float64
	AsMonths() float64
	AsYears() float64

	// Return a specific part of the entire time.
	GetMilliseconds() int
	GetSeconds() int
	GetMinutes() int
	GetHours() int
	GetDays() int
	GetWeeks() int
	GetMonths() int
	GetYears() int
}

type ThrowClauseLike

type ThrowClauseLike interface {
	GetException() Expression
	SetException(exception Expression)
}

type UnaryOperationLike added in v2.1.0

type UnaryOperationLike interface {
	GetOperator() Operator
	SetOperator(operator Operator)
	GetExpression() Expression
	SetExpression(expression Expression)
}

type Updatable

type Updatable[V Value] interface {
	SetValue(index int, value V)
	SetValues(index int, values Sequential[V])
}

This interface defines the methods supported by all updatable sequences of values.

type Value

type Value any

type ValueLike added in v2.2.0

type ValueLike interface {
	GetComponent() ComponentLike
	SetComponent(component ComponentLike)
}

type ValuesLike added in v2.1.0

type ValuesLike interface {
	Sequential[ComponentLike]
}

type VariableLike

type VariableLike interface {
	GetIdentifier() string
	SetIdentifier(identifier string)
}

type VersionLike

type VersionLike interface {
	Lexical
	Sequential[Ordinal]
	Accessible[Ordinal]
}

type WhileClauseLike

type WhileClauseLike interface {
	GetBlock() BlockLike
	SetBlock(block BlockLike)
}

type WithClauseLike

type WithClauseLike interface {
	GetItem() SymbolLike
	SetItem(item SymbolLike)
	GetBlock() BlockLike
	SetBlock(block BlockLike)
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL