Presentation is loading. Please wait.

Presentation is loading. Please wait.

Lecture 4 Correctness and Fairness Verification and Assurance.

Similar presentations


Presentation on theme: "Lecture 4 Correctness and Fairness Verification and Assurance."— Presentation transcript:

1 Lecture 4 Correctness and Fairness Verification and Assurance

2 Concurrent programs can have errors that cannot be discovered by testing. We review specification or correctness properties. We use inductive proofs of invariants to ensure correctness of concurrent programs. As we have seen construction of state diagrams can be impractical for real programs. We can use a computer program to construct and check a state diagram. Such a program is called a model checker. Introduction of Specification and Verification

3 Logical Specification of Correctness Properties The formula is called an invariant because it must always be true. Invariants are proved using induction, not over the natural numbers, but over all possible states of computation. (a)Prove A holds in the initial (base) case. (b)Assume that A is true is all states up the the current state (c) Prove that A is true in the next state (inductive step). If (a) and (c) can be proved we can conclude that A is true for all states of all computations.

4 Is Mutual Exclusion Enforced? By induction we can show that and By symmetric we can argue that what is true for p is true for q so Mutual Exclusion is enforced if is an invariant.

5 Basic Concepts of Temporal Logic The truth value of any logical statement about a computer program may change during its execution. First-order logic does not provide for this circumstance.

6 Always

7 Eventually

8

9 Duality

10 Sequences of Operators eventually will be always true

11 Order of Operators affects Meaning

12 Until and Weak-Until

13

14

15 K-Bounded Overtaking Lamport’s Bakery Algorithm is an example of k-bounded overtaking for what value of k?

16 Deductive Proof of Dekker's Algorithm

17 Reasoning about Progress

18

19

20

21

22

23

24

25

26

27

28

29


Download ppt "Lecture 4 Correctness and Fairness Verification and Assurance."

Similar presentations


Ads by Google