• Aucun résultat trouvé

Temporal Logic with Forgettable Past

N/A
N/A
Protected

Academic year: 2021

Partager "Temporal Logic with Forgettable Past"

Copied!
11
0
0

Texte intégral

(1)

HAL Id: hal-01194631

https://hal.archives-ouvertes.fr/hal-01194631

Submitted on 7 Sep 2015

HAL

is a multi-disciplinary open access archive for the deposit and dissemination of sci- entific research documents, whether they are pub- lished or not. The documents may come from teaching and research institutions in France or abroad, or from public or private research centers.

L’archive ouverte pluridisciplinaire

HAL, est

destinée au dépôt et à la diffusion de documents scientifiques de niveau recherche, publiés ou non, émanant des établissements d’enseignement et de recherche français ou étrangers, des laboratoires publics ou privés.

Temporal Logic with Forgettable Past

François Laroussinie, Nicolas Markey, Philippe Schnoebelen

To cite this version:

François Laroussinie, Nicolas Markey, Philippe Schnoebelen. Temporal Logic with Forgettable Past.

Proceedings of the 17th Annual IEEE Symposium on Logic in Computer Science (LICS’02), 2002,

Copenhagen, Denmark. pp.383-392, �10.1109/LICS.2002.1029846�. �hal-01194631�

(2)

Temporal Logic with Forgettable Past

François Laroussinie

1

, Nicolas Markey

1,2

, Philippe Schnoebelen

1

1 Laboratoire Spécification et Vérification, ENS de Cachan & CNRS UMR 8643, 61, avenue de Président Wilson, 94235 Cachan Cedex, France.

2 Laboratoire d’Informatique Fondamentale d’Orléans, Univ. Orléans & CNRS FRE 2490, rue Léonard de Vinci, BP 6759, 45067 Orléans Cedex 2, France.

E-mail: {fl,markey,phs}@lsv.ens-cachan.fr

Abstract

We investigateNLTL, a linear-time temporal logic with forgettable past. NLTL can be exponentially more suc- cinct thanLTL+ Past (which in turn can be more succinct thanLTL). We study satisfiability and model checking for NLTLand provide optimal automata-theoretic algorithms for theseEXPSPACE-complete problems.

1. Introduction

Temporal logic and verification. Temporal logic pro- vides a fundamental framework for formally specifying sys- tems and reasoning about them [4, 18]. Model checking techniques further allow the automatic verification that a finite-state model of a system satisfies a temporal logic specification [2, 1].

Temporal logic with past. Usually, specification and ver- ification is done with pure-future temporal logics, i.e. log- ics where the modalities only refer to the future of the cur- rent time. It is well-known that temporal logics combin- ing past and future modalities make some specifications easier to write and more natural [17]. However, allowing past-time makes verification algorithms harder to imple- ment (though not necessarily from a complexity-theoretic viewpoint). Additionally, all the main temporal logics with past-time admit translations to their pure-future frag- ment [11, 7, 6, 8, 23, 15, 25].

Forgettable past and theNmodality. Being able to refer to past moments is often useful, but there also exist situa- tions where it is convenient to forget the past. Consider for example, the following temporal formula

G(alarm⇒F1problem) (Spec1)

where “F1” means “at some past time”. (Spec1) states that

“whenever the alarm rings, then there has been some prob- lem in the past”, i.e. the alarm does not ring without due cause. If now the alarm has a reset button, and we want to state that (Spec1) holds after any reset, the formula

G reset⇒G(alarm⇒F1problem)

(Spec2) is not exactly what we aim at. With (Spec2), a problem that occurred before the reset may account for the alarm ringing, which is probably not what we had in mind.

For this kind of situations, Laroussinie and Schnoe- belen [15, 16] proposed to use a new modality, N (read

“Now”1, or “from now on”) that forgets all the past moments (see below for the formal semantics). WithN, one can state the intended property of the alarm example via e.g.

G reset⇒NG(alarm⇒F1problem)

(Spec3) Not much is known about N, except that the trans- lations of LTL+ Past and CTL+ Past into (resp.) LTL and CTL carry over to LTL+ Past + Now and CTL+ Past + Now [16].

Our contribution. In this paper, we investigateNLTL, i.e. LTL+ Past + Now, and give automata-theoretic de- cision procedures for model checking and satisfiability.

These algorithms run in EXPSPACE, which is optimal:

we show that both satisfiability and model checking are EXPSPACE-complete forNLTL. This came as a surprise since NLTL does not appear to be a big departure from PLTL, i.e. LTL+ Past, for which verification is (as for LTL)PSPACE-complete [21].

The increased complexity ofNLTL is partly explained by its expressive power: we prove thatNLTL can be ex- ponentially more succinct thanPLTL, and thatPLTLcan

1No connection with the Now of H. Kamp, Formal properties of ‘now’, Theoria, 227–263, 1971.

(3)

in turn be exponentially more succinct thanLTL. This last result is the first direct proof of a succinctness gap between PLTLandLTL2.

Finally we show how the model checking of a path can be done in polynomial time forNLTL formulae and is in factPTIME-complete (observe that the precise complexity of model checking a path is still an open-problem forLTL andPLTL[3]).

Related works. Past-time is more popular in linear-time settings but branching-time settings exist, e.g. [8, 15, 14, 16]. Automata-theoretic methods for temporal-logics were pioneered by Vardi and Wolper, and they were adapted for LTL+ Past and mu-calculus + Past in [17, 23, 12, 13] (these logics havePSPACE-complete verification problems). N can be encoded in richer formalisms, e.g.QPLTL(PLTL with arbitrary quantification over propositional variables) but QPLTLand QLTLhave non-elementary verification problems [22]. “Chop” is another modality where part of the computation can be forgotten: here too verification be- comes non-elementary [10, 20].

Plan of the paper. We provide the necessary definitions in § 2, study succinctness issues in § 3, and provide automata-theoretic decision procedures forNLTL in § 4.

Model checking a path is investigated in § 5.

2. Temporal logic with past

We first definePLTLand only introduceNlater.

Syntax ofPLTL. LetAP ={p1, p2, . . .}be a countable set of atomic propositions.PLTLformulae are given by:

φ, ψ::=ψ∧φ| ¬φ|Xφ|ψUφ|X1φ|ψSφ|p1|p2|...

where U reads “until”, S reads “since”, X is “next” and X1“previous”. Standard abbreviations include:>,ψ∨φ, ψ ⇒ φ, ψ ⇔ φ, ... Moreover we let Fφ def= >Uφ (“φwill eventually be true”), Gφ def= ¬F¬φ(“φis always true in the future”) and, symmetrically, F1φdef= >Sφand G1φdef=¬F1¬φ. The size|φ|of a formula is its length in symbols.

S,X1,F1andG1are the past modalities, whileU,X, FandGare the future modalities. The classical logicLTL is the pure-future fragment ofPLTL.

2Regarding upper bounds, the direct translations in [6] is non- elementary. An elementary upper bound can be obtained from the ele- mentary translations of counter-free Büchi automata intoLTLformulae (see [27]). Regarding lower bounds, the non-existence of succinct transla- tions has been conjectured (e.g. [13]) but not yet proved.

Semantics of PLTL. A (linear-time) structure (also, a path) is a pair(π, ξ)of anω-sequenceπ =π(0), π(1), . . . of positions, with a mappingξ :{π(0), π(1), . . .} →2AP labeling each positionπ(i)with the propositions that hold locally. We often simply write πfor a structure when the labeling can be inferred from the context. Let(π, ξ)be a structure,ia nonnegative integer, andφaPLTLformula.

We inductively define the relationπ, i |=φ, read “φholds at positioniinπ”, by:

π, i|=p iff p∈ξ(π(i)),

π, i|=φ∧ψ iff π, i|=φandπ, i|=ψ, π, i|=¬φ iff π, i6|=φ,

π, i|=Xφ iff π, i+ 1|=φ,

π, i|=ψUφ iff π, j |= φ for some j ≥ i s.t. π, k|=ψfor alli≤k < j, π, i|=X1φ iff i >0andπ, i−1|=φ,

π, i|=ψSφ iff π, j |= φ for some 0 ≤ j ≤ i s.t. π, k|=ψfor allj < k≤i.

We writeφ≡ψwhenφandψare equivalent, i.e. when for allπandi, we haveπ, i|=φiffπ, i|=ψ. A less dis- criminating equivalence is initial equivalence, denotedi, and defined by:φ≡i ψiff for allπ,π,0|=φiffπ,0|=ψ.

“Global” equivalence (≡) is the natural notion of equiva- lence, and it is substitutive. Initial equivalence is less well- behaved and, e.g., it is not substitutive under past-time con- texts. Using≡i is meaningful when we compare two tem- poral specifications of some system, since these specifica- tions have to hold at the initial positions. Observe that Gabbay’s theorem, stating that “anyPLTLformula can be translated into an equivalent LTL formula”, refers to ini- tial equivalence: saying thataUbandF(b∧G1(a∨b))are equivalent is only correct with initial equivalence in mind.

Verification problems. Satisfiability is the first verifica- tion problem we consider. The problem is “given a formula φ, is there some πandis.t.π, i |= φ?” A variant prob- lem asks whetherφis initially satisfiable, that is, satisfiable in the initial position of some structure. Clearly, the two problems are inter-reducible: φis satisfiable iffFφis ini- tially satisfiable andφis initially satisfiable iffφ∧ ¬X1>

is satisfiable.

Model checking is our second verification problem. Here we consider a Kripke structure3Kand a formulaφand asks whetherK |= φ, that is whether π,0 |= φfor all infinite pathsπinK that start from an initial node (a path inKis naturally interpreted as a linear-time structure).

It is well known that both model checking and satisfia- bility arePSPACE-complete forLTLandPLTL[21].

3i.e. a structurehQ,→, Q0, liwhereQis a set of nodes,→⊆Q×Q is a total transition relation,Q0Qis a set of initial nodes andl:Q 2APa labeling of the nodes.

(4)

The Nmodality. The semantics ofPLTL assumes that past is cumulative, i.e., when time progresses, history grows ever larger. As a consequence, the entire history is always used for evaluating formulae with past modalities.

TheNmodality was introduced for situations where at some point one wants to forget the past, and start anew [15, 16]. Such a situation can be, e.g., the alarm+reset example seen in the Introduction.

Formally, we defineNLTL, orPLTL+Now, by extend- ing the syntax ofPLTLwith the unary modalityNand by extending the semantics with the following clause:

π, i|=Nφ iff πi,0|=φ

where πi is the i-th suffix ofπstarting fromπ(i). Then, all the notions that are meaningful forPLTL(satisfiability, global and initial equivalences, . . . ) apply equally toNLTL.

The following useful equivalences hold for any NLTL formulae:

N(φ∧ψ)≡Nφ∧Nψ N¬φ ≡ ¬Nφ NX1φ ≡ ⊥ N(φSψ)≡Nψ

Nφ≡φifφis pure-future

(N-Laws)

Also,Nallows defining initial equivalence in term of global equivalence:φ≡iψiffNφ≡Nψ.

3. Succinctness of temporal logics with past

Gabbay’s (and Kamp’s) theorem implies thatPLTLand LTLhave the same expressive power [11, 7, 6]. Gabbay’s proof associates with any PLTL formula ψ a (globally) equivalent but separatedψ0 (i.e.ψ0 is a Boolean combina- tion of pure-past and pure-future formulae). With this sep- aration theorem, it is easy to prove thatNLTLalso can be translated toLTL(modulo initial equivalence): one just ap- plies theN-Laws on the separated formulae (see [15]).

In this section we show these three “equally expressive”

logics can be distinguished in terms of succinctness. These results provide a formal justification of the claim that the addition of past-time modalities make some specifications easier to write. That there can exist a succinctness gap be- tweenPLTL andLTLhas been conjectured by many re- searchers in the field, but Theorem 3.1 provides, as far as we know, the first proof.

Theorem 3.1. PLTL can be exponentially more succinct thanLTL.

Proof. Assume {p0, p1, . . . , pn} are atomic propositions and letψnbe the followingPLTLformula:

G ^n

i=1

(pi⇔F1(¬X1> ∧pi))

p0⇔F1(¬X1> ∧p0) (ψn)

