Lattice
BoundedLattice
Bases: Lattice[BoundedLatticeType]
ABC for bounded lattices as Python class.
BoundedLattice
is an abstract class that can be inherited from. It requires the implementation of the bottom
and top
methods.
Lattice
Bases: ABC
, Generic[LatticeType]
ABC for lattices as Python class.
While Lattice
is only an interface, LatticeABC
is an abstract class that can be inherited from. This provides a few default implementations for the lattice operations.
is_equal
is_equal(other: LatticeType) -> bool
Check if two lattices are equal.
Source code in src/kirin/lattice/abc.py
52 53 54 55 56 57 |
|
is_subseteq abstractmethod
is_subseteq(other: LatticeType) -> bool
Subseteq operation.
Source code in src/kirin/lattice/abc.py
47 48 49 50 |
|
join abstractmethod
join(other: LatticeType) -> LatticeType
Join operation.
Source code in src/kirin/lattice/abc.py
37 38 39 40 |
|
meet abstractmethod
meet(other: LatticeType) -> LatticeType
Meet operation.
Source code in src/kirin/lattice/abc.py
42 43 44 45 |
|
SingletonMeta
SingletonMeta(name, bases, attrs)
Bases: LatticeMeta
Singleton metaclass for lattices. It ensures that only one instance of a lattice is created.
See https://stackoverflow.com/questions/674304/why-is-init-always-called-after-new/8665179#8665179
Source code in src/kirin/lattice/abc.py
16 17 18 |
|
UnionMeta
UnionMeta(name, bases, attrs)
Bases: LatticeMeta
Meta class for union types. It simplifies the union if possible.
Source code in src/kirin/lattice/abc.py
93 94 95 96 97 |
|