450px-Xtext_logo.png

 

There is no valid license for Pro Macros. Please visit the Licenses section.

 

SCCharts are typically modeled using the textual SCT language defined as an Xtext grammar in KIELER. Generally, if you do not know which elements can be placed at a certain cursor position you are assisted by a content-assist that can be called pressing <Ctrl>+<Space>. It will display all possible valid elements also considering scoping of variables.

 

In the following we will describe the basic elements using the famous ABRO example:

scchart ABRO {
 input bool A;
 input bool B;
 input bool R;
 output bool O = false;
  region Main:
  initial state ABO {
    initial state WaitAB {
      region HandleA:
      initial state WA
     --> DA with A;
     final state DA;
      region HandleB:
      initial state WB
     --> DB with B;
     final state DB;
   }
   >-> Done with / O = true;
   state Done;
 }
  o-> ABO with R;
}            
  1. In the first line you see how an SCChart is defined using the scchart keyword where the ID of the SCChart will be ABRO. An optional label can be inserted after ABRO using "<LABEL>".
  2. In the next three lines variables are declared, namely, A, B, R and O, where O is initialized with the value false. A, B, and R are inputs which must not be initialized and get there valued from the environment.
  3. An SCChart typically contains concurrent regions which are introduced with the keyword region as shown in Line 6.
  4. Every region must at least have one state, and every region must exactly have one initial state. An initial state ABO is defined for region Main in Line 7.
  5. Every state is terminated by a ; as shown in line 11 for state HandleA.
  6. If you like to specify internal behavior of a state, you can add concurrent regions to a state in { <regions> } as done for state ABO or state WaitAB.
  7. Transitions outgoing from a state must be declared right before a state is terminated with ;. For example a transition from state WA to state DA is declared in Line 11.
  8. Transitions can have triggers and effects which are separated by a dash: <trigger>/<effects>. Multiple sequential effects are separated by a ;. The transition in Line 11 declares just a trigger A (a dash is not necessary in this case), while the transition from line 18 declares only an effect O = true (here the dash is mandatory).
  9. There are three types of transitions: 1. normal/weak abort transitions -->,  2. strong abort transitions o-> and 3. termination/join transitions >->.

 

Detailed Syntax of SCCharts Language Elements

SCCharts, Initial States, States, Transitions

There is no valid license for Pro Macros. Please visit the Licenses section.

There is no valid license for Pro Macros. Please visit the Licenses section.

 

Variable

There is no valid license for Pro Macros. Please visit the Licenses section.

There is no valid license for Pro Macros. Please visit the Licenses section.

Transition: Trigger & Effect

There is no valid license for Pro Macros. Please visit the Licenses section.

There is no valid license for Pro Macros. Please visit the Licenses section.

Super State

There is no valid license for Pro Macros. Please visit the Licenses section.

There is no valid license for Pro Macros. Please visit the Licenses section.

Super State: Final States & Termination Transition

There is no valid license for Pro Macros. Please visit the Licenses section.

There is no valid license for Pro Macros. Please visit the Licenses section.

Super State: Weak Abort Transition

There is no valid license for Pro Macros. Please visit the Licenses section.

There is no valid license for Pro Macros. Please visit the Licenses section.

Super State: Strong Abort Transition

There is no valid license for Pro Macros. Please visit the Licenses section.

There is no valid license for Pro Macros. Please visit the Licenses section.

Concurrent Regions (inside a Super State)

There is no valid license for Pro Macros. Please visit the Licenses section.

There is no valid license for Pro Macros. Please visit the Licenses section.

Entry Action, During Action, Exit Action

There is no valid license for Pro Macros. Please visit the Licenses section.

There is no valid license for Pro Macros. Please visit the Licenses section.

Shallow History Transition

There is no valid license for Pro Macros. Please visit the Licenses section.

There is no valid license for Pro Macros. Please visit the Licenses section.

Deep History Transition

There is no valid license for Pro Macros. Please visit the Licenses section.

There is no valid license for Pro Macros. Please visit the Licenses section.

Deferred Transition

There is no valid license for Pro Macros. Please visit the Licenses section.

There is no valid license for Pro Macros. Please visit the Licenses section.

Transition with Count Delay

There is no valid license for Pro Macros. Please visit the Licenses section.

There is no valid license for Pro Macros. Please visit the Licenses section.

Array

There is no valid license for Pro Macros. Please visit the Licenses section.

There is no valid license for Pro Macros. Please visit the Licenses section.

Signal

There is no valid license for Pro Macros. Please visit the Licenses section.

There is no valid license for Pro Macros. Please visit the Licenses section.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Tags: