computationalapproachestoanalyzecomplex dynamicsystems ... ·...

102
Computational approaches to analyze complex dynamic systems: model-checking and its applications. Part 1: Model-checking of discrete event systems Morgan Magnin [email protected] www.morganmagnin.net NII - Inoue Laboratory École Centrale de Nantes - IRCCyN - MeForBio team Lecture Series - Lecture 1 - 2013/03/21 M. Magnin (IRCCyN-NII) Lecture Series - Lecture 1 / NII 2013/03/21 1 / 64

Upload: others

Post on 04-Jun-2020

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Computationalapproachestoanalyzecomplex dynamicsystems ... · Computationalapproachestoanalyzecomplex dynamicsystems: model-checkingandits applications. Part 1: Model-checking of

Computational approaches to analyze complexdynamic systems: model-checking and its

applications.Part 1: Model-checking of discrete event systems

Morgan [email protected]

www.morganmagnin.net

NII - Inoue LaboratoryÉcole Centrale de Nantes - IRCCyN - MeForBio team

Lecture Series - Lecture 1 - 2013/03/21

M. Magnin (IRCCyN-NII) Lecture Series - Lecture 1 / NII 2013/03/21 1 / 64

Page 2: Computationalapproachestoanalyzecomplex dynamicsystems ... · Computationalapproachestoanalyzecomplex dynamicsystems: model-checkingandits applications. Part 1: Model-checking of

1 Vitæ

2 Introduction

3 Introduction to Petri nets based modeling

4 Modeling discrete biological systems thanks to Petri nets

5 Automata and state machines

6 Logics

M. Magnin (IRCCyN-NII) Lecture Series - Lecture 1 / NII 2013/03/21 2 / 64

Page 3: Computationalapproachestoanalyzecomplex dynamicsystems ... · Computationalapproachestoanalyzecomplex dynamicsystems: model-checkingandits applications. Part 1: Model-checking of

Vitæ

Overview

1 Vitæ

2 Introduction

3 Introduction to Petri nets based modeling

4 Modeling discrete biological systems thanks to Petri nets

5 Automata and state machines

6 Logics

M. Magnin (IRCCyN-NII) Lecture Series - Lecture 1 / NII 2013/03/21 3 / 64

Page 4: Computationalapproachestoanalyzecomplex dynamicsystems ... · Computationalapproachestoanalyzecomplex dynamicsystems: model-checkingandits applications. Part 1: Model-checking of

Vitæ

Vitæ

2004 Engineer diploma in “Computer Science”2004 Master thesis in “Automatics and Applied Computer Sci-

ence”2007 PhD thesis in “Automatics and Applied Computer Sci-

ence”École Centrale de Nantes / Université de Nantes⇒ model-checking, dynamic systems, expressivity be-tween models

Since 2008: Associate professor in Computer Science at École Centralede Nantes / MeForBio research team at IRCCyN ⇒ bio-informatics, large-scale analysis, parameters inference

Since 2010: E-Learning Project Manager at École Centrale de Nantes

M. Magnin (IRCCyN-NII) Lecture Series - Lecture 1 / NII 2013/03/21 4 / 64

Page 5: Computationalapproachestoanalyzecomplex dynamicsystems ... · Computationalapproachestoanalyzecomplex dynamicsystems: model-checkingandits applications. Part 1: Model-checking of

Vitæ

A few words about ICT for Education

Information and Communication Technologies Applied to EducationAn emerging cross-disciplinary research topic in our institutionSeveral papers and projects about:

Skills assessment (e.g. Script Concordance Tests)Integration and impact of mobiles devices in the learning environment(adaptation, motivation, . . .)Massive Online Open Courses (1st French MOOC, ITyPA: 1.400students)

International collaborations:2008-2010: HP2008-2011: OpenOffice.org Education projectSince 2009: University of Toronto (co-supervision with Karen Reid ofthe MarkUs software)

Co-advisor of 1 PhD Student: Augmented learning in science andengineering

M. Magnin (IRCCyN-NII) Lecture Series - Lecture 1 / NII 2013/03/21 5 / 64

Page 6: Computationalapproachestoanalyzecomplex dynamicsystems ... · Computationalapproachestoanalyzecomplex dynamicsystems: model-checkingandits applications. Part 1: Model-checking of

Vitæ

A few words about ICT for Education

E-learning group (ECN)

Morgan MAGNIN Francisco CHINESTA Guillaume MOREAUAss. prof. (CS) & project manager Professor (mechanics) Professor (CS)

Christine EVAIN Anne-Celine GROLLEAU Simon CAROLANAssociate professor (English) Research engineer 1st year PhD student

M. Magnin (IRCCyN-NII) Lecture Series - Lecture 1 / NII 2013/03/21 6 / 64

Page 7: Computationalapproachestoanalyzecomplex dynamicsystems ... · Computationalapproachestoanalyzecomplex dynamicsystems: model-checkingandits applications. Part 1: Model-checking of

Vitæ

Main research activities: Bio-informatics

MeForBio (IRCCyN team, ECN): Formal Methods for Bioinformatics

Research axesModels: automata, Petri nets, process algebra (→ process hitting)Extended with: time (chronometry vs chronology) and/orparametersAnalysis techniques: model-checking, control, abstraction, parametersinferenceApplied (and/or designed) to biology, e.g. biological regulatorynetworks

M. Magnin (IRCCyN-NII) Lecture Series - Lecture 1 / NII 2013/03/21 7 / 64

Page 8: Computationalapproachestoanalyzecomplex dynamicsystems ... · Computationalapproachestoanalyzecomplex dynamicsystems: model-checkingandits applications. Part 1: Model-checking of

Vitæ

Main research activities: Bio-Informatics

MeForBio (IRCCyN team, ECN): Formal Methods for Bioinformatics

Olivier ROUX Morgan MAGNIN Carito GUZIOLOWSKIProfessor & team leader Associate professor Associate professor

Julien GRAS Maxime FOLSCHETTE Courtney CHANCELLORResearch engineer 2nd year PhD student 1st year PhD student

M. Magnin (IRCCyN-NII) Lecture Series - Lecture 1 / NII 2013/03/21 8 / 64

Page 9: Computationalapproachestoanalyzecomplex dynamicsystems ... · Computationalapproachestoanalyzecomplex dynamicsystems: model-checkingandits applications. Part 1: Model-checking of

Introduction

Overview

1 Vitæ

2 Introduction

3 Introduction to Petri nets based modeling

4 Modeling discrete biological systems thanks to Petri nets

5 Automata and state machines

6 Logics

M. Magnin (IRCCyN-NII) Lecture Series - Lecture 1 / NII 2013/03/21 9 / 64

Page 10: Computationalapproachestoanalyzecomplex dynamicsystems ... · Computationalapproachestoanalyzecomplex dynamicsystems: model-checkingandits applications. Part 1: Model-checking of

Introduction

Introduction (1/2)

Real-time system

Process

Control or supervisory system

eventsmeasures control

Figure: Analyzed system: { process + control system }

M. Magnin (IRCCyN-NII) Lecture Series - Lecture 1 / NII 2013/03/21 10 / 64

Page 11: Computationalapproachestoanalyzecomplex dynamicsystems ... · Computationalapproachestoanalyzecomplex dynamicsystems: model-checkingandits applications. Part 1: Model-checking of

Introduction

Introduction (1/2)

Real-time system

Process

Control or supervisory system

eventsmeasures control

Figure: Analyzed system: { process + control system }

Formal verification of real-time systemsEmbedded systems (cars, planes, . . .)Logistics (systems engineering)Systems biology (gene regulatory networks)

M. Magnin (IRCCyN-NII) Lecture Series - Lecture 1 / NII 2013/03/21 10 / 64

Page 12: Computationalapproachestoanalyzecomplex dynamicsystems ... · Computationalapproachestoanalyzecomplex dynamicsystems: model-checkingandits applications. Part 1: Model-checking of

Introduction

But still, why do we want to perform formal verification?

M. Magnin (IRCCyN-NII) Lecture Series - Lecture 1 / NII 2013/03/21 11 / 64

Page 13: Computationalapproachestoanalyzecomplex dynamicsystems ... · Computationalapproachestoanalyzecomplex dynamicsystems: model-checkingandits applications. Part 1: Model-checking of

Introduction

But still, why do we want to perform formal verification?

Figure: Ariane 5 - Flight 501

M. Magnin (IRCCyN-NII) Lecture Series - Lecture 1 / NII 2013/03/21 11 / 64

Page 14: Computationalapproachestoanalyzecomplex dynamicsystems ... · Computationalapproachestoanalyzecomplex dynamicsystems: model-checkingandits applications. Part 1: Model-checking of

Introduction

But still, why do we want to perform formal verification?

The two most well-known computer bugs (at least, for themodel-checking community)

Crash of the european Ariane 5 rocket in 1996Exploded 39 seconds after takeoffCost 370 millions US$Overflow in a conversion of a 64 bit floating point number into a 16bit integer data conversion from a 64-bit floatingSoftware from Ariane 4 was re-used for Ariane 5 without re-testinghttp://en.wikipedia.org/wiki/Ariane_5_Flight_501

Pentium FDIV bug, 1994.Flaw in the division algorithmCost an average 500 million US$ and image loss for Intelhttp://en.wikipedia.org/wiki/Pentium_FDIV_bug

M. Magnin (IRCCyN-NII) Lecture Series - Lecture 1 / NII 2013/03/21 11 / 64

Page 15: Computationalapproachestoanalyzecomplex dynamicsystems ... · Computationalapproachestoanalyzecomplex dynamicsystems: model-checkingandits applications. Part 1: Model-checking of

Introduction

But still, why do we want to perform formal verification?

The two most well-known computer bugs (at least, for themodel-checking community)

Crash of the european Ariane 5 rocket in 1996Exploded 39 seconds after takeoffCost 370 millions US$Overflow in a conversion of a 64 bit floating point number into a 16bit integer data conversion from a 64-bit floatingSoftware from Ariane 4 was re-used for Ariane 5 without re-testinghttp://en.wikipedia.org/wiki/Ariane_5_Flight_501

Pentium FDIV bug, 1994.Flaw in the division algorithmCost an average 500 million US$ and image loss for Intelhttp://en.wikipedia.org/wiki/Pentium_FDIV_bug

M. Magnin (IRCCyN-NII) Lecture Series - Lecture 1 / NII 2013/03/21 11 / 64

Page 16: Computationalapproachestoanalyzecomplex dynamicsystems ... · Computationalapproachestoanalyzecomplex dynamicsystems: model-checkingandits applications. Part 1: Model-checking of

Introduction

But still, why do we want to perform formal verification?

Emergence of model-checkingTo automatically find bugs and prove correctness of modelsEdmund Clarke, E. Allen Emerson and Joseph Sifakis: Türing Awardin 2007

M. Magnin (IRCCyN-NII) Lecture Series - Lecture 1 / NII 2013/03/21 11 / 64

Page 17: Computationalapproachestoanalyzecomplex dynamicsystems ... · Computationalapproachestoanalyzecomplex dynamicsystems: model-checkingandits applications. Part 1: Model-checking of

Introduction

Motivations

Objective: formal verification of propertiesModel the system S :

Discrete models: finite state automata, Petri nets, . . . ⇒ Lecture 1Timed models:

timed extensions of finite state automata: timed/hybrid automata ⇒Lecture 2timed extensions of Petri nets: time/stopwatch Petri nets ⇒ Lecture 3

Formalize the specification ϕ :ObserversTemporal logics: LTL, CTL, ITL, . . . ⇒ Lecture 1Timed extensions of temporals logics: TCTL, . . . ⇒ Lectures 2 & 3

Does S |= ϕ ?

Model-checking algorithms⇒ State space exploration

M. Magnin (IRCCyN-NII) Lecture Series - Lecture 1 / NII 2013/03/21 12 / 64

Page 18: Computationalapproachestoanalyzecomplex dynamicsystems ... · Computationalapproachestoanalyzecomplex dynamicsystems: model-checkingandits applications. Part 1: Model-checking of

Introduction

Motivations

Objective: formal verification of propertiesModel the system S :

Discrete models: finite state automata, Petri nets, . . . ⇒ Lecture 1Timed models:

timed extensions of finite state automata: timed/hybrid automata ⇒Lecture 2timed extensions of Petri nets: time/stopwatch Petri nets ⇒ Lecture 3

Formalize the specification ϕ :ObserversTemporal logics: LTL, CTL, ITL, . . . ⇒ Lecture 1Timed extensions of temporals logics: TCTL, . . . ⇒ Lectures 2 & 3

Does S |= ϕ ?

Model-checking algorithms⇒ State space exploration

M. Magnin (IRCCyN-NII) Lecture Series - Lecture 1 / NII 2013/03/21 12 / 64

Page 19: Computationalapproachestoanalyzecomplex dynamicsystems ... · Computationalapproachestoanalyzecomplex dynamicsystems: model-checkingandits applications. Part 1: Model-checking of

Introduction

Some major issues

Need for modeling tasks with suspending/resuming featuresExpressivity/Decidability compromise to discuss ⇒ Lectures 2 & 3

State space combinatorial explosionNeed for symbolic approaches ⇒ Lectures 2 & 3Need for new models and abstracted algorithms ⇒ Lecture 4

M. Magnin (IRCCyN-NII) Lecture Series - Lecture 1 / NII 2013/03/21 13 / 64

Page 20: Computationalapproachestoanalyzecomplex dynamicsystems ... · Computationalapproachestoanalyzecomplex dynamicsystems: model-checkingandits applications. Part 1: Model-checking of

Introduction

Some major issues

Need for modeling tasks with suspending/resuming featuresExpressivity/Decidability compromise to discuss ⇒ Lectures 2 & 3

State space combinatorial explosionNeed for symbolic approaches ⇒ Lectures 2 & 3Need for new models and abstracted algorithms ⇒ Lecture 4

M. Magnin (IRCCyN-NII) Lecture Series - Lecture 1 / NII 2013/03/21 13 / 64

Page 21: Computationalapproachestoanalyzecomplex dynamicsystems ... · Computationalapproachestoanalyzecomplex dynamicsystems: model-checkingandits applications. Part 1: Model-checking of

Modeling with Petri nets

Overview

1 Vitæ

2 Introduction

3 Introduction to Petri nets based modeling

4 Modeling discrete biological systems thanks to Petri nets

5 Automata and state machines

6 Logics

M. Magnin (IRCCyN-NII) Lecture Series - Lecture 1 / NII 2013/03/21 14 / 64

Page 22: Computationalapproachestoanalyzecomplex dynamicsystems ... · Computationalapproachestoanalyzecomplex dynamicsystems: model-checkingandits applications. Part 1: Model-checking of

Modeling with Petri nets

How to compare (and choose between) different models?

Theoretical criteriaDecidability results w.r.t. common problems (e.g. state reachability,liveness), but . . .Respective expressivity

Pragmatical criteriaEase to understand and build modelsWhat are the key features (e.g. modularity, concurrence,chronology) the model has to capture?Existence of software tools to design and analyze these modelsHistory

M. Magnin (IRCCyN-NII) Lecture Series - Lecture 1 / NII 2013/03/21 15 / 64

Page 23: Computationalapproachestoanalyzecomplex dynamicsystems ... · Computationalapproachestoanalyzecomplex dynamicsystems: model-checkingandits applications. Part 1: Model-checking of

Modeling with Petri nets

