26
Budapest University of Technology and Economics Department of Measurement and Information Systems Bounded Saturation Based CTL Model Checking András Vörös, Dániel Darvas Budapest University of Technology and Economics, Budapest, Hungary Fault Tolerant Systems Research Group Tamás Bartha MTA SZTAKI, Budapest, Hungary Computer and Automation Research Institute

Bounded Saturation based CTL Model Checkingpetridotnet.inf.mit.bme.hu/publications/SPLST2011_presentation.pdf · Formal methods Safety critical and embedded systems oRailway, automotive

  • Upload
    others

  • View
    1

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Bounded Saturation based CTL Model Checkingpetridotnet.inf.mit.bme.hu/publications/SPLST2011_presentation.pdf · Formal methods Safety critical and embedded systems oRailway, automotive

Budapest University of Technology and Economics Department of Measurement and Information Systems

Bounded Saturation Based CTL Model Checking

András Vörös, Dániel Darvas Budapest University of Technology and Economics, Budapest, Hungary

Fault Tolerant Systems Research Group

Tamás Bartha MTA SZTAKI,

Budapest, Hungary Computer and Automation

Research Institute

Page 2: Bounded Saturation based CTL Model Checkingpetridotnet.inf.mit.bme.hu/publications/SPLST2011_presentation.pdf · Formal methods Safety critical and embedded systems oRailway, automotive

Contents

I. Background – Model checking

II. Overview of saturation

III. Bounded model checking (BMC)

IV. How saturation and BMC can work together?

V. Measurements and conclusion

Page 3: Bounded Saturation based CTL Model Checkingpetridotnet.inf.mit.bme.hu/publications/SPLST2011_presentation.pdf · Formal methods Safety critical and embedded systems oRailway, automotive

Formal methods

Safety critical and embedded systems

oRailway, automotive industry, air transportation

oReliability is an important issue

Design time analysis:

Modeling Specification Formal

verification

requirements

– Does my system work well?

– Does it provide services properly?

Mathematically sound answer

Page 4: Bounded Saturation based CTL Model Checkingpetridotnet.inf.mit.bme.hu/publications/SPLST2011_presentation.pdf · Formal methods Safety critical and embedded systems oRailway, automotive

Model checking

Automatic verification method

Prerequisite:

o Exploring and representing the reachable states

Problem:

o State space explosion

o Time and space requirements

System model

Specification, requirements

Model checker

Proof / Counterexample

Page 5: Bounded Saturation based CTL Model Checkingpetridotnet.inf.mit.bme.hu/publications/SPLST2011_presentation.pdf · Formal methods Safety critical and embedded systems oRailway, automotive

Saturation algorithm

Efficient solution for:

o State space generation

o Model checking

Symbolic algorithm

o Encoding of states

o Special underlying data structures

• Multi-valued decision diagrams (MDDs)

Special iteration strategy

o Efficient for asynchronous models

Page 6: Bounded Saturation based CTL Model Checkingpetridotnet.inf.mit.bme.hu/publications/SPLST2011_presentation.pdf · Formal methods Safety critical and embedded systems oRailway, automotive

Overview of the saturation workflow Sa

tura

tio

n

Model of the system

Decomposition and ordering

State space exploring

Model checking

Page 7: Bounded Saturation based CTL Model Checkingpetridotnet.inf.mit.bme.hu/publications/SPLST2011_presentation.pdf · Formal methods Safety critical and embedded systems oRailway, automotive

Multi-valued Decision Diagrams Derived from decision trees

o variables are ordered into levels

0 0 1 0 1 0 1 1

1st variable

2nd variable

3rd variable

terminal constants

Decision tree

1

0 1

0 1 0

1

0 1 0 1 0 1 0

(0,1,1)→1

Page 8: Bounded Saturation based CTL Model Checkingpetridotnet.inf.mit.bme.hu/publications/SPLST2011_presentation.pdf · Formal methods Safety critical and embedded systems oRailway, automotive

