Download presentation
Presentation is loading. Please wait.
Published byJasper Sharp Modified over 9 years ago
1
ILPc: A novel approach for scalable timing analysis of synchronous programs Hugh Wang Partha S. Roop Sidharta Andalam
2
Outline Timing analysis of concurrent programs Problem statement Our approach - ILPc Results Conclusions
3
Acronyms ILP – Integer Linear Program ILPs – ILP sequential ILPc – ILP concurrent EOT = End of Tick – also known as “pause” TCCFG – Timed concurrent control flow graph (Intermediate format)
4
Synchronous languages abort [loop foo1(); pause; foo2(); pause; end loop ] || [loop foo3(); pause; foo4(); pause; end loop ] when s
5
Synchronous languages abort [loop foo1(); pause; foo2(); pause; end loop ] || [loop foo3(); pause; foo4(); pause; end loop ] when s
6
Synchronous languages abort [loop foo1(); pause; foo2(); pause; end loop ] || [loop foo3(); pause; foo4(); pause; end loop ] when s abort start abort end
7
Synchronous languages abort [loop foo1(); pause; foo2(); pause; end loop ] || [loop foo3(); pause; foo4(); pause; end loop ] when s abort condition
8
Synchronous languages abort [loop foo1(); pause; foo2(); pause; end loop ] || [loop foo3(); pause; foo4(); pause; end loop ] when s abort condition False True
9
Synchronous languages abort [loop foo1(); pause; foo2(); pause; end loop ] || [loop foo3(); pause; foo4(); pause; end loop ] when s fork
10
Synchronous languages abort [loop foo1(); pause; foo2(); pause; end loop ] || [loop foo3(); pause; foo4(); pause; end loop ] when s
11
Synchronous languages abort [loop foo1(); pause; foo2(); pause; end loop ] || [loop foo3(); pause; foo4(); pause; end loop ] when s
12
Synchronous languages Time Read Inputs Emit outputs Computation
13
Synchronous languages Time Tick 1Tick 4Tick 2Tick 3
14
Synchronous languages Time Worst Case Reaction Time analysis ◦ WCRT analysis Synchrony hypothesis ◦ Reactive system operates infinitely fast compared to the environment. Validation ◦ Min(inter-arrival-time of events) > Max (Reaction Time) Longest tick
15
Outline Timing analysis of concurrent programs Problem statement Our approach - ILPc Results Conclusions
16
Motivating example A1 A2 A3 T1 B1 B2 T2 C1 C2 T3 T1 || T2 || T3
17
Motivating example A1 A2 A3 T1 B1 B2 T2 C1 C2 T3 10 15 20 10 3 5 Execution Time: 25
18
Motivating example A1 A2 A3 T1 B1 B2 T2 C1 C2 T3 10 15 20 10 3 5 Execution Time: 28
19
Motivating example A1 A2 A3 T1 B1 B2 T2 C1 C2 T3 10 15 20 10 3 5 Execution Time: 35
20
Conventional approaches Max-plus M. Boldt and C. Traulsen and R. Hanxleden. Worst Case Reaction Time Analysis of Concurrent Reactive Programs. ENTCS, 203(4), 2008. L. Ju, B. K. Huynh, A. Roychoudhury, and S. Chakraborty. Performance debugging of Esterel specifications. CODES-ISSS 2008.
21
Conventional approaches State exploration L. Ju, B. K. Huynh, S. Chakraborty, and A. Roychoudhury. Context- sensitive timing analysis of Esterel programs. DAC, 2009. S. Andalam, P. S. Roop, and A. Girault. Pruning infeasible paths for tight WCRT analysis of synchronous programs. DATE, 2011. M. Kuo, R. Sinha, and P. S. Roop. Efficient WCRT analysis of synchronous programs using reachability. DAC, 2011. ILPs Model checking Reachability
22
Motivating example A1 A2 A3 T1 B1 B2 T2 C1 C2 T3 10 15 20 10 3 5 WCRT analysis -Max-Plus WCRT = Max(T1) + Max(T2) + Max(T3) = A3 + B1 + C2 = 20 + 10 + 10 = 40 cycles -State Exploration A1+B1+C1 = 25 A2+B2+C2 = 28 A3+B1+C1 = 35 A1+B2+C2 = 23 A2+B1+C1 = 30 A3+B2+C2 = 33 WCRT = Max(25,28,35,23,30,33) = 35 cycles
23
Tradeoff Precision Analysis Time Max-plus State exploration
24
Motivating example A1 A2 A3 T1 B1 B2 T2 C1 C2 T3 10 15 20 10 15 5 103
25
Motivating example A1 A2 A3 T1 B1 B2 T2 C1 C2 T3 10 15 20 10 15 5 10 WCRT analysis -Max-Plus WCRT = Max(T1) + Max(T2) + Max(T3) = A3 + B2 + C2 = 20 + 15 + 10 = 45 cycles -State Exploration A1+B1+C1 = 25 A2+B2+C2 = 40 A3+B1+C1 = 35 A1+B2+C2 = 35 A2+B1+C1 = 30 A3+B2+C2 = 45 WCRT = Max(25,40,35,35,30,45) = 45 cycles
26
The problem statement Precision Analysis Time Max-plus State exploration
27
Our approach Our approach (ILPc) ◦ Inspired by counter example guided model checking ◦ Also has some ideas similar to local model checking Success Fail
28
Outline Timing analysis of concurrent programs Problem statement Our approach - ILPc Results Conclusions
29
Overview of ILPc TCCFGILP model
30
E1 E2 E5 E4 E3 E6 E7 E12 E11E8 E9 E10 E17 E13 E14 E15 E16
31
ILP model E1 E2 E5 E4 E3 E6 E7 E12 E11E8 E9 E10 E17 E13 E14 E15 E16
32
ILP model E1 E2 E5 E4 E3 E6 E7 E12 E11E8 E9 E10 E17 E13 E14 E15 E16
33
ILP Compared with the conventional ILP ◦ Directly capture features of synchronous languages. ◦ More precise WCRT estimates with minimum overhead.
34
Overview of ILPc TCCFGILP model Tick expressions
35
Tick Expressions 0 (1,3,5…)
36
Overview of ILPc ILP solver TCCFG Ticks can be aligned? ILP model Tick expressions WCRT & Execution path
37
Verifying tick alignment 0
38
Overview of ILPc ILP solver TCCFG Ticks can be aligned? ILP model Tick expressions WCRT & Execution path Refinement Success Fail
39
Outline Timing analysis of concurrent programs Problem statement Our approach - ILPc Results Conclusions
40
Benchmarking Compared with 3 existing approaches [1,2,3] Conducted in 2 phases ◦ Phase 1: Theoretical performance ◦ Phase 2: Real-world applications Benchmark computer ◦ Windows based ◦ Quad-core 1.6 GHz CPU ◦ 8 GB memory [1] L. Ju, B. K. Huynh, S. Chakraborty, and A. Roychoudhury. Context- sensitive timing analysis of Esterel programs, DAC, 2009. [2] S. Andalam, P. S. Roop, and A. Girault. Pruning infeasible paths for tight WCRT analysis of synchronous programs, DATE 2011. [3] M. Kuo, R. Sinha, and P. S. Roop. Efficient WCRT analysis of synchronous programs using reachability, DAC, 2011.
41
Scalability Analysis time vs. program states. Analysis time of ILPc ◦ Time taken for each iteration. Number of program states. ◦ The number of iteration. Structure and cost distribution.
42
Benchmarking: Phase 1 Two sets of benchmarks ◦ Set A - Maximum number of required iterations to find the WCRT. ◦ Set B - Minimum number of required iterations to find the WCRT. (Iteration = 1)
43
Benchmarking: Phase 1 Set A A1 A2 End 5 10 0 5 0 5 0 5 0 … 5 0
44
Benchmarking: Phase 1 5 10 0 5 0 5 0 … Set A A1 A2 End 5 10 0 5 0 Set B 5 10 0 5 0 5 0 5 0 …
45
Benchmarking: Phase 1 Set A
46
Benchmarking: Phase 1 Set B
47
Benchmarking: Phase 1 Same precision. Analysis time of ILPc depends heavily on the number of iterations rather than the number of program states. On average, analysis time of ILPc should be between the worst case and best case scenarios.
48
Benchmarking: Phase2 NameWCRTThreads 1ChannelProtocol9977 2Flasher6177 3RobotSonar18747 4DrillStation275115 5CruiseControl193125 6RailroadCrossing447230 7WaterMonitor463140 Small Large L. H. Yoong and G. D. Shaw. Auckland function block benchmark. University of Auckland, 2010. www.ece.auckland.ac.nz/~pretzel/Auckland_FB_Benchmark.zip
49
Benchmarking: Phase2 Benchmarks 1-4 (less than 20 threads)
50
Benchmarking: Phase2 Benchmarks 5-7 (more than 20 threads) >1 hr Out of Memory
51
Benchmarking: Phase2
52
Results summary Same precision as state exploration approaches. Orders of magnitude faster compared to state exploration approaches for synchronous benchmarks for industrial automation applications.
53
Conclusions We proposed ILPc tailored for timing analysis of concurrent programs. ILPc paves the way for scalable timing analysis through an iterative refinement process. Future work: ◦ Consideration of complex architectural features. ◦ ILPc variant for the analysis of parallel programs.
54
Thank you!
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.