Preliminaries

SCCharts:

The slides or papers below are only additional work and might be wrong. Always refer to the current syntax.

These slides are a good starting point to get accustomed with SCCharts:

It might be a good idea to also have a bit of a deeper understanding to what is going on behind the scenes of SCCharts. Therefore you might want to read up on the lower levels of the language:

Additional information about SCCharts within KIELER can be found here:

There is also a Technical Report about the last Railway Project and the changes to SCCharts that originated there. You might want to read that too.

KIELER:

You need a working copy of KIELER. If you participated in the last lecture about Synchronous Languages you probably already have one.
If you have a version for LEGO Mindstorms you might have a 32bit version, even if you are working on a 64bit machine. For our project you can use the 64bit version and use the full potential of your machine.
So, what I am saying is: You might want to make sure you have the proper version.

If you need a new installation you should use our KIELER Nightly.

Key:

You can get a key for the Railway lab. Sadly, we don't have a key for everybody so you have to distribute the keys in a sensible manner.

If you think you need a key come by at Room 1112/13. Make sure you read and understand the "Hausordnung".

Tasks

T2A1: Important Thoughts

  1. What are the difference between Extended SCCharts and Core SCCharts. Make sure you know that.
  2. What advantages has the Core SCCharts normalization? It has to be something sensible or we wouldn't do it, right? RIGHT?
  3. Which constraints influence the ordering of a schedule? What combinations can you think of that make a model unschedulable?

T2A2: Checking you SCCharts Installation


a) Create a model


Model the following SCChart using the textual SCChart language (*.sctx).

The SCChart describes a simple railway station controller. Initially the track is powered with 60 units to allow any train standing on this platform to begin its journey. (We assume the train stands beyond contact0 and will not trigger it in the beginning.) Subsequently, the platform of this station slows down any train entering the station (indicated by contact0) and stops it when it passes contact1. After 5 seconds it may proceed its journey.

b) Transform that model


c) Simulation

d) Code Generation

T2A3: Referencing other stuff

When working as a big team it might be sensible to split the models into smaller parts. (Well there are other good reasons too, but never mind)

Play around a bit with the referencing feature.

Just a small outline what you need to do:

import <OtherSCChart>
state <name> references <OtherSCChart>(<VariableInOtherSCChart> to <VariableInThisSCChart>, <VariableInOtherSCChart> to <VariableInThisSCChart>, ...)

T2A4: Inheritence

Familiarize yourself with the concept of inheritance in SCCharts.

This should be used to extend the Environment as you see in your controller stub in your repository.

import <OtherSCChart>
state <name> extends <OtherSCChart>

T2A5: Railway and SCCharts (Bonus)

Build a small controller that uses the Railway C-API and controls a train. (Maybe just do the same controller as in Tutorial 1). You propably need to read up on hostcode for that one. In the final controller you should not really use hostcode directly, so this is kind of extra work for the moment.