Model Transformation: M2M Engines Architecture Source-Metamodel Source Model Tool A Rule4 Rule3 Rule2 Rule1 LHS RHS Instance of Instance of Rule-Model UML Target-Model Tool B Importer Transformator Exporter Target-Metamodel Copyright © 2006 <strong>FZI</strong> Karlsruhe kmg
LHS Transformation Rules UML -> Simulink Realization Elements sender : Class participant-association ae1 : AssociationEnd isNavigable = =false connection-association source : AssociationClass association-connection ae2 : AssociationEnd isNavigable = =tr ue association-participant receiver : Class R121_AssociationClass root : SLSystem : SLBlock receiver : SLSystem x_Inport : SLBlock name = ae2.name+"_In" blockType = >Inpor t RHS x_Line : MDLElement, SLLine dstPort = Utility::countInports2(receiver) srcPort = Utility::countOutports2(sender ) elementID elementName = sender.name+"_to_"+receiver.name inDemux : MDLElement, SLLine srcPort = >1 dstPort = >1 elementName = source.name elementID Realization Elements syste m-sy ste mE l em ent sy st em-sy st e mE l e m e nt : SLBlock sender : SLSystem syste m-syste mE l e m e nt srcBlock-srcBlockLine block-blockElement srcBlockLine-srcBlock sy st em-sy st e mE l e m e nt system-systemElement x_Outport : SLBlock name = ae1.name+"_Out" blockType = >Outport dstBlock-dstBlockLine dstBloc kLine-d stBlock block-blockElement system -system El eme nt srcBlock-srcBlockLine system -system Ele men t owner-attribute owner-attribute muxOut : MDLElement, SLLine srcPort = >1 dstPort = >1 elementName = source.name elementID rPorts : MDLElement, MDLString value = "[1, "+Utility::getAllAttributesSize(source)+"]" elementName = >Ports elementID Realization Elements demux : SLBlock blockType = >Demux name = source.name mux : SLBlock blockType = >Mux name = sour ce.name outPortPos : MDLElement, MDLString value = Utility::getPositionOfOutport(sender, ae1, 700, 60) elementName = >Position elementID inPortPos : MDLElement, MDLString value = Utility::getPositionOfInport(receiver, ae2, 50, 60) elementName = >Position elementID dstBlockLine-dstBlock AssociationClass {javax.jmi.substituteName=UmlAssociationClass} +r121a_AssCls() +r121_AssociationClass() system-systemElement sPorts : MDLElement, MDLString value = "["+Utility::getAllAttributesSize(source)+", 1]" elementName = >Por ts elementID owner-attribute owner-attribute owner-attribute o wner-attribu te owner-attribute rShowName : MDLElement, MDLString value = >on elementName = >ShowName elementID posMux : MDLElement, MDLString value = Utility::getPositionOfOutportMux(sender, ae1, 620, 60, Utility::getAllAttributesSize(source)) elementName = >Position elementID owner-a tt ri but e sShowName : MDLElement, MDLString value = >on elementName = >ShowName elementID posDemux : MDLElement, MDLString value = Utility::getPositionOfInportDemux(receiver , ae2, 160, 60, Utility::getAllAttr ibutesSize(sour ce)) elementName = >Position elementID Copyright © 2006 <strong>FZI</strong> Karlsruhe kmg