Professional Documents
Culture Documents
Lecture 11
Lecture 11
Lecture 11
Topics 1) Model Checking Example (ie. Mutual Exclusion) 2) Model Checking Algorithm 3) The SMV System 4) Examples of SMV Model Checking
Verification Properties
The following are two main kinds of properties that are usually verified. A safety property states that some bad thing never happens. Safety Properties represent requirements that should be continuously maintained by the system. They often express invariance properties. A liveness property states that some good thing eventually happens. Liveness properties represent requirements that need not hold continuously but whose eventual realization must be ensured.
Mutual Exclusion
When concurrent processes share a resource (such as a file on a disk or a database entry), it may be necessary to ensure that they do not have access to it at the same time. We therefore identify certain critical sections of each process code and arrange that only one process can be in its critical section at a time. The problem we are faced with is to find a protocol for determining which process is allowed to enter its critical section at a time. Once we have found one which we think works, we verify our solution by checking that it has some expected properties, such as the following ones: Safety: The protocol allows only one process to be in its critical section at any time. Liveness: Whenever any process wants to enter its critical section, it will eventually be permitted to do so. Non-blocking: A process can always request to enter its critical section. No strict sequencing: Processes need not enter their critical section in strict sequence
EU and EG.
Thus, for the intermediate stages, it is sufficient to be able to handle six cases : atomic, f, f1 f2, EX f, E[ f1 U f2] and EG f. For formulae of the form f, we label those states that are not labeled by f. For f1 f2, we label any state that is labeled either by f1 or by f2. For EX f, we label every state that has some successor state labeled by f. For formula E[ f1 U f2], we first find states that are labeled with f2. We then work backwards using the converse of the transition relation R and find all states that can be reached by a path in which each state is labeled with f1. All such states are labeled with E[ f1 U f2].
10
11
2) Abstraction: we abstract away variables in the model which are not relevant to the formula being checked.
3) Partial order reduction: for asynchronous systems, several interleavings of component traces may be equivalent as far as satisfaction of the formula to be checked is concerned.
4) Composition: break the verification problem down into several simpler verification problems.
12
13
14
15