ASurveyofConcurrentObject-OrientedProgrammingLanguagesTechnicalReportRM/96/4N.R.ScaifeDept.ofComputingandElectricalEngineeringHeriot-WattUniversityEdinburghEH144ASFebruary7,19961AbstractIssuesinthedesignandselectionofconcurrentobject-orientedlanguagesarediscussedandsomegen-eralprinciplesoutlined.Thebulkofthispaperisanextensive(althoughfarfromcomplete)enumerationofconcurrentobject-orientedlanguages,pastandpresent.Salientfeaturesarediscussedandunusualornovelaspectsofeachlanguagepointedout.Anattemptismadetodrawsomegeneralconclusionsfromworkinthisareaintermsofthefeaturesprovidedbythelanguagesandthehardwaretheyaretargettedon.1MotivationWearecurrentlyengagedinaprojecttoexploitfunctionalprogrammingasameansofdevelopingandmaintainingparallelprogrammes.Todatewehavedevelopedanumberofhand-builtapplicationsintheareaofcomputervision[118,88,99]andhavedevelopedaprototypeautomaticparallelisingcompilerbasedonStandardML[24].Wenowwishtoinvestigatetheroleofahigher-levelabstractionmechanisminourmethodologyandwouldliketobaseourresearchinthelightofexistingprojects.Althoughthesearchforabstractionmechanismsinparallelprogramminghasbeengoingonforalongtime,ithasprovedtobeamuchmorediculttaskforparallelsystemsthanforsequentialsystems,forwhichabstractionplaysamajorroleinmostmodernsequentiallanguages.Onevibrantareaofresearchwhichhasariseninthelasteightyears,orso,istheideaofusingobject-orientedcodeasthebasisforparallelprogramming.Thishasspawnedalargenumberofdierentlanguages,systemsandmethodologiesandhasprovedtractabletotheoreticalanalysis.Someoftheselanguagesimple-mentabstractionmechanismsverysimilartothetechniquesweemployindevelopingparallelcodeandwewouldliketodrawonthisexperienceinourendeavours.Wehavegatheredsomeoftheavailableliteratureandattemptedtolookforgeneralprinciplesinthiswork.Here,wepresentasummaryofthelanguagesdiscovered,29programminglanguagesplusanumberofoperatingsystemsandevenanabstractmachine.Wedonotprojecttherelevanceofthissurveyontoourintendedinvestigation,which,afterall,willbebasedonfunctionalabstractdatatypesratherthanpersistentobjectsbutwedrawsometentativeandgeneralconclusionsfromourndings.2ConcurrentObject-OrientedProgramming2.1IntroductionInsequentiallanguages,theprocedureorfunctionisthebasicabstractionmechanism,codeanddatacanbecombinedandparameterisedinsuchawaythattheycanbereusedwithsuitableinstantiation.Thisdoesnotextendtoparallelprogramming,however,sinceitdoesnotadequatelydescribethecommunicationandsynchronisationrequiredbetweenconcurrentobjects[6].Theproblemwithparallelcomputationisthatahighdegreeofindeterminacyisintroducedbythefactthatdierentsegmentsofaparallelcomputationcanbedistributedthroughoutspaceandareexecutedatindeterminatepointsintimerelativetooneanother[3].Theseissuesaretransparentinasequentialexecution.Oneconsequenceisthatpartiallyevaluatedsectionsofprogrammecoexistwhichgreatlycomplicatesthelocationandsynchronisationofthesesectionsandincreasestheriskofharmfulinterferencebetweenthem.Parallelprogrammingthusrequiresaneworderofabstractionmechanismwherebynotonlyarepro-grammeinstructionsanddataabstractedbutthelocationofdataandthepatternofcomputationareseparatelyabstractedandparameterised.Ideallythesetwoshouldbeindependentandorthogonaltoonean-other,inthesensethatdierentpatternsofcomputationmayberequiredforthesamesequentialabstractionondierentparallelarchitectures,however,thishasprovedanextremelydicultgoaltoachieve.2ThisisoneofthestrengthsofapplyingObject-Orientedprogrammingtechniquestoparallelprogrammedevelopment.Themanagementofpotentiallyparallelprogrammeswherecommunicationandsynchronisa-tionarerequiredaresuccinctlymodelledbyobjectsinanobject-orientedenvironment.Theobjectsencap-sulatethecodeanddatasectionstobeexecutedinparallelandtheinteractionbetweenobjectscorrespondstotheevaluationstrategy.Thiscreatesahierarchicalviewoftheoverallprocessofspecifyinganddevelopingparallelprogrammes[6]:-1.Atthelowestlevelarethebasicconcurrencyprimitives.Theseinvolvecommunicationsprimitivessuchassendingmessagesandspecifyingltersforincomingmessages.Alsoincludedherearecomputationprimitivessuchasspecifyingconcurrentexecutioneitherremotelyorlocally.Thesewillbepresentinthelanguagespecifyinganobject-orientedsolutiontoaprogrammingproblembutwillalsobemappedthroughanintermediaterepresentation(ifoneisused)andwillmapontothenativelanguageofthetargethardware.2.Abovethislayerarethepatternsofcommunicationthatconnectobjectstogether.Thesecanbe,forinstance:-(a)Point-to-pointasintheremoteprocedurecall(RPC)methodology.Thisisasubsetofthegeneralmessagepassingconcept.(b)Patterndirectedinwhichgroupsofanonymousrecipientscanbeaddressed.Theactualpatternofmessagescanbeabstractedanddenedbythemessagetransmitter.(c)Constraint-basedwheremessagerecipientscanlteroutspecicclassesofmessages.Thesecouldbetospecifyspecicorderingsofevents,forinstancereadingfromanemptybuer,whicharediculttosetupinasynchronoussystems.3.Atthetoplevelisamodulardecomposition[6]whichisatop-levelabstractionlayerusedbythedesignertoseparatedesignconcernsfromimplementationissues.Fori
本文标题:A Survey of Concurrent Object-Oriented Programming
链接地址:https://www.777doc.com/doc-3785808 .html