Multi-valued Decision Diagrams Derived from decision trees

o variables are ordered into levels

Special reduction rules o in a bottom-up fashion, applying reduction from level-to-levels

Compact representation of multi valued functions

0 0 1 0 1 0 1 1

Decision tree

1

0 1

0 1 0

1

0 1 0 1 0 1 0

0 1

0 1

0 1 1

1

0

0

MDD

Page 9: Bounded Saturation based CTL Model Checkingpetridotnet.inf.mit.bme.hu/publications/SPLST2011_presentation.pdf · Formal methods Safety critical and embedded systems oRailway, automotive

Symbolic algorithm

Symbolic encoding instead of explicit state representation

o Decomposition is needed

Saturation uses componentwise encoding

System Model

Component 2

Component 1

Component 3

Page 10: Bounded Saturation based CTL Model Checkingpetridotnet.inf.mit.bme.hu/publications/SPLST2011_presentation.pdf · Formal methods Safety critical and embedded systems oRailway, automotive

Special iteration

Local exploration in a greedy manner

Exploring global synchronization events if needed

Uses the primarily defined order of the decision diagram variable encoding

System Model

Component 2

Component 1

Component 3 Iteratio

n o

rde

r

Page 11: Bounded Saturation based CTL Model Checkingpetridotnet.inf.mit.bme.hu/publications/SPLST2011_presentation.pdf · Formal methods Safety critical and embedded systems oRailway, automotive

Bounded saturation

Page 12: Bounded Saturation based CTL Model Checkingpetridotnet.inf.mit.bme.hu/publications/SPLST2011_presentation.pdf · Formal methods Safety critical and embedded systems oRailway, automotive

Motivation for bounded model checking

State space

Initial states

Explored states

Page 13: Bounded Saturation based CTL Model Checkingpetridotnet.inf.mit.bme.hu/publications/SPLST2011_presentation.pdf · Formal methods Safety critical and embedded systems oRailway, automotive

Motivation for bounded model checking

State space

Initial states

Error states

Requirements

not satisfied

Page 14: Bounded Saturation based CTL Model Checkingpetridotnet.inf.mit.bme.hu/publications/SPLST2011_presentation.pdf · Formal methods Safety critical and embedded systems oRailway, automotive

Motivation for bounded model checking

State space

Initial states

Error states

Requirements

not satisfied

Bounded model checking (BMC) explores a k-bounded part of the state space (usually in a breadth first manner) examines the specification on this smaller part

Page 15: Bounded Saturation based CTL Model Checkingpetridotnet.inf.mit.bme.hu/publications/SPLST2011_presentation.pdf · Formal methods Safety critical and embedded systems oRailway, automotive

Problems with Bounded Saturation

Main problems with bounded saturation:

oSaturation explores the state space in an irregular recursive order

• ⇒ Difficult to limit the exploration

oThere is no distance information in the MDDs

• ⇒ New data structure is needed

Page 16: Bounded Saturation based CTL Model Checkingpetridotnet.inf.mit.bme.hu/publications/SPLST2011_presentation.pdf · Formal methods Safety critical and embedded systems oRailway, automotive

Problems with Bounded Saturation

Main problems with bounded saturation:

oSaturation explores the state space in an irregular recursive order

• ⇒ Difficult to limit the exploration

oThere is no distance information in the MDDs

• ⇒ New data structure is needed New data structure:

Edge-valued decision diagrams (EDDs)

MDD based data structure enriched with distance information

Bounded number of iterations

Truncating the state space representation

Page 17: Bounded Saturation based CTL Model Checkingpetridotnet.inf.mit.bme.hu/publications/SPLST2011_presentation.pdf · Formal methods Safety critical and embedded systems oRailway, automotive

Open questions before our work

How can we implement a bounded state space exploration (BSSE) module?

o In theory it needs information about the state space, but this is not available a priori.

