public class RelationWidthInference
extends java.lang.Object
Constructor and Description |
---|
RelationWidthInference(CompositeActor topLevel)
Create RelationWidthInference, the algorithm for width inference.
|
Modifier and Type | Method and Description |
---|---|
protected static java.util.Set<IORelation> |
_relationsWithUnspecifiedWidths(java.util.List<?> relationList)
Filter the relations for which the width still has to be inferred.
|
boolean |
inferringWidths()
Determine whether widths are currently being inferred or not.
|
void |
inferWidths()
Infer the width of the relations for which no width has been
specified yet.
|
boolean |
needsWidthInference()
Return whether the current widths of the relation in the model
are no longer valid anymore and the widths need to be inferred again.
|
void |
notifyConnectivityChange()
Notify the width inference algorithm that the connectivity in the model changed
(width of relation changed, relations added, linked to different ports, ...).
|
public RelationWidthInference(CompositeActor topLevel)
topLevel
- The top level CompositeActor.java.lang.IllegalArgumentException
- If the specified actor is not the
top level container. That is, its container is not null.public boolean inferringWidths()
public void inferWidths() throws IllegalActionException
IllegalActionException
- If the widths of the relations at port are not consistent
or if the width cannot be inferred for a relation.public boolean needsWidthInference()
public void notifyConnectivityChange()
protected static java.util.Set<IORelation> _relationsWithUnspecifiedWidths(java.util.List<?> relationList) throws IllegalActionException
relationList
- The relations that need to be filtered.IllegalActionException
- If the expression for the width cannot
be parsed or cannot be evaluated, or if the result of evaluation
violates type constraints, or if the result of evaluation is null
and there are variables that depend on this one.