52
Motivation Language Syntax of PRTS Operational Semantics Verification Evaluation Conclusion PRTS: An Approach for Model Checking Probabilistic Real-time Hierarchical Systems Jun Sun 1 , Yang Liu 2 , Songzheng Song 2 , Jin Song Dong 2 , Xiaohong Li 3 1 Singapore University of Technology and Design 2 National University of Singapore 3 Tianjin University October 28, 2011 J. Sun, Y. Liu, S. Song, J. S. Dong, X. Li : ICFEM2011 PRTS@PAT http://www.patroot.com

PRTS: An Approach for Model Checking Probabilistic Real ... · features like real-time, hierarchy, concurrency, data structures as well as probability. 2 Build a model checker for

  • Upload
    others

  • View
    0

  • Download
    0

Embed Size (px)

Citation preview

Page 1: PRTS: An Approach for Model Checking Probabilistic Real ... · features like real-time, hierarchy, concurrency, data structures as well as probability. 2 Build a model checker for

MotivationLanguage Syntax of PRTS

Operational SemanticsVerificationEvaluation

Conclusion

PRTS: An Approach for Model CheckingProbabilistic Real-time Hierarchical Systems

Jun Sun1, Yang Liu2, Songzheng Song2, Jin Song Dong2,Xiaohong Li3

1Singapore University of Technology and Design2National University of Singapore

3Tianjin University

October 28, 2011

J. Sun, Y. Liu, S. Song, J. S. Dong, X. Li : ICFEM2011 PRTS@PAT http://www.patroot.com

Page 2: PRTS: An Approach for Model Checking Probabilistic Real ... · features like real-time, hierarchy, concurrency, data structures as well as probability. 2 Build a model checker for

MotivationLanguage Syntax of PRTS

Operational SemanticsVerificationEvaluation

Conclusion

Outline

1 Motivation

2 Language Syntax of PRTS

3 Operational SemanticsConcrete ConfigurationsAbstraction

4 Verification

5 Evaluation

6 Conclusion

J. Sun, Y. Liu, S. Song, J. S. Dong, X. Li : ICFEM2011 PRTS@PAT http://www.patroot.com

Page 3: PRTS: An Approach for Model Checking Probabilistic Real ... · features like real-time, hierarchy, concurrency, data structures as well as probability. 2 Build a model checker for

MotivationLanguage Syntax of PRTS

Operational SemanticsVerificationEvaluation

Conclusion

Outline

1 Motivation

2 Language Syntax of PRTS

3 Operational SemanticsConcrete ConfigurationsAbstraction

4 Verification

5 Evaluation

6 Conclusion

J. Sun, Y. Liu, S. Song, J. S. Dong, X. Li : ICFEM2011 PRTS@PAT http://www.patroot.com

Page 4: PRTS: An Approach for Model Checking Probabilistic Real ... · features like real-time, hierarchy, concurrency, data structures as well as probability. 2 Build a model checker for

MotivationLanguage Syntax of PRTS

Operational SemanticsVerificationEvaluation

Conclusion

Motivation

Model checking real-life systems is usually difficult.

quantitative timing factorsunreliable/random environmentcomplex data operationshierarchical control flows

J. Sun, Y. Liu, S. Song, J. S. Dong, X. Li : ICFEM2011 PRTS@PAT http://www.patroot.com

Page 5: PRTS: An Approach for Model Checking Probabilistic Real ... · features like real-time, hierarchy, concurrency, data structures as well as probability. 2 Build a model checker for

MotivationLanguage Syntax of PRTS

Operational SemanticsVerificationEvaluation

Conclusion

Motivation

Model checking real-life systems is usually difficult.

quantitative timing factorsunreliable/random environmentcomplex data operationshierarchical control flows

J. Sun, Y. Liu, S. Song, J. S. Dong, X. Li : ICFEM2011 PRTS@PAT http://www.patroot.com

Page 6: PRTS: An Approach for Model Checking Probabilistic Real ... · features like real-time, hierarchy, concurrency, data structures as well as probability. 2 Build a model checker for

MotivationLanguage Syntax of PRTS

Operational SemanticsVerificationEvaluation

Conclusion

Multi-lift System

Serving time/responding timeRandom user behaviorsTask assign algorithmlifts/users/buttons...

J. Sun, Y. Liu, S. Song, J. S. Dong, X. Li : ICFEM2011 PRTS@PAT http://www.patroot.com

Page 7: PRTS: An Approach for Model Checking Probabilistic Real ... · features like real-time, hierarchy, concurrency, data structures as well as probability. 2 Build a model checker for

MotivationLanguage Syntax of PRTS

Operational SemanticsVerificationEvaluation

Conclusion

Multi-lift System

Scenario : one user presses the lift button, but one lift travelingon the same direction passes by without serving him/her!

J. Sun, Y. Liu, S. Song, J. S. Dong, X. Li : ICFEM2011 PRTS@PAT http://www.patroot.com

Page 8: PRTS: An Approach for Model Checking Probabilistic Real ... · features like real-time, hierarchy, concurrency, data structures as well as probability. 2 Build a model checker for

MotivationLanguage Syntax of PRTS

Operational SemanticsVerificationEvaluation

