Lectures 7 and 8: 15th October 2019 Flashcards

Transition Systems

1
Q

What does Spin use as its underlying model?

A

Labelled Transition Systems

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

How can TSes be modelled as graphs?

A

Nodes represent the states and the edges represent the program’s transitions between them.

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

What are action names?

A

The identifiers sent from one process to another to perform certain functionality. Used in inter-process comms.

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

What are atomic propositions?

A

A statement or assertion that must be true or false.

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

How do you formally define a transition system?

A

Transition Systems are defined as (S, Act, T, I, AP, L)

where

S = finite set of states
Act = finite set of actions: ~ inputs
T = set of transitions, in form T ⊆ (S x Act x S): which state to go to from a current state for a given action
I = set of initial states
AP = set of atomic propositions
L:S→2 ^ AP = labelling function: determines which APs hold in which states

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

Why is the labelling function in a TS equal to 2 ** AP?

A

The number of labels for each state will be equal to 2 ^ |AP| since each AP is binary - each possible combo of true/false satisfaction.

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

What are direct-α successors?

A

All the states that can be transitioned to from a current state given the action α.

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

What are α-predecessors?

A

All the states that can transition to a current state given the action α.

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

What is a terminal state in a TS?

A

A state which has no successors for any action.

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

When is nondeterminism useful?

A

It can be useful for abstraction and underspecification and modelling stochastic environments and parallelism.

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

What is action-based determinism?

A

Systems are action-based deterministic iff there is ⩽ 1 transition from a state for each action.

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

What is state-based determinism?

A

Systems are state-based deterministic iff there is ⩽ 1 direct successor for each state whose list of holding APs is exactly the same, except for none holding (∅).

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

What are execution fragments?

A

Possible alternating sequences of states and actions that represent a trace of execution. For example, ϱ = s0 α1 s1 α2 s2 … αn sn

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

What are infinite execution fragments?

A

An execution fragment which loops infinitely, without ever terminating.

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

What are maximal execution fragments?

A

An execution fragment which is infinite or terminates in a terminal state - goes to the end of the execution.

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

What are initial execution fragments?

A

An execution fragment starts in an initial state - goes from the start of the execution.

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

What are reachable states?

A

States that can be transitioned to in a path from an initial state. They will have initial and finite execution fragments which terminate on them. Unreachable states have no predecessors.

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

How can you tell if a state is reachable from execution fragments?

A

All reachable states have initial and finite execution fragments which terminate on them.

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

When can states with connections (transactions going to them) still be unreachable?

A

The actions and conditions triggering the transitions to the state are impossible, or if all the states that would lead to it are themselves unreachable.

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

How do you label states, APs, and actions on TS diagrams?

A

states as name inside of a circle

APs as a comma-separated list (of those holding) above a state, within a {} wrapper: {AP1, AP2}

actions as name over an arrow (associated transition) between states

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

What is conditional branching?

A

A programming instruction that directs the computer to different parts of the program based on the results of a comparison.

22
Q

Can TSes represent conditional branching? If so, how?

A

Could have child states for all possible variable states, but with already present state explosion doing this is bad. Use conditional transitions instead.

23
Q

How do you notate conditional transactions?

A

g:α, where g is a Boolean condition (guard) and α is an

action possible provided g holds.

24
Q

What are action effects?

A

How the performance of an action alters state (global) variables.

25
Q

How can you obtain a TS from a graph containing conditional transitions?

A

A graph containing conditional transitions as edges is
not a transition system. We can obtain one by unfolding the graph: merge transitions with the same effects but different conditions and add states and make them represent the changes instead by adding information to the state on the variables that dictated the conditional transitions. Instead of conditional transitions being impossible, there will simply not be a transition between two states if their global (state) variables prevent this.

26
Q

What is a program graph?

A

Program graphs are a graphical representation of a program’s source code. For Spin models, the nodes of the program graph represent the states and the edges represent the program’s transitions between them. States will have code fragments to execute.

27
Q

How do you formally define program graphs?

A

A PG over set Var of typed variables is a tuple
PG = (Loc, Act, Effect, Ct, Loc0, g0) where

Loc is a set of locations and Act is a set of actions
Effect: Act × Eval(Var)→Eval(Var) is the effect function
Ct ⊆ Loc × Cond(Var) × Act × Loc is the conditional transition relation
Loc0 ⊆ Loc set of initial locations l1 –g:α–> l2
g0 ∈ Cond(Var) is the initial condition

every location in initial locations, Loc0, satisfies the initial condition, g0

Eval(Var) = η = set of variable evaluations over Var
Cond(Var) = set of boolean conditions over Var
Var is a set of typed state variables

28
Q

What is Eval(Var)?

A

Eval(Var) = η = set of variable evaluations over Var

Var is a set of typed state variables

29
Q

What is Cond(Var)?

A

Cond(Var) = set of boolean conditions over Var

Var is a set of typed state variables

30
Q

How do you formalise the effect of actions?

A

Effect: Act × Eval(Var)→Eval(Var)

Eval(Var) = η = set of variable evaluations over Var
Var is a set of typed state variables
Act is an action