ψnuses¬X1>to characterize the initial position of a path π, so thatπ|=ψniff all positions inπthat agree with the initial position π(0)on p1, . . . , pn also agree onp0. Let ϕn be an LTLformula s.t.ψni ϕn (it is easy to come up with such a ϕn, e.g. by considering all possible valu- ations for p0, p1, . . . , pn). Since ϕn is pure-future, Gϕn

states that “any two future positions that agree onp1, . . . , pn

also agree on p0”. But this latter property can only be expressed byPLTL (or LTL) formulae of size Ω(2n)[5, Theorem 2] 4. Hence |ϕn| is in Ω(2n) while |ψn| is in O(n).

Remark 3.2. The statement of Theorem 3.1 (and 3.3) can be sharpened:

1. Observe that the succinctness gap already occurs with temporal formulae from theL(F,F1,X1)fragment, and having a fixed temporal depth. We could adapt the proof and further restrict toL(F,F1).

2. The proof thatn|is in Ω(2n) even shows that ϕn

hasΩ(2n)distinct subformulae, so thatϕncannot suc- cinctly be represented as a dag (sharing common sub- formulae).

3. ψnusesn+ 1distinct propositions but, using standard encoding techniques (see e.g. [3]), one shows the suc- cinctness gap occurs even for formulae with a single proposition (at the cost of the fixed temporal depth).

AddingNfurther allows more conciseness:

Theorem 3.3. NLTL can be exponentially more succinct thanPLTL.

Proof. Let ψ0n be the NLTL formula given by ψ0n def= GNψn. ψn0 too states that “any two future positions that agree on p1, . . . , pn also agree onp0”, so that it only has PLTLequivalents of sizeΩ(2n).

Observe that a single occurence ofNis sufficient for the succinctness gap.

4. An automata-theoretic approach to NLTL verification

In this section we address satisfiability and model check- ing problems forNLTL. We start by an algorithm for satis- fiability. This algorithm associates with anNLTLformula φan alternating Büchi automatonAφthat accepts the mod- els ofφ. ThenAφcan also be used for model checking.

The literature contains many algorithms that build au- tomata recognizing the models of temporal formulae. For

4A Büchi automaton forGϕnmust record all valuations that it sees and then requiresΩ(22n)states. SincePLTLformulae can be translated to Büchi automata with a single exponential blowup, the claim follows.

(5)

linear-time logics, one can distinguish between two differ- ent kinds of constructions. First there are methods based on classical (non-deterministic) Büchi automata whose size is exponential in the size of the formula (e.g. [26, 17]). Sec- ondly, for pure future logics asLTL, there exist approaches based on alternating Büchi automata of only polynomial size [24]. All these methods offer (optimal) algorithms run- ning inPSPACEsince non-emptiness of a Büchi automa- ton can be decided in logarithmic space, while it requires polynomial space for alternating Büchi automata.

Our method produces an alternating Büchi automaton of exponential size. Then our algorithms for satisfiability and model checking run inEXPSPACE. We show in § 4.2 that these algorithms are optimal: satisfiability and model- checking areEXPSPACE-complete forNLTL.

4.1. Alternating Büchi automata forNLTLformulae Alternating automata. An alternating automaton with a generalized Büchi acceptance condition is a tuple A = hΣ, S, ρ, S0,Fiwhere Σis a finite alphabet, S is a finite set of states,ρ : S×Σ→ B+(S)is a transition function (B+(S)is the set of positive Boolean combinations overS and also contains⊥) whose semantics is described below, S0⊆Sis the set of initial states andF={F1, . . .}is a set of sets of accepting states (Fi⊆Sfor anyi).

A run R of A over an infinite word w ∈ Σω is an infi- nite S-labeled tree (vizR = (τ, r)where τ is a tree and r : N odes(τ)→ S assigns an element ofS to each node of τ). We further require that the root ε of τ is labeled with some initial state and thatRrespects the transition re- lation: that is, for any nodexwith childrenx1, . . . , xk, ifx has depthithen{r(x1), . . . , r(xk)} |= ρ(r(x), wi). Here the formulaθ = ρ(r(x), wi)describes admissible sets of states in the obvious way. A run is accepting if, along ev- ery branch, the set of states that are visited infinitely often intersects everyFinon-vacuously.

W.l.o.g. the branching degree of accepting runs can be bounded: if the transition relation only contains Boolean formulaeθof the formW

j

Vk

i=1sj,i, then an accepting run with branching degree> kcan be pruned to degreekand remain accepting.

Construction ofAϕ. Letϕbe anNLTLformula. We de- fineCL(ϕ), the closure ofϕ, as the smallest set of formulae containing>,X1>, all subformulae ofϕ,X(ψ12)for any subformulaψ12 ofϕ,X112)for any subfor- mulaψ12 ofϕ, and the negations of all these formulae (we identify¬¬ψwithψ). Classically, an atomAofϕis a locally coherent subset ofCL(ϕ)[17]. ForNLTLthe co- herency conditions are:

• > ∈A,

• ifψ∈CL(ϕ)thenψ∈Aiff¬ψ6∈A,

• ifψ1∧ψ2∈CL(ϕ)thenψ1∧ψ2∈Aiffψ1∈Aand ψ2∈A,

• ifψ1∨ψ2∈CL(ϕ)thenψ1∨ψ2∈Aiffψ1∈Aor ψ2∈A,

• ifψ12 ∈ CL(ϕ)thenψ12 ∈ A iffψ2 ∈ Aor ψ1,X(ψ12)∈A,

• ifψ12 ∈ CL(ϕ)thenψ12 ∈ Aiffψ2 ∈ Aor ψ1,X112)∈A,

• ifX1ψ∈CL(ϕ)thenX1ψ∈AimpliesX1> ∈A,

• if Nψ ∈ CL(ϕ)and¬X1> ∈ A thenNψ ∈ A iff ψ∈A.

The set of atoms of ϕ is denoted Atom(ϕ). Since

|CL(ϕ)| ≤ 4|ϕ|, there are at most 24|ϕ| atoms. We say that an atom is initial if it contains¬X1>; the set of initial atoms is denotedInitAtom(ϕ).

Before formally defining Aϕ, we explain the intuition behind its workings: assume that after reading theifirst po- sitions of some pathπ,Aϕis in a state labeled byA. This means that allψ ∈ Ahold atπ, i(and only these sinceA is coherent). The past-formulae in Ahave been observed to hold byAϕ, the future-formulae have been guessed and will have to be checked later, the mixed past+future formu- lae combine observations and guesses. WhenAϕ moves from π(i) toπ(i+ 1), it updatesA while respecting the valuation forπ(i)and forks an alternative branch where the observation of past-formulae restarts with an empty history.