Conclusion

Our Approach

1 Design an expressive modeling language supportingfeatures like real-time, hierarchy, concurrency, datastructures as well as probability.

2 Build a model checker for this language in order to analyzethe behavior of such systems.

3 Verify widely used properties such as reachability checkingand LTL checking.

We propose PRTS for probabilistic real-time systems and it hasbeen integrated into our framework PAT.

http://www.patroot.com

J. Sun, Y. Liu, S. Song, J. S. Dong, X. Li : ICFEM2011 PRTS@PAT http://www.patroot.com

Page 9: PRTS: An Approach for Model Checking Probabilistic Real ... · features like real-time, hierarchy, concurrency, data structures as well as probability. 2 Build a model checker for

MotivationLanguage Syntax of PRTS

Operational SemanticsVerificationEvaluation

Conclusion

Our Approach

1 Design an expressive modeling language supportingfeatures like real-time, hierarchy, concurrency, datastructures as well as probability.

2 Build a model checker for this language in order to analyzethe behavior of such systems.

3 Verify widely used properties such as reachability checkingand LTL checking.

We propose PRTS for probabilistic real-time systems and it hasbeen integrated into our framework PAT.

http://www.patroot.com

J. Sun, Y. Liu, S. Song, J. S. Dong, X. Li : ICFEM2011 PRTS@PAT http://www.patroot.com

Page 10: PRTS: An Approach for Model Checking Probabilistic Real ... · features like real-time, hierarchy, concurrency, data structures as well as probability. 2 Build a model checker for

MotivationLanguage Syntax of PRTS

Operational SemanticsVerificationEvaluation

Conclusion

PAT

1400+ registered users;40+ countries and regions;300+ organizations;10+ modules. PRTS is one of them.

J. Sun, Y. Liu, S. Song, J. S. Dong, X. Li : ICFEM2011 PRTS@PAT http://www.patroot.com

Page 11: PRTS: An Approach for Model Checking Probabilistic Real ... · features like real-time, hierarchy, concurrency, data structures as well as probability. 2 Build a model checker for

MotivationLanguage Syntax of PRTS

Operational SemanticsVerificationEvaluation

Conclusion

PAT

J. Sun, Y. Liu, S. Song, J. S. Dong, X. Li : ICFEM2011 PRTS@PAT http://www.patroot.com

Page 12: PRTS: An Approach for Model Checking Probabilistic Real ... · features like real-time, hierarchy, concurrency, data structures as well as probability. 2 Build a model checker for

MotivationLanguage Syntax of PRTS

Operational SemanticsVerificationEvaluation

Conclusion

Outline

1 Motivation

2 Language Syntax of PRTS

3 Operational SemanticsConcrete ConfigurationsAbstraction

4 Verification

5 Evaluation

6 Conclusion

J. Sun, Y. Liu, S. Song, J. S. Dong, X. Li : ICFEM2011 PRTS@PAT http://www.patroot.com

Page 13: PRTS: An Approach for Model Checking Probabilistic Real ... · features like real-time, hierarchy, concurrency, data structures as well as probability. 2 Build a model checker for

MotivationLanguage Syntax of PRTS

Operational SemanticsVerificationEvaluation

Conclusion

Based on C. A. R. Hoare’s CSP

P = Stop – in-action| Skip – termination| e→ P – event prefixing| a{program} → P – data operation prefixing| [b]P – guard condition| if (b) {P} else {Q} – conditional choice| P 2 Q – external choice| P u Q – internal choice| P \ X – hiding| P; Q – sequential composition| P ‖ Q – parallel composition| Q – process referencing

J. Sun, Y. Liu, S. Song, J. S. Dong, X. Li : ICFEM2011 PRTS@PAT http://www.patroot.com

Page 14: PRTS: An Approach for Model Checking Probabilistic Real ... · features like real-time, hierarchy, concurrency, data structures as well as probability. 2 Build a model checker for

MotivationLanguage Syntax of PRTS

Operational SemanticsVerificationEvaluation

Conclusion

Based on C. A. R. Hoare’s CSP

P = Wait [d ] – delay| P timeout [d ] Q – timeout| P interrupt [d ] Q – timed interrupt| P within[d ] – timed responsiveness| P deadline[d ] – deadline

d is a non-negative integer.

P = pcase{pr0 : P0; pr1 : P1; · · · ; prk : Pk}

pri is defined as a positive integer. It means with probabilitypri

pr0+pr1+···+prk, P behaves as Pi .

J. Sun, Y. Liu, S. Song, J. S. Dong, X. Li : ICFEM2011 PRTS@PAT http://www.patroot.com

Page 15: PRTS: An Approach for Model Checking Probabilistic Real ... · features like real-time, hierarchy, concurrency, data structures as well as probability. 2 Build a model checker for

MotivationLanguage Syntax of PRTS

Operational SemanticsVerificationEvaluation

Conclusion

Based on C. A. R. Hoare’s CSP

P = Wait [d ] – delay| P timeout [d ] Q – timeout| P interrupt [d ] Q – timed interrupt| P within[d ] – timed responsiveness| P deadline[d ] – deadline

d is a non-negative integer.

P = pcase{pr0 : P0; pr1 : P1; · · · ; prk : Pk}

