Model-Driven Evolution of Software Architectures - Software and ...
Model-Driven Evolution of Software Architectures - Software and ...
Model-Driven Evolution of Software Architectures - Software and ...
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
5.4. <strong>Model</strong>-<strong>Driven</strong>ConsistencyChecking 85<br />
5.4.2 Behavioural<strong>Model</strong>ling<br />
<strong>Model</strong>Element<br />
+name:Name<br />
+ constrainedElement * {ordered}<br />
+ constraint *<br />
Constraint<br />
+body:BooleanExpression<br />
Figure 5.3:Constraints<br />
Forthecreation<strong>of</strong>interaction-based<strong>and</strong>state-basedbehaviouralmodels<br />
weuseUMLsequence<strong>and</strong>statechartdiagrams. Theunderlyingstructure<br />
<strong>of</strong>thesediagramsisdescribedbytheCollaborations<strong>and</strong>StateMachines<br />
subpackages<strong>of</strong>theUMLmetamodel.Becauseourtransformationrulesare<br />
definedonthemetamodellevel,weintroducethesepackagebriefly. Althoughwediscussonlysimplifiedversions<strong>of</strong>thesepackages,theimplementation<strong>of</strong>ourtechnique<strong>and</strong>ourcasestudyarebasedonthecomplete<br />
UMLmetamodel(version1.4[OMG,2007a]).<br />
IngeneraltheUMLmetamodelallowseverymodelelementtobeassociatedwithanorderedset<strong>of</strong>constraintsascanbeseenfromFigure5.3.<br />
NotethateverymodelelementinUMLisaspecialisation<strong>of</strong> <strong>Model</strong>Element.<br />
Weusethistoaddpre-<strong>and</strong>postconditiontomessages<strong>and</strong>stateinvariants<br />
tostates.Todistinguishbetweenpreconditions,postconditions,<strong>and</strong>other<br />
constraintsthatmightbeusedinthemodelweusestereotypes.<br />
Source:Collaborations TheCollaborationpackage<strong>and</strong>someotherUMLelementsaredepictedinFigure5.4onthefollowingpage.<br />
Inthecontext<br />
<strong>of</strong>aCollaborationthecommunicationpatternsperformedby Objectsarerepresentedbyaset<strong>of</strong><br />
Messagesthatispartiallyorderedbythe predecessor<br />
relation. Foreachmessage, sender<strong>and</strong> receiver Objectsarespecified. The<br />
cause<strong>of</strong>aMessageisaCallAction(dispatchAction)thatisassociatedwithan<br />
Operation. Inturn,this Operationispart<strong>of</strong>the Classthatisthe classifier<strong>of</strong><br />
the Objectthatreceivesthe Message. Finally,aClassoptionallycontains<br />
Attributesthathaveatype.<br />
Target: StateMachines Usingthe(target)metamodelinFigure5.5onthe<br />
nextpage,UMLstatemachinescanbeconstructedthatmodelbehaviouras<br />
atraversal<strong>of</strong>agraph<strong>of</strong>statenodesinterconnectedbytransitionarcs.<br />
Astatenode,or StateVertex,isthe targetor source<strong>of</strong>anynumber<strong>of</strong> Transitions<strong>and</strong>canbe<strong>of</strong>differenttypes.A<br />
Staterepresentsasituationinwhich