Sequence Diagrams
Sequence Diagrams
INTERACTION DIAGRAMS
Jeroen Keiren
- Optimization to user
experience -> bug
language processing
- Bug in choosing numbers
that map to tokens
- Lead to sentences that
make no sense
- “Inference kernels
produced incorrect results
when used in certain GPU
configurations”
https://www.reddit.com/r/ChatGPT/comments/1avwqzh/very_strange_rambling_responses/
https://status.openai.com/incidents/ssg8fh7sfyz3
Diagram
Structure Behavior
Diagram Diagram
Class Package Profile Object Activity State Machine Interaction Use Case
Diagram Diagram Diagram Diagram Diagram Diagram Diagram Diagram
• Use case diagram describes tasks that system must help actors to
perform
• Class diagram describes classes required to realize use cases and
relationships between these classes
• Interaction diagrams describe how objects interact to realize the use
case scenarios
• Interaction diagrams should be consistent with the corresponding
class diagrams and use case diagrams
Sequence diagram
• Vertical axis:
• chronological order
• Horizontal axis:
• interaction partners
Communication diagram
• Models the relationships between communication partners
• Focus: Who communicates with whom
• Time is not a separate dimension
• Message order via decimal classification
Timing diagram
• Shows state changes of the
interaction partners that result from
the occurrence of events
• Vertical axis: interaction partners
• Horizontal axis: chronological order
Diagram
Structure Behavior
Diagram Diagram
Class Package Profile Object Activity State Machine Interaction Use Case
Diagram Diagram Diagram Diagram Diagram Diagram Diagram Diagram
• Two-dimensional diagram
• Horizontal axis: involved interaction partners
• Vertical axis: chronological order of the
interaction
• Interaction = sequence of event
specifications
Object Actor
• Object creation
• Dashed arrow
• Arrowhead points to the head of the
lifeline of the object to be created
• Keyword new
• Object destruction
• Object is deleted
• Large cross (×) at the end of the lifeline
• Synchronous
• Asynchronous
• Response
Execution specification
• Execution specification
• Continuous bar
• Used to visualize when an interaction
partner executes some behavior
Order of messages:
»Happens before«
• Synchronous message
• Sender waits until it has received a response message
before continuing
• Syntax of message name: msg(par1,par2)
• msg: the name of the message
• par: parameters separated by commas
• Asynchronous message
• Sender continues without waiting for a response message
• Syntax of message name: msg(par1,par2)
• Response message
• May be omitted if content and location are obvious
• Syntax: att=msg(par1,par2):val
• att: the return value can optionally be assigned to a variable
• msg: the name of the message
• par: parameters separated by commas
• val: return value
• Found message
• Sender of a message is unknown or not relevant
• Lost message
• Receiver of a message is unknown or not relevant
• Time-consuming message
• "Message with duration”
• Usually messages are assumed to be transmitted without any loss of time
• Express that time elapses between the sending and the receipt of a message
Operator
Operand
Operand
Operand
• Multiple operands
• Guards have to be disjoint to avoid
nondeterministic behavior
Max
Min
Guard
Notation alternatives:
Combined
Control constructs
fragment
• Set context
• Identify participants that should interact to realize the use-case
scenario / to respond to messages arriving at the interface
• Set lifeline for each participant
• Add messages by drawing arrows
• Order messages from left to right, top to bottom
• Show how they are passed from one object to another
• Add activations to each participant’s lifeline
• Validate the sequence diagram
• Allows you to send and receive messages beyond the boundaries of the
interaction fragment
Target
marker
Start
marker
Local
attributes
• Types
• Point in time for event occurrence
• Relative: e.g., after(5sec)
• Absolute: e.g., at(12.00)
• Time period between two events
• {lower..upper}
• E.g., {12.00..13.00}
• Predefined actions
• now: current time
• Can be assigned to an attribute and then used in a time constraint
• Duration: calculation of the duration of a message transmission