pri is defined as a positive integer. It means with probabilitypri

pr0+pr1+···+prk, P behaves as Pi .

J. Sun, Y. Liu, S. Song, J. S. Dong, X. Li : ICFEM2011 PRTS@PAT http://www.patroot.com

Page 16: PRTS: An Approach for Model Checking Probabilistic Real ... · features like real-time, hierarchy, concurrency, data structures as well as probability. 2 Build a model checker for

MotivationLanguage Syntax of PRTS

Operational SemanticsVerificationEvaluation

Conclusion

Multi-lift System

1. #define NoOfFloors 2;2. #define NoOfLifts 2;3. #import "PAT.Lib.Lift";4. var<LiftControl> ctrl = new LiftControl(NoOfFloors,NoOfLifts);5. Users() = pcase {6. 1 : extreq.0.1{ctrl.Assign_External_Up_Request(0)} -> Skip7. 1 : intreq.0.0.1{ctrl.Add_Internal_Request(0,0)} -> Skip8. 1 : intreq.1.0.1{ctrl.Add_Internal_Request(1,0)} -> Skip9. 1 : extreq.1.0{ctrl.Assign_External_Down_Request(1)} -> Skip10. 1 : intreq.0.1.1{ctrl.Add_Internal_Request(0,1)} -> Skip11. 1 : intreq.1.1.1{ctrl.Add_Internal_Request(1,1)} -> Skip12. } within[1]; Users();13. Lift(i, level, direction) = ...;14. System = (||| x:{0..NoOfLifts-1} @ Lift(x, 0, 1)) ||| Users();

Property: what is the probability that a lift passes by?

J. Sun, Y. Liu, S. Song, J. S. Dong, X. Li : ICFEM2011 PRTS@PAT http://www.patroot.com

Page 17: PRTS: An Approach for Model Checking Probabilistic Real ... · features like real-time, hierarchy, concurrency, data structures as well as probability. 2 Build a model checker for

MotivationLanguage Syntax of PRTS

Operational SemanticsVerificationEvaluation

Conclusion

Multi-lift System

1. #define NoOfFloors 2;2. #define NoOfLifts 2;3. #import "PAT.Lib.Lift";4. var<LiftControl> ctrl = new LiftControl(NoOfFloors,NoOfLifts);5. Users() = pcase {6. 1 : extreq.0.1{ctrl.Assign_External_Up_Request(0)} -> Skip7. 1 : intreq.0.0.1{ctrl.Add_Internal_Request(0,0)} -> Skip8. 1 : intreq.1.0.1{ctrl.Add_Internal_Request(1,0)} -> Skip9. 1 : extreq.1.0{ctrl.Assign_External_Down_Request(1)} -> Skip10. 1 : intreq.0.1.1{ctrl.Add_Internal_Request(0,1)} -> Skip11. 1 : intreq.1.1.1{ctrl.Add_Internal_Request(1,1)} -> Skip12. } within[1]; Users();13. Lift(i, level, direction) = ...;14. System = (||| x:{0..NoOfLifts-1} @ Lift(x, 0, 1)) ||| Users();

Property: what is the probability that a lift passes by?

J. Sun, Y. Liu, S. Song, J. S. Dong, X. Li : ICFEM2011 PRTS@PAT http://www.patroot.com

Page 18: PRTS: An Approach for Model Checking Probabilistic Real ... · features like real-time, hierarchy, concurrency, data structures as well as probability. 2 Build a model checker for

MotivationLanguage Syntax of PRTS

Operational SemanticsVerificationEvaluation

Conclusion

Concrete ConfigurationsAbstraction

Outline

1 Motivation

2 Language Syntax of PRTS

3 Operational SemanticsConcrete ConfigurationsAbstraction

4 Verification

5 Evaluation

6 Conclusion

J. Sun, Y. Liu, S. Song, J. S. Dong, X. Li : ICFEM2011 PRTS@PAT http://www.patroot.com

Page 19: PRTS: An Approach for Model Checking Probabilistic Real ... · features like real-time, hierarchy, concurrency, data structures as well as probability. 2 Build a model checker for

MotivationLanguage Syntax of PRTS

Operational SemanticsVerificationEvaluation

Conclusion

Concrete ConfigurationsAbstraction

Definition (Markov Decision Process)

An MDP is a tuple D = (S, init ,Act ,Pr) whereS is a set of states;init ∈ S is the initial state;Act is a set of actions and Actτ is Act ∪ τ ;Pr : S × (Actτ ∪ R+)× Distr(S) is a transition relation.

A Markov Chain can be defined given an MDP D and ascheduler δ, which is denoted as Dδ.

A path of Dδ is defined as ω = s0x0→ s1

x1→ s2x2→ ...

J. Sun, Y. Liu, S. Song, J. S. Dong, X. Li : ICFEM2011 PRTS@PAT http://www.patroot.com

Page 20: PRTS: An Approach for Model Checking Probabilistic Real ... · features like real-time, hierarchy, concurrency, data structures as well as probability. 2 Build a model checker for

MotivationLanguage Syntax of PRTS

Operational SemanticsVerificationEvaluation

Conclusion

Concrete ConfigurationsAbstraction

Definition (Markov Decision Process)

An MDP is a tuple D = (S, init ,Act ,Pr) whereS is a set of states;init ∈ S is the initial state;Act is a set of actions and Actτ is Act ∪ τ ;Pr : S × (Actτ ∪ R+)× Distr(S) is a transition relation.

A Markov Chain can be defined given an MDP D and ascheduler δ, which is denoted as Dδ.

A path of Dδ is defined as ω = s0x0→ s1

x1→ s2x2→ ...

J. Sun, Y. Liu, S. Song, J. S. Dong, X. Li : ICFEM2011 PRTS@PAT http://www.patroot.com

Page 21: PRTS: An Approach for Model Checking Probabilistic Real ... · features like real-time, hierarchy, concurrency, data structures as well as probability. 2 Build a model checker for

MotivationLanguage Syntax of PRTS

Operational SemanticsVerificationEvaluation

Conclusion

Concrete ConfigurationsAbstraction

Definition (Markov Decision Process)

An MDP is a tuple D = (S, init ,Act ,Pr) whereS is a set of states;init ∈ S is the initial state;Act is a set of actions and Actτ is Act ∪ τ ;Pr : S × (Actτ ∪ R+)× Distr(S) is a transition relation.

A Markov Chain can be defined given an MDP D and ascheduler δ, which is denoted as Dδ.

A path of Dδ is defined as ω = s0x0→ s1

x1→ s2x2→ ...

J. Sun, Y. Liu, S. Song, J. S. Dong, X. Li : ICFEM2011 PRTS@PAT http://www.patroot.com

Page 22: PRTS: An Approach for Model Checking Probabilistic Real ... · features like real-time, hierarchy, concurrency, data structures as well as probability. 2 Build a model checker for

MotivationLanguage Syntax of PRTS

Operational SemanticsVerificationEvaluation

Conclusion

Concrete ConfigurationsAbstraction

Given a property φ:

PmaxD (φ) = supδ PD({π ∈ paths(Dδ) | π satisfies φ})

PminD (φ) = infδ PD({π ∈ paths(Dδ) | π satisfies φ})

J. Sun, Y. Liu, S. Song, J. S. Dong, X. Li : ICFEM2011 PRTS@PAT http://www.patroot.com

Page 23: PRTS: An Approach for Model Checking Probabilistic Real ... · features like real-time, hierarchy, concurrency, data structures as well as probability. 2 Build a model checker for

MotivationLanguage Syntax of PRTS

Operational SemanticsVerificationEvaluation

Conclusion

Concrete ConfigurationsAbstraction

Definition (Concrete System Configuration)

A concrete system configuration is a tuple s = (σ,P) where σ isa variable valuation and P is a process.

The probabilistic transition relation of a model’s MDP semanticsis defined by a set of firing rules with every process construct.

Wait [d ]pcase

J. Sun, Y. Liu, S. Song, J. S. Dong, X. Li : ICFEM2011 PRTS@PAT http://www.patroot.com

Page 24: PRTS: An Approach for Model Checking Probabilistic Real ... · features like real-time, hierarchy, concurrency, data structures as well as probability. 2 Build a model checker for

MotivationLanguage Syntax of PRTS

Operational SemanticsVerificationEvaluation

Conclusion

Concrete ConfigurationsAbstraction

Definition (Concrete System Configuration)

A concrete system configuration is a tuple s = (σ,P) where σ isa variable valuation and P is a process.

The probabilistic transition relation of a model’s MDP semanticsis defined by a set of firing rules with every process construct.

Wait [d ]pcase

J. Sun, Y. Liu, S. Song, J. S. Dong, X. Li : ICFEM2011 PRTS@PAT http://www.patroot.com

Page 25: PRTS: An Approach for Model Checking Probabilistic Real ... · features like real-time, hierarchy, concurrency, data structures as well as probability. 2 Build a model checker for

MotivationLanguage Syntax of PRTS

Operational SemanticsVerificationEvaluation

Conclusion

Concrete ConfigurationsAbstraction

Wait [d ]

ε ≤ d[ wait1 ]

(σ,Wait [d ]) ε→ (σ,Wait [d − ε])

[ wait2 ](σ,Wait [0]) τ→ (σ,Skip)

J. Sun, Y. Liu, S. Song, J. S. Dong, X. Li : ICFEM2011 PRTS@PAT http://www.patroot.com

Page 26: PRTS: An Approach for Model Checking Probabilistic Real ... · features like real-time, hierarchy, concurrency, data structures as well as probability. 2 Build a model checker for

MotivationLanguage Syntax of PRTS

Operational SemanticsVerificationEvaluation

Conclusion

Concrete ConfigurationsAbstraction

pcase

[ pcase ](σ, pcase {pr0 : P0; pr1 : P1; · · · ; prk : Pk})

τ→ µ

µ((σ,Pi)) =pri

pr0+pr1+···+prkfor all i ∈ [0, k ]

pcase transitions are not time-consuming!

J. Sun, Y. Liu, S. Song, J. S. Dong, X. Li : ICFEM2011 PRTS@PAT http://www.patroot.com

Page 27: PRTS: An Approach for Model Checking Probabilistic Real ... · features like real-time, hierarchy, concurrency, data structures as well as probability. 2 Build a model checker for

MotivationLanguage Syntax of PRTS

Operational SemanticsVerificationEvaluation

Conclusion

Concrete ConfigurationsAbstraction

pcase

[ pcase ](σ, pcase {pr0 : P0; pr1 : P1; · · · ; prk : Pk})

τ→ µ

µ((σ,Pi)) =pri

pr0+pr1+···+prkfor all i ∈ [0, k ]

pcase transitions are not time-consuming!

J. Sun, Y. Liu, S. Song, J. S. Dong, X. Li : ICFEM2011 PRTS@PAT http://www.patroot.com

Page 28: PRTS: An Approach for Model Checking Probabilistic Real ... · features like real-time, hierarchy, concurrency, data structures as well as probability. 2 Build a model checker for

MotivationLanguage Syntax of PRTS

Operational SemanticsVerificationEvaluation

Conclusion

Concrete ConfigurationsAbstraction

Using the firing rules, the transition relation of the MDP couldbe defined. However, since PRTS model has a dense-timesemantics, the underlying MDP has infinite states.

(σ, Wait [1]) 0.1→ (σ, Wait [0.9]) 0.01→ (σ, Wait [0.89]) 0.001→ ...

Abstraction is required!

J. Sun, Y. Liu, S. Song, J. S. Dong, X. Li : ICFEM2011 PRTS@PAT http://www.patroot.com

Page 29: PRTS: An Approach for Model Checking Probabilistic Real ... · features like real-time, hierarchy, concurrency, data structures as well as probability. 2 Build a model checker for

MotivationLanguage Syntax of PRTS

Operational SemanticsVerificationEvaluation

Conclusion

Concrete ConfigurationsAbstraction

Using the firing rules, the transition relation of the MDP couldbe defined. However, since PRTS model has a dense-timesemantics, the underlying MDP has infinite states.

(σ, Wait [1]) 0.1→ (σ, Wait [0.9]) 0.01→ (σ, Wait [0.89]) 0.001→ ...

Abstraction is required!

J. Sun, Y. Liu, S. Song, J. S. Dong, X. Li : ICFEM2011 PRTS@PAT http://www.patroot.com

Page 30: PRTS: An Approach for Model Checking Probabilistic Real ... · features like real-time, hierarchy, concurrency, data structures as well as probability. 2 Build a model checker for

MotivationLanguage Syntax of PRTS

Operational SemanticsVerificationEvaluation

Conclusion

Concrete ConfigurationsAbstraction

Using the firing rules, the transition relation of the MDP couldbe defined. However, since PRTS model has a dense-timesemantics, the underlying MDP has infinite states.

(σ, Wait [1]) 0.1→ (σ, Wait [0.9]) 0.01→ (σ, Wait [0.89]) 0.001→ ...

Abstraction is required!

J. Sun, Y. Liu, S. Song, J. S. Dong, X. Li : ICFEM2011 PRTS@PAT http://www.patroot.com

Page 31: PRTS: An Approach for Model Checking Probabilistic Real ... · features like real-time, hierarchy, concurrency, data structures as well as probability. 2 Build a model checker for

MotivationLanguage Syntax of PRTS

Operational SemanticsVerificationEvaluation

Conclusion

Concrete ConfigurationsAbstraction

Dynamic Zone Abstraction

The first step of abstraction is to associate timed processconstructs with implicit clocks.

P timeout [d ] Q → P timeout [d ]c QConstraint over clock : c ≤ 5 represents any processP timeout [d ′] Q with d ′ ≤ 5

A zone D is the conjunction of multiple primitive constraintsover a set of clocks.

c ∼ d or ci − cj ∼ d where c, ci , cj are values of clocks andd is a constant integer. ∼ represents ≥,≤,=

J. Sun, Y. Liu, S. Song, J. S. Dong, X. Li : ICFEM2011 PRTS@PAT http://www.patroot.com

Page 32: PRTS: An Approach for Model Checking Probabilistic Real ... · features like real-time, hierarchy, concurrency, data structures as well as probability. 2 Build a model checker for

MotivationLanguage Syntax of PRTS

Operational SemanticsVerificationEvaluation

Conclusion

Concrete ConfigurationsAbstraction

Dynamic Zone Abstraction

The first step of abstraction is to associate timed processconstructs with implicit clocks.

P timeout [d ] Q → P timeout [d ]c QConstraint over clock : c ≤ 5 represents any processP timeout [d ′] Q with d ′ ≤ 5

A zone D is the conjunction of multiple primitive constraintsover a set of clocks.

c ∼ d or ci − cj ∼ d where c, ci , cj are values of clocks andd is a constant integer. ∼ represents ≥,≤,=

J. Sun, Y. Liu, S. Song, J. S. Dong, X. Li : ICFEM2011 PRTS@PAT http://www.patroot.com

Page 33: PRTS: An Approach for Model Checking Probabilistic Real ... · features like real-time, hierarchy, concurrency, data structures as well as probability. 2 Build a model checker for

MotivationLanguage Syntax of PRTS

Operational SemanticsVerificationEvaluation

Conclusion

Concrete ConfigurationsAbstraction

Abstract Configurations

Definition (Abstract System Configuration)

Given a concrete system configuration (σ,P), thecorresponding abstract system configuration is a triple(σ,PT ,D) such that PT is a process obtained by associating Pwith a set of clocks; and D is a zone over the clocks.

Abstract firing rules are defined in order to get the abstractMDP. Wait [d ] and pcase are listed as examples.

J. Sun, Y. Liu, S. Song, J. S. Dong, X. Li : ICFEM2011 PRTS@PAT http://www.patroot.com

Page 34: PRTS: An Approach for Model Checking Probabilistic Real ... · features like real-time, hierarchy, concurrency, data structures as well as probability. 2 Build a model checker for

MotivationLanguage Syntax of PRTS

Operational SemanticsVerificationEvaluation

Conclusion

Concrete ConfigurationsAbstraction

Abstract Configurations

Definition (Abstract System Configuration)

Given a concrete system configuration (σ,P), thecorresponding abstract system configuration is a triple(σ,PT ,D) such that PT is a process obtained by associating Pwith a set of clocks; and D is a zone over the clocks.

Abstract firing rules are defined in order to get the abstractMDP. Wait [d ] and pcase are listed as examples.

J. Sun, Y. Liu, S. Song, J. S. Dong, X. Li : ICFEM2011 PRTS@PAT http://www.patroot.com

Page 35: PRTS: An Approach for Model Checking Probabilistic Real ... · features like real-time, hierarchy, concurrency, data structures as well as probability. 2 Build a model checker for

MotivationLanguage Syntax of PRTS

Operational SemanticsVerificationEvaluation

Conclusion

Concrete ConfigurationsAbstraction

Wait [d ]

[ await ](σ,Wait [d ]c ,D)

τ (σ,Skip,D↑ ∧ c = d)

D↑ denotes the zone obtained by delaying arbitrary amountof time. e.g. (c ≤ 5)↑ is c ≤ ∞.

J. Sun, Y. Liu, S. Song, J. S. Dong, X. Li : ICFEM2011 PRTS@PAT http://www.patroot.com

Page 36: PRTS: An Approach for Model Checking Probabilistic Real ... · features like real-time, hierarchy, concurrency, data structures as well as probability. 2 Build a model checker for

MotivationLanguage Syntax of PRTS

Operational SemanticsVerificationEvaluation

Conclusion

Concrete ConfigurationsAbstraction

pcase

[ apcase ](σ, pcase {pr0 : P0; pr1 : P1; · · · ; prk : Pk},D)

τ µ

µ((σ,Pi ,D)) = pripr0+pr1+···+prk

for i ∈ [0, k ]; zone is unchanged.

J. Sun, Y. Liu, S. Song, J. S. Dong, X. Li : ICFEM2011 PRTS@PAT http://www.patroot.com

Page 37: PRTS: An Approach for Model Checking Probabilistic Real ... · features like real-time, hierarchy, concurrency, data structures as well as probability. 2 Build a model checker for

MotivationLanguage Syntax of PRTS

Operational SemanticsVerificationEvaluation

Conclusion

Outline

1 Motivation

2 Language Syntax of PRTS

3 Operational SemanticsConcrete ConfigurationsAbstraction

4 Verification

5 Evaluation

6 Conclusion

J. Sun, Y. Liu, S. Song, J. S. Dong, X. Li : ICFEM2011 PRTS@PAT http://www.patroot.com

Page 38: PRTS: An Approach for Model Checking Probabilistic Real ... · features like real-time, hierarchy, concurrency, data structures as well as probability. 2 Build a model checker for

MotivationLanguage Syntax of PRTS

Operational SemanticsVerificationEvaluation

Conclusion

verification

1 abstract model is suitable for standard probabilistic modelchecking techniques.

2 abstract model preserves the verification result of givenproperty φ in concrete model.

M : PRTS model;DM : concrete MDP of M;Da

M : abstract MDP of M.

J. Sun, Y. Liu, S. Song, J. S. Dong, X. Li : ICFEM2011 PRTS@PAT http://www.patroot.com

Page 39: PRTS: An Approach for Model Checking Probabilistic Real ... · features like real-time, hierarchy, concurrency, data structures as well as probability. 2 Build a model checker for

MotivationLanguage Syntax of PRTS

Operational SemanticsVerificationEvaluation

Conclusion

Theorem 1

TheoremDa

M is finite for any model M. 2

1 Variable valuations are finite[by assumption].2 Process expressions are finite[by assumption and clock

reuse].3 Zones are finite.

J. Bengtsson and Y. Wang.Timed Automata: Semantics, Algorithms and Tools.In Lectures on Concurrency and Petri Nets, pages 87-124,2003.

J. Sun, Y. Liu, S. Song, J. S. Dong, X. Li : ICFEM2011 PRTS@PAT http://www.patroot.com

Page 40: PRTS: An Approach for Model Checking Probabilistic Real ... · features like real-time, hierarchy, concurrency, data structures as well as probability. 2 Build a model checker for

MotivationLanguage Syntax of PRTS

Operational SemanticsVerificationEvaluation

Conclusion

Theorem 1

TheoremDa

M is finite for any model M. 2

