<s>
Runtime	B-Application
verification	I-Application
is	O
a	O
computing	O
system	O
analysis	O
and	O
execution	O
approach	O
based	O
on	O
extracting	O
information	O
from	O
a	O
running	O
system	O
and	O
using	O
it	O
to	O
detect	O
and	O
possibly	O
react	O
to	O
observed	O
behaviors	O
satisfying	O
or	O
violating	O
certain	O
properties	O
.	O
</s>
<s>
Some	O
very	O
particular	O
properties	O
,	O
such	O
as	O
datarace	B-Operating_System
and	O
deadlock	B-Operating_System
freedom	O
,	O
are	O
typically	O
desired	O
to	O
be	O
satisfied	O
by	O
all	O
systems	O
and	O
may	O
be	O
best	O
implemented	O
algorithmically	O
.	O
</s>
<s>
Other	O
properties	O
can	O
be	O
more	O
conveniently	O
captured	O
as	O
formal	B-Application
specifications	I-Application
.	O
</s>
<s>
Runtime	B-Application
verification	I-Application
specifications	B-Application
are	O
typically	O
expressed	O
in	O
trace	O
predicate	O
formalisms	O
,	O
such	O
as	O
finite	B-Architecture
state	I-Architecture
machines	I-Architecture
,	O
regular	B-Language
expressions	I-Language
,	O
context-free	O
patterns	O
,	O
linear	O
temporal	O
logics	O
,	O
etc.	O
,	O
or	O
extensions	O
of	O
these	O
.	O
</s>
<s>
However	O
,	O
any	O
mechanism	O
for	O
monitoring	O
an	O
executing	O
system	O
is	O
considered	O
runtime	B-Application
verification	I-Application
,	O
including	O
verifying	O
against	O
test	O
oracles	O
and	O
reference	O
implementations	O
.	O
</s>
<s>
When	O
formal	O
requirements	O
specifications	B-Application
are	O
provided	O
,	O
monitors	O
are	O
synthesized	O
from	O
them	O
and	O
infused	O
within	O
the	O
system	O
by	O
means	O
of	O
instrumentation	O
.	O
</s>
<s>
Runtime	B-Application
verification	I-Application
can	O
be	O
used	O
for	O
many	O
purposes	O
,	O
such	O
as	O
security	O
or	O
safety	O
policy	O
monitoring	O
,	O
debugging	O
,	O
testing	O
,	O
verification	O
,	O
validation	O
,	O
profiling	O
,	O
fault	O
protection	O
,	O
behavior	O
modification	O
(	O
e.g.	O
,	O
recovery	O
)	O
,	O
etc	O
.	O
</s>
<s>
Runtime	B-Application
verification	I-Application
avoids	O
the	O
complexity	O
of	O
traditional	O
formal	O
verification	O
techniques	O
,	O
such	O
as	O
model	B-Application
checking	I-Application
and	O
theorem	O
proving	O
,	O
by	O
analyzing	O
only	O
one	O
or	O
a	O
few	O
execution	O
traces	O
and	O
by	O
working	O
directly	O
with	O
the	O
actual	O
system	O
,	O
thus	O
scaling	O
up	O
relatively	O
well	O
and	O
giving	O
more	O
confidence	O
in	O
the	O
results	O
of	O
the	O
analysis	O
(	O
because	O
it	O
avoids	O
the	O
tedious	O
and	O
error-prone	O
step	O
of	O
formally	O
modelling	O
the	O
system	O
)	O
,	O
at	O
the	O
expense	O
of	O
less	O
coverage	O
.	O
</s>
<s>
Moreover	O
,	O
through	O
its	O
reflective	O
capabilities	O
runtime	B-Application
verification	I-Application
can	O
be	O
made	O
an	O
integral	O
part	O
of	O
the	O
target	O
system	O
,	O
monitoring	O
and	O
guiding	O
its	O
execution	O
during	O
deployment	O
.	O
</s>
<s>
Checking	O
formally	O
or	O
informally	O
specified	O
properties	O
against	O
executing	O
systems	O
or	O
programs	O
is	O
an	O
old	O
topic	O
(	O
notable	O
examples	O
are	O
dynamic	O
typing	O
in	O
software	O
,	O
or	O
fail-safe	B-General_Concept
devices	O
or	O
watchdog	O
timers	O
in	O
hardware	O
)	O
,	O
whose	O
precise	O
roots	O
are	O
hard	O
to	O
identify	O
.	O
</s>
<s>
The	O
terminology	O
runtime	B-Application
verification	I-Application
was	O
formally	O
introduced	O
as	O
the	O
name	O
of	O
a	O
2001	O
workshop	O
aimed	O
at	O
addressing	O
problems	O
at	O
the	O
boundary	O
between	O
formal	O
verification	O
and	O
testing	O
.	O
</s>
<s>
They	O
proposed	O
a	O
tool	O
to	O
verify	O
specifications	B-Application
in	O
temporal	O
logic	O
and	O
to	O
detect	O
race	B-Operating_System
conditions	I-Operating_System
and	O
deadlocks	B-Operating_System
in	O
Java	B-Language
programs	O
by	O
analyzing	O
single	O
execution	O
paths	O
.	O
</s>
<s>
Currently	O
,	O
runtime	B-Application
verification	I-Application
techniques	O
are	O
often	O
presented	O
with	O
various	O
alternative	O
names	O
,	O
such	O
as	O
runtime	O
monitoring	O
,	O
runtime	O
checking	O
,	O
runtime	O
reflection	O
,	O
runtime	O
analysis	O
,	O
dynamic	O
analysis	O
,	O
runtime/dynamic	O
symbolic	O
analysis	O
,	O
trace	O
analysis	O
,	O
log	O
file	O
analysis	O
,	O
etc.	O
,	O
all	O
referring	O
to	O
instances	O
of	O
the	O
same	O
high-level	O
concept	O
applied	O
either	O
to	O
different	O
areas	O
or	O
by	O
scholars	O
from	O
different	O
communities	O
.	O
</s>
<s>
Runtime	B-Application
verification	I-Application
is	O
intimately	O
related	O
to	O
other	O
well-established	O
areas	O
,	O
such	O
as	O
testing	O
(	O
particularly	O
model-based	O
testing	O
)	O
when	O
used	O
before	O
deployment	O
and	O
fault-tolerant	B-General_Concept
systems	I-General_Concept
when	O
used	O
during	O
deployment	O
.	O
</s>
<s>
Within	O
the	O
broad	O
area	O
of	O
runtime	B-Application
verification	I-Application
,	O
one	O
can	O
distinguish	O
several	O
categories	O
,	O
such	O
as	O
:	O
</s>
<s>
"	O
specification-less	O
"	O
monitoring	O
that	O
targets	O
a	O
fixed	O
set	O
of	O
mostly	O
concurrency-related	O
properties	O
such	O
as	O
atomicity	O
.	O
</s>
<s>
monitoring	O
with	O
respect	O
to	O
temporal	O
logic	O
specifications	B-Application
;	O
early	O
contributions	O
in	O
this	O
direction	O
has	O
been	O
made	O
by	O
Lee	O
,	O
Kannan	O
,	O
and	O
their	O
collaborators	O
,	O
and	O
Havelund	O
and	O
Rosu	O
,	O
.	O
</s>
<s>
The	O
broad	O
field	O
of	O
runtime	B-Application
verification	I-Application
methods	O
can	O
be	O
classified	O
by	O
three	O
dimensions	O
:	O
</s>
<s>
in	O
form	O
of	O
log	B-Application
analysis	I-Application
(	O
offline	O
)	O
.	O
</s>
<s>
The	O
verifying	O
code	O
is	O
integrated	O
into	O
the	O
system	O
(	O
as	O
done	O
in	O
Aspect-oriented	B-Architecture
Programming	I-Architecture
)	O
or	O
is	O
provided	O
as	O
an	O
external	O
entity	O
.	O
</s>
<s>
The	O
monitor	O
can	O
report	O
violation	O
or	O
validation	O
of	O
the	O
desired	O
specification	B-Application
.	O
</s>
<s>
Nevertheless	O
,	O
the	O
basic	O
process	O
in	O
runtime	B-Application
verification	I-Application
remains	O
similar	O
:	O
</s>
<s>
A	O
monitor	O
is	O
created	O
from	O
some	O
formal	B-Application
specification	I-Application
.	O
</s>
<s>
To	O
transform	O
a	O
regular	B-Language
expression	I-Language
,	O
a	O
finite-state	B-Architecture
machine	I-Architecture
can	O
be	O
used	O
;	O
a	O
property	O
in	O
linear	O
temporal	O
logic	O
can	O
be	O
transformed	O
into	O
a	O
Büchi	B-General_Concept
automaton	I-General_Concept
(	O
see	O
also	O
Linear	B-Application
temporal	I-Application
logic	I-Application
to	I-Application
Büchi	I-Application
automaton	I-Application
)	O
.	O
</s>
<s>
The	O
monitor	O
verifies	O
the	O
received	O
event	O
trace	O
and	O
produces	O
a	O
verdict	O
whether	O
the	O
specification	B-Application
is	O
satisfied	O
.	O
</s>
<s>
The	O
examples	O
below	O
discuss	O
some	O
simple	O
properties	O
that	O
have	O
been	O
considered	O
,	O
possibly	O
with	O
small	O
variations	O
,	O
by	O
several	O
runtime	B-Application
verification	I-Application
groups	O
by	O
the	O
time	O
of	O
this	O
writing	O
(	O
April	O
2011	O
)	O
.	O
</s>
<s>
To	O
make	O
them	O
more	O
interesting	O
,	O
each	O
property	O
below	O
uses	O
a	O
different	O
specification	B-Application
formalism	O
and	O
all	O
of	O
them	O
are	O
parametric	O
.	O
</s>
<s>
Here	O
a	O
parametric	O
property	O
has	O
the	O
form	O
,	O
where	O
is	O
a	O
specification	B-Application
in	O
some	O
appropriate	O
formalism	O
referring	O
to	O
generic	O
(	O
uninstantiated	O
)	O
parametric	O
events	O
.	O
</s>
<s>
None	O
of	O
the	O
following	O
examples	O
are	O
specific	O
to	O
any	O
particular	O
runtime	B-Application
verification	I-Application
system	O
,	O
though	O
support	O
for	O
parameters	O
is	O
obviously	O
needed	O
.	O
</s>
<s>
In	O
the	O
following	O
examples	O
Java	B-Language
syntax	O
is	O
assumed	O
,	O
thus	O
"	O
==	O
"	O
is	O
logical	O
equality	O
,	O
while	O
"	O
=	O
"	O
is	O
assignment	O
.	O
</s>
<s>
Some	O
methods	O
(	O
e.g.	O
,	O
update( )	O
in	O
the	O
UnsafeEnumExample	O
)	O
are	O
dummy	O
methods	O
,	O
which	O
are	O
not	O
part	O
of	O
the	O
Java	B-Language
API	O
,	O
that	O
are	O
used	O
for	O
clarity	O
.	O
</s>
<s>
The	O
Java	B-Language
interface	O
requires	O
that	O
the	O
hasNext( )	O
method	O
be	O
called	O
and	O
return	O
true	O
before	O
the	O
next( )	O
method	O
is	O
called	O
.	O
</s>
<s>
The	O
figure	O
to	O
the	O
right	O
shows	O
a	O
finite	B-Architecture
state	I-Architecture
machine	I-Architecture
that	O
defines	O
a	O
possible	O
monitor	O
for	O
checking	O
and	O
enforcing	O
this	O
property	O
with	O
runtime	B-Application
verification	I-Application
.	O
</s>
<s>
Conceptually	O
,	O
this	O
means	O
that	O
there	O
will	O
be	O
one	O
copy	O
of	O
the	O
monitor	O
for	O
each	O
possible	O
Iterator	O
in	O
a	O
test	O
program	O
,	O
although	O
runtime	B-Application
verification	I-Application
systems	O
need	O
not	O
implement	O
their	O
parametric	O
monitors	O
this	O
way	O
.	O
</s>
<s>
The	O
monitor	O
for	O
this	O
property	O
would	O
be	O
set	O
to	O
trigger	O
a	O
handler	O
when	O
the	O
formula	O
is	O
violated	O
(	O
equivalently	O
when	O
the	O
finite	B-Architecture
state	I-Architecture
machine	I-Architecture
enters	O
the	O
error	O
state	O
)	O
,	O
which	O
will	O
occur	O
when	O
either	O
next( )	O
is	O
called	O
without	O
first	O
calling	O
hasNext( )	O
,	O
or	O
when	O
hasNext( )	O
is	O
called	O
before	O
next( )	O
,	O
but	O
returned	O
false	O
.	O
</s>
<s>
The	O
class	O
in	O
Java	B-Language
has	O
two	O
means	O
for	O
iterating	O
over	O
its	O
elements	O
.	O
</s>
<s>
Intuitively	O
,	O
and	O
as	O
above	O
runtime	B-Application
verification	I-Application
systems	O
need	O
not	O
implement	O
their	O
parametric	O
monitors	O
this	O
way	O
,	O
one	O
may	O
think	O
of	O
the	O
parametric	O
monitor	O
for	O
this	O
property	O
as	O
creating	O
and	O
keeping	O
track	O
of	O
a	O
non-parametric	O
monitor	O
instance	O
for	O
each	O
possible	O
pair	O
of	O
Vector	O
and	O
Enumeration	O
.	O
</s>
<s>
Some	O
events	O
may	O
concern	O
several	O
monitors	O
at	O
the	O
same	O
time	O
,	O
such	O
as	O
v.update( )	O
,	O
so	O
the	O
runtime	B-Application
verification	I-Application
system	O
must	O
(	O
again	O
conceptually	O
)	O
dispatch	O
them	O
to	O
all	O
interested	O
monitors	O
.	O
</s>
<s>
The	O
figure	O
to	O
the	O
right	O
shows	O
Java	B-Language
code	I-Language
that	O
matches	O
this	O
pattern	O
,	O
thus	O
violating	O
the	O
property	O
.	O
</s>
<s>
The	O
previous	O
two	O
examples	O
show	O
finite	B-Architecture
state	I-Architecture
properties	O
,	O
but	O
properties	O
used	O
in	O
runtime	B-Application
verification	I-Application
may	O
be	O
much	O
more	O
complex	O
.	O
</s>
<s>
Below	O
is	O
a	O
specification	B-Application
of	O
this	O
property	O
using	O
a	O
parametric	O
context-free	O
pattern	O
:	O
</s>
<s>
In	O
the	O
extreme	O
,	O
it	O
is	O
possible	O
that	O
there	O
will	O
be	O
an	O
instance	O
of	O
the	O
property	O
,	O
i.e.	O
,	O
a	O
copy	O
of	O
the	O
context-free	O
parsing	O
mechanism	O
,	O
for	O
each	O
possible	O
combination	O
of	O
Thread	O
with	O
Lock	O
;	O
this	O
happens	O
,	O
again	O
,	O
intuitively	O
,	O
because	O
runtime	B-Application
verification	I-Application
systems	O
may	O
implement	O
the	O
same	O
functionality	O
differently	O
.	O
</s>
<s>
Most	O
of	O
the	O
runtime	B-Application
verification	I-Application
research	O
addresses	O
one	O
or	O
more	O
of	O
the	O
topics	O
listed	O
below	O
.	O
</s>
<s>
It	O
is	O
important	O
to	O
reduce	O
the	O
overhead	O
of	O
runtime	B-Application
verification	I-Application
tools	O
as	O
much	O
as	O
possible	O
,	O
particularly	O
when	O
the	O
generated	O
monitors	O
are	O
deployed	O
with	O
the	O
system	O
.	O
</s>
<s>
Good	O
system	O
instrumentation	O
is	O
critical	O
for	O
any	O
runtime	B-Application
verification	I-Application
tool	O
,	O
unless	O
the	O
tool	O
explicitly	O
targets	O
existing	O
execution	O
logs	O
.	O
</s>
<s>
There	O
are	O
many	O
instrumentation	O
approaches	O
in	O
current	O
use	O
,	O
each	O
with	O
its	O
advantages	O
and	O
disadvantages	O
,	O
ranging	O
from	O
custom	O
or	O
manual	O
instrumentation	O
,	O
to	O
specialized	O
libraries	O
,	O
to	O
compilation	O
into	O
aspect-oriented	B-Architecture
languages	I-Architecture
,	O
to	O
augmenting	O
the	O
virtual	O
machine	O
,	O
to	O
building	O
upon	O
hardware	O
support	O
.	O
</s>
<s>
A	O
dual	O
and	O
ultimately	O
equivalent	O
approach	O
tends	O
to	O
become	O
the	O
norm	O
in	O
runtime	B-Application
verification	I-Application
,	O
namely	O
to	O
use	O
static	O
analysis	O
to	O
reduce	O
the	O
amount	O
of	O
otherwise	O
exhaustive	O
monitoring	O
.	O
</s>
<s>
However	O
,	O
unlike	O
in	O
other	O
verification	O
approaches	O
(	O
e.g.	O
,	O
model	B-Application
checking	I-Application
)	O
,	O
the	O
number	O
of	O
states	O
or	O
the	O
size	O
of	O
the	O
generated	O
monitor	O
is	O
less	O
important	O
in	O
runtime	B-Application
verification	I-Application
;	O
in	O
fact	O
,	O
some	O
monitors	O
can	O
have	O
infinitely	O
many	O
states	O
,	O
such	O
as	O
the	O
one	O
for	O
the	O
SafeLock	O
property	O
above	O
,	O
although	O
at	O
any	O
point	O
in	O
time	O
only	O
a	O
finite	O
number	O
of	O
states	O
may	O
have	O
occurred	O
.	O
</s>
<s>
One	O
of	O
the	O
major	O
practical	O
impediments	O
of	O
all	O
formal	O
approaches	O
is	O
that	O
their	O
users	O
are	O
reluctant	O
to	O
,	O
or	O
do	O
n't	O
know	O
and	O
do	O
n't	O
want	O
to	O
learn	O
how	O
to	O
read	O
or	O
write	O
specifications	B-Application
.	O
</s>
<s>
In	O
some	O
cases	O
the	O
specifications	B-Application
are	O
implicit	O
,	O
such	O
as	O
those	O
for	O
deadlocks	B-Operating_System
and	O
data-races	O
,	O
but	O
in	O
most	O
cases	O
they	O
need	O
to	O
be	O
produced	O
.	O
</s>
<s>
An	O
additional	O
inconvenience	O
,	O
particularly	O
in	O
the	O
context	O
of	O
runtime	B-Application
verification	I-Application
,	O
is	O
that	O
many	O
existing	O
specification	B-Application
languages	O
are	O
not	O
expressive	O
enough	O
to	O
capture	O
the	O
intended	O
properties	O
.	O
</s>
<s>
A	O
significant	O
amount	O
of	O
work	O
in	O
the	O
runtime	B-Application
verification	I-Application
community	O
has	O
been	O
put	O
into	O
designing	O
specification	B-Application
formalisms	O
that	O
fit	O
the	O
desired	O
application	O
domains	O
for	O
runtime	B-Application
verification	I-Application
better	O
than	O
the	O
conventional	O
specification	B-Application
formalisms	O
.	O
</s>
<s>
and	O
to	O
their	O
implementation	O
(	O
optimized	O
finite	B-Architecture
state	I-Architecture
machines	I-Architecture
instead	O
of	O
Büchi	B-General_Concept
automata	I-General_Concept
,	O
etc	O
.	O
)	O
.	O
</s>
<s>
Others	O
extend	O
existing	O
formalisms	O
with	O
features	O
that	O
are	O
amenable	O
for	O
runtime	B-Application
verification	I-Application
but	O
may	O
not	O
easily	O
be	O
for	O
other	O
verification	O
approaches	O
,	O
such	O
as	O
adding	O
parameters	O
,	O
as	O
seen	O
in	O
the	O
examples	O
above	O
.	O
</s>
<s>
Finally	O
,	O
there	O
are	O
specification	B-Application
formalisms	O
that	O
have	O
been	O
designed	O
specifically	O
for	O
runtime	B-Application
verification	I-Application
,	O
attempting	O
to	O
achieve	O
their	O
best	O
for	O
this	O
domain	O
and	O
caring	O
little	O
about	O
other	O
application	O
domains	O
.	O
</s>
<s>
Designing	O
universally	O
better	O
or	O
domain-specifically	O
better	O
specification	B-Application
formalisms	O
for	O
runtime	B-Application
verification	I-Application
is	O
and	O
will	O
continue	O
to	O
be	O
one	O
of	O
its	O
major	O
research	O
challenges	O
.	O
</s>
<s>
Compared	O
to	O
other	O
verification	O
approaches	O
,	O
runtime	B-Application
verification	I-Application
is	O
able	O
to	O
operate	O
on	O
concrete	O
values	O
of	O
system	O
state	O
variables	O
,	O
which	O
makes	O
it	O
possible	O
to	O
collect	O
statistical	O
information	O
about	O
the	O
program	O
execution	O
and	O
use	O
this	O
information	O
to	O
assess	O
complex	O
quantitative	O
properties	O
.	O
</s>
<s>
Reading	O
and	O
writing	O
property	O
specifications	B-Application
is	O
not	O
easy	O
for	O
non-experts	O
.	O
</s>
<s>
An	O
important	O
research	O
area	O
is	O
to	O
develop	O
powerful	O
user	O
interfaces	O
for	O
various	O
specification	B-Application
formalisms	O
that	O
would	O
allow	O
users	O
to	O
more	O
easily	O
understand	O
,	O
write	O
and	O
maybe	O
even	O
visualize	O
properties	O
.	O
</s>
<s>
Mining	O
specifications	B-Application
.	O
</s>
<s>
No	O
matter	O
what	O
tool	O
support	O
is	O
available	O
to	O
help	O
users	O
produce	O
specifications	B-Application
,	O
they	O
will	O
almost	O
always	O
be	O
more	O
pleased	O
to	O
have	O
to	O
write	O
no	O
specifications	B-Application
at	O
all	O
,	O
particularly	O
when	O
they	O
are	O
trivial	O
.	O
</s>
<s>
Even	O
if	O
the	O
overall	O
quality	O
of	O
the	O
automatically	O
mined	O
specifications	B-Application
is	O
expected	O
to	O
be	O
lower	O
than	O
that	O
of	O
manually	O
produced	O
specifications	B-Application
,	O
they	O
can	O
serve	O
as	O
a	O
start	O
point	O
for	O
the	O
latter	O
or	O
as	O
the	O
basis	O
for	O
automatic	O
runtime	B-Application
verification	I-Application
tools	O
aimed	O
specifically	O
at	O
finding	O
bugs	O
(	O
where	O
a	O
poor	O
specification	B-Application
turns	O
into	O
false	O
positives	O
or	O
negatives	O
,	O
often	O
acceptable	O
during	O
testing	O
)	O
.	O
</s>
<s>
When	O
runtime	B-Application
verification	I-Application
is	O
used	O
for	O
testing	O
,	O
one	O
can	O
afford	O
more	O
comprehensive	O
instrumentations	O
that	O
augment	O
events	O
with	O
important	O
system	O
information	O
that	O
can	O
be	O
used	O
by	O
the	O
monitors	O
to	O
construct	O
and	O
therefore	O
analyze	O
more	O
refined	O
models	O
of	O
the	O
executing	O
system	O
.	O
</s>
<s>
For	O
example	O
,	O
augmenting	O
events	O
with	O
Vector	B-Operating_System
clock	I-Operating_System
information	O
and	O
with	O
data	O
and	O
control	O
flow	O
information	O
allows	O
the	O
monitors	O
to	O
construct	O
a	O
causal	O
model	O
of	O
the	O
running	O
system	O
in	O
which	O
the	O
observed	O
execution	O
was	O
only	O
one	O
possible	O
instance	O
.	O
</s>
<s>
Unlike	O
testing	O
or	O
exhaustive	O
verification	O
,	O
runtime	B-Application
verification	I-Application
holds	O
the	O
promise	O
to	O
allow	O
the	O
system	O
to	O
recover	O
from	O
detected	O
violations	O
,	O
through	O
reconfiguration	O
,	O
micro-resets	O
,	O
or	O
through	O
finer	O
intervention	O
mechanisms	O
sometimes	O
referred	O
to	O
as	O
tuning	O
or	O
steering	O
.	O
</s>
<s>
Implementation	O
of	O
these	O
techniques	O
within	O
the	O
rigorous	O
framework	O
of	O
runtime	B-Application
verification	I-Application
gives	O
rise	O
to	O
additional	O
challenges	O
.	O
</s>
<s>
Specification	B-Application
of	O
actions	O
.	O
</s>
<s>
However	O
,	O
at	O
the	O
specification	B-Application
level	O
,	O
we	O
need	O
to	O
provide	O
the	O
user	O
with	O
a	O
declarative	O
way	O
of	O
providing	O
feedback	O
to	O
the	O
system	O
by	O
specifying	O
what	O
actions	O
should	O
be	O
applied	O
when	O
under	O
what	O
conditions	O
.	O
</s>
<s>
Researchers	O
in	O
Runtime	B-Application
Verification	I-Application
recognized	O
the	O
potential	O
for	O
using	O
Aspect-oriented	B-Architecture
Programming	I-Architecture
as	O
a	O
technique	O
for	O
defining	O
program	O
instrumentation	O
in	O
a	O
modular	O
way	O
.	O
</s>
<s>
Aspect-oriented	B-Architecture
programming	I-Architecture
(	O
AOP	O
)	O
generally	O
promotes	O
the	O
modularization	O
of	O
crosscutting	O
concerns	O
.	O
</s>
<s>
Runtime	B-Application
Verification	I-Application
naturally	O
is	O
one	O
such	O
concern	O
and	O
can	O
hence	O
benefit	O
from	O
certain	O
properties	O
of	O
AOP	O
.	O
</s>
<s>
Aspect-oriented	B-Architecture
monitor	O
definitions	O
are	O
largely	O
declarative	O
,	O
and	O
hence	O
tend	O
to	O
be	O
simpler	O
to	O
reason	O
about	O
than	O
instrumentation	O
expressed	O
through	O
a	O
program	B-Application
transformation	I-Application
written	O
in	O
an	O
imperative	O
programming	O
language	O
.	O
</s>
<s>
Many	O
current	O
runtime	B-Application
verification	I-Application
tools	O
are	O
hence	O
built	O
in	O
the	O
form	O
of	O
specification	B-Application
compilers	O
,	O
that	O
take	O
an	O
expressive	O
high-level	O
specification	B-Application
as	O
input	O
and	O
produce	O
as	O
output	O
code	O
written	O
in	O
some	O
Aspect-oriented	B-Architecture
programming	I-Architecture
language	O
(	O
such	O
as	O
AspectJ	B-Application
)	O
.	O
</s>
<s>
Runtime	B-Application
verification	I-Application
,	O
if	O
used	O
in	O
combination	O
with	O
provably	O
correct	O
recovery	O
code	O
,	O
can	O
provide	O
an	O
invaluable	O
infrastructure	O
for	O
program	O
verification	O
,	O
which	O
can	O
significantly	O
lower	O
the	O
latter	O
's	O
complexity	O
.	O
</s>
<s>
Looking	O
at	O
from	O
the	O
other	O
direction	O
,	O
one	O
can	O
use	O
formal	O
verification	O
to	O
reduce	O
the	O
overhead	O
of	O
runtime	B-Application
verification	I-Application
,	O
as	O
already	O
mentioned	O
above	O
for	O
static	O
analysis	O
instead	O
of	O
formal	O
verification	O
.	O
</s>
<s>
Then	O
one	O
can	O
use	O
formal	O
verification	O
(	O
or	O
static	O
analysis	O
)	O
to	O
discharge	O
monitors	O
,	O
same	O
way	O
a	O
compiler	O
uses	O
static	O
analysis	O
to	O
discharge	O
runtime	O
checks	O
of	O
type	O
correctness	O
or	O
memory	B-Application
safety	I-Application
.	O
</s>
<s>
Compared	O
to	O
the	O
more	O
traditional	O
verification	O
approaches	O
,	O
an	O
immediate	O
disadvantage	O
of	O
runtime	B-Application
verification	I-Application
is	O
its	O
reduced	O
coverage	O
.	O
</s>
<s>
This	O
is	O
not	O
problematic	O
when	O
the	O
runtime	O
monitors	O
are	O
deployed	O
with	O
the	O
system	O
(	O
together	O
with	O
appropriate	O
recovery	O
code	O
to	O
be	O
executed	O
when	O
the	O
property	O
is	O
violated	O
)	O
,	O
but	O
it	O
may	O
limit	O
the	O
effectiveness	O
of	O
runtime	B-Application
verification	I-Application
when	O
used	O
to	O
find	O
errors	O
in	O
systems	O
.	O
</s>
<s>
Techniques	O
to	O
increase	O
the	O
coverage	O
of	O
runtime	B-Application
verification	I-Application
for	O
error	O
detection	O
purposes	O
include	O
:	O
</s>
<s>
That	O
holds	O
true	O
for	O
runtime	B-Application
verification	I-Application
used	O
for	O
error	O
detection	O
,	O
too	O
,	O
but	O
in	O
addition	O
to	O
using	O
the	O
program	O
code	O
to	O
drive	O
the	O
input	O
generation	O
process	O
,	O
in	O
runtime	B-Application
verification	I-Application
one	O
can	O
also	O
use	O
the	O
property	O
specifications	B-Application
,	O
when	O
available	O
,	O
and	O
can	O
also	O
use	O
monitoring	O
techniques	O
to	O
induce	O
desired	O
behaviors	O
.	O
</s>
<s>
This	O
use	O
of	O
runtime	B-Application
verification	I-Application
makes	O
it	O
closely	O
related	O
to	O
model-based	O
testing	O
,	O
although	O
the	O
runtime	B-Application
verification	I-Application
specifications	B-Application
are	O
typically	O
general	O
purpose	O
,	O
not	O
necessarily	O
crafted	O
for	O
testing	O
reasons	O
.	O
</s>
