Reachability and Reward Checking for Stochastic Timed

AVOCS, SEPTEMBER 2014, ENSCHEDE
a
,
Reachability and Reward Checking
for Stochastic Timed Automata
TA
s
,b
,
A
PT
DP
M
C
M
te s
DT iscrebilitie
A
/T
meocks
cl
d a
b
S ter- pro
T
L de
n is
nomin
m
E. Moritz Hahn, Arnd Hartmanns, Holger Hermanns
Chinese Academy
of Sciences,
ChinaChecking
/ Saarlandfor
University,
Germany
Arnd Hartmanns
Reachability
and Reward
Stochastic
Timed Automata
Talk Outline
1
2
3
Stochastic Timed Automata
,b
a
,
,
Model Checking STA
mcsta
Experimental Results
Arnd Hartmanns
๏
๏Š
Reachability and Reward Checking for Stochastic Timed Automata
Stochastic Timed Automata
Nondeterministic
= unquantified
= uncertainty
Probabilistic
= quantified
= uncertainty
b
a
1
2
1
, {๐‘
2
๐‘ โ‰ฅ 6, ๐œ
MDP
โ‰” 0}
๐‘ โ‰ฅ 8, ๐œ
LTS
DTMC
nondeter- discrete
minism probabilities
Arnd Hartmanns
Reachability and Reward Checking for Stochastic Timed Automata
Stochastic Timed Automata
Nondeterministic Probabilistic Timed
+ clocks
clock c;
๐‘โ‰ฅ6
guards
invariants ๐‘ โ‰ค 8
b
๐‘ก๐‘Ÿ๐‘ข๐‘’
๐‘ก๐‘Ÿ๐‘ข๐‘’
a
๐‘ โ‰ฅ 6, ๐œ
Pmax โ‹„
time/ TA
clocks
โ‰” 0}
๐‘โ‰ค8
๐‘ โ‰ฅ 8, ๐œ
โˆง ๐‘ก๐‘–๐‘š๐‘’ < 8 = ?
Arnd Hartmanns
๐‘ก๐‘Ÿ๐‘ข๐‘’
1
2
1
, {๐‘
2
PTA
๐‘ก๐‘Ÿ๐‘ข๐‘’
LTS
MDP
DTMC
nondeter- discrete
minism probabilities
Reachability and Reward Checking for Stochastic Timed Automata
Stochastic Timed Automata
Nondeterministic Probabilistic Timed
+ sampling from arbitrary distributions
๐‘โ‰ค๐‘ฅ
๐‘ก๐‘Ÿ๐‘ข๐‘’
a
๐‘ โ‰ฅ 6, ๐œ
Pmax โ‹„
๐‘ โ‰ฅ ๐‘ฅ, b
1
, {๐‘
2
โ‰” 0}
โˆง ๐‘ก๐‘–๐‘š๐‘’ < 8 = ?
Arnd Hartmanns
๐‘ก๐‘Ÿ๐‘ข๐‘’
โ‰” 0, ๐‘ฅ โ‰” EX P (ฮป)}
๐‘ โ‰ฅ 8, ๐œ
arbitrary STA
distributions
PTA
1
, {๐‘
2
๐‘โ‰ค8
Stochastic
๐‘ก๐‘Ÿ๐‘ข๐‘’
time/ TA
clocks
LTS
MDP
DTMC
nondeter- discrete
minism probabilities
Reachability and Reward Checking for Stochastic Timed Automata
Stochastic Timed Automata
+
{๐‘ โ‰” 0}
wait for ๐‘ = 8 when it
causes most problems?
always wait
until ๐‘ = 8?
๐‘โ‰ค๐‘ฅ
๐‘ก๐‘Ÿ๐‘ข๐‘’
a
๐‘ โ‰ฅ 6, ๐œ
Pmax โ‹„
๐‘โ‰ค8
distributions
๐‘ โ‰ฅ ๐‘ฅ, b
PTA
๐‘ก๐‘Ÿ๐‘ข๐‘’
1
, {๐‘
2
โ‰” 0, ๐‘ฅ โ‰” EX P (ฮป)}
1
, {๐‘
2
โ‰” 0}
๐‘โ‰ค8
๐‘ โ‰ฅ 8, ๐œ
โˆง ๐‘ก๐‘–๐‘š๐‘’ < 8 = ?
Arnd Hartmanns
+
nondeterministic
delay
always go as
soon as ๐‘ = 6 ?
arbitrary STA
๐‘โ‰ฅ6
๐‘ก๐‘Ÿ๐‘ข๐‘’
time/ TA
clocks
LTS
MDP
DTMC
nondeter- discrete
minism probabilities
Reachability and Reward Checking for Stochastic Timed Automata
Stochastic Timed Automata
{๐‘ โ‰” 0}
+
๐‘โ‰ฅ6
+
๐‘โ‰ค8
{๐‘ โ‰” 0, ๐‘ฅ โ‰” UN I (6,8)}
+
๐‘โ‰ฅ๐‘ฅ
+
๐‘โ‰ค๐‘ฅ
nondeterministic
delay
arbitrary STA
stochastic delay
distributions
= specific resolution of the nondeterminism
PTA
๐‘โ‰ค๐‘ฅ
๐‘ก๐‘Ÿ๐‘ข๐‘’
a
๐‘ โ‰ฅ 6, ๐œ
Pmax โ‹„
๐‘ โ‰ฅ ๐‘ฅ, b
1
, {๐‘
2
โ‰” 0, ๐‘ฅ โ‰” EX P (ฮป)}
1
, {๐‘
2
โ‰” 0}
๐‘โ‰ค8
๐‘ โ‰ฅ 8, ๐œ
โˆง ๐‘ก๐‘–๐‘š๐‘’ < 8 = ?
Arnd Hartmanns
๐‘ก๐‘Ÿ๐‘ข๐‘’
๐‘ก๐‘Ÿ๐‘ข๐‘’
time/ TA
clocks
LTS
MDP
DTMC
nondeter- discrete
minism probabilities
Reachability and Reward Checking for Stochastic Timed Automata
Stochastic Timed Automata
Nondeterministic Probabilistic
+ rate and transition rewards
โˆ—: der ๐‘ค๐‘Ž๐‘–๐‘ก = 1
โˆ—โˆ—: {๐‘Ÿ๐‘’๐‘ก๐‘Ÿ๐‘–๐‘’๐‘  โ‰” ๐‘Ÿ๐‘’๐‘ก๐‘Ÿ๐‘–๐‘’๐‘  + 1}
โˆ—
a
๐‘ก๐‘Ÿ๐‘ข๐‘’
๐‘ โ‰ฅ 6, ๐œ
โˆ—โˆ—
Emax ๐‘ค๐‘Ž๐‘–๐‘ก |
Arnd Hartmanns
๐‘ โ‰ฅ ๐‘ฅ, b
๐‘โ‰ค๐‘ฅ
Timed
arbitrary STA
distributions
PTA
๐‘ก๐‘Ÿ๐‘ข๐‘’
1
, {๐‘
2
โ‰” 0, ๐‘ฅ โ‰” EX P (ฮป)}
1
, {๐‘
2
โ‰” 0}
๐‘โ‰ค8
=?
๐‘ โ‰ฅ 8, ๐œ
โˆ—
Stochastic
Priced
๐‘ก๐‘Ÿ๐‘ข๐‘’
time/ TA
clocks
LTS
MDP
DTMC
nondeter- discrete
minism probabilities
Reachability and Reward Checking for Stochastic Timed Automata
Stochastic Timed Automata
continuous
dynamics SHA
Stochastic Hybrid Automata
+ complex continuous
behaviour
arbitrary STA
distributions
der(๐‘ฃ) = ๐‘Ž โˆง ๐‘ฃ โ‹… ๐‘ฃ๐‘š๐‘Ž๐‘ฅ
"Markovian" models
= exponentially distributed
delays
MA
PTA
IMC time/ TA
MDP
clocks
CTMC
LTS
DTMC
exp. distr. nondeter- discrete
minism probabilities
delays
Arnd Hartmanns
Reachability and Reward Checking for Stochastic Timed Automata
Stochastic Timed Automata
nondeterministic
probabilistic
stochastic
โˆ—
a
๐‘ก๐‘Ÿ๐‘ข๐‘’
๐‘ โ‰ฅ 6, ๐œ
โˆ—โˆ—
×
choices
delays
๐‘ โ‰ฅ ๐‘ฅ, b
๐‘โ‰ค๐‘ฅ
1
, {๐‘
2
โ‰” 0}
โˆ—
arbitrary STA
distributions
๐‘ก๐‘Ÿ๐‘ข๐‘’
โ‰” 0, ๐‘ฅ โ‰” EX P (ฮป)}
๐‘ โ‰ฅ 8, ๐œ
rewards
PTA
1
, {๐‘
2
๐‘โ‰ค8
+
๐‘ก๐‘Ÿ๐‘ข๐‘’
time/ TA
clocks
LTS
MDP
DTMC
nondeter- discrete
minism probabilities
Arnd Hartmanns
Reachability and Reward Checking for Stochastic Timed Automata
Where are we?
1
2
3
Stochastic Timed Automata
,b
a
,
,
Model Checking STA
mcsta
Experimental Results
Arnd Hartmanns
๏
๏Š
Reachability and Reward Checking for Stochastic Timed Automata
Model Checking STA
Adapt existing method for SHA
implemented in the prohver tool:
upper bound on maximum reachability probabilities
P(crash within 15 years) โ‰ค 10-5 ?
+ min probabilities
+ max/min rewards
in theory
Fränzle, Hahn, Hermanns, Wolovick, Zhang:nn
Measurability and Safety Verification forn
Stochastic Hybrid Systems (HSCC 2011)
Arnd Hartmanns
Reachability and Reward Checking for Stochastic Timed Automata
Model Checking STA
Overapproximation of continuous distributions
๐‘ฅ โ‰” NO R M (๐‘š, 1)}
0.2
0.2
0.2
0.2
0.2
discrete pr. choice of interval + nondeterministic value
Arnd Hartmanns
Reachability and Reward Checking for Stochastic Timed Automata
Model Checking STA
Overapproximation of continuous distributions
๐‘โ‰ค๐‘ฅ
๐‘ก๐‘Ÿ๐‘ข๐‘’
a
๐‘ โ‰ฅ 6, ๐œ
Arnd Hartmanns
๐‘ โ‰ฅ ๐‘ฅ, b
๐‘ก๐‘Ÿ๐‘ข๐‘’
1
2, {๐‘
โ‰” 0, ๐‘ฅ โ‰” EX P (ฮป)}
1
2, {๐‘
โ‰” 0}
๐‘โ‰ค8
๐‘ โ‰ฅ 8, ๐œ
๐‘ก๐‘Ÿ๐‘ข๐‘’
Reachability and Reward Checking for Stochastic Timed Automata
Model Checking STA
Overapproximation of continuous distributions
๐‘โ‰ค๐‘ฅ
๐‘ก๐‘Ÿ๐‘ข๐‘’
a
1
2, {๐‘
๐‘ โ‰ฅ ๐‘ฅ, b
๐‘ก๐‘Ÿ๐‘ข๐‘’
โ‰” 0, ๐‘ฅ โ‰” EX P (ฮป)}
1
2, โ€ฆ
๐‘ โ‰ฅ ๐‘ฅ, b
๐‘โ‰ค๐‘ฅ
1โˆ’๐‘’ โˆ’๐œ†
2 , {๐‘
โ‰” 0, ๐‘ฅ โ‰” [0,1]}
๐‘ก๐‘Ÿ๐‘ข๐‘’
Arnd Hartmanns
a
1
,โ€ฆ
2
๐‘โ‰ค๐‘ฅ
๐‘’ โˆ’๐œ†
2 , {๐‘
๐‘ก๐‘Ÿ๐‘ข๐‘’
๐‘ โ‰ฅ ๐‘ฅ, b
โ‰” 0, ๐‘ฅ โ‰” [1, โˆž)}
Reachability and Reward Checking for Stochastic Timed Automata
Model Checking STA
Specialised method for STA
upper bounds on max. reachability & rewards
lower bounds on min. reachability & rewards
prohver for SHA:
Arnd Hartmanns
Reachability and Reward Checking for Stochastic Timed Automata
Where are we?
1
2
3
Stochastic Timed Automata
,b
a
,
,
Model Checking STA
mcsta
Experimental Results
Arnd Hartmanns
๏
๏Š
Reachability and Reward Checking for Stochastic Timed Automata
Experimental Results
Implementation: mcsta tool
1. Automatic overapproximation
unit-width intervals, single parameter ฯฑ:
"remaining probability" for unbounded distributions
2. On-the-fly digital clocks semantics
3. Explicit-state MDP model checking
part of the Modest Toolset
www.modestchecker.net
Arnd Hartmanns
Reachability and Reward Checking for Stochastic Timed Automata
Experimental Results
Example: M/G/1/6 queueing system
arrivals: exponentially distributed
service time: normal distribution
P(queue full within time bound) = ?
Arnd Hartmanns
Reachability and Reward Checking for Stochastic Timed Automata
Experimental Results
Example: M/G/1/6 queueing system
arrivals: exponentially distributed
service time: normal distribution
P(queue full within time bound) = ?
Arnd Hartmanns
Reachability and Reward Checking for Stochastic Timed Automata
Experimental Results
Example: M/G/1/6 queueing system
arrivals: exponentially distributed
service time: normal distribution
Time-bounded reachability probability
P(queue full within time bound) = ?
๏Š
๏
Time-unbounded expected accumulated reward
E(time until queue full) = ?
[43.4, โˆž) (actually โ‰ˆ 61)
๏Š
๏Œ
E(#customers until queue full) = ? [3.52, โˆž) (actually โ‰ˆ 6.2)
๏Š 136 K MDP
Arnd Hartmanns
states only
Reachability and Reward Checking for Stochastic Timed Automata
Experimental Results
Example: tandem queueing system
time dilation
to reduce error
Example: WLAN (CSMA/CA)
uniform instead of nondeterministic transmission time
Arnd Hartmanns
Reachability and Reward Checking for Stochastic Timed Automata
Experimental Results
Example: file server with slow archival storage
= exponentially distributed interarrival times for requests
+ uniformly distributed file size (= time to send reply)
+ 2 % chance for file to be in slow archival storage
+ time for archive retrieval nondeterministic in [30, 40] s
+ initial queue length follows discrete uniform distribution
Arnd Hartmanns
Reachability and Reward Checking for Stochastic Timed Automata
Where are we?
1
2
3
Stochastic Timed Automata
,b
a
,
,
Model Checking STA
mcsta
Experimental Results
Arnd Hartmanns
๏
๏Š
Reachability and Reward Checking for Stochastic Timed Automata
Summary
Stochastic Timed Automata
nondeterministic
choices
probabilistic ×
delays
stochastic
continuous
dynamics SHA
+ rewards
arbitrary STA
distributions
Model checking with mcsta
PTA
bounds for reachability
probabilities & expected rewards
State space nuclear explosion
Over-/underapproximation
๏
www.modestchecker.net
Arnd Hartmanns
time/ TA
clocks
LTS
MDP
?
DTMC
nondeter- discrete
minism probabilities
Reachability and Reward Checking for Stochastic Timed Automata