|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectptolemy.kernel.util.NamedObj
ptolemy.kernel.Relation
ptolemy.kernel.ComponentRelation
ptolemy.domains.fsm.kernel.Transition
ptolemy.domains.fsm.kernel.ia.InterfaceAutomatonTransition
public class InterfaceAutomatonTransition
A Transition for Interface Automaton. In the Interface Automata paper written by Luca de Alfaro and Henzinger, transitions are called actions. However, the name action conflicts with the Action class in this package, so this class uses the name transition. There are three types of transitions: input, output, and internal. Each transition has a label. The labels for input, output, and internal transitions end with "?", "!", and ";", respectively. The type of transition is determined by the ending character of the label this way. Each input transition corresponds to an input port of the InterfaceAutomaton that contains it, and its label, excluding the ending "?", must be the same as the input port name; Similarly, each output transition corresponds to an output port, and its label, excluding the ending "!", must be the same as the output port name; Each internal transitions corresponds to a parameter of the InterfaceAutomaton that contains it, and its label, excluding the ending ";", must be the same as the parameter name.
The guard of each transition is set automatically. Users should not set the guard. For an input transition, the guard is set to <inputPort> _isPresent, where <inputPort> is the port corresponding to this transition; For output and internal transitions, the guard is set to true. Each of the output and internal transitions contain an Action. The expression of the Action is also set automatically. For output transition, the action is set to <outputPort>=true, where <outputPort> is the output port corresponding to this transition; for internal transition, the action is set to <parameter>=true, where <parameter> is the parameter corresponding to this transition.
InterfaceAutomaton
,
Action
,
Serialized Form
Red (yuhong) |
Red (yuhong) |
Nested Class Summary |
---|
Nested classes/interfaces inherited from class ptolemy.kernel.util.NamedObj |
---|
NamedObj.ContainedObjectsIterator |
Field Summary | |
---|---|
protected static int |
_INPUT_TRANSITION
The input transition type. |
protected static int |
_INTERNAL_TRANSITION
The internal transition type. |
protected static int |
_OUTPUT_TRANSITION
The output transition type. |
StringAttribute |
label
The label of this transition. |
Fields inherited from class ptolemy.domains.fsm.kernel.Transition |
---|
annotation, defaultTransition, exitAngle, gamma, guardExpression, nondeterministic, outputActions, preemptive, refinementName, reset, setActions |
Fields inherited from class ptolemy.kernel.Relation |
---|
_linkList |
Fields inherited from class ptolemy.kernel.util.NamedObj |
---|
_changeListeners, _changeLock, _changeRequests, _debugging, _debugListeners, _elementName, _isPersistent, _verbose, _workspace, ATTRIBUTES, CLASSNAME, COMPLETE, CONTENTS, DEEP, FULLNAME, LINKS |
Constructor Summary | |
---|---|
InterfaceAutomatonTransition(InterfaceAutomaton container,
java.lang.String name)
Construct a transition with the specified container and name. |
Method Summary | |
---|---|
void |
attributeChanged(Attribute attribute)
React to a change in an attribute. |
java.lang.String |
getLabel()
Return the label of this transition. |
int |
getType()
Return the transition type. |
void |
setContainer(CompositeEntity container)
Override the base class to ensure that the proposed container is an instance of InterfaceAutomaton or null. |
void |
setTriggerExpression(java.lang.String expression)
Throw an exception. |
Methods inherited from class ptolemy.domains.fsm.kernel.Transition |
---|
_checkPort, choiceActionList, clone, commitActionList, destinationState, getGuardExpression, getParseTreeEvaluator, getRefinement, isDefault, isEnabled, isEnabled, isNondeterministic, isPreemptive, setGuardExpression, sourceState |
Methods inherited from class ptolemy.kernel.ComponentRelation |
---|
_checkContainer, _checkRelation, _propagateExistence, deepLinkedPortList, deepLinkedPorts, getContainer, moveDown, moveToFirst, moveToIndex, moveToLast, moveUp, setName, unlinkAll |
Methods inherited from class ptolemy.kernel.Relation |
---|
_description, _getContainedObject, link, linkedObjectsList, linkedPortList, linkedPortList, linkedPorts, linkedPorts, numLinks, relationGroupList, unlink |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public StringAttribute label
protected static final int _INPUT_TRANSITION
protected static final int _OUTPUT_TRANSITION
protected static final int _INTERNAL_TRANSITION
Constructor Detail |
---|
public InterfaceAutomatonTransition(InterfaceAutomaton container, java.lang.String name) throws IllegalActionException, NameDuplicationException
container
- An interface automaton.name
- The name of this transition.
IllegalActionException
- If the container is incompatible
with this transition.
NameDuplicationException
- If the name coincides with
any relation already in the container.Method Detail |
---|
public void attributeChanged(Attribute attribute) throws IllegalActionException
attributeChanged
in class Transition
attribute
- The attribute that changed.
IllegalActionException
- If thrown by the superclass
attributeChanged() method, or the changed attribute is
label and it does not ends with "?" or "!" or ";".public java.lang.String getLabel()
getLabel
in class Transition
public int getType()
public void setContainer(CompositeEntity container) throws IllegalActionException, NameDuplicationException
setContainer
in class Transition
container
- The proposed container.
IllegalActionException
- If setting the container would
result in a recursive containment structure, or if
this transition and container are not in the same workspace, or
if the argument is not an InterfaceAutomaton or null.
NameDuplicationException
- If the container already has
an relation with the name of this transition.ComponentRelation.getContainer()
public void setTriggerExpression(java.lang.String expression)
expression
- The trigger expression.
java.lang.UnsupportedOperationException
- Always thrown.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |