management of time requirements in component based systems
play

Management of Time Requirements in Component-based Systems Yi Li 1 - PowerPoint PPT Presentation

Management of Time Requirements in Component-based Systems Yi Li 1 Tian Huat Tan 2 Marsha Chechik 1 1. University of Toronto 2. Singapore University of Technology and Design FM 2014 Singapore May 14, 2014 1 Component-based Software


  1. Management of Time Requirements in Component-based Systems Yi Li 1 Tian Huat Tan 2 Marsha Chechik 1 1. University of Toronto 2. Singapore University of Technology and Design FM 2014 Singapore May 14, 2014 1

  2. Component-based Software Engineering 2

  3. Business Goals & System Requirements Component-based Software Engineering 2

  4. Business Goals & System Requirements Component-based Software Engineering modularity, reusability, separation of concerns 2

  5. Timing Requirements 3

  6. Timing Requirements Vehicle Control Systems • Electronic Stability Control (ESC) • Anti-lock braking system (ABS) 3

  7. Timing Requirements Vehicle Control Systems • Electronic Stability Control (ESC) • Anti-lock braking system (ABS) Smart Phones 3

  8. Timing Requirements Vehicle Control Systems • Electronic Stability Control (ESC) • Anti-lock braking system (ABS) Smart Phones • Sensors - motion tracking 3

  9. Timing Requirements Vehicle Control Systems • Electronic Stability Control (ESC) • Anti-lock braking system (ABS) Smart Phones • Sensors - motion tracking Web Service Compositions • Ticket Booking • Stock Quotes 3

  10. Timing Requirements Vehicle Control Systems • Electronic Stability Control (ESC) • Anti-lock braking system (ABS) Smart Phones • Sensors - motion tracking … Web Service Compositions • Ticket Booking • Stock Quotes 3

  11. Existing Approach: LTR ? 4

  12. Existing Approach: LTR ? 4

  13. Existing Approach: LTR ? 4

  14. Existing Approach: LTR ? 4

  15. Existing Approach: LTR ? 4

  16. Existing Approach: LTR ? Failure! 4

  17. Existing Approach: LTR Must finish within 4s! 4

  18. Existing Approach: LTR Previous Work: [ICSE’13] Must finish within 4s! • Local Timing Requirements (LTR) synthesis • Web Services - BPEL t DS t FS t PS • Monolithic representation 4

  19. Existing Approach: LTR Previous Work: [ICSE’13] Must finish within 4s! • Local Timing Requirements (LTR) synthesis • Web Services - BPEL t DS t FS t PS • Monolithic representation LTR: ¬(0 ≤ t DS ⋀ 1 ≤ t FS ⋀ 1 ≤ t PS ) ⋀ ((0 ≤ t DS ⋀ 0 ≤ t FS ⋀ 0 ≤ t PS ) ⇒ t DS ≤ 3) ⋀ ((0 ≤ t DS ⋀ 0 ≤ t FS ≤ 1 ⋀ 0 ≤ t PS ) ⇒ t DS +t FS ≤ 3) ⋀ ((0 ≤ t DS ⋀ 1 ≤ t FS ⋀ 0 ≤ t PS ≤ 1) ⇒ t DS +t PS ≤ 2) 4

  20. Existing Approach: LTR Previous Work: [ICSE’13] LTR - monolithic constraint Must finish within 4s! Pros: • Local Timing Requirements + distills complicated composition structures into a (LTR) synthesis single formula + precisely captures all feasible combinations • Web Services - BPEL Cons: t DS t FS t PS - imposes dependencies across components • Monolithic representation - lacks support for localized debugging/repairing LTR: ¬(0 ≤ t DS ⋀ 1 ≤ t FS ⋀ 1 ≤ t PS ) ⋀ ((0 ≤ t DS ⋀ 0 ≤ t FS ⋀ 0 ≤ t PS ) ⇒ t DS ≤ 3) ⋀ ((0 ≤ t DS ⋀ 0 ≤ t FS ≤ 1 ⋀ 0 ≤ t PS ) ⇒ t DS +t FS ≤ 3) ⋀ ((0 ≤ t DS ⋀ 1 ≤ t FS ⋀ 0 ≤ t PS ≤ 1) ⇒ t DS +t PS ≤ 2) 4

  21. Existing Approach: LTR Previous Work: [ICSE’13] Must finish within 4s! • Local Timing Requirements (LTR) synthesis • Web Services - BPEL t DS t FS t PS • Monolithic representation LTR: ¬(0 ≤ t DS ⋀ 1 ≤ t FS ⋀ 1 ≤ t PS ) uLTR: (0 ≤ t DS <1 ⋀ 0 ≤ t FS <1) ⋀ ((0 ≤ t DS ⋀ 0 ≤ t FS ⋀ 0 ≤ t PS ) ⇒ t DS ≤ 3) ⋀ ((0 ≤ t DS ⋀ 0 ≤ t FS ≤ 1 ⋀ 0 ≤ t PS ) ⇒ t DS +t FS ≤ 3) ∨ (0 ≤ t DS <1 ⋀ 0 ≤ t PS <1) ⋀ ((0 ≤ t DS ⋀ 1 ≤ t FS ⋀ 0 ≤ t PS ≤ 1) ⇒ t DS +t PS ≤ 2) 4

  22. LTR vs. uLTR LTR: uLTR: ¬(0 ≤ t DS ⋀ 1 ≤ t FS ⋀ 1 ≤ t PS ) (0 ≤ t DS <1 ⋀ 0 ≤ t FS <1) ⋀ ((0 ≤ t DS ⋀ 0 ≤ t FS ⋀ 0 ≤ t PS ) ⇒ t DS ≤ 3) ⋀ ((0 ≤ t DS ⋀ 0 ≤ t FS ≤ 1 ⋀ 0 ≤ t PS ) ⇒ t DS +t FS ≤ 3) ∨ (0 ≤ t DS <1 ⋀ 0 ≤ t PS <1) ⋀ ((0 ≤ t DS ⋀ 1 ≤ t FS ⋀ 0 ≤ t PS ≤ 1) ⇒ t DS +t PS ≤ 2) • Component-dependent • Component-independent timing requirement under-approximated LTR • Linear real arithmetic • Intervals • Precise • Under-approximated • Monolithic • Localized 5

  23. LTR vs. uLTR All possible timing configurations, e.g., t DS = 1, t FS = 0.5, t PS = 0.8 Precision 6

  24. LTR vs. uLTR unsafe LTR safe All possible timing configurations, e.g., t DS = 1, t FS = 0.5, t PS = 0.8 Precision 6

  25. LTR vs. uLTR LTR All possible timing configurations, under- false uLTR approximation negatives e.g., t DS = 1, t FS = 0.5, t PS = 0.8 Precision Precision(uLTR) = #configurations satisfied by uLTR #configurations satisfied by LTR × 100% 6

  26. LTR vs. uLTR LTR All possible timing configurations, uLTR e.g., t DS = 1, t FS = 0.5, t PS = 0.8 Precision Precision(uLTR) = #configurations satisfied by uLTR #configurations satisfied by LTR × 100% 6

  27. Checklist What is uLTR? • Component-independent under-approximated LTR • Soundness: ensure timing safety How to break up the monolithic constraint? • Compute uLTR from LTR • Precision: preserve as many choices as possible How can localized constraints support the management of timing requirements? • uLTR for component selection • uLTR for runtime adaptation and recovery 7

  28. Checklist What is uLTR? • Component-independent under-approximated LTR • Soundness: ensure timing safety How to break up the monolithic constraint? • Compute uLTR from LTR • Precision: preserve as many choices as possible How can localized constraints support the management of timing requirements? • uLTR for component selection • uLTR for runtime adaptation and recovery 7

  29. Compute uLTR from LTR φ : ¬(0 ≤ t DS ⋀ 1 ≤ t FS ⋀ 1 ≤ t PS ) ⋀ ((0 ≤ t DS ⋀ 0 ≤ t FS ⋀ 0 ≤ t PS ) ⇒ t DS ≤ 3) ⋀ ((0 ≤ t DS ⋀ 0 ≤ t FS ≤ 1 ⋀ 0 ≤ t PS ) ⇒ t DS +t FS ≤ 3) t P S ⋀ ((0 ≤ t DS ⋀ 1 ≤ t FS ⋀ 0 ≤ t PS ≤ 1) ⇒ t DS +t PS ≤ 2) 1 1 0 t F S 2 3 t DS 8

  30. Compute uLTR from LTR φ : ¬(0 ≤ t DS ⋀ 1 ≤ t FS ⋀ 1 ≤ t PS ) ⋀ ((0 ≤ t DS ⋀ 0 ≤ t FS ⋀ 0 ≤ t PS ) ⇒ t DS ≤ 3) ⋀ ((0 ≤ t DS ⋀ 0 ≤ t FS ≤ 1 ⋀ 0 ≤ t PS ) ⇒ t DS +t FS ≤ 3) t P S t P S ⋀ ((0 ≤ t DS ⋀ 1 ≤ t FS ⋀ 0 ≤ t PS ≤ 1) ⇒ t DS +t PS ≤ 2) 1 1 1 1 0 0 t F S t F S 2 2 3 3 t DS t DS 8

  31. Compute uLTR from LTR φ : B: ¬(0 ≤ t DS ⋀ 1 ≤ t FS ⋀ 1 ≤ t PS ) ⋀ ((0 ≤ t DS ⋀ 0 ≤ t FS ⋀ 0 ≤ t PS ) ⇒ t DS ≤ 3) (0 ≤ t DS <1 ⋀ 0 ≤ t FS <1) ⋀ ((0 ≤ t DS ⋀ 0 ≤ t FS ≤ 1 ⋀ 0 ≤ t PS ) ⇒ t DS +t FS ≤ 3) t P S t P S ∨ (0 ≤ t DS <1 ⋀ 0 ≤ t PS <1) ⋀ ((0 ≤ t DS ⋀ 1 ≤ t FS ⋀ 0 ≤ t PS ≤ 1) ⇒ t DS +t PS ≤ 2) 1 1 1 1 0 0 t F S t F S 2 2 3 3 t DS t DS 8

  32. Compute uLTR from LTR t P S 1 1 0 t F S 2 3 t DS 8

  33. Compute uLTR from LTR B 1 = MaxCube( φ ) t P S t P S 1 1 1 1 0 0 t F S t F S 2 2 3 3 t DS t DS 8

  34. Compute uLTR from LTR B 1 = MaxCube( φ ) t P S t P S t P S InfCube( φ ,B 1 ) 1 1 1 1 1 1 0 0 0 t F S t F S t F S 2 2 2 3 3 3 t DS t DS t DS 8

  35. Compute uLTR from LTR B 1 = MaxCube( φ ) t P S t P S t P S t P S InfCube( φ ,B 1 ) B 2 = MaxCube( φ ) 1 1 1 1 1 1 1 1 0 0 0 0 t F S t F S t F S t F S 2 2 2 2 3 3 3 3 t DS t DS t DS t DS 8

  36. Compute uLTR from LTR B 1 = MaxCube( φ ) t P S t P S InfCube( φ ,B 1 ) B 2 = MaxCube( φ ) … 1 1 B=Merge(B 1 ,…,B i ) 1 1 0 0 t F S t F S 2 2 3 3 t DS t DS 8

  37. Compute uLTR from LTR B 1 = MaxCube( φ ) t P S t P S t P S InfCube( φ ,B 1 ) B 2 = MaxCube( φ ) … 1 1 1 B=Merge(B 1 ,…,B i ) 1 1 1 0 0 0 if (h(B i )< ω ) t F S t F S t F S 2 2 2 3 3 3 return; t DS t DS t DS 8

  38. Compute uLTR from LTR Soundness B 1 = MaxCube( φ ) t P S t P S t P S InfCube( φ ,B 1 ) Termination B 2 = MaxCube( φ ) Precision … 1 1 1 B=Merge(B 1 ,…,B i ) 1 1 1 0 0 0 if (h(B i )< ω ) t F S t F S t F S 2 2 2 3 3 3 return; t DS t DS t DS 8

  39. SMT Encodings MaxCube( φ ) //return the hypercube in φ with maximum volume InfCube( φ ,B) //relax in one direction if possible 9

  40. SMT Encodings MaxCube( φ ) //return the hypercube in φ with maximum volume // sample arbitrary hyper-rectangle θ , ∀ V ars ( ϕ ) · (( V l i ≤ v i ≤ u i ) ⇒ ϕ ) v i ∈ V ars ( ϕ ) InfCube( φ ,B) //relax in one direction if possible 9

  41. SMT Encodings MaxCube( φ ) //return the hypercube in φ with maximum volume // sample arbitrary hyper-rectangle θ , ∀ V ars ( ϕ ) · (( V l i ≤ v i ≤ u i ) ⇒ ϕ ) v i ∈ V ars ( ϕ ) // sample maximal hyper-cube Optimize ( θ ∧ ( V ( u i − l i = h )) , h ) v i ∈ V ars ( ϕ ) InfCube( φ ,B) //relax in one direction if possible 9

  42. SMT Encodings MaxCube( φ ) //return the hypercube in φ with maximum volume // sample arbitrary hyper-rectangle Symbolic Optimization θ , ∀ V ars ( ϕ ) · (( V l i ≤ v i ≤ u i ) ⇒ ϕ ) v i ∈ V ars ( ϕ ) [POPL’14] // sample maximal hyper-cube Optimize ( θ ∧ ( V ( u i − l i = h )) , h ) v i ∈ V ars ( ϕ ) InfCube( φ ,B) //relax in one direction if possible 9

Recommend


More recommend