Why Petri nets?

MotivationMathematical and graphic formalismEasy representation concurrence and parallelismStructural properties (P-invariants, T-invariants, ...)Dynamical properties (liveness, boundedness, reachability, ...)Mature tools : Snoopy, ginSIM, Roméo, etc.

M. Magnin (IRCCyN-NII) Lecture Series - Lecture 1 / NII 2013/03/21 16 / 64

Page 24: Computationalapproachestoanalyzecomplex dynamicsystems ... · Computationalapproachestoanalyzecomplex dynamicsystems: model-checkingandits applications. Part 1: Model-checking of

Modeling with Petri nets

Petri nets: a wide range of models

Discrete [SBSW07]Continuous [KH08]Hybrid [MDNM00]Stochastic [GP98]: the firing of a transition relates to a probabilityfunction, which corresponds to the chemical sensitization dependingon the concentrationColored [GKP10] : tokens are differentiatedTime and stopwatches: [MMR09]

M. Magnin (IRCCyN-NII) Lecture Series - Lecture 1 / NII 2013/03/21 17 / 64

Page 25: Computationalapproachestoanalyzecomplex dynamicsystems ... · Computationalapproachestoanalyzecomplex dynamicsystems: model-checkingandits applications. Part 1: Model-checking of

Modeling with Petri nets

Petri net - Introduction

P1

t1

P2

t2

P4

t4

P3

t3

Figure: A Petri net

{P1,P2,P4}

M. Magnin (IRCCyN-NII) Lecture Series - Lecture 1 / NII 2013/03/21 18 / 64

Page 26: Computationalapproachestoanalyzecomplex dynamicsystems ... · Computationalapproachestoanalyzecomplex dynamicsystems: model-checkingandits applications. Part 1: Model-checking of

Modeling with Petri nets

Petri net - Introduction

P1

t1

P2

t2

P4

t4

P3

t3

Figure: A Petri net

{P1,P2,P4}t2→ {P1,P3,P4}

t1→ . . .

M. Magnin (IRCCyN-NII) Lecture Series - Lecture 1 / NII 2013/03/21 18 / 64

Page 27: Computationalapproachestoanalyzecomplex dynamicsystems ... · Computationalapproachestoanalyzecomplex dynamicsystems: model-checkingandits applications. Part 1: Model-checking of

Modeling with Petri nets

Petri nets - Introduction

DefinitionA set of placesA set of transitionsA backward incidence functionA forward incidence function,An initial state

M. Magnin (IRCCyN-NII) Lecture Series - Lecture 1 / NII 2013/03/21 19 / 64

Page 28: Computationalapproachestoanalyzecomplex dynamicsystems ... · Computationalapproachestoanalyzecomplex dynamicsystems: model-checkingandits applications. Part 1: Model-checking of

Modeling with Petri nets

Petri nets - Introduction

BasicsNon-deterministic executionMultiple tokens make PN be suitable to modeling the concurrentbehavior of distributed systems

M. Magnin (IRCCyN-NII) Lecture Series - Lecture 1 / NII 2013/03/21 20 / 64

Page 29: Computationalapproachestoanalyzecomplex dynamicsystems ... · Computationalapproachestoanalyzecomplex dynamicsystems: model-checkingandits applications. Part 1: Model-checking of

Modeling with Petri nets

Petri nets - Properties

Some structural propertiesT-invariant : sequence of transitions which returns in the same state/ markingP-invariant : marking invariant (e.g.qiM(pi ) + qjM(pj) + qkM(pk) = c for any state of the net)

M. Magnin (IRCCyN-NII) Lecture Series - Lecture 1 / NII 2013/03/21 21 / 64

Page 30: Computationalapproachestoanalyzecomplex dynamicsystems ... · Computationalapproachestoanalyzecomplex dynamicsystems: model-checkingandits applications. Part 1: Model-checking of

Modeling with Petri nets

Petri nets - Introduction

Some dynamic propertiesLiveness: in every state, every transition will eventually be firedDeadlock: state in which no more transition can be firedMarking reachability (given an initial state)

M. Magnin (IRCCyN-NII) Lecture Series - Lecture 1 / NII 2013/03/21 22 / 64

Page 31: Computationalapproachestoanalyzecomplex dynamicsystems ... · Computationalapproachestoanalyzecomplex dynamicsystems: model-checkingandits applications. Part 1: Model-checking of

Modeling with Petri nets

Petri net - Liveness

P1

t1

P2

t2

P4

t0

t4

P3

t3

P0

Figure: Is it a live Petri net?M. Magnin (IRCCyN-NII) Lecture Series - Lecture 1 / NII 2013/03/21 23 / 64

Page 32: Computationalapproachestoanalyzecomplex dynamicsystems ... · Computationalapproachestoanalyzecomplex dynamicsystems: model-checkingandits applications. Part 1: Model-checking of

Modeling with Petri nets

Petri net - Liveness

P1

t1

P2

t2

P4

t0

t4

P3

t3

P0

Figure: Is it a live Petri net?M. Magnin (IRCCyN-NII) Lecture Series - Lecture 1 / NII 2013/03/21 23 / 64

Page 33: Computationalapproachestoanalyzecomplex dynamicsystems ... · Computationalapproachestoanalyzecomplex dynamicsystems: model-checkingandits applications. Part 1: Model-checking of

Modeling with Petri nets

Petri net - Liveness

P1

t1

P2

t2

P4

t0

P3

t3

P0

Figure: Is it a live Petri net?

M. Magnin (IRCCyN-NII) Lecture Series - Lecture 1 / NII 2013/03/21 24 / 64

Page 34: Computationalapproachestoanalyzecomplex dynamicsystems ... · Computationalapproachestoanalyzecomplex dynamicsystems: model-checkingandits applications. Part 1: Model-checking of

Modeling with Petri nets

Petri net - Liveness

P1

t1

P2

t2

P4

t0

P3

t3

P0

Figure: Is it a live Petri net?

M. Magnin (IRCCyN-NII) Lecture Series - Lecture 1 / NII 2013/03/21 24 / 64

Page 35: Computationalapproachestoanalyzecomplex dynamicsystems ... · Computationalapproachestoanalyzecomplex dynamicsystems: model-checkingandits applications. Part 1: Model-checking of

Modeling with Petri nets

Petri net - Liveness

P1

t1

P2

t2

P4

t0

P3

t3

P0

Figure: Is it a live Petri net?M. Magnin (IRCCyN-NII) Lecture Series - Lecture 1 / NII 2013/03/21 24 / 64

Page 36: Computationalapproachestoanalyzecomplex dynamicsystems ... · Computationalapproachestoanalyzecomplex dynamicsystems: model-checkingandits applications. Part 1: Model-checking of

Modeling with Petri nets

Petri net - Liveness

P1

t1

P2

t2

P4

t0

P3

t3

P0

Figure: Is it a live Petri net?

M. Magnin (IRCCyN-NII) Lecture Series - Lecture 1 / NII 2013/03/21 24 / 64

Page 37: Computationalapproachestoanalyzecomplex dynamicsystems ... · Computationalapproachestoanalyzecomplex dynamicsystems: model-checkingandits applications. Part 1: Model-checking of

Modeling with Petri nets

Petri net - Liveness

P1

t1

P2

t2

P4

t0

P3

t3

P0

Figure: Is it a live Petri net?

M. Magnin (IRCCyN-NII) Lecture Series - Lecture 1 / NII 2013/03/21 24 / 64

Page 38: Computationalapproachestoanalyzecomplex dynamicsystems ... · Computationalapproachestoanalyzecomplex dynamicsystems: model-checkingandits applications. Part 1: Model-checking of

Modeling with Petri nets

Petri net - Deadlock

P1

t1

P2

t2

P4

t0

P3

t3

P0

Figure: Will this Petri net lead to a deadlock?

