ebook img

Verification Based on Unfoldings of Petri Nets with Read Arcs PDF

172 Pages·2014·1.68 MB·English
by  
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview Verification Based on Unfoldings of Petri Nets with Read Arcs

erification ased on nfoldings of V B U etri ets with ead rcs P N R A hèse de doctorat T présentée par ésar odríguez C R à cole ormale upérieure de achan lÉ N S C ’ en vue de lobtention du grade de ’ octeur en nformatique D I et soutenue à achan le 12 décembre 2013 devant le jury composé de C : eijo eljanko tefan aar abrice ordon tefan chwoon K H S H F K S S aciej outny iri rba M K J S Rapporteurs Examinateurs Président Directeurdethèse LaboratoireSpécificationetVérification(LSV);ÉcoleNormaleSupérieuredeCachan,CNRS&INRIA 61,avenueduPrésidentWilson;94235CACHANCedex,France ABSTRACT Humans make mistakes, especially when faced to complex tasks, such as the construction of modern hardware or software. This thesis focuses on machine-assistedtechniquestoguaranteethatcomputersbehavecorrectly. Moderncomputersystemsarelargeandcomplex.Automatedformalver- ification stands as an alternative to testing or simulation to ensuring their reliability.Itessentiallyproposestoemploycomputerstoexhaustivelycheck thesystembehavior.Unfortunately,automatedverificationsuffersfromthe state-space explosion problem: even relatively small systems can reach a hugenumberofstates.Usingtherightrepresentationforthesystembehav- iorseemstobeakeysteptotackletheinherentcomplexityoftheproblems thatautomatedverificationsolves. The verification of concurrent systems poses additional issues, as their analysis requires to evaluate, conceptually, all possible execution orders of their concurrent actions. Petri net unfoldings are a well-established verifi- cationtechniqueforconcurrentsystems.Theyrepresentbehaviorbypartial orders,whichnotonlyisnaturalbutalsoefficientforautomaticverification. This dissertation focuses on the verification of concurrent systems, em- ployingPetrinetstoformalizethem,andstudiestwoprominentverification techniques:modelcheckingandfaultdiagnosis. We investigate the unfoldings of Petri nets extended with read arcs. The unfoldingsoftheseso-calledcontextualnetsseemtobeabetterrepresenta- tionforsystemsexhibitingconcurrentreadaccesstosharedresources:they canbeexponentiallysmallerthanconventionalunfoldingsonthesecases. Theoretical and practical contributions are made. We first study the con- struction of contextual unfoldings, introducing algorithms and data struc- tures that enable their efficient computation. We integrate contextual un- foldingswithmergedprocesses,anotherrepresentationofconcurrentbehav- ior that alleviates the explosion caused by non-determinism. The resulting structure, called contextual merged processes, is often orders of magnitude smallerthanunfoldings,asweexperimentallydemonstrate. Next, we develop verification techniques based on unfoldings. We de- fine SAT encodings for the reachability problem in contextual unfoldings, thus solving the problem of detecting cycles of asymmetric conflict. Also, an unfolding-based decision procedure for fault diagnosis under fairness constraintsispresented,inthiscaseonlyforconventionalunfoldings. Finally, we implement our verification algorithms, aiming at producing a competitive model checker intended to handle realistic benchmarks. We subsequently evaluate our methods over a standard set of benchmarks and compare them with existing unfolding-based techniques. The experiments demonstratethat reachabilitycheckingbasedon contextualunfoldingsout- performsexistingtechniquesonawidenumberofcases. Thissuggeststhatcontextualunfoldings,andasymmetriceventstructures in general, have a rightful place in research on concurrency, also from an efficiencypointofview. iii RÉSUMÉ L’être humain fait des erreurs, en particulier dans la réalisation de taches complexes comme la construction des systèmes informatiques modernes. Nous nous intéresserons dans cette thèse à la vérification assistée par ordi- nateurdubonfonctionnementdessystèmesinformatiques. Les systèmes informatiques actuels sont de grande complexité. Afin de garantir leur fiabilité, la vérification automatique est une alternative au testing et à la simulation. Elle propose d’utiliser des ordinateurs pour ex- plorerexhaustivementl’ensembledesétatsdusystème,cequiestprobléma- tique:mêmedessystèmesassezsimplespeuventatteindreungrandnombre d’états. L’utilisation des bonnes représentations des espaces d’états est es- sentielle pour surmonter la complexité des problèmes posés en vérification automatique. La vérification des systèmes concurrents amène des difficultés addition- nelles, car l’analyse doit, en principe, examiner tous les ordres possibles d’exécution des actions concurrentes. Le dépliage des réseaux de Petri est une technique largement étudiée pour la vérification des systèmes concur- rents.Ilreprésententl’espaced’étatsdusystèmeparunordrepartiel,cequi serévèleaussinaturelqu’efficacepourlavérificationautomatique. Nous nous intéressons à la vérification des systèmes concurrents mod- élisés par des réseaux de Petri, en étudiant deux techniques remarquables devérification:lemodelcheckingetlediagnostic. Nous étudions les dépliages des réseaux de Petri étendus avec des arcs delecture.Cesdépliages,aussiappelésdépliagescontextuels,semblentêtre une meilleure représentation des systèmes contenant des actions concur- rentes qui lisent des ressources partagées : ils peuvent être exponentielle- mentpluscompactsdanscescas. Ce travail contient des contributions théoriques et pratiques. Dans un premier temps, nous étudions la construction des dépliages contextuels, en proposant des algorithmes et des structures de données pour leur con- structionefficace.Nouscombinonslesdépliagescontextuelsaveclesmerged process, une autre représentation des systèmes concurrents qui contourne l’explosion d’états dérivée du non-déterminisme. Cette nouvelle structure, appelée contextual merged process, est souvent exponentiellement plus com- pacte,cequenousmontronsexpérimentalement. Ensuite, nous nous intéressons à la vérification à l’aide des dépliages contextuels. Nous traduisons vers SAT le problème d’atteignabilité des dé- pliages contextuels, en abordant les problèmes issus des cycles de conflit asymétrique.Nousintroduisonségalementuneméthodedediagnosticavec deshypothèsesd’équité,cettefoispourdesdépliagesordinaires. Enfin, nous implémentons ces algorithmes dans le but de produire un outil de vérification compétitif et robuste. L’évaluation de nos méthodes sur un ensemble d’exemples standards, et leur comparaison avec des tech- niquesissuesdesdépliagesordinaires,montrentquelavérificationavecdes dépliagescontextuelsestplusefficacequelestechniquesexistantesdansde nombreuxcas. Cecisuggèrequelesdépliagescontextuels,etlesstructuresd’évènements asymétriques en général, méritent une place légitime dans la recherche en concurrence,égalementdupointdevudeleurefficacité. iv ACKNOWLEDGMENTS IamindebtedwithStefanSchwoon,whokindlyacceptedtobemyadvisor during both my Ph.D and Master thesis. For his generous time and ded- ication, for the many insights about unfoldings I learnt from him, and for thepatience,support,enthusiasm,freedom,andpedagogyheappliedinhis guidance,Iexpresstohimmydeepestgratitude.Iextendthisacknowledge- menttoStefanHaar,whoeitherasthegarantofthisthesisorasaco-author, playedanessentialrôleinmakingthisresearchpossible,proposinginterest- ingquestionsandofferinghelpwheneveritwasnecessary. I sincerely thank the reviewers and jury members: Keijo Heljanko and Maciej Koutny for accepting reviewing this manuscript and for their com- mentsonit;andFabriceKordonandJiriSrbaforthetimetheyhavekindly employedforme. ENSdeCachan,FundaciónCajaMadrid,andINRIAgenerouslyprovided thenecessaryfinancialsupport,andtheyaregratefullyacknowledged. I am particularly thankful to Paolo Baldan and Victor Khomenko, who always found time for replying mail and collaborated in many ways with me. Working with you was a pleasure. Victor hosted me during a visit to Newcastle University in February 2013, this was a very profitable time and I heartedly thank him. I am also thankful to Thomas Chatain for many dis- cussions about research or teaching, and Javier Esparza for some inspiring conversations. MyinterestinformalmethodsoriginatesfrompreviousworkintheSpace Research Group (SRG) at University of Alcalá (Spain). There, I had the luck of collaborating in the actual development of embedded software for the satelliteNanosat1B,nowinorbit.IwarmlythankmyadvisoratSRG,Óscar R.Polo,forthefreedomandsupportheofferedmetopursuemyowngoals. I also thank Paul Gastin for having wisely guided my first steps in formal verification;OcanSankurandAiswaryaCyriacwerealsoimportantpersons thosedays. Many people from LSV (and LSV groupies) contributed to making these last three years a wonderful experience. I want to thank Hernán Ponce de León for helping to cope with the rainy weather of Paris... and for many discussionsaboutunfoldings.MahsaShirmohammadi,VincentCheval,and Sinem Kavak always managed to propose a gathering around some east- ern delights, they will be much missed. Guillaume Scerri kindly revised fragments of this document. I also thank Benoît Barbot for the many good moments we shared while teaching the course on network programming; BenediktBolligandErwingFangforallthosecoffeetalks;ChristophHaase forhisgoodadviceswhenapplyingformypost-doc;andtheadministrative andsystemsteamformakingmylifesomucheasier. Outside LSV, I was very lucky to count on many friends to make these years enriching and worth remembering. They know who they are, and I thank all of them. Here it goes an incomplete list: Etienne Boisseau, Tong Bu, Normann Decker, Estíbaliz Fraca, Aina Frau, He Huang, Lue Huang, Jakub Kallas, Yusuke Kawamoto, Polyvios Kosmatos, Feifei Liang, Jiagui Liu,SergeyLozenko,SosukeMizusaki,DavidMontoya,ElieRached,Martín Rais,ZhongweiTang,MarioVega,YaoWang,andTiborZavadil.Ialsothank CROUSforprovidingfoodandhousing. v My warmest appreciation goes to my parents, Esteban and Esperanza, my sister Tamara, my uncles Evariste, Vitoria, Dori and Henri, and all my cousinsforbeingaconstantsourceofencouragement,inspiration,andlove allacrossthisperiod. Finally, my love and gratitude goes to Xiaoju, because of all the uncount- ably many ways in which you supported me during these three years, and forrememberingmeeverydayhowwonderfullifeis. 谢谢。 Oxford,November25,2013 CésarRodríguez vi CONTENTS 1 introduction 1 1.1 AutomatedVerificationofConcurrentSystems . . . . . . . . . 3 1.2 PetriNetsandNon-SequentialSemantics . . . . . . . . . . . . 4 1.3 UnfoldingsforVerification. . . . . . . . . . . . . . . . . . . . . 6 1.4 ContextualNetUnfoldings . . . . . . . . . . . . . . . . . . . . 8 1.5 ContributionsandOutline . . . . . . . . . . . . . . . . . . . . . 11 1.6 Publications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 2 preliminaries 15 2.1 OrdersandMultisets . . . . . . . . . . . . . . . . . . . . . . . . 15 2.2 ContextualNets . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 2.3 EncodingContextualNetsintoOrdinaryPetriNets . . . . . . 20 2.3.1 PlainEncoding . . . . . . . . . . . . . . . . . . . . . . . 20 2.3.2 Place-ReplicationEncoding . . . . . . . . . . . . . . . . 21 2.4 Unfoldings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 2.4.1 OccurrenceNets . . . . . . . . . . . . . . . . . . . . . . 22 2.4.2 BranchingProcesses . . . . . . . . . . . . . . . . . . . . 26 3 contextual unfolding construction 29 3.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 3.2 PruningtheUnfolding . . . . . . . . . . . . . . . . . . . . . . . 31 3.3 AdequateStrategiesandCompleteness . . . . . . . . . . . . . 36 3.4 UnfoldingProcedure . . . . . . . . . . . . . . . . . . . . . . . . 38 3.5 PossibleExtensions . . . . . . . . . . . . . . . . . . . . . . . . . 40 3.6 AConcurrencyRelationforEfficientConstruction . . . . . . . 41 3.7 CharacterizingPossibleExtensionsConcurrency . . . . . . . . 43 3.7.1 LazyApproach . . . . . . . . . . . . . . . . . . . . . . . 44 3.7.2 EagerApproach . . . . . . . . . . . . . . . . . . . . . . 46 3.8 UpdatingtheConcurrencyRelation . . . . . . . . . . . . . . . 48 3.9 UniquePossibleExtensions . . . . . . . . . . . . . . . . . . . . 50 3.9.1 LazyApproach:Subsumption . . . . . . . . . . . . . . 51 3.9.2 EagerApproach:AsymmetricConcurrency . . . . . . 54 3.10 Discussion:LazyvsEagerApproach . . . . . . . . . . . . . . . 55 3.11 MemoryUsage . . . . . . . . . . . . . . . . . . . . . . . . . . . 56 3.12 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 4 reachability and deadlock checking 59 4.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59 4.2 Usingc-netUnfoldingsforVerification . . . . . . . . . . . . . 60 4.3 SAT-Encodingsofc-netUnfoldings. . . . . . . . . . . . . . . . 63 4.4 AsymmetricConflictLoops . . . . . . . . . . . . . . . . . . . . 64 4.5 EncodingSize . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67 4.6 ReductionofStubbornEventsforDeadlockChecking . . . . . 67 4.7 AdditionalSimplification . . . . . . . . . . . . . . . . . . . . . 70 4.8 Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70 5 contextual merged processes 73 5.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73 5.2 ContextualMergedProcesses . . . . . . . . . . . . . . . . . . . 74 5.3 InterplayBetweenRead-ArcsandChoice . . . . . . . . . . . . 78 5.4 CharacterizingReachability . . . . . . . . . . . . . . . . . . . . 80 5.5 EncodingReachabilityintoSAT. . . . . . . . . . . . . . . . . . 84 5.5.1 ReachabilityviaArbitraryRuns . . . . . . . . . . . . . 84 vii viii contents 5.5.2 ReachabilityviaMp-Configurations . . . . . . . . . . . 86 5.6 ConstructingCompleteCMPs . . . . . . . . . . . . . . . . . . . 87 5.7 Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88 6 diagnosis 89 6.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89 6.2 BasicNotions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91 6.3 RevealsandDiagnosis . . . . . . . . . . . . . . . . . . . . . . . 94 6.3.1 RevealsRelations . . . . . . . . . . . . . . . . . . . . . . 94 6.3.2 DiagnosisfromPartialObservation . . . . . . . . . . . 95 6.4 ASolutionUsingExtendedReveals . . . . . . . . . . . . . . . 97 6.4.1 SuccinctExplanations . . . . . . . . . . . . . . . . . . . 97 6.4.2 CharacterizingWeaklyFairConfigurations . . . . . . . 100 6.5 ADecisionProcedurefordiagnosis . . . . . . . . . . . . . . . 105 6.5.1 Preparation . . . . . . . . . . . . . . . . . . . . . . . . . 105 6.5.2 ConstructingthePrefixes . . . . . . . . . . . . . . . . . 106 6.5.3 EncodingDiagnosisintoSAT . . . . . . . . . . . . . . . 107 6.6 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108 7 tools and experiments 111 7.1 PrefixConstruction:theCunfUnfolder . . . . . . . . . . . . . 111 7.1.1 TheHistoryGraph . . . . . . . . . . . . . . . . . . . . . 112 7.1.2 PossibleExtensions . . . . . . . . . . . . . . . . . . . . . 112 7.1.3 ConcurrencyRelation . . . . . . . . . . . . . . . . . . . 113 7.1.4 SplittingtheConcurrencyRelation. . . . . . . . . . . . 114 7.1.5 Strategies . . . . . . . . . . . . . . . . . . . . . . . . . . 115 7.2 PrefixAnalysis:theToolCna . . . . . . . . . . . . . . . . . . . 116 7.2.1 StubbornEventEliminationandSubsetReduction . . 116 7.2.2 AMOConstraint . . . . . . . . . . . . . . . . . . . . . . 117 7.2.3 AcyclicityChecking . . . . . . . . . . . . . . . . . . . . 117 7.2.4 SAT-solverSettings . . . . . . . . . . . . . . . . . . . . . 118 7.3 Benchmarks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119 7.4 ExperimentswithCunf. . . . . . . . . . . . . . . . . . . . . . . 119 7.5 ExperimentswithCna . . . . . . . . . . . . . . . . . . . . . . . 123 7.6 ExperimentswithContextualMergedProcesses . . . . . . . . 125 7.7 ACaseStudy:Dijkstra’sMutualExclusionAlgorithm. . . . . 128 8 conclusion and perspectives 131 a the cunf tool user’s manual, v1.6 135 a.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135 a.2 AuthorandContact. . . . . . . . . . . . . . . . . . . . . . . . . 136 a.3 Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137 a.3.1 FromPrecompiledBinaries . . . . . . . . . . . . . . . . 137 a.3.2 CompilationandInstallationfromtheSourceCode . . 137 a.4 GettingStarted . . . . . . . . . . . . . . . . . . . . . . . . . . . 138 a.4.1 ConstructingUnfoldingswithCunf . . . . . . . . . . . 139 a.4.2 DeadlockandCoverabilityAnalysiswithCna . . . . . 140 a.4.3 MoreonDekker’sAlgorithm . . . . . . . . . . . . . . . 141 a.4.4 ProducingGraphicsofC-netsandUnfoldings . . . . . 141 a.4.5 FindingMoreExamples . . . . . . . . . . . . . . . . . . 143 a.5 Command-lineSyntax . . . . . . . . . . . . . . . . . . . . . . . 144 a.5.1 Cunf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144 a.5.2 Cna . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145 a.6 FileFormats . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146 a.6.1 Thell_netFormat . . . . . . . . . . . . . . . . . . . . . 146 a.6.2 UnfoldingFormats . . . . . . . . . . . . . . . . . . . . . 146 contents ix a.7 ProducingInputforCunf . . . . . . . . . . . . . . . . . . . . . 147 a.7.1 Graphically . . . . . . . . . . . . . . . . . . . . . . . . . 147 a.7.2 Programmatically. . . . . . . . . . . . . . . . . . . . . . 148 bibliography 151

Description:
ENS de Cachan, Fundación Caja Madrid, and INRIA generously provided bold typography for f) that maps M ∈ S to f(M) = N where N(t) := Cs∈f−1(t) ning time3 in seconds (tE) as well as (maximum virtual) memory consump-.
See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.