1 Variable valuations are finite[by assumption].2 Process expressions are finite[by assumption and clock

reuse].3 Zones are finite.

J. Bengtsson and Y. Wang.Timed Automata: Semantics, Algorithms and Tools.In Lectures on Concurrency and Petri Nets, pages 87-124,2003.

J. Sun, Y. Liu, S. Song, J. S. Dong, X. Li : ICFEM2011 PRTS@PAT http://www.patroot.com

Page 41: PRTS: An Approach for Model Checking Probabilistic Real ... · features like real-time, hierarchy, concurrency, data structures as well as probability. 2 Build a model checker for

MotivationLanguage Syntax of PRTS

Operational SemanticsVerificationEvaluation

Conclusion

Theorem 2

Theorem

PmaxDa

M(φ) = Pmax

DM(φ) and Pmin

DaM(φ) = Pmin

DM(φ). 2

1 For any scheduler δ in DaM , there is a scheduler ξ in DM

such that (DaM)δ and (DM)ξ are equivalent Markov Chains.

2 For any scheduler η in DM , there is a scheduler ϑ in DaM

such that (DM)η and (DaM)ϑ might not be equivalent but

they still have the same result of verifying φ.

pcase transitions are not time-consuming!

J. Sun, Y. Liu, S. Song, J. S. Dong, X. Li : ICFEM2011 PRTS@PAT http://www.patroot.com

Page 42: PRTS: An Approach for Model Checking Probabilistic Real ... · features like real-time, hierarchy, concurrency, data structures as well as probability. 2 Build a model checker for

MotivationLanguage Syntax of PRTS

Operational SemanticsVerificationEvaluation

Conclusion

Theorem 2

Theorem

PmaxDa

M(φ) = Pmax

DM(φ) and Pmin

DaM(φ) = Pmin

DM(φ). 2

1 For any scheduler δ in DaM , there is a scheduler ξ in DM

such that (DaM)δ and (DM)ξ are equivalent Markov Chains.

2 For any scheduler η in DM , there is a scheduler ϑ in DaM

such that (DM)η and (DaM)ϑ might not be equivalent but

they still have the same result of verifying φ.

pcase transitions are not time-consuming!

J. Sun, Y. Liu, S. Song, J. S. Dong, X. Li : ICFEM2011 PRTS@PAT http://www.patroot.com

Page 43: PRTS: An Approach for Model Checking Probabilistic Real ... · features like real-time, hierarchy, concurrency, data structures as well as probability. 2 Build a model checker for

MotivationLanguage Syntax of PRTS

Operational SemanticsVerificationEvaluation

Conclusion

Theorem 2

Theorem

PmaxDa

M(φ) = Pmax

DM(φ) and Pmin

DaM(φ) = Pmin

DM(φ). 2

1 For any scheduler δ in DaM , there is a scheduler ξ in DM

such that (DaM)δ and (DM)ξ are equivalent Markov Chains.

2 For any scheduler η in DM , there is a scheduler ϑ in DaM

such that (DM)η and (DaM)ϑ might not be equivalent but

they still have the same result of verifying φ.

pcase transitions are not time-consuming!

J. Sun, Y. Liu, S. Song, J. S. Dong, X. Li : ICFEM2011 PRTS@PAT http://www.patroot.com

Page 44: PRTS: An Approach for Model Checking Probabilistic Real ... · features like real-time, hierarchy, concurrency, data structures as well as probability. 2 Build a model checker for

MotivationLanguage Syntax of PRTS

Operational SemanticsVerificationEvaluation

Conclusion

After abstraction, we obtain the finite states system andstandard probabilistic model checking are applied to solve thelinear program in MDP.

C. Baier and J. Katoen.Principles of Model checking.The MIT Press, 2008.

J. Sun, Y. Liu, S. Song, J. S. Dong, X. Li : ICFEM2011 PRTS@PAT http://www.patroot.com

Page 45: PRTS: An Approach for Model Checking Probabilistic Real ... · features like real-time, hierarchy, concurrency, data structures as well as probability. 2 Build a model checker for

MotivationLanguage Syntax of PRTS

Operational SemanticsVerificationEvaluation

Conclusion

Outline

1 Motivation

2 Language Syntax of PRTS

3 Operational SemanticsConcrete ConfigurationsAbstraction

4 Verification

5 Evaluation

6 Conclusion

J. Sun, Y. Liu, S. Song, J. S. Dong, X. Li : ICFEM2011 PRTS@PAT http://www.patroot.com

Page 46: PRTS: An Approach for Model Checking Probabilistic Real ... · features like real-time, hierarchy, concurrency, data structures as well as probability. 2 Build a model checker for

MotivationLanguage Syntax of PRTS

Operational SemanticsVerificationEvaluation

Conclusion

Multi-lift System

Property: one user presses the lift button, but one lift travelingon the same direction passes by without serving him/her.

SystemRandom Nearest

