20 D. Lepri, E. Ábrahám, and P. Cs. Ölveczky π : πj : π ′ j : πi : π ′ i : π ′′ j : π ′ : 0 ¯r 2¯r 3¯r 4¯r 5¯r t π i t π j n¯r d1 d2 d3 π pre π pre i t π j ml ¯r−d2− d 1 2 t π j t ∗ t π i t π j t ∗ π pre i t π i t π j t ∗ π pre′ i t π j t ∗ t π i t π j t ∗ π pre π ′ i Fig. 3: Lemma 1: Proof structure for the “⇒” direction of universally quantified bounded until I1 π ′ j π ′′ j ml ¯r I t ∗∗ t ∗∗ t ∗∗ t ∗∗ t ∗∗ I2 I I
<strong><strong>Time</strong>d</strong> <strong>CTL</strong> <strong>Model</strong> <strong>Check<strong>in</strong>g</strong> <strong>in</strong> <strong>Real</strong>-<strong>Time</strong> Maude 21 π ′ i of πi and an <strong>in</strong>dex k s.t. d π′ i i k ∈ I, T K, tπ′ k |=c ϕ2, and T K, t π′ i l |=c ϕ1 for all 0 ≤ l < k. Let π ′ i be such a path and k such an <strong>in</strong>dex. Note that π ′ i conta<strong>in</strong>s the state tπj at time po<strong>in</strong>t d2. Let π pre′ i and π ′′ j be the prefix resp. suffix of π ′ i end<strong>in</strong>g resp. start<strong>in</strong>g at that state. Let v be the number of states <strong>in</strong> π pre′ i and let π ′ be the concatenation of πpre and π ′ i . We show that the bounded until is satisfied along π ′′ j , be<strong>in</strong>g a time ref<strong>in</strong>ement of πj. Remember that ml¯r is the lower bound of I. We dist<strong>in</strong>guish between (i) d π′ i k ∈ I1 = [ml¯r, ml¯r + d2 + d3) and (ii) d π′ i k ∈ I2 = I\I1. (i) Assume first that d π′ i k ∈ I1 = [ml¯r, ml¯r + d2 + d3). We observe that π ′ i conta<strong>in</strong>s the state t∗∗ at time po<strong>in</strong>t ml¯r + d2 (we added this sample po<strong>in</strong>t when ref<strong>in</strong><strong>in</strong>g πj to π ′ j ), thus t∗∗ appears <strong>in</strong> π ′ at time po<strong>in</strong>t (n + ml)¯r + d1 + d2. Furthermore, we assumed that d π′ i k ∈ I1, i.e., ml¯r ≤ d π′ i k < ml¯r + d2 + d3, imply<strong>in</strong>g that t π′ i [(n + ml)¯r + d1, (n + ml + 1)¯r). Thus both t∗∗ and t π′ i k appear <strong>in</strong> π′ <strong>in</strong> the <strong>in</strong>terval ((n + ml)¯r, (n + ml + 1)¯r), and from T K, t π′ i k |=c ϕ2 we get by <strong>in</strong>duction that T K, t∗∗ |=c ϕ2. k appears <strong>in</strong> π′ at a time po<strong>in</strong>t <strong>in</strong> Note that t ∗∗ also appears <strong>in</strong> π ′′ j . We want to show that the <strong>in</strong>dex of t∗∗ <strong>in</strong> π ′′ j satisfies the conditions for the satisfaction of the until formula by π′′ j . We already have shown that T K, t ∗∗ |=c ϕ2. Additionally, t ∗∗ appears <strong>in</strong> π ′′ j at time po<strong>in</strong>t ml¯r, which is the left end po<strong>in</strong>t of the <strong>in</strong>terval I. In case ml = 0 we are done, because there are no states prior to t∗∗ <strong>in</strong> π ′′ j . Otherwise, if ml > 0, it rema<strong>in</strong>s to show that all states prior to t∗∗ <strong>in</strong> π ′′ j satisfy ϕ1. There are two cases. ∗ We know that all states t π′ i l with l < k (especially all states at time po<strong>in</strong>ts less than ml¯r) satisfy ϕ1. We conclude that the states <strong>in</strong> π ′′ j at time po<strong>in</strong>ts less than ml¯r − d2, build<strong>in</strong>g a subset of the above states, all satisfy ϕ1. ∗ It rema<strong>in</strong>s to show that all states at time po<strong>in</strong>ts from [ml¯r −d2, ml¯r) <strong>in</strong> π ′′ j also satisfy ϕ1. Notice that π ′ i conta<strong>in</strong>s the state t∗ at time po<strong>in</strong>t ml¯r − d1/2. S<strong>in</strong>ce this time po<strong>in</strong>t is below the lower bound of I we have T K, t ∗ |=c ϕ1. This state t ∗ appears <strong>in</strong> π ′ is at time po<strong>in</strong>t (n¯r + d1) + (ml¯r − d1/2) = (n + ml)¯r + d1/2 . By <strong>in</strong>duction we get that all states appear<strong>in</strong>g <strong>in</strong> π ′ at time po<strong>in</strong>ts from the <strong>in</strong>terval ((n + ml)¯r, (n + ml + 1)¯r) satisfy ϕ1. I.e., all states <strong>in</strong> π ′′ j at time po<strong>in</strong>ts from ((n + ml)¯r − (n¯r + d1 + d2), (n + ml + 1)¯r − (n¯r + d1 + d2)) = (ml¯r − d1 − d2, (ml + 1)¯r − d1 − d2) ⊇ [ml¯r − d2, ml¯r) satisfy ϕ1.