Skip to content

Latest commit

 

History

History
142 lines (106 loc) · 6.15 KB

File metadata and controls

142 lines (106 loc) · 6.15 KB

This documentation is intended for language engineers using or extending the use case diagram (UCD) language. A detailed documentation for modelers who use the UCD language is located here. We recommend that language engineers read this documentation for modelers before reading the other documentation.

Use Case Diagrams

The module described in this document defines a MontiCore language for UCDs.

This module contains

  • one grammar and
  • a generated symbol table infrastructure including functionality for creating symbol tables and (de-)serializing symbol tables.

An Example Model

The graphical syntax of an example UCD
Figure 1: The graphical syntax of an example UCD.

 

Figure 1 depicts the UCD Example in graphical syntax. It contains all syntactic UCD elements supported by this MontiCore language. In textual syntax, the UCD is defined as follows:

usecasediagram Example {
  @Player --
    Play,
    Pay,
    ChangeProfilePicture;

  @AndroidPlayer specializes Player;
  @IOSPlayer specializes Player;

  @Server --
    ShowAd,
    RegisterScore;

  ShowAd extend Play [!isPremium];
  RegisterScore extend Play;

  abstract Pay include CheckPremium;
  CreditCard specializes Pay;
  Bank specializes Pay;
  ChangeProfilePicture [isPremium];
}

Command Line Interface (CLI) Usage

The class UCDCLI provides typical functionality used when processing models. To this effect, the class provides methods for parsing, creating symbol tables, storing symbols, and loading symbols.

The class provides a main method and can thus be used as a CLI. Building this gradle project yields the executable jar UCDCLI, which can be found in the directory target/libs. The usage of the UCDCLI tool and detailed instructions for building the took from the source files are described here.

Grammars

This module contains the grammar UCD.mc4.

UCD

The grammar UCD contains the basic constituents to define textual representations of UCDs. A detailed documentation of the grammar can be found in the artifact defining the grammar.

The grammar defines the syntax for

  • UCD artifacts,
  • UCDs,
  • use cases,
  • actors, and
  • include and extend relations.

The grammar extends the grammars

Context Conditions

There are not context conditions for the language.

Symbol Table

The UCD language defines the symbol kinds UCDUseCaseSymbol and UCDActorSymbol. UCD export instances of these symbol kinds. UCDs do not import any symbols. The language uses the symbol table infrastructure generated by MontiCore as it is without handwritten modifications.

Symbol Table Data Structure

The UCDGlobalScope contains UCDArtifactScopes. Each UCDArtifactScope instance contains exactly one DiagramSymbol for the UCD. Further, each UCDArtifactScope instance contains exactly one UCDUseCaseSymbol for each use case defined in the UCD and one UCDActorSymbol for each actor defined in the UCD.

Symbol kinds used by the UCD language (importable or subclassed):

The language does not reuse any symbol kinds. It only uses the symbol kinds defined by the language.

Symbol kinds defined by the UCD language (exported):

UCDUseCaseSymbol for use cases and UCDActorSymbol for actors.

Symbols imported by UCD models:

none.

Symbols exported by UCD models:

Each UCDArtifactScope instance contains exactly one UCDUseCaseSymbol for each use case defined in the UCD and one UCDActorSymbol for each actor defined in the UCD.

Serialization and De-serialization of Symbol Tables

The DeSers generated by MontiCore are not changed by any handwritten modifications.

Further Information