Reaves.dev

v0.1.0

built using

Phoenix v1.7.12

Review Of UML

Stephen M. Reaves

::

2023-09-05

Notes about Lesson 3 of CS-6310

Summary

OMT

Object Management Technique was developed by James Rumbaugh at GE. It uses (at least) three diagrams:

OMT was the precursor to UML

Review of UML

Unified Modeling Language is standardized by the Object Management Group.

It is supported by CASE tools.

Three main architects:

Used for design and analysis

UML Diagram Types

Two main categories:

Class Model Diagram

Classic, most popular

Also called static models

Details structural properties

Classes and relationships

Contains:

Counter
-count : int
+increment() : : void
+display() : : void
+set(aCount : int = 0) : : void

Relationships

Three main relationships:

Object Diagram

Almost the same thing as class diagram, except it details instances, not classes.

Conveys objects and links instead of classes and relationships

Describes use of classes from class diagram

Composite Structure Diagram

Conveys internal structure of a class

Describes what provides an interface and what requires an interface

Component Diagram

Static implementation view

Component := a physical, replaceable part of a system that packages implementation and conforms to and provides the realization of a set of interfaces.

UML Reference Manual

Used to model code entities (i.e. binaries)

Used to convey architecture

Deployment Diagram

Configuration of run-time processing nodes and the component instances and objects that live on them.

Packages

General purpose organizing mechanism

Provides namespace scoping

System is the top-level package

Dependency arrows between packages indicate the existence of dependencies between constituents

Profile Design

Higher level

Properties of diagrams, not models

Profiles allow you to extend the basic UML notation

Structural Definitions

Class is the components and structural properties

Composite Structure is the internal structure and possible interactions

Component is the organization of physical software

Deployment is the physical system resources and how they map to hardware

Object is the static structure at a particular time

Package is the logical groupings and dependencies

Profile are extensions to the UML meta model

Use Case Diagram

Behavioral diagram

A use case is a sequence of user-visible actions along with system responses.

Useful for eliciting requirements

Depict the relationships among system actors and use cases

Two annotations

Use cases can be unstructured text or table

ActorActionObject
FosterbrowsesAmazon website
Fosterselectsbook
Amazonverifiescredit information

Context Diagram

Not part of UML

Dataflow Diagrams (DFDs) depict processes, actors, and dataflows among them

Context Diagram is the top-level DFD

GhoHuman OpponentpcPlay Chessho->pcHuman movespc->hoMachine movespc->hoBoard drawings

Sequence Diagram

Used to convey a single use case

ODBCProxyTransactionClientODBCProxyTransactionClient<<create>>setActions(a,d,o)setValues(d,3,4)setValues(a, "CO")committed<<destroy>>

Communication Diagram

Semantically equivalent to Sequence diagram

Object diagram annotated with ordered interactions instead of links

Activity Diagram

Deals with synchronization

Variant of a state machine in which states may be simultaneously active

Transitions are triggered by activity completion

Used to model workflows, process synchronization, concurrency

Interaction Overview Diagram

Overview of interaction diagrams

State Diagram

Most powerful and most complex

Extend Finite State Machines (FSMs)

Gcluster_mMaintenancecluster_tTestingcluster_cCommandingiIdletei:n->temaintaintstdTesting Devicests->tdte->i:ssdSelf Diagnosistd->sdsd->tecswWaitingcs->wcecCommandw->ckeyPressc->ce[not continue]c:n->w:n[continue]

Behavioral diagram definitions

Activity is a flow of control from activity to activity

Sequence is a interaction of classes of message exchange

Communication is object interaction of numbered messages

Interaction Overview is the synthesis of lower-level activity diagrams

Timing rotated sequence diagram

Use Case is a system functionality provided to external actors

State is the dynamic behavior in response to stimuli

Object Constraint Language

Textual extension to UML’s visual notation, in order to provide more precise specification

Applicable to Class and State diagrams

First-order predicate logic + diagram navigation + collection classes

-- Add amount to balance
context Account::deposit(Real : amount)
pre: amount > 0
post: balance = balance@pre + amount

UML Metamodel

UML defined in terms of UML

Extended by profiles