ebook img

Automata and temporal logic over arbitrary linear time PDF

0.15 MB·English
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 Automata and temporal logic over arbitrary linear time

LIPIcs Leibniz International Proceedings in Informatics Automata and temporal logic over arbitrary linear time Julien Cristau LIAFA—CNRS&UniversitéParis7 ABSTRACT. Linear temporallogic wasintroduced in order to reasonaboutreactivesystems. It is often considered with respect to infinite words, to specify the behaviour of long-running systems. One can consider more general models for linear time, using words indexed by arbitrary linear 1 1 orderings. Weinvestigatetheconnectionsbetweentemporallogicandautomataonlinearorderings, 0 asintroducedbyBruyèreandCarton. Weprovideadoublyexponentialproceduretocomputefrom 2 any LTL formula with Until, Since, and the Stavi connectives an automaton that decides whether n thatformulaholdsontheinputword. Inparticular,sincetheemptinessproblemfortheseautomata a isdecidable,thistransformationgivesadecisionprocedureforthesatisfiabilityofthelogic. J 0 1 Introduction 1 ] Temporal logic, in particular LTL, was proposed by Pnueli to specify the behaviour of re- O active systems [12]. The model of time usually considered is the ordered set of natural L numbers, and executions of the system are seen as infinite words on some set of atomic . s c propositions. This logic was shown to have the same expressive power as the first order [ logicoforder[11],butitprovidesamoreconvenientformalismtoexpressverificationprop- 1 erties. Itisalsomoretractable: whilethesatisfiabilityproblemofFOisnon-elementary[18], v it was shown in [17] that the decision problem of LTL with Until and Since on ω-words is 1 3 PSPACE-complete. This logic has also strong ties with automata, with important work to 7 provideefficienttranslationstoBüchiautomata,e.g.[10]. 1 Within this time model, a number of extensions of the logic and the automata model . 1 have been studied. But one can also consider more general models of time: general linear 0 1 time could be useful in different settings, including concurrency, asynchronous communi- 1 cation, and others, where using the set of integers can be too simplistic. Possible choices : v includeordinals,thereals,orevenarbitrarylinearorderings. Intermsofexpressivity,while i X LTL with Until and Since is expressively complete (i.e. equivalent to FO) on Dedekind- r complete orderings (which includes the ordering of the reals as well as all ordinals), this a does not hold in the general case. Two more connectives, the future and past Stavi opera- tors,arenecessarytohandlegaps[9]whenconsideringarbitrarylinearorderings. Over ordinals, LTL with Until and Since has been shown to have a PSPACE-complete satisfiability problem [7]. Over the ordering of the real numbers, satisfiability of LTL with untiland since is PSPACE-complete, but satisfiability ofMSOis undecidable. Over general linear time, first order logic has been shown to be decidable, as well as universal monadic secondorderlogic. Reynoldsshowsin [13]thatthesatisfiability problemoftemporallogic withonlytheUntilconnectiveisalsoPSPACE-complete,andconjecturesthatthismightstay truewhenaddingtheSinceconnective. Theupperboundin[7]isobtainedbyreducingthe satisfiabilityofLTLformulaetotheaccessibilityprobleminanappropriateautomatamodel, (cid:13)c JulienCristau;licensedunderCreativeCommonsLicense-NC-ND 2 AUTOMATA AND TEMPORAL LOGIC OVER ARBITRARY LINEAR TIME acceptingwordsindexedbyordinals. Inthispaper,wefocusonthegeneralcaseofarbitrary linear orderings,usingthe full logicwith Until, Since and both Stavi connectives. Our aim istoinvestigatetheconnectionsbetweenLTLandautomatainthissetting. AutomataonlinearorderingswereintroducedbyBruyèreandCarton[3]. Thismodel extendstraditionalfiniteautomatausing“limit”transitionstohandlepositionswithnosuc- cessororpredecessor,furtheringBüchi’smodelofautomataonwordsofordinallength[4]. Carton showed in [5] that accessibility over scattered ordering is decidable in polynomial time, and in [14] it was shown that these automata can be complemented over countable scatteredlinearorderings. Theaccessibilityresultcanbeextendedtoarbitraryorderings[6]. Fromanyformulainthislogic,wedefineanautomatonwhichdetermineswhetherthe formula holds on its input word. Satisfiability of the formula is reduced to accessibility in this automaton, and that way we get decidability of the satisfiability problem of LTL with Until,SinceandtheStavioperatorsforanyrationalsubclass. Section 2 presents some definitions about linear orderings, linear temporal logic, and themodelofautomataused. Section3introducesourmainresult,analgorithmtotranslate any LTL formula into a corresponding automaton. Section 4 discusses the expressivity of thelogicandautomataconsidered,andlooksatsomenaturalfragments. 2 Definitions 2.1 Linearorderings We firstrecall somebasic definitionsabout orderings,and introducesomenotations. Fora complete introduction to linear orderings, the reader is referred to [15]. A linear ordering J isatotallyorderedset(J,<)(consideredmoduloisomorphism). Thesetsofintegers(ω),of rationalnumbers(η),andofrealnumberswiththeusualorderingsarealllinearorderings. Let J andKbetwolinearorderings. Onedefinesthereversedordering−J astheorder- ing obtained by reversing the relation < in J, and the ordering J+K as the disjoint union J ⊔K extended with j < k for any j ∈ J and k ∈ K. For example, −ω is the ordering of negativeintegers. −ω+ω istheusualorderingofZ,alsodenotedbyζ. Anon-emptysubsetKofanordering Jisanintervalifforanyi < j < kin J,ifi ∈ Kand k ∈ Kthenj ∈ K. Inordertodefinetherunsofanautomaton,weusethenotionofcut. Acut ofanordering J isapartition(K,L)of J suchthatforanyk ∈ K andl ∈ L,k < l. Wedenote by Jˆthe set of cuts of J. This set is equippedwith the order defined by (K ,L ) < (K ,L ) 1 1 2 2 if K ( K . This ordering can be extended to J ∪ Jˆ in a natural way ((K,L) < j iff j ∈ L). 1 2 Notice that Jˆ always has a smallest and a biggest element, respectively c = (∅,J) and min c = (J,∅). For example, the set of cuts of the finite ordering {0,1,...,n−1} is the max ordering{0,1,...,n},andthesetofcutsofω isω+1. For any element j of J, there are two successive cuts c− and c+, respectively ({i ∈ J | j j i < j},{i ∈ J | j ≤ i}) and ({i ∈ J | i ≤ j},{i ∈ J | j < i}). Agap inan ordering J isacut c whichisnotanextremity(c orc ),andhasneitherasuccessornorapredecessor. max min Given an alphabet Σ, a word of length J is a sequence (a ) of elementsof Σ indexed j j∈J by J. For example, (ab)ω is a word of length ω; the sequence abωabωa is a word of length ω+ω+1,and(abω)ω isawordoflengthω2. JULIEN CRISTAU FSTTCS 2009 3 2.2 Temporallogic We use words over linear orderings to model the behaviour of systems over linear time. To express properties of these systems, we consider linear temporal logic. The set of LTL formulae is defined by the following grammar, where p ranges over a set AP of atomic propositions: ϕ ::= p| ¬ϕ| ϕ∨ϕ| ϕUϕ| ϕSϕ| ϕU′ϕ| ϕS′ϕ Besidestheusualbooleanoperators,wehavefourtemporalconnectives. TheU connec- tiveiscalled“Until”,andS iscalled“Since”. U′ andS′ arerespectivelythefutureandpast Staviconnectives. Otherusualconnectivessuchas“Next”(X),“Eventually”(F),“Always” (G)canbedefinedusingthese,asweseebelow. Theseformulaeareinterpretedonwordsoverthealphabet2AP. Aletterinthosewords is the set of atomic propositions that hold at the corresponding position. Let x = (x ) a j j∈J wordoflength J. Aformula ϕisevaluatedataparticularpositioniinx;wesaythat ϕholds atpositioniin x,andwewrite x,i |= ϕ,usingthefollowingsemantics: x,i |= p if p ∈ x i x,i |= ¬ψ if x,i 6|= ψ x,i |= ψ ∨ψ if x,i |= ψ or x,i |= ψ 1 2 1 2 x,i |= ψ Uψ if thereexists j > isuchthat x,j |= ψ , 1 2 2 andforanyksuchthati < k < j,wehave x,k |= ψ 1 x,i |= ψ Sψ if −x,i |= ψ Uψ where−xisthereversedword(a ) 1 2 1 2 j j∈−J x,i |= ψ U′ψ if thereexistsagapc ∈ Jˆverifyingthreeproperties: 1 2 (1) x,j |= ψ foranyposition jsuchthati < j < c 1 (2) thereisnointervalstartingatcwhereψ isalwaystrue 1 (i.e. ∀c < k ∃c < j < k x,j |= ¬ψ ),and 1 (3) ψ isalwaystrueinsomeintervalstartingatc 2 x,i |= ψ S′ψ if −x,i |= ψ U′ψ (itisthecorrespondingpastconnective) 1 2 1 2 Notethatweusea“strict”semanticfortheUntiloperator,contrarytoacommondefi- nition,whichwouldbe: x,i |= ψ Unsψ if thereexists j ≥ isuchthat x,j |= ψ and x,k |= ψ foranyi ≤ k < j. 1 2 2 1 Inthestrictversion,thecurrentpositioniisnotconsideredforeithertheψ ortheψ partof 1 2 the definition. Using the strict or non-strict version makes no difference whenconsidering ω-words, but in the case of arbitrary orderings, the strict Until is more powerful, as noted byReynoldsin[13]. The formula “Next ϕ”, or X ϕ, is equivalent to ⊥Uϕ. “Eventually ϕ”, noted F ϕ, is ϕ∨(⊤Uϕ),and“always ϕ”,notedG ϕ,canbeexpressedas¬(F(¬ϕ)). Given a word x oflength J, thetruth word of ϕ on x is theword v (x) oflength J over ϕ thealphabet {0,1} wheretheposition j is labelled by 1iff x,j |= ϕ. A formula is valid if its truthwordonanyinputonlyhasones. Aformulaissatisfiable ifthereexistsaninputword suchthatthetruthwordcontainsaone. 4 AUTOMATA AND TEMPORAL LOGIC OVER ARBITRARY LINEAR TIME Considertheformulaϕ = ¬a∧(G ¬X a),withAP = {a}. Ifx = (a∅)ω(whereastands for{a}), thenv (x) = 0ω (ateveryposition,eitheraistrueoraistrueinthesuccessor). On ϕ the other hand, if x = a∅ωa∅ωa, then v (x) = 01ω01ω0: at positions 0, ω and at the last ϕ position, a is true so the formula doesn’t hold; at all other positions, a is false, and there is nopositionintheinputwordwhereX aholds. Thesatisfiabilityproblemforaformula ϕconsistsindecidingwhetherthereexistsaword w and a positioni in w such that w,i |= ϕ. As FOis decidable, and everyLTLformula can beexpressedusingfirstorder,satisfiabilityofLTLisdecidable. Notehoweverthatinterms ofcomplexityFOisalreadynon-elementaryonfinitewords[18],whichisnottrueofLTL. 2.3 Automata On infinite words, Büchi automata can be used to decide satisfiability of LTL formulae. In the case of words over linear orderings, a model of automata has been introduced in [3]. Instead of accepting or rejecting each input word, as in the case of ω-words, we use these automata to compute the truth words corresponding to an LTL formula. Our model of automata thus has an output letter on each transition, so they are actually letter-to-letter transducers,whichmakecompositioneasier(seeSection3.1). An automaton is a tuple A = (Q,Σ,Γ,δ,I,F) where Q is a finite set of states, Σ is a finiteinputalphabet,Γisafiniteoutputalphabet, I and F aresubsetsofQ,respectivelythe set of initial and final states, and δ ⊆ (Q×Σ×Γ×Q)∪(2Q ×Q)∪(Q×2Q) is the set of transitions. Wenote: a|b • p −→ qif(p,a,b,q) ∈ δ(successortransition) • P → qif(P,q) ∈ δ(leftlimittransition) • q → Pif(q,P) ∈ δ(rightlimittransition). Consider a word x = (q ) over Q. We define the left and right limit sets of x at j j∈J positionj ∈ Jasthesetsoflabelsthatappeararbitrarilyclosetoj(respectivelytoitsleftand toitsright). Formally: lim x = {q ∈ Q | ∀k < j∃i k < i < j∧q = q} j− i lim x = {q ∈ Q | ∀k > j∃i j < i < k∧q = q} j+ i Note that lim x is non-empty if and only if the transition to j is a left limit, and similarly j− for lim x if the transition from j is a right limit. These sets help define the possible limit j+ transitionsinarun. Given an automaton A, an accepting run of A on a word x = (x ) is a word ρ of j j∈J length JˆoverQsuchthat: • ρ ∈ I andρ ∈ F; cmin cmax • foreachi ∈ J,thereexistsy ∈ Γsuchthatρ −x−i|→yi ρ ; i c− c+ i i • ifc ∈ Jˆhasnopredecessor,lim ρ → ρ ,andifc ∈ Jˆhasnosuccessor,ρ → lim ρ. c− c c c+ EXAMPLE 1. ThefirstautomatoninFigure1outputs1 ateachpositionimmediatelyfol- lowedbya1intheinputword,and0atotherpositions. Thesecondautomatonacceptsinputwordswhoselengthisalinearorderingwithout firstorlastelement,andwithouttwoconsecutiveelements(i.e. dense orderings). The notationP → q ,q meansthatthereisatransitionP → q andatransitionP → q . 0 1 0 1 JULIEN CRISTAU FSTTCS 2009 5 −|1 q1 1|1 q0 q0 0|1 1|0 −|− −|0 q2 0|0 q1 q2 Limits: P → q q → P q → P Limits: {q ,q },{q ,q ,q } → q ,q 0 0 2 1 2 0 1 2 0 1 forany P ⊆ {q ,q ,q } q ,q → {q ,q },{q ,q ,q } 0 1 2 1 2 1 2 0 1 2 Figure1: Exampleautomata In[5],Cartonprovesthattheaccessibility problemontheseautomatacanbesolvedin polynomial time, when only considering scattered orderings. This result can be extended to arbitrary orderings [6] as it is done for rational expressions in [2]. The idea is to build an automaton over finite wordswhich simulates thepaths in theinitial automaton and re- members their contents. In order to handle the general case (as opposed to only scattered orderings), the added operation is called “shuffle”: sh(w ,...,w ) = Π x where J is a 1 n j∈J j dense and complete ordering without a first or last element, partitioned in dense subor- derings J ...J , such that x = w if j ∈ J. Looking at automata, this means that if there 1 n j i i are paths from p to q with content P , ..., from p to q with content P , and transitions 1 1 1 n n n from P ∪···∪P toeach p ,transitionsfromeach q to P ∪···∪P ,atransitionfrom p to 1 n i i 1 n P ∪···∪P andatransitionfrom P ∪···∪P toq,thenthereisapathfrom ptoq. 1 n 1 n 3 Translation between formulae and automata Over ω-words, problems on temporal logics are commonly solved using tableau meth- ods [20], or automata-based techniques [19]. In this work we extend the correspondence betweenLTLandautomatatowordsoverlinearorderings. OurmainresultisTheorem2. THEOREM 2. ForeveryLTLformulaϕ,thereisanautomatonAϕ whichgivenanyinput wordxoutputsthetruthwordv (x). ϕ Moreover,thisautomatonA can beeffectivelycomputed,andhasanumberofstates ϕ exponentialinthesizeof ϕ. BecausewecancomputetheproductofA withanygivenau- ϕ tomatonandcheckforitsemptiness,wegetCorollary3,whichstatesthatgivenatemporal formulaandarationalproperty(i.e. anautomatononwordsoverlinearorderings),wecan checkwhetherthereexistsamodeloftheformulawhichisacceptedbytheautomaton. COROLLARY 3. Thesatisfiabilityproblemforanyrationalsubclassisdecidable. The idea is to build A by induction on the formula. We construct an elementary au- ϕ tomaton for each logical connective. We use composition and product operations to build inductively the automaton of any LTL formula from elementary automata. All automata used in this proof have the particular property that there exists exactly one accepting run foreachpossibleinputword,i.e. theyarenon-deterministic,butalsonon-ambiguous. This propertyispreservedbycompositionandproduct. Thestructureoftheproofisthefollowing: wedefinethecompositionandproductop- erators on automata, then we present the elementary automata that are needed to encode logical connectives. Finally, we give the inductive method to build the automaton corre- spondingtoaformulafromelementaryones. 6 AUTOMATA AND TEMPORAL LOGIC OVER ARBITRARY LINEAR TIME 3.1 Product, composition andelementaryautomata Let A = (Q ,Σ,Γ,δ ,I ,F ) and A = (Q ,Σ′,∆,δ ,I ,F ) be two automata. The prod- 1 1 1 1 1 2 2 2 2 2 uct consists in running both automata with the same input alphabet in parallel, and out- putting the combination of their outputs. If A ’s output alphabet and A ’s input alphabet 1 2 arethesame,thecompositionconsistsinrunningA overA ’soutput. Weusethenotation 2 1 π (a,b) = aandπ (a,b) = bforthefirstandsecondprojections. 1 2 DEFINITION 4. SupposethatA1 andA2 havethesameinputalphabet,i.e. Σ = Σ′. The productofA andA istheautomatonA ×A = (Q ×Q ,Σ,Γ×∆,δ,I × I ,F ×F ), 1 2 1 2 1 2 1 2 1 2 whereδcontainsthefollowingtransitions: • (q ,q ) −a−|b→,c (q′,q′)ifq −a→|b q′ andq −a→|c q′, 1 2 1 2 1 1 2 2 • (q ,q ) → Pifq → π (P)andq → π (P), 1 2 1 1 2 2 • P → (q ,q )ifπ (P) → q andπ (P) → q . 1 2 1 1 2 2 DEFINITION 5. SupposenowthattheoutputalphabetofA1istheinputalphabetofA2,i.e. Γ = Σ′.ThecompositionofA andA istheautomatonA ◦A = (Q ×Q ,Σ,∆,δ,I × 1 2 2 1 1 2 1 I ,F ×F ).Thetransitionsinδare: 2 1 2 • (q ,q ) −a→|c (q′,q′)ifq −a→|b q′ andq −b→|c q′, 1 2 1 2 1 1 2 2 • (q ,q ) → Pifq → π (P)andq → π (P), 1 2 1 1 2 2 • P → (q ,q )ifπ (P) → q andπ (P) → q . 1 2 1 1 2 2 Recall that LTLformulae are given by ϕ := p | ¬ϕ | ϕ∨ ϕ | ϕUϕ | ϕU′ϕ | ϕSϕ | ϕS′ϕ. For each atomic proposition p we construct an automaton A which, given a word x, out- p puts v (x). For each logical connective of arity n, we construct an automaton with input p alphabet {0,1}n, andoutputalphabet {0,1}. Theinputwordis thetupleoftruthwordsof theconnective’svariables,theoutputisthetruthwordofthecompleteformula. Fortempo- ral connectives, we only describe the automata corresponding to U and U′. For the “past” connectives, theautomataare thesame withall transitions(successorand limits)reversed, andinitialandfinalstatesswapped. a|0 For any p ∈ AP, the automaton A is ({q},2AP,{0,1},δ,{q},{q}) where δ = {(q −→ p a|1 q | p 6∈ a}∪{q −→ q | p ∈ a}∪{q → {q},{q} → q}. This automaton simply outputs1 at positionswhere pistrue,and0everywhereelse. Notethattherunisuniquelydetermined bytheinputword;suchatransduceriscallednon-ambiguous. Figures 2(a) and 2(b) show the automata corresponding to the negation (¬) and dis- junction (∨) connectives. Their limit transitions are {q} → q and q → {q}. Again, these automataadmitexactlyonerunforeachinputword. 0|1 q 1|0 0,0|0 q 0,1|11,0|11,1|1 (a) Automatonfornegation (b) Automatonfordisjunction JULIEN CRISTAU FSTTCS 2009 7 3.2 Automaton for U Thedifficulty startswiththe“Until” connective(U). Werecall that ϕUψ holdsatpositioni > inawordwifthereexistsj isuchthatψholdsatj,andsuchthat ϕholdsateveryposition < < ksuchthati k j. We build an automaton A with input alphabet {0,1}2 (corresponding to the truth U value of ϕ and ψ at each position), and output alphabet {0,1}. On an input word of the form(v (w),v (w))forsomewordw,wewanttheoutputtobev (w). Let J = |w|,and ϕ ψ ϕUψ c ∈ Jˆ. Wehavefivedifferentsituations. Foreachofthesecasesthefigureshowsanexample, with“|”representingthecutc,andeach•representingapositionintheinputword. 1,1 0. cisfollowedbyapositionwhere ϕandψaretrue. input ···•| • ··· output 1 1. c = c−,and jissuchthat ϕisfalseandψistrue. input ···•|0•,1··· j output 1 1,− z}|{−,1 2. othercaseswhere ϕUψistrueatc. input ···•| ··· • ··· output 1 0,0 3. cisfollowedbyapositionwhereboth ϕandψarefalse. input ···•| • ··· output 0 4. othercaseswhere ϕUψisfalseatc. Ifc = c− thentheinputatposition jis(1,0). j 1,0 1,0 {(1,−),(0,1)} z}|{ z}|{ z }| { 0,0 input ···•| ··· • ··· ···•| ··· ······ ··· output 0 0 ThestructureoftheautomatonA andthelimittransitionsaregivenbyFigure2. This U automaton has five states q to q corresponding to the situations described above. Given 0 4 any two states q and q′ there exists a transition q → q′ except from q to q or q and from 2 3 4 q to q , q or q . Theinput label of successortransitions is determinedby the origin node: 4 0 1 2 (1,1) for q , (0,1) for q , (0,0) for q , and (1,0) for q and q . The output label is 1 on 0 1 3 2 4 transitions leading to q , q or q , and 0 on transitions leading to q or q . All states are 0 1 2 3 4 initial, whileq istheonlyfinalstate. 4 LEMMA 6. Letϕandψtwoformulae.Letxandybethetruthwordsofϕandψonaword woflengthJ.TheoutputofA on(x,y)isthetruthwordofϕUψonw. U PROOF. Letρbethewordoflength Jˆon Qdefinedby • if x = y = 1,thenρ(c−) = q ; j j j 0 • if x = 0andy = 1thenρ(c−) = q ; j j j 1 • if x = y = 0thenρ(c−) = q ; j j j 3 • otherwise,ifthereexists j > csuchthaty = 1andforalli suchthatc < i < j, x = 1, j i thenρ(c) = q ; 2 • otherwise,ρ(c) = q . 4 WeshowthatρisarunofA ,thatitisunique,andthatitsoutputisindeedthetruthword U of ϕUψonw. By definition, ρ ends in q , which is the final state of A . Let c ∈ Jˆ. If ρ(c) is q , q or 4 U 0 1 q , then c = c− for some j and thesuccessortransition from c to the next cut is allowed by 3 j theautomaton. Ifρ(c) = q , andc = c− forsome j, then x = 1and y = 0,and ρ(c+) is q , 2 j j j j 0 8 AUTOMATA AND TEMPORAL LOGIC OVER ARBITRARY LINEAR TIME 1,1/1 0,1/1 1,1/1 q q 0 1 0,1/1 P → q ,q ,q ,q ,q 0 1 2 3 4 1,1/0 ifq ,q orq ∈ P 0 1 3 {q } → q ,q ,q 2 0 1 2 {q } → q ,q q q 4 3 4 4 2 q → {q },{q },{q ,q } 2 0 2 0 2 q → Pifq orq ∈ P 4 1 3 0,0/1 q → {q } 1,0/0 0,0/0 q3 1,0/1 4 4 0,0/0 Figure2: AutomatonforU q or q . If ρ(c−) = q , then similarly x = 1 and y = 0, and ρ(c+) can be q or q . Every 1 2 j 4 j j j 3 4 successortransitioninρisthusallowedbyA . U We nowneedto showthesame for limit transitions. Ifa left limit transition leadsto a cut c, then either ψ is true arbitrarily close to the left of c (in which case the corresponding limit set contains q or q ), or it is always false (and the limit set is {q } or a subset of 0 1 2 {q ,q }). Ifthelimitsetcontainsq ,q orq ,anystateforcisallowed. Ifitis{q },thecutc 3 4 0 1 3 2 can’tbelabelledbyq orq withoutviolatingthedefinitionofρ. Conversely,ifthelimit set 3 4 is{q },ρ(c)isnecessarilyq orq . 4 3 4 Let’s now consider a right limit transition starting at a cut c. The label of this cut can only be q or q . In the first case, ϕ must be true everywherein the limit set, which is thus 2 4 a subset of {q ,q }. In the second case, either ϕ is false infinitely often in the limit, or ψ is 0 2 alwaysfalse. Thismeansthatthelimitsetcontainsq orq ,orisrestrictedto{q }. 1 3 4 WenowshowthatarunonA isuniquelydeterminedbytheinputword. Letγarun U of A on x,y. Because of the constraints on the successortransitions, a cut c is labelled by U q ,q orq inγifandonlyifitislabelledbythesamestateinρ. 0 1 3 Let’ssupposethat a cut c is labelled by q in γ. Since q is notfinal, thereexists c′ > c 2 2 labelled by someotherstate. Ifthereis a firstsuch cut, its label is necessarily q or q (by a 0 1 successortransitionfromq oralimit transitionfrom{q }). Otherwise,thereisatransition 2 2 of the form q → {q } or q → {q ,q }. In both cases, c satisfies the condition for cuts 2 0 2 0 2 labelledbyq inthedefinitionofρ. Asimilarargumentshowsthatacutlabelledbyq in γ 2 4 hasthesamelabelinρ. TherunofA onagiveninputwordisthusunique. U The last stepis to showthat theoutputword is really the truthword of ϕUψ. Let j an element of J. First, supposethat w,j |= ϕUψ. If j has a successor k, and ψ is true at k, then y = 1,andA outputs1atposition j. Otherwise,thereexistsk > jsuchthatw,k |= ψ(i.e. k U yk = 1), and xℓ = 1 whenever j < ℓ < k. Thus, c+j is labelled with q2, and AU once again outputs1atposition j. Similarly, if w,j 6|= ϕUψ, there are two cases. In the first case, j has a successor k, and x = y = 0. Thismeansthat c+ islabelledby q ,sotheoutputatposition j is0. Inthelast k k j 3 JULIEN CRISTAU FSTTCS 2009 9 q2 q1 1,0/1 q3 • P → q0,q1,q2 if P∩{q4,q5} 6= ∅or P ⊆ {q ,q ,q } 0 1 2 1,1/1 • P → q if P ⊆ {q ,q ,q } q 3 0 1 2 0 • P → q ,q ,q ,q if P 6⊆ 4 5 6 7 q 9 {q ,q ,q } 0 1 2 • P → q if P∩{q ,q } 6= ∅ 8 4 5 0,0/0 • P → q if P ∩{q ,q } = ∅ 9 4 5 and P 6⊆ {q ,q ,q } 0 1 2 q q 5 4 q • q → Pif P ⊆ {q ,q ,q } 8 0 0 1 2 • q → P if P∩{q ,q ,q } = ∅ 0,1/0 3 1 4 6 andq ∈ P 5 • q → PifP∩{q ,q ,q ,q } 6= 8 4 5 6 7 ∅ 1,1/0 • q → PifP∩{q ,q ,q ,q } 6= 9 4 5 6 7 q7 q6 1,0/0 ∅ andeither P∩{q ,q } = ∅ 4 5 or Pintersects{q ,q ,q } 1 4 6 Figure3: AutomatonforthefutureStavioperator case,c+ islabelledbyq ,andonceagainA outputs0. j 4 U 3.3 Automaton for the futureStaviconnective (U′) Let’srecallthat ϕU′ψholdsatpositioniifthereexistsagapc > isuchthat ϕholdsatevery < < positioni j c,thepropertyψholdsateverypositioninsomeintervalstartingat x,and ¬ϕholdsatpositionsarbitrarilyclosetoctotheright. The central point in this definition is the gap c, which corresponds to state q in the 3 automaton. States q , q and q follow the positions, before q , where the formula holds. 0 1 2 3 Statesq , q , q , q , q followthepositionswheretheformuladoesn’thold. Ifarunreaches 4 5 6 7 8 q , q or q , it has to leave this region through q , and all successor transitions until then 0 1 2 3 have inputlabel (1,0) or(1,1). ThestructureofthisautomatonisdepictedinFigure3. All statesexceptq and q are initial; q and q are final. Transitionsfrom q and q have input 3 9 8 9 1 7 label(1,1),transitionsfromq andq haveinputlabel(1,0),transitionsfromq haveinput 2 6 4 label (0,0),andtransitionsfrom q haveinputlabel(0,1). Theoutputis1fortransitionsto 5 q ,q andq ,and0fortransitionstoq ,q ,q ,q andq . 0 1 2 4 5 6 7 8 Wedefinealabellingρofthecutsofawordwon{0,1}2 usingthestatesoftheautoma- toninthefollowingway: • q hasnosuccessor, ϕU′ψistrue 0 • q hasanoutgoingtransitionlabelled(1,0), ϕU′ψistrue 1 • q hasanoutgoingtransitionlabelled(1,1), ϕU′ψistrue 2 • q isagap, ϕU′ψistruebeforeitandfalseafterwards 3 • q hasanoutgoingtransitionlabelled(0,0), ϕU′ψisfalse 4 • q hasanoutgoingtransitionlabelled(0,1), ϕU′ψisfalse 5 • q hasanoutgoingtransitionlabelled(1,0), ϕU′ψisfalse 6 • q hasanoutgoingtransitionlabelled(1,1), ϕU′ψisfalse 7 10 AUTOMATA AND TEMPORAL LOGIC OVER ARBITRARY LINEAR TIME • q has no successor, ϕ doesn’thold in theleft limit if it has nopredecessor,and ϕU′ψ 8 isfalse • q isagaporisthelastcut, ϕU′ψisfalse,and ϕistrueinsomeintervaltotheleft 9 LEMMA 7. ρ definestheuniquerunoftheautomatononitsinputword. Iftheinputis (vϕ(w),vψ(w))forsomewordw,thentheoutputofthisrunisvϕU′ψ(w). PROOF. Wefirstshowthatρ isarun. Successortransitionscorrespondalmostdirectlyto thedefinitionsofthelabellingρ,solet’slookatlimittransitions. Forleftlimits,thefollowing casesneedtobeconsidered: • ifatransition P → q istakenatacut c,theneither ϕistrueinthelimit, andso ϕU′ψ 0 istoo,and P ⊆ {q ,q ,q },orit’snot,andeitherq orq appearinthelimit 0 1 2 4 5 • thesamereasoningappliesforq andq 1 2 • ifcislabelledq thentheincomingtransitionhastocomefromasubsetof{q ,q ,q } 3 0 1 2 since ϕU′ψistrueinthelimit. • if a transition P → q is used, then ϕU′ψ is not true in the limit (otherwise it would 4 stillbetrue),andso P 6⊆ {q ,q ,q };thesameappliesforq ,q ,q ,q andq 0 1 2 5 6 7 8 9 • if c is a left limit and is labelled q then the incoming transition comes from a set P 8 intersecting{q ,q }because¬ϕisrepeated 4 5 • ifcislabelledq thenq andq can’tappearintheleftlimitset(ϕistrue) 9 4 5 Ifcisarightlimitcut,itcanonlybelabelledq ,q ,q orq . Herearethepossibleright-limit 0 3 8 9 transitions: • ifaright-limitcutcislabelledq ,thelimittransitionhastogotoasubsetof{q ,q ,q } 0 0 1 2 since ϕU′ψholdsinthelimit • if c is labelled with q , the limit transition to its right leads necessarily to a set P not 3 includingq ,q andq sinceψisalwaystrue,andincludingq because¬ϕisrepeated 1 4 6 5 • if c is labelled q or q , the right limit set can’t be a subset of {q ,q ,q } otherwise c 8 9 0 1 2 wouldhavebeenlabelledq 0 • ifcislabelledq wehavetheadditionalconditionthateither ϕholdsinthelimit(and 9 neitherq norq appears)orψdoesn’t(andoneofq ,q andq isinthelimit) 4 5 1 4 6 Thelabellingofcutsdefinedaboveisthusapathoftheautomaton,andweonlyneedto showthatit’s theonlyone,usingthesame methodas forthe A . Moreover,thedefinition U ofρmeansthattheoutputis1whenever ϕU′ψholds,and0atallotherpositions. 3.4 Construction of A ϕ Now that we have the basic blocks for our construction, we can build an automaton for any formula ϕ. If ϕ is an atomic proposition p, then we have seen how to build A in the p previous section. If ϕ = ¬ψ, then A = A ◦A . If ϕ = ψ ∨ψ , then A = A ◦(A × ϕ ¬ ψ 1 2 ϕ ∨ ψ1 A ). If ϕ = ψ Uψ ,thenA = A ◦(A ×A ). ThesamecanbedoneforU′ andforthe ψ2 1 2 ϕ U ψ1 ψ2 pastconnectives. Thenumberofstatesoftheresultingautomatonistheproductofthenumberofstates ofalltheelementaryautomata,andisthusexponentialinthesizeoftheformula. Theactual sizeoftheautomatonincludeslimit transitions,socanbedoublyexponentialin thesizeof theformula,ifthosetransitionsarerepresentedexplicitly.

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.