Abstract
In the present paper, the concepts of characters as well as the least characters for LTL (Linear Temporal Logic) formulae are introduced. It is pointed out that those LTL formulae with characters can always be checked within finite steps during model checking even in some cases when the underlying transition system contains infinite states. What is more, the class of LTL formulae with characters can be characterized by full LTL n , the bounded case for LTL. Meanwhile, two types of temporal normal form for LTL formulae are proposed. A necessary and sufficient condition is given in which an LTL formula has an equivalent formula in temporal normal form.
Introduction
Model checking is a verification technique that automatically examines all relevant system states to check whether the system model satisfies the desired properties. Since it was proposed independently by Clarke and Emerson [3] as well as Queille and Sifakis [15], this breakthrough was the first step towards the automated verification of concurrent programs. Over the last three decades, model checking has received a lot of attention and becomes a subject of rapidly growing research community [1, 12]. Given a model TS of the system and a specification φ of the property to be considered, model checking can systematically checks the validity of the property in the model. Here the model TS is a transition system [1, 9], and the specification φ is typically represented in temporal logic such as LTL (Linear Temporal Logic) [1, 12], an extension of propositional or predicate logic by modalities that permit to referral to the infinite behavior of a reactive system.
Temporal logics and related modal logics [2, 17] have been studied in ancient times in different areas such as philosophy. Their application to verifying complex computer systems was proposed by Pnueli and greatly developed recently [6, 14]. In this paper, we will focus our attention on LTL, a temporal logic that is based on a linear-time perspective [1, 12]. First, we introduce the concepts of characters as well as the least characters for LTL formulae and form the bounded case for LTL formulae, i.e., LTL n formulae. Meanwhile, we prove that all LTL n formulae have characters as well as the least characters and show that those LTL formulae with characters have good properties. That is, they can be equivalently written in a simple form without containing the logical connective ⊔, and more importantly they can always be checked within finite steps during model checking even in some cases when the underlying transition system contains infinite states. What is more, the class of LTL formulae with characters can be characterized by full LTL n , which provides reasonable intuition for the notion of characters. After that, we propose TDNF (temporal disjunctive normal form) and TCNF (temporal conjunctive normal form) for LTL as well as LTL n formulae and obtain a similar result as in classical propositional logic [11, 18]: The class of TDNF (TCNF) formulae is as expressive as full LTL n . Besides, a necessary and sufficient condition is given in which an LTL formula has an equivalent TDNF (TCNF) formula.
Preliminaries
In this section, we briefly overview some preliminaries that we need. For more details, please see [1, 4].
S is a set of states, Act is a set of actions, → ⊆ S × Act × S is a transition relation, I (⊆ S) is a set of initial states, AP is a set of atomic propositions, and L : S → 2
AP
is a labeling function.
For convenience, we write s → s′ instead of (s, α, s′)∈ → when there is no confusion. s′ is called a successor of s, and Post (s) denotes the set of all successors of s. A path π of TS is a non-empty sequence of states s0s1s2⋯ such that s
i
∈ Post (si-1) for all i ≥ 1. Paths (TS) denotes the set of all initial, infinite paths of TS. For path π = s0s1s2⋯ of TS, the trace of π is defined as
The precedence order on the operators is as follows. The unary operators ¬, ○ , ♦ and □ bind stronger than the binary ones, and ⊔ takes precedence over ∧, ∨ and →.
σ ⊨ true, σ ⊨ a iff a ∈ σ [0] for all a ∈ AP, σ ⊨ ¬ φ iff σ ⊭ φ, σ ⊨ φ1 ∧ φ2 iff σ ⊨ φ1 and σ ⊨ φ2, σ ⊨ ○ φ iff σ [1 . . .] ⊨ φ, σ ⊨ φ1 ⊔ φ2 iff ∃j ≥ 0 s.t. σ [j . . .] ⊨ φ2 and σ [i . . .] ⊨ φ1 (0 ≤ i < j).
Here for σ = A0A1A2 ⋯ ∈ (2
AP
)
ω
, σ [i] = A
i
and σ [i . . .] = A
i
Ai+1Ai+2⋯ for all i ≥ 0.
For path π of TS, define
Words (true) = (2
AP
)
ω
, Words (¬ φ) = (2
AP
)
ω
- Words (φ), Words (φ1 ∧ φ2) = Words (φ1) ∩ Words (φ2), σ ∈ Words (○ φ) iff σ [1 . . .] ∈ Words (φ), and σ ∈ Words (φ1 ⊔ φ2) iff ∃j ≥ 0 s.t. σ [j . . .] ∈ Words (φ2) and σ [i . . .] ∈ Words (φ1) (0 ≤ i < j).
Let φ be an LTL formula. If Words (φ) = (2 AP ) ω , then it is easily seen that φ ≡ true, and we call φ a tautology in this sense. Similarly, if Words (φ) =∅, then φ ≡ false, and we call φ a contradiction.
Obviously, if σ is m-free in E, then it is n-free in E for all n ≥ m.
Obviously, if k is a character of φ, then m is also a character of φ for every m ≥ k, and Ch (φ) exists in this case.
For a tautology φ, since Words (φ) = (2 AP ) ω , we can easily get Ch (φ) =0. Note that Definition 3.2 is not suitable for any contradiction ψ since Words(ψ) =∅, however, we can still reach an agreement and let Ch (ψ) =0.
From Example 3.3, it is not true that each LTL formula has a character. To make up this situation, we introduce a binary connective ⊔≤n as the bounded form for ⊔, and also ♦≤n, □≤n corresponding to ♦, □ respectively. Here for every σ ∈ (2 AP ) ω , σ ⊨ φ1 ⊔ ≤nφ2 iff ∃j with 0 ≤ j ≤ n s.t. σ [j . . .] ⊨ φ2 and σ [i . . .] ⊨ φ1 (0 ≤ i < j). Moreover, by substituting ⊔≤n for each ⊔ in LTL formulae, we obtain LTL n formulae, the bounded form for LTL. In the sequel, we can see that every LTL n formula has a character (also the least character). To prove this, we need a lemma whose proof is simple and consequently omitted.
Ch (a) =1 for every a ∈ AP; If φ = ¬ ψ, then Ch (φ) = Ch (ψ); If φ = φ1 ∧ φ2, then Ch (φ) ≤ max {Ch (φ1) , Ch (φ2)}; If φ = ○ ψ, then Ch (φ) = Ch (ψ) +1; If φ = φ1 ⊔ ≤nφ2, then Ch (φ) ≤ n + max {Ch (φ1) -1, Ch (φ2)}. Furthermore, if φ1 ≡ φ2, then Ch (φ) = Ch (φ1) = Ch (φ2).
(i) Let φ = a where a ∈ AP. Then σ∈Words(φ) iff a ∈ σ [0]. Thus each k ≥ 1 is a character of φ, and consequently Ch (φ) =1.
(ii) Let φ = ¬ ψ and k be a character of ψ. Since φ is a contingent formula, so does ψ, thus k > 0. Arbitrarily choose σ ∈ (2 AP ) ω . Suppose that there exists σ′∈Words(φ) such that σ′ [i] = σ [i] for i = 0, 1, ⋯ , k - 1, then it can be obtained that σ∈Words(φ). Since otherwise, if σ∉Words(φ), then σ ∈ (2 AP ) ω -Words(φ)=Words(ψ). Consequently σ′∈Words(ψ) by Definition 3.2, which contradicts with σ′∈Words(φ)=(2 AP ) ω -Words(ψ). Therefore, k is a character of φ, and Ch (φ) exists. Furthermore, it is easy to get Ch (φ) = Ch (ψ).
(iii) Let φ = φ1 ∧ φ2 and k1, k2 be characters of φ1, φ2 respectively. Since Words (φ) = Words (φ1) ∩ Words (φ2), it can be similarly obtained that k = max {k1, k2} is a character of φ, thus Ch (φ) ≤ max {Ch (φ1) , Ch (φ2)}.
(iv) Let φ = ○ ψ and k be a character of ψ. Then we can similarly prove that k + 1 is a character of φ, and Ch (φ) = Ch (ψ) +1.
(v) Let φ = φ1 ⊔ ≤nφ2, k1, k2 be characters of φ1, φ2 respectively, and k = n + max {k1 - 1, k2}. Arbitrarily choose σ ∈ (2 AP ) ω , and suppose that there exists σ′∈Words(φ) such that σ′ [m] = σ [m] for m = 0, 1, ⋯ , k - 1. Since σ′∈Words(φ), there exists j with 0 ≤ j ≤ n such that σ′ [j . . .]∈Words(φ2) and σ′ [i . . .]∈Words(φ1) for 0 ≤ i < j. Note thatk - j ≥ k - n ≥ k2, k - i ≥ k1, and σ [m] = σ′ [m] holds for all m with i ≤ m < k. Thus σ [j . . .]∈Words(φ2), σ [i . . .]∈Words(φ1) for 0 ≤ i < j, and consequently σ∈Words(φ), which proves that k is a character of φ. Thus, Ch (φ) ≤ n + max {Ch (φ1) -1, Ch (φ2)}. Furthermore, it is easy to obtain that Ch (φ) = Ch (φ1) = Ch (φ2) in case φ1 ≡ φ2 by Lemma 3.4.□
If φ = φ1 ∨ φ2 or φ1 → φ2, then Ch (φ) ≤ max {Ch (φ1) , Ch (φ2)}; If φ = □ ≤nψ or ♦≤nψ, then Ch (φ) ≤ n + Ch (ψ).
For an LTL or LTL
n
formula φ with Ch (φ) = k, one can easily infer that
Since an LTL formula without containing ⊔ can also be seen as an LTL n formula, Proposition 3.8 states that each LTL formula with characters is equivalent to some LTL n formula. Meanwhile, if an LTL formula φ is equivalent to some LTL n formula, then by Proposition 3.5 and Lemma 3.4 we can easily infer that Ch (φ) exists. In a word, the following corollary holds.
Corollary 3.9 states that the class of LTL formulae with characters is as expressive as full LTL n . In another words, they can be characterized by LTL n formulae, which provides reasonable intuition for the notion of characters.
Similarly, Ch (a ⊔ ≤2b) =3, and
It can be seen that the two LTL n formulae in Example 4.1 can be equivalently written in a special form similarly to disjunctive (conjunctive) normal form in classical propositional logic (see [11, 18] in detail). More generally, we give the following definition.
Note that each tautology is equivalent to a ∨ ¬ a which can be seen in either TDNF or TCNF, and each contradiction is equivalent to a ∧ ¬ a in either TDNF or TCNF where a ∈ AP. In what follows we obtain a similar result also for contingent formulae. First of all, we need two lemmas.
By Lemma 4.3 and distributive laws for ∨,∧ (see [1] in detail) we get:
On the other hand, let ⊥ = a ∧ ¬ a and ⊤ = a ∨ ¬ a where a ∈ AP. In what follows we prove the sufficiency by induction on the complexity of φ.
(i) Let φ = b where b ∈ AP. Obviously Ch (φ) =1 and φ is in TDNF with order 0.
(ii) Let φ = ¬ ψ with Ch (ψ) = k + 1. Then Ch (φ) = Ch (ψ) = k + 1. Assume that ψ≡ (A10 ∧ ○ A11 ∧ ⋯ ∧ ○ k A1k) ∨ ⋯ ∨ (At0 ∧ ○At1 ∧ ⋯ ∧ ○ k A tk ). Then by Lemma 4.3 we get φ =¬ ψ ≡ ¬ ((A10 ∧ ○ A11 ∧ ⋯ ∧ ○ k A1k) ∨ ⋯ ∨(At0 ∧ ○ At1 ∧ ⋯ ∧ ○ k A tk )) ≡ (¬ A10 ∨ ○ (¬ A11)∨ ⋯ ∨ ○ k (¬ A1k)) ∧ ⋯ ∧ (¬ At0 ∨ ○ (¬ At1) ∨ ⋯ ∨ ○ k (¬ A tk )), which is in TCNF with order k. Consequently, φ has an equivalent TDNF formula with order k by Lemma 4.4.
(iii) Let φ = φ1 ∧ φ2 with Ch (φ1) = k1 + 1, Ch (φ2) = k2 + 1, and k = max {k1, k2}. Assume that φ1 ≡ (A10 ∨ ○ A11 ∨ ⋯ ∨ ○ k 1 A1k1) ∧ ⋯ ∧ (Ai0 ∨ ○ Ai1 ∨ ⋯ ∨ ○ k 1 A ik 1 ), φ2 ≡ (B10 ∨ ○ B11 ∨ ⋯ ∨ ○ k 2 B1k2) ∧ ⋯ ∧ (Bj0 ∨ ○ Bj1 ∨ ⋯ ∨ ○ k 2 B jk 2 ). Suppose that k1 ≤ k2, then k = k2, and φ = φ1 ∧ φ2 ≡ (A10 ∨ ○ A11 ∨ ⋯ ∨ ○ k 1 A1k1 ∨ ○ k1+1 ⊥ ∨ ⋯ ∨ ○ k ⊥) ∧ ⋯ ∧ (Ai0 ∨ ○ Ai1 ∨ ⋯ ∨ ○ k 1 A ik 1 ∨ ○ k1+1 ⊥ ∨ ⋯ ∨ ○ k ⊥) ∧ (B10 ∨ ○ B11 ∨ ⋯ ∨ ○ k B1k) ∧ ⋯ ∧ (Bj0 ∨ ○ Bj1 ∨ ⋯ ∨ ○ k B jk ), which is in TCNF. Consequently, φ has an equivalent TDNF formula by Lemma 4.4.
(iv) Let φ = ○ ψ with Ch (ψ) = k + 1. Then Ch (φ) = k + 2. Assume that ψ ≡ (A10 ∧ ○ A11 ∧ ⋯ ∧ ○ k A1k) ∨ ⋯ ∨ (At0 ∧ ○ At1 ∧ ⋯ ∧ ○ k A tk ). Then φ = ○ ψ ≡ (⊤ ∧ ○ A10 ∧ ○ 2A11 ∧ ⋯ ∧ ○ k+1A1k) ∨ ⋯ ∨ (⊤ ∧ ○ At0 ∧ ○ 2At1 ∧ ⋯ ∧ ○ k+1A tk ), which is in TDNF with order k + 1.
(v) Let φ = φ1 ⊔ ≤nφ2. Then φ ≡ φ2 ∨ (φ1 ∧ ○ φ2) ∨ (φ1 ∧ ○ φ1 ∧ ○ 2φ2) ∨ ⋯ ∨ (φ1 ∧ ○ φ1 ∧ ⋯ ∧ ○ n-1φ1 ∧ ○ n φ2) . Thus the proof of this case can be converted to cases (i)-(iv).
As a result, every contingent formula φ with Ch (φ) = k + 1 has an equivalent TDNF formula (also an equivalent TCNF formula by Lemma 4.4) with order k.
By Corollary 3.9 and 4.6, we can also get the following corollary.
It should be noted that an LTL formulae φ in TDNF or TCNF has a good property, that is, the set Words(φ) can be easily computed, which would simplify the procedure of model checking. For example, let φ = [b ∧ ○ (a ∨ ¬ a)] ∨ (a ∧ ○ b). We can easily obtain that Ch (φ) =2, and Words (2) (φ) =Words (2) (b∧ ○ (a ∨ ¬ a)) ∪ Words (2) (a ∧ ○ b) ={AB ∈ (2 AP ) 2 ∣ b ∈ A or a ∈ A, b ∈ B}. Then by Equation (3), the set Words(φ) can be computed without difficulty.
The present paper introduced the concepts of characters as well as the least characters for LTL and LTL n formulae. It was proved that all LTL n formulae have characters as well as the least characters, and that those LTL formulae with characters can always be checked within finite steps during model checking. Besides, two types of temporal normal form, TDNF and TCNF, for LTL as well as LTL n formulae were proposed. It was obtained that the class of TDNF (TCNF) formulae is as expressive as full LTL n . Finally, a necessary and sufficient condition was given in which an LTL formula has an equivalent TDNF (TCNF) formula. As one can see, TDNF and TCNF formulae are simple in form and consequently easy to be checked during model checking. The application of TDNF and TCNF formulae in model checking will be studied in a forthcoming paper.
