Module 9 - State Machine Part 1 Flashcards

1
Q

state machines define the behavior of a system . a state machine diagram provides a view of a state machine behavior.

three kinds of behaviors are

A

state machine shows up on a STM
activity shows up ACT
interaction shows up SD

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

weakness of activity diagram ?

cannot answer which ____ invokes that action

A

structure

swimlane tells reader which structure performs the action

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

1 not an intuitive diagram

weakness of a sequence diagram ?

#2 harder for people to understand who are not familiar with sysml
#3

A

3 cannot model an idea to wait before an event is occuring

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

weakness of a state machine diagram

A

its the most specific behavior .. it defines a set of states and transitions between states as events occurs . BUT not every object falls in line with a state machine diagram

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

an owned behavior is a behavior under a block within your model.
a single block can have multiple behaviors nested

A

under it

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

classifier behavior

classifier behavior = owned behavior . the attitude control state machine is nested under the block

A

a classifier behavior is a special role that the behavior plays in the owning block

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

the behavior that you select to be the classifier behavior for a given block is the behavior that will begin executing ___________ when the block is instantiated

A

automatically

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

two top level categories of elements that a state machine can own
Vertices
Transitions

which are vertices in this diagram ?

A

orbit insertions

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

knowledge check

two kinds of vertices
1) states
2) pseudo states

and two kinds of transitions
1) external transitions
2)

A

internal transitions

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

when is an internal tranistion

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

three common kinds of states
1) simple state
2)
3) final state

4) submachine state ( not covered in the course) but its how you represent a nested state machine inside a state machine

A

composite state

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

two common pseudo states

1) junction pseudo state
2) ______ pseudo state

A

initial

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

state machines can have multiple _____ represented by dashed lines

A

regions. Each region must have at least one active state in a region.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

a state machine may transition from one event to another one when an event occurs.

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

what are the names of the events in this state machine ? when an event occurs a transition may fire resulting in a change in a state.

guard must be true when the event occurs in order for an transition to fire.

A

startup Event
Shutdown Event

focus on the may if a sensor is in the offline state and a startup event occurs . might happen that powerAvailable == False.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

“at rest” in a state means the state is looking at the event pool waiting for the state to

A

occur

17
Q

what happens when an event occurs in a state machine ?

it begins by going to that owning ___________ event pool .

A

object

The state machine consumes that event pool occurrence . at the moment of consuming an event pool the guard gets evaluated

18
Q

what happens when an outgoing transition fires ?

The run to completion STEP is
#1 Do behavior is terminated
#2 then the run to completion step _____
#3 exit behaviors run and cannot be interrupted
#4 Transition effect behavior cannot be interrupted.
#6 then the next entry behavior is guaranteed to finish

and the state machine is not at rest and is not looking into the event pool.

A

begins

19
Q

Transition effect behaviors is

when a run to completion step is executing the state machine behavior is not at rest . Its not looking a the owning objects ____ ______

A

event pool.

20
Q

a state machine is at rest and a trigger event occurs for a transition coming out of a different state

ORBIT INSERTION STATE – what is the run to complete step ( sequence )
1. the STM begins executing and there is a run to completion step in the beginning of the STM.
2. Fire thruster transition executes
3. (entry behavior ) Read Temp executes
the state machine is not at ____while the run to completion step is running

A

rest

21
Q

ORBIT INSERTION STATE goes into rest behavior and then what behavior executes ?

A

Do behavior - Execute Spin Stabalization

22
Q

when does a state look at the event pool ?

A

only when the state is at rest.

23
Q

when does a Do behavior get interrupted ?

A

when a transition gets fired/begins .

24
Q

the STM has a run to completion step when it executes so the STM is not at rest.
1. entry executes
4. STM is at rest and look at that event pool
2. do
3. exit
sometime later a transfer complete event occurs. the STM is at rest but it detects a new trigger happened and all of the guards get evaluated.

whichever guard is true determine which will

note : another transition is coming out of the orbit insertion state

A

fire

25
Q

events can trigger a behavior to executing.

four common events are
1.
2. change
3. signal
4. time

A

call

26
Q

Triggerless transition with no Do behavior .. how does it behave ? when does a completion event generate

remember a triggerless transition may fire in response to a completion event only if guard = true

A

the moment the run to completion step is finished. If a state has no Do behavior specified the completion event will be generated the moment the completion step is finished

27
Q

which state is unreachable ?

state 3 has no Do behavior and has a behavior4 coming out of it.
when does the completion event get generated ? The moment the entry behavior in state 3 gets triggered.

A

it transitions immediately from state 3 to state 5

state 4 never gets reached .

28
Q

which transition will never fire from the Orbit Insertion state ?

how does this get resolved ?
– Add a Do behavior in Orbit insertion - this creates a window of time to be at rest while that Do behavior is running.
– add a guard to Initialize Mans transition – this creates a window for the transition to Acquisition state to fire

A

Acquisition transition

29
Q

what is a composite state ?
- have nested substates under it.

A

and how do they work ?
- they must have exactly one active state at all times ( same for multiple regions)
- could ( optional) have an initial pseudo state
- could transition from one state to another when the trigger and guard = true

30
Q

exit and entry - part of a run to completion step when transition fires
Do - begins automatically when the rest period of that state ____

also extry , do and exit behaviors are optional slots in states in STM

A

begins

31
Q

this is legal . transitions can cross over the composite state. If you do this , it does not change the run to completion step. What is different is the starting ____

A

substate.

32
Q

What are the run to completion steps from acquisition state

  1. entry
  2. do
  3. Activity J transition guard = true
  4. Activity K transition guard = true
  5. Activity A entry behavior (composite state On station )
  6. Then the state is at rest ..

think of a composite state like an onion with layers . tunneling from outer layer into onion layer

then after some time , the state is at rest and is looking at the event pool . Now Do behaviors are possible to continue .

A

Activity C entry behavior ( substate )

33
Q

when a state machine transitions from a composite state.

a trigger event occurs and enters the event pool. The composite states are at rest so the state machine consumes it and removes it from the event pool

when system error event occurs Activity L transition fires. Doesn’t matter which state in the composite states. The Do behaviors in the composite states get ____

A

aborted

34
Q

when leaving a composite state .. the inner activates execute first and then the outer exit behavior executes then the transition effect executes

A
35
Q

a check out and check in event occurs . which state will the state machine be in when it comes to rest.

A

checkedout.unmodifed

36
Q

internal and external transitions

A