logical foundations of cyber physical systems
play

Logical Foundations of Cyber-Physical Systems Andr Platzer Andr - PowerPoint PPT Presentation

14: Hybrid Systems & Games Logical Foundations of Cyber-Physical Systems Andr Platzer Logical Foundations of Cyber-Physical Systems Andr Platzer Andr Platzer (CMU) LFCPS/14: Hybrid Systems & Games LFCPS/14 1 / 24 Outline


  1. Control & Dual Control Operators ⋄ ⋄ Angel Ops Demon Ops ∪ ∩ choice choice ∗ × repeat repeat x ′ = f ( x ) evolve x ′ = f ( x ) d evolve ? Q d ? Q challenge challenge Let Angel be one player Let Demon be another player André Platzer (CMU) LFCPS/14: Hybrid Systems & Games LFCPS/14 11 / 24

  2. Control & Dual Control Operators ⋄ ⋄ Angel Ops d Demon Ops ∪ ∩ choice choice ∗ × repeat repeat x ′ = f ( x ) evolve x ′ = f ( x ) d evolve d ? Q d ? Q challenge challenge Duality operator d passes control between players André Platzer (CMU) LFCPS/14: Hybrid Systems & Games LFCPS/14 11 / 24

  3. Game Operators ⋄ ⋄ Angel Ops d Demon Ops ∪ ∩ choice choice ∗ × repeat repeat x ′ = f ( x ) evolve x ′ = f ( x ) d evolve d ? Q d ? Q challenge challenge Duality operator d passes control between players 8 0Z0Z0s0Z 7 o0Z0Z0j0 6 Po0o0ZpZ 5 Z0oPZ0Z0 4 0Z0Z0Znl 3 Z0Z0Z0Z0 2 0OPZ0OQZ 1 Z0Z0Z0ZB a b c d e f g h André Platzer (CMU) LFCPS/14: Hybrid Systems & Games LFCPS/14 11 / 24

  4. Game Operators ⋄ ⋄ Angel Ops d Demon Ops ∪ ∩ choice choice ∗ × repeat repeat x ′ = f ( x ) evolve x ′ = f ( x ) d evolve d ? Q d ? Q challenge challenge Duality operator d passes control between players h g f e d c b a 1 Z0Z0Z0ZB 2 0OPZ0OQZ 3 Z0Z0Z0Z0 4 0Z0Z0Znl 5 Z0oPZ0Z0 6 Po0o0ZpZ 7 o0Z0Z0j0 8 0Z0Z0s0Z André Platzer (CMU) LFCPS/14: Hybrid Systems & Games LFCPS/14 11 / 24

  5. Game Operators ⋄ ⋄ Angel Ops d Demon Ops ∪ ∩ choice choice ∗ × repeat repeat x ′ = f ( x ) evolve x ′ = f ( x ) d evolve d ? Q d ? Q challenge challenge Duality operator d passes control between players 8 0Z0Z0s0Z 7 o0Z0Z0j0 6 Po0o0ZpZ 5 Z0oPZ0Z0 4 0Z0Z0Znl 3 Z0Z0Z0Z0 2 0OPZ0OQZ 1 Z0Z0Z0ZB a b c d e f g h André Platzer (CMU) LFCPS/14: Hybrid Systems & Games LFCPS/14 11 / 24

  6. Definable Game Operators ⋄ ⋄ Angel Ops d Demon Ops ∪ ∩ choice choice ∗ × repeat repeat x ′ = f ( x ) evolve x ′ = f ( x ) d evolve d ? Q d ? Q challenge challenge if ( Q ) α else β ≡ while ( Q ) α ≡ α ∩ β ≡ α × ≡ ( x ′ = f ( x )& Q ) d x ′ = f ( x )& Q ( x := e ) d x := e ? Q d ? Q André Platzer (CMU) LFCPS/14: Hybrid Systems & Games LFCPS/14 12 / 24

  7. Definable Game Operators ⋄ ⋄ Angel Ops d Demon Ops ∪ ∩ choice choice ∗ × repeat repeat x ′ = f ( x ) evolve x ′ = f ( x ) d evolve d ? Q d ? Q challenge challenge if ( Q ) α else β ≡ (? Q ; α ) ∪ (? ¬ Q ; β ) while ( Q ) α ≡ α ∩ β ≡ α × ≡ ( x ′ = f ( x )& Q ) d x ′ = f ( x )& Q ( x := e ) d x := e ? Q d ? Q André Platzer (CMU) LFCPS/14: Hybrid Systems & Games LFCPS/14 12 / 24

  8. Definable Game Operators ⋄ ⋄ Angel Ops d Demon Ops ∪ ∩ choice choice ∗ × repeat repeat x ′ = f ( x ) evolve x ′ = f ( x ) d evolve d ? Q d ? Q challenge challenge if ( Q ) α else β ≡ (? Q ; α ) ∪ (? ¬ Q ; β ) while ( Q ) α ≡ (? Q ; α ) ∗ ;? ¬ Q α ∩ β ≡ α × ≡ ( x ′ = f ( x )& Q ) d x ′ = f ( x )& Q ( x := e ) d x := e ? Q d ? Q André Platzer (CMU) LFCPS/14: Hybrid Systems & Games LFCPS/14 12 / 24

  9. Definable Game Operators ⋄ ⋄ Angel Ops d Demon Ops ∪ ∩ choice choice ∗ × repeat repeat x ′ = f ( x ) evolve x ′ = f ( x ) d evolve d ? Q d ? Q challenge challenge if ( Q ) α else β ≡ (? Q ; α ) ∪ (? ¬ Q ; β ) 8 0Z0Z0s0Z while ( Q ) α ≡ (? Q ; α ) ∗ ;? ¬ Q 7 o0Z0Z0j0 6 Po0o0ZpZ 5 Z0oPZ0Z0 α ∩ β ≡ 4 0Z0Z0Znl α × ≡ 3 Z0Z0Z0Z0 2 0OPZ0OQZ 1 Z0Z0Z0ZB ( x ′ = f ( x )& Q ) d x ′ = f ( x )& Q a b c d e f g h ( x := e ) d x := e ? Q d ? Q André Platzer (CMU) LFCPS/14: Hybrid Systems & Games LFCPS/14 12 / 24

  10. Definable Game Operators ⋄ ⋄ Angel Ops d Demon Ops ∪ ∩ choice choice ∗ × repeat repeat x ′ = f ( x ) evolve x ′ = f ( x ) d evolve d ? Q d ? Q challenge challenge if ( Q ) α else β ≡ (? Q ; α ) ∪ (? ¬ Q ; β ) h g f e d c b a while ( Q ) α ≡ (? Q ; α ) ∗ ;? ¬ Q 1 Z0Z0Z0ZB 2 0OPZ0OQZ α ∩ β ≡ ( α d ∪ β d ) d 3 Z0Z0Z0Z0 4 0Z0Z0Znl α × ≡ 5 Z0oPZ0Z0 6 Po0o0ZpZ 7 o0Z0Z0j0 ( x ′ = f ( x )& Q ) d x ′ = f ( x )& Q 8 0Z0Z0s0Z ( x := e ) d x := e ? Q d ? Q André Platzer (CMU) LFCPS/14: Hybrid Systems & Games LFCPS/14 12 / 24

  11. Definable Game Operators ⋄ ⋄ Angel Ops d Demon Ops ∪ ∩ choice choice ∗ × repeat repeat x ′ = f ( x ) evolve x ′ = f ( x ) d evolve d ? Q d ? Q challenge challenge if ( Q ) α else β ≡ (? Q ; α ) ∪ (? ¬ Q ; β ) while ( Q ) α ≡ (? Q ; α ) ∗ ;? ¬ Q α ∩ β ≡ ( α d ∪ β d ) d α × ≡ (( α d ) ∗ ) d ( x ′ = f ( x )& Q ) d x ′ = f ( x )& Q ( x := e ) d x := e ? Q d ? Q André Platzer (CMU) LFCPS/14: Hybrid Systems & Games LFCPS/14 12 / 24

  12. Definable Game Operators ⋄ ⋄ Angel Ops d Demon Ops ∪ ∩ choice choice ∗ × repeat repeat x ′ = f ( x ) evolve x ′ = f ( x ) d evolve d ? Q d ? Q challenge challenge if ( Q ) α else β ≡ (? Q ; α ) ∪ (? ¬ Q ; β ) while ( Q ) α ≡ (? Q ; α ) ∗ ;? ¬ Q α ∩ β ≡ ( α d ∪ β d ) d α × ≡ (( α d ) ∗ ) d ( x ′ = f ( x )& Q ) d �≡ x ′ = f ( x )& Q ( x := e ) d x := e ? Q d ? Q André Platzer (CMU) LFCPS/14: Hybrid Systems & Games LFCPS/14 12 / 24

  13. Definable Game Operators ⋄ ⋄ Angel Ops d Demon Ops ∪ ∩ choice choice ∗ × repeat repeat x ′ = f ( x ) evolve x ′ = f ( x ) d evolve d ? Q d ? Q challenge challenge if ( Q ) α else β ≡ (? Q ; α ) ∪ (? ¬ Q ; β ) while ( Q ) α ≡ (? Q ; α ) ∗ ;? ¬ Q α ∩ β ≡ ( α d ∪ β d ) d α × ≡ (( α d ) ∗ ) d ( x ′ = f ( x )& Q ) d �≡ x ′ = f ( x )& Q ( x := e ) d ≡ x := e ? Q d ? Q André Platzer (CMU) LFCPS/14: Hybrid Systems & Games LFCPS/14 12 / 24

  14. Definable Game Operators ⋄ ⋄ Angel Ops d Demon Ops ∪ ∩ choice choice ∗ × repeat repeat x ′ = f ( x ) evolve x ′ = f ( x ) d evolve d ? Q d ? Q challenge challenge if ( Q ) α else β ≡ (? Q ; α ) ∪ (? ¬ Q ; β ) while ( Q ) α ≡ (? Q ; α ) ∗ ;? ¬ Q α ∩ β ≡ ( α d ∪ β d ) d α × ≡ (( α d ) ∗ ) d ( x ′ = f ( x )& Q ) d �≡ x ′ = f ( x )& Q ( x := e ) d ≡ x := e ? Q d �≡ ? Q André Platzer (CMU) LFCPS/14: Hybrid Systems & Games LFCPS/14 12 / 24

  15. Outline Learning Objectives 1 Motivation 2 A Gradual Introduction to Hybrid Games 3 Choices & Nondeterminism Control & Dual Control Demon’s Derived Controls Differential Game Logic 4 Syntax of Hybrid Games Syntax of Differential Game Logic Formulas Examples Push-around Cart Robot Dance Example: Robot Soccer 5 An Informal Operational Game Tree Semantics Summary 6 André Platzer (CMU) LFCPS/14: Hybrid Systems & Games LFCPS/14 12 / 24

  16. Hybrid Games: Syntax Definition (Hybrid game α ) α , β ::= x := e | ? Q | x ′ = f ( x )& Q | α ∪ β | α ; β | α ∗ | α d André Platzer (CMU) LFCPS/14: Hybrid Systems & Games LFCPS/14 13 / 24

  17. Hybrid Games: Syntax Discrete Differential Test Choice Seq. Repeat Assign Equation Game Game Game Game Definition (Hybrid game α ) α , β ::= x := e | ? Q | x ′ = f ( x )& Q | α ∪ β | α ; β | α ∗ | α d André Platzer (CMU) LFCPS/14: Hybrid Systems & Games LFCPS/14 13 / 24

  18. Hybrid Games: Syntax Discrete Differential Test Choice Seq. Repeat Dual Assign Equation Game Game Game Game Game Definition (Hybrid game α ) α , β ::= x := e | ? Q | x ′ = f ( x )& Q | α ∪ β | α ; β | α ∗ | α d André Platzer (CMU) LFCPS/14: Hybrid Systems & Games LFCPS/14 13 / 24

  19. Example: Push-around Cart a d x v André Platzer (CMU) LFCPS/14: Hybrid Systems & Games LFCPS/14 14 / 24

  20. Example: Push-around Cart a d x v ( a := 1 ∪ a := − 1 );( d := 1 ∪ d := − 1 ) d ; { x ′ = v , v ′ = a + d } � ∗ � André Platzer (CMU) LFCPS/14: Hybrid Systems & Games LFCPS/14 14 / 24

  21. Example: Push-around Cart a d x v ( a := 1 ∪ a := − 1 );( d := 1 ∪ d := − 1 ) d ; { x ′ = v , v ′ = a + d } � ∗ � ( d := 1 ∪ d := − 1 ) d ;( a := 1 ∪ a := − 1 ); { x ′ = v , v ′ = a + d } � ∗ � André Platzer (CMU) LFCPS/14: Hybrid Systems & Games LFCPS/14 14 / 24

  22. Example: Push-around Cart a d x v ( a := 1 ∪ a := − 1 );( d := 1 ∩ d := − 1 ); { x ′ = v , v ′ = a + d } � ∗ � ( d := 1 ∩ d := − 1 );( a := 1 ∪ a := − 1 ); { x ′ = v , v ′ = a + d } � ∗ � André Platzer (CMU) LFCPS/14: Hybrid Systems & Games LFCPS/14 14 / 24

  23. Example: Push-around Cart a d x v ( a := 1 ∪ a := − 1 );( d := 1 ∩ d := − 1 ); { x ′ = v , v ′ = a + d } � ∗ � ( d := 1 ∩ d := − 1 );( a := 1 ∪ a := − 1 ); { x ′ = v , v ′ = a + d } � ∗ � ( d := 1 ∪ d := − 1 );( a := 1 ∪ a := − 1 ); { x ′ = v , v ′ = a + d } � ∗ � HP André Platzer (CMU) LFCPS/14: Hybrid Systems & Games LFCPS/14 14 / 24

  24. Example: Push-around Cart a d x v ( a := 1 ∪ a := − 1 );( d := 1 ∩ d := − 1 ); { x ′ = v , v ′ = a + d } � ∗ � ( d := 1 ∩ d := − 1 );( a := 1 ∪ a := − 1 ); { x ′ = v , v ′ = a + d } � ∗ � ( d := 1 ∪ d := − 1 );( a := 1 ∪ a := − 1 ); { x ′ = v , v ′ = a + d } � ∗ � HP Hybrid systems can’t say that a is Angel’s choice and d is Demon’s André Platzer (CMU) LFCPS/14: Hybrid Systems & Games LFCPS/14 14 / 24

  25. Differential Game Logic: Syntax Definition (Hybrid game α ) α , β ::= x := e | ? Q | x ′ = f ( x )& Q | α ∪ β | α ; β | α ∗ | α d André Platzer (CMU) LFCPS/14: Hybrid Systems & Games LFCPS/14 15 / 24

  26. Differential Game Logic: Syntax Definition (Hybrid game α ) α , β ::= x := e | ? Q | x ′ = f ( x )& Q | α ∪ β | α ; β | α ∗ | α d Definition (dGL Formula P ) P , Q ::= e ≥ ˜ e | ¬ P | P ∧ Q | ∀ x P | ∃ x P | � α � P | [ α ] P André Platzer (CMU) LFCPS/14: Hybrid Systems & Games LFCPS/14 15 / 24

  27. Differential Game Logic: Syntax Discrete Differential Test Choice Seq. Repeat Assign Equation Game Game Game Game Definition (Hybrid game α ) α , β ::= x := e | ? Q | x ′ = f ( x )& Q | α ∪ β | α ; β | α ∗ | α d Definition (dGL Formula P ) P , Q ::= e ≥ ˜ e | ¬ P | P ∧ Q | ∀ x P | ∃ x P | � α � P | [ α ] P All Some Reals Reals André Platzer (CMU) LFCPS/14: Hybrid Systems & Games LFCPS/14 15 / 24

  28. Differential Game Logic: Syntax Discrete Differential Test Choice Seq. Repeat Dual Assign Equation Game Game Game Game Game Definition (Hybrid game α ) α , β ::= x := e | ? Q | x ′ = f ( x )& Q | α ∪ β | α ; β | α ∗ | α d Definition (dGL Formula P ) P , Q ::= e ≥ ˜ e | ¬ P | P ∧ Q | ∀ x P | ∃ x P | � α � P | [ α ] P All Some Reals Reals André Platzer (CMU) LFCPS/14: Hybrid Systems & Games LFCPS/14 15 / 24

  29. Differential Game Logic: Syntax Discrete Differential Test Choice Seq. Repeat Dual Assign Equation Game Game Game Game Game Definition (Hybrid game α ) α , β ::= x := e | ? Q | x ′ = f ( x )& Q | α ∪ β | α ; β | α ∗ | α d Definition (dGL Formula P ) P , Q ::= e ≥ ˜ e | ¬ P | P ∧ Q | ∀ x P | ∃ x P | � α � P | [ α ] P All Some Angel Reals Wins Reals André Platzer (CMU) LFCPS/14: Hybrid Systems & Games LFCPS/14 15 / 24

  30. Differential Game Logic: Syntax Discrete Differential Test Choice Seq. Repeat Dual Assign Equation Game Game Game Game Game Definition (Hybrid game α ) α , β ::= x := e | ? Q | x ′ = f ( x )& Q | α ∪ β | α ; β | α ∗ | α d Definition (dGL Formula P ) P , Q ::= e ≥ ˜ e | ¬ P | P ∧ Q | ∀ x P | ∃ x P | � α � P | [ α ] P All Some Angel Demon Reals Wins Wins Reals André Platzer (CMU) LFCPS/14: Hybrid Systems & Games LFCPS/14 15 / 24

  31. Simple Examples � ( x := x + 1 ;( x ′ = 1 ) d ∪ x := x − 1 ) ∗ � ( 0 ≤ x < 1 ) � ( x := x + 1 ;( x ′ = 1 ) d ∪ ( x := x − 1 ∩ x := x − 2 )) ∗ � ( 0 ≤ x < 1 ) André Platzer (CMU) LFCPS/14: Hybrid Systems & Games LFCPS/14 16 / 24

  32. Simple Examples � � ( x := x + 1 ;( x ′ = 1 ) d ∪ x := x − 1 ) ∗ � ( 0 ≤ x < 1 ) � ( x := x + 1 ;( x ′ = 1 ) d ∪ ( x := x − 1 ∩ x := x − 2 )) ∗ � ( 0 ≤ x < 1 ) André Platzer (CMU) LFCPS/14: Hybrid Systems & Games LFCPS/14 16 / 24

  33. Simple Examples � � ( x := x + 1 ;( x ′ = 1 ) d ∪ x := x − 1 ) ∗ � ( 0 ≤ x < 1 ) � � ( x := x + 1 ;( x ′ = 1 ) d ∪ ( x := x − 1 ∩ x := x − 2 )) ∗ � ( 0 ≤ x < 1 ) André Platzer (CMU) LFCPS/14: Hybrid Systems & Games LFCPS/14 16 / 24

  34. Example: Push-around Cart a d x v v ≥ 1 → ( d := 1 ∪ d := − 1 ) d ;( a := 1 ∪ a := − 1 ); { x ′ = v , v ′ = a + d } � ∗ � �� v ≥ 0 André Platzer (CMU) LFCPS/14: Hybrid Systems & Games LFCPS/14 17 / 24

  35. Example: Push-around Cart a d x v � v ≥ 1 → ( d := 1 ∩ d := − 1 );( a := 1 ∪ a := − 1 ); { x ′ = v , v ′ = a + d } � ∗ � �� v ≥ 0 André Platzer (CMU) LFCPS/14: Hybrid Systems & Games LFCPS/14 17 / 24

  36. Example: Push-around Cart a d x v � v ≥ 1 → d before a can compensate ( d := 1 ∩ d := − 1 );( a := 1 ∪ a := − 1 ); { x ′ = v , v ′ = a + d } � ∗ � �� v ≥ 0 x ≥ 0 ∧ v ≥ 0 → ( d := 1 ∩ d := − 1 );( a := 1 ∪ a := − 1 ); { x ′ = v , v ′ = a + d } � ∗ � �� x ≥ 0 André Platzer (CMU) LFCPS/14: Hybrid Systems & Games LFCPS/14 17 / 24

  37. Example: Push-around Cart a d x v � v ≥ 1 → d before a can compensate ( d := 1 ∩ d := − 1 );( a := 1 ∪ a := − 1 ); { x ′ = v , v ′ = a + d } � ∗ � �� v ≥ 0 � x ≥ 0 ∧ v ≥ 0 → d before a can compensate ( d := 1 ∩ d := − 1 );( a := 1 ∪ a := − 1 ); { x ′ = v , v ′ = a + d } � ∗ � �� x ≥ 0 André Platzer (CMU) LFCPS/14: Hybrid Systems & Games LFCPS/14 17 / 24

  38. Example: Push-around Cart a d x v � v ≥ 1 → d before a can compensate ( d := 1 ∩ d := − 1 );( a := 1 ∪ a := − 1 ); { x ′ = v , v ′ = a + d } � ∗ � �� v ≥ 0 x ≥ 0 → ( d := 1 ∩ d := − 1 );( a := 1 ∪ a := − 1 ); { x ′ = v , v ′ = a + d } � ∗ � �� x ≥ 0 André Platzer (CMU) LFCPS/14: Hybrid Systems & Games LFCPS/14 17 / 24

  39. Example: Push-around Cart a d x v � v ≥ 1 → d before a can compensate ( d := 1 ∩ d := − 1 );( a := 1 ∪ a := − 1 ); { x ′ = v , v ′ = a + d } � ∗ � �� v ≥ 0 � x ≥ 0 → boring by skip ( d := 1 ∩ d := − 1 );( a := 1 ∪ a := − 1 ); { x ′ = v , v ′ = a + d } � ∗ � �� x ≥ 0 André Platzer (CMU) LFCPS/14: Hybrid Systems & Games LFCPS/14 17 / 24

  40. Example: Push-around Cart a d x v � v ≥ 1 → d before a can compensate ( d := 1 ∩ d := − 1 );( a := 1 ∪ a := − 1 ); { x ′ = v , v ′ = a + d } � ∗ � �� v ≥ 0 ( d := 1 ∩ d := − 1 );( a := 1 ∪ a := − 1 ); { x ′ = v , v ′ = a + d } � ∗ � �� x ≥ 0 André Platzer (CMU) LFCPS/14: Hybrid Systems & Games LFCPS/14 17 / 24

  41. Example: Push-around Cart a d x v � v ≥ 1 → d before a can compensate ( d := 1 ∩ d := − 1 );( a := 1 ∪ a := − 1 ); { x ′ = v , v ′ = a + d } � ∗ � �� v ≥ 0 � counterstrategy d := − 1 ( d := 1 ∩ d := − 1 );( a := 1 ∪ a := − 1 ); { x ′ = v , v ′ = a + d } � ∗ � �� x ≥ 0 André Platzer (CMU) LFCPS/14: Hybrid Systems & Games LFCPS/14 17 / 24

  42. Example: Push-around Cart a d x v � v ≥ 1 → d before a can compensate ( d := 1 ∩ d := − 1 );( a := 1 ∪ a := − 1 ); { x ′ = v , v ′ = a + d } � ∗ � �� v ≥ 0 � counterstrategy d := − 1 ( d := 1 ∩ d := − 1 );( a := 1 ∪ a := − 1 ); { x ′ = v , v ′ = a + d } � ∗ � �� x ≥ 0 ( d := 1 ∩ d := − 1 ); ( a := 2 ∪ a := − 2 ); { x ′ = v , v ′ = a + d } � ∗ � �� x ≥ 0 André Platzer (CMU) LFCPS/14: Hybrid Systems & Games LFCPS/14 17 / 24

  43. Example: Push-around Cart a d x v � v ≥ 1 → d before a can compensate ( d := 1 ∩ d := − 1 );( a := 1 ∪ a := − 1 ); { x ′ = v , v ′ = a + d } � ∗ � �� v ≥ 0 � counterstrategy d := − 1 ( d := 1 ∩ d := − 1 );( a := 1 ∪ a := − 1 ); { x ′ = v , v ′ = a + d } � ∗ � �� x ≥ 0 ( d := 1 ∩ d := − 1 ); ( a := 2 ∪ a := − 2 ); { x ′ = v , v ′ = a + d } � ∗ � �� � x ≥ 0 André Platzer (CMU) LFCPS/14: Hybrid Systems & Games LFCPS/14 17 / 24

  44. Example: Push-around Cart a d x v � v ≥ 1 → d before a can compensate ( d := 1 ∩ d := − 1 );( a := 1 ∪ a := − 1 ); { x ′ = v , v ′ = a + d } � ∗ � �� v ≥ 0 � counterstrategy d := − 1 ( d := 1 ∩ d := − 1 );( a := 1 ∪ a := − 1 ); { x ′ = v , v ′ = a + d } � ∗ � �� x ≥ 0 ( d := 1 ∩ d := − 1 ); ( a := 2 ∪ a := − 2 ); { x ′ = v , v ′ = a + d } � ∗ � �� � x ≥ 0 �� ( d := 2 ∩ d := − 2 ); ( a := 2 ∪ a := − 2 ); t := 0 ; { x ′ = v , v ′ = a + d , t ′ = 1 & t ≤ 1 } x 2 ≥ 100 � ∗ � André Platzer (CMU) LFCPS/14: Hybrid Systems & Games LFCPS/14 17 / 24

  45. Example: Push-around Cart a d x v � v ≥ 1 → d before a can compensate ( d := 1 ∩ d := − 1 );( a := 1 ∪ a := − 1 ); { x ′ = v , v ′ = a + d } � ∗ � �� v ≥ 0 � counterstrategy d := − 1 ( d := 1 ∩ d := − 1 );( a := 1 ∪ a := − 1 ); { x ′ = v , v ′ = a + d } � ∗ � �� x ≥ 0 ( d := 1 ∩ d := − 1 ); ( a := 2 ∪ a := − 2 ); { x ′ = v , v ′ = a + d } � ∗ � �� � x ≥ 0 �� ( d := 2 ∩ d := − 2 ); ( a := 2 ∪ a := − 2 ); a := d then a := 2 sign v � t := 0 ; { x ′ = v , v ′ = a + d , t ′ = 1 & t ≤ 1 } x 2 ≥ 100 � ∗ � André Platzer (CMU) LFCPS/14: Hybrid Systems & Games LFCPS/14 17 / 24

  46. Example: WALL · E and EVE Robot Dance 1D planet e w v g u f ( w − e ) 2 ≤ 1 ∧ v = f → �� ( u := 1 ∩ u := − 1 ); ( g := 1 ∪ g := − 1 ); t := 0 ; { w ′ = v , v ′ = u , e ′ = f , f ′ = g , t ′ = 1 & t ≤ 1 } d ( w − e ) 2 ≤ 1 � × � EVE at e plays Angel’s part controlling g WALL · E at w plays Demon’s part controlling u André Platzer (CMU) LFCPS/14: Hybrid Systems & Games LFCPS/14 18 / 24

  47. Example: WALL · E and EVE Robot Dance and the World 1D planet e w v g u f ( w − e ) 2 ≤ 1 ∧ v = f → �� ( u := 1 ∩ u := − 1 ); ( g := 1 ∪ g := − 1 ); t := 0 ; { w ′ = v , v ′ = u , e ′ = f , f ′ = g , t ′ = 1 & t ≤ 1 } d ( w − e ) 2 ≤ 1 � × � EVE at e plays Angel’s part controlling g WALL · E at w plays Demon’s part controlling u and world time André Platzer (CMU) LFCPS/14: Hybrid Systems & Games LFCPS/14 18 / 24

  48. Example: WALL · E and EVE 1D planet e w v g u f ( w − e ) 2 ≤ 1 ∧ v = f → �� ( u := 1 ∩ u := − 1 ); ( g := 1 ∪ g := − 1 ); t := 0 ; { w ′ = v , v ′ = u , e ′ = f , f ′ = g , t ′ = 1 & t ≤ 1 } � × � ( w − e ) 2 > 1 WALL · E at w plays Demon’s part controlling u and world time EVE at e plays Angel’s part controlling g André Platzer (CMU) LFCPS/14: Hybrid Systems & Games LFCPS/14 19 / 24

  49. Example: Goalie in Robot Soccer y , g g ( x , y ) x x < 0 ∧ v > 0 ∧ y = g → � ( w :=+ w ∩ w := − w ); ( u :=+ u ∪ u := − u ); { x ′ = v , y ′ = w , g ′ = u } � ∗ � x 2 +( y − g ) 2 ≤ 1 � André Platzer (CMU) LFCPS/14: Hybrid Systems & Games LFCPS/14 20 / 24

  50. Example: Goalie in Robot Soccer y , g ( v , + w ) g ( x , y ) x x < 0 ∧ v > 0 ∧ y = g → � ( w :=+ w ∩ w := − w ); ( u :=+ u ∪ u := − u ); { x ′ = v , y ′ = w , g ′ = u } � ∗ � x 2 +( y − g ) 2 ≤ 1 � André Platzer (CMU) LFCPS/14: Hybrid Systems & Games LFCPS/14 20 / 24

  51. Example: Goalie in Robot Soccer y , g ( v , + w ) g ( x , y ) x ( v , − w ) x < 0 ∧ v > 0 ∧ y = g → � ( w :=+ w ∩ w := − w ); ( u :=+ u ∪ u := − u ); { x ′ = v , y ′ = w , g ′ = u } � ∗ � x 2 +( y − g ) 2 ≤ 1 � André Platzer (CMU) LFCPS/14: Hybrid Systems & Games LFCPS/14 20 / 24

  52. Example: Goalie in Robot Soccer y , g ( v , + w ) + u g ( x , y ) x ( v , − w ) x < 0 ∧ v > 0 ∧ y = g → � ( w :=+ w ∩ w := − w ); ( u :=+ u ∪ u := − u ); { x ′ = v , y ′ = w , g ′ = u } � ∗ � x 2 +( y − g ) 2 ≤ 1 � André Platzer (CMU) LFCPS/14: Hybrid Systems & Games LFCPS/14 20 / 24

  53. Example: Goalie in Robot Soccer y , g ( v , + w ) + u g ( x , y ) x − u ( v , − w ) x < 0 ∧ v > 0 ∧ y = g → � ( w :=+ w ∩ w := − w ); ( u :=+ u ∪ u := − u ); { x ′ = v , y ′ = w , g ′ = u } � ∗ � x 2 +( y − g ) 2 ≤ 1 � André Platzer (CMU) LFCPS/14: Hybrid Systems & Games LFCPS/14 20 / 24

  54. Example: Goalie in Robot Soccer y , g ( v , + w ) + u g ( x , y ) Goalie’s x − u Secret ( v , − w ) � x � 2 ( u − w ) 2 ≤ 1 ∧ v x < 0 ∧ v > 0 ∧ y = g → � ( w :=+ w ∩ w := − w ); ( u :=+ u ∪ u := − u ); { x ′ = v , y ′ = w , g ′ = u } � ∗ � x 2 +( y − g ) 2 ≤ 1 � André Platzer (CMU) LFCPS/14: Hybrid Systems & Games LFCPS/14 20 / 24

  55. Outline Learning Objectives 1 Motivation 2 A Gradual Introduction to Hybrid Games 3 Choices & Nondeterminism Control & Dual Control Demon’s Derived Controls Differential Game Logic 4 Syntax of Hybrid Games Syntax of Differential Game Logic Formulas Examples Push-around Cart Robot Dance Example: Robot Soccer 5 An Informal Operational Game Tree Semantics Summary 6 André Platzer (CMU) LFCPS/14: Hybrid Systems & Games LFCPS/14 20 / 24

  56. Differential Game Logic: Operational Semantics Definition (Hybrid game α : operational semantics) x := e ω x := e ω ω [ [ e ] ] x André Platzer (CMU) LFCPS/14: Hybrid Systems & Games LFCPS/14 21 / 24

  57. Differential Game Logic: Operational Semantics Definition (Hybrid game α : operational semantics) x ′ = f ( x )& Q ω 0 r t ϕ ( 0 ) ϕ ( t ) ϕ ( r ) André Platzer (CMU) LFCPS/14: Hybrid Systems & Games LFCPS/14 21 / 24

  58. Differential Game Logic: Operational Semantics Definition (Hybrid game α : operational semantics) ? Q ω ] [ Q ] ? Q ω ∈ [ ω André Platzer (CMU) LFCPS/14: Hybrid Systems & Games LFCPS/14 21 / 24

  59. Differential Game Logic: Operational Semantics Definition (Hybrid game α : operational semantics) α ∪ β ω r t i g f e h l t ω ω α α α β β β s λ s 1 s i t 1 t j t κ André Platzer (CMU) LFCPS/14: Hybrid Systems & Games LFCPS/14 21 / 24

  60. Differential Game Logic: Operational Semantics Definition (Hybrid game α : operational semantics) α ; β ω α α α t 1 t i t λ β β β β β β β β r j r λ 1 r λ i r j r λ 1 r 1 r 1 r 1 1 i λ 1 1 i λ λ André Platzer (CMU) LFCPS/14: Hybrid Systems & Games LFCPS/14 21 / 24

  61. Differential Game Logic: Operational Semantics Definition (Hybrid game α : operational semantics) α ∗ ω repeat p o t s ω ω α α repeat repeat stop stop α α α α r r r r e e e e stop stop stop stop p p p p e e e e a a a a t t t t α α α α α α α α André Platzer (CMU) LFCPS/14: Hybrid Systems & Games LFCPS/14 21 / 24

  62. Differential Game Logic: Operational Semantics Definition (Hybrid game α : operational semantics) α α d d ω ω s 0 s 0 t 0 t 0 s λ s λ s 1 s i t 1 t j t κ s 1 s i t 1 t j t κ André Platzer (CMU) LFCPS/14: Hybrid Systems & Games LFCPS/14 21 / 24

  63. Filibusters X repeat stop X X 0 1 repeat repeat stop stop 0 0 1 1 � ( x := 0 ∩ x := 1 ) ∗ � x = 0 ⋄ ⋄ 0 1 0 1 r e p ⋄ p o e t s a t 0 0 ⋄ 0 1 ⋄ André Platzer (CMU) LFCPS/14: Hybrid Systems & Games LFCPS/14 22 / 24

  64. Filibusters & The Significance of Finitude X repeat stop X X 0 1 repeat repeat stop stop 0 0 1 1 � ( x := 0 ∩ x := 1 ) ∗ � x = 0 ⋄ ⋄ wfd 0 1 0 1 � false unless x = 0 r e p ⋄ p o e t s a t 0 0 ⋄ 0 1 ⋄ André Platzer (CMU) LFCPS/14: Hybrid Systems & Games LFCPS/14 22 / 24

  65. Filibusters & The Significance of Finitude X repeat stop X X � ( x ′ = 1 d ; x := 0 ) ∗ � x = 0 0 1 repeat repeat � ( x := 0 ; x ′ = 1 d ) ∗ � x = 0 stop stop 0 0 1 1 � ( x := 0 ∩ x := 1 ) ∗ � x = 0 ⋄ ⋄ wfd 0 1 0 1 � false unless x = 0 r e p ⋄ p o e t s a t 0 0 ⋄ 0 1 ⋄ André Platzer (CMU) LFCPS/14: Hybrid Systems & Games LFCPS/14 22 / 24

  66. Filibusters & The Significance of Finitude X repeat stop < ∞ � true X X � ( x ′ = 1 d ; x := 0 ) ∗ � x = 0 0 1 repeat repeat � ( x := 0 ; x ′ = 1 d ) ∗ � x = 0 stop stop 0 0 1 1 � ( x := 0 ∩ x := 1 ) ∗ � x = 0 ⋄ ⋄ wfd 0 1 0 1 � false unless x = 0 r e p ⋄ p o e t s a t 0 0 ⋄ 0 1 ⋄ André Platzer (CMU) LFCPS/14: Hybrid Systems & Games LFCPS/14 22 / 24

  67. Filibusters & The Significance of Finitude X repeat stop < ∞ � true X X � ( x ′ = 1 d ; x := 0 ) ∗ � x = 0 0 1 repeat repeat � ( x := 0 ; x ′ = 1 d ) ∗ � x = 0 stop stop 0 0 1 1 � ( x := 0 ∩ x := 1 ) ∗ � x = 0 ⋄ ⋄ wfd 0 1 0 1 � false unless x = 0 r e p ⋄ p o e t s a Well-defined games t 0 0 can’t be postponed forever ⋄ 0 1 ⋄ André Platzer (CMU) LFCPS/14: Hybrid Systems & Games LFCPS/14 22 / 24

  68. Outline Learning Objectives 1 Motivation 2 A Gradual Introduction to Hybrid Games 3 Choices & Nondeterminism Control & Dual Control Demon’s Derived Controls Differential Game Logic 4 Syntax of Hybrid Games Syntax of Differential Game Logic Formulas Examples Push-around Cart Robot Dance Example: Robot Soccer 5 An Informal Operational Game Tree Semantics Summary 6 André Platzer (CMU) LFCPS/14: Hybrid Systems & Games LFCPS/14 22 / 24

  69. Differential Game Logic: Syntax Discrete Differential Test Choice Seq. Repeat Dual Assign Equation Game Game Game Game Game Definition (Hybrid game α ) α , β ::= x := e | ? Q | x ′ = f ( x )& Q | α ∪ β | α ; β | α ∗ | α d Definition (dGL Formula P ) P , Q ::= e ≥ ˜ e | ¬ P | P ∧ Q | ∀ x P | ∃ x P | � α � P | [ α ] P All Some Angel Demon Reals Wins Wins Reals André Platzer (CMU) LFCPS/14: Hybrid Systems & Games LFCPS/14 23 / 24

  70. Summary differential game logic � α � ϕ dGL = GL + HG = dL + d ϕ e o n t c t e i n r Differential game logic u c s o i u Logic for hybrid games d s Compositional PL + logic Discrete + continuous + adversarial l a stochastic i Operational semantics (informally) r a s nondet r e Next chapter v d a Formal semantics 1 André Platzer (CMU) LFCPS/14: Hybrid Systems & Games LFCPS/14 24 / 24

  71. Outline Example: Robot Factory 7 André Platzer (CMU) LFCPS/14: Hybrid Systems & Games LFCPS/14 24 / 24

  72. Example: Robot Factory Decentralized Automation ( r x , r y ) f y e y ( l x , l y ) x b e x f x Model Primary objectives of the robot ( x , y ) robot coordinates within time ε Leave ( v x , v y ) velocities Never leave outer conveyor belts may Challenges instantaneously increase robot’s velocity by ( c x , c y ) Distributed, physical environment Possibly conflicting secondary objectives André Platzer (CMU) LFCPS/14: Hybrid Systems & Games LFCPS/14 25 / 24

  73. Robot Factory Automation ( RF ) Example (Robot-Demon vs. Angel-Factory Environment) � (? true ∪ (?( x < e x ∧ y < e y ∧ eff 1 = 1 ); v x := v x + c x ; eff 1 := 0 ) // belt ∪ (?( e x ≤ x ∧ y ≤ f y ∧ eff 2 = 1 ); v y := v y + c y ; eff 2 := 0 ) ); ( r x , r y ) f y ( v x , v y ) � ∗ e y x b ( l x , l y ) e x f x André Platzer (CMU) LFCPS/14: Hybrid Systems & Games LFCPS/14 26 / 24

  74. Robot Factory Automation ( RF ) Example (Robot-Demon vs. Angel-Factory Environment) � (? true ∪ (?( x < e x ∧ y < e y ∧ eff 1 = 1 ); v x := v x + c x ; eff 1 := 0 ) // belt ∪ (?( e x ≤ x ∧ y ≤ f y ∧ eff 2 = 1 ); v y := v y + c y ; eff 2 := 0 ) ); ( a x := ∗ ; ?( − A ≤ a x ≤ A ); a y := ∗ ; ?( − A ≤ a y ≤ A ); // “independent” robot acceleration t s := 0 ) d ; ( r x , r y ) f y ( v x , v y ) � ∗ e y x b ( l x , l y ) e x f x André Platzer (CMU) LFCPS/14: Hybrid Systems & Games LFCPS/14 26 / 24

  75. Robot Factory Automation ( RF ) Example (Robot-Demon vs. Angel-Factory Environment) � (? true ∪ (?( x < e x ∧ y < e y ∧ eff 1 = 1 ); v x := v x + c x ; eff 1 := 0 ) // belt ∪ (?( e x ≤ x ∧ y ≤ f y ∧ eff 2 = 1 ); v y := v y + c y ; eff 2 := 0 ) ); ( a x := ∗ ; ?( − A ≤ a x ≤ A ); a y := ∗ ; ?( − A ≤ a y ≤ A ); // “independent” robot acceleration t s := 0 ) d ; ( x ′ = v x , y ′ = v y , v ′ y = a y , t ′ = 1 , t ′ x = a x , v ′ s = 1 & t s ≤ ε ); ( r x , r y ) f y ( v x , v y ) � ∗ e y x b ( l x , l y ) e x f x André Platzer (CMU) LFCPS/14: Hybrid Systems & Games LFCPS/14 26 / 24

  76. Robot Factory Automation ( RF ) Example (Robot-Demon vs. Angel-Factory Environment) � (? true ∪ (?( x < e x ∧ y < e y ∧ eff 1 = 1 ); v x := v x + c x ; eff 1 := 0 ) // belt ∪ (?( e x ≤ x ∧ y ≤ f y ∧ eff 2 = 1 ); v y := v y + c y ; eff 2 := 0 ) ); ( a x := ∗ ; ?( − A ≤ a x ≤ A ); a y := ∗ ; ?( − A ≤ a y ≤ A ); // “independent” robot acceleration t s := 0 ) d ; ( x ′ = v x , y ′ = v y , v ′ y = a y , t ′ = 1 , t ′ x = a x , v ′ � s = 1 & t s ≤ ε ); ∩ (?( a x v x ≤ 0 ∧ a y v y ≤ 0 ) d ; // brake if v x = 0 then a x := 0 fi ; // per direction: no time lock if v y = 0 then a y := 0 fi ; ( r x , r y ) ( x ′ = v x , y ′ = v y , v ′ y = a y , t ′ = 1 , t ′ x = a x , v ′ s = 1 f y ( v x , v y ) �� ∗ & t s ≤ ε ∧ a x v x ≤ 0 ∧ a y v y ≤ 0 )) e y x b ( l x , l y ) e x f x André Platzer (CMU) LFCPS/14: Hybrid Systems & Games LFCPS/14 26 / 24

  77. Robot Factory Automation ( RF ) Proposition (Robot stays in � ) Controllability Assumptions ) | = ( x = y = 0 ∧ v x = v y = 0 ∧ → [ RF ]( x ∈ [ l x , r x ] ∧ y ∈ [ l y , r y ]) Proposition (Stays in � and leaves on time) RF | x : RF projected to the x-axis Controllability Assumptions ) | = ( x = 0 ∧ v x = 0 ∧ → [ RF | x ]( x ∈ [ l x , r x ] ∧ ( t ≥ ε → x ≥ x b )) ( r x , r y ) f y ( v x , v y ) e y x b ( l x , l y ) e x f x André Platzer (CMU) LFCPS/14: Hybrid Systems & Games LFCPS/14 27 / 24

  78. André Platzer. Logical Foundations of Cyber-Physical Systems . Springer, Switzerland, 2018. URL: http://www.springer.com/978-3-319-63587-3 , doi:10.1007/978-3-319-63588-0 . André Platzer. Differential game logic. ACM Trans. Comput. Log. , 17(1):1:1–1:51, 2015. doi:10.1145/2817824 . André Platzer. Logics of dynamical systems. In LICS [12], pages 13–24. doi:10.1109/LICS.2012.13 . André Platzer. Logic & proofs for cyber-physical systems. In Nicola Olivetti and Ashish Tiwari, editors, IJCAR , volume 9706 of LNCS , pages 15–21, Berlin, 2016. Springer. doi:10.1007/978-3-319-40229-1_3 . André Platzer (CMU) LFCPS/14: Hybrid Systems & Games LFCPS/14 27 / 24

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