View Issue Details

IDProjectCategoryView StatusLast Update
000568310000-016: State MachinesApi Changepublic2021-01-12 18:17
ReporterWolfgang Mahnke Assigned ToWolfgang Mahnke  
PrioritynormalSeverityminorReproducibilityhave not tried
Status closedResolutionreopened 
Summary0005683: Clarification on Subtyping StateMachines
Description

Currently, there is a paragraph explaining special rules how to subtype a StateMachine:
---------------------->8------------------------------------------------------
B.4.18 Special Restrictions on subtyping StateMachines
In general, all rules on subtyping apply for StateMachine types as well. Some additional rules apply for StateMachine types. If a StateMachine type is not abstract, subtypes of it shall not change the behaviour of it. That means, that in this case a subtype shall not add States and it shall not add Transitions between its States. However, a subtype may add SubStateMachines, it may add Transitions from the States to the States of the SubStateMachine, and it may add Causes and Effects to a Transition. In addition, a subtype of a StateMachine type shall not remove States or Transitions.
---------------------8<-------------------------------------------------------
However, we have no example and it is not explained, what to do with the States and Transitions defined on the supertype (without ModellingRule) on the subtype?

My expectations (after all those years) had been, that I do not need to repeat them on the subtype. But that would make it hard / impossible to add new Causes and Effects, and also some constraints on HasSubstateMachine would not work (if you use only inverse references). In addition, the statement on removing states would not make sense.
So my current assumption is, that you have to repeat all states and transitions on the subtype.
It would be good to clarify the expected behaviour and also give an example.

TagsNo tags attached.
Commit Version
Fix Due Date

Activities

Reinhold.Dix

2020-06-23 09:43

reporter   ~0012493

Due to the complexity of FiniteStateMachine types, it shouldn't be necessary to duplicate all of the Base FSM type's States and Transitions in the subtype.
It should ruther be possible to use and override these nodes in the subtype.

The States and Transitions of a FSM being nodes without ModellingRules, paragraph 6.2.2 Instances without ModellingRules of Part 3 applies:
"If no ModellingRule exists then the Node is neither considered for instantiation of a type nor for subtyping.
...This Property would not be considered when creating instances of the type. This is also true for subtyping, that is, subtypes of the type definition would not inherit the referenced Node."
This definition makes much sense, e.g. for properties like the NodeVersion and it shouldn't be bend for State Machines.

Currently there are no rules defined for overriding nodes without ModellingRules.

As a consequence, there could be a suitable pair of ModellingRule/NamingRule defining that:
a) Nodes having this ModellingRule are not considered for instantiation, but they are considered for subtyping.
b) Subtypes of ObjectTypes (and VariableTypes) may override these nodes, in concrete terms a State Machine subtype can override a state and it may add SubStateMachines, Causes and Effects.

Since overriding is based on BrowseNames, the NamingRule shall not ignore the BrowseName. (This implies that the the NamingRule Constraint is not suitable.)

Wolfgang Mahnke

2020-09-29 16:25

developer   ~0013001

Discussed in phone call 2020-09-29.

Solution: Fix wording of reference type that it is allowed to reference the states of the supertype and add an example on how this is working.

Wolfgang Mahnke

2020-12-02 14:23

developer   ~0013355

Fixed in Draft3

Wolfgang Mahnke

2020-12-02 15:44

developer   ~0013358

The discussed solution works for adding SubStateMachines, but not for adding Effects and Causes to transitions (as currently defined in the spec).

Wolfgang Mahnke

2021-01-06 12:01

developer   ~0013500

Added description and example to Draft6 as discussed in WG meeting.

Jim Luth

2021-01-12 18:17

administrator   ~0013516

Agreed to changes in telecon.

Issue History

Date Modified Username Field Change
2020-06-03 13:01 Wolfgang Mahnke New Issue
2020-06-17 15:53 Jeff Harding Project 10000-005: Information Model => 10000-016: State Machines
2020-06-17 15:53 Jeff Harding Category Spec => Api Change
2020-06-23 09:43 Reinhold.Dix Note Added: 0012493
2020-07-07 16:48 Jim Luth Assigned To => Wolfgang Mahnke
2020-07-07 16:48 Jim Luth Status new => assigned
2020-09-29 16:25 Wolfgang Mahnke Note Added: 0013001
2020-12-02 14:23 Wolfgang Mahnke Status assigned => resolved
2020-12-02 14:23 Wolfgang Mahnke Resolution open => fixed
2020-12-02 14:23 Wolfgang Mahnke Note Added: 0013355
2020-12-02 15:44 Wolfgang Mahnke Status resolved => feedback
2020-12-02 15:44 Wolfgang Mahnke Resolution fixed => reopened
2020-12-02 15:44 Wolfgang Mahnke Note Added: 0013358
2020-12-02 15:45 Wolfgang Mahnke Status feedback => assigned
2021-01-06 12:01 Wolfgang Mahnke Status assigned => resolved
2021-01-06 12:01 Wolfgang Mahnke Note Added: 0013500
2021-01-12 18:17 Jim Luth Status resolved => closed
2021-01-12 18:17 Jim Luth Fixed in Version => 1.05
2021-01-12 18:17 Jim Luth Note Added: 0013516