M. Magnin (IRCCyN-NII) Lecture Series - Lecture 1 / NII 2013/03/21 25 / 64

Page 39: Computationalapproachestoanalyzecomplex dynamicsystems ... · Computationalapproachestoanalyzecomplex dynamicsystems: model-checkingandits applications. Part 1: Model-checking of

Modeling with Petri nets

Petri net - Deadlock

P1

t1

P2

t2

P4

t0

P3

t3

P0

Figure: Will this Petri net lead to a deadlock?

M. Magnin (IRCCyN-NII) Lecture Series - Lecture 1 / NII 2013/03/21 25 / 64

Page 40: Computationalapproachestoanalyzecomplex dynamicsystems ... · Computationalapproachestoanalyzecomplex dynamicsystems: model-checkingandits applications. Part 1: Model-checking of

Modeling with Petri nets

Petri net - Deadlock

P1

t1

P2

t2

P4

t0

P3

t3

P0

Figure: Will this Petri net lead to a deadlock?

M. Magnin (IRCCyN-NII) Lecture Series - Lecture 1 / NII 2013/03/21 25 / 64

Page 41: Computationalapproachestoanalyzecomplex dynamicsystems ... · Computationalapproachestoanalyzecomplex dynamicsystems: model-checkingandits applications. Part 1: Model-checking of

Modeling with Petri nets

Petri nets - Applications

Production systems (factories)Logistic deployment systemsEmbedded systemsVideo games (A.I. modeling)And, of course, biology!

M. Magnin (IRCCyN-NII) Lecture Series - Lecture 1 / NII 2013/03/21 26 / 64

Page 42: Computationalapproachestoanalyzecomplex dynamicsystems ... · Computationalapproachestoanalyzecomplex dynamicsystems: model-checkingandits applications. Part 1: Model-checking of

Modeling discrete biological systems thanks to Petri nets

Overview

1 Vitæ

2 Introduction

3 Introduction to Petri nets based modeling

4 Modeling discrete biological systems thanks to Petri nets

5 Automata and state machines

6 Logics

M. Magnin (IRCCyN-NII) Lecture Series - Lecture 1 / NII 2013/03/21 27 / 64

Page 43: Computationalapproachestoanalyzecomplex dynamicsystems ... · Computationalapproachestoanalyzecomplex dynamicsystems: model-checkingandits applications. Part 1: Model-checking of

Modeling discrete biological systems thanks to Petri nets

Short insight on the meaning of Petri net components

Intuitive meaningMarking of a place: presence/absence or quantity of a componentArc : precedence or successionTransition : event andor transformationWeight : necessary quantity, consumed and/or produced

M. Magnin (IRCCyN-NII) Lecture Series - Lecture 1 / NII 2013/03/21 28 / 64

Page 44: Computationalapproachestoanalyzecomplex dynamicsystems ... · Computationalapproachestoanalyzecomplex dynamicsystems: model-checkingandits applications. Part 1: Model-checking of

Modeling discrete biological systems thanks to Petri nets

Petri nets for modeling biochemical networks

Principle of qualitative modelingPlaces : reactants, products, enzymesTransitions : reactions, catalysisWeight on the arcs: stoichiometry

M. Magnin (IRCCyN-NII) Lecture Series - Lecture 1 / NII 2013/03/21 29 / 64

Page 45: Computationalapproachestoanalyzecomplex dynamicsystems ... · Computationalapproachestoanalyzecomplex dynamicsystems: model-checkingandits applications. Part 1: Model-checking of

Modeling discrete biological systems thanks to Petri nets

Application to the modeling of biochemical reactions

2NAD+ + 2H2O ! 2NADH + 2H+ + O2

NAD+

H2O

r

H+

NADH

O2

2

2

2

2

Figure: An example of a very simple translation from a biochemical reaction

M. Magnin (IRCCyN-NII) Lecture Series - Lecture 1 / NII 2013/03/21 30 / 64

Page 46: Computationalapproachestoanalyzecomplex dynamicsystems ... · Computationalapproachestoanalyzecomplex dynamicsystems: model-checkingandits applications. Part 1: Model-checking of

Modeling discrete biological systems thanks to Petri nets

Petri nets properties for the modeling of biochemicalnetworks

Structural propertiesIncidence matrix: stoichiometry matrixP-invariants: conservation relationsT-invariants: elementary flux modes

Dynamic propertiesLiveness: components are sufficient to trigger reactionsDeadlock: stable state

M. Magnin (IRCCyN-NII) Lecture Series - Lecture 1 / NII 2013/03/21 31 / 64

Page 47: Computationalapproachestoanalyzecomplex dynamicsystems ... · Computationalapproachestoanalyzecomplex dynamicsystems: model-checkingandits applications. Part 1: Model-checking of

Modeling discrete biological systems thanks to Petri nets

Additional modeling features

Critical issuesHow to test the number of tokens in a place (e.g. concentration levelof a protein) without decrementing it?How to model an action that takes place only below a giventhreshold (e.g. concentration level of a protein)?How to reset the number of tokens in a place (e.g. reset of a system)whatever was its previous concentration?

→ Introduction of new arcs

M. Magnin (IRCCyN-NII) Lecture Series - Lecture 1 / NII 2013/03/21 32 / 64

Page 48: Computationalapproachestoanalyzecomplex dynamicsystems ... · Computationalapproachestoanalyzecomplex dynamicsystems: model-checkingandits applications. Part 1: Model-checking of

Modeling discrete biological systems thanks to Petri nets

Petri net - Enriching the expressivity of the model

P1

t1

P2

t2

P4

t4

P3

t3

Figure: An other Petri net

{P1,P2,P4}

M. Magnin (IRCCyN-NII) Lecture Series - Lecture 1 / NII 2013/03/21 33 / 64

Page 49: Computationalapproachestoanalyzecomplex dynamicsystems ... · Computationalapproachestoanalyzecomplex dynamicsystems: model-checkingandits applications. Part 1: Model-checking of

Modeling discrete biological systems thanks to Petri nets

Petri net - Enriching the expressivity of the model

P1

t1

P2

t2

P4

t4

P3

t3

Figure: An other Petri net

{P1,P2,P4}t2→ {P3,P4} . . .

M. Magnin (IRCCyN-NII) Lecture Series - Lecture 1 / NII 2013/03/21 33 / 64

Page 50: Computationalapproachestoanalyzecomplex dynamicsystems ... · Computationalapproachestoanalyzecomplex dynamicsystems: model-checkingandits applications. Part 1: Model-checking of

Modeling discrete biological systems thanks to Petri nets

Petri net with reset arcs - Introduction

P1

t1

P2

t2

P4

t4

P3

t3

Figure: A Petri net with reset arcs

{P1,P2, 5× P4}t2→ . . .

M. Magnin (IRCCyN-NII) Lecture Series - Lecture 1 / NII 2013/03/21 34 / 64

Page 51: Computationalapproachestoanalyzecomplex dynamicsystems ... · Computationalapproachestoanalyzecomplex dynamicsystems: model-checkingandits applications. Part 1: Model-checking of

Modeling discrete biological systems thanks to Petri nets

Petri net with reset arcs - Introduction

P1

t1

P2

t2

P4

t4

P3

t3

Figure: A Petri net with reset arcs

{P1,P2, 5× P4}t2→ {P1,P3}

t1→ . . .

M. Magnin (IRCCyN-NII) Lecture Series - Lecture 1 / NII 2013/03/21 34 / 64

Page 52: Computationalapproachestoanalyzecomplex dynamicsystems ... · Computationalapproachestoanalyzecomplex dynamicsystems: model-checkingandits applications. Part 1: Model-checking of

Modeling discrete biological systems thanks to Petri nets

Petri nets with read arcs

P1

t1

P2

t2

P4

t4

P3

t3

