Aspect-oriented programming [1] (AOP) tries to provide linguistic mechanisms to factor out design concerns, which can be defined, understood, and evolved separately from the functional core of the application. A first approach to AOP can be the definition
Ad-hocConstructsforNonFunctional
Aspects
MattiaMonga
PolitecnicodiMilano–DipartimentodiElettronicaeInformazione
PiazzaLeonardodaVinci,32I20133Milano–Italy
monga@elet.polimi.it
June2000
1
Malaj:AMultiAspectLAnguageforJava
tem,againhinderingcomprehensionandevolution.
Weclaimthatsuchlimitationsarein-trinsictoallgeneralsolutionstotheprob-lemandwesuggesttoprede nethesetofaspectsanAOLshoulddealwith,pro-vidingad-hocAOLs(oneforeachaspect)withconstructssupportinglimitedvisibil-ityofcertainfeaturesofthefunctionalmoduletowhichthedi erentaspectsap-ply.InourMalaj(MultiAspectLAn-guageforJava)wede neanAOLspe-ci cforsynchronisationandonespeci cfordistributionandmobility.
Aspect-orientedprogramming[1](AOP)triestoprovidelinguisticmechanismstofactoroutdesignconcerns,whichcanbede ned,understood,andevolvedsepa-ratelyfromthefunctionalcoreoftheap-plication.A rstapproachtoAOPcanbethede nitionofageneral-purposeAspect-OrientedLanguage(AOL)withfullvisi-bilityoftheinternaldetailsofitsassoci-atedfunctionalmodule.Inourpreviouswork[2,3]weanalysedAspectJ[4]–anAOPfollowingthisapproach–andcametotheconclusionthatitviolatesobject-orientedprinciplesofprotectionanden-capsulation,thushinderingreuse.An-otherapproach,followedbyHyper/J[5],isbasedontheideaofpartitioningasoft-waresysteminsmallatomicunits,thatcanbeaggregatedaccordingtodi erentdimensionsofconcern.Wefoundthatthenumberofconnectionsamongunitsincreasestheoverallintricacyofthesys-
1.1
TheSynchronisationAspect
Functionalunitsshouldbeprogrammedwithoutfocusingontheirsynchronisation:asecondstepcouldclearlystatewhathap-penswhenafunctionalunitisinvoked.Threecasesmayarise:
1.thecallviolatessomepreconditionandanexceptionisreturnedtothe
1
1 Malaj A Multi Aspect L... 暂无评价 3页 免费 Abstract A Query ... Typing For a Minimal Aspect Language Preliminary Report Peter Hui James ...
1 Malaj A Multi Aspect L... 暂无评价 3页 免费 Abstract A Query ... Typing For a Minimal Aspect Language Preliminary Report Peter Hui James ...
热门文档