concepts.html 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. <?xml version='1.0' encoding='utf-8' ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
  5. <title>concepts</title>
  6. <link type="text/css" rel="stylesheet" href="../style.css"/>
  7. </head>
  8. <body>
  9. <h1 id="YakinduStatecharttoolconcepts">Yakindu Statechart tool concepts</h1>
  10. <h2 id="Modeling">Modeling</h2>
  11. <p>Yakindu Statechart Models are based on statecharts as defined by David Harel and are close to UML state machines. Thus, they support all structural model elements as defined by the UML specification, which are States (orthogonal and hierarchical), Regions, Transitions and Pseudo States (History, Deep History, Initial, Final, Choice, Join / Fork).
  12. <br/>In addition, Yakindu Statechart Models specify interfaces that define the interaction of the state machine with its environment. Besides some more advanced concepts like Entry / Exit Points, an interface basically consists of in and out Events as well as Variables including types. These well-defined statechart interfaces are especially useful in the context of component models and product line engineering.
  13. </p>
  14. <p>For defining interfaces and modeling the dynamic aspects of statecharts (triggers, guards and actions) SCT provides a statically typed, textual action language. It tightly integrates into the graphical editor and supports the user with code completion, syntax highlighting, cross referencing and validation during modeling.</p>
  15. <p>Declarations of interfaces, events, variables etc. are done in a textual modeling field in the editor. The language expressions that define actions are directly added to the elements like states or transitions. </p>
  16. <h2 id="Simulation">Simulation</h2>
  17. <p>Yakindu Statechart Models can be executed via an integrated simulation engine. The simulation engine supports two different types of execution semantics:</p>
  18. <ul>
  19. <li>cycle based </li>
  20. <li>event driven</li>
  21. </ul>
  22. <p>The default execution semantic is
  23. <strong>cycle based</strong> which executes a statechart cycle within a fixed period of time and thus allows processing of concurrent events. In contrast, the
  24. <strong>event based</strong> approach executes a statechart cycle as soon as an event occurrs.
  25. </p>
  26. <p>During simulation, the currently active states and the transition path including the previous states are highlighted in the editor for visual debugging. An additional view shows the variable values and allows to raise events. </p>
  27. <p>Apart from that, the engine uses a
  28. <strong>virtual time</strong> during simulation. The user can provide a time scaling factor that is multiplied with the real time. This is especially useful during debugging, if the statechart model contains very tight or long running time triggers.
  29. </p>
  30. <h2 id="CodeGeneration">Code Generation</h2>
  31. <p>Yakindu Statechart Tools currently support the generation of Java, C and C++ Code. All generators can be customized with a
  32. <strong>generator model</strong>. This is a textual model file where generator features, like the execution type (event or cycle based), or the interface styles (static or generic), can be specified. The code generation process can either be executed with a builder that starts code generation on resource change or manually with a context menu action.
  33. </p>
  34. <h2 id="Domainspecificadaptability">Domain specific adaptability</h2>
  35. <p>Yakindu Statechart Tools were developed with a domain specific adaptability in mind. Several extension points allow the customization of all mentioned aspects. It is possible to contribute a custom type system or custom action languages which may be a dialect of the textual description language or a complete new language.</p>
  36. <p>Also, the different code generators can be customized or new code generators for other target languages can be plugged in easily.</p>
  37. <h2 id="YakinduSCModelingperspective">Yakindu SC Modeling perspective</h2>
  38. <p>For state machine modeling purposes open the Yakindu
  39. <strong>SC Modeling</strong> perspective by clicking
  40. <strong>Window</strong> &gt;
  41. <strong>Open Perspective</strong> &gt;
  42. <strong>SC Modeling</strong>. This perspective is optimized for statechart modeling. It consists of
  43. </p>
  44. <ul>
  45. <li>
  46. <a href="PLUGIN_ROOT/org.eclipse.platform.doc.user/concepts/cnav.htm">Project Explorer</a> on the left
  47. </li>
  48. <li>
  49. <a href="PLUGIN_ROOT/org.eclipse.platform.doc.user/concepts/coutline.htm">Outline</a> View on the right
  50. </li>
  51. <li>YAKINDU Statechart Editor at the top</li>
  52. <li>
  53. <a href="PLUGIN_ROOT/org.eclipse.platform.doc.user/concepts/cprbview.htm">Problems</a> and
  54. <a href="PLUGIN_ROOT/org.eclipse.platform.doc.user/concepts/cpropview.htm">Properties View</a> at the bottom
  55. </li>
  56. </ul>
  57. <p>
  58. <img border="0" src="../02_Getting_Started/images/sc_modeling_perspective.jpg"/>
  59. </p>
  60. <h2 id="YakinduSCSimulationperspective">Yakindu SC Simulation perspective</h2>
  61. <p>To simulate a state machine use the Yakindu
  62. <strong>SC Simulation</strong> perspective by clicking
  63. <strong>Window</strong> &gt;
  64. <strong>Open Perspective</strong> &gt;
  65. <strong>SC Simulation</strong>. This perspective is optimized for simulation purposes and consists of:
  66. </p>
  67. <ul>
  68. <li>
  69. <a href="PLUGIN_ROOT/org.eclipse.platform.doc.user/concepts/cnav.htm">Project Explorer</a> on the left
  70. </li>
  71. <li>
  72. <a href="PLUGIN_ROOT/org.eclipse.platform.doc.user/concepts/coutline.htm">Outline</a> view on the right top
  73. </li>
  74. <li>Simulation View on the right bottom</li>
  75. <li>Debug view at the top</li>
  76. <li>YAKINDU Statechart Editor at the bottom</li>
  77. </ul>
  78. <p>
  79. <img border="0" src="../02_Getting_Started/images/sc_simulation_perspective.jpg"/>
  80. </p>
  81. <h2 id="YAKINDUStatechartEditor">YAKINDU Statechart Editor</h2>
  82. <p>With the YAKINDU Statechart editor you create or modify state models. The editor automatically opens on .sct files. To create a new YAKINDU statechart model click
  83. <strong>File</strong> &gt;
  84. <strong>New</strong> &gt;
  85. <strong>Other...</strong> &gt;
  86. <strong>YAKINDU Statechart model</strong>. Give it a speaking name and click
  87. <strong>Finish</strong>. The newly created model opens in the statechart editor. Also the SC Modeling perspective opens.
  88. </p>
  89. <p>
  90. <img border="0" src="../02_Getting_Started/images/sc_editor_01.jpg"/>
  91. </p>
  92. <p>The editor consists of three parts: </p>
  93. <ul>
  94. <li>the graphic canvas to design the state machine</li>
  95. <li>the palette on the right that owns the elements to design the state machine </li>
  96. <li>a textual modeling field on the left</li>
  97. </ul>
  98. <p>You can use the textual modeling field to define internal behavior of states and declare events or variables. The
  99. <a href="../05_Reference/reference.html#Statechartdescriptionlanguage">reference</a> explains this language.
  100. </p>
  101. <p>Elements that cause problems get warning and error markers attached. For more details about the problems open the
  102. <strong>Problems View</strong>.
  103. </p>
  104. <h2 id="SimulationView">Simulation View</h2>
  105. <p>The simulation view is an interactive view to watch and control the state machine simulation. To get it open the simulation perspective. </p>
  106. <p>Start a simulation by clicking
  107. <strong>Run</strong> &gt;
  108. <strong>Run</strong>.
  109. </p>
  110. <p>
  111. <img border="0" src="../02_Getting_Started/images/simulation_view_active.jpg"/>
  112. </p>
  113. <p>During the simulation in the statechart editor the active state gets a red color. The previous transition is green. The simulation view shows the events that trigger the states. You can change values here to trigger events. Beneath the table there are two clocks. One for the
  114. <em>virtual time</em> and one for the
  115. <em>real time</em> and a slider to change virtual time.
  116. </p>
  117. <p>You can also select an
  118. <em>event driven</em> or
  119. <em>cycle based</em> run configuration.
  120. </p>
  121. <h2 id="YAKINDUSCTNature">YAKINDU SCT Nature</h2>
  122. <p>YAKINDU model projects are associated with the
  123. <strong>YAKINDU SCT nature</strong>. On projects with
  124. <strong>YAKINDU SCT nature</strong>
  125. <em>.sct</em> and
  126. <em>.sgen</em> files are automatically build and checked for problems. So you get fast feedback during editing. You can toggle the SCT nature by right clicking
  127. <strong>Configure</strong> &gt;
  128. <strong>Add</strong> or
  129. <strong>Remove YAKINDU SCT Nature</strong> on the project.
  130. </p>
  131. </body>
  132. </html>