The “update” branch goes on classically while the forked branch proceeds as if readingπi with no past and verifies allNproperties contained inA.

Definition 4.1. Aϕ=hΣ, S, ρ, S0,Fiis given by:

• Σ = 2AP,

• S= Atom(ϕ),

• S0={A∈InitAtom(ϕ)|ϕ∈A},

• ρ(A, σ) = _

A0∈Succ(A,σ)

A0∧ _

A00∈Now(A0)

A00 with:

- Now(A0) def= {A00∈InitAtom(ϕ)| ∀Nψ∈CL(ϕ), Nψ∈A0⇔Nψ∈A00},

- forAandσs.t. for allp∈AP,p∈Aiffp∈σ:

Succ(A, σ)def={A0∈Atom(ϕ)|X1> ∈A0and

∀Xψ∈CL(ϕ), Xψ∈A⇔ψ∈A0and

∀X1ψ∈CL(ϕ), ψ∈A⇔X1ψ∈A0}, otherwise,Succ(A, σ) def= ⊥,

(6)

if there is no formulaϕof the formψUψ0inCL(ϕ),F is{Atom(ϕ)}. Otherwise, let{ϕ11, . . . , ϕkk} be the set of all U-formulae inCL(ϕ). Then F = {F1, . . . , Fk}with:Fi def= {A∈Atom(ϕ)| ¬X1> ∈ A or ψi∈A or ¬(ϕii)∈A}.

Observe that the structure ofρallows us to restrict our at- tention to binary runs ofAϕ(where every node has exactly two successors) s.t. one and only one child of each node is labeled with an initial atom. In the following we identify an accepting binary run(τ, r)with its labeling functionr.

We can now state and prove the correctness of our construction by formalizing the intuitions we gave before Def. 4.1. Given an accepting runr, we define the level of nodexinr(writtenlr(x)) as the depth of the closest ances- toryofxthat carries an initial atom (such an ancestor must exist sinceεcarries an initial atom). Clearlylr(x) ≤ |x|.

We have:

Lemma 4.2. Letϕbe anNLTL formula,ψa formula in CL(ϕ), andwa word inΣω. If there exists an accepting binary runrofAϕoverw, then for any nodexwith|x|=i, lr(x) =i0andr(x) =A,ψ∈Aiffwi0, i−i0|=ψ.

Proof. By induction over ψ (full details can be found in Appendix A).

Proposition 4.3. Letϕbe anNLTLformula, thenϕis ini- tially satisfiable iff there exists an accepting run inAϕ. Proof. (⇐)Direct from Lemma 4.2.

(⇒)See Appendix B.

The corollary is that Aϕ recognizes exactly the set of words overΣfor whichϕis initially true.

Satisfiability checking. A formulaϕis satisfiable if and only ifFϕis initially satisfiable, and this can be checked by looking for accepting runs inAFϕ, then we have:

Theorem 4.4. Satisfiability forNLTLformulae can be de- cided inEXPSPACE.

Proof. The size of AFϕ is exponential in ϕ and non- emptiness of alternating Büchi automaton can be solved in space polynomial in the size of the automaton [19].

Model checking. With Aϕ available, deciding whether K |= ϕcan be reduced to a language inclusion question, i.e. checking whetherL(AK)⊆L(Aϕ). HereAK is sim- ple K seen as a Büchi automaton (a classical automaton with trivial acceptance condition). Thus one has:

Theorem 4.5. Model checking Kripke structures forNLTL formulae can be decided inEXPSPACE.

As a corollary, we get that model checking for CTL +Past+Now is inEXPSPACEtoo.

Remark 4.6. The program complexity of model checking NLTL formulae is NLOGSPACE-complete, as for LTL (it suffices to translate theNLTLformula into an initially equivalentLTLformula).

The specification complexity is clearly EXPSPACE- complete (the proof of EXPSPACE-hardness of model checking could use a fixed Kripke structure).

4.2. EXPSPACE-hardness

The decision procedures forNLTLwe just saw are opti- mal in the following sense:

Proposition 4.7. Satisfiability and model checking for NLTLareEXPSPACE-hard.

Proof. By reduction from a domino-tiling problem for grids with exponential size. LetC = {c1, . . . , ck} be a set of colors. A domino-type is a4-tuplehddown, dleft, dup, drighti of colors. Given a setT ⊆ C4 of domino-types, and two integers mandn, “tiling the m×n-grid withT” means finding a mappingf: [0, m−1]×[0, n−1]→T s.t. for alli, j

f(i, j)right = f(i+ 1, j)left ifi < m−1, f(i, j)up = f(i, j+ 1)down ifj < n−1.

The problem of deciding, given a setT of domino-types, a natural numberm(written in unary), and two domino-types dinit, dfinal ∈ T, whether there exists a naturalns.t.the 2m×n-grid can be tiled, with the additional conditions that f(0,0) = dinit andf(2m−1, n−1) = dfinal, is EXPSPACE-complete [9].

Let I = (C, T, m, dinit, dfinal) be such an in- stance. We build a Kripke structure KI as follows:

{b+1, . . . , b+m, b1, . . . , bm}are2matomic propositions, that we will use to encode the value of a m-bits counter num- bering the cells of one line of the grid. Each domino-type d ∈ T is also an atomic proposition. KI is depicted on figure 1.

TraversingKI from left-to-right picks values±for the bits b1, . . . , bm and a domino-type: this encodes the ab- scissa 0 ≤ i ≤ 2m−1 of a cell (i, j)and its coloring (nb: b1 is the least significant bit). A tiling of the grid is encoded by a path inKI, listing cells from left to right and from bottom to top, with an exit to E when nlines have been listed. Observe that, when cell(i, j)is listed, onlyiis given explicitly.

We now write anNLTLformula stating that a path inKI

does indeed encode a tiling. This combines several subfor- mulae, whereb±i is an abbreviation forb+i ∨bi :

(7)

b+1 b1

b+2 b2

. . . . . .

b+m bm

d1

d2

... dp

E

Figure 1. The Kripke structure associated with a tiling problem

