Finite-State Machines (FSM)

Let us focus on the ActionLogic components that contain the logic for the X-ray requests and actions. Use itemis CREATE to make an imperative/operational specification of its behavior using finite-state machines.

The external interface of your statechart should be:

interface request:
    // the integer selects the projection. 0 = frontal, 1 = lateral and 2 = biplane
    in event startLowVideo: integer
    in event stopLowVideo: integer
    in event startHighVideo: integer
    in event stopHighVideo: integer

interface controller:
    // the integer selects the projection. 0 = frontal, 1 = lateral and 2 = biplane
    out event activateLowVideo: integer
    out event activateHighVideo: integer
    out event deactivate

The value (the integer) of an event identifies a specific projection.

Event values can be used in itemis CREATE as in the following example that directly forwards the value of an incoming event to an outgoing event:

request.startLowVideo
/ raise controller.activateLowVideo : valueof(request.startLowVideo)

You can assume that the startLowVideo and stopLowVideo requests alternate for each specific projection, similarly for the startHighVideo and stopHighVideo. You have to take into account that there can be multiple ongoing requests for low video with different projections, possibly mixed with multiple ongoing requests for high video with different projections.

Hints

  • Make sure your diagram gives an insightful overview of the system.
  • You can put multiple raise actions on the same transition.
  • Start by modeling the situation in which, at most, 1 pedal is pressed at the same time before modeling combinations of pedal presses.
  • The assignment leaves some degrees of freedom in the logic to be modeled. If your model tends to get very complicated, then please revisit the modeling decisions that you have made.

Submission

You need to hand in two itemis models:

  1. FSM model for a 1-plane system.
    • In this model, the values of the events can be ignored.
  2. FSM model for a 2-plane system.
    • In this model, the value of the events needs to be considered.
    • Use the interface that was given above. You do not need explicit toggle selection requests.

For each itemis model, hand in the following items:

  1. itemis CREATE project (as it is in the repository)
  2. Screenshot of graphical statechart
  3. Textual modeling decisions (see the important remark in the Introduction)

Upload your models to the 5-fsm directory. Both models have their own sub-directory. Instructions for how to import the itemis CREATE projects can be found in the README.md file in the repository.