Figure: A Petri net with read arcs

{P1,P2,P4}

M. Magnin (IRCCyN-NII) Lecture Series - Lecture 1 / NII 2013/03/21 35 / 64

Page 53: Computationalapproachestoanalyzecomplex dynamicsystems ... · Computationalapproachestoanalyzecomplex dynamicsystems: model-checkingandits applications. Part 1: Model-checking of

Modeling discrete biological systems thanks to Petri nets

Petri nets with read arcs

P1

t1

P2

t2

P4

t4

P3

t3

Figure: A Petri net with read arcs

{P1,P2,P4}t2→ {P1,P3,P4} . . .

M. Magnin (IRCCyN-NII) Lecture Series - Lecture 1 / NII 2013/03/21 35 / 64

Page 54: Computationalapproachestoanalyzecomplex dynamicsystems ... · Computationalapproachestoanalyzecomplex dynamicsystems: model-checkingandits applications. Part 1: Model-checking of

Modeling discrete biological systems thanks to Petri nets

(Logic) Inhibitor Arc Petri nets: OR inhibition

P1

t1

P2

t2

P4

t4

P3

t3

Figure: An inhibitor arc Petri net

{P1,P2,P4}

M. Magnin (IRCCyN-NII) Lecture Series - Lecture 1 / NII 2013/03/21 36 / 64

Page 55: Computationalapproachestoanalyzecomplex dynamicsystems ... · Computationalapproachestoanalyzecomplex dynamicsystems: model-checkingandits applications. Part 1: Model-checking of

Modeling discrete biological systems thanks to Petri nets

(Logic) Inhibitor Arc Petri nets: OR inhibition

P1

t1

P2

t2

P4

t4

P3

t3

Figure: An inhibitor arc Petri net : t1 inhibited iff (M(P3) ≥ 1 or M(P4) ≥ 1)

{P1,P2,P4}t2→ {P1,P3,P4}

M. Magnin (IRCCyN-NII) Lecture Series - Lecture 1 / NII 2013/03/21 36 / 64

Page 56: Computationalapproachestoanalyzecomplex dynamicsystems ... · Computationalapproachestoanalyzecomplex dynamicsystems: model-checkingandits applications. Part 1: Model-checking of

Modeling discrete biological systems thanks to Petri nets

(Logic) Inhibitor Arc Petri nets: OR inhibition

P1

t1

P2

t2

P4

t4

P3

t3

Figure: An inhibitor hyperarc Petri net

{P1,P2,P4}t2→ {P1,P3,P4}

t3→ {P1,P4}t4→ . . .

M. Magnin (IRCCyN-NII) Lecture Series - Lecture 1 / NII 2013/03/21 36 / 64

Page 57: Computationalapproachestoanalyzecomplex dynamicsystems ... · Computationalapproachestoanalyzecomplex dynamicsystems: model-checkingandits applications. Part 1: Model-checking of

Modeling discrete biological systems thanks to Petri nets

(Logic) Inhibitor Hyperarc Petri nets: AND inhibition

P1

t1

P2

t2

P4

t4

P3

t3

Figure: An inhibitor hyperarc Petri net

{P1,P2,P4}

M. Magnin (IRCCyN-NII) Lecture Series - Lecture 1 / NII 2013/03/21 37 / 64

Page 58: Computationalapproachestoanalyzecomplex dynamicsystems ... · Computationalapproachestoanalyzecomplex dynamicsystems: model-checkingandits applications. Part 1: Model-checking of

Modeling discrete biological systems thanks to Petri nets

(Logic) Inhibitor Hyperarc Petri nets: AND inhibition

P1

t1

P2

t2

P4

t4

P3

t3

Figure: An inhibitor hyperarc Petri net : t1 inhibited iff (M(P3) ≥ 1 andM(P4) ≥ 1)

{P1,P2,P4}t2→ {P1,P3,P4}

M. Magnin (IRCCyN-NII) Lecture Series - Lecture 1 / NII 2013/03/21 37 / 64

Page 59: Computationalapproachestoanalyzecomplex dynamicsystems ... · Computationalapproachestoanalyzecomplex dynamicsystems: model-checkingandits applications. Part 1: Model-checking of

Modeling discrete biological systems thanks to Petri nets

(Logic) Inhibitor Hyperarc Petri nets: AND inhibition

P1

t1

P2

t2

P4

t4

P3

t3

Figure: An inhibitor hyperarc Petri net

{P1,P2,P4}t2→ {P1,P3,P4}

t3→ {P1,P4}t1→ . . .

M. Magnin (IRCCyN-NII) Lecture Series - Lecture 1 / NII 2013/03/21 37 / 64

Page 60: Computationalapproachestoanalyzecomplex dynamicsystems ... · Computationalapproachestoanalyzecomplex dynamicsystems: model-checkingandits applications. Part 1: Model-checking of

Modeling discrete biological systems thanks to Petri nets

Implementation

How to automatically compute state space of PNs?Define efficient data-structures designed for:

Storage of statesModeling incidence functions

→ Get inspiration from Binary Decision Diagrams (BDDs)

M. Magnin (IRCCyN-NII) Lecture Series - Lecture 1 / NII 2013/03/21 38 / 64

Page 61: Computationalapproachestoanalyzecomplex dynamicsystems ... · Computationalapproachestoanalyzecomplex dynamicsystems: model-checkingandits applications. Part 1: Model-checking of

Modeling discrete biological systems thanks to Petri nets

A word about Binary Decision Diagrams (BDDs)

How to get a compact representation of a boolean function?Compressed representation of setsDirected acyclic graphTo make it canonical would allow to make equivalence-checkingeasier

Figure: Truth table for f (x1, x2, x3) = x̄1x̄2x̄3 + x1x2 + x2x3 (from Wikipedia)M. Magnin (IRCCyN-NII) Lecture Series - Lecture 1 / NII 2013/03/21 39 / 64

Page 62: Computationalapproachestoanalyzecomplex dynamicsystems ... · Computationalapproachestoanalyzecomplex dynamicsystems: model-checkingandits applications. Part 1: Model-checking of

Modeling discrete biological systems thanks to Petri nets

A word about Binary Decision Diagrams (BDDs)

How to get a compact representation of a boolean function?One root nodeTerminal nodes: 0, 1Each non-terminal node has two children and is labeled by a variableNo variable appears more than once along a path

Figure: Binary tree for f (x1, x2, x3) = x̄1x̄2x̄3 + x1x2 + x2x3 (from Wikipedia)

M. Magnin (IRCCyN-NII) Lecture Series - Lecture 1 / NII 2013/03/21 39 / 64

Page 63: Computationalapproachestoanalyzecomplex dynamicsystems ... · Computationalapproachestoanalyzecomplex dynamicsystems: model-checkingandits applications. Part 1: Model-checking of

Modeling discrete biological systems thanks to Petri nets

A word about Binary Decision Diagrams (BDDs)

How to get a compact and canonical representation of a booleanfunction?Key ideas formalized by Briant [Bry86] in 1986:

Variables ordering: in all paths, variables appear in the same orderReduction :

Merge any isomorphic subgraphsEliminate any node whose two children are isomorphic

Each non-terminal node has two children and is labeled by a variable

Figure: Binary decision diagram for f (x1, x2, x3) = x̄1x̄2x̄3 + x1x2 + x2x3 (fromWikipedia)

M. Magnin (IRCCyN-NII) Lecture Series - Lecture 1 / NII 2013/03/21 39 / 64

Page 64: Computationalapproachestoanalyzecomplex dynamicsystems ... · Computationalapproachestoanalyzecomplex dynamicsystems: model-checkingandits applications. Part 1: Model-checking of

Modeling discrete biological systems thanks to Petri nets

A word about Binary Decision Diagrams (BDDs)

Figure: BDD for f (x1, x2, x3) = x̄1x̄2x̄3 + x1x2 + x2x3 (from Wikipedia)M. Magnin (IRCCyN-NII) Lecture Series - Lecture 1 / NII 2013/03/21 39 / 64

Page 65: Computationalapproachestoanalyzecomplex dynamicsystems ... · Computationalapproachestoanalyzecomplex dynamicsystems: model-checkingandits applications. Part 1: Model-checking of

Modeling discrete biological systems thanks to Petri nets

A word about Binary Decision Diagrams (BDDs)

Challenges w.r.t. BDDsSize of a BDD depends critically on variable orderingFinding the best variable ordering is NP-hardSome efficient heuristics still exist!

Figure: BDD for f (x1, x2, x3) = x̄1x̄2x̄3 + x1x2 + x2x3 (from Wikipedia)M. Magnin (IRCCyN-NII) Lecture Series - Lecture 1 / NII 2013/03/21 39 / 64

Page 66: Computationalapproachestoanalyzecomplex dynamicsystems ... · Computationalapproachestoanalyzecomplex dynamicsystems: model-checkingandits applications. Part 1: Model-checking of

Modeling discrete biological systems thanks to Petri nets

Application of BDD to Petri nets

Illustration of the implementation in the Markg softwareComputes the state space of untimed Petri nets (with readhyperarcs and marking values affectation)Based on data-structures inspired by the Binary Decision Diagrams(BDDs) :

Vector Decision Diagrams (VDDs) : storage of states;Arithmetic Expression Decision Diagrams (AEDDs) : model incidencefunctions;

Deals with potentially infinite markingsTackles state space with more than 1014 states and 1015 transitionsDownload: http://markg.rts-software.org

M. Magnin (IRCCyN-NII) Lecture Series - Lecture 1 / NII 2013/03/21 40 / 64

Page 67: Computationalapproachestoanalyzecomplex dynamicsystems ... · Computationalapproachestoanalyzecomplex dynamicsystems: model-checkingandits applications. Part 1: Model-checking of

Modeling discrete biological systems thanks to Petri nets

Storage of states: Vector decision diagrams

Figure: VDD representing states (0, 0), (0, 1), (1, 0) and (1, 1)

M. Magnin (IRCCyN-NII) Lecture Series - Lecture 1 / NII 2013/03/21 41 / 64

Page 68: Computationalapproachestoanalyzecomplex dynamicsystems ... · Computationalapproachestoanalyzecomplex dynamicsystems: model-checkingandits applications. Part 1: Model-checking of

Modeling discrete biological systems thanks to Petri nets

Modeling incidence functions: Arithmetic ExpressionDecision Diagrams