(1) the path starts with adinitnumbered0, and ends with a dfinalnumbered2m−1:

m

^

i=1

Xi−1bi ∧Xmdinit

∧ F^m

i=1

Xi−1b+i ∧Xmdfinal∧Xm+1E

(2) the cells are listed in increasing order modulo2m, i.e.b1

changes with each new cell, whilebi+1only changes ifbi

switched fromb+i tobi :

G

b±1 ∧ ¬Xm+1E

⇒ (b+1 ⇔Xm+1b1)∧

m−1

^

i=1

(Xib+i+1⇔Xm+i+1bi+1)

⇔(Xi−1b+i ∧Xm+ibi )

(3) two adjacent cells (except at end of line) have the same color on the shared edge:

^

d∈T

G

d⇒ _

d0∈T d0left=dright

Xm+1d0 ∨ XE ∨

m

^

i=1

Xibi

(4) two neighbor cells(i, j)and(i, j+ 1)in a column have the same color on the shared edge. This is where we use past-time modalities andN. We first define the following abbreviation:

φup := b±1

m

^

i=1

(Xi−1b+i ⇔F1(¬X1> ∧Xi−1b+i ))

φupis inspired by theψnformula from § 3:φupstates that the value of the bitsb1, . . . , bmcoincide with the value they had at the beginning of the path (assuming we are at some b±1 and the path also starts at someb±1). Now, usingNto forget everything before cell(i, j), we can use¬φupup

to find the next cell with samei, i.e. cell(i, j+ 1):

G b±1

NXm^

d∈T

d⇒ ¬φupU(E ∨ φup∧ _

d0∈T d0down=dup

Xmd0)

Finally,KIcontains a path satisfying theNLTLformula iff I has a solution to our tiling problem, hence model check- ingNLTLformulas isEXPSPACE-hard.

Satisfiability forNLTLis alsoEXPSPACE-hard since we can reduce model checking to satisfiability by encoding the Kripke structureKin a temporal formula.

Note thatEXPSPACE-hardness already occurs with a single occurrence ofNunder the scope of oneG. With stan- dard encoding techniques, we could prove EXPSPACE- hardness for the fragment withoutX,X1, or for a fragment with a fixed number of atomic propositions.

5. Model checking a path

That model checking NLTL formulae is EXPSPACE- complete may look daunting at first sight, especially when PLTLis only PSPACE-complete. But there exist situations where NLTL can be handled efficiently. Below we show that model checkingNLTLformulae on linear Kripke struc- tures (i.e., structures where nodes have only one successor), can be done in polynomial-time. This result is interesting because the polynomial-time algorithm is not trivial, and it can be used e.g. for on-the-fly model checking.

But these questions also have a theoretical interest.

Model checking linear structures is called “model checking a path” in [3]. We prove the problem is PTIME-complete forNLTLwhile the precise complexity of model checking a path forLTLandPLTLare still not known5.

Theorem 5.1. Model checking anNLTL-formulaφalong an ultimately-periodic path can be done in polynomial-time.

Note that the pathπLassociated with a finite and linear Kripke structure Lis ultimately-periodic. In the sequel, a loop of type(m, p)is a linear Kripke structure where the initial part of πL has lengthm and the periodic part has lengthp. The proof of Theorem 5.1 relies on the following lemma.

Lemma 5.2. For any loopLof type(m, p), for anyNLTL formula φwith at most h(φ)nested past-time modalities, and anyk≥m+p·h(φ),πL, k|=φiffπL, k+p|=φ.

5In particular, it is not known whether model checking a path againstLTLformulae can be done inNLOGSPACEor isPTIME- complete [3].

(8)

Proof. By induction on the structure of φ. We only con- sider the cases where φhasN or a past-time modality at its root. The other cases, Boolean operators or pure-future modalities, are easy.

• Assumeφis someX1φ1. Thenh(φ) = h(φ1) + 1, andk ≥m+p.h(φ)impliesk−1≥ m+p.h(φ1).

NowπL, k |=φiffπL, k−1 |= φ1iff (by ind. hyp.) πL, k−1 +p|=φ1iffπL, k+p|=φ.

• Assume φ is some φ12 so that h(φ) = max(h(φ1), h(φ2)) + 1. We first prove the(⇒)direc- tion: assumeπL, k|=φ, then there exists somek0 ≤k s.t.πL, k0 |=φ2, and fork0 < l ≤k,πL, l |=φ1. If k0 ≥ k−p, then by ind. hyp. πL, k0 +p |= φ2 and πL, l+p|=φ1fork0< l≤k, so thatπL, k+p|=φ.

If k0 < k−pthen by ind. hyp.πL, l |= φ1 for all l=k, . . . , k+pso that againπL, k+p|=φ.

For the(⇐)direction assumeπL, k+p|=φ, so that there exists somek0 ≤k+pwithπL, k0 |= φ2, and fork0 < l≤k+p,πL, l|=φ1. Ifk0 ≤kone directly obtainsπL, k |=φ. Otherwisek0> kand by ind. hyp.

πL, k0−p|=φ2andπL, l−p|=φ1fork0 < l≤k+p.

AgainπL, k|=φ.

• Assumeφis someNφ1. HereπL, k|=φiffπLk |=φ1, andπL, k+p |=φiffπLk+p |= φ1. But sinceLhas type(m, p), the suffixesπLk andπLk+pare isomorphic.

HenceπL, k|=φiffπL, k+p|=φ.

Proof of Theorem 5.1. Given a loopLof type(m, p), and an NLTL formula φof past-height h, Lemma 5.2 allows reducing any question “doesπlL, k |= ψ?” (wherel, k ∈ N and ψ is a subformula of φ) to an equivalent “does πlL0, k0 |= ψ?” where this time 0 ≤ l0 < m+p and 0 ≤ k0 < m+ (h+ 1)p. All these questions are solved once and for all by filling a Boolean array V[l0, k0, ψ] in such a way thatV[l0, k0, ψ] =>iffπLl0, k0 |=ψ. FillingV is done through dynamic programming techniques, starting with the smallest subformulaeψ. For ψof the formNψ0, we fillV[l0, k0, ψ]with the (previously computed) value of V[l00,0, ψ0], where l00 is l0 +k0 if l0 +k0 < m+p, or l0 +k0 brought back to the interval [0, m+p) by sub- tractingpenough times. Dealing with the other cases re- quires something similar to the CTL model checking al- gorithm, e.g.V[l0, k0,X1ψ] receives true iff k0 > 0 and V[l0, k0−1, ψ] =>. Eventually, the algorithm finishes in timeO(h(φ)× |φ| × |L|), which isO(|φ|2× |L|).

It turns out polynomial-time is also a lower bound for this problem.

Proposition 5.3. Model checkingNLTLalong one path is PTIME-hard.

Proof. By reduction from CIRCUIT-VALUE, where it is well known that only considering synchronous, alternat- ing and monotone circuits is no loss of generality. We illustrate the reduction on an example. Consider the cir- cuit Cfrom Fig. 2 and write EC for the set of edges link- ing one gate to one of its inputs (in our example, EC = {(n1, n2),(n1, n3), . . . ,(n12, n14)}). We denotevC(n)the (Boolean) value obtained by evaluating nodenin the obvi- ous way.

n10∨ ∨n11 ∨n12

n5

∧ n6

∧ n7

∧ ∧n8 n9

∧ n2

∨ n3

∨ n4

∨ n1

n13 0 1 n14

level 0:

level 1:

level 2:

level 3:

level 4:

Figure 2. An instance ofCIRCUIT-VALUE. WithC, we associate a loopLClisting all nodes in some height-respecting order, as illustrated in the following pic- ture where node names are also used as propositions.

n1

LC: n2 n3 · · · n13 n14

Letφnextbe defined as follows:

φnext := _

(n,n0)∈EC

(n0∧F1(n∧ ¬X1>)).

ThenLiC, k|=φnextiff(ni, ni+k)∈EC. We now construct the following formulae, fork >0:

φ0 := n14

φ2k+1 := NF φnext∧φ2k φ2k+2 := NG φnext⇒φ2k+1

An easy induction on p shows that, for every node ni at some levelpin C, vC(ni) = >iffLC, ni |= φp. Thus, v(C) =vC(n1) =>iffLC|=φ4. Note that the reduction is clearly logspace, with aNLTLformula of sizeO(|C|2).

6. Conclusions

We investigated NLTL, the linear-time temporal logic with past augmented with N, a new modality that allows forgetting the past.

(9)

Some specifications are easier and more natural inNLTL than inPLTL (i.e.,LTL+Past). That NLTL offers more expressive power can be stated formally as a succinctness gap betweenNLTL andPLTL. An interesting byproduct of this study is a direct proof of the suspected succinctness gap betweenLTL+Past andLTL.

With any NLTL formula ϕ, we associate an alternat- ing Büchi automaton Aϕ that accepts the models of ϕ.

This provides automata-theoretic decision methods for sat- isfiability and model checking of NLTL formulae. Aϕ

has exponential size, so that the decision methods are in EXPSPACE, but we show the problems are EXPSPACE- complete so that our decision methods are optimal.

References

[1] B. Bérard, M. Bidoit, A. Finkel, F. Laroussinie, A. Petit, L. Petrucci, and Ph. Schnoebelen. Systems and Software Ver- ification. Model-Checking Techniques and Tools. Springer, 2001.

[2] E. M. Clarke, O. Grumberg, and D. A. Peled. Model Check- ing. MIT Press, 1999.

[3] S. Demri and Ph. Schnoebelen. The complexity of proposi- tional linear temporal logics in simple cases. Information and Computation, 2002. To appear. Available athttp:

//www.lsv.ens-cachan.fr/Publis/.

[4] E. A. Emerson. Temporal and modal logic. In J. v. Leeuwen, editor, Handbook of Theoretical Computer Science, vol- ume B, chapter 16, pages 995–1072. Elsevier Science, 1990.

[5] K. Etessami, M. Y. Vardi, and T. Wilke. First order logic with two variables and unary temporal logic. In Proc. 12th IEEE Symp. Logic in Computer Science (LICS ’97), Warsaw, Poland, June–July 1997, pages 228–235. IEEE Comp. Soc.

Press, 1997.

[6] D. M. Gabbay. The declarative past and imperative future:

Executable temporal logic for interactive systems. In Proc.

Workshop Temporal Logic in Specification, Altrincham, UK, Apr. 1987, volume 398 of Lecture Notes in Computer Sci- ence, pages 409–448. Springer, 1989.

[7] D. M. Gabbay, A. Pnueli, S. Shelah, and J. Stavi. On the temporal analysis of fairness. In Proc. 7th ACM Symp. Prin- ciples of Programming Languages (POPL ’80), Las Vegas, NV, USA, Jan. 1980, pages 163–173, 1980.

[8] T. Hafer and W. Thomas. Computation tree logic CTL and path quantifiers in the monadic theory of the binary tree. In Proc. 14th Int. Coll. Automata, Languages, and Pro- gramming (ICALP ’87), Karlsruhe, FRG, July 1987, volume 267 of Lecture Notes in Computer Science, pages 269–279.

Springer, 1987.

[9] D. Harel. Algorithmics: The Spirit of Computing. Addison- Wesley, 2nd edition, 1992.

[10] D. Harel and D. Peleg. Process logic with regular formulas.

Theoretical Computer Science, 38:307–322, 1985.

[11] J. A. W. Kamp. Tense Logic and the Theory of Linear Order.

PhD thesis, UCLA, Los Angeles, CA, USA, 1968.

[12] Y. Kesten, Z. Manna, H. McGuire, and A. Pnueli. A decision algorithm for full propositional temporal logic. In Proc. 5th Int. Conf. Computer Aided Verification (CAV ’93), Elounda, Greece, June 1993, volume 697 of Lecture Notes in Com- puter Science, pages 97–109. Springer, 1993.

[13] O. Kupferman, N. Piterman, and M. Y. Vardi. Extended tem- poral logic revisited. In Proc. 12th Int. Conf. Concurrency Theory (CONCUR 2001), Aalborg, Denmark, Aug. 2001, volume 2154 of Lecture Notes in Computer Science, pages 519–535. Springer, 2001.

[14] O. Kupferman and A. Pnueli. Once and for all. In Proc.

10th IEEE Symp. Logic in Computer Science (LICS ’95), San Diego, CA, USA, June 1995, pages 25–35. IEEE Comp.

Soc. Press, 1995.

