Presentation is loading. Please wait.

Presentation is loading. Please wait.

Model Transformation with the Ptera Controller

Similar presentations


Presentation on theme: "Model Transformation with the Ptera Controller"— Presentation transcript:

1 Model Transformation with the Ptera Controller
Thomas Huining Feng CHESS, EECS, UC Berkeley

2 Motivating Sinewave Example
An SDF model to generate a sine wave with Automatic partial evaluation improves performance sin( 2πFn ) Fs

3 Intuition of Model Transformation
Pattern matching – find a context-free part of the model

4 Intuition of Model Transformation
Pattern matching – find a context-free part of the model Replace it with a more compact design (value statically computed)

5 Intuition of Model Transformation
Pattern matching – find a context-free part of the model Replace it with a more compact design (value statically computed) Continue with similar transformations until fixpoint

6 Ptera (Ptolemy Event Relationship Actor) Workflow
RemoveMultiply SimplifyMultiply SimplifyDivide

7 Syntax and Semantics for Ptera
Based on event graphs [Schruben 1983] Visual representation Nodes are events Edges are scheduling relations Variable Final Event Action Guard Initial Event Delay

8 Syntax and Semantics of Ptera
Based on event graphs [Schruben 1983] Visual representation Nodes are events Edges are scheduling relations Execution with an unbounded event queue 0.0 1.0 1.0 1.0 1.0 End Increase Start Increase Increase Increase 0.0 1.0 2.0 10.0 10.0 time

9 Hierarchical Model Each event can be associated with a submodel
A submodel is itself a model No difference in syntax Conceptually equipped with a separate event queue Model time is global When Compute occurs at time 1, the submodel starts When the submodel ends at time t (t ≥ 2), Compute is finished End is processed at time t + 1

10 Events for Model Transformation
A simple workflow for repeating a transformation

11 The Sinewave Optimizer
RemoveMultiply SimplifyMultiply SimplifyDivide

12 The Sinewave Optimizer
Hierarchical workflow breaks down complexity All transformation rules access the shared Model variable. No need for messaging. Order of the 3 transformations is unimportant (but a deterministic order exists) When model time is synchronized with real time, execution produces animation

13 Conclusion Transformation rule specified in the modeling language
The control is essentially a model (so we call it model-based transformation) The Ptera model of computation Supports hierarchical workflows Better expressiveness than state machines and control flow diagrams Shares data with variables instead of messages Permits heterogeneous composition (with DE, FSM, dataflow, etc) Applications Model optimization Model construction Design refactoring Ptera can also simulate discrete-event systems Available from Ptolemy II 8.0 More demos in ptolemy/actor/gt/demo, ptolemy/domains/ptera/demo


Download ppt "Model Transformation with the Ptera Controller"

Similar presentations


Ads by Google