1 / 13

Model Transformation with the Ptera Controller

Model Transformation with the Ptera Controller. Thomas Huining Feng CHESS, EECS, UC Berkeley. Motivating Sinewave Example. An SDF model to generate a sine wave with Automatic partial evaluation improves performance. Intuition of Model Transformation.

Download Presentation

Model Transformation with the Ptera Controller

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Model Transformationwith 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

  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 SimplifyDivide SimplifyMultiply

  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 SimplifyDivide SimplifyMultiply

  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.0More demos in ptolemy/actor/gt/demo, ptolemy/domains/ptera/demo

More Related