02291 system integration
play

02291: System Integration Kripke Structure and Computational Tree - PowerPoint PPT Presentation

02291: System Integration Kripke Structure and Computational Tree Logic (CTL) Hubert Baumeister huba@dtu.dk DTU Compute Technical University of Denmark Spring 2020 Model checking Prove: in our model of the train and signals it never


  1. 02291: System Integration Kripke Structure and Computational Tree Logic (CTL) Hubert Baumeister huba@dtu.dk DTU Compute Technical University of Denmark Spring 2020

  2. Model checking Prove: ”in our model of the train and signals it never happens that both trains are on the bridge” M | = φ ◮ Models M are Kripke structures ◮ Formulas φ are Computational Tree Logic (CTL) formulas ◮ Proving: Model checking

  3. Example of a Kripke structure ◮ Kripke structure: Set of states + relation between states ◮ The Kripke structure of the railroad crossing system has 36 states (2 × 2 × 3 × 3) 1 2 3 4 5 1 0 [s1=red [s1=red [s1=green [s1=green [s1=red [s1=red s2=red s2=red s2=red s2=red s2=red s2=red t1=enroute t1=atSignal t1=atSignal t1=onBridge t1=onBridge t1=onBridge t2=enroute] t2=enroute] t2=enroute] t2=enroute] t2=enroute] t2=onBridge] .... .... .... 1 7 6 7 8 9 [s1=red [s1=red [s1=green [s1=green [s1=red s2=green s2=red s2=red s2=red s2=red t1=onBridge t1=atSignal t1=atSignal t1=onBridge t1=onBridge t2=onBridge] t2=atSignal] t2=atSignal] t2=atSignal] t2=atSignal] 1 1 1 2 1 3 1 4 1 5 1 6 [s1=red [s1=red [s1=red [s1=red [s1=green [s1=green s2=red s2=green s2=green s2=red s2=red s2=green t1=enroute t1=enroute t1=enroute t1=enroute t1=onBridge t1=onBridge t2=onBridge] t2=onBridge] t2=atSignal] t2=atSignal] t2=onBridge] t2=onBridge]

  4. Kripke structure: Definition M | = φ Kripke structure (nondeterministic finite state machine) A Kripke structure M = ( S , I , R , λ ) : ◮ Set of states S , e.g., S = { 1 , 2 , . . . , 36 } ◮ Initial states I ⊆ S , e.g., I = { 1 } ⊆ S ◮ Transition relation R ⊆ S × S , e.g., R = { ( 1 , 2 ) , ( 2 , 3 ) . . . } ◮ Propositions V , e.g., V = { s1 is red , s1 is green , s2 is red , s2 is green , t1 is on bridge , t1 is at signal , t1 is enroute , t2 is on bridge , t2 is at signal , t2 is enroute } ◮ Set of true propositions in a state λ : S → 2 V , e.g., λ ( 1 ) = { s1 is red , s2 is red , t1 is on bridge , t2 is on bridge } λ ( 2 ) = { s1 is red , s2 is red , t1 is at signal , t2 is on bridge } . . .

  5. Computation Tree Unfolding of a Kripke structure

  6. Computation Tree Unfolding of a Kripke structure

  7. Computation Tree Unfolding of a Kripke structure

  8. Computation Tree Unfolding of a Kripke structure

  9. Computation Tree Unfolding of a Kripke structure

  10. Logical formulae: CTL M | = φ if and only if ∀ s 0 ∈ I : M , s 0 | = φ Satisfaction ◮ M , s 0 | = φ : the formula φ holds starting from state s 0 CTL: Computation Tree Logic formulae (1/4) ◮ p ∈ V : p is a basic proposition ◮ ¬ φ , φ ∧ ψ , φ = ⇒ ψ , . . . : the usual boolean connectors . . . Satisfaction: simple formulae ◮ M , s 0 | = p iff p ∈ λ ( s 0 ) ◮ M , s 0 | = φ ∧ ψ iff M , s 0 | = φ and M , s 0 | = ψ . . .

  11. Example 1 2 3 4 5 1 0 [s1=red [s1=red [s1=green [s1=green [s1=red [s1=red s2=red s2=red s2=red s2=red s2=red s2=red t1=enroute t1=atSignal t1=atSignal t1=onBridge t1=onBridge t1=onBridge t2=enroute] t2=enroute] t2=enroute] t2=enroute] t2=enroute] t2=onBridge] .... .... .... 1 7 6 7 8 9 [s1=red [s1=red [s1=green [s1=green [s1=red s2=green s2=red s2=red s2=red s2=red t1=onBridge t1=atSignal t1=atSignal t1=onBridge t1=onBridge t2=onBridge] t2=atSignal] t2=atSignal] t2=atSignal] t2=atSignal] 1 1 1 2 1 3 1 4 1 5 1 6 [s1=red [s1=red [s1=red [s1=red [s1=green [s1=green s2=red s2=green s2=green s2=red s2=red s2=green t1=enroute t1=enroute t1=enroute t1=enroute t1=onBridge t1=onBridge t2=onBridge] t2=onBridge] t2=atSignal] t2=atSignal] t2=onBridge] t2=onBridge] M , 1 | = s1 = red M , 5 �| = s1 = green M , 3 | = s1 = green ∧ t1 = atSignal

  12. Logical formulae: CTL M , s 0 | = QT φ ◮ Q : for all paths (A), or there exists one path (E) ◮ T : for the next state of one path (X), for some state of one path (F), for all states on one path (G) CTL: Computation Tree Logic (2/4) . . . ◮ EX φ , AX φ : formula φ holds in one successor state or in all successor states . . .

  13. Logical formulae: CTL CTL: Computation Tree Logic (3/4) . . . ◮ EF φ , AF φ : formula φ holds eventually in one state in one path or eventually in one state in all paths ◮ EG φ , AG φ : formula φ holds in every state of one path or in every state of every path . . .

  14. CTL example

  15. Please stop the video and try to find the answer Continue with the video to see the solution

  16. CTL example

  17. Railway crossing example ◮ Safety property: Both trains are not at the same time on the bridge ◮ The following states are not reachable: [s1=? s2=? t1=onBridge t2=onBridge]

  18. Please stop the video and try to find the answer Continue with the video to see the solution

  19. Railway crossing example ◮ Safety property: Both trains are not at the same time on the bridge ◮ The following states are not reachable: [s1=? s2=? t1=onBridge t2=onBridge]

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend