management of time requirements in component-based systemstianhuat.github.io/slides/fm2014.pdf ·...
TRANSCRIPT
![Page 1: Management of Time Requirements in Component-based Systemstianhuat.github.io/slides/fm2014.pdf · 2021. 4. 15. · Management of Time Requirements in Component-based Systems Yi Li1](https://reader035.vdocuments.net/reader035/viewer/2022071608/614705dff4263007b1358d35/html5/thumbnails/1.jpg)
Management of Time Requirements in
Component-based Systems
Yi Li1 Tian Huat Tan2 Marsha Chechik1
1. University of Toronto 2. Singapore University of Technology and Design
FM 2014 Singapore May 14, 2014
1
![Page 2: Management of Time Requirements in Component-based Systemstianhuat.github.io/slides/fm2014.pdf · 2021. 4. 15. · Management of Time Requirements in Component-based Systems Yi Li1](https://reader035.vdocuments.net/reader035/viewer/2022071608/614705dff4263007b1358d35/html5/thumbnails/2.jpg)
Component-based Software Engineering
2
![Page 3: Management of Time Requirements in Component-based Systemstianhuat.github.io/slides/fm2014.pdf · 2021. 4. 15. · Management of Time Requirements in Component-based Systems Yi Li1](https://reader035.vdocuments.net/reader035/viewer/2022071608/614705dff4263007b1358d35/html5/thumbnails/3.jpg)
Component-based Software Engineering
Business Goals &System Requirements
2
![Page 4: Management of Time Requirements in Component-based Systemstianhuat.github.io/slides/fm2014.pdf · 2021. 4. 15. · Management of Time Requirements in Component-based Systems Yi Li1](https://reader035.vdocuments.net/reader035/viewer/2022071608/614705dff4263007b1358d35/html5/thumbnails/4.jpg)
Component-based Software Engineeringmodularity, reusability, separation of concerns
Business Goals &System Requirements
2
![Page 5: Management of Time Requirements in Component-based Systemstianhuat.github.io/slides/fm2014.pdf · 2021. 4. 15. · Management of Time Requirements in Component-based Systems Yi Li1](https://reader035.vdocuments.net/reader035/viewer/2022071608/614705dff4263007b1358d35/html5/thumbnails/5.jpg)
Timing Requirements
3
![Page 6: Management of Time Requirements in Component-based Systemstianhuat.github.io/slides/fm2014.pdf · 2021. 4. 15. · Management of Time Requirements in Component-based Systems Yi Li1](https://reader035.vdocuments.net/reader035/viewer/2022071608/614705dff4263007b1358d35/html5/thumbnails/6.jpg)
Timing RequirementsVehicle Control Systems
• Electronic Stability Control (ESC)
• Anti-lock braking system (ABS)
3
![Page 7: Management of Time Requirements in Component-based Systemstianhuat.github.io/slides/fm2014.pdf · 2021. 4. 15. · Management of Time Requirements in Component-based Systems Yi Li1](https://reader035.vdocuments.net/reader035/viewer/2022071608/614705dff4263007b1358d35/html5/thumbnails/7.jpg)
Timing RequirementsVehicle Control Systems
• Electronic Stability Control (ESC)
• Anti-lock braking system (ABS)
Smart Phones
3
![Page 8: Management of Time Requirements in Component-based Systemstianhuat.github.io/slides/fm2014.pdf · 2021. 4. 15. · Management of Time Requirements in Component-based Systems Yi Li1](https://reader035.vdocuments.net/reader035/viewer/2022071608/614705dff4263007b1358d35/html5/thumbnails/8.jpg)
Timing RequirementsVehicle Control Systems
• Electronic Stability Control (ESC)
• Anti-lock braking system (ABS)
Smart Phones• Sensors - motion tracking
3
![Page 9: Management of Time Requirements in Component-based Systemstianhuat.github.io/slides/fm2014.pdf · 2021. 4. 15. · Management of Time Requirements in Component-based Systems Yi Li1](https://reader035.vdocuments.net/reader035/viewer/2022071608/614705dff4263007b1358d35/html5/thumbnails/9.jpg)
Timing RequirementsVehicle Control Systems
• Electronic Stability Control (ESC)
• Anti-lock braking system (ABS)
Smart Phones• Sensors - motion tracking
Web Service Compositions• Ticket Booking
• Stock Quotes
3
![Page 10: Management of Time Requirements in Component-based Systemstianhuat.github.io/slides/fm2014.pdf · 2021. 4. 15. · Management of Time Requirements in Component-based Systems Yi Li1](https://reader035.vdocuments.net/reader035/viewer/2022071608/614705dff4263007b1358d35/html5/thumbnails/10.jpg)
Timing RequirementsVehicle Control Systems
• Electronic Stability Control (ESC)
• Anti-lock braking system (ABS)
Smart Phones• Sensors - motion tracking
Web Service Compositions• Ticket Booking
• Stock Quotes
…
3
![Page 11: Management of Time Requirements in Component-based Systemstianhuat.github.io/slides/fm2014.pdf · 2021. 4. 15. · Management of Time Requirements in Component-based Systems Yi Li1](https://reader035.vdocuments.net/reader035/viewer/2022071608/614705dff4263007b1358d35/html5/thumbnails/11.jpg)
Existing Approach: LTR
?
4
![Page 12: Management of Time Requirements in Component-based Systemstianhuat.github.io/slides/fm2014.pdf · 2021. 4. 15. · Management of Time Requirements in Component-based Systems Yi Li1](https://reader035.vdocuments.net/reader035/viewer/2022071608/614705dff4263007b1358d35/html5/thumbnails/12.jpg)
Existing Approach: LTR
?
4
![Page 13: Management of Time Requirements in Component-based Systemstianhuat.github.io/slides/fm2014.pdf · 2021. 4. 15. · Management of Time Requirements in Component-based Systems Yi Li1](https://reader035.vdocuments.net/reader035/viewer/2022071608/614705dff4263007b1358d35/html5/thumbnails/13.jpg)
Existing Approach: LTR
?
4
![Page 14: Management of Time Requirements in Component-based Systemstianhuat.github.io/slides/fm2014.pdf · 2021. 4. 15. · Management of Time Requirements in Component-based Systems Yi Li1](https://reader035.vdocuments.net/reader035/viewer/2022071608/614705dff4263007b1358d35/html5/thumbnails/14.jpg)
Existing Approach: LTR
?
4
![Page 15: Management of Time Requirements in Component-based Systemstianhuat.github.io/slides/fm2014.pdf · 2021. 4. 15. · Management of Time Requirements in Component-based Systems Yi Li1](https://reader035.vdocuments.net/reader035/viewer/2022071608/614705dff4263007b1358d35/html5/thumbnails/15.jpg)
Existing Approach: LTR
?
4
![Page 16: Management of Time Requirements in Component-based Systemstianhuat.github.io/slides/fm2014.pdf · 2021. 4. 15. · Management of Time Requirements in Component-based Systems Yi Li1](https://reader035.vdocuments.net/reader035/viewer/2022071608/614705dff4263007b1358d35/html5/thumbnails/16.jpg)
Existing Approach: LTR
Failure!?
4
![Page 17: Management of Time Requirements in Component-based Systemstianhuat.github.io/slides/fm2014.pdf · 2021. 4. 15. · Management of Time Requirements in Component-based Systems Yi Li1](https://reader035.vdocuments.net/reader035/viewer/2022071608/614705dff4263007b1358d35/html5/thumbnails/17.jpg)
Existing Approach: LTRMust finish within 4s!
4
![Page 18: Management of Time Requirements in Component-based Systemstianhuat.github.io/slides/fm2014.pdf · 2021. 4. 15. · Management of Time Requirements in Component-based Systems Yi Li1](https://reader035.vdocuments.net/reader035/viewer/2022071608/614705dff4263007b1358d35/html5/thumbnails/18.jpg)
Previous Work: [ICSE’13]• Local Timing Requirements
(LTR) synthesis • Web Services - BPEL • Monolithic representation
Existing Approach: LTRMust finish within 4s!
tDS tFS tPS
4
![Page 19: Management of Time Requirements in Component-based Systemstianhuat.github.io/slides/fm2014.pdf · 2021. 4. 15. · Management of Time Requirements in Component-based Systems Yi Li1](https://reader035.vdocuments.net/reader035/viewer/2022071608/614705dff4263007b1358d35/html5/thumbnails/19.jpg)
Previous Work: [ICSE’13]• Local Timing Requirements
(LTR) synthesis • Web Services - BPEL • Monolithic representation
Existing Approach: LTRMust finish within 4s!
tDS tFS tPS
LTR:¬(0≤tDS⋀1≤tFS⋀1≤tPS)
⋀((0≤tDS⋀0≤tFS⋀0≤tPS)⇒tDS≤3) ⋀((0≤tDS⋀0≤tFS≤1⋀0≤tPS)⇒tDS+tFS≤3) ⋀((0≤tDS⋀1≤tFS⋀0≤tPS≤1)⇒tDS+tPS≤2)
4
![Page 20: Management of Time Requirements in Component-based Systemstianhuat.github.io/slides/fm2014.pdf · 2021. 4. 15. · Management of Time Requirements in Component-based Systems Yi Li1](https://reader035.vdocuments.net/reader035/viewer/2022071608/614705dff4263007b1358d35/html5/thumbnails/20.jpg)
Previous Work: [ICSE’13]• Local Timing Requirements
(LTR) synthesis • Web Services - BPEL • Monolithic representation
Existing Approach: LTRMust finish within 4s!
tDS tFS tPS
LTR:¬(0≤tDS⋀1≤tFS⋀1≤tPS)
⋀((0≤tDS⋀0≤tFS⋀0≤tPS)⇒tDS≤3) ⋀((0≤tDS⋀0≤tFS≤1⋀0≤tPS)⇒tDS+tFS≤3) ⋀((0≤tDS⋀1≤tFS⋀0≤tPS≤1)⇒tDS+tPS≤2)
4
LTR - monolithic constraint Pros:+ distills complicated composition structures into a single formula + precisely captures all feasible combinations
Cons:- imposes dependencies across components - lacks support for localized debugging/repairing
![Page 21: Management of Time Requirements in Component-based Systemstianhuat.github.io/slides/fm2014.pdf · 2021. 4. 15. · Management of Time Requirements in Component-based Systems Yi Li1](https://reader035.vdocuments.net/reader035/viewer/2022071608/614705dff4263007b1358d35/html5/thumbnails/21.jpg)
Previous Work: [ICSE’13]• Local Timing Requirements
(LTR) synthesis • Web Services - BPEL • Monolithic representation
Existing Approach: LTRMust finish within 4s!
tDS tFS tPS
LTR:¬(0≤tDS⋀1≤tFS⋀1≤tPS)
⋀((0≤tDS⋀0≤tFS⋀0≤tPS)⇒tDS≤3) ⋀((0≤tDS⋀0≤tFS≤1⋀0≤tPS)⇒tDS+tFS≤3) ⋀((0≤tDS⋀1≤tFS⋀0≤tPS≤1)⇒tDS+tPS≤2)
4
uLTR:(0≤tDS<1⋀0≤tFS<1) ∨(0≤tDS<1⋀0≤tPS<1)
![Page 22: Management of Time Requirements in Component-based Systemstianhuat.github.io/slides/fm2014.pdf · 2021. 4. 15. · Management of Time Requirements in Component-based Systems Yi Li1](https://reader035.vdocuments.net/reader035/viewer/2022071608/614705dff4263007b1358d35/html5/thumbnails/22.jpg)
LTR vs. uLTR
• Component-dependent timing requirement
• Linear real arithmetic
• Precise
• Monolithic
5
uLTR:(0≤tDS<1⋀0≤tFS<1) ∨(0≤tDS<1⋀0≤tPS<1)
• Component-independent under-approximated LTR
• Intervals
• Under-approximated
• Localized
LTR:¬(0≤tDS⋀1≤tFS⋀1≤tPS)
⋀((0≤tDS⋀0≤tFS⋀0≤tPS)⇒tDS≤3) ⋀((0≤tDS⋀0≤tFS≤1⋀0≤tPS)⇒tDS+tFS≤3) ⋀((0≤tDS⋀1≤tFS⋀0≤tPS≤1)⇒tDS+tPS≤2)
![Page 23: Management of Time Requirements in Component-based Systemstianhuat.github.io/slides/fm2014.pdf · 2021. 4. 15. · Management of Time Requirements in Component-based Systems Yi Li1](https://reader035.vdocuments.net/reader035/viewer/2022071608/614705dff4263007b1358d35/html5/thumbnails/23.jpg)
All possible timing configurations,
e.g., tDS = 1, tFS = 0.5, tPS = 0.8
LTR vs. uLTR
6
Precision
![Page 24: Management of Time Requirements in Component-based Systemstianhuat.github.io/slides/fm2014.pdf · 2021. 4. 15. · Management of Time Requirements in Component-based Systems Yi Li1](https://reader035.vdocuments.net/reader035/viewer/2022071608/614705dff4263007b1358d35/html5/thumbnails/24.jpg)
All possible timing configurations,
e.g., tDS = 1, tFS = 0.5, tPS = 0.8
LTR vs. uLTR
6
LTR
Precision
unsafe
safe
![Page 25: Management of Time Requirements in Component-based Systemstianhuat.github.io/slides/fm2014.pdf · 2021. 4. 15. · Management of Time Requirements in Component-based Systems Yi Li1](https://reader035.vdocuments.net/reader035/viewer/2022071608/614705dff4263007b1358d35/html5/thumbnails/25.jpg)
All possible timing configurations,
e.g., tDS = 1, tFS = 0.5, tPS = 0.8
LTR vs. uLTR
6
LTR
uLTRfalse negatives
Precision
Precision(uLTR) =
#configurations satisfied by uLTR
#configurations satisfied by LTR
⇥ 100%
under- approximation
![Page 26: Management of Time Requirements in Component-based Systemstianhuat.github.io/slides/fm2014.pdf · 2021. 4. 15. · Management of Time Requirements in Component-based Systems Yi Li1](https://reader035.vdocuments.net/reader035/viewer/2022071608/614705dff4263007b1358d35/html5/thumbnails/26.jpg)
All possible timing configurations,
e.g., tDS = 1, tFS = 0.5, tPS = 0.8
LTR vs. uLTR
6
LTR
uLTR
Precision
Precision(uLTR) =
#configurations satisfied by uLTR
#configurations satisfied by LTR
⇥ 100%
![Page 27: Management of Time Requirements in Component-based Systemstianhuat.github.io/slides/fm2014.pdf · 2021. 4. 15. · Management of Time Requirements in Component-based Systems Yi Li1](https://reader035.vdocuments.net/reader035/viewer/2022071608/614705dff4263007b1358d35/html5/thumbnails/27.jpg)
ChecklistWhat 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
![Page 28: Management of Time Requirements in Component-based Systemstianhuat.github.io/slides/fm2014.pdf · 2021. 4. 15. · Management of Time Requirements in Component-based Systems Yi Li1](https://reader035.vdocuments.net/reader035/viewer/2022071608/614705dff4263007b1358d35/html5/thumbnails/28.jpg)
ChecklistWhat 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
![Page 29: Management of Time Requirements in Component-based Systemstianhuat.github.io/slides/fm2014.pdf · 2021. 4. 15. · Management of Time Requirements in Component-based Systems Yi Li1](https://reader035.vdocuments.net/reader035/viewer/2022071608/614705dff4263007b1358d35/html5/thumbnails/29.jpg)
φ:¬(0≤tDS⋀1≤tFS⋀1≤tPS)
⋀((0≤tDS⋀0≤tFS⋀0≤tPS)⇒tDS≤3) ⋀((0≤tDS⋀0≤tFS≤1⋀0≤tPS)⇒tDS+tFS≤3) ⋀((0≤tDS⋀1≤tFS⋀0≤tPS≤1)⇒tDS+tPS≤2)
Compute uLTR from LTR
0
3
1
2
1
tDS
tF S
tP S
8
![Page 30: Management of Time Requirements in Component-based Systemstianhuat.github.io/slides/fm2014.pdf · 2021. 4. 15. · Management of Time Requirements in Component-based Systems Yi Li1](https://reader035.vdocuments.net/reader035/viewer/2022071608/614705dff4263007b1358d35/html5/thumbnails/30.jpg)
φ:¬(0≤tDS⋀1≤tFS⋀1≤tPS)
⋀((0≤tDS⋀0≤tFS⋀0≤tPS)⇒tDS≤3) ⋀((0≤tDS⋀0≤tFS≤1⋀0≤tPS)⇒tDS+tFS≤3) ⋀((0≤tDS⋀1≤tFS⋀0≤tPS≤1)⇒tDS+tPS≤2)
Compute uLTR from LTR
0
3
1
2
1
tDS
tF S
tP S
0
3
1
2
1
tDS
tF S
tP S
8
![Page 31: Management of Time Requirements in Component-based Systemstianhuat.github.io/slides/fm2014.pdf · 2021. 4. 15. · Management of Time Requirements in Component-based Systems Yi Li1](https://reader035.vdocuments.net/reader035/viewer/2022071608/614705dff4263007b1358d35/html5/thumbnails/31.jpg)
φ:¬(0≤tDS⋀1≤tFS⋀1≤tPS)
⋀((0≤tDS⋀0≤tFS⋀0≤tPS)⇒tDS≤3) ⋀((0≤tDS⋀0≤tFS≤1⋀0≤tPS)⇒tDS+tFS≤3) ⋀((0≤tDS⋀1≤tFS⋀0≤tPS≤1)⇒tDS+tPS≤2)
B:(0≤tDS<1⋀0≤tFS<1) ∨(0≤tDS<1⋀0≤tPS<1)
Compute uLTR from LTR
0
3
1
2
1
tDS
tF S
tP S
8
0
3
1
2
1
tDS
tF S
tP S
![Page 32: Management of Time Requirements in Component-based Systemstianhuat.github.io/slides/fm2014.pdf · 2021. 4. 15. · Management of Time Requirements in Component-based Systems Yi Li1](https://reader035.vdocuments.net/reader035/viewer/2022071608/614705dff4263007b1358d35/html5/thumbnails/32.jpg)
Compute uLTR from LTR
0
3
1
2
1
tDS
tF S
tP S
8
![Page 33: Management of Time Requirements in Component-based Systemstianhuat.github.io/slides/fm2014.pdf · 2021. 4. 15. · Management of Time Requirements in Component-based Systems Yi Li1](https://reader035.vdocuments.net/reader035/viewer/2022071608/614705dff4263007b1358d35/html5/thumbnails/33.jpg)
Compute uLTR from LTR
0
3
1
2
1
tDS
tF S
tP S
0
3
1
2
1
tDS
tF S
tP S
B1= MaxCube(φ)
8
![Page 34: Management of Time Requirements in Component-based Systemstianhuat.github.io/slides/fm2014.pdf · 2021. 4. 15. · Management of Time Requirements in Component-based Systems Yi Li1](https://reader035.vdocuments.net/reader035/viewer/2022071608/614705dff4263007b1358d35/html5/thumbnails/34.jpg)
Compute uLTR from LTR
0
3
1
2
1
tDS
tF S
tP S
0
3
1
2
1
tDS
tF S
tP S
0
3
1
2
1
tDS
tF S
tP S
B1= MaxCube(φ)InfCube(φ,B1)
8
![Page 35: Management of Time Requirements in Component-based Systemstianhuat.github.io/slides/fm2014.pdf · 2021. 4. 15. · Management of Time Requirements in Component-based Systems Yi Li1](https://reader035.vdocuments.net/reader035/viewer/2022071608/614705dff4263007b1358d35/html5/thumbnails/35.jpg)
Compute uLTR from LTR
0
3
1
2
1
tDS
tF S
tP S
0
3
1
2
1
tDS
tF S
tP S
0
3
1
2
1
tDS
tF S
tP S
0
3
1
2
1
tDS
tF S
tP S
B1= MaxCube(φ)InfCube(φ,B1)B2= MaxCube(φ)
8
![Page 36: Management of Time Requirements in Component-based Systemstianhuat.github.io/slides/fm2014.pdf · 2021. 4. 15. · Management of Time Requirements in Component-based Systems Yi Li1](https://reader035.vdocuments.net/reader035/viewer/2022071608/614705dff4263007b1358d35/html5/thumbnails/36.jpg)
Compute uLTR from LTR
0
3
1
2
1
tDS
tF S
tP S
B1= MaxCube(φ)InfCube(φ,B1)B2= MaxCube(φ)
…
0
3
1
2
1
tDS
tF S
tP S
8
B=Merge(B1,…,Bi)
![Page 37: Management of Time Requirements in Component-based Systemstianhuat.github.io/slides/fm2014.pdf · 2021. 4. 15. · Management of Time Requirements in Component-based Systems Yi Li1](https://reader035.vdocuments.net/reader035/viewer/2022071608/614705dff4263007b1358d35/html5/thumbnails/37.jpg)
Compute uLTR from LTR
0
3
1
2
1
tDS
tF S
tP S
B1= MaxCube(φ)InfCube(φ,B1)B2= MaxCube(φ)
…
0
3
1
2
1
tDS
tF S
tP S
0
3
1
2
1
tDS
tF S
tP S
8
if (h(Bi)<ω)return;
B=Merge(B1,…,Bi)
![Page 38: Management of Time Requirements in Component-based Systemstianhuat.github.io/slides/fm2014.pdf · 2021. 4. 15. · Management of Time Requirements in Component-based Systems Yi Li1](https://reader035.vdocuments.net/reader035/viewer/2022071608/614705dff4263007b1358d35/html5/thumbnails/38.jpg)
Compute uLTR from LTR
0
3
1
2
1
tDS
tF S
tP S
B1= MaxCube(φ)InfCube(φ,B1)B2= MaxCube(φ)
…
Soundness
Termination
0
3
1
2
1
tDS
tF S
tP S
0
3
1
2
1
tDS
tF S
tP S
Precision
8
if (h(Bi)<ω)return;
B=Merge(B1,…,Bi)
![Page 39: Management of Time Requirements in Component-based Systemstianhuat.github.io/slides/fm2014.pdf · 2021. 4. 15. · Management of Time Requirements in Component-based Systems Yi Li1](https://reader035.vdocuments.net/reader035/viewer/2022071608/614705dff4263007b1358d35/html5/thumbnails/39.jpg)
SMT EncodingsMaxCube(φ) //return the hypercube in φ with maximum volume
InfCube(φ,B) //relax in one direction if possible
9
![Page 40: Management of Time Requirements in Component-based Systemstianhuat.github.io/slides/fm2014.pdf · 2021. 4. 15. · Management of Time Requirements in Component-based Systems Yi Li1](https://reader035.vdocuments.net/reader035/viewer/2022071608/614705dff4263007b1358d35/html5/thumbnails/40.jpg)
SMT EncodingsMaxCube(φ) //return the hypercube in φ with maximum volume
InfCube(φ,B) //relax in one direction if possible
// sample arbitrary hyper-rectangle
9
✓ , 8V ars(') · ((V
vi2V ars(')
li vi ui) ) ')
![Page 41: Management of Time Requirements in Component-based Systemstianhuat.github.io/slides/fm2014.pdf · 2021. 4. 15. · Management of Time Requirements in Component-based Systems Yi Li1](https://reader035.vdocuments.net/reader035/viewer/2022071608/614705dff4263007b1358d35/html5/thumbnails/41.jpg)
SMT EncodingsMaxCube(φ) //return the hypercube in φ with maximum volume
InfCube(φ,B) //relax in one direction if possible
// sample arbitrary hyper-rectangle
// sample maximal hyper-cube
9
✓ , 8V ars(') · ((V
vi2V ars(')
li vi ui) ) ')
Optimize(✓ ^ (V
vi2V ars(')
(ui � li = h)), h)
![Page 42: Management of Time Requirements in Component-based Systemstianhuat.github.io/slides/fm2014.pdf · 2021. 4. 15. · Management of Time Requirements in Component-based Systems Yi Li1](https://reader035.vdocuments.net/reader035/viewer/2022071608/614705dff4263007b1358d35/html5/thumbnails/42.jpg)
SMT EncodingsMaxCube(φ) //return the hypercube in φ with maximum volume
InfCube(φ,B) //relax in one direction if possible
// sample arbitrary hyper-rectangle
// sample maximal hyper-cube
9
✓ , 8V ars(') · ((V
vi2V ars(')
li vi ui) ) ')
Optimize(✓ ^ (V
vi2V ars(')
(ui � li = h)), h)
Symbolic Optimization
[POPL’14]
![Page 43: Management of Time Requirements in Component-based Systemstianhuat.github.io/slides/fm2014.pdf · 2021. 4. 15. · Management of Time Requirements in Component-based Systems Yi Li1](https://reader035.vdocuments.net/reader035/viewer/2022071608/614705dff4263007b1358d35/html5/thumbnails/43.jpg)
SMT EncodingsMaxCube(φ) //return the hypercube in φ with maximum volume
InfCube(φ,B) //relax in one direction if possible
// sample arbitrary hyper-rectangle
// sample maximal hyper-cube
// relax lower bound
// relax upper bound
9
✓ , 8V ars(') · ((V
vi2V ars(')
li vi ui) ) ')
unSAT? (¬(B[li/1] ) '))
unSAT? (¬(B[ui/1] ) '))
Optimize(✓ ^ (V
vi2V ars(')
(ui � li = h)), h)
![Page 44: Management of Time Requirements in Component-based Systemstianhuat.github.io/slides/fm2014.pdf · 2021. 4. 15. · Management of Time Requirements in Component-based Systems Yi Li1](https://reader035.vdocuments.net/reader035/viewer/2022071608/614705dff4263007b1358d35/html5/thumbnails/44.jpg)
SMT EncodingsMaxCube(φ) //return the hypercube in φ with maximum volume
InfCube(φ,B) //relax in one direction if possible
// sample arbitrary hyper-rectangle
// sample maximal hyper-cube
// relax lower bound
// relax upper bound
// heights of sampled hyper-cubes form a non-increasing sequence
9
✓ , 8V ars(') · ((V
vi2V ars(')
li vi ui) ) ')
unSAT? (¬(B[li/1] ) '))
unSAT? (¬(B[ui/1] ) '))
Optimize(✓ ^ (V
vi2V ars(')
(ui � li = h)), h)
![Page 45: Management of Time Requirements in Component-based Systemstianhuat.github.io/slides/fm2014.pdf · 2021. 4. 15. · Management of Time Requirements in Component-based Systems Yi Li1](https://reader035.vdocuments.net/reader035/viewer/2022071608/614705dff4263007b1358d35/html5/thumbnails/45.jpg)
ChecklistWhat 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
10
![Page 46: Management of Time Requirements in Component-based Systemstianhuat.github.io/slides/fm2014.pdf · 2021. 4. 15. · Management of Time Requirements in Component-based Systems Yi Li1](https://reader035.vdocuments.net/reader035/viewer/2022071608/614705dff4263007b1358d35/html5/thumbnails/46.jpg)
ChecklistWhat 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
10
![Page 47: Management of Time Requirements in Component-based Systemstianhuat.github.io/slides/fm2014.pdf · 2021. 4. 15. · Management of Time Requirements in Component-based Systems Yi Li1](https://reader035.vdocuments.net/reader035/viewer/2022071608/614705dff4263007b1358d35/html5/thumbnails/47.jpg)
uLTR for component selection
11
![Page 48: Management of Time Requirements in Component-based Systemstianhuat.github.io/slides/fm2014.pdf · 2021. 4. 15. · Management of Time Requirements in Component-based Systems Yi Li1](https://reader035.vdocuments.net/reader035/viewer/2022071608/614705dff4263007b1358d35/html5/thumbnails/48.jpg)
uLTR for component selection
publish
11
![Page 49: Management of Time Requirements in Component-based Systemstianhuat.github.io/slides/fm2014.pdf · 2021. 4. 15. · Management of Time Requirements in Component-based Systems Yi Li1](https://reader035.vdocuments.net/reader035/viewer/2022071608/614705dff4263007b1358d35/html5/thumbnails/49.jpg)
uLTR for component selection
publish
LTR:(tFS<1⋀
tDS≤3⋀tDS+
tFS≤3)∨ …
11
![Page 50: Management of Time Requirements in Component-based Systemstianhuat.github.io/slides/fm2014.pdf · 2021. 4. 15. · Management of Time Requirements in Component-based Systems Yi Li1](https://reader035.vdocuments.net/reader035/viewer/2022071608/614705dff4263007b1358d35/html5/thumbnails/50.jpg)
uLTR for component selection
publish
LTR:(tFS<1⋀
tDS≤3⋀tDS+
tFS≤3)∨ …
11
![Page 51: Management of Time Requirements in Component-based Systemstianhuat.github.io/slides/fm2014.pdf · 2021. 4. 15. · Management of Time Requirements in Component-based Systems Yi Li1](https://reader035.vdocuments.net/reader035/viewer/2022071608/614705dff4263007b1358d35/html5/thumbnails/51.jpg)
uLTR for component selection
publish
request
retrieve
11
Carminati et al., 2005
Rajendran et al., 2010
Al-Masri & Mahmoud, 2007
![Page 52: Management of Time Requirements in Component-based Systemstianhuat.github.io/slides/fm2014.pdf · 2021. 4. 15. · Management of Time Requirements in Component-based Systems Yi Li1](https://reader035.vdocuments.net/reader035/viewer/2022071608/614705dff4263007b1358d35/html5/thumbnails/52.jpg)
uLTR for component selection
publish
request
retrieve
tFS<1s
finds the “best” match given localized
constraints
11
![Page 53: Management of Time Requirements in Component-based Systemstianhuat.github.io/slides/fm2014.pdf · 2021. 4. 15. · Management of Time Requirements in Component-based Systems Yi Li1](https://reader035.vdocuments.net/reader035/viewer/2022071608/614705dff4263007b1358d35/html5/thumbnails/53.jpg)
uLTR for component selection
publish
request
retrieve
tFS<1s
finds the “best” match given localized
constraints
11
![Page 54: Management of Time Requirements in Component-based Systemstianhuat.github.io/slides/fm2014.pdf · 2021. 4. 15. · Management of Time Requirements in Component-based Systems Yi Li1](https://reader035.vdocuments.net/reader035/viewer/2022071608/614705dff4263007b1358d35/html5/thumbnails/54.jpg)
• Real-world Web Service data: QWS dataset • Case studies: online booking service, … • Evaluate the percentage of false-negatives (precision)
w.r.t. size of the uLTR model
uLTR for component selection
100 200
Size of uLTR model (|BS|)
10
20
30
40
50
60
70
80
90
100
Precision
ofuLTR
mod
el(%
)
QWS, Te = 10.8s
Rand, Te ≈ 201.4s
1 4 7 10
Size of uLTR model (|BS|)
60
65
70
75
80
85
90
95
100
Precision
ofuLTR
mod
el(%
)
QWS, Te = 0.9s
Rand, Te ≈ 10.8s
1 4 7 10
Size of uLTR model (|BS|)
60
65
70
75
80
85
90
95
100
Precision
ofuLTR
mod
el(%
)
QWS, Te = 2.7s
Rand, Te ≈ 242.2s
12
![Page 55: Management of Time Requirements in Component-based Systemstianhuat.github.io/slides/fm2014.pdf · 2021. 4. 15. · Management of Time Requirements in Component-based Systems Yi Li1](https://reader035.vdocuments.net/reader035/viewer/2022071608/614705dff4263007b1358d35/html5/thumbnails/55.jpg)
• Real-world Web Service data: QWS dataset • Case studies: online booking service, … • Evaluate the percentage of false-negatives (precision)
w.r.t. size of the uLTR model
uLTR for component selection
100 200
Size of uLTR model (|BS|)
10
20
30
40
50
60
70
80
90
100
Precision
ofuLTR
mod
el(%
)
QWS, Te = 10.8s
Rand, Te ≈ 201.4s
1 4 7 10
Size of uLTR model (|BS|)
60
65
70
75
80
85
90
95
100
Precision
ofuLTR
mod
el(%
)
QWS, Te = 0.9s
Rand, Te ≈ 10.8s
1 4 7 10
Size of uLTR model (|BS|)
60
65
70
75
80
85
90
95
100
Precision
ofuLTR
mod
el(%
)
QWS, Te = 2.7s
Rand, Te ≈ 242.2s
12
Strong dependency in the original LTR: t1+t2+3t3-2t4<4
![Page 56: Management of Time Requirements in Component-based Systemstianhuat.github.io/slides/fm2014.pdf · 2021. 4. 15. · Management of Time Requirements in Component-based Systems Yi Li1](https://reader035.vdocuments.net/reader035/viewer/2022071608/614705dff4263007b1358d35/html5/thumbnails/56.jpg)
uLTR for runtime adaptation and recovery
Must finish within 4s! Monitor
13
![Page 57: Management of Time Requirements in Component-based Systemstianhuat.github.io/slides/fm2014.pdf · 2021. 4. 15. · Management of Time Requirements in Component-based Systems Yi Li1](https://reader035.vdocuments.net/reader035/viewer/2022071608/614705dff4263007b1358d35/html5/thumbnails/57.jpg)
uLTR for runtime adaptation and recovery
Must finish within 4s!
response time
Monitor
13
![Page 58: Management of Time Requirements in Component-based Systemstianhuat.github.io/slides/fm2014.pdf · 2021. 4. 15. · Management of Time Requirements in Component-based Systems Yi Li1](https://reader035.vdocuments.net/reader035/viewer/2022071608/614705dff4263007b1358d35/html5/thumbnails/58.jpg)
uLTR for runtime adaptation and recovery
Must finish within 4s!
response time
Monitor
13
![Page 59: Management of Time Requirements in Component-based Systemstianhuat.github.io/slides/fm2014.pdf · 2021. 4. 15. · Management of Time Requirements in Component-based Systems Yi Li1](https://reader035.vdocuments.net/reader035/viewer/2022071608/614705dff4263007b1358d35/html5/thumbnails/59.jpg)
uLTR for runtime adaptation and recovery
Must finish within 4s!
response time
repairing plan
Monitor
13
![Page 60: Management of Time Requirements in Component-based Systemstianhuat.github.io/slides/fm2014.pdf · 2021. 4. 15. · Management of Time Requirements in Component-based Systems Yi Li1](https://reader035.vdocuments.net/reader035/viewer/2022071608/614705dff4263007b1358d35/html5/thumbnails/60.jpg)
uLTR for runtime adaptation and recovery
Must finish within 4s!
response time
repairing plan
Monitor
13
![Page 61: Management of Time Requirements in Component-based Systemstianhuat.github.io/slides/fm2014.pdf · 2021. 4. 15. · Management of Time Requirements in Component-based Systems Yi Li1](https://reader035.vdocuments.net/reader035/viewer/2022071608/614705dff4263007b1358d35/html5/thumbnails/61.jpg)
¬(0≤tDS⋀1≤tFS⋀1≤tPS) ⋀((0≤tDS⋀0≤tFS⋀0≤tPS)⇒tDS≤3)
⋀((0≤tDS⋀0≤tFS≤1⋀0≤tPS)⇒tDS+tFS≤3) ⋀((0≤tDS⋀1≤tFS⋀0≤tPS≤1)⇒tDS+tPS≤2)
uLTR for runtime adaptation and recovery
Must finish within 4s!
response time
repairing plan
Monitor
13
![Page 62: Management of Time Requirements in Component-based Systemstianhuat.github.io/slides/fm2014.pdf · 2021. 4. 15. · Management of Time Requirements in Component-based Systems Yi Li1](https://reader035.vdocuments.net/reader035/viewer/2022071608/614705dff4263007b1358d35/html5/thumbnails/62.jpg)
¬(0≤tDS⋀1≤tFS⋀1≤tPS) ⋀((0≤tDS⋀0≤tFS⋀0≤tPS)⇒tDS≤3)
⋀((0≤tDS⋀0≤tFS≤1⋀0≤tPS)⇒tDS+tFS≤3) ⋀((0≤tDS⋀1≤tFS⋀0≤tPS≤1)⇒tDS+tPS≤2)
uLTR for runtime adaptation and recovery
Must finish within 4s!
?
response time
repairing plan
Monitor
Have to replace both DS and FS.
13
![Page 63: Management of Time Requirements in Component-based Systemstianhuat.github.io/slides/fm2014.pdf · 2021. 4. 15. · Management of Time Requirements in Component-based Systems Yi Li1](https://reader035.vdocuments.net/reader035/viewer/2022071608/614705dff4263007b1358d35/html5/thumbnails/63.jpg)
uLTR for runtime adaptation and recovery
Must finish within 4s!
tDS<1 tFS<∞ tPS<1
response time
repairing plan
Monitor
13
![Page 64: Management of Time Requirements in Component-based Systemstianhuat.github.io/slides/fm2014.pdf · 2021. 4. 15. · Management of Time Requirements in Component-based Systems Yi Li1](https://reader035.vdocuments.net/reader035/viewer/2022071608/614705dff4263007b1358d35/html5/thumbnails/64.jpg)
uLTR for runtime adaptation and recovery
Must finish within 4s!
tDS<1 tFS<∞ tPS<1
response time
repairing plan
Monitor
Replacing DS is enough!
13
![Page 65: Management of Time Requirements in Component-based Systemstianhuat.github.io/slides/fm2014.pdf · 2021. 4. 15. · Management of Time Requirements in Component-based Systems Yi Li1](https://reader035.vdocuments.net/reader035/viewer/2022071608/614705dff4263007b1358d35/html5/thumbnails/65.jpg)
uLTR for runtime adaptation and recovery
Must finish within 4s!
tDS<1 tFS<∞ tPS<1
response time
repairing plan
Monitor
Replacing DS is enough!
The “meaning” of LTR: safe if one of tFS and tPS is less than 1.
13
![Page 66: Management of Time Requirements in Component-based Systemstianhuat.github.io/slides/fm2014.pdf · 2021. 4. 15. · Management of Time Requirements in Component-based Systems Yi Li1](https://reader035.vdocuments.net/reader035/viewer/2022071608/614705dff4263007b1358d35/html5/thumbnails/66.jpg)
uLTR for runtime adaptation and recovery
Experiments:• Use real service response time • Simulate violations by adding uniform random delays to
components • Compare the length of recovery plans generated by
LTR and uLTR • In ~90% cases, uLTR discovers shorter repairs
14
![Page 67: Management of Time Requirements in Component-based Systemstianhuat.github.io/slides/fm2014.pdf · 2021. 4. 15. · Management of Time Requirements in Component-based Systems Yi Li1](https://reader035.vdocuments.net/reader035/viewer/2022071608/614705dff4263007b1358d35/html5/thumbnails/67.jpg)
Limitations & Future WorkLimited evaluation
• Need to look at other domains
Proof of concept, not the silver bullet• Generalize the sampling algorithm: allow arbitrary
hyper-rectangles
Scalability issues:• Quantifier elimination • Balance between precision and performance
15
![Page 68: Management of Time Requirements in Component-based Systemstianhuat.github.io/slides/fm2014.pdf · 2021. 4. 15. · Management of Time Requirements in Component-based Systems Yi Li1](https://reader035.vdocuments.net/reader035/viewer/2022071608/614705dff4263007b1358d35/html5/thumbnails/68.jpg)
ChecklistWhat 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
16
![Page 69: Management of Time Requirements in Component-based Systemstianhuat.github.io/slides/fm2014.pdf · 2021. 4. 15. · Management of Time Requirements in Component-based Systems Yi Li1](https://reader035.vdocuments.net/reader035/viewer/2022071608/614705dff4263007b1358d35/html5/thumbnails/69.jpg)
ChecklistWhat 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
16
![Page 70: Management of Time Requirements in Component-based Systemstianhuat.github.io/slides/fm2014.pdf · 2021. 4. 15. · Management of Time Requirements in Component-based Systems Yi Li1](https://reader035.vdocuments.net/reader035/viewer/2022071608/614705dff4263007b1358d35/html5/thumbnails/70.jpg)
Questions?Thank you!
17
![Page 71: Management of Time Requirements in Component-based Systemstianhuat.github.io/slides/fm2014.pdf · 2021. 4. 15. · Management of Time Requirements in Component-based Systems Yi Li1](https://reader035.vdocuments.net/reader035/viewer/2022071608/614705dff4263007b1358d35/html5/thumbnails/71.jpg)
ReferencesLi, Y., Albarghouthi, A., Gurfinkel, A., Kincaid, Z., Chechik, M.: Symbolic Optimization with SMT Solvers. In: Proc. of POPL 2014 (2014)
Tan, T.H., André, E., Sun, J., Liu, Y., Dong, J.S., Chen, M.: Dynamic Synthesis of Local Time Requirement for Service Composition. In: Proc. of ICSE 2013, pp. 542–551 (2013)
Al-Masri,E.,Mahmoud,Q.H.:QoS-based Discovery and Ranking of Web Services.In:Proc. of ICCCN 2007, pp. 529–534. IEEE (2007)
Wang, S., Rho, S., Mai, Z., Bettati, R., Zhao, W.: Real-time Component-based Systems. In: Proc. of RTETAS 2005, pp. 428–437 (2005)
Carminati, B., Ferrari, E., Hung, P.C.: Exploring Privacy Issues in Web Services Discovery Agencies. IEEE Security & Privacy 3(5), 14–21 (2005)
18