Result(pmax) Time(s) States Result(pmax) Time(s) Stateslift=2; floor=2; user=2 0.21875 3.262 10398 0.13889 2.385 4299lift=2; floor=2; user=3 0.47656 38.785 127384 0.34722 18.061 59267lift=2; floor=2; user=4 0.6792 224.708 737447 0.53781 78.484 276709lift=2; floor=2; user=5 0.81372 945.853 3941883 0.68403 223.036 743973lift=2; floor=3; user=2 0.2551 12.172 37263 0.18 6.757 19726lift=2; floor=3; user=3 0.54009 364.588 831334 0.427 119.810 339630lift=2; floor=3; user=4 0.74396 11479.966 17022359 0.6335 1956.041 6428704lift=2; floor=4; user=2 0.27 27.888 87676 0.19898 13.693 44316lift=3; floor=2; user=2 0.22917 208.481 262588 0.10938 88.549 122604lift=3; floor=2; user=3 OOM - - 0.27344 3093.969 6708763

OOM means Out Of Memory.

J. Sun, Y. Liu, S. Song, J. S. Dong, X. Li : ICFEM2011 PRTS@PAT http://www.patroot.com

Page 47: PRTS: An Approach for Model Checking Probabilistic Real ... · features like real-time, hierarchy, concurrency, data structures as well as probability. 2 Build a model checker for

MotivationLanguage Syntax of PRTS

Operational SemanticsVerificationEvaluation

Conclusion

Outline

1 Motivation

2 Language Syntax of PRTS

3 Operational SemanticsConcrete ConfigurationsAbstraction

4 Verification

5 Evaluation

6 Conclusion

J. Sun, Y. Liu, S. Song, J. S. Dong, X. Li : ICFEM2011 PRTS@PAT http://www.patroot.com

Page 48: PRTS: An Approach for Model Checking Probabilistic Real ... · features like real-time, hierarchy, concurrency, data structures as well as probability. 2 Build a model checker for

MotivationLanguage Syntax of PRTS

Operational SemanticsVerificationEvaluation

Conclusion

Conclusion

1 Modeling language PRTS is proposed for hierarchicalprobabilistic real-time systems.

2 Zone abstraction is used in order to apply probabilisticmodel checking techniques.

3 Model checker PAT is extended to support PRTS.

J. Sun, Y. Liu, S. Song, J. S. Dong, X. Li : ICFEM2011 PRTS@PAT http://www.patroot.com

Page 49: PRTS: An Approach for Model Checking Probabilistic Real ... · features like real-time, hierarchy, concurrency, data structures as well as probability. 2 Build a model checker for

MotivationLanguage Syntax of PRTS

Operational SemanticsVerificationEvaluation

Conclusion

References I

C. A. R. Hoare.Communicating Sequential Processes.Prentice-Hall, 1985.

R. Alur, C. Courcoubetis, and D. L. Dill.Model-checking for Probabilistic Real-time Systems.ICALP, pages 115-126, 1991.

A. Hinton, M. Kwiatkowska, G. Norman and D. Parker.PRISM: A Tool for Automatic Verification of ProbabilisticSystems.TACAS, pages 441-444, 2006.

J. Sun, Y. Liu, S. Song, J. S. Dong, X. Li : ICFEM2011 PRTS@PAT http://www.patroot.com

Page 50: PRTS: An Approach for Model Checking Probabilistic Real ... · features like real-time, hierarchy, concurrency, data structures as well as probability. 2 Build a model checker for

MotivationLanguage Syntax of PRTS

Operational SemanticsVerificationEvaluation

Conclusion

References II

C. Baier and J. Katoen.Principles of Model checking.The MIT Press, 2008.

M. Kwiatkowska, G. Norman, R. Segala and J. Sproston.Automatic Verification of Real-time Systems with DiscreteProbability Distributions.Theoretical Computer Science, 282(1):101–150, 2002.

S. Schnerder.Concurrent and Real-time Systems.John Wiley and Sons, 2000.

J. Sun, Y. Liu, S. Song, J. S. Dong, X. Li : ICFEM2011 PRTS@PAT http://www.patroot.com

Page 51: PRTS: An Approach for Model Checking Probabilistic Real ... · features like real-time, hierarchy, concurrency, data structures as well as probability. 2 Build a model checker for

MotivationLanguage Syntax of PRTS

Operational SemanticsVerificationEvaluation

Conclusion

References III

J. Ouaknine and J. Worrell.Timed CSP = Closed Timed Safety Automata.Electrical Notes Theoretical Computer Sciences, 68(2),2002.

J. Sun, Y. Liu, J. S. Dong and X. Zhang.Verifying Stateful Timed CSP Using Implicit Clocks andZone Abstraction.ICFEM, pages 581-600, 2009.

J. Sun, S. Song and Y. LiuModel Checking Hierarchical Probabilistic Systems.ICFEM, pages 388-403, 2010.

J. Sun, Y. Liu, S. Song, J. S. Dong, X. Li : ICFEM2011 PRTS@PAT http://www.patroot.com

Page 52: PRTS: An Approach for Model Checking Probabilistic Real ... · features like real-time, hierarchy, concurrency, data structures as well as probability. 2 Build a model checker for

MotivationLanguage Syntax of PRTS

Operational SemanticsVerificationEvaluation

Conclusion

T HANK YOU !

J. Sun, Y. Liu, S. Song, J. S. Dong, X. Li : ICFEM2011 PRTS@PAT http://www.patroot.com