LatticeElement

abstract class LatticeElement<T>(val elements: T) : Comparable<LatticeElement<T>>

A complete lattice is an ordered structure of values of type T. T could be anything, e.g., a set, a new data structure (like a range), or anything else. T depends on the analysis and typically has to abstract the value for the specific purpose.

This class is actually used to hold individual instances of the lattice's elements and to compute bigger elements depending on these two elements.

Implementations of this class have to implement the comparator, the least upper bound of two lattices.

Inheritors

Constructors

Link copied to clipboard
constructor(elements: T)

Properties

Link copied to clipboard
open val elements: T

Functions

Link copied to clipboard
abstract operator fun compareTo(other: LatticeElement<T>): Int
Link copied to clipboard
abstract fun duplicate(): LatticeElement<T>

Duplicates the object, i.e., makes a deep copy.

Link copied to clipboard
abstract fun lub(other: LatticeElement<T>): LatticeElement<T>

Computes the least upper bound of this lattice and other. It returns a new object and does not modify either of the objects.