100 likes | 293 Views
MdH – 23/11/2005 Meeting. On Using Linearly Priced Timed Automata for Flow Analysis. What is a LPTA?. Timed Automata with extension: cost accumulation during behavior More formally: tuple A=(L, C, l0, E, I, P )
E N D
MdH – 23/11/2005 Meeting On Using Linearly Priced Timed Automata for Flow Analysis
What is a LPTA? • Timed Automata with extension: cost accumulation during behavior • More formally: tuple A=(L, C, l0, E, I, P) • Cost for taking an edge is Pe, and for staying n cycles in a state is Ps*n (should be > 0) • Look for min cost ending of traces ending in a goal state • Can “guide” the state space exploration with manually entered heuristics • Use branch and bound techniques
Example of LPTA Min from left to right: 14
LPTA and Scheduling Problems • Optimal Task Graph Scheduling (TGS): schedule a number of interdependent tasks on heterogeneous processors • Use a network of TA to simulate the multiple processes • Inter-process Interaction: synchronization channels • Time duration: Guarded edges over clock variables • Associate cost to edges and states • Uses work on priced symbolic state for solving
Similarity to Flow Analysis • Flow analysis: extract the dynamic behavior of the prog • Flow extraction, representation, calculation conversion • LPTA: good for extraction and representation at least (safe and tight # of iterations) • Cost is time (can also be modeled as clock guards…) • Network of TA can simulate multiple processes
Cont’d • Instead of trying to find the optimal path cost-wise, we try to find the *least* optimal price • Need to modify Branch and Bound algorithm • Alternatively: use negative cost for guards: the more transitions, the better=WCET (need to extend the framework a little bit) • Priced Symbolic State ↔ Symbolic Evaluation method • Reachability Analysis ↔ Infeasible Path Determination • Priced Clock Region ↔ State Space Reduction
Cost = inf Passed =empty Waiting = {(l0, C0)} While Waiting != empty select (l, C) from Waiting if (l, C) ╞ and min(C) < cost then Cost = min(C) if (l, C’) in Passed: C’ !subset C then add (l, C) to Passed (m, D), (l, C) ~>(m, D): add (m, D) to Waiting Return Cost Cost = 0 Passed =empty Waiting = {(l0, C0)} While Waiting != empty select (l, C) from Waiting if (l, C) ╞ and max(C) > cost then Cost = max(C) if (l, C’) in Passed: C’ !subset C then add (l, C) to Passed (m, D), (l, C) ~>(m, D): add (m, D) to Waiting Return Cost Min and Max Algorithms
Obvious Corollaries • Problems: • Still need to derive platform specific timing to quantify actual WCET • Need to convert existing code to LPTA and extract platform dependent models • Recursion! • BUT: • Can work on a higher level than either source/intermediate/machine code • Allows for upstream formal testing • Simplicity of modeling aspect • Powerful tools for analysis exist (notably Uppaal CORA)
Tiny Uppaal Example • Taken from Ebbe’s thesis • Note: we’re not using the CORA variant
Closing Thoughts • Concepts still need refinement • How does LPTA compare to syntax/time trees? • Is it really useful?