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

Create successful ePaper yourself

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

78 Henrik Björklund<br />

Proposition 3.7 ([Nai97]). If GI is the <strong>in</strong>ference graph of Mealy mach<strong>in</strong>e M,<br />

and state s does not have any outgo<strong>in</strong>g edges <strong>in</strong> GI , then s does not have a UIO<br />

sequence.<br />

Proof. In the transition graph G of M, all outgo<strong>in</strong>g edges from s must be converg<strong>in</strong>g,<br />

s<strong>in</strong>ce none of them appear <strong>in</strong> GI . This means that for every transition<br />

from s to some state t, there is another state s ′ �= s such that s ′ has a transition<br />

with the same label that also leads to t. Thus for any <strong>in</strong>put sequence, there is<br />

some state other than s that produces the same output as s, sos cannot have a<br />

UIO sequence.<br />

3.4 Algorithms<br />

In Section 3.2 it was shown that the problem of determ<strong>in</strong><strong>in</strong>g whether a given<br />

state of a Mealy mach<strong>in</strong>e has a UIO sequence is PSPACE-complete. Thus there<br />

is presumably no efficient, polynomial time, algorithm for the general state verification<br />

problem. However, it turns out that <strong>in</strong> practice, it is solvable for many<br />

mach<strong>in</strong>es, and UIO sequences are used as parts of many conformance test<strong>in</strong>g<br />

algorithms. In this section, algorithms for f<strong>in</strong>d<strong>in</strong>g UIO sequences are discussed.<br />

The first two have exponential worst-case complexity, but work better <strong>in</strong> many<br />

practical applications. The third is a genetic algorithm, that is not always guaranteed<br />

to f<strong>in</strong>d all UIO sequences.<br />

3.4.1 The Sabnani-Dahbura Algorithm<br />

In 1988 Sabnani and Dahbura presented a test generation procedure for conformance<br />

test<strong>in</strong>g [SD88]. It uses state verification, and <strong>in</strong>cludes a procedure for<br />

comput<strong>in</strong>g UIO sequences. For their purposes, it is enough to compute sequences<br />

of length at most 2n2 ,wherenis the number of states, if they exist, but the<br />

procedure can be extended to compute longer sequences.<br />

The basic idea when try<strong>in</strong>g to f<strong>in</strong>d a UIO sequence for a given state s is<br />

to naively generate all <strong>in</strong>put sequences, <strong>in</strong> order of ascend<strong>in</strong>g length. For each<br />

sequence x , the algorithm then computes λ(s, x ) and tests it for uniqueness,<br />

until a UIO sequence for s is found. The search space of all possible <strong>in</strong>put-output<br />

sequences is thus exam<strong>in</strong>ed <strong>in</strong> a breadth-first manner. S<strong>in</strong>ce the test generation<br />

procedure of Sabnani and Dahbura [SD88] is only <strong>in</strong>terested <strong>in</strong> sequences of<br />

length at most 2n2 , the search is term<strong>in</strong>ated at this depth, even if a UIO sequence<br />

has not been found. If we are also <strong>in</strong>terested <strong>in</strong> longer sequences, another upper<br />

bound, e.g., the n · 2n from Section 3.2, must be supplied to ensure term<strong>in</strong>ation.<br />

The algorithm searches the tree of all possible <strong>in</strong>put-output sequences breadth<br />

first, without try<strong>in</strong>g to take advantage of any structural properties of the mach<strong>in</strong>e<br />

under test.<br />

S<strong>in</strong>ce the problem is PSPACE-complete, we cannot hope to solve the problem<br />

quickly <strong>in</strong> the general case. The algorithms are, however, <strong>in</strong>tended for practical<br />

use, and therefore it seems like a good idea to analyze the <strong>in</strong>put mach<strong>in</strong>e<br />

<strong>in</strong> order to take advantage of any particularities that can help us. The next<br />

algorithm we consider tries to do this.

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

Saved successfully!

Ooh no, something went wrong!