31
Q

What is the difference between location and state?

A

location = a possible situation in a program’s execution that models a representation of past events and outcomes

state = location + variable values

32
Q

How do you notate states from locations and conditions?

A

state = ⟨l,η⟩, where l = location, and η = state variable evaluation

33
Q

How do you define the transition system for a program graph?

A

The TS(PG) of a PG = (Loc, Act, Effect, Ct, Loc0, g0) over Var is the tuple (S, Act, T, I, AP, L) where

S = Loc × Eval(Var)
T ⊆ S × Act × S
I = {⟨l,η⟩ | l ∈ Loc0 and η ⊨ g0}
AP = Loc ∪ Cond(Var)
L (⟨l,η⟩) = {l} ∪ {g ∈ Cond(Var) | η ⊨ g}

T ⊆ S × Act × S defined by the rule:
if premise holds, then conclusion holds; formally,

l1 –g:α–> l2 ⋀ η ⊨ g
—————————— (horizontal line like division)
⟨l1, η⟩→⟨l2, Effect(α,η)⟩

34
Q

What does T⊆S×Act×S represent within transition systems?

A

The transitions, from a current state, taking an action and giving a resultant state.

35
Q

What does the || operator mean?

A

parallel composition; it is usually commutative and associative but depends on the kind of communication supported.

36
Q

What does the ||| operator mean?

A

complete interleaving (with total independence)

37
Q

Why does complete interleaving with a shared variable to a depth of 2 give a diamond shape?

A

Effects of both LTSes will have the same effect as they are independent, so will combine to the same outcome regardless of which comes first. So single outcome (bottom state), with two paths there - via each of the two LTSes going first.

38
Q

What is the output of a complete interleaving operation on TSes?

A

Let TSi = (Si, Acti, Ti, Ii, APi, Li) be two interleaved transition systems.

TSi = TS1 ||| TS2 = (S1 × S2, Act1 ∪ Act2, T, I1 × I2, AP1 ∪ AP2, L)

where T is such that:

⟨s1, s2⟩ –α–> ⟨s’1, s2⟩

and

⟨s1, s2⟩ –β–> ⟨s1, s’2⟩

and L(⟨s1, s2⟩) = L1(s1) ∪ L2(s2)
for α ∈ Act1, β ∈ Act2
39
Q

How do you prevent interference of variables with the same names in two completely interleaved TSes?

A

Need to resolve variables at a higher level with joined system and variable names in the program graph.

40
Q

How are transitions from complete interleaving operations constrained?

A

⟨s1, s2⟩ –α–> ⟨s’1, s2⟩

and

⟨s1, s2⟩ –β–> ⟨s1, s’2⟩

41
Q

How do you interleave program graphs?

A

Let PGi = (Loci, Acti, Effecti, C(t,i), Loc(0,i), g(0,i)) be two program graphs over variables

PGi = PG1 ||| PG2 over Var1 ∪ Var2 = (Loc1 × Loc2, Act1 ⊎ Act2, Effect, Ct, Loc(0,1) × Loc(0,2), g(0,1) ⋀ g(0,2))

⊎ = disjoint union
⋀ = conjuction (‘and’ operator)

⟨l1, l2⟩ –g:α–> ⟨l’1, l2⟩

and

⟨l1, l2⟩ –g:β–> ⟨l1, l’2⟩

and Effect(α, η)(v) = Effecti(α, η)(v) if α ∈ Acti, v ∈ Vari

42
Q

What are critical actions?

A

Functionality performed by a program which access global variables and cannot be executed simultaneously

43
Q

What composes states in interleaved TSes?

A

tuples of the current variable values (evaluation) and location of each interleaved TS

44
Q

How do you notate the local variables of a program graph, PG1, that is completely interleaved with another program graph, PG2?

A

x1 ∈ Var1 ∖ Var2

45
Q

How do you notate the global variables of completely interleaved program graphs PG1 and PG2?

A

x ∈ Var1 ∩ Var2

46
Q

Are actions that are indivisible in program graphs indivisible in the model?

A

Yes

47
Q

Which actions do TSes express the effects of? What are the consequences of this?

A

TS only expresses the effects of actions that are completely executed.

48
Q

What is an execution of a transition system?

A

an initial and maximal execution fragment

49
Q

What is parallel composition?

A

( P || Q) expresses the parallel composition of the processes P and Q. It constructs an LTS which allows all the possible interleavings of the actions of the two processes. Actions, which occur in the alphabets of both P and Q, constrain the interleaving since these actions must be carried out by both of the processes at the same time. These shared actions synchronise the execution of the two processes. If the processes contain no shared actions then the composite state machine will describe all interleavings.

The parallel composition operator can be used to put processes in parallel. The behaviour of p ∥ q is the arbitrary interleaving of actions of the processes p and q, assuming for the moment that there is no communication between p and q. For example, the process a ∥ b behaves like a · b + b · a.

50
Q

What is complete interleaving?

A

When two LTSes (programs) execute simultaneously and take turns nondeterministically. They often interfere with each other when using shared variables.