You are on page 1of 19

INTRODUCTION TO PROGRAM

VERIFICATION
Bui Hoai Thang
(thang@cse.hcmut.edu.vn)

FORMAL METHODS

Specification

From specification to program (automatically ?)

Verification

Let do it and then verify it

Edmund M. Clarke and Jeannette M. Wing, Formal Methods: State of the Art and Future Directions, ACM Computing Surveys vol.28, 1996, pp.626-643

Introduction

Model Checking Theorem Proving

Sep 2012

SPECIFICATION

Specification languages

CCS: Calculus of Communicating Systems (process algebra) CSP: Communicating Sequential Processes Z/B

Carroll Morgan, Programming from Specifications, Prentice Hall, 1994


Introduction

CCS: Milner's Calculus of Communicating Systems CSP: Hoare's Communicating Sequential Processes ACP: Bergstra & Klop's Algebra of Communicating Processes http://theory.stanford.edu/~rvg/process.html http://en.wikipedia.org/wiki/Specification_language
3

Sep 2012

CCS: CALCULUS OF COMMUNICATING


SYSTEMS

Slide at pswlab.kaist.ac.kr

http://en.wikipedia.org/wiki/Calculus_of_communicating_systems

Introduction

Sep 2012

CSP: COMMUNICATING SEQUENTIAL PROCESSES

Slide from www.lix.polytechnique.fr

http://en.wikipedia.org/wiki/Communicating_sequential_processes

Introduction

Sep 2012

Z/B

B-method

http://en.wikipedia.org/wiki/B-Method

Introduction

Sep 2012

ANYTHING ELSE?

7
Introduction Sep 2012

FORMAL VERIFICATION

Validation vs. verification

Validation: build the right thing Verification: build the thing right

Software company:

Validation: inspection (?) Verification: testing (?) ?


8

Introduction

Sep 2012

FORMAL VERIFICATION

Two approaches:

Model checking Theorem proving

Introduction

Sep 2012

MODEL CHECKING

Model checking

Search for a violation of a property on a model Advantages:


No proofs!!! Fast Counterexamples No problem with partial specifications Logics can easily express many concurrency properties

Why model checking ? (E. M. Clarke)

Main Disadvantage: State Explosion Problem


Too many processes In digital hardware terms: too many latches

10

McMillan (A brief history of MC)

Introduction

Sep 2012

MODEL CHECKING PRINCIPLE

System modeling

Specification languages

Algorithms Approaches Techniques

Introduction

11

Sep 2012

MODEL CHECKING PRINCIPLE

System modeling

Nested DFS Exhaustive search Directed search Evolution algorithms (GA, ACO, )

Algorithms

Approaches Techniques

12

Introduction

Sep 2012

MODEL CHECKING PRINCIPLE

Specification languages

Symbolic vs. Explicit-state Fix-points vs. exhaustive search

Algorithms

Approaches

Techniques
Abstraction Partial Order Reduction

13

Introduction

Sep 2012

MODEL CHECKING PRINCIPLE

NuSMV: symbolic model checking

http://nusmv.fbk.eu/

SPIN: explicit-state model checking

http://spinroot.com/

JPF Java Path Finder


Introduction

http://babelfish.arc.nasa.gov/trac/jpf

PAT

NUS

14

Sep 2012

THEOREM PROVING

Axiom semantics (>>)

15

Introduction

Sep 2012

THEOREM PROVING TOOLS


ACL2 http://userweb.cs.utexas.edu/users/moore/acl2/ PVS http://pvs.csl.sri.com/ Yices http://yices.csl.sri.com/ Z3 http://research.microsoft.com/projects/z3 Pico/Preco-SAT, Quantor (SAT/QBF): http://fmv.jku.at/picosat/, http://fmv.jku.at/precosat/, http://fmv.jku.at/quantor/ Vampire:http://vprover.org

16

http://research.microsoft.com/en-us/events/tptpa2011/

Introduction

Sep 2012

THEOREM PROVING TOOLS

Isabelle

17

http://www.cl.cam.ac.uk/research/hvg/Isabelle/

Introduction

Sep 2012

OUR TOOLS

http://elearning.cse.hcmut.edu.vn/provegroup/
GRANGOLFER:

Base on NuSMV Abstraction heuristic Guided search/(Guided) Random-walk search


Introduction

18

Sep 2012

WHAT SHOULD WE DO ?

Program -------- ???? ---------> Good/Bad

19

Introduction

Sep 2012

You might also like