Skip to content
Snippets Groups Projects
Commit b7fd140e authored by Saad bin Abid's avatar Saad bin Abid
Browse files

fixed heirarchical_state_automaton.html, mode_automaton.html and

state_automaton.html and updated the ratings file

Issue-Ref: 4007
Issue-Url: https://af3-developer.fortiss.org/issues/4007



Signed-off-by: default avatarSaad bin Abid <abid@fortiss.org>
parent ba985cce
No related branches found
No related tags found
1 merge request!31Task 4006 online help content
code_specification.html 6abb0c1e49b2545e5b3d81444481689ca5bbd611 YELLOW
code_specification.html b4fed0d2f134725b3ea0f307f08f4b38e0b3244e YELLOW
component_architecture.html 68c7cce49bd652bf4f956227ed1eb1e665872fa1 YELLOW
cosimulation_with_af3.html 6fbc831781de5e2aa03247c9b7472f92e0741cec YELLOW
data_dictionary.html 0b8b52108fa95ee99b294bf6f2fb46ad803e30c5 YELLOW
......
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!--
Documentation of Creating a Hierarchical State Automaton.
@author becker
@ConQAT.Rating GREEN Hash: 47DDCA43A4D1DEA5EE9A485356244540
-->
<!-- Documentation of Creating a Hierarchical State Automaton. -->
<html>
<head>
<link rel="stylesheet" type="text/css" href="../layout/stylesheet.css">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Creating a Hierarchical State Automaton using AutoFOCUS3 (AF3)</title>
</head>
<body>
<div class="header">
<div class="box">
<div class="navbar">
<!--a href="https://www.fortiss.org/" align="left">
<img src="fortiss-logo.png" width="90px" height="20px" align="left">
</a-->
<div class="dropdown">
<button class="btn" id="hamburger">
<label for="hamburger" class="hamburger">
<span class="hamburgerLine"></span>
<span class="hamburgerLine"></span>
<span class="hamburgerLine"></span>
</label>
</button>
<div class="dropdown-content">
<a href="../getting_started.html"> Main Page</a>
<a href="../requirements/MIRA.requirements.html">Requirements Engineering</a>
<a href="#">Deployment and Code Generation</a>
<a href="#">Design Space Exploration (DSE)</a>
<a href="#">Assurance Case Modeling</a>
<a href="#">Further Resources</a>
</div>
</div>
<div class="dropdown">
<button class="dropbtn">Modeling and Simulation <i class="triangle"></i></button>
<div class="dropdown-content">
<a href="model_element_attributes.html">Introduction to Graphical Modeling Interface</a>
<a href="component_architecture.html">Component Architecture Modeling</a>
<a href="data_dictionary.html">Data Dictionary: Types and Functions</a>
<a href="code_specification.html">Behavior Modeling -> Code Specifications</a>
<a href="state_automaton.html">Behavior Modeling -> State Automata</a>
<a href="mode_automaton.html">Behavior Modeling -> Mode Automata</a>
<a href="simulation_with_af3.html">Simulation -> Simulation</a>
<a href="operatorpanels.html">Simulation -> Operator Panels</a>
<a href="operatorpanels_advanced.html">Simulation -> Advanced interface</a>
<a href="cosimulation_with_af3.html">Simulation -> Co-Simulation and FMI Support</a>
<a href="refactoring.html">Refactoring</a>
<a href="model_markers_view.html">On-the-fly Checks</a>
</div>
</div>
<div class="topnav-right">
<a href="mailto:af_user@lists.fortiss.org?subject=Reporting 'state_automaton.html' Documentation Problem!&body= Dear Af3 team, I am reporting an issue related to 'modelling and simulation'.
{Please specify the problem precisely here.}.">Report a Problem?</a>
</div>
</div>
</head>
</div>
</div>
<div class="box">
<h2><u><font color="#336699">Creating a Hierarchical State Automaton</font></u></h2>
<button onclick="topFunction()" id="upBtn" title="Go to top">Top</button>
<h4><font color="#336699">Introduction</font></h4>
<i>Hierarchical State Automatons</i> ("HSA") are an extension of <a href="state_automaton.html"><i>State Automatons</i></a> whose states can themselves contain state automatons.
<h2>Creating a Hierarchical State Automaton</h2>
<p><i>Hierarchical State Automatons</i> ("HSA") are an extension of <a href="state_automaton.html"><i>State Automatons</i></a> whose states can themselves contain state automatons.</p>
<p>
Note that HSAs are experimental, thus not all features of state automata are supported.
In particular, the support for verification is limited (e.g., reachability analysis is not supported).
The simulation of HSAs is possible.
The simulation of HSAs is possible.</p>
<h4><font color="#336699">When to use HSAs?</font></h4>
<h4>When to use HSAs?</h4>
HSAs are useful when a usual state automaton becomes too big to be handled conveniently.
<p>HSAs are useful when a usual state automaton becomes too big to be handled conveniently.
In this case, one can often decompose the state automaton into a HSA.
Note that <i>HSAs are not more powerful than state automata</i>, i.e., one cannot use a HSA to model a behavior which
cannot be modeled by a state automaton.
cannot be modeled by a state automaton.</p>
<h4><font color="#336699">Create a Hierarchical State Automaton</font></h4>
<h4>Create a Hierarchical State Automaton</h4>
To create a HSA, simply model the top state automaton like any other automaton:
<p>To create a HSA, simply model the top state automaton like any other automaton:</p>
<br><br>
<img width=900px src="./pictures/HSA.Base.Automaton.png">
<br><br>
Then simply drag&drop a state from the Model Elements View to <i>some existing state</i> of your diagram:
<p>Then simply drag&drop a state from the Model Elements View to <i>some existing state</i> of your diagram:</p>
<br><br>
<img width=900px src="./pictures/HSA.Drag.Drop.png">
<br><br>
This will create a state automaton inside the existing state:
<p>This will create a state automaton inside the existing state:</p>
<br><br>
<img width=900px src="./pictures/HSA.Built.png">
<br><br>
You can then double click the state to open this inner automaton:
<p>You can then double click the state to open this inner automaton:</p>
<br><br>
<img width=900px src="./pictures/HSA.Inside.png">
<br><br>
And start building the inside automaton as any <a href="state_automaton.html">state automaton</a>:
<p>And start building the inside automaton as any <a href="state_automaton.html">state automaton</a>:</p>
<br><br>
<img width=900px src="./pictures/HSA.Inner.Built.png">
<br><br>
When modeling the inner automaton, one can notice that some ports are automatically added, disconnected from any state.
See, e.g., Input, Input1, and Output below:
<p>When modeling the inner automaton, one can notice that some ports are automatically added, disconnected from any state.
See, e.g., Input, Input1, and Output below:</p>
<br><br>
<img width=900px src="./pictures/HSA.Inside.Ports.png">
<br><br>
Just as any other port, these ports can be connected to the states, thus allowing to make a connection between the behavior
of the inner state automaton and the outer state automaton.
<p>Just as any other port, these ports can be connected to the states, thus allowing to make a connection between the behavior
of the inner state automaton and the outer state automaton.</p>
<h4><font color="#336699">Semantics and Behavior of the Inner Automaton</font></h4>
<h4>Semantics and Behavior of the Inner Automaton</h4>
The inner automaton is connected to the outer one through the ports of the outer state.
<p>The inner automaton is connected to the outer one through the ports of the outer state.
The semantics of the HSA are as follows:
assume a transition followed in the outer state automaton goes to a hierarchical state through some port "Input":
assume a transition followed in the outer state automaton goes to a hierarchical state through some port "Input":</p>
<br><br>
<img width=900px src="./pictures/HSA.Base.Automaton.Behavior.png">
<br><br>
Then the focus switches to the inside automaton by following any suitable transition from "Input":
<p>Then the focus switches to the inside automaton by following any suitable transition from "Input":</p>
<br><br>
<img width=900px src="./pictures/HSA.Inner.Automaton.Behavior.png">
<br><br>
Once inside this automaton, the usual behavior of state automaton applies.
<p>Once inside this automaton, the usual behavior of state automaton applies.
Note that, meanwhile, the outer automaton is "frozen" in its current state.
This is until an output port is reached in the inner automaton:
This is until an output port is reached in the inner automaton:</p>
<br><br>
<img width=900px src="./pictures/HSA.Inner.Automaton.Out.png">
<br><br>
In that case the focus gets back to the outer automaton, which follows the appropriate transition:
<p>In that case the focus gets back to the outer automaton, which follows the appropriate transition:</p>
<br><br>
<img width=900px src="./pictures/HSA.Base.Automaton.Out.png">
<br><br>
</div>
<script src="../layout/jsscript/topBtn.js">
</script>
</body>
</html>
</html>
\ No newline at end of file
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!--
Documentation of Creating a Mode Automaton.
@author li
@ConQAT.Rating GREEN Hash: 6733BA0E9A74573CC0D7350749795980
-->
<!-- Documentation of Creating a Hierarchical State Automaton. -->
<html>
<head>
<link rel="stylesheet" type="text/css" href="../layout/stylesheet.css">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Creating a Mode Automaton using AutoFOCUS3 (AF3)</title>
</head>
<body>
<div class="header">
<div class="box">
<div class="navbar">
<!--a href="https://www.fortiss.org/" align="left">
<img src="fortiss-logo.png" width="90px" height="20px" align="left">
</a-->
<div class="dropdown">
<button class="btn" id="hamburger">
<label for="hamburger" class="hamburger">
<span class="hamburgerLine"></span>
<span class="hamburgerLine"></span>
<span class="hamburgerLine"></span>
</label>
</button>
<div class="dropdown-content">
<a href="../getting_started.html"> Main Page</a>
<a href="../requirements/MIRA.requirements.html">Requirements Engineering</a>
<a href="#">Deployment and Code Generation</a>
<a href="#">Design Space Exploration (DSE)</a>
<a href="#">Assurance Case Modeling</a>
<a href="#">Further Resources</a>
</div>
</div>
<div class="dropdown">
<button class="dropbtn">Modeling and Simulation <i class="triangle"></i></button>
<div class="dropdown-content">
<a href="model_element_attributes.html">Introduction to Graphical Modeling Interface</a>
<a href="component_architecture.html">Component Architecture Modeling</a>
<a href="data_dictionary.html">Data Dictionary: Types and Functions</a>
<a href="code_specification.html">Behavior Modeling -> Code Specifications</a>
<a href="state_automaton.html">Behavior Modeling -> State Automata</a>
<a href="hierarchical_state_automaton.html">Behavior Modeling -> Hierarchical State Automata</a>
<a href="simulation_with_af3.html">Simulation -> Simulation</a>
<a href="operatorpanels.html">Simulation -> Operator Panels</a>
<a href="operatorpanels_advanced.html">Simulation -> Advanced interface</a>
<a href="cosimulation_with_af3.html">Simulation -> Co-Simulation and FMI Support</a>
<a href="refactoring.html">Refactoring</a>
<a href="model_markers_view.html">On-the-fly Checks</a>
</div>
</div>
<div class="topnav-right">
<a href="mailto:af_user@lists.fortiss.org?subject=Reporting 'mode_automaton.html' Documentation Problem!&body= Dear Af3 team, I am reporting an issue related to 'modelling and simulation'.
{Please specify the problem precisely here.}.">Report a Problem?</a>
</div>
</div>
</head>
</div>
</div>
<div class="box">
<h2><u><font color="#336699">Creating a Mode Automaton</font></u></h2>
<button onclick="topFunction()" id="upBtn" title="Go to top">Top</button>
<h4><font color="#336699">Motivation and Introduction</font></h4>
Beside the usage of <a href="state_automaton.html"><i>State Automaton</i></a>, there exists another way to model the behavior of components in a graphical Mode Automaton Diagram.
<br><br>
<h2>Creating a Mode Automaton</h2>
A component may contain some running modes, which should be used in distinct periods of the time. The control model for such modes is <b>mode automaton</b>.
The usage of the mode automaton my have consequences on the code efficiency as well as on the correctness of the design. There are four kinds of the model elements in mode automaton.
<p>Following sections discuss motivation and steps to create Mode Automaton in AF3.</p>
<br><br>
<h4>Motivation and Introduction</h4>
<b>Mode</b>: A mode automaton contains at least one mode. A mode describes the current configuration of computational data flow a component is in.
This configuration computes outputs for given component depending on the current inputs as well as the state of the local variables. A mode must have a sub component structure, in order to describe the current computation for the component.
An initial mode, which the mode automaton starts with, is required in mode automaton.
<p>Beside the usage of <a href="state_automaton.html"><i>State Automaton</i></a>, there exists another way to model the behavior of components in a graphical Mode Automaton Diagram.</p>
<br><br>
<p>A component may contain some running modes, which should be used in distinct periods of the time. The control model for such modes is <b>mode automaton</b>.
The usage of the mode automaton my have consequences on the code efficiency as well as on the correctness of the design. There are four kinds of the model elements in mode automaton.</p>
<b>Switch</b>: Switch controls the change of the mode to execute. Switch element contains the <i>Guards</i>, which takes cares of the switch conditions.
<p><b>Mode</b>: A mode automaton contains at least one mode. A mode describes the current configuration of computational data flow a component is in.
This configuration computes outputs for given component depending on the current inputs as well as the state of the local variables. A mode must have a sub component structure, in order to describe the current computation for the component.
An initial mode, which the mode automaton starts with, is required in mode automaton.</p>
<br><br>
<p><b>Switch</b>: Switch controls the change of the mode to execute. Switch element contains the <i>Guards</i>, which takes cares of the switch conditions.</p>
<b>Input and Output Ports</b>: A port belongs to a mode, and is the start and the end of a switch.
<p><b>Input and Output Ports</b>: A port belongs to a mode, and is the start and the end of a switch.</p>
<br><br>
<b>Mode Component Structure</b>: This model element contains the component architecture, which is used to compute the outputs when the corresponding mode active is. Every mode must contain one sub component structure.
A mode component structure must have the same ports with the component, which contains this mode automaton.
<p><b>Mode Component Structure</b>: This model element contains the component architecture, which is used to compute the outputs when the corresponding mode active is. Every mode must contain one sub component structure.
A mode component structure must have the same ports with the component, which contains this mode automaton.</p>
<br><br>
<h4><font color="#336699">Mode Automaton</font></h4>
<h4>Mode Automaton</h4>
The mode automaton editor is very similar to state automaton editor. You can add a mode automaton to your component as shown in figure 1. In mode automaton editor, you might drag&drop a mode from the right Model Elements View to your diagram. In the same way you can add ports and mode component structure to your modes.
<p>The mode automaton editor is very similar to state automaton editor. You can add a mode automaton to your component as shown in figure 1. In mode automaton editor, you might drag&drop a mode from the right Model Elements View to your diagram. In the same way you can add ports and mode component structure to your modes.</p>
<br><br>
<img src="./pictures/modes.add_mode_automaton.png">
<br>Figure 1: Add mode automaton.
<br><br>
You can select the mode and drag it to everywhere in the editor. Same for ports, just pick them and move around the border of the mode.
To resize a mode, pick the lower, the right, or the lower-right point of its bounding-box and then move it.
<br><br>
<p>You can select the mode and drag it to everywhere in the editor. Same for ports, just pick them and move around the border of the mode.
To resize a mode, pick the lower, the right, or the lower-right point of its bounding-box and then move it.</p>
In order to create switches between your modes, press the <b>&lt;alt&gt;-Key</b> on your keyboard and drag the switch from one port to another port of different I/O-kind.
<p>In order to create switches between your modes, press the <b>&lt;alt&gt;-Key</b> on your keyboard and drag the switch from one port to another port of different I/O-kind.
You can also create the switch from one mode to another mode, new ports will be created automatically and the switch will be created between the new ports.
Invalid switches (e.g., between two Output-Ports) are avoided by disabling the dragging.
Invalid switches (e.g., between two Output-Ports) are avoided by disabling the dragging.</p>
<br><br>
<img src="./pictures/modes.mode_automaton_editor.png">
<br>Figure 2: Mode automaton editor.
<br><br>
<h4><font color="#336699">Mode</font></h4>
<h4>Mode</h4>
A mode automaton requires an <b>initial mode</b>. This can be done in the <i>Properties View</i> after you selected a mode.
This mode is marked with a little black dot afterwards(see figure 3).
<p>A mode automaton requires an <b>initial mode</b>. This can be done in the <i>Properties View</i> after you selected a mode.
This mode is marked with a little black dot afterwards(see the following figure).
<br><br>
<img src="./pictures/modes.initial_mode.png">
<br>Figure 3: Initial mode.
<br><br>
In the <i>Properties View</i>, you can also edit the names of selected modes and also specify comments.
<br><br>
<p>In the <i>Properties View</i>, you can also edit the names of selected modes and also specify comments.</p>
<h4><font color="#336699">Switch</font></h4>
<h4>Switch</h4>
Just like transition in state automaton, you can change the route of switches by selecting it, pick the point shown in the middle and move it.
<p>Just like transition in state automaton, you can change the route of switches by selecting it, pick the point shown in the middle and move it.
Afterwards, two new points are shown between the moved middle point and the two ports. By moving these points, you can further define the route more precisely.
The conditions for switch between modes are done by specifying <i>Guards</i> of a switch. If no Guard of an outgoing switch is fulfilled, the current mode remains active.
If a switch can be fired, then new mode will be active, and the sub component architecture of this mode will take over the computation job.
If a switch can be fired, then new mode will be active, and the sub component architecture of this mode will take over the computation job.</p>
<br><br>
<img src="./pictures/modes.switch_blendpoint.png">
<br>Figure 4: Edit the switch.
<br><br>
Note that, unlike transitions of a state automaton, mode switches do not have <i>actions</i>.
Modifying the outputs should be done instead through <i>component structure inside a mode</i>.
<p> Note that, unlike transitions of a state automaton, mode switches do not have <i>actions</i>.
Modifying the outputs should be done instead through <i>component structure inside a mode</i>.</p>
<h4><a id="ModeComponentStructure"><font color="#336699">Mode Component Structure</font></a></h4>
<h4>Mode Component Structure</h4>
A mode generally contains a component structure.
<p> A mode generally contains a component structure.
Editing such a structure is done in the same way as for <a href="component_architecture.html"><i>Component Architectures</i></a>.
You can add a mode component structure as shown in figure 5.
You can add a mode component structure as shown in the following figure.
<br><br>
<img src="./pictures/modes.add_mode_component_structure.png">
<br>Figure 5: Add mode component structure.
<br><br>
Figure 6 shows an example of a mode component structure.
The following figure shows an example of a mode component structure.
You can drag and drop the component and channels and like a component architecture.
The ports, which are highlighted in blue rectangles, should correspond to the ports of the component of the mode automaton.
<br><br>
<img src="./pictures/modes.example_mode_component_struct.png">
<br>Figure 6: Example of a mode component structure.
<br><br>
<!--
MODE DIAGRAMS DO NOT HAVE DATA YET
<h4><font color="#336699">Data State Variables</font></h4>
Data State Variables (DSVs) are internal variables that can be accessed in all modes of the corresponding mode automaton.
To edit such a variable to a mode automaton, click the <i>Mode Data</i> tab in your Mode Automaton View(see Figure 7).
<br><br>
<img src="./pictures/modes.data_state_view.png">
<br>Figure 7: open the data state view.
<br><br>
The way to edit the variable is described in <a href="state_automaton.html"><i>State Automaton</i></a>. Please check there for more information about Data State Variable.
--->
<br><br>
</div>
<script src="../layout/jsscript/topBtn.js">
</script>
</body>
</html>
\ No newline at end of file
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!--
Documentation of Creating a State Automaton.
@author becker
@ConQAT.Rating GREEN Hash: 2227F321C6468BA9DE5C2AB1A9C4C1FA
-->
<!-- Documentation of Creating a State Automaton. -->
<html>
<head>
<link rel="stylesheet" type="text/css" href="../layout/stylesheet.css">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Creating a State Automaton using AutoFOCUS3 (AF3)</title>
</head>
<body>
<h2><u><font color="#336699">Creating a State Automaton</font></u></h2>
<h4><font color="#336699">Introduction</font></h4>
<body>
<div class="header">
<div class="box">
<div class="navbar">
<!--a href="https://www.fortiss.org/" align="left">
<img src="fortiss-logo.png" width="90px" height="20px" align="left">
</a-->
<div class="dropdown">
<button class="btn" id="hamburger">
<label for="hamburger" class="hamburger">
<span class="hamburgerLine"></span>
<span class="hamburgerLine"></span>
<span class="hamburgerLine"></span>
</label>
</button>
<div class="dropdown-content">
<a href="../getting_started.html"> Main Page</a>
<a href="../requirements/MIRA.requirements.html">Requirements Engineering</a>
<a href="#">Deployment and Code Generation</a>
<a href="#">Design Space Exploration (DSE)</a>
<a href="#">Assurance Case Modeling</a>
<a href="#">Further Resources</a>
</div>
</div>
<div class="dropdown">
<button class="dropbtn">Modeling and Simulation <i class="triangle"></i></button>
<div class="dropdown-content">
<a href="model_element_attributes.html">Introduction to Graphical Modeling Interface</a>
<a href="component_architecture.html">Component Architecture Modeling</a>
<a href="data_dictionary.html">Data Dictionary: Types and Functions</a>
<a href="code_specification.html">Behavior Modeling -> Code Specifications</a>
<a href="hierarchical_state_automaton.html">Behavior Modeling -> Hierarchical State Automata</a>
<a href="mode_automaton.html">Behavior Modeling -> Mode Automata</a>
<a href="simulation_with_af3.html">Simulation -> Simulation</a>
<a href="operatorpanels.html">Simulation -> Operator Panels</a>
<a href="operatorpanels_advanced.html">Simulation -> Advanced interface</a>
<a href="cosimulation_with_af3.html">Simulation -> Co-Simulation and FMI Support</a>
<a href="refactoring.html">Refactoring</a>
<a href="model_markers_view.html">On-the-fly Checks</a>
</div>
</div>
<div class="topnav-right">
<a href="mailto:af_user@lists.fortiss.org?subject=Reporting 'state_automaton.html' Documentation Problem!&body= Dear Af3 team, I am reporting an issue related to 'modelling and simulation'.
{Please specify the problem precisely here.}.">Report a Problem?</a>
</div>
</div>
</head>
</div>
</div>
<div class="box">
Beside the usage of <a href="code_specification.html"><i>Code Specifications</i></a>, there is also the possibility to define the behavior of components in a graphical State Automaton Diagram.
<button onclick="topFunction()" id="upBtn" title="Go to top">Top</button>
<h4><font color="#336699">Drawing States and Transitions</font></h4>
<h2>Creating a State Automaton</h2>
Once you have added a state automaton to your component and opened it, you might drag&drop a state from the right Model Elements View to your diagram. In the same way you can add ports to your states.
<p>Beside the usage of <a href="code_specification.html"><i>Code Specifications</i></a>, there is also the possibility to define the behavior of components in a graphical State Automaton Diagram.</p>
<br><br>
<h4>Drawing States and Transitions</h4>
To move a state, pick the state somewhere in the middle and move it. Same for ports, just pick them and move around the border of the state.
To resize a state, pick the lower, the right, or the lower-right point of its bounding-box and then move it.
<p>Once you have added a state automaton to your component and opened it, you might drag&drop a state from the right Model Elements View to your diagram. In the same way you can add ports to your states.</p>
<br><br>
<p>To move a state, pick the state somewhere in the middle and move it. Same for ports, just pick them and move around the border of the state.
To resize a state, pick the lower, the right, or the lower-right point of its bounding-box and then move it.</p>
In order to create transitions between two states, press the <b>&lt;alt&gt;-Key</b> on your keyboard and drag the transitions from one port to another port of different I/O-kind (i.e., Entry/Exit).
<p>In order to create transitions between two states, press the <b>&lt;alt&gt;-Key</b> on your keyboard and drag the transitions from one port to another port of different I/O-kind (i.e., Entry/Exit).
If you drag from one state to another state, new ports will be created automatically and the transition will be created between the new ports.
Invalid transitions (e.g., between two Output/Exit-Ports) are avoided by disabling the dragging.
<br><br>
Invalid transitions (e.g., between two Output/Exit-Ports) are avoided by disabling the dragging.</p>
You should declare one state as initial. This can be done in the <i>Properties View</i> after you selected a state.
<p>You should declare one state as initial. This can be done in the <i>Properties View</i> after you selected a state.
This state is marked with a little black dot.
If you forget to declare a state as initial, or if you declare more than one state as initial, this is detected by AutoFOCUS after you have saved the project.
In this cases, an Error marker will be shown in the <a href="model_markers_view.html">Model Markers View</a>.
<br><br>
In this cases, an Error marker will be shown in the <a href="model_markers_view.html">Model Markers View</a>.</p>
In the <i>Properties View</i>, you can edit the names of selected states, transitions and ports. You can also specify comments.
<p> In the <i>Properties View</i>, you can edit the names of selected states, transitions and ports. You can also specify comments.</p>
<br><br>
You can change the route of transitions by selecting it, pick the point shown in the middle and move it.
Afterwards, two new points are shown between the moved middle point and the two ports. By moving these points, you can further define the route more precisely.
<p> You can change the route of transitions by selecting it, pick the point shown in the middle and move it.
Afterwards, two new points are shown between the moved middle point and the two ports. By moving these points, you can further define the route more precisely.</p>
<br><br>
<img src="./pictures/StateAutomaton1.png">
<br><br>
<i>Note:</i> Dragging&dropping a state <i>inside</i> a state, yields a <a href="hierarchical_state_automaton.html">Hierarchical
State Automaton</a>.
<p> <i>Note:</i> Dragging&dropping a state <i>inside</i> a state, yields a <a href="hierarchical_state_automaton.html">Hierarchical
State Automaton</a>.</p>
<h4><font color="#336699">Data State Variables</font></h4>
<h4>Data State Variables</h4>
Data State Variables (DSVs) are internal variables that can be accessed in all states of the corresponding state automaton.
<p> Data State Variables (DSVs) are internal variables that can be accessed in all states of the corresponding state automaton.
To add such a variable to a state automaton, click the <i>Data State</i> tab in your State Automaton View.
Press the Add-Button to add a DSV.
Press the Add-Button to add a DSV.</p>
<br><br>
<img src="./pictures/DataStateVariables1.png">
<br><br>
You may give a variable name, a type of the variable and an initial value. Valid types are <i>int</i>, <i>double</i> and <i>boolean</i>.
Invalid types are detected and an error message is given.
<p>You may give a variable name, a type of the variable and an initial value. Valid types are <i>int</i>, <i>double</i> and <i>boolean</i>.
Invalid types are detected and an error message is given.</p>
<br><br>
<img src="./pictures/DataStateVariables2.png">
<br><br>
<h4><font color="#336699">Defining Guards and Actions</font></h4>
<h4>Defining Guards and Actions</h4>
If the component is in a state that has multiple outgoing transitions, it has to be specified which transition is used at the next step.
<p>If the component is in a state that has multiple outgoing transitions, it has to be specified which transition is used at the next step.
This is done by specifying <i>Guards</i> of transitions. If no Guard of an outgoing transition is fulfilled, the state keeps active.
If multiple outgoing transition guards would be fulfilled, this would result in a non-deterministic behavior. AutoFOCUS provides a <a href="non_determinism_analysis.html">Non-determinism analysis</a> to detect this.
If multiple outgoing transition guards would be fulfilled, this would result in a non-deterministic behavior. AutoFOCUS provides a <a href="non_determinism_analysis.html">Non-determinism analysis</a> to detect this.</p>
<br><br>
<p>If a guard is fulfilled and the transition is fired, a defined <i>Action</i> is executed. There can be multiple Actions separated by '<tt>;</tt>'.</p>
If a guard is fulfilled and the transition is fired, a defined <i>Action</i> is executed. There can be multiple Actions separated by ';'.
<br><br>
<img src="./pictures/StateAutomaton.GuardsAndActions.png">
<br><br>
If you have created a complex transition and want to reuse it again as another transition, you may use the copy&paste buttons in the properties view of a transition.
<p>If you have created a complex transition and want to reuse it again as another transition, you may use the copy&paste buttons in the properties view of a transition.
Press <i>copy</i> for a transition, then create a new transition somewhere and finally press <i>paste</i> in this new transition.
All settings of the copied transition (Guards and Actions) will be inserted into the new transition.
<br><br>
It is also possible to define <i>Idle actions</i> at states. These actions are fired in every simulation step,
if the state is active and no outgoing transition guard is fulfilled.
<br><br>
For valid syntax, please look at the above example screen shot. E.g., Green() is a Enumeration Member defined in the <a href="data_dictionary.html">Data Dictionary</a>.
All settings of the copied transition (Guards and Actions) will be inserted into the new transition.</p>
<p>It is also possible to define <i>Idle actions</i> at states. These actions are fired in every simulation step,
if the state is active and no outgoing transition guard is fulfilled. For valid syntax, please look at the above example screen shot. E.g., Green() is a Enumeration Member defined in the <a href="data_dictionary.html">Data Dictionary</a>.
Of course, syntax checking is also provided for guards and actions.
</p>
<br><br>
<!--
Tabular view not available anymore
<h4><font color="#336699">Tabular View of the Automata</font></h4>
Each automaton can be displayed in a tabular view as shown in the picture below. The AF3 users can change the actions and guards by double-clicking on the corresponding cell of the table. Adding new states or transitions or deleting them is not possible in this view.
</div>
<br><br>
<img src="./pictures/StateAutomaton.TableView.png">
<br><br>
--->
<script src="../layout/jsscript/topBtn.js">
</script>
</body>
</html>
</html>
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment