1 verification by model checking. 2 part 1 : motivation

17
1 Verification by Model Checking

Upload: chase-weber

Post on 26-Mar-2015

223 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: 1 Verification by Model Checking. 2 Part 1 : Motivation

1

Verification by Model Checking

Page 2: 1 Verification by Model Checking. 2 Part 1 : Motivation

2

Part 1 : Motivation

Page 3: 1 Verification by Model Checking. 2 Part 1 : Motivation

3

IntroductionIntroduction

Verification: verifying the correctness of computer systems hardware, software or combination

It is most obvious in safety-critical systems commercially critical mission critical

Page 4: 1 Verification by Model Checking. 2 Part 1 : Motivation

4

Verification partsVerification parts

Formal Verification techniques consist of three parts:

1. A framework for modeling systems some kind of specification language

2. A specification language for describing the properties to be verified

3. A verification method for establishing if the description of the system

satisfies the specification

Page 5: 1 Verification by Model Checking. 2 Part 1 : Motivation

5

ClassificationClassification

Approaches to verification can be classified in several ways: Proof-based vs. model-based Degree of automation Full- vs. property- verification Intended domain of application

hardware-software, sequential-concurrent, reactive-terminating, …

Pre- vs. post- development

Page 6: 1 Verification by Model Checking. 2 Part 1 : Motivation

6

Proof-based verificationProof-based verification

The system description is a set of formula Γ in a suitable logic

The specification is another formula The verification method is finding a proof that

Γ├ ├ means deduction

It typically needs the user guidance and expertise

Page 7: 1 Verification by Model Checking. 2 Part 1 : Motivation

7

Model-based verification Model-based verification

The system is represented by a model M for an appropriate logic

The specification is again represented by a formula

The verification method consist of computing whether a model M satisfies M satisfies : M╞

The computation is usually automatic for finite models

Page 8: 1 Verification by Model Checking. 2 Part 1 : Motivation

8

Degree of automationDegree of automation

From fully automated to fully manual

Page 9: 1 Verification by Model Checking. 2 Part 1 : Motivation

9

Full- vs. property-verificationFull- vs. property-verification

The specification may describe a single property of the system, or it may describe its full behavior (expensive).

Page 10: 1 Verification by Model Checking. 2 Part 1 : Motivation

10

Intended domain of applicationIntended domain of application

Hardware, software Sequential, concurrent Reactive , terminating

Reactive: reacts to its environment, and is not meant to terminate (e.g. operating systems, embedded systems, computer hardware)

Page 11: 1 Verification by Model Checking. 2 Part 1 : Motivation

11

Pre- vs. post-developmentPre- vs. post-development

Verification is of greater advantage if introduced early in system development

Page 12: 1 Verification by Model Checking. 2 Part 1 : Motivation

12

Model checkingModel checking

Model checking is an automatic, model-based, property-verification approach

It is intended to be used for concurrent and reactive systems The purpose of a reactive system is not necessarily to

obtain a final result, but to maintain some interaction with its environment

Concurrency bugs non reproducible not covered by test cases

Page 13: 1 Verification by Model Checking. 2 Part 1 : Motivation

13

Temporal LogicTemporal Logic

The idea is that a formula is not statically true or false in a model

The models of temporal logic contain several states a formula can be true in some and false in the others

The static notion of truth is replaced by a dynamic one the formulas may change their truth values

as the system evolves from state to state

Page 14: 1 Verification by Model Checking. 2 Part 1 : Motivation

14

Temporal Logic (cont.)Temporal Logic (cont.)

In model checking: The models M are transition systems The properties φ are formulas in temporal logic

Model checking steps:1. Model the system using the description language of a

model checker : M2. Code the property using the specification language of

the model checker : φ

3. Run the model checker with the inputs M and φ

Page 15: 1 Verification by Model Checking. 2 Part 1 : Motivation

15

Model checkerModel checker

M

ModelChecker

p → F qyes

no

φ

Error Trace

Page 16: 1 Verification by Model Checking. 2 Part 1 : Motivation

16

Linear vs. BranchingLinear vs. Branching Linear-time logics think of time as a set of paths

path is a sequence of time instances (Where time is linear, called Linear – Time Temporal Logic)

Branching time logics represent time as a tree it is rooted at the present moment and branches out

into the future (Where time is Branching, Called Computation Tree Logic).

Many logics were suggested during last years that fit into one of above categories

We study LTL in linear time logics and CTL in branching time logics

Page 17: 1 Verification by Model Checking. 2 Part 1 : Motivation

17

Linear vs. Branching (cont.)Linear vs. Branching (cont.)

Linear Time Every moment has a

unique successor Infinite sequences (words) Linear Time Temporal

Logic (LTL)

Branching Time Every moment has

several successors Infinite tree Computation Tree

Logic (CTL)