[15] F. Laroussinie and Ph. Schnoebelen. A hierarchy of tem- poral logics with past. Theoretical Computer Science, 148(2):303–324, 1995.

[16] F. Laroussinie and Ph. Schnoebelen. Specification in CTL+Past for verification in CTL. Information and Com- putation, 156(1/2):236–263, 2000.

[17] O. Lichtenstein, A. Pnueli, and L. D. Zuck. The glory of the past. In Proc. Logics of Programs Workshop, Brooklyn College, NY, USA, June 1985, volume 193 of Lecture Notes in Computer Science, pages 196–218. Springer, 1985.

[18] Z. Manna and A. Pnueli. The Temporal Logic of Reactive and Concurrent Systems: Specification. Springer, 1992.

[19] S. Miyano and T. Hayashi. Alternating finite automata on omega-words. Theoretical Computer Science, 32(3):321–

330, 1984.

[20] R. Rosner and A. Pnueli. A choppy logic. In Proc. 1st IEEE Symp. Logic in Computer Science (LICS ’86), Cam- bridge, MA, USA, June 1986, pages 306–313. IEEE Comp.

Soc. Press, 1986.

[21] A. P. Sistla and E. M. Clarke. The complexity of proposi- tional linear temporal logics. J. ACM, 32(3):733–749, 1985.

[22] A. P. Sistla, M. Y. Vardi, and P. Wolper. The complementa- tion problem for Büchi automata with applications to tempo- ral logic. Theoretical Computer Science, 49(2–3):217–237, 1987.

[23] M. Y. Vardi. A temporal fixpoint calculus. In Proc. 15th ACM Symp. Principles of Programming Languages (POPL

’88), San Diego, CA, USA, Jan. 1988, pages 250–259, 1988.

[24] M. Y. Vardi. Alternating automata and program verification.

In Computer Science Today. Recent Trends and Develop- ments, volume 1000 of Lecture Notes in Computer Science, pages 471–485. Springer, 1995.

[25] M. Y. Vardi. Reasoning about the past with two-way au- tomata. In Proc. 25th Int. Coll. Automata, Languages, and Programming (ICALP ’98), Aalborg, Denmark, July 1998, volume 1443 of Lecture Notes in Computer Science, pages 628–641. Springer, 1998.

[26] M. Y. Vardi and P. Wolper. An automata-theoretic approach to automatic program verification. In Proc. 1st IEEE Symp.

Logic in Computer Science (LICS ’86), Cambridge, MA, USA, June 1986, pages 332–344. IEEE Comp. Soc. Press, 1986.

[27] T. Wilke. Classifying discrete temporal properties. In Proc.

16th Ann. Symp. Theoretical Aspects of Computer Science (STACS ’99), Trier, Germany, Mar. 1999, volume 1563 of

(10)

Lecture Notes in Computer Science, pages 32–46. Springer, 1999.

Technical appendix

A. Proof of Lemma 4.2

First note that for anyi ≥i0, there exists some nodex in any binary accepting runrwith|x|=iandlr(x) = i0. We prove the following result:

∀x∈r, |x|=iandlr(x) =i0impliesψ∈r(x) (1)

⇔ ∃x∈rs.t.|x|=iandlr(x) =i0andψ∈r(x) (2)

⇔ wi0, i−i0|=ψ (3)

Clearly the remark above implies that(1)⇒(2). The proof that(2)⇒(3)and(3)⇒(1)is done by induction overψ:

• ψ = p ∈ AP: ifris accepting, thenxhas two suc- cessors satisfyingρ(x, wi)and thenr(x)andwiagree overAP.

• ψ =ψ1∧ψ2: Ifψ ∈ r(x), thenψ1, ψ2 ∈r(x)(be- causer(x)is an atom), and then by i.h.wi0, i−i0|= ψjforj= 1,2, and thenwi0, i−i0|=ψ1∧ψ2. Then (2)⇒(3). Now supposewi0, i−i0|=ψ1∧ψ2, then wi0, i−i0|=ψj forj = 1,2, and by i.h. the labeling of any nodexat depthiwithlr(x) = i0containsψj

and then it containsψ1∧ψ2.

• ψ =¬ψ1: Ifψ ∈r(x), thenψ1 6∈r(x)and then (by i.h.)wi0, i−i06|=ψ1. The converse is similar.

• ψ =Xψ1: ((2) ⇒(3))Letx1 andx2be the succes- sors ofxinroverw. Given the definition ofρ(x, σ), one and only onexi is labeled by an initial atom. As- sumer(x2)is initial. Thenx1belongs toSucc(x, wi), and thenψ1∈r(x1)which entails by i.h. ((2)⇒(3)) thatwi0, i−i0+ 1 |= ψ1(x1is not initial and is at depthi+ 1) and thenwi0, i−i0|=Xψ1.

((3) ⇒ (1))is similar: Assumewi0, i−i0 |= Xψ1, thenwi0, i−i0+ 1|=ψ1. By i.h. any nodex0of depth i+1withlr(x0) =i0satifiesψ1∈r(x0). Given a node xat depthiwithlr(x) =i0,xhas two successors inr, one of them is not initial, belongs toSucc(x0, wi), is at depthi+ 1and has a level equal toi0, and then it is la- beled by an atom containingψ1, and thenr(x)3Xψ1

(by definition ofSucc) and we have(3)⇒(1).

• ψ = ψ12: ((2) ⇒ (3))Assumeψ ∈ r(x). Con- sider the infinite branchb from xwhich never visits initial atoms (except possiblyx), such a branch exists due to the definition ofρ(at each step one successor is labeled by an non-initial atom). This branch has to

visit infinitely many atoms satisfyingψ2or¬(ψ12).

Moreover the definition ofSuccensures that an atom labeled by ψ12 is labeled by ψ2 or its successor (alongb) byψ12. This entails that a node onbis labeled byψ2 and every intermediary node is labeled byψ1and then, (by i.h.) thatwi0, i−i0|=ψ12. ((3)⇒(1))Assumewi0, i−i0|=ψ12. Then there existsj≥0s.t.wi0, i−i0+j|=ψ2and for anyj0< j we havewi0, i−i0+j0 |=ψ1. This entails that there exists a branch fromxwhose nodes are labeled with ψ12.

