Lattice
BoundedLattice
Bases: Lattice[BoundedLatticeType]
flowchart TD
kirin.lattice.abc.BoundedLattice[BoundedLattice]
kirin.lattice.abc.Lattice[Lattice]
kirin.lattice.abc.Lattice --> kirin.lattice.abc.BoundedLattice
click kirin.lattice.abc.BoundedLattice href "" "kirin.lattice.abc.BoundedLattice"
click kirin.lattice.abc.Lattice href "" "kirin.lattice.abc.Lattice"
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]
flowchart TD
kirin.lattice.abc.Lattice[Lattice]
click kirin.lattice.abc.Lattice href "" "kirin.lattice.abc.Lattice"
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_structurally_equal
is_structurally_equal(
other: LatticeType, context: dict | None = None
) -> bool
Check if two lattices are equal.
Source code in src/kirin/lattice/abc.py
52 53 54 55 56 57 58 59 | |
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
flowchart TD
kirin.lattice.abc.SingletonMeta[SingletonMeta]
kirin.lattice.abc.LatticeMeta[LatticeMeta]
kirin.lattice.abc.LatticeMeta --> kirin.lattice.abc.SingletonMeta
click kirin.lattice.abc.SingletonMeta href "" "kirin.lattice.abc.SingletonMeta"
click kirin.lattice.abc.LatticeMeta href "" "kirin.lattice.abc.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
flowchart TD
kirin.lattice.abc.UnionMeta[UnionMeta]
kirin.lattice.abc.LatticeMeta[LatticeMeta]
kirin.lattice.abc.LatticeMeta --> kirin.lattice.abc.UnionMeta
click kirin.lattice.abc.UnionMeta href "" "kirin.lattice.abc.UnionMeta"
click kirin.lattice.abc.LatticeMeta href "" "kirin.lattice.abc.LatticeMeta"
Meta class for union types. It simplifies the union if possible.
Source code in src/kirin/lattice/abc.py
95 96 97 98 99 | |