Can BSSE and a saturation based model checker work together?

Is there an efficient way for using exact bounds?

How can we use this method for model checking in practice?

Page 18: Bounded Saturation based CTL Model Checkingpetridotnet.inf.mit.bme.hu/publications/SPLST2011_presentation.pdf · Formal methods Safety critical and embedded systems oRailway, automotive

Truncating methods

Two approach:

Approximate truncating

• only k..k∙C-bound (C: number of components)

• more efficient (as stated earlier)

Exact truncating

• exact k-bound

• less efficient originally

• in our work: competitive (using caches)

Page 19: Bounded Saturation based CTL Model Checkingpetridotnet.inf.mit.bme.hu/publications/SPLST2011_presentation.pdf · Formal methods Safety critical and embedded systems oRailway, automotive

Iterative BMC

The necessary k-bound is not known a priori

We use an iterative algorithm:

k = B

k-bounded state space exploration

k = k + inc Result?

YES

CTL model checking

MDD

• System model (Petri Net)

• Requirement (CTL expression)

• Initial bound (B) • Increment (inc)

Inputs

Page 20: Bounded Saturation based CTL Model Checkingpetridotnet.inf.mit.bme.hu/publications/SPLST2011_presentation.pdf · Formal methods Safety critical and embedded systems oRailway, automotive

Efficiency problems

Classical saturation based MC may explore and check some unreachable states needlessly

o The answer is correct but could be more efficient

oWork in progress (constrained saturation)

Incremental building of the state space

o The algorithm restarts state space exploration from the initial state

o Future work

Page 21: Bounded Saturation based CTL Model Checkingpetridotnet.inf.mit.bme.hu/publications/SPLST2011_presentation.pdf · Formal methods Safety critical and embedded systems oRailway, automotive

Measurements and conclusion

Page 22: Bounded Saturation based CTL Model Checkingpetridotnet.inf.mit.bme.hu/publications/SPLST2011_presentation.pdf · Formal methods Safety critical and embedded systems oRailway, automotive

Measurements

Scaling with depth of „error state”

0

5

10

15

20

25

30

35

8 32 64 128

Ru

nti

me

(s)

Depth of bug

Approximate truncate Exact truncate Full state space exploration

Page 23: Bounded Saturation based CTL Model Checkingpetridotnet.inf.mit.bme.hu/publications/SPLST2011_presentation.pdf · Formal methods Safety critical and embedded systems oRailway, automotive

Measurements

Scaling with depth of „error state”

0

5

10

15

20

25

30

35

8 32 64 128

Ru

nti

me

(s)

Depth of bug

Approximate truncate Exact truncate Full state space exploration

Model: Hanoi (12 rings)

Initial bound: 10

Increment: 5

Diameter: 4095

Page 24: Bounded Saturation based CTL Model Checkingpetridotnet.inf.mit.bme.hu/publications/SPLST2011_presentation.pdf · Formal methods Safety critical and embedded systems oRailway, automotive

Measurements

Scaling with increasing increments Depth of bug: 128

0

5

10

15

20

25

30

35

5 10 20 30 40

Ru

nti

me

(s)

Increment Approximate truncate Exact truncate Full state space exploration

24 iterations 4 iterations

Page 25: Bounded Saturation based CTL Model Checkingpetridotnet.inf.mit.bme.hu/publications/SPLST2011_presentation.pdf · Formal methods Safety critical and embedded systems oRailway, automotive

Conclusion

We have implemented a bounded model checker in our tool

o Theoretical and practical improvements in the original bounded algorithm

Saturation based bounded state space generation and classic MC could work together

Efficient for ”shallow bugs”

Efficiency is highly depending on the chosen parameters

Page 26: Bounded Saturation based CTL Model Checkingpetridotnet.inf.mit.bme.hu/publications/SPLST2011_presentation.pdf · Formal methods Safety critical and embedded systems oRailway, automotive

Thank you for your attention!