Tutorial

This tutorial assumes that the tool installation has been completed. The goal of this tutorial is to get experience with interface modeling and the use of the generator facilities of the CommaSuite tooling. See the User Guide for a short introduction to the CommaSuite framework. This tutorial does not use namespaces; see the user guide for details of namespaces.

Case study

As a case study, we consider a simple vending machine implemented in Java. There is a GUI that can be used to interact with the vending machine. During the workshop, the interface behavior of the vending machine component will be specified using CommaSuite. The interaction between the GUI and the vending machine will be recorded in a trace file. Using a generated monitor it can be checked if this trace conforms to the specified behavior. In addition, the tutorial addresses the generation of other artefacts such as UML diagrams, documentation and tests.

The vending machine is a component with three interfaces, as shown in the figure below:

  • A provided interface for users to insert money, order products and get money back.

  • A provided service interface to switch the machine on and off, and to load products.

  • A required interface to check coins. The coin check component which provides this interface may raise an error, called CoinCheckerProblem, and it can be reset.

image

Resources for additional support

There are several resources for additional support:

  • Shortcuts provides an overview of Eclipse commands and shortcuts. For instance:

    • <CTRL>-<SPACE> for content assist.

    • <CTRL>-<SHIFT>-F for automatic formatting

  • The CommaSuite User Guide Eclipse: go to menu Help > Help Contents, section CommaSuite User Guide or use F1.

  • Available example(s): File > New > Example. Most relevant for this tutorial is the Tutorial Example.

  • In case of problems, consult the problems solving part of the tutorial.