a novel wcet semantics of synchronous programs
play

A Novel WCET Semantics of Synchronous Programs Michael Mendler 1 - PowerPoint PPT Presentation

A Novel WCET Semantics of Synchronous Programs Michael Mendler 1 Partha S Roop 2 , 4 Bruno Bodin 3 Bamberg University, Germany University of Auckland, New Zealand University of Edinburgh, United Kingdom Mercator Fellow, Bamberg University,


  1. A Novel WCET Semantics of Synchronous Programs Michael Mendler 1 Partha S Roop 2 , 4 Bruno Bodin 3 Bamberg University, Germany University of Auckland, New Zealand University of Edinburgh, United Kingdom Mercator Fellow, Bamberg University, Germany SYNCHRON’16, Bamberg (Germany), 07 December 2016

  2. Introduction Reactive Systems and Synchronous Languages Reactive systems are expected To have a short delay of reaction, and to be correct . Synchronous programming languages capture this behaviour: formal operational or denotational models for verification unambiguous semantics-preserving compilation . 2 / 17 Introduction IO-BTCA Algebra WCET Conclusion

  3. Introduction Time matters Synchronous programs are highly time critical. This problem is modeled by the Worse-Case Execution Time. What is the longest reaction time of the system ? Also known as the Worst Case Reaction Time. Numerous solutions exist, but those contribution solve the WCET for platform specific cases. We miss a generalisation that considers time-abstract executions and the nuances of the underlying execution platform from the point of view of WCET. 3 / 17 Introduction IO-BTCA Algebra WCET Conclusion

  4. Introduction Our proposition We propose a time-aware semantics for synchronous programs : An algebraic approach (min-max-plus) Based on formal power series Which combine linear system theory for timing , and Gödel-Dummet logic for functional specification , Compositional: can describe the WCET behaviour of individual threads, their concurrent and hierarchical compositions It can be used to integrate existing WCET analysis tools into functional compilation, to design new compositional timing analysis and to interface with temporal-logic based model checking. 4 / 17 Introduction IO-BTCA Algebra WCET Conclusion

  5. Introduction Context Sequencer_signal input signal a,start output signal done [-] Enabled signal b,c,d Region "Enabled" [-] cC b C0 C1 d Concurrent regions SCCharts [vHDM + 14] [-] cB Precision timed a / b B0 start B1 architectures [EL07] Disabled c / done Thread-interleaved pipelines done [-] cA Initial state A1 / d b A2 A0 / c 5 / 17 Introduction IO-BTCA Algebra WCET Conclusion

  6. IO-BTCA Definition A A6 i/8/ ¬i/5/ A2 States A0 Transitions /7/start Ticks /31/ A1 A3 guards /21/ ¬ping/18/ signals ¬v/32/ ping/20/pong A5 A4 delays /12/ /24/ 6 / 17 Introduction IO-BTCA Algebra WCET Conclusion

  7. IO-BTCA Parallel composition cA cB cC AD CD ¬en/0/ BD ¬en/0/ ¬en/0/ t i c k 1 tick 1 dis/1/ en/1/ tick(AD) A0 dis/1/ dis/13/ en/1/ en/1/ ¬dis ∧ ¬b/0/ C0 B0 ¬dis ∧ ¬a/0/ tick n and m+2 ¬dis ∧ ¬b/0/ ¬dis ∧ b/16/ tick n and m+2 A1 tick m+1 c/6/done d/3/ ¬dis ∧ a/17/b ¬dis ∧ b/4/ /8/c C1 t i c B1 ¬c/0/ k /40/d m ¬d/0/ A2 tick m+1 c k m t i We have a Tick Alignement Problem. 7 / 17 Introduction IO-BTCA Algebra WCET Conclusion

  8. Algebra semi-ring structure Our timing analysis will be expressed in the discrete max-plus structured over natural numbers ( N ∞ , ⊕ , ⊙ , 0 , 1 ) : N ∞ = df N ∪ {−∞ , + ∞} ⊕ stands for the maximum ⊙ for the addition. 0 = df −∞ 1 = df 0, A commutative and idempotent semi-ring on N ∞ . Example 4 ⊕ (5 ⊙ 2) = max (4 , 5 + 2) = 7 (4 ⊕ 5) ⊙ (4 ⊕ 2) = max (4 , 5) + max (4 , 2) = 9 8 / 17 Introduction IO-BTCA Algebra WCET Conclusion

  9. Algebra Logical interpretation The order structure ( N ∞ , ≤ , −∞ , + ∞ ) is a complete lattice. Max-plus is widely used for discrete event system analysis. But this lattice structure also supports logical reasoning We can define a logical interpretation ( N ∞ , ∧ , ∨ , ⊃ , ⊥ , ⊤ ) N ∞ measures the presence or absence of a signal ⊥ or 0 = −∞ indicates that a signal is absent , ⊤ or + ∞ indicates present eventually , All other stabilisation values d ∈ N codify bounded presence 9 / 17 Introduction IO-BTCA Algebra WCET Conclusion

  10. Algebra Constructive logic We defined The semiring structure ( N ∞ , ⊕ , ⊙ , 0 , 1 ), and the logical interpretation ( N ∞ , ∧ , ∨ , ⊃ , ⊥ , ⊤ ) They are equally important. The former to calculate WCET timing and the latter to express signals and reaction behaviour. Both are overlapping with the identities ⊕ = ∨ and 0 = ⊥ . Every element in N ∞ is at the same time a delay value and a constructive truth value. 10 / 17 Introduction IO-BTCA Algebra WCET Conclusion

  11. Algebra Formal Max-Plus Power Series Definition (max-plus formal power series) A (max-plus) formal power series is a (finite or ω -infinite) sequence a i X i = a 0 ⊕ a 1 X ⊕ a 2 X 2 ⊕ a 3 X 3 · · · � A = (1) i ≥ 0 with a i ∈ N ∞ and where exponentiation is repeated multiplication, i.e., X 0 = 1 and X k +1 = X X k = X ⊙ X k . A formal power series stores an infinite sequence of numbers a 0 , a 1 , a 2 , a 3 , . . . as the scalar coefficients of the base polynomials X i . Such a power series may model an automaton’s timing behaviour measuring the time cost to complete each tick or to reach a given state in given tick. However, A could also be used to model a signal. 11 / 17 Introduction IO-BTCA Algebra WCET Conclusion

  12. WCET Definition 1:dis/13/ d/3/ cC en/1/ 2:b/4/ CD C0 C1 Let us now consider the IO-BTCA cC, wcet(cC) = wcet( CD ) ⊕ wcet( C 0) ⊕ wcet( C 1) . Here is state CD : wcet( CD )(0) = 1 wcet( CD )( n + 1) = ( ¬ en ( n + 1) ∧ (0 ⊙ ( 1 ∧ wcet( CD )( n )))) ⊕ ( dis ( n + 1) ∧ (13 ⊙ wcet( C 0)( n + 1))) 12 / 17 Introduction IO-BTCA Algebra WCET Conclusion

  13. WCET i ≥ 0 wcet(En)( i ) X i is the parallel The cost series wcet(En) = � composition (tick-wise addition) of the constituent automata’s tick cost series, wcet(En) = wcet(hC) � wcet(cA) � wcet(cB) � wcet(cC) . (2) 13 / 17 Introduction IO-BTCA Algebra WCET Conclusion

  14. WCET Approximations This algebra introduce several approximation opportunities: Signal Abstraction Tick Alignement Abstraction Environment Abstraction ... We already modeled two WCET computation methods: Max-Plus Approach (common approximation) Tick Alignement Sensitive Approach (closed to [WRA13]) 14 / 17 Introduction IO-BTCA Algebra WCET Conclusion

  15. WCET Iterative feasibility analysis. We define : clk( S ) = tick (wcet( S )) = X ⊙ (1 ω ∧ wcet( S )) The clock of S giving full reachability information for a state S across all ticks and depending on all signals. Then with our algebra we can intersect two clocks clk( DisC ) ∧ clk( A 1) and find that clk( DisC ) ∧ clk( A 1) = 0 ω , i.e., both clock are incompatible. 15 / 17 Introduction IO-BTCA Algebra WCET Conclusion

  16. WCET By applying this result in the approximated model : ... We then are able to refine the approximation. wcet(En) ≤ (wcet DisC (hC) � wcet A 0 (cA)) � wcet abs (cB) � wcet abs (cC)) 0 : 12 : 26 : 41 ω � 0 : 2 : 17 ω � 0 : 14 : 14 : 16 ω = = 0 : 28 : 57 : 74 ω Tighter than the max-plus result 0 : 28 : 57 : 83 ω . 16 / 17 Introduction IO-BTCA Algebra WCET Conclusion

  17. Conclusion Design of safety-critical systems need both functional and timing correctness. We developped a comprehensive semantics of synchronous languages using min-max-plus Gödel-Dummett algebra. This models, precisely, the tick-based lock-step execution of the threads, by formalising the tick alignment problem . Formalises the modelling of signals and the signal dependency between the threads. Future works: Developement of a timing analysis tools for the SCCharts Link the semantics to existing approaches 17 / 17 Introduction IO-BTCA Algebra WCET Conclusion

  18. Questions 17 / 17 Introduction IO-BTCA Algebra WCET Conclusion

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