22.06.2015 Views

IIST and UNU - UNU-IIST - United Nations University

IIST and UNU - UNU-IIST - United Nations University

IIST and UNU - UNU-IIST - United Nations University

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Linking Duration Calculus <strong>and</strong> TLA 12<br />

Law 6 (1) ⌈p⌉ = 〈 ∞ ↑ p ↓ [0, 0] 〉<br />

(2) 〈 ∞ ↑ p ↓ ∞ 〉 = ⌈p⌉ ∨ ⌈¬p⌉<br />

(3) ⌈p⌉ ⌈¬p⌉ = 〈 [0, ∞] ↑ p ↓ ∞ 〉 ∧ ¬〈 ∞ ↑ p ↓ ∞ 〉 .<br />

We use an abbreviation P ⊳ p ⊲ Q of choice to denote that two durational specifications P <strong>and</strong><br />

Q are controlled by a boolean p : during any interval in which p is always true, P must hold;<br />

during any interval in which ¬p is always true, Q must hold. There is no restriction for those<br />

intervals in which p is sometimes true <strong>and</strong> sometimes not true.<br />

Def 8 P ⊳ p ⊲ Q ̂= ⌈p⌉ ⇒ P ∧ ⌈¬p⌉ ⇒ Q .<br />

The following law shows that the chop composition of any two durational specifications can<br />

be implemented as a choice between the specifications, <strong>and</strong> the change of the choice is made<br />

sometime during an interval. If p is independent of P <strong>and</strong> Q <strong>and</strong> becomes hidden, the two<br />

sides will be equal.<br />

Law 7 P Q ⊇ P ⊳ p ⊲ Q ∧ 〈 [0, ∞] ↑ p ↓ ∞ 〉 ∧ ¬〈 ∞ ↑ p ↓ ∞ 〉.<br />

General patterns of specifications <strong>and</strong> their refinement<br />

A durational specification is a predicate P (i, x) on the interval i <strong>and</strong> the real-time function<br />

x : [0, ∞] → S . A common durational specification is a predicate P (l, ∫ p) on the length l ̂= |i|<br />

of the interval <strong>and</strong> the integral of a boolean function p during the interval. This reflects the fact<br />

that the controlling of a system is normally independent of the starting time <strong>and</strong> insensitive to<br />

state changes at isolated time points.<br />

A durational specification D<br />

∫<br />

p f(l) requires the total time of the state satisfying p in<br />

any interval with length l to be bounded by a characteristic function f(l). For example, the<br />

specification D (l 30 ⇒ ∫ leak 4) is a special case of this pattern with the characteristic<br />

function f(l) ̂= 4 ⊳ l ∈ [4, 30] ⊲ l where we use a ⊳ b ⊲ c to denote the value a if b is true, or<br />

the value c otherwise. The dual pattern D<br />

∫<br />

p g(l) is equal to D<br />

∫<br />

¬p (l−f(l)).<br />

The following law shows that two specifications with different characteristic functions may describe<br />

the same requirement.<br />

Law 8 D<br />

∫<br />

p f(l) = D<br />

∫<br />

p f ′ (l) , if any of the following condition is satisfied ( l, l 0 , l 1 0 ):<br />

1. f ′ (l) = min(l, f(l)) ,<br />

2. f ′ (l) = min {f(l ′ ) | l ′ l} ,<br />

3. or f ′ (l) = min {f(l 0 ) + f(l 1 ) | l 0 + l 1 = l} .<br />

Report No. 301,<br />

<strong>UNU</strong>-<strong>IIST</strong>, P.O. Box 3058, Macau

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!