Lectures 3 and 4 - 24th September 2019 Flashcards

PROMELA continued and linear-time properties

1
Q

What do atomic code blocks do in PROMELA?

A

They execute without interruption; all other processes wait until they are finished to prevent inter-process interference.

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

What are the properties of communication channels in PROMELA?

A

Unidirectional, specified, synchronous or asynchronous, can have one or multiple senders or receivers

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

How do you open and use communication channels in PROMELA?

A

Specify with chan type, send with !, receive with ?.

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

What are do blocks in PROMELA?

A

loops that are only broken with a break, return, etc in their code body

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

How does nondeterminism work in PROMELA?

A

Give multiple options for an operation to perform as with an NFA; all options (states) are evaluated in verification processes.

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

What are some ops that can be performed on comms channels in PROMELA?

A

length, if empty, if full, wait for specific message, and where to write received messages

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

Can active processes have arguments? Why?

A

No as they start themselves, so nothing to pass the arguments to them

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

Why would it make sense for the init() process to have an atomic block?

A

You don’t want any active processes or passive processes it starts to interleave and interfere with the initialisation process

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

What are safety properties?

A

Formalised conditions to prevent unwanted behaviour or conditions from a system

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

What is the mutual exclusion property?

A

A safety property ensuring that at most one process is within a particular specified critical section of code

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

What are liveness properties?

A

Formalised conditions to ensure that some desired functionality will eventually be executed

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

What are the 3 main variants of liveness properties?

A

eventually: each process will eventually enter its critical section

repeated eventually: each process will enter its critical section infinitely often

starvation freedom: each waiting process will eventually enter its critical section

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

What are invariants?

A

A check made to ensure something is always of the same state or value: an example of a verifiable safety property which has to be true in all system states.

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

How are invariants implemented in PROMELA?

A

using the assert() method

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

What are labels in PROMELA?

A

A prefix to a statement that makes a particular location in a program’s code referenceable

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

How can you check where a process is in its code in PROMELA?

A

[]@ is true iff the th process with the name is at the label

17
Q

How can you extract local variables from processes in PROMELA?

A

:

18
Q

What is the safe termination system property?

A

A safety property that checks whether all processes have reached a valid end state at the end of execution.

19
Q

What is livelock?

A

When threads or processes are unable to progress due to them responding to each other during resource starvation, being stuck in an infinite loop of trying to get the resource.

20
Q

How can you check for liveness in SPIN?

A

Label locations in the program as acceptable end states and check the processes reach them

21
Q

What is fairness?

A

The evenness of the likelihood that different threads are able to advance whatever they are doing

22
Q

What is unconditional fairness?

A

Every process gets its turn infinitely often

23
Q

What is strong fairness?

A

Every process that is enabled infinitely often gets its turn infinitely often

24
Q

What is weak fairness?

A

Every process that is continuously enabled from a certain time instant onwards gets its turn infinitely often

25
Q

What variants of fairness can SPIN check for?

A

weak fairness

26
Q

What are SPIN, ISPIN, and PROMELA, and how are they related?

A

SPIN is a general tool for the logical verification of concurrent software in a rigorous and mostly automated fashion.

ISPIN is a GUI for SPIN.

PROMELA is a verification modeling language used with the SPIN tool.