Node State Diagrams

19 Mar 2024

These illustrations describe the node state transition semantics of PLEXIL nodes for PLEXIL releases 4.x.

INACTIVE state

Nodes of all types in the INACTIVE state behave as follows.

../_images/Inactive-plexil4.png

WAITING state

There is a small but significant difference in the transition semantics for the WAITING state between Plexil 4 and Plexil 6. In Plexil 4, the node’s Exit Condition is checked in this state, and transitions the node to FINISHED if true.

../_images/Waiting-plexil4.png

Waiting state for all node types in Plexil 4

In Plexil 6, the Exit Condition is not checked when the node is waiting; this was actually the intended semantics when the Exit Condition was introduced.

../_images/Waiting-plexil6.png

Waiting state for all node types in Plexil 6

EXECUTING state

EXECUTING - Empty nodes

Empty nodes transition directly to ITERATION_ENDED when their ExitCondition becomes true, or to FINISHED if some ancestor’s becomes true.

../_images/Executing_Empty_nodes_with_Exit_condition.png

EXECUTING - Assignment nodes

Assignment nodes transition to FAILING and restore the variable’s previous value if their or some ancestor’s ExitCondition becomes true, or their or some ancestor’s InvariantCondition becomes false. Otherwise Assignment nodes transition to ITERATION_ENDED when the ExitCondition becomes true; the PostCondition determines the outcome.

../_images/Executing-Assignment-plexil4.png

EXECUTING - Command nodes

Command nodes transition to FINISHING in the nominal case. In the event of an ExitCondition true or InvariantCondition false, they transition to FAILING to abort the command.

Note that the supplied EndCondition is ORed with (command_handle == COMMAND_DENIED || command_handle == COMMAND_FAILED) . This allows the node to transition in the event the resource arbiter rejects the command.

../_images/Executing_Command_with_Exit_and_FINISHING.png

EXECUTING - Update nodes

Update nodes behave similarly to Assignment nodes.

Note that the supplied EndCondition is ANDed with update-complete.

../_images/Executing_Update_with_Exit_condition.png

EXECUTING - NodeList and LibraryNodeCall nodes

NodeList and LibraryNodeCall nodes transition to FAILING if their or some ancestor’s ExitCondition becomes true.

Note that the default EndCondition for these node types is all children in FINISHED state.

../_images/Executing_List_nodes_with_Exit_condition.png

FINISHING state

In general, the FINISHING state waits for completion of actions that may take an indeterminate time. If the node fails while waiting for completion, it transitions to FAILING.

FINISHING - Command nodes

../_images/Finishing_Command_with_Exit_condition.png

FINISHING - NodeList and LibraryNodeCall nodes

../_images/Finishing_with_Exit_condition.png

FAILING state

In general, FAILING is used to finish recovery from an abnormal situation.

FAILING - Assignment nodes

Assignment nodes simply transition to FINISHED or ITERATION_ENDED as appropriate. The variable has already been restored to its previous value on the transition into FAILING.

Note that the previous as-implemented behavior was to assign UNKNOWN in the event of a failure. The entire team agrees that restoring the previous value is preferable.

../_images/Failing-Assignment-plexil4.png

FAILING - Command nodes

Command nodes abort the command, wait for the abort to complete, then transition to FINISHED or ITERATION_ENDED as appropriate.

../_images/Failing-Command-plexil4.png

FAILING - Update nodes

Update nodes simply wait for the update to complete, then transition to FINISHED or ITERATION_ENDED as appropriate.

../_images/Failing-Update-plexil4.png

FAILING - NodeList and LibraryNodeCall nodes

NodeList and LibraryNodeCall nodes wait for all children to achieve either the WAITING or FINISHED state before transitioning to FINISHED or ITERATION_ENDED.

../_images/Failing_List_node_with_Exit_condition.png

ITERATION_ENDED state

ITERATION_ENDED transitions directly to FINISHED if an ancestor’s ExitCondition becomes true.

../_images/Iteration_Ended_with_Exit_condition.png

FINISHED state

The Finished state is unchanged from the specification and previous implemented behavior.

../_images/Finished_Revised.png