• ψ = X1ψ1: ((2) ⇒ (3))Assumeψ ∈ r(x). Then X1> ∈ r(x)and there exists y s.t. xis a child of yandr(x)∈Succ(r(y), wi−1). Thereforeψ1∈r(y) and by i.h.wi0, i−i0−1|=ψ1, and thenwi0, i−i0|= X1ψ1.

((3) ⇒ (1))Assume wi0, i−i0 |= X1ψ1. Then i0 < i. Moreoverwi0, i−i0−1 |= ψ1and then by i.h. the labeling of any node x0 of depthi−1 with lr(x0) = i0 containsψ1. Now any nodexof depthi withlr(x) < ihas a predecessor at depth i−1 and lr(x0) = lr(x)and then is labeled byψ1, this entails that the labelingxcontainsX1ψ1.

• ψ=ψ12: Ifxis initial, thenψ∈r(x)entailsψ2∈ r(x). Otherwise due to the definition ofSucc, there exists a node y along the branch from εto xwhich is labeled byψ2 and all intermediary nodes between y andxare labeled by ψ1, this giveswi0, i−i0 |= ψ12. The converse is similar.

• ψ =Nψ1: ((2) ⇒(3))Ifxis labeled with an initial atom, then it also containsψ1(by def. of an atom), and then by i.h.wi0,0|=ψ1, and thenwi0,0|=Nψ1. Ifx is not initial, then its “brother” (remember that the run is binary) is, and, by i.h., it is also labeled byψ1. This entails thatwi,0|=ψ1and thenwi0, i−i0|=Nψ1for anyi0= 0, . . . , i.

((3) ⇒ (1)) Assume wi0, i− i0 |= Nψ1. Then wi,0|=ψ1, and by i.h. we haveψ1 ∈r(x)if|x|=i andlr(x) =i. Any nodex0 at depthiwhich is not la- beled by an initial atom (lr(x0)< i) has a predecessor which has a child labeled by an initial atom (becauser is binary) similar toxand thenx0is labeled byNψ(by def. ofNow).

B. Proof of Proposition 4.3

Only the(⇒)direction needs be proved.

Given a wordwand anNLTLformulaϕ, we define an Atom(ϕ)-labeled binary runrwϕ and we show that it is an accepting run ofAϕifw,0|=ϕ.

(11)

Definition of rwϕ. Given w ∈ Σω, ϕ ∈ NLTL, and i, j ∈ N, we define the atomCwϕj(i)as the set ofCL(ϕ) formulae which hold for wj, i, that is: Cwϕj(i) def= {ψ ∈ CL(ϕ)|wj, i|=ψ}

Now we define theAtom-labeled binary treerwϕ where every branch is infinite and which is labeled with aCwϕj(k) as follows:

• rwϕ(ε)def= Cwϕ0(0),

• A nodexofrwϕ labeled byCwϕj(k)has two childrenx1

andx2such that:

x1is labeled byCwϕj(k+ 1)and x2is labeled byCwϕj+k+1(0).

It is easy to verify6 that any nodexofrwϕ of depthiis labeled byCwϕi0(i−i0)withi0= lrwϕ(x). Then we have:

Lemma B.1. Given anNLTLformulaϕand a wordw∈ Σω such that w,0 |= ϕ, the Atom-labeled tree rwϕ is an accepting run ofAϕoverw.

Proof. rwϕ(ε) is labeled by an initial atom containing ϕ, then rwϕ(ε) ∈ S0. Now, given a node x of depth i la- beled byCwϕi0(i−i0) with two successorsx1 andx2 as described above, the labeling ofx1andx2 satisfy the for- mulaρ(Cwϕi0(i−i0), wi)because:

• x1 is labeled Cwϕi0(i+ 1) which clearly belongs to Succ(Cwϕi0(i−i0))and

• x2 is labeled by Cwϕi+1(0) which belongs to Now(Cwϕi0(i+ 1))by definition ofCwϕ.

It remains to show that every branch satisfies the acceptance conditionF:

• A branch which visits infinitely many (nodes labeled with) initial atoms is accepting because ¬X1>be- longs to every setFi.

• Other branches visit a finite number of second tran- sitions (leading to some x2). Let x be a node on such a branch b with no initial atom in its descen- dants (inb). Assumexis at depthiandxis labeled withCwϕi0(i−i0). The nodes alongb are labeled by Cwϕi0(i−i0),Cwϕi0(i−i0+ 1),Cwϕi0(i−i0+ 2), etc.

By definition of Cwϕi0(i − i0), for any ψ12 ∈ Cwϕi0(i−i0), there existsj ≥i−i0s.t. wi0, j|=ψ2

and for anyi−i0 ≤ j0 < j we havewi0, j0 |= ψ1.

6it holds for the root, and the property is maintained forρ(x, wi)suc- cessors.

Therefore there exists infinitely many nodes on b la- beled by an atom containingψ2wheneverψ12oc- curs in infinitely many atoms, otherwise there are in- finitely many nodes labeled with ¬(ψ12). There- fore the branch b satifies every acceptance condition inF.

Therefore, ifϕis initially satisfiable, there exsists an ac- cepting run ofAϕ.

Références

Documents relatifs

L’archive ouverte pluridisciplinaire HAL, est destinée au dépôt et à la diffusion de documents scientifiques de niveau recherche, publiés ou non, émanant des

One of its recent applications has been the development of model checking techniques for the verifica- tion of multi-agent systems (MAS) specified by means of temporal-

We define a general semantics for strategic abilities of agents in asynchronous systems, with and without perfect information, and present some general complexity results

Various approaches on trust modeling have developed modal logics that capture the important elements of the cognitive theory of trust as proposed in [5]. In these approaches, trust

study the fragments AABBE and AAEBE, devising for each of them an EXPSPACE MC algorithm which exploits the possibility of finding, for each track of a Kripke structure,

Our goal is to encode the semantic patch of Figure 1 as a single formula of a CTL-like logic. For this, the main issues are 1) to manage the metavariables nx, C, etc., 2) to

He have studied the parameterized complexity of max k -set cover and max sat- k with respect to pairs of natural instance parameters as k, ∆ (the maxi- mum set-cardinality) and f ,

In order to estimate the probability that a random run of a model satis- fies a given property, our approach will first construct deterministic monitoring weighted timed automata for