T2A1: Important Thoughts

Write down the difference between Extended SCCharts and Core SCCharts.

Core SCCharts consist of a minimal set of SCCharts elements on which the semantic of SCCharts is defined.

Extended SCCharts are conservative extension of the Core SCCharts elements. These Extended features extend the syntax of SCCharts and enlarge the language for better usability.

Each Extended SSChart can be transformed step-by-step into a semantically equal Core SCChart. Some Transformations translating a single Extended features into Core use other Extended features, resulting dependencies between Extended Transformations.

What advantages has the Core SCCharts normalization?

Normalization simplifies the structure of Core SCChart by reducing the variety of allowed structure constructions to a minimal set of five structure pattern.

This facilitates transformation into other model types especially SCG because normalized SCCharts have the same structure as SCGs. This is due to the appropriate definition of the structure patterns.

Describe in own words what a basic block is.

BBs are distinct sets of SCG nodes that can be executed monolithically and continuously in cases of control flow.

There are no incoming or outgoing control flow edges in a BB or a tick edge.

Thus a BB can be executes without any control flow switches or jumps.

Which constraints influence the ordering of a schedule?

The main constraint is the initialize update read protocol for concurrent but not confluent access of variables.

As a result there are dependencies between nodes in SCGs which define their ordering constraints in a schedule.

There are simple "happen before" dependencies cause by sequential control flow.

Furthermore there are dependencies demanding absolute writes before relative write, relative writes before reads and consequently absolute writes before read.

A “write / write conflict", both absolute or relative, makes it impossible to find an schedule.

T2A2: Tickets

Created

Unknown macro: jira. Click on this message for details.

Unknown macro: jira. Click on this message for details.

Resolved

Unknown macro: jira. Click on this message for details.

T2A3: Modeling with SCCharts

rail.sct
scchart rail {
  
input bool second;
  
input bool contact0 , contact1;
  
output int track;
  
initial state station_controller "station controller" {
    
region go:
    
initial state init
    
--> running immediate with / track = 60;
   
    
state running;    
    
region platform:
    
initial state waiting
    
--> slowdown immediate with contact0 / track = 20;
   
    
state slowdown
    
--> stop immediate with contact1 / track = 0;
   
    
state stop
    
--> waiting with 5 second / track = 60;
   
  
};
}

T2A4: SCCharts Transformations

Transforming into Core SCChart

  1. Count Delay (5 seconds guard in transition).
    • 5 seconds becomes _counter == 5.
      • Implicit counting becomes explicit check of a counter.
    • Counter control
      • State station control gets integer variable _counter.
      • State stop where counting should happen gets:
        • entry action with counter = 0 effect to initialize counter each time the state is entered.
        • during action which increments counter each time second holds.
  2. During action in stop added in step 1.
    • State stop gets boolean variable _term initialized to false.
    • State stop gets a region with a Main --> _Term states were the immediate transition sets _term to true. Main contains the behavior of stop which is empty.
    • State stop gets a region with the counter behavior increments _counter every tick where second is true or terminates if _term is true.
    • Erroneous behavior breaking the counter 
  3. Unknown macro: jira. Click on this message for details.
    Initialization
    _term = false in state stop added in step 2.
    • _term becomes uninitialized.
    • State stop gets entry action initializing _term with false.
  4. Entry actions added in step 1 and 3.
    • The internal regions of stop are moved into a state Main in stop.
    • The initial state leads to Main via two concatenated immediate transitions connected by a connector. The transitions have their triggers and effects according to the two entry actions they are transformed from. So the entry behavior is executed before entering Main and thus as entry action of the state.
    • Main has a empty normal termination to the final state in stop.
  5. Connector added in step 4.
    • The connector is turned into a simple state _c.
  • Transform all extended features of the SCChart in T2A3 to core variants. Explain in detail what features are extended features and how the particular transformation worked. Upload an image of the SCChart in Core SCChart form.
  • Normalize your new SCChart. Upload an image of the SCCharts in normalized form.
  • Convert the SCChart into its SCG representation. (You may use any valid SCG transformation KIELER offers.) Inspect the SCG and write down and explain all potential problems. Upload an image of the SCG.
Tags: