Академический Документы
Профессиональный Документы
Культура Документы
j=1
P[X(t) = s
i
|X(t 1) = s
j
] P[X(t 1) = s
j
]
concisely as follows:
x(t) = M x(t 1) = M
t
x(0). (2)
Because M is a probability transition matrix, its elements are
non-negative, the sum of each column adds up to one, and the
absolute values of its eigenvalues are not larger than 1. The
condition about the column sum ensures that 1 is an eigenvalue of
all probability transition matrices: the matrix M I is a singular
matrix because the sum of all row vectors is the zero vector [37].
Suppose that the probability matrix M is diagonalizable
4
such
that M = P P
1
. Then, we can easily compute M
t
as P
t
P
1
. Observe that
t
is a diagonal matrix of
t
i
, where
i
is the i
th
diagonal element of . Similarly, e
M
= P e
P
1
,
where e
is a diagonal matrix of e
i
. Because lim
t
t
i
= 0
if |
i
| < 1, the limiting pmf x() is determined solely by the
columns of P that correspond to the eigenvalue 1. Suppose that
there is an eigenvalue 1 such that || = 1. Then, because
t
changes phases without being diminished, is an oscillating
mode that prevents x(t) from converging to a limiting pmf. Note
that if more than one eigenvalue is equal to 1, the limiting pmf is
not unique. For example, let M =
,
0 1
1 0
and M
=
,
1 0
0 1
.
Then, for any p [0, 1], M alternates pmfs between [p, 1 p]
T
and [1 p, p]
T
forever, because it has an eigenvalue 1. Also,
because M
M
(1)
0
.
.
.
0 M
(n)
.
In fact, M can be regarded as a DTMC and can benet from the
useful results of DTMC theories. The block diagonal matrix M
is a probability transition matrix because each element is non-
negative and each column adds up to one. However, this matrix
does not transfer a single pmf; it transfers an array of pmfs.
With this fact in mind, we extend the denition of the probability
vector function x : IN IR
|S |1
as follows
x(t) =
,
x
(1)
(t)
T
, . . . , x
(n)
(t)
T
T
.
Observe that x(t) is not a pmf: its sum adds up to n and
it is structured such that the partial sums corresponding to
each individual probability vector add up to one. The extended
probability vector function x denes the parallel pmf transitions
of individual DTMCs, and its value at time t is a snapshot of
the parallel systems; the extended x and x(t) correspond to the
computational path and the state of the classical LTL. With this
extended denition, the prediction Equation (2) still holds for the
multiple DTMC model:
x(t) = M
t
x(0). (3)
Because we extensively use the eigenvalues and the eigenvec-
tors of M and M
(i)
, we index them by their absolute values so that
we can easily reference them: we name the eigenvalues of M
(i)
as
(i)
1
, . . . ,
(i)
|S
(i)
|
such that |
(i)
1
| |
(i)
|S
(i)
|
| and the eigenvalues of
M as
1
, . . . ,
|S |
where |
1
| |
|S |
|. We also designate
the common eigenvalue 1 of all Markov probability matrices
as
(i)
1
for M
(i)
and
1
, . . . ,
n
for M. We call the eigenvectors
corresponding to
(i)
a
and
a
, respectively, v
(i)
a
and v
a
Observe that M has a unique limiting state if |
n+1
| < 1:
because |
(i)
2
| < 1 for i = 1, . . . , n, each individual DTMC
X
(i)
has a unique limiting pmf x
(i)
() = c
i
v
(i)
1
, where c
i
=
1/(
|S
(i)
|
j=1
v
(i)
1 j
). Thus, the unique limiting state of M is x() =
[x
(1)
()
T
, . . . , x
(n)
()
T
]
T
.
C. Markov Reward Model
A Markov Reward Model (MRM) is a Markov chain ex-
tended with a reward function that associates reward values with
states [10]. The reward associated with a state can be regarded
as an earned value when a process visits that state. As we show
5
This assumptions can be easily achieved by renaming, using fresh names,
the states whose names clash.
later in this section, many interesting properties can be expressed
in MRM.
We represent a Markov reward model as a triple (S, M, r),
where (S, M) is a STD of a DTMC and r : S IR is a
reward function. We extend the denition of MRM to the multiple
DTMC model by taking S as the domain of r. Because r is
dened across the states of individual DTMCs, we can compare
dierent DTMCs together. In this paper, we consider only the
time invariant rewards which can be represented by a constant
row vector r IR
1|S |
as follows:
r
i
= r(s
i
) for i = 1, . . . , |S |.
The expected reward at time t can be written as
E[r](t) =
n
i=1
sS
(i)
r(s) P[X
(i)
(t) = s] = r x(t).
The atomic propositions of iLTL are comparisons between the
expected rewards. Many interesting properties about DTMCs can
be expressed in this form. For example, comparisons between two
probabilities can be written as follows:
P[X
(i)
(t) = s
1
] > P[X
( j)
(t) = s
2
] E[r](t) > 0,
where r(s
1
) = 1, r(s
2
) = 1, and r(s) = 0 for the other states.
Future probabilities can also be expressed as an expected reward:
P[X
(k)
(t) = s
i
] =
sj S
r(s
j
) P[X
(k)
(0) = s
j
], where r(s
j
) =
M
t
i j
.
When evaluating the performances of Markov processes, accu-
mulated rewards are often computed. For example, we may be
interested in the expected total energy required to complete an
application. Because accumulated rewards are frequently used,
we dene a special operator Q such that:
Q[X(t) = s] =
=t
P[X() = s].
With this operator, the accumulated expected rewards can be
expressed as simply as
=t
sS
r(s) P[X() = s] =
sS
r(s) Q[X(t) = s].
Note that the sum does not always exist. If the reward vector r
is not orthogonal to the limiting state vector x(), then the sum
diverges. Thus, in this paper we restrict the use of Q operator
to the cases where r x() = 0. Given this restriction, the
accumulated reward can be expressed as an expected reward as
follows: Let P P
1
be a diagonalization of the probability
matrix M IR
|S ||S |
and let r be a reward vector such that
r x() = 0. Then,
=t
r x() = (r Q) x(t), where
Q = P
,
s(
1
) 0
.
.
.
0 s(
|S |
)
P
1
,
s(
i
) =
1
1i
if
i
1
0 otherwise.
IEEE TRANSACTIONS ON SOFTWARE ENGINEERING, VOL. 37, NO. 1, JAN/FEB 2011
h
t
t
p
:
/
/
w
w
w
.
i
e
e
e
x
p
l
o
r
e
p
r
o
j
e
c
t
s
.
b
l
o
g
s
p
o
t
.
c
o
m
h
t
t
p
:
/
/
w
w
w
.
i
e
e
e
x
p
l
o
r
e
p
r
o
j
e
c
t
s
.
b
l
o
g
s
p
o
t
.
c
o
m
5
Because r is orthogonal to the steady state vector, we can safely
replace the summation for
i
= 1 with 0. The Q operator can also
be dened as an expected reward as follows:
Q[X(t) = s
i
] =
|S |
j=1
Q
i j
P[X(t) = s
j
].
In case of transient states, where P[X() = s
i
] = 0, we can write
=t
P[X() = s
i
] = Q[X(t) = s
i
].
IV. rLTL: A Paoaxarirsrrc Trmroaxi Loorc
We now describe the syntax and the semantics of iLTL. As
mentioned earlier, iLTL has the same logical and temporal oper-
ators as LTL, but its specications are over states that are pmfs,
whereas states in LTL are elements of a Kripke structure. In fact,
in an LTL for a DTMC, states would correspond to what we called
concrete states. Note that the cardinality of the pmf state space
is uncountable. The atomic propositions of iLTL are comparisons
between expected rewards; their values are evaluated, as needed,
in the pmf space (instead of being predened as in LTL). We
dene a normal form of atomic propositions. Using the normal
form enables us to transform atomic propositions about future
pmfs into atomic propositions about the initial pmfs.
A. Syntax
The syntax of an iLTL formula is as follows:
: : = T | F | ap | ( ) |
| | | | |
X | U | R | |
ap : : = exp exp
exp : : = mexp | mexp + exp | mexp exp
mexp : : = num | term| num term
term : : = pop[proc = state] | pop[proc(nat) = state]
pop : : = P | Q
: : = < | | = | | >
where proc is a DTMC, state is its state, num is a real number,
and nat is a natural number. In term, we introduce a time
oset in the syntax, pop[proc(nat) = state], to refer to future
probabilities. Because the Q operator can be expressed as a
Markov reward form, with a little abuse of notation, we write
r
i
P[X
(i)
(t
i
) = k
i
] c as a representative syntax for the atomic
propositions ap. We call the set of all atomic propositions AP.
B. Normal Form
Before we explain the semantics of iLTL, we dene the
normal form of atomic propositions. In the normal form, atomic
propositions about future pmfs are converted to predicates about
initial pmfs. The conversion is explained by helper functions
n
term
, n
exp
, and n that compute expected reward vectors, and a
and a
set
that convert atomic propositions to their normal forms.
Let M be a multiple DTMC model with T
M
= (S, M), then
constants and probabilities with time osets are converted to a
reward vector by n
term
: (S IR) IN IR
1(|S |+1)
dened as
n
term
(k, t) =
,
(M
t
)
i
0
if k S is s
i
[0 k] if k IR,
where (M
t
)
i
is the i
th
row of M
t
. Let x
: IN IR
(|S |+1)1
be
x
(t) =
,
x(t)
T
, 1
T
, and let X be a DTMC of M, then
n
term
(k, t) x
(0) =
P[X(t) = k] if k S
k if k IR.
Let ap be the atomic proposition
m
i=1
r
i
P[X
(i)
(t
i
) = k
i
] c,
then the function n
exp
: AP IR
1(|S |+1)
which converts the exps
of ap to a reward vector is dened as:
n
exp
(ap) =
i=1
r
i
n
term
(k
i
, t
i
)
n
term
(c, 0).
With n
exp
the following holds:
m
i=1
r
i
P[X
(i)
(t
i
) = k
i
] c
n
exp
i=1
r
i
P[X
(i)
(t
i
) = k
i
] c
(0) 0.
The extra dimension in the extended state vector x
and the
conversion function n
term
can be naturally introduced by adding
a single state DTMC to M such that T
M
= (S {s}, M
),
where M
=
,
M 0
0 1
i=1
r
i
P[X
(i)
(t + t
i
) = k
i
] c
n
exp
i=1
r
i
P[X
(i)
(t
i
) = k
i
] c
x(t) 0
n
i=1
r
i
P[X
(i)
(t
i
) = k
i
] c, t
x(0) 0.
Observe that the reward vector of the second line is evaluated
at the state at time t, and the reward vector of the third line is
evaluated at the initial state. Using the normal form, we convert
the satisability problems of x(t) for t > 0 into those of x(0).
That is, after this conversion, we can disregard the probability
transition dynamics of DTMCs in the model checking process.
Finally, we dene a conversion function a : APIN AP that
converts an ap to its normal form. Using the notation,
a(ap, t) = z . (n(ap, t) z 0)
where z is an array of pmfs. We also dene a
set
: 2
AP
IN
2
AP
so that the normalization can be applied to a set of atomic
propositions
a
set
(A, t) = {a(ap, t) : ap A},
and write a
set
(A, t)(z) for
apA
a(ap, t) z.
IEEE TRANSACTIONS ON SOFTWARE ENGINEERING, VOL. 37, NO. 1, JAN/FEB 2011
h
t
t
p
:
/
/
w
w
w
.
i
e
e
e
x
p
l
o
r
e
p
r
o
j
e
c
t
s
.
b
l
o
g
s
p
o
t
.
c
o
m
h
t
t
p
:
/
/
w
w
w
.
i
e
e
e
x
p
l
o
r
e
p
r
o
j
e
c
t
s
.
b
l
o
g
s
p
o
t
.
c
o
m
6
M, z |= T
M, z |= F
M, z |=
i
r
i
P[X
(i)
(t
i
) = k
i
] c
n
exp
(
i
r
i
P[X
(i)
(t
i
) = k
i
] c) z 0
M, z |= M, z |=
M, z |= M, z |= and M, z |=
M, z |= M, z |= or M, z |=
M, z |= X M, M z |=
M, z |= U there is j 0 such that M, M
j
z |=
and M, M
i
z |= for i = 0, . . . , j 1
M, z |= R for all i 0 if M, M
j
z |= for
0 j < i then M, M
i
z |= .
Fig. 1. Ternary satisfaction relation |=: whether the model M with T
M
=
(S, M) satises the specication at a state z.
C. Semantics
An iLTL formula comprises atomic propositions, logical con-
nectives, , , , , , and temporal connectives X , U , R ,
, . An atomic proposition of iLTL is a comparison between
the expected rewards. The meaning of an atomic proposition at
any given time t is whether the comparison at the time satises
the usual meaning of . In the normal form, this comparison is
transformed to a comparison about expected rewards at the initial
time step.
The meaning of logical operators is as follows. is true if
and only if is false; is true if and only if or are true;
and is true if and only if and are both true. Implies ()
is dened as and equivalent () is dened
as ( ) ( ).
The meaning of temporal operators is as follows. X is true if
and only if is true at the next step; U is true if and only
if eventually becomes true and until becomes true is true;
R is true if and only if is true while is false. The other
operators can be dened in terms of these: is true if is
always true, which is equivalent to F R ; and is true if
eventually becomes true, which is equivalent to T U .
Formally, the semantics of iLTL formulas is dened by a binary
satisfaction relation |= M . In order to help explain the
binary satisfaction relation |=, we dene an overloaded ternary
satisfaction relation |= M IR
|S |
which is described in
Figure 1. For simplicity, we write M |= for (M, ) |= and
M, z |= for (M, z, ) |=.
The ternary satisfaction relation is about a single path x with
x(0) = z: whether the state transitions from the given initial
state satisfy the iLTL formula. Using the denition of the ternary
satisfaction relation, the binary satisfaction relation |= is dened
as:
M |= M, z |= for all initial state z.
The binary satisfaction relation is about all paths: M is a model
of if and only if all paths x starting from every initial state z
satisfy .
V. Moori Cnrckrxo
We present two iLTL model checking algorithms: (1) an
intuitive algorithm based on Disjunctive Normal Form (DNF),
and (2) a more ecient algorithm based on a B uchi automaton.
We also prove the soundness of iLTL model checking and nd
the conditions under which iLTL model checking is complete.
Before we explain the details of the model checking algorithms,
we examine a simple model checking example here. This simpli-
ed example explains the key ideas of the iLTL model checking
algorithm.
Example 1: Let M be a DTMC with T
M
= ({A, B}, M), where
M =
,
0.5 0
0.5 1
.
M has a sink state B, and on every step the probability P[M(t) = A]
is halved. Suppose that we want to know whether P[M(t) = B] >
0.8 within two steps if P[M(0) = A] > 0.9 initially.
To explain the problem, suppose we have the atomic proposi-
tions: follows.
a : P[M = A] > 0.9, b : P[M = B] > 0.8, b
: P[M = B] 0.8.
Let an iLTL formula be a (b X b X X b). Then, the
problem is checking whether M |= . Because M |= if and only
if M, z |= for all initial pmfs z, we nd an initial pmf z such
that M, z |= is a counterexample. The negated specication
is a b
X b
X X b
z IR
2
:
[ 1 0 ] z 0 [ 0 1 ] z 0
[ 1 1 ] z = 1 [ 1 0 ] z > 0.9
[ 0 1 ] z 0.8 [ 0.5 1 ] z 0.8
[ 0.25 1 ] z 0.8
= ,
and any feasible z is a counterexample. Checking the emptiness
of the constraint set can be done by linear programming [28].
In general, iLTL model checking involves a series of feasibility
checking.
Observe that regardless of the initial pmf, there is a unique
limiting pmf: on every step the probability P[M(t) = A] is halved
and eventually the probability becomes zero. Hence, the unique
limiting pmf is [ 0 1 ]
T
; eventually the atomic proposition a
becomes false and b becomes true. In fact, the longest duration a
is true is a single step when P[M(0) = A] = 1. From the second
step it becomes false. Also, the longest duration b is false is three
steps when P[M(0) = B] = 0: P[M(0) = B] = 0, P[M(1) = B] =
0.5, P[M(2) = B] = 0.75, and P[M(3) = B] = 0.875. In this paper,
we derive the minimum step N such that all atomic propositions
in a given iLTL formula become constants.
As shown in the above example, iLTL model checking process
works as follows: given an iLTL specication and a multiple
DTMC model, we compute a search depth N and build a B uchi
automaton for the negated specication. Then, we look for a
feasible path of length N in the B uchi automaton.
A. Computation of Search Depth
We now derive the minimum time step N from which all atomic
propositions of a given iLTL formula become constants. If all
atomic propositions become constants, then we can immediately
IEEE TRANSACTIONS ON SOFTWARE ENGINEERING, VOL. 37, NO. 1, JAN/FEB 2011
h
t
t
p
:
/
/
w
w
w
.
i
e
e
e
x
p
l
o
r
e
p
r
o
j
e
c
t
s
.
b
l
o
g
s
p
o
t
.
c
o
m
h
t
t
p
:
/
/
w
w
w
.
i
e
e
e
x
p
l
o
r
e
p
r
o
j
e
c
t
s
.
b
l
o
g
s
p
o
t
.
c
o
m
7
determine the truth values of X, U and R formulas, which leads
to an algorithm in the next section that removes all temporal
operators from iLTL formula.
Theorem 1: Given an iLTL formula and a multiple DTMC
model M of n individual DTMCs such that T
M
= (S, M), if
M is diagonalizable, (4)
|
n+1
| < 1,
n
exp
(ap) x() 0 for all atomic propositions ap of ,
then there is a time step N from which all atomic propositions of
become constants.
Proof: If the rst two conditions of Equation (4) are
satised, then the unique nal state x() can be computed. For
an atomic proposition ap of , let be n
exp
(ap) x(), then
n
exp
(ap) x(t) 0 n
exp
(ap) (x(t) x()) . (5)
Note that in Equation (5) is not zero, but n
exp
(ap) (x(t) x())
converges to zero as t increases. Thus, depending on the com-
parator and the sign of , the truth value of ap will eventually
be settled on either true or false.
Now, we nd a monotonically decreasing upper bound and a
monotonically increasing lower bound of n
exp
(ap) (x(t) x())
that converge toward each other. Thus, when one of the bounds
becomes , the value of ap does not change any more. Let
P P
1
be a diagonalization of M, then the upper and the
lower bounds can be found as follows.
n
exp
(ap) (x(t) x())
(6)
=
|S |
i=n+1
r
i
t
i
|S |
j=1
P
1
i j
x(0)
j
|S |
i=n+1
|r
i
| |
i
|
t
|S |
j=1
|P
1
i j
| |x(0)
j
|
|S |
i=n+1
|r
i
| |
i
|
t
|S |
max
j=1
|P
1
i j
|,
where r = n
exp
(ap) P. The outer sum of the second line begins
from n + 1; the rst n summation corresponds to x() and it
cancels the x() of the rst line. The last inequality holds because
0 x(0)
i
1 for i = 1, . . . , |S | and
|S |
i=1
x(0)
i
= 1. Thus, the time
bound N
ap
for ap is:
N
ap
= argmin
tIN
|S |
i=n+1
|r
i
|
|S |
max
j=1
|P
1
i j
|
|
i
|
t
< ||.
The summation converges to 0 because |
i
| < 1 for i = n +
1, . . . , |S |, thus the bound N
ap
exists. The time bound for all
atomic propositions of is:
N = max
ap of
N
ap
.
The rst condition of Equation (4) is used in computing the
search depth N. Although not every matrix is diagonalizable,
the diagonalizability condition can be easily regained by slightly
changing a defective matrix [37]. The second condition is neces-
sary and sucient condition for the existence of a unique limiting
state. The last condition prevents the transient oscillating modes
which can keep changing the truth values of atomic propositions
0 10 20 30 40 50 60 70 80 90 100
1
0.5
0
0.5
1
1.5
2
2.5
3
upper bound
lower bound
a*x(t)
a*x(infinity)
b
N
time step
r
e
w
a
r
d
Fig. 2. The upper and the lower bounds for an expected reward. The graph
labeled as a*x(t) is ax(t) and the line labeled as a*x(infinity) is ax().
forever. In most cases, this condition can be satised by adding
or subtracting a small reward to the atomic propositions.
Figure 2 shows an illustration about the bounds of Theorem 1.
Let an atomic proposition ap be a x(t) > b. The oscillating line
in the graph shows the expected reward a x(t) over time which
converges to 1 (a x() = 1). The monotonically decreasing
and increasing lines are the upper and the lower bounds of
Equation (6). Note that the truth value of ap is changing over
time: false at step 0, true at step 10, false at step 20, and true at
step 30. However from step 39 (when the lower bound meets b)
onward it is true.
B. Model Checking as Feasibility Checking
In this section, we explain how to remove all temporal operators
from iLTL formulas based on the search depth explained in
the previous section. After removing the temporal operators, the
formula can be converted to Disjunctive Normal Form (DNF)
whose satisability can be checked by examining the feasibility
of each conjunctive subformula as we have seen in Example 1.
Let N be the time bound found from Theorem 1, then the value
of iLTL formula for any time t N can be determined instantly
because:
M, x(t) |= X M, x(t) |= , (7)
M, x(t) |= U M, x(t) |= ,
M, x(t) |= R M, x(t) |= .
Using Equation (7) and the normalization function a, we can
remove all temporal operators from an iLTL formula . For
example, function f in Figure 3 removes all temporal operators
from a given iLTL formula such that and f(, 0) are
equivalent. The following theorem proves their equivalence.
Theorem 2: Given a multiple DTMC model M and an iLTL
formula , if the conditions of Equation (4) are satised then
M |= M |= f(, 0).
Proof: We prove a stronger condition: for any x and t,
M, x(t) |= M, x(0) |= f(, t).
We prove the equivalence by induction on the structural tree
of iLTL formula . The leaf nodes of are T, F, or atomic
IEEE TRANSACTIONS ON SOFTWARE ENGINEERING, VOL. 37, NO. 1, JAN/FEB 2011
h
t
t
p
:
/
/
w
w
w
.
i
e
e
e
x
p
l
o
r
e
p
r
o
j
e
c
t
s
.
b
l
o
g
s
p
o
t
.
c
o
m
h
t
t
p
:
/
/
w
w
w
.
i
e
e
e
x
p
l
o
r
e
p
r
o
j
e
c
t
s
.
b
l
o
g
s
p
o
t
.
c
o
m
8
f(,t) {
if( is T) return T
if( is F) return F
if( is an AP) return a(, t)
if( is ()) return f(,t)
if( is ) return (f(,t))
if( is ) return (f(,t)) (f(,t))
if( is ) return (f(,t)) (f(,t))
if( is X )
if(t N) return f(,t)
else return f(,t+1)
if( is U )
if(t N) return f(,t)
else return (f(,t))
( (f(,t)) (f(,t+1)) )
if( is R )
if(t N) return f(,t)
else return ( (f(,t)) (f(,t)) )
( (f(,t)) (f(,t+1)) )
}
Fig. 3. Function f removes all temporal operators from an iLTL formula .
propositions (ap), which are the induction base.
M, x(0) |= f(T, t) M, x(t) |= T,
M, x(0) |= f(F, t) M, x(t) |= F,
M, x(0) |= f(ap, t) n(ap, t) x(0) 0
n(ap, 0) x(t) 0
M, x(t) |= ap
The induction hypothesis is M, x(t) |= M, x(0) |= f(, t)
for any iLTL formula and of height h or less. Let be a
formula of height h + 1. Here, we prove only the following four
cases out of the seven cases of Figure 3. The rest can be proved
similarly.
= :
M, x(0) |= f(, t)
M, x(0) |= f(, t) by the def. of f
M, x(0) |= f(, t) by the def. of |=
M, x(t) |= by the induction hypothesis
M, x(t) |= by the def. of |=
= : by the same sequence of reasoning of the case
= , M, x(0) |= f( , t) M, x(t) |=
= X :
case 1: t + 1 < N
M, x(0) |= f(X , t)
M, x(0) |= f(, t + 1) by the def. of f
M, x(t + 1) |= by the induction hypothesis
M, M x(t) |=
M, x(t) |= X by the def. of |=
case 2: t + 1 N
M, x(0) |= f(X , t)
M, x(0) |= f(, t) by the def. of f
M, x(t) |= by the induction hypothesis
M, x(t) |= X by the steady state relation (7).
U :
case 1: t +1 < N: by the same sequence of reasoning as the
1
st
case of = X and by equivalence U (X(U)),
M, x(0) |= f( U , t) M, x(t) |= U .
case 2: t+1 N : by the same sequence of reasoning of the
2
nd
case of = X, M, x(0) |= f(U, t) M, x(t) |= U.
When an iLTL formula is converted to DNF, the number of
conjunctive subterms can grow exponentially in terms of the
search depth N. For example, the conjunctive formulas of (ab)
have
N
t=0
(a(t) | b(t)), where | is a choice operator. Thus, the
number of conjunctive terms is 2
N+1
; for large N, model checking
becomes practically impossible. However, notice that there are
many common terms in the conjunctive formulas. If infeasibility
is found in the common terms, then we can skip checking
all the conjunctive formulas with the common terms. For this
computational eciency, we build a B uchi automaton [7]; the
conjunctive terms are generated by unrolling the structure of the
B uchi automaton.
C. B uchi Automaton
A B uchi automaton is a nite state automaton that accepts
innite strings. As regular automata have nal states, B uchi
automata have accepting states that must be visited innitely often
for a string to be accepted. For a nite state automaton to accept
an innite string, there must be a loop in the automaton.
Formally, a B uchi automaton is a quintuple A =
(, Q, , Q
0
, F), where is a nite alphabet (2
AP
in the expand
algorithm), Q is a set of states, Q Q is a transition
relation, Q
0
Q is a set of initial states, and F Q is a set
of accepting states. Let : IN be an innite string, then a
run : IN Q of A over is a mapping such that (0) Q
0
and ((i), (i), (i + 1)) . An innite string is accepted by
a B uchi automation A if there is a run of A over such that
inf () F , where inf () is a set of states of A that appears
innitely often in .
A B uchi automaton A
for a formula U
are the nodes q such that q.Old or U q.Old. That is,
an accepting run should eventually satisfy or the formula can
be satised without satisfying U . For more details about the
expand algorithm please see [14].
D. Model Checking with B uchi Automaton
In this section, we explain an ecient iLTL model checking
algorithm based on a B uchi automaton. We also prove the
soundness of iLTL model checking and nd the conditions under
which iLTL model checking is complete.
Let T be a tree of height N (the search depth found in Theo-
rem 1), generated by unrolling the graph structure of the B uchi
automaton for the given formula, then each path of T from the
root node to a leaf node can be regarded as a conjunctive formula
of DNF if the acceptance condition for until formula is considered
additionally. The path to a subtree of T can be considered as a
IEEE TRANSACTIONS ON SOFTWARE ENGINEERING, VOL. 37, NO. 1, JAN/FEB 2011
h
t
t
p
:
/
/
w
w
w
.
i
e
e
e
x
p
l
o
r
e
p
r
o
j
e
c
t
s
.
b
l
o
g
s
p
o
t
.
c
o
m
h
t
t
p
:
/
/
w
w
w
.
i
e
e
e
x
p
l
o
r
e
p
r
o
j
e
c
t
s
.
b
l
o
g
s
p
o
t
.
c
o
m
9
common prex of all conjunctive terms in the subtree. Because
we are looking for a feasible path as a counterexample, if the
constraints collected along the prex are infeasible, then we can
skip checking the subtree.
For simplicity, we dene the set of atomic propositions that
needs to be satised at a node q as q.AP = q.Old AP. Also,
because the time index for a node (1) is 0, to reduce the
confusion, we assume that the index to the runs begins from 1.
That is, : IN {1} Q such that (1) Q
0
.
Let a labeling function L : IR
|S |
2
AP
be
L(z) = {ap AP : a(ap, 0)(z) is true} ,
where z IR
|S |
is an array of pmfs. The labeling function L
returns a subset of AP that is true at the given state. An innite
string
x
: IN 2
AP
generated by M and x is dened as:
x
(t) = L(x(t)),
and the language L
M
generated by M is dened as:
L
M
=
x
for all probability vector functions x.
Let A
t=0
a
set
( (t).AP, 0 )(x(t)).
Because a
set
((t).AP, 0)(x(t)) a
set
((t).AP, t)(x(0)), instead of
nding the function x itself, we look for its initial state x(0).
Also, because L(x(t)) = L(x(N)) for t N, we can reduce the
innite number of conjunctions to a nite number as the following
theorem shows.
Theorem 3: If the conditions in Equation (4) are satised, then
A
accepts a string
x
if and only if there is a run such that
(m) = (n), for n > m N (8)
(k) F for some k [m, n]
n1
t=0
a
set
((t).AP, t) is feasible.
Proof: (only if) Let
x
be a string accepted by A
, then
there is a run over
x
such that ((t 1), L(x(t)), (t))
for t 0. Thus,
t=0
a
set
((t).AP, t)(x(0)) is true. Because is
an innite run and A
n1
t=0
a
set
((t).AP, t). Then, because
x
(t) =
x
(N) for t N, the
following run
is accepted by A
(t) =
(t) if t < m
(t
) otherwise,
where t
= m + (t m) mod (n m+ 1).
That is,
. Thus,
x
is accepted by A
.
Theorem 4: iLTL Model checking is sound.
Proof: If the conditions in Equation (4) are not satised,
then iLTL checker aborts model checking. If the conditions in
Equation (4) are met, iLTL checker returns true if and only if there
is no prex (0), . . . , (n1) of a run for A
such that R R
, then if x is a feasible
point of
qR
a
set
(q.AP, N), then x is also a feasible point of
qR
a
set
(q.AP, N). Thus, in order to nd a feasible run after index
N, we only need to check the shortest run to each loop. Since there
are nite number of loops in A
that
satises the conditions in Equation (8).
As described in Theorem 3, iLTL model checking algorithm
looks for a feasible loop after the search depth N. This search
can be duplicated for many runs. Using the fact that the atomic
propositions become constants after step N, these redundant
searches can be eliminated: we build a minimal set F
+
Q
that has x the nodes of the loops of A
if and
only if
N
t=0
a
set
((t).AP, t) is feasible and (N) F
+
.
The time complexity of iLTL model checking is exponential in
terms of the search depth N as it examines all paths of length N
of A
M
u
0 0
0 M
b
0
R R 1
,
M
u
=
,
,
M
b
=
,
,
R =
,
1 rS 1 rT 1 rL 1 rD 1
.
Note that we have named the states by the rst letters of the
components suxed with either a u for the user scenario, or a b
for the bank scenario.
As our rst example, we check whether the reliability of the
system is larger than 95% regardless of the scenarios. Observe
that the reliability of the system depends on the portion of users
in each scenario. This problem can be solved by checking the
following iLTL formula:
1
: a b, where
a : P[B = Su] + P[B = Sb] = 1,
b : Q[B = Cu] + Q[B = Cb] > 0.95.
The initial condition that all processes begin from the Session
state is enforced in the implication
1
by the premise a. In b, the
Q operator sums the accumulated probability at the Completed
states, thus measuring the reliability of the system. The reliability
requirement can be established by checking whether B |=
1
.
Results of executing the model checker show that the system
does not meet its reliability specication: if more than 94.1% of
the users are in the bank scenario, then the reliability is less than
95%.
As a second example, suppose that the DataBase component
is not designed to handle more than 10 processes accessing it
concurrently, and suppose that the system does an admission
control so that up to 100 users can use the system at the same time.
Then, it would be reasonable to constrain the system such that the
probability of a process being in the DataBase state never exceeds
0.1. Under these assumptions, we can again check whether we
achieve 95% reliability. The following iLTL formula describes
IEEE TRANSACTIONS ON SOFTWARE ENGINEERING, VOL. 37, NO. 1, JAN/FEB 2011
h
t
t
p
:
/
/
w
w
w
.
i
e
e
e
x
p
l
o
r
e
p
r
o
j
e
c
t
s
.
b
l
o
g
s
p
o
t
.
c
o
m
h
t
t
p
:
/
/
w
w
w
.
i
e
e
e
x
p
l
o
r
e
p
r
o
j
e
c
t
s
.
b
l
o
g
s
p
o
t
.
c
o
m
11
this requirement:
2
: (a c) b, where
c : P[B = Du] + P[B = Db] < 0.1.
c species that the probability of a process being in the
DataBase state is always less than 0.1. If this condition is satised
for each process and if there are at most 100 users in the system,
then the expected number of processes at the DataBase component
is always fewer than 10. Thus,
2
is a specication about the
reliability with this constraint. The model checker shows that
B |=
2
is true, i.e. the system meets the 95% reliability threshold.
B. Case Study: Drug Administration
When we take a pill, it is absorbed from the stomach and the
gut and it delivered to the liver through the portal vein. From the
liver, the absorbed drug is delivered to dierent parts of our body
in a bound form with the plasma. The drug then has its eect on
the target tissue and it is then eliminated from our body through
the liver or the kidney. In Pharmacokinetics, drug Absorption,
Distribution, Metabolism, and Elimination (ADME) processes are
often explained by the compartment model [34], [35]: organs with
similar drug absorption characteristics are modeled as a com-
partment and the drug molecules make transitions between these
compartments. In the compartment model, the amount of drug
leaving a compartment is proportional to the drug concentration
of the compartment, thus satisfying the Markovian property.
We represent the compartment model as a DTMC such that
each compartment is a state, and the transition probabilities be-
tween the states are the probability that a drug molecule is moving
from one compartment to the other during a sampling time. Drug
kinetics is described by the amount of drug or the number of drug
molecules in certain compartments. Due to the large number of
molecules, it might be impossible to model the state of the drug
as a Cartesian product of all molecule locations. However, if we
model the state of the drug as a pmf that a randomly picked
molecule is in a certain compartment, then the large number of
molecules will make the pmf an accurate representation of the
actual fractions of the drug in certain compartments.
A drug is active if more than a certain level of the drug is
concentrated at the target tissue, and the drug takes eect if
the active state is maintained for a certain duration. However,
because the drug concentration is decreasing exponentially as it
is metabolized, it is not desirable to increase the dose in order
to increase the active duration of the drug, especially for drugs
with fast clearance rates. Also, certain drugs are toxic to some
organs, so drug dosage should be limited. A well known way to
increase a drugs active duration is to coat the drug so that its
absorption rate is reduced. However, this will also delay the rst
drug eect. Thus, a mixed use of coated and uncoated drugs is a
common practice. In our approach, we model the drug absorption
process using a multiple DTMC model in order to nd a dose by
iLTL model checking. Specically, we model the behaviors of the
coated and the uncoated drugs in two dierent Markov chains and
examine their combined eects using a multiple DTMC model.
Figure 5 shows a state transition diagram for the drug absorp-
tion process. The concrete states in the model are the compart-
ments and the status of the drug: Sto, Gut, Liv, Kid, and Pla are
the representative compartments of the stomach, gut, liver, kidney,
and plasma; Dru, Clr, and Rem are the drug status: intake, cleared,
and remaining.
Dru Rem
Sto
Gut
Liv
Kid
Pla
Clr
pSG
pSL
pLP
pLC
1pLPpLC
pPL
pPK
1pPLpPK
pGL
pGC
1pGLpGC
1pSGpSL
pKP
pKC
1pKPKC
1
1 1
Fig. 5. A state transition diagram for the drug administration model.
We introduce the state Rem to describe the specication in
physical units, such as milligram, and nd the dose in physical
units from the model checking results. Note that as far as the
prediction equation is concerned, a DTMC is a linear system. That
is, if we scale the initial state, ignoring the fact that it is an array
of pmfs, then the trailing states also scale by the same amount.
In order to scale the pmfs we introduce the non-interacting state
Rem: if we scale a pmf by u, then we put the rest of the probability
1u in the Rem state. For example, let M be a DTMC with T
M
=
(S, M), and let M
be a DTMC with T
M
= (S {R}, M
), where
R is a fresh sink state. Now, suppose that x is a counterexample of
M |= P[D = Kid] < 0.1, then [u x
T
, 1u]
T
is a counterexample
of M