07.01.2013 Views

Lecture Notes in Computer Science 3472

Lecture Notes in Computer Science 3472

Lecture Notes in Computer Science 3472

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

18 Run-Time Verification 551<br />

gather data from onl<strong>in</strong>e services. Then, they compute <strong>in</strong>variants over multiple<br />

numeric fields by Daikon and compute <strong>in</strong>variants over s<strong>in</strong>gle numeric fields by<br />

statistic estimations [RKS02]. Invariants can be used to monitor the evolution of<br />

data feed systems with respect to both updates to implemented functionalities<br />

and sensible modifications on data sources. Verification is performed at the clientside<br />

and can be used to check multiple data feed systems provid<strong>in</strong>g similar<br />

services.<br />

The Behavior Capture and Test (BCT) [MP05] technique verifies at run-time<br />

learned <strong>in</strong>variants <strong>in</strong> the case of component-based and object-oriented software<br />

even without requir<strong>in</strong>g source code. BCT uses the Object Flatten<strong>in</strong>g technique<br />

to automatically extract state data from objects. Object Flatten<strong>in</strong>g recognizes<br />

non-<strong>in</strong>trusive methods, named <strong>in</strong>spectors, of a given object by a heuristic. Selected<br />

<strong>in</strong>spectors are then <strong>in</strong>voked to get the <strong>in</strong>ternal state of the object. In<br />

case the <strong>in</strong>ternal state is an object, the approach is recursively applied until a<br />

given depth or until a primitive data type is obta<strong>in</strong>ed. Heuristical selection of<br />

<strong>in</strong>spectors is based on both language <strong>in</strong>trospection, to automatically gather the<br />

signature of the methods, and conventions on writ<strong>in</strong>g code, to select <strong>in</strong>spectors<br />

by syntactic <strong>in</strong>formation. The behavior of the Object Flatten<strong>in</strong>g technique is<br />

highly configurable and can be adapted to arbitrary enterprise notations. Once<br />

state data has been extracted, BCT uses the <strong>in</strong>variant <strong>in</strong>ference eng<strong>in</strong>e implemented<br />

<strong>in</strong> Daikon to derive <strong>in</strong>variants.<br />

BCT <strong>in</strong>fers also <strong>in</strong>teraction <strong>in</strong>variants represent<strong>in</strong>g the <strong>in</strong>teraction protocol<br />

used by components to <strong>in</strong>teract. This protocol is synthesized <strong>in</strong> a regular expression<br />

summariz<strong>in</strong>g all observed behaviors. Letters of the alphabet used to<br />

def<strong>in</strong>e regular expressions correspond to methods implemented by components<br />

of the system, and the language generated by a given regular expression of a<br />

component C corresponds to all acceptable behaviors that the component C can<br />

perform. In particular, the regular expression is derived by merg<strong>in</strong>g the observed<br />

<strong>in</strong>teraction patterns and by generat<strong>in</strong>g new behaviors as natural generalization<br />

of the observed one [MP05].<br />

BCT checks at run-time both <strong>in</strong>teraction and object-oriented <strong>in</strong>variants by<br />

automatically generated monitors which capture both requests and results of<br />

performed computations.<br />

Debugg<strong>in</strong>g by Invariants The DIDUCE tool [HL02a] <strong>in</strong>struments the source<br />

code to derive <strong>in</strong>variants that are cont<strong>in</strong>uously verified and updated at runtime.<br />

The technique seriously takes <strong>in</strong>to consideration the amount of consumed<br />

resources, thus lightweight computations of <strong>in</strong>variants is obta<strong>in</strong>ed at the cost of<br />

limited expressiveness power of the <strong>in</strong>ferred <strong>in</strong>variants. In fact, the <strong>in</strong>strumentation<br />

consists of check<strong>in</strong>g equality of object references, static variables, <strong>in</strong>put<br />

parameters and return values, with respect to a fixed value. Invariants are relaxed<br />

upon violation, <strong>in</strong> particular a mask def<strong>in</strong>es the bits that must be checked<br />

for equality. Each time the equality between the expected value and the observed<br />

value is falsified for a bit, the mask is modified and the correspond<strong>in</strong>g bit is not<br />

checked anymore. The <strong>in</strong>ference technique consumes little time and memory, but

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

Saved successfully!

Ooh no, something went wrong!