版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
ComponentsbasedsystemswithProbabilisticchoiceDoronPeledBarIlanUniversityStructureDevelopmentofreliablesystems.Implementingcomponentsbasedsystems.Componentsbasedsystemswithprobabilisticchoices.Historyof(concurrent)softwaredevelopmentEarlysoftwaredevelopment:programming[AdaLovelance].Testingintroducedintothesoftwaredevelopmentcycle(inspection,walkthrough)[Meyer].Programverificationisinvented[Floyd,Hoare].Automaticverification(modelchecking)isinvented[Clarke+Emerson,Quelle+Sifakis].Automaticsynthesis?Whynotsynthesizethesoftwaredirectlyfromspecification?SpecificationSystemModelchecking/
testingYes!!No+
CounterexampleRevisionSpecificationSynthesisSystemAlessdirectapproachSpecificationSystemModelchecking/
testingYes!!No+
CounterexampleRevisionSpecificationSynthesisSystemCompilationIntermediatedescriptionInfact,synthesiswasattemptedquiteearlyFirstmodelcheckingpaperby[Clark+Emerson]wasalsoaboutsynthesis.Similaridea(differentformalism)by[Manna+Wolper].Translatethespecificationintoanautomaton(tableau)thatacceptsthesameexecutions.Thentranslatethisautomatonintocode.Thecodeissequential,orcontrolledbyacentralizedscheduler.R::P!4;
Q:R!x+5P::R?yR::Q?zReactivesequentialsystemssynthesisProblem[Buchi,Rabin]:Howtoautomaticallyconstructanautomatonthatinteractswithanuncontrolledenvironmentandguaranteesthattogethertheywillsatisfysomeregularproperty.[Pnueli+Rosner]:Similarfortheallowedexecutionstosatisfysometemporal(LTL)property*.Solution:Translation(LTLAutomata)+Determinization+Gametheoryconstruction.*Thisisasubproblemoftheabove,asLTLpropertiesarestar-freeregular.Complexityofsequentialsynthesisishigh2EXPTIMECompleteforLTLspecification.…But,thereareprovablesystemswherethenumberofstatesisdoublyexponential.Butmustthesizeofacircuitthatimplementssuchasystembealsodoublyexponential?[Fearnly+Peled+Schewe]:
Ifweknew,wecouldhavedecidedwhetherEXPSPACE=2EXPTIMEornot.ConcurrentsynthesisSeveralprocesses,withsomecommunicationarchitecture.WewantthesystemtosatisfysomeLTLproperty.[Pnueli+Rosner]:ItisundecidableeventocheckwhetherthereisasystemwiththegivenarchitecturethatsatisfiestheLTLproperty.Butundersomestrongassumptions(e.g.,hierarchicalsystems)wecansolvethis
[Pnueli+Rosner],[Finkbeiner+Schewe],[Thiagarajan+Madhusudan],[Kupferman+Vardi].Mostly,negativeresultsaboutsynthesisofconcurrentsystems.Fewpositiveresults:…,itisdecidableforsomeverylimitedarchitectures,mostlywhenthereisahierarchybetweentheprocesses.…inthesecases,thecomplexityisveryhigh…AlternativeAllowaformalismthatishighlevelbutalreadyincludesadistributionofthetastksamongautonomouscomponents.Providesasimpleautomaticwaytotransformthedesignintoimplementation.ComponentbasedsystemsAcomponent(process)isanautomaton.
Fromthemarkedstate,aandbareenabledlocally.dbafeC1Componentsmaysharetransitions,onwhichtheycoordinate.hcbgakjcabcmndbafeC1C2C3Verimag’sBIP(BehaviorInteractionsPriorities)arecomponentbasedsystems!BIPBIPAglobalstateisacombinationoflocalstateshdcbbagfeakjcabcmnC1C2C3Fromthegivenglobalstate,dandcareenabled.Thelocalviewofacomponentinaglobalstateisthelocalstate+enabledactions.hdcbbagfes4akjcabcmnC1C2C3ThelocalviewofC3hereis<s4,{c}>.AssumeamechanismwhereacomponentcansenseitslocalviewHowtoimplementscheduling?hdcbbagfeakjcabcmnC1C2C3C1maypickupa,whileC2maypickupb,butC3willpickupc.Notworking..Howtoimplementscheduling?hdcbbagfeakjcabcmnC1C2C3SoC1picksupb,C2picksupcandC3picksupa.Notworkingagain…WeneedsomemechanismfordecisionsMichaelRabinshowedthatasymmetricnon-probabilisticalgorithmcannotbegiven.Synchronizerslikeα–core,canbeused.Thisisinteraction-centricview.
Considerthecasethatwewanttoguaranteeselectionsbycomponents(e.g.,whenweneedtomakesomeprobabilisticchoices).Thisisacomponent-centricscheduling.SomeretrospectImplementingconcurrentsystemsfromasimplemodelofcomponentautomataisnotassimpleasthought.SimilarproblemsexistwhenimplementingmultiplechoicesynchronouscommunicationasinCSPorADA
R::[P?x[]Q?y]||P::R!3||Q::R!zInteractionbasedschedulingusing
α-coredbafeakjcabcmC1C3C1sendsOFFERtoa-interactionC2sendsOFFERtoa-interactiona-interactionsendsLOCKtoC1a-interactionsendsLOCKtoC2C1sendsOKtoa-interactionC2sendsOKtoa-interactiona-interactionsendsSTARTtoC1a-interactionsendsSTARTtoC2Moremessagesforcancellingcommunicationorfinishingit.Problemswiththeinteraction-basedschedulingExpensive:requiresquitealotofmessagepassing,andaprocessforeachcoordination.Doesnotsupportprobabilisticdecisions.Anerrorisidentifiedintheα-corealgoritmandwasfixedautomaticallyusingageneticprogrammingtoolbasedonmodelchecking[Katz+Peled].Considerthefollowingsituationa–Iwillwritealoneapapertoaconference.b–Wewillwritetogetherapapertoaconference.c–Youwillwritealoneapapertoaconference.Neitheryouormehavetimetowritetwopapers
(butwecanwriteoneeach,separately).cbbabC1C2Difficultsituation:whattodo?Wecandecideseparately,butneedtodecideconsistently:cannotbethatC1decidesonworkingseparatelyandC2decidestocollaborate.Todecideoncollaboration,weneedstocoordinate.cbbabC1C2Difficultsituation:whattodo?Perhapsweneedtothrowacoin.Saywebothhaveafaircoin.So,thechanceofcollaborationis50-50?Oneofusthrowsthecoinfaster…cbbabC1C20.50.50.50.5Howtomodelthisw.r.t.thestatespace?cbbabC1C20.50.50.50.5aabccMarkovProcess?
Agraph+adistributionfunctionfromeachstatetothesetofstatescbbabC1C20.50.50.50.5aabcc???Certainlynot…distributionmustsumsupto1!!cbbabC1C20.50.50.50.5aaccb0.50.50.5No,weusefaircoins…cbbabC1C20.50.50.50.5aaccb0.3330.3330.333OnlyifthechanceofC1andC2tothrowthecoinfirstis0.5each!cbbabC1C20.50.50.50.5aaccb0.50.250.25Amorerealisticmodel:
dependsonwhichcomponentthrowsthecoinfirst.cbbabC1C20.50.50.50.5aabcc0.50.50.50.5bC1C2C1C2Whatisthechanceofatooccur?
btooccur?ctooccur?cbbabC1C20.50.50.50.5aabcc0.50.50.50.5bC1C2C1C2Whatisthechanceofatooccur?
btooccur?ctooccur?cbbabC1C20.50.50.50.5aabcc0.50.50.50.5bC1C2C1C2Itreallydependsontheschedulingofthrowingthecoin.Ifwedonothavetheprobabilitiesforthat,wecanonlyprovidelowerandupperbound.Chanceofa(ofc)tooccurimmediatelybetween0and0.5.
Chancebtooccur0.5.cbbabC1C20.50.50.50.5aabcc0.50.50.50.5bC1C2C1C2MarkovDecisionProcessaabcc0.50.50.50.5bC1C2C1C2SetofstatesS.[Initialstates0.]ActionsA.ForeachstatesinS,A(s)isadistributionfunctiononS.
I.e.,0≤A(s)[s’]≤1and
ΣsinSA(s)[s’]=1.MarkovDecisionProcessModelingcomponentbasedsystemsaabcc0.50.50.50.5bC1C2C1C2SetofstatesS.ActionsA:inourcase,actionsarecomponentsmakingaprobabilitsticdecision.Theprobabilityofanactionmadebyacomponentonlydependsonitslocalview:
Foreachstates,s’inSwiththesamelocalviewforcomponentA,A(s)=A(s’).Adifferentscenario:
Theexecutionofcwillallowanalternativechoicefora.cbbabC1C20.50.5aaccbReflectingthechoicescbbabC1C20.50.5aacc0.50.5bC1C2C1C2Howtoimplementacomponentbasedsystem?hdcbbagfeakjcabcmnC1C2C3Howtoallowatleastonecomponenttheselection?Avoidacentralized(sequential)solution.Lockthechoicesofatleastonecomponent.ThenotionofaconflicthdcbbagfeakjcabcmnC1C2C3Transitionsofacomponentare“dependent”,whentheysharethesamecomponent,e.g.,aandb,ordandbinC1.Wesaythataandbareinconflictandthatdandbaresequential.Otherwisetheyare“independent”or“concurrent”.Thenotionofa“confusion”hdcbbagfeakjcabcmnC1C2C3Isapairoftransitionsofdifferentcomponents(a,c)suchthatexecutingcwilleitheraddorremoveaconflictingchoicetoa.Thenotionofa“confusion”hdcbbagfebcnC1C2Transitionsarein“confusion”iftheyareindependentbuttheexecutionofonecanchangethealternativechoicesfortheother.Symmetricconfusion:(a,c)
Transitionsareindependentbuttheexecutionofonecandecreasethealternativechoicesfortheother.Considernandc.Thenotionofa“confusion”hdcbbagfeakjcabcmnC1C2C3Transitionsarein“confusion”iftheyareindependentbuttheexecutionofonecanchangethealternativechoicesfortheother.Asymmetricconfusion:(n,a)Transitionsareindependentbuttheexecutionofonecanincreasethealternativechoicesfortheother.Executingnenablesbasadditionalalternativetoa.A“microscheduler”usingsemaphoresFirst,weneedtofreezethelocalviewofcomponents.
Thisincludesthelocalstateandenabledtransitions.Thenacomponentcanmakeadecisionbasedonthedistributionthatdependsonitslocalview.Whatcanmakeachangetothelocalview?
-anothercomponentmakingadifferentchoiceaboutanenabledjoinedtransition.
-duetoasymmetricconfusion,somejointtransitionsdisabled.
-duetoanasymmetricconfusion,somejointtransitionsenabled.A“microscheduler”usingsemaphoresProvidesemaphorespereachcomponent.Providesemaphorespereachconfusion.Inordertomakeadecisionaboutsomechoice,acomponentneedstocatchtherelevantsemaphores.Checklocalview.Catchthesemaphoresrelatedtocomponentsandconfusionsinvovledinview.Checkthattheviewhasnotchanged.Topreventdeadlocks,numberthesemaphoresandcatchtheminascendingorder,releaseindescendingorder[Dijkstra].A“microscheduler”usingsemaphoresOptimization:wedononeedsemaphoresforsymmetricconfusions:casewouldbeeliminatedbycapturingsemaphoreforcomponents.Couldalternativelycatchsemaphoresforthecomponentsthatsharethelocallybutnotgloballyenabledtransitions.
Thendonotneedsemaphoresforasymmetricconfusion.
Butthiswillreduceconcurrency.ForC2tomove…hdcbbagfeakjcabcmnC1C2C3cisenabeld.CatchessemaphoresonC2,onC3andontheconfusion(d,c).Why?ImplementationComponentsserveinamaster–slavemechanism.Aslaveoffersupdatesonlocallyenabledtransitionsthroughsharedvariablesandexecuteitspartinaselectedtransition.Alsosolvesalong-lastingproblemonmodelingandimplementingconcurrentsystemswithprobabilisticchoices[Katoen+Peled].Allowsparallelism.Nodeadlocks.Previoussolutionsinvolvedallowingonlyonetransitiontofireintheentiresystem.Simpletoimplement(implementedbyAyoubNouri)usingstandardsemaphoreoperations.Ifprobabilisticchoiceisnotnecessary,wecanremovesemaphoresforasymmetricconfusion.ImplementationAllowsparallelism.Transitionsarenotnecessarilysmallorsimple.Behavesasifatomic;linerarizability.Nodeadlocks.Previoussolutionsinvolvedallowingonlyonetransitiontofireintheentiresystem[Lynchetal].Simpletoimplement(implementedwithVerimag)usingstandardsemaphoreoperations.Ifprobabilisticchoiceisnotnecessary,wecanremovesemaphoresforasymmetricconfusion.SharedtransitionsEachcomponentsetsupasharedflagtoindicatewhenasharedtransitionaislocallyenabled(andresetswhenitbecomesdisabled).Tocheckitsview,acomponentneedstocheckwhichothercomponentsthatshareitslocallyenabledtransitionshavesetuptheirsharedflags.Canweeliminatetheseexpensivechecks?Howtoeliminaterepeatedchecksforenablednessofsharedtransitions?Canuseasynchronizerlikeα-core(notcheap…).Canuse«
knowledge
»toeliminatesomeofthechecks;Whatisknowledge?AcomponentX“knows”apropertypaboutthesystemifevery(global)stateofthesystemthatincludesthecurrentlocalstateofX,pholds.Jointknowledgeofcomponents:whencombiningtheirlocalstates.Morecomponentsknowtogethermore.CalculatethereachablestatesthathavethesamecurrentlocalstateofcomponentX.Thencheckwhetherthesestatessatisfyp.Canbedoneusingmodelcheckingtechniques,e.g.,basedonBDDs.Whentheleftcomponentisinlocalstates,itknowsthatthemiddlecomponentcannotbeinstatet.shdcbbagfeakjcabcmntqC1C3C2Howtouseprecalculatedknowled
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2020护理继续教育伤口换药考核试题及完整答案
- 2026阿斯利康合规测试内部员工分享原题及答案
- 2021年社会保障概论面试精简版题库及速记版参考答案
- 龙湖物业2021面试专属题库及考官评分标准解析
- 2023年融媒体笔试全真模拟卷题库及答案解析
- 黑龙江哈尔滨市第四十七中学校2025-2026学年度下学期七年级语文三月份阶段性测试(含解析)
- 购房协议书法律保护不
- 抖音修改实名信息申请书
- 讲好战疫故事弘扬中国精神
- 农村家禽购销协议书范本
- pr详细教学课件
- 村务监督委员选举会会议记录范文
- 福建省全国名校联盟2026届高三上学期联合开学摸底考试语文试题(含答案)
- 作物遗传育种课件
- DGTJ08-82-2020 养老设施建筑设计标准
- 2024年甘肃省白银市、武威市、嘉峪关市、临夏州中考物理试题及答案
- 2025年山西省中考英语试卷真题(含答案详解)
- 冷冻储备肉管理制度
- T/CBMCA 007-2019合成树脂瓦
- 医院培训课件:《人文关怀与人文护理》
- 2024届高考专题复习:论述类文本主观题型梳理及方法练习
评论
0/150
提交评论