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.

116 Chapter6. ConformanceCheckingII<br />

invocations<strong>and</strong>fieldaccessestargetedatclasseswealsoimplemented.<br />

BecauseJavaMLdiscardscomments,weuseasimplePerl-scripttoretrieve<br />

@moduleclauses<strong>and</strong>generateanXML-documentconsisting<strong>of</strong> elements.Theprojection<strong>of</strong>thisdocument<br />

asXMLmodelservesasadditionalsourcemodeltoatransformationthat<br />

createsmodulesthatarecomposed<strong>of</strong>theclassescreatedbytheprevious<br />

transformation.Afinal(refining)modeltransformationliftsthefieldaccess<br />

<strong>and</strong>calldependenciestothelevel<strong>of</strong>modulesasUsesrelations.<br />

NexttotheJavasourcecode,thearchitecturalusesview<strong>of</strong>Figure6.3(b)<br />

onpage107wasanotherinputforourCCS,representingthe’as-designed’<br />

architecture.Population<strong>of</strong>aMADLmodelfromthisUMLmodelisstraightforwardbecause<strong>of</strong>theuse<strong>of</strong>stereotypestodenotemodules<strong>and</strong>usesrelations.<br />

Theresult(forimplementation<strong>and</strong>architecture)isrepresentedasa<br />

directedgraphasshowninFigure6.7.Here,boxesrepresentmodules,<strong>and</strong><br />

arrowsrepresentusesdependencies.Itcanbeseenthatthemodelderived<br />

fromtheimplementationconsists<strong>of</strong>twounconnectedsubgraphs. Infact,<br />

onesubgraphcorrespondstothepart<strong>of</strong>theimplementationdeployedon<br />

thePC,theothertothepartdeployedonthemicrocontroller. Obviously,<br />

nodirectmethodinvocations<strong>and</strong>fieldaccessesarepossiblebetweenthose<br />

parts.<br />

C&CViews Components,ports,connectors,<strong>and</strong>rolesarearchitecturalconceptsthatmayormaynothaveexplicitcounterpartsinthedevelopment<br />

viewsorimplementation.Theimplementationisnotmerelyarefinement<br />

<strong>of</strong>thesearchitecturalelementsasinthecase<strong>of</strong>developmentviews. This<br />

makesthemappingbetweenthearchitecturalC&Cviews<strong>and</strong>implementationconstructsindirect<strong>and</strong>moredifficult.Themainconcern<strong>of</strong>theC&CviewinFigure6.3(a)onpage107isconcurrency.<br />

Forsuchaviewthecomponentscorrespondtoimplementation<br />

mechanismsforconcurrency<strong>and</strong>parallelism,suchasprocesses,threads<br />

<strong>and</strong>tasks.Forexampleinthecase<strong>of</strong>asystemimplementedinJava,these<br />

componentscorrespondtothreads.Similarly,connectors,inthatcase,are<br />

abstractions<strong>of</strong>themechanismsthatallowthesethreadstointeract,forinstanceinter-process-communicationmechanisms,remote-procedurecalls,<br />

orshared-data.<br />

CreatingaC&Cviewfromstaticsourcesisveryapplicationspecific;it<br />

dependsonconventionsforimplementing,forinstance,concurrency<strong>and</strong><br />

communicationmechanisms.InthiscasewewanttoreconstructaCPADL<br />

modelrepresentingaset<strong>of</strong>communicatingprocesses. Assaid,inJava<br />

thistype<strong>of</strong>componentscorrespondstothreads. Javathreadsareclasses<br />

withamain-methodorclassesthatextendtheJava Threadclass. Inthis

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

Saved successfully!

Ooh no, something went wrong!