A complete lattice with a partially ordered set, join operator (LUB), meet operator (GLB), top element, and bottom element (e.g. for abstract domains).

interface Lattice<
    Value,
    Top = typeof Top,
    Bot = typeof Bottom,
    Lift extends Value | Top | Bot = Value | Top | Bot,
> {
    bottom(): Lattice<Value, Top, Bot, Bot>;
    equals(other: Lattice<Value, Top, Bot>): boolean;
    isBottom(): this is Lattice<Value, Top, Bot, Bot>;
    isTop(): this is Lattice<Value, Top, Bot, Top>;
    isValue(): this is Lattice<Value, Top, Bot, Value>;
    join(
        ...values: Lattice<Value, Top, Bot, Value | Top | Bot>[],
    ): Lattice<Value, Top, Bot>;
    leq(other: Lattice<Value, Top, Bot>): boolean;
    meet(
        ...values: Lattice<Value, Top, Bot, Value | Top | Bot>[],
    ): Lattice<Value, Top, Bot>;
    top(): Lattice<Value, Top, Bot, Top>;
    toString(): string;
    get value(): Lift;
}

Type Parameters

  • Value

    Type of a lattice element representing a value (may exclude Top and Bot)

  • Top = typeof Top

    Type of the Top element (greatest element) of the complete lattice (defaults to Top)

  • Bot = typeof Bottom

    Type of the Bottom element (least element) of the complete lattice (defaults to Bottom)

  • Lift extends Value | Top | Bot = Value | Top | Bot

    Type of the lattice elements (defaults to Value or Top or Bot)

Hierarchy (View Summary)

Hierarchy-Diagram

UML class diagram of Lattice

Accessors

Methods