Variability: Add Product-Line-Analysis to state automata
Constraints to be checked:
- All state automata variants have exactly one unique state automaton
Testing instructions:
- Open AF3 with at least the examples ACC, Simple Traffic Lights and the attached model.
- Observe: There are no errors wrt initial states in any project.
- In the Training_Assignment project, select the logical component Adaptive Cruise Control (Coordinator -> DA States -> Adaptive Cruise Control)
- Add a Presence Condition Driver_Assistance_ACC
- Open the state automaton in this component
- Try to declare two initial states and Observe is is not possible.
- Make shure ACC Off is the initial state again.
- Select the initial state ACC off and add a Presence Condition "Driver_Assistance_ACC"
- Select the state ACC On and make it also an initial state
- Save the model
- Observe: The tool allows a second initial state in case one of them is optional, but there is an error stating that the component has two initial states.
- Select the state ACC On and add a Presence Condition "NOT Driver_Assistance_ACC"
- Save the model
- Observe: The error is gone, since the initial states are now mutually exclusive.
- Add a Presence Condition "NOT Driver_Assistance_ACC" to the state Button unleashed and make it a third initial state.
- Save the model
- Observe: There is NO error found. (Rationale: With the Presence Condition "Driver_Assistance_ACC" on the parent component, non of the states with Presence Condition "NOT Driver_Assistance_ACC" can be in any variant.)
- Remove the initial state flag (i.e. the tick) from ACC off
- Save the model
- Observe: There is an error message, that thre is not always an initial state (Rationale: In case Driver_Assistance_ACC is selected, there is no initial state left.)
Edited by Andreas Bayha