资源描述:
《c○springer verlag – lecture notes in computer science functional parallel programming wit》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、°cSPRINGERVERLAG{LectureNotesinComputerScienceFunctionalparallelprogrammingwithexplicitprocesses:beyondSPMDFr¶ed¶ericLoulergueandGa¶etanHainsLIFO,BP6759,45067Orl¶eansCedex2,France.1Introduction.Parallelprogramminglanguagestendtowastealgorithmicexpressivenesstoavoiddeadlocks,n
2、on-determinismandthegeneralcomplexityofconcurrentlan-guages.Asaresult,mostofthemdon'tspecifydataplacementsothatperfor-manceisunpredictableasafunctionofthesourceprogram(itdependsonthelanguageimplementation,notitssemantics).TheBSPparadigm[7]demonstratesthatexplicitprocessorloca
3、tionsandexplicitcommunicationsremovethisuncertaintyatthecostofarestrictedpro-grammingstyle.WeproposeasolutiontothisdilemmabycombiningtheeventsofprocessalgebrasandexplicitprocessorlocationsofBSPwithahigher-orderfunctionallanguage.Theresultinglanguage,CDS*,isderivedfromBerryand
4、Curien'ssequentiallanguageCDS0andrealizesBrookesandGeva'stheoryofdeterministicparallelfunctions.2Typesandconstants.We¯rstoutlinetheconcretesyntaxusedtodeclarebasictypesinCDS*andwegivemathematicalformalizationofsuchdeclarations.Thenwede¯nethesyntaxusedtodeclareexpressionsoftyp
5、e,andwecontinuetoformalizetypesasmathematicalobjectscalledgeneralizedconcretedatastructureswithindices,andweshowthatthosemathematicalobjectsgiveadenotationalsemanticsforCDS*declarations.Recursivetypesarepossiblebutwehavenotinvestigatedpolymorphism.Afullversionofthelanguagesho
6、uldcopewiththeseissues.2.1Cells,indices,values,eventsandstatesAtypeisasetofcellsassociatedwithvalues.Cellsarelabelledwithnetworkaddressescalledindices.Indicesrangeovera¯niteinterval1::N.Herearesomeelementaryexamplesoftypedeclarations:typeBOOL=begincellB@1valuesT,FinitialendTh
7、ecellB,whichisatprocessorlocation1,mayreceivethevalue1orthevalue2.Puttingthevalue1inthecellBatlocation1producestheeventB@1=T.Acellmaybe¯lledwithatmostonevalue.Sothistypeallowsthreedi®erentcon¯gurationsorstates:theemptystate,written{}andB¯lledwithT,written{B@1=T},orwithF,writt
8、en{B@1=F}.Wecanalsospecifythataneventmayoccuronlyifsomeothereventsha