10 likes | 134 Vues
This paper discusses an innovative approach to model transformation focused on actor systems, highlighting the extension of backtracking algorithms for subgraph isomorphism. It outlines the systematic development of actor models using XML change requests for adding or deleting entities and relations. The motivation stemmed from the need to simplify complex actor model designs, with resulting optimal hierarchical Ptolemy models for traffic light systems being showcased. The presented techniques facilitate behavior-preserving optimization and model generation, demonstrating their relevance with real-world examples.
E N D
Thomas H. Feng Edward A. Lee Subgraph isomorphism(an extension to the backtracking algorithms by Ullmann) Model Transformation for Systematic Development of Actor Models Replacement Replacement Replacement Pattern Correspondence Pattern Correspondence Pattern Correspondence Generated XML change requests: <deleteEntity name=“actor1”/> <deleteRelation name=“relation1”/> Pattern Pattern Pattern Replacement Correspondence Replacement Correspondence Replacement Correspondence Generated XML change requests: <entity name=“C” class= “ptolemy.actor.lib.Const”> <property name=“value”class=“ptolemy.data.expr.Parameter”value=“1”/> </entity> Motivation Model Transformation Goal Facilitate the design of complex actor models. Specification A TransformationRule actor contains an atomic transformation designed by the user. For example: Demos in Ptolemy 7.0 Const Optimization Demonstrate model transformation for behavior-preserving optimization. Input Traffic Light Model Hierarchical Heterogeneous MoCs (Models of Computation) NAOMI Project Lockheed Martin ATL UC Berkeley UIUC Vanderbilt Output A hierarchical Ptolemy model for U.S. traffic light. The light cycles through 3 stages: red (3 time units) → green (2) → yellow (1) Statically evaluate arithmetic operations on pairs of Const actors to reduce model size, until no further optimization is possible. Dining Philosophers Demonstrate model generation and higher-order composition. (Here, entities in Pattern implicitly correspond to those in Replacement with the same name.) Algorithm 1) To create a European traffic light, we need a traffic controller with 4 stages instead: red (2) → red &yellow (1)→ green (2) → yellow (1) ModelGenerator outputs an empty model. The CreateFirst transformation rule generates the first philosopher and the first fork. The CreateOne transformation rule is applied n-1 times, generating one philosopher and one fork each time. Hierarchy Flattening Demonstrate pattern searching, replacing and model refactoring. 2) Add a pedestrian light to either the U.S. model or the European model: Atomic Transformation Actor Match a level of the model hierarchy, and flatten it by moving the contents within the matched CompositeActor to the outside. Center for Hybrid and Embedded Software Systems