Brain Dump

UML

Tags
soft-eng

Is a standard design [see page 20, notation] for documenting modern software systems.

Section
Class Diagram
Use Case Diagram
State Transition Diagram
Sequence Diagram
Component Diagrams

I endure writing these in latex using the tikz-uml package. In tbl:tikz-uml-index you can find a reference to the documentation for the various sorts of graphs you'd want to build with tikz. Many of these expand on the documentation you find here.

Table 2: Listing of the various relations between UML entities. tbl:assoc
ConnectionExampleDescription
umldep\begin{tikzpicture} \umlsimpleclass{A} \umlsimpleclass[x=3cm]{B} \umldep{A}{B} \end{tikzpicture}A dependency
umlassoc\begin{tikzpicture} \umlsimpleclass{A} \umlsimpleclass[x=3cm]{B} \umlassoc{A}{B} \end{tikzpicture}An association
umluniassoc\begin{tikzpicture} \umlsimpleclass{A} \umlsimpleclass[x=3cm]{B} \umluniassoc{A}{B} \end{tikzpicture}A unidirectional association
umlaggreg\begin{tikzpicture} \umlsimpleclass{A} \umlsimpleclass[x=3cm]{B} \umlaggreg{A}{B} \end{tikzpicture}An aggregation
umluniaggreg\begin{tikzpicture} \umlsimpleclass{A} \umlsimpleclass[x=3cm]{B} \umluniaggreg{A}{B} \end{tikzpicture}A unidirectional aggregation
umlcompo\begin{tikzpicture} \umlsimpleclass{A} \umlsimpleclass[x=3cm]{B} \umlcompo{A}{B} \end{tikzpicture}A composition
umlunicompo\begin{tikzpicture} \umlsimpleclass{A} \umlsimpleclass[x=3cm]{B} \umlunicompo{A}{B} \end{tikzpicture}A unidirectional composition
umlimport\begin{tikzpicture} \umlsimpleclass{A} \umlsimpleclass[x=3cm]{B} \umlimport{A}{B} \end{tikzpicture}An import
umlinherit\begin{tikzpicture} \umlsimpleclass{A} \umlsimpleclass[x=3cm]{B} \umlinherit{A}{B} \end{tikzpicture}An inheritance
umlimpl\begin{tikzpicture} \umlsimpleclass{A} \umlsimpleclass[x=3cm]{B} \umlimpl{A}{B} \end{tikzpicture}An implementation
umlnest\begin{tikzpicture} \umlsimpleclass{A} \umlsimpleclass[x=3cm]{B} \umlnest{A}{B} \end{tikzpicture}A nesting
umlreal\begin{tikzpicture} \umlsimpleclass{A} \umlsimpleclass[x=3cm]{B} \umlreal{A}{B} \end{tikzpicture}A realisation

In table tbl:assoc you can see a listing of the various kinds of UML associations. A directed association is one with a sense of direction between entities that can be navigated. You can [see page 7, cross] one side of an association between two entities A -> B to indicate you may not navigate A to B, it says nothing about the reverse. A half-filled circle on either side of an association indicates [see page 7, end-role-ownership].

Advantages and Disadvantages

[see page 4, Advantages]:

  • Illustrating relationships is easier visually then textually.
  • Formal interpretations possible for most diagrams.
  • Can be extended to set theory (cd), petri nets (ad) and automata (stm).

Disadvantages:

  • Some semantic details cannot be expressed:
    • Are sub-classes exhaustive, or can there be more?
    • Are sub-classes disjoint or overlapping?
  • Some logical relations cannot be expressed.