11.12.2012 Views

Model-Driven Evolution of Software Architectures - Software and ...

Model-Driven Evolution of Software Architectures - Software and ...

Model-Driven Evolution of Software Architectures - Software and ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

6.5. Mappings<strong>and</strong><strong>Model</strong>Transformations 117<br />

PlayerControl<br />

DiskReader ArmControl<br />

DataSensor SpeedSensor TrackSensor TransMotor<br />

Play<br />

DiscReader<br />

DataSensor<br />

TrackSensor<br />

(a)Architecture<br />

PlayerControl<br />

ArmControl<br />

TransMotor<br />

(b)Implementation<br />

OutputControl<br />

NotePlayer<br />

Figure 6.7:ReconstructedMADLmodels<br />

casewealsoassumethatsuchclassesareinstantiatedonlyonce. Therefore,thefirsttransformationstepidentifiestheseclassesintheJavaML<br />

model. For each we create a Process component in the CPADL target<br />

model. Notethatbecauseinthiscasethereexistsaone-to-onemapping<br />

betweenanimplementationconstruct(Javathread)<strong>and</strong>thecomponentsin<br />

acommunicating-processesview,itisnotnecessarytorelyonannotations<br />

asforthemoduleview.<br />

Inaddition,wesearchinthefirsttransformationstepfortwotypes<br />

<strong>of</strong>interactions:messagepassing<strong>and</strong>shared-data. Thesetypes<strong>of</strong>connectorswereimplementedusingmethodinvocations<strong>and</strong>Javastreams,respectively.<br />

Foridentification<strong>of</strong>therelevantmethodinvocationswelargelyreuse<br />

theATLexpressionsforthepopulation<strong>of</strong>theMADLmodel. Onlynowwe<br />

justconsidermethodinvocationsbetweenidentifiedthreads.ForeachdistinctmethodinvocationbetweentwothreadswecreateaMessageconnector,<strong>and</strong>,ontheside<strong>of</strong>thesource<strong>of</strong>themessage,an<br />

OutputPortforthe<br />

involvedcomponent<strong>and</strong>aSinkRolefortheconnector;atthe‘targetside’we<br />

createan InputPort<strong>and</strong>aSourceRole.Finally,wecreate Attachmentsforthose<br />

ports<strong>and</strong>roles.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!