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.

576 Therese Berg and Harald Raffelt<br />

19.4 Learn<strong>in</strong>g F<strong>in</strong>ite State Mach<strong>in</strong>es<br />

Techniques such as model check<strong>in</strong>g and model-based test-generation are a convenient<br />

way to automatically improve a system’s reliability as a system conform<strong>in</strong>g<br />

to its specification. The problem is that <strong>in</strong> many cases a model of the system<br />

does not exist or if it does, it is outdated. If the model is to be constructed by<br />

hand this may be time-consum<strong>in</strong>g and it is very much dependent on how familiar<br />

the test eng<strong>in</strong>eer is with the system under test (SUT). A way to facilitate<br />

the test eng<strong>in</strong>eer’s work and derive a more reliable model, is to automate the<br />

generation of a model of the SUT. A proposed procedure to atta<strong>in</strong> this is to<br />

apply a technique called model learn<strong>in</strong>g, sometimes also called model <strong>in</strong>ference.<br />

This section will expla<strong>in</strong> how a so called learn<strong>in</strong>g algorithm builds a model<br />

of a system under test. The SUT considered is a black box, i.e., we have no<br />

<strong>in</strong>formation about its <strong>in</strong>ternal structure. We do make the assumption that the<br />

SUT can be modeled as a determ<strong>in</strong>istic f<strong>in</strong>ite state automaton (DFA). We also<br />

assume that we know which actions the SUT is able to perform, here called the<br />

alphabet Σ. The m<strong>in</strong>imal model of the SUT is the DFA denoted M. Theregular<br />

language accepted by the f<strong>in</strong>ite state automaton is denoted L (M), also referred<br />

to as U.<br />

The basic set-up for all of the variants of the learn<strong>in</strong>g algorithm expla<strong>in</strong>ed<br />

<strong>in</strong> this section is presented <strong>in</strong> Figure 19.7. The Learner represents the algorithm<br />

which is try<strong>in</strong>g to estimate U. The Learner estimates U iteratively through<br />

gather<strong>in</strong>g enough pieces of <strong>in</strong>formation about U until it is able to construct a<br />

hypothesis, also called conjecture or approximation of U. The hypothesis is a<br />

DFA A with the language L (A). If the conjecture is <strong>in</strong>correct the learner will<br />

cont<strong>in</strong>ue to collect <strong>in</strong>formation until it can construct a “better” conjecture. The<br />

Learner iterates <strong>in</strong> this fashion until the hypothesis is correct.<br />

Mach<strong>in</strong>e M<br />

Teacher<br />

mq<br />

+/-<br />

eq<br />

Learner<br />

Oracle correct/<br />

c.ex.<br />

Fig. 19.7. Learn<strong>in</strong>g an Automaton.<br />

More specifically, the Learner is able to query the Teacher whether a str<strong>in</strong>g<br />

is accepted by M or not and the answers will be yes (+) or no (−), seen <strong>in</strong><br />

Figure 19.7. A query to the Teacher is called membership query (mq). The<br />

name refers to the question whether a str<strong>in</strong>g is a member of L (M) ornot.<br />

Furthermore the Learner can ask an equivalence query (eq) to an Oracle<br />

whether the approximation A is correct or not. If the Oracle deems that the<br />

conjecture is equivalent to M it confirms the correctness of the hypothesis,

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

Saved successfully!

Ooh no, something went wrong!