View source on GitHub |
Base interface for objects used during propagation.
Inherits From: Pytree
oryx.core.interpreters.propagate.Cell(
aval
)
A Cell represents a member of a lattice, defined by the top
, bottom
and join
methods. Conceptually, a "top" cell represents complete information
about a value and a "bottom" cell represents no information about a value.
Cells that are neither top nor bottom thus have partial information.
The join
method is used to combine two cells to create a cell no less than
the two input cells. During the propagation, we hope to join cells until
all cells are "top".
Transformations that use propagate need to pass in objects that are Cell-like.
A Cell needs to specify how to create a new default cell from a literal value,
using the new
class method. A Cell also needs to indicate if it is a known
value with the is_unknown
method, but by default, Cells are known.
Attributes | |
---|---|
ndim
|
|
shape
|
Methods
bottom
bottom() -> bool
flatten
@abc.abstractmethod
flatten()
is_unknown
is_unknown()
join
join(
other: 'Cell'
) -> 'Cell'
new
@classmethod
new( value )
Creates a new instance of a Cell from a value.
top
top() -> bool
unflatten
@classmethod
@abc.abstractmethod
unflatten( data, xs )
unknown
@classmethod
unknown( aval )
Creates an unknown Cell from an abstract value.
__lt__
__lt__(
other: Any
) -> bool
Return self<value.