Module 8 - Sequence Diagram Part 2 Flashcards
Constraint in sequence diagrams
1) all constraints appear in _________
2) all constraints constraint 1 and at most 2 event occurrences on lifelines
3) all constraints specify assertions that must be true for a execution to be valid
curly braces
time constraints are anchored to a single event occurrence that points to the event occurrence that is being constraint.
This example shows the time constraint is anchored to the ___________________
message sent part of fireThruster()
time constraint conveys a specific time or a window of time for a single ____occurance to occur … never multiple event occurrences .
event
what does this time constraint “executionTime” mean ?
Note : the time constraint is placed in the sending portion of the Firetrhusters message
it is conveying that Firethruster message is sent at time = executionTime.
what design decision is being conveyed with this time constraint ?
this conveys a window of time for that FireThruster message to be sent between 2am and 2:05 am GMT.
a time constraint does not convey the idea of _______
waiting
. it does not wait for a time to occur like an accept event actions where a ________ arrivessignal event arrives.
Duration constraint conveys the valid duration of time between a pair of _________ occurrences. the design is conveying that the firethruster message should execute anywhere 2min to 5 min long
event
a state invarient specifies a bool condition that must be true the moment when the contrained event occurs in order for the ____ to be valid
trace
the state invariant focuses on a single event occurrence being ___________
constrained.
current orbit radius = ordered orbit radius when true
4 common kinds of combined fragments in a sequence diagram
- opt - optional
- alt - alternative
- loop
- par - parallel ( concurrency )
what do they have in common ?
1. they represent
2. they have a rectangle in a seq diagram
3. they have an interaction operator ( keyword like opt , par … )
4. they have at least one interaction operand
5. each interaction operand can optionally have a guard.
what is a combined fragment in a seq diagram ?
a mechanism that allows you to add control logic to an interaction
the opt ( optional ) combined fragment rep
guard expression placement in the interaction operand
you should place the guard on top of the lifeline that has the first event occurrence on that lifeline.
language law: opt can only have one region in the combined fragment
its all or nothing decision logic.
when does the guard expression get evaluation in an opt combined fragment ?
the last event occurrence get executed
alt represents decisions logic with multiple outcomes. it must have multiple interaction operands to follow model law. The guard that is true represents which operation fires.
the moment the last event occurs right before the fc lifeline received the sensorStatus message in this case all the guards get evaluated
the guard that is true evaluates .
remember reply messages are ___________ to show on the diagram but they count towards counting event occurrences in the test.
optional
loop combined fraqment .. loop means number of occurances/ interaction.
language law - loop can only have 1 interaction operand . guards are optional design decision.
loop(min,max)
loop(0, *) this conveys to the reader the min and max number of loops that the operand will perform. The loop will not end for an upper bound because its * .. it will only end if the guard is false.
loop(10) what does this design decision convey ?
exactly 10 interactions
its also legal to leave it as loop .. without any min or max values.
loop(2,10) what does this information convey ?
the min number (2) is guaranteed to run two times. regardless of the guard expression . when the guard is true the it will run until 10 .
at least 2 and at most 10.
how many times will the orbitRadiusUpdated message be sent in this loop ?
cannot be determined. it can be somewhere between 2-10 because of the guard .. but if the guard is removed how many times will the orbitRadiusUpdated message be sent?? 10 is the answer .
how many times will the orbitRadiusUpdated message be sent in this loop ?
cannot be determined. it can be somewhere between 2-10 because of the guard .. but if the guard is removed how many times will the orbitRadiusUpdated message be sent?? 10 is the answer .
par combined fragment represents concurrent sets of event occurances . a par must have ______ regions . the order of event occurances are non determinisitic . any order would be deemed valid .
multiple .
the fc lifeline must send an initialize message _____ times before it can start receiving updates from any of the accelerometers . once all three are initialized the fc lifeline can recieve the updateYaw , updateRoll and updatePitch
3
interaction use represents behavior _______ . it represents a use of another interaction in your model. it makes interactions reusable
decomposition
interaction use is only allow to represent an
interaction
___________are represented by stars on this diagram.
actual gates
__________are represented by stars on this diagram.
formal gates