1 / 1

Model Transformation Using ERG Controller

Thomas H. Feng Edward A. Lee. Model Transformation Using ERG Controller. Event Relationship Graph (ERG) A discrete-event model of computation for event-oriented designs (compared to actor-oriented, object-oriented, state-oriented, etc) originally introduced in 1983. Semantics

Download Presentation

Model Transformation Using ERG 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. Thomas H. Feng • Edward A. Lee Model Transformation Using ERG Controller • Event Relationship Graph (ERG) • A discrete-event model of computation for event-oriented designs (compared to • actor-oriented, object-oriented, state-oriented, etc) originally introduced in 1983. • Semantics • Initialize event queue to contain only the initial events (green ones) • Repeat until event queue is empty • Remove the first event from event queue • Execute its action • For each outgoing edge whose guard is true • Schedule the event that the edge points to • If the event is a final event (red ones) • Clear the event queue • Hierarchical Composition • Refinements in ERG: an event can be associated witha refinement. The refinement is fired when: • the event is processed, or • input is received at any input port • ERG as refinement in DE Event Library (Compared to Actor Library) Analysis Analyze the model and annotate it with properties (Jackie Leung and Thomas Mandl) Execution Control Execute the model Wait for real time to elapse Stop the transformation workflow Test the guards on the outgoing edges IO Clone the model List all files in the directory with filters Read the model stored in a file Output the model to a file User Interaction Pop up a dialog to ask the user for parameters Wait for input and report back after t in model time Report a message in a window or a dialog Set window properties (on-top, size, enabled, etc) Transformation Perform pattern matching and report result Perform pattern matching and then transformation View the model in a separate window Generic Fire an action specified in the Ptolemy action language, and fire the submodel if there is one associated with it as a refinement And Much More… Actions can be easily extended with an API. Override the fire method to perform customized actions (similar to the fire of actors): publicRefiringData fire(ArrayToken arguments) throwsIllegalActionException; Statically evaluate anarithmetic operation(plus, multiply ormaximum) on 2 consts • Example Applications • ERG • Simulate sequential discrete-event processes • Compose with concurrent models of computation (DE, dataflow, etc) for parallel execution • Describe dependency relationship between tasks in a workflow • Model graphical user interface • Model Transformation • Statically optimize models based on analysis result • Automatically search and replace patterns • Construct new models by transforming an empty model • Dynamically configure model structures according to the run-time states • Simulate structural evolution of systems • Encapsulated Model Transformation Rule • A transformation rule contains 3 components: • Pattern: match a subgraph in a given model • It is a graph containing interconnected actors and relations. • Matchers (A in the example) can be used to match arbitrary actors satisfying certain criteria • Textual constraints are evaluated once a subgraph is found and for the match to be successful, all constraints must be true. • Replacement: replace the matched subgraph with a new graph. Operations can be performed on the actors. In this case, C1’s value is calculated and set by a (hidden) operation. • Correspondence: relate objects in pattern to replacement (e.g., C1 in pattern and C1 in replacement, and the two relations in them, are related) Center for Hybrid and Embedded Software Systems

More Related