Figure: AEDD modeling f (x , y , z) = ((x ≥ 1) ∧ (y ≥ 2) ∪ ((x < 1) ∧ (z ≥ 1))

M. Magnin (IRCCyN-NII) Lecture Series - Lecture 1 / NII 2013/03/21 42 / 64

Page 69: Computationalapproachestoanalyzecomplex dynamicsystems ... · Computationalapproachestoanalyzecomplex dynamicsystems: model-checkingandits applications. Part 1: Model-checking of

Modeling discrete biological systems thanks to Petri nets

Application of BDD to Petri nets

Up-to-date state of the art in this fieldlibDDD developed at LIP6, Paris [Mieg et al.]

C++ library for manipulation of decision diagramsSupport for Petri nets and some of their extensionsAvailable at http://move.lip6.fr/software/DDD/

M. Magnin (IRCCyN-NII) Lecture Series - Lecture 1 / NII 2013/03/21 43 / 64

Page 70: Computationalapproachestoanalyzecomplex dynamicsystems ... · Computationalapproachestoanalyzecomplex dynamicsystems: model-checkingandits applications. Part 1: Model-checking of

Modeling discrete biological systems thanks to Petri nets

Models classification

Figure: Various classes of modelsM. Magnin (IRCCyN-NII) Lecture Series - Lecture 1 / NII 2013/03/21 44 / 64

Page 71: Computationalapproachestoanalyzecomplex dynamicsystems ... · Computationalapproachestoanalyzecomplex dynamicsystems: model-checkingandits applications. Part 1: Model-checking of

Automata and state machines

Overview

1 Vitæ

2 Introduction

3 Introduction to Petri nets based modeling

4 Modeling discrete biological systems thanks to Petri nets

5 Automata and state machines

6 Logics

M. Magnin (IRCCyN-NII) Lecture Series - Lecture 1 / NII 2013/03/21 45 / 64

Page 72: Computationalapproachestoanalyzecomplex dynamicsystems ... · Computationalapproachestoanalyzecomplex dynamicsystems: model-checkingandits applications. Part 1: Model-checking of

Automata and state machines

Finite state machine - Introduction

Figure: Example of a FSM modeling a turnstile (taken from Wikipedia)

M. Magnin (IRCCyN-NII) Lecture Series - Lecture 1 / NII 2013/03/21 46 / 64

Page 73: Computationalapproachestoanalyzecomplex dynamicsystems ... · Computationalapproachestoanalyzecomplex dynamicsystems: model-checkingandits applications. Part 1: Model-checking of

Automata and state machines

Finite state machine - Introduction

DefinitionA finite number of statesA set of transitions triggered by events or conditionsAn initial state

M. Magnin (IRCCyN-NII) Lecture Series - Lecture 1 / NII 2013/03/21 47 / 64

Page 74: Computationalapproachestoanalyzecomplex dynamicsystems ... · Computationalapproachestoanalyzecomplex dynamicsystems: model-checkingandits applications. Part 1: Model-checking of

Automata and state machines

Finite state machine - Introduction

BasicsThe machine is in only one state at a timeFSM are just a part of automata theory.Powerset construction: any nondeterministic finite automaton(NFA) can be turned into a deterministic finite automaton (DFA)which recognizes the same formal language.

M. Magnin (IRCCyN-NII) Lecture Series - Lecture 1 / NII 2013/03/21 48 / 64

Page 75: Computationalapproachestoanalyzecomplex dynamicsystems ... · Computationalapproachestoanalyzecomplex dynamicsystems: model-checkingandits applications. Part 1: Model-checking of

Automata and state machines

Automata: a wide family

VariationsInput

Finite input: accepts only finite wordsInfinite input: accepts infinite words

StatesFinite states automatonInfinite states automatonPushdown automaton

Transition functionDeterministicNondeterministic

M. Magnin (IRCCyN-NII) Lecture Series - Lecture 1 / NII 2013/03/21 49 / 64

Page 76: Computationalapproachestoanalyzecomplex dynamicsystems ... · Computationalapproachestoanalyzecomplex dynamicsystems: model-checkingandits applications. Part 1: Model-checking of

Automata and state machines

Automata: classification

ClassificationAutomaton = finite representation of a formal language that may be aninfinite set

Automaton Recognizable languageNondeterministic/Deterministic Finite state machine (FSM) regular languages

Pushdown automaton (PDA) context-free languagesTuring machine recursively enumerable languages

Deterministic Büchi automaton ω-limit languagesNondeterministic Büchi automaton ω-regular languages

M. Magnin (IRCCyN-NII) Lecture Series - Lecture 1 / NII 2013/03/21 50 / 64

Page 77: Computationalapproachestoanalyzecomplex dynamicsystems ... · Computationalapproachestoanalyzecomplex dynamicsystems: model-checkingandits applications. Part 1: Model-checking of

Logics

Overview

1 Vitæ

2 Introduction

3 Introduction to Petri nets based modeling

4 Modeling discrete biological systems thanks to Petri nets

5 Automata and state machines

6 Logics

M. Magnin (IRCCyN-NII) Lecture Series - Lecture 1 / NII 2013/03/21 51 / 64

Page 78: Computationalapproachestoanalyzecomplex dynamicsystems ... · Computationalapproachestoanalyzecomplex dynamicsystems: model-checkingandits applications. Part 1: Model-checking of

Logics

Computation paths vs computation tree

VS

Figure: Execution can be seen as a set of execution paths or as an execution tree

M. Magnin (IRCCyN-NII) Lecture Series - Lecture 1 / NII 2013/03/21 52 / 64

Page 79: Computationalapproachestoanalyzecomplex dynamicsystems ... · Computationalapproachestoanalyzecomplex dynamicsystems: model-checkingandits applications. Part 1: Model-checking of

Logics

Linear Temporal Logic

PrincipleFirst proposed for the formal verification of computer programs byA. Pnueli in 1977Sometimes called propositional temporal logic (PTL)LTL is the set of formulae ϕs s.t.:

ϕ1, ϕ2 := true | ap | ¬ϕ | ϕ1 ∧ ϕ2 | Xϕ2 | ϕ1Uϕ2

with ap an atomic proposition.The above definition allows the definition of G and F operators, =⇒operator, . . .:

Fϕ⇔ trueUϕGϕ⇔ ¬F¬ϕ

Figure: LTL defines properties on a given path

M. Magnin (IRCCyN-NII) Lecture Series - Lecture 1 / NII 2013/03/21 53 / 64

Page 80: Computationalapproachestoanalyzecomplex dynamicsystems ... · Computationalapproachestoanalyzecomplex dynamicsystems: model-checkingandits applications. Part 1: Model-checking of

Logics

Model-checking of LTL properties

p

Figure: Xp

M. Magnin (IRCCyN-NII) Lecture Series - Lecture 1 / NII 2013/03/21 54 / 64

Page 81: Computationalapproachestoanalyzecomplex dynamicsystems ... · Computationalapproachestoanalyzecomplex dynamicsystems: model-checkingandits applications. Part 1: Model-checking of

Logics

Model-checking of LTL properties

p p p p p q

Figure: pUq

M. Magnin (IRCCyN-NII) Lecture Series - Lecture 1 / NII 2013/03/21 54 / 64

Page 82: Computationalapproachestoanalyzecomplex dynamicsystems ... · Computationalapproachestoanalyzecomplex dynamicsystems: model-checkingandits applications. Part 1: Model-checking of

Logics

Model-checking of LTL properties

p p p p p p p

Figure: Gp

M. Magnin (IRCCyN-NII) Lecture Series - Lecture 1 / NII 2013/03/21 54 / 64

Page 83: Computationalapproachestoanalyzecomplex dynamicsystems ... · Computationalapproachestoanalyzecomplex dynamicsystems: model-checkingandits applications. Part 1: Model-checking of

Logics

Model-checking of LTL properties

p

Figure: Fp

M. Magnin (IRCCyN-NII) Lecture Series - Lecture 1 / NII 2013/03/21 54 / 64

Page 84: Computationalapproachestoanalyzecomplex dynamicsystems ... · Computationalapproachestoanalyzecomplex dynamicsystems: model-checkingandits applications. Part 1: Model-checking of

Logics

Model-checking of LTL properties

PrincipleExpress desired properties using LTL operators and actually check ifthe model satisfies these propertiesWell adapted to:

safety properties on a path (i.e. something bad never happens, statedthrough G(¬ϕ) operator)liveness properties on a path (i.e. something good keeps happening,stated through GFψ or G(ϕ =⇒ Fψ)

But LTL does not allow to express properties on every path

Figure: LTL defines properties on a given pathM. Magnin (IRCCyN-NII) Lecture Series - Lecture 1 / NII 2013/03/21 55 / 64

Page 85: Computationalapproachestoanalyzecomplex dynamicsystems ... · Computationalapproachestoanalyzecomplex dynamicsystems: model-checkingandits applications. Part 1: Model-checking of

Logics

Computation Tree Logic

PrincipleBranching-time logicDefined by E. M. Clarke and E. A. Emerson in 1981CTL is the set of formulae s.t.:

ϕ1, ϕ2 := true | ¬ϕ1 | ϕ1 ∧ ϕ2 | EXϕ1 | AXϕ1 | ϕ1EUϕ2 | ϕ1AUϕ2

with ap is an atomic propositionNote that E stands for “along at least one path”(there Exists onepath)The above formal definition allows the definition of additionaloperations, like: AG , AF , . . . (A stands for “along All paths”)

Figure: CTL defines properties on the different pathsM. Magnin (IRCCyN-NII) Lecture Series - Lecture 1 / NII 2013/03/21 56 / 64

Page 86: Computationalapproachestoanalyzecomplex dynamicsystems ... · Computationalapproachestoanalyzecomplex dynamicsystems: model-checkingandits applications. Part 1: Model-checking of

Logics

Model-checking of CTL properties

p p p

p

p

p

p

p

p

p

p

p

p

p

p

p p

p

p

p

p

Figure: AGpM. Magnin (IRCCyN-NII) Lecture Series - Lecture 1 / NII 2013/03/21 57 / 64

Page 87: Computationalapproachestoanalyzecomplex dynamicsystems ... · Computationalapproachestoanalyzecomplex dynamicsystems: model-checkingandits applications. Part 1: Model-checking of

Logics

Model-checking of CTL properties

p

p p p

p

Figure: EGpM. Magnin (IRCCyN-NII) Lecture Series - Lecture 1 / NII 2013/03/21 57 / 64

Page 88: Computationalapproachestoanalyzecomplex dynamicsystems ... · Computationalapproachestoanalyzecomplex dynamicsystems: model-checkingandits applications. Part 1: Model-checking of

Logics

Model-checking of CTL properties

p

p

Figure: EFpM. Magnin (IRCCyN-NII) Lecture Series - Lecture 1 / NII 2013/03/21 57 / 64

Page 89: Computationalapproachestoanalyzecomplex dynamicsystems ... · Computationalapproachestoanalyzecomplex dynamicsystems: model-checkingandits applications. Part 1: Model-checking of

Logics

Model-checking of CTL properties

p

p

p

Figure: EFpM. Magnin (IRCCyN-NII) Lecture Series - Lecture 1 / NII 2013/03/21 57 / 64

Page 90: Computationalapproachestoanalyzecomplex dynamicsystems ... · Computationalapproachestoanalyzecomplex dynamicsystems: model-checkingandits applications. Part 1: Model-checking of

Logics

Model-checking of CTL properties

p

p p p

q

Figure: pEUqM. Magnin (IRCCyN-NII) Lecture Series - Lecture 1 / NII 2013/03/21 57 / 64

Page 91: Computationalapproachestoanalyzecomplex dynamicsystems ... · Computationalapproachestoanalyzecomplex dynamicsystems: model-checkingandits applications. Part 1: Model-checking of

Logics

Model-checking of CTL properties

p p q

p

p

p

q

q

p

p p

q

p

p

q

Figure: pAUqM. Magnin (IRCCyN-NII) Lecture Series - Lecture 1 / NII 2013/03/21 57 / 64

Page 92: Computationalapproachestoanalyzecomplex dynamicsystems ... · Computationalapproachestoanalyzecomplex dynamicsystems: model-checkingandits applications. Part 1: Model-checking of

Logics

Model-checking of CTL properties

PrincipleExpress desired properties using CTL operators and actually check ifthe model satisfies these propertiesWell adapted to:

safety properties (e.g. when some initial condition is satisfied, then allpossible executions of a program avoid some undesirable condition)liveness properties (e.g. when some initial condition is satisfied, thensome desirable property keeps happening)

Figure: CTL defines properties on the different paths

M. Magnin (IRCCyN-NII) Lecture Series - Lecture 1 / NII 2013/03/21 58 / 64

Page 93: Computationalapproachestoanalyzecomplex dynamicsystems ... · Computationalapproachestoanalyzecomplex dynamicsystems: model-checkingandits applications. Part 1: Model-checking of

Logics

LTL vs CTL

ComparisonLinear time (paths) VS branching time (trees)Incomparable expressive power:

FGp cannot be expressed in CTLAGEFp cannot be expressed in LTL

LTL may be more intuitive, but seems too weak

M. Magnin (IRCCyN-NII) Lecture Series - Lecture 1 / NII 2013/03/21 59 / 64

Page 94: Computationalapproachestoanalyzecomplex dynamicsystems ... · Computationalapproachestoanalyzecomplex dynamicsystems: model-checkingandits applications. Part 1: Model-checking of

Logics

Computation Tree Logic CTL∗

PrincipleSuperset of CTL and LTLCombines path quantifiers and temporal operatorsDefined by E. A. Emerson and J.Y. Halpern in 1986CTL∗ is the set of ϕs formulae s.t.:

ϕs , ψs := true | ap | ¬ϕs | ϕs ∧ ψs | Aϕp | Eϕp

withϕp, ψp := true | ϕs | ϕp ∧ ψp | Xϕp | ϕpUψp

AGFp is a CTL∗ property, not a CTL property.

Figure: CTL∗ defines properties on the different paths

M. Magnin (IRCCyN-NII) Lecture Series - Lecture 1 / NII 2013/03/21 60 / 64

Page 95: Computationalapproachestoanalyzecomplex dynamicsystems ... · Computationalapproachestoanalyzecomplex dynamicsystems: model-checkingandits applications. Part 1: Model-checking of

Logics

Computation Tree Logic CTL∗

A path quantifier can prefix an assertion composed of arbitrarycombinations of the usual linear-time operators.

Path quantifiersA : “for every path”E : “there exists a path”

Linear-time operatorsXp : “p holds true next time”Fp : “p holds true sometime in the future”Gp : “p holds true globally in the future”pUq : “p holds true until q holds true”

M. Magnin (IRCCyN-NII) Lecture Series - Lecture 1 / NII 2013/03/21 61 / 64

Page 96: Computationalapproachestoanalyzecomplex dynamicsystems ... · Computationalapproachestoanalyzecomplex dynamicsystems: model-checkingandits applications. Part 1: Model-checking of

Logics

Model-checking of CTL∗ properties

PrincipleExpress desired properties using CTL∗ operators and actually check ifthe model satisfies these propertiesWell adapted to complex properties, like “whatever is the state ofthe system, if an alarm is received, then a signal must be emitted”:AG(alarm⇒ AFsignal)

Figure: CTL∗ defines properties on the different paths

M. Magnin (IRCCyN-NII) Lecture Series - Lecture 1 / NII 2013/03/21 62 / 64

Page 97: Computationalapproachestoanalyzecomplex dynamicsystems ... · Computationalapproachestoanalyzecomplex dynamicsystems: model-checkingandits applications. Part 1: Model-checking of

Logics

Tips for model-checking CTL∗ properties

Principles (as summarized by G. Bernot)Idea 1: work on the state graph instead of the path treesIdea 2: check first the atoms of ϕ and then check the connectives ofϕ with a bottom-up computation strategyIdea 3: (computational optimization) group some cases togetherusing BDD-inspired techniques

But. . .

Since the late 90s, progress in BDDs has stalled while SAT solversperformances have increased ⇒ some recent papers focus on checking:

LTL formulae through SAT solvers (Biere et al.,1999, 2006)CTL formulae through SAT solvers (Heymans, 2005)

M. Magnin (IRCCyN-NII) Lecture Series - Lecture 1 / NII 2013/03/21 63 / 64

Page 98: Computationalapproachestoanalyzecomplex dynamicsystems ... · Computationalapproachestoanalyzecomplex dynamicsystems: model-checkingandits applications. Part 1: Model-checking of

Conclusion

Model-checking

SummaryPowerful methodology to:

Verify a wide range of given propertiesValidate a model

Application to discrete models, like FSM, Petri nets, . . .Available automatic tools

M. Magnin (IRCCyN-NII) Lecture Series - Lecture 1 / NII 2013/03/21 64 / 64

Page 99: Computationalapproachestoanalyzecomplex dynamicsystems ... · Computationalapproachestoanalyzecomplex dynamicsystems: model-checkingandits applications. Part 1: Model-checking of

Conclusion

Model-checking

SummaryPowerful methodology to verify and/or validateApplication to discrete models, like FSM, Petri nets, . . .Available automatic tools

How to circumvent state space explosion?Symbolic algorithms to avoid building the whole state space andregroup states (e.g. BDD-based techniques)Bounded model-checking: consider only counterexamples of abounded length ⇒ whereas completeness, termination is guaranteed.Abstraction (e.g. consider only boolean variables)Partial order reduction (e.g. given a property, if the order betweentwo sequences σ1 and σ2 is not meaningful, then it is unnecessary toconsider both interleavings σ1.σ2 and σ2.σ1)

M. Magnin (IRCCyN-NII) Lecture Series - Lecture 1 / NII 2013/03/21 64 / 64

Page 100: Computationalapproachestoanalyzecomplex dynamicsystems ... · Computationalapproachestoanalyzecomplex dynamicsystems: model-checkingandits applications. Part 1: Model-checking of

Conclusion

Model-checking

SummaryPowerful methodology to verify and/or validateApplication to discrete models, like FSM, Petri nets, . . .Available automatic tools

Further workProgressive introduction of time delaysExtend the logics expressiveness to tackle properties withquantitative timing information ⇒ Lecture 2

M. Magnin (IRCCyN-NII) Lecture Series - Lecture 1 / NII 2013/03/21 64 / 64

Page 101: Computationalapproachestoanalyzecomplex dynamicsystems ... · Computationalapproachestoanalyzecomplex dynamicsystems: model-checkingandits applications. Part 1: Model-checking of

Conclusion

Randal E. Bryant.Graph-based algorithms for boolean function manipulation.IEEE Trans. Computers, 35(8):677–691, 1986.

Jean-Louis Giavitto, Hanna Klaudel, and Franck Pommereau.Qualitative modelling and analysis of regulations in multi-cellularsystems using petri nets and topological collections.In 4th Workshop on Membrane Computing and Biologically InspiredProcess Calculi (MeCBIC’10), number 40 in EPTCS, pages 1–16,2010.P. J. Goss and J. Peccoud.Quantitative modeling of stochastic systems in molecular biology byusing stochastic Petri nets.Proceedings of the National Academy of Sciences of the United Statesof America, 95(12):6750–6755, June 1998.

I Koch and M Heiner.Petri Nets, chapter 7, pages 139–179.Wiley Book Series on Bioinformatik. John Wiley & Sons, 2008.

M. Magnin (IRCCyN-NII) Lecture Series - Lecture 1 / NII 2013/03/21 64 / 64

Page 102: Computationalapproachestoanalyzecomplex dynamicsystems ... · Computationalapproachestoanalyzecomplex dynamicsystems: model-checkingandits applications. Part 1: Model-checking of

Conclusion

Series Eds. Yi Pan, Albert Y. Zomaya.

H Matsuno, A Doi, M Nagasaki, and S Miyano.Hybrid petri net representation of gene regulatory network.Pacific Symposium On Biocomputing, 349(338-349):341–352, 2000.

Morgan Magnin, Pierre Molinaro, and Olivier H. Roux.Expressiveness of Petri nets with stopwatches. Dense-time part.Fundamenta Informaticae, 97(1-2):111–138, 2009.

L. Jason Steggles, Richard Banks, Oliver Shaw, and Anil Wipat.Qualitatively modelling and analysing genetic regulatory networks: apetri net approach.Bioinformatics, 23:2006, 2007.

M. Magnin (IRCCyN-NII) Lecture Series - Lecture 1 / NII 2013/03/21 64 / 64