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.

330 Levi Lúcio and Marko Samer<br />

1<br />

2<br />

3<br />

4<br />

✎ ☞<br />

Modulo<br />

✍ ✌<br />

✟<br />

✟ ❍<br />

❍❍❍<br />

✟<br />

✟<br />

b? k<br />

�<br />

�<br />

❅<br />

❅<br />

�<br />

�<br />

❅<br />

❅<br />

= m? > m? mod2 = 0 mod2 = 1<br />

�<br />

�<br />

�<br />

� �<br />

�<br />

Fig. 12.1. Classification-tree of Modulo<br />

ever, new disjuncts maybe <strong>in</strong>troduced. This can be corrected by post-process<strong>in</strong>g<br />

the disjuncts after the elim<strong>in</strong>ation step.<br />

As already mentioned, each of the disjuncts obta<strong>in</strong>ed by this procedure represents<br />

a test case. Thus, the disjuncts can be separated <strong>in</strong>to schemas for each<br />

test case with the same declaration part as the orig<strong>in</strong>al schema and one of the<br />

disjuncts as predicate part respectively. Case studies by Helke et al. [HNS97]<br />

have shown that most of the generated test cases after the first step are not<br />

satisfiable. Therefore, the second step, i.e., the simplification by remov<strong>in</strong>g unsatisfiable<br />

disjuncts and reduc<strong>in</strong>g redundancy, is the most expensive part <strong>in</strong> this<br />

approach.<br />

The Classification-Tree Method. The drawback of such purely syntaxoriented<br />

approaches as proposed by Helke et al. [HNS97] is that the user has<br />

only little <strong>in</strong>fluence on the generation of relevant test cases. Therefore, a comb<strong>in</strong>ation<br />

with the semantic-oriented approach of classification-trees [GG93] was<br />

<strong>in</strong>vestigated by S<strong>in</strong>gh et al. and Sadeghipour [SCS97, Sad98]. In the classification-tree<br />

method, the test object is analyzed with respect to properties which<br />

are considered to be relevant for the test. For each such property, a disjo<strong>in</strong>t<br />

partition<strong>in</strong>g is performed. The partitions can then be further classified until a<br />

sufficiently ref<strong>in</strong>ed partition<strong>in</strong>g is reached. It is easy to see that this ref<strong>in</strong>ement<br />

process can be graphically represented as a tree, the classification-tree.<br />

For <strong>in</strong>stance, the classification-tree of the schema Modulo <strong>in</strong> Sec. 12.2.1 concern<strong>in</strong>g<br />

the variables b? andk is shown <strong>in</strong> Fig. 12.1. In this tree, b? is partitioned<br />

depend<strong>in</strong>g on be<strong>in</strong>g equal to or greater than m?, and k is partitioned depend<strong>in</strong>g<br />

on be<strong>in</strong>g even or odd. Each comb<strong>in</strong>ation of the leaves of different classifications<br />

<strong>in</strong> such a tree represents a high-level test case. In our example, each row <strong>in</strong> the<br />

comb<strong>in</strong>ation table below the classification-tree represents such a high-level test<br />

case (accord<strong>in</strong>g to the marked po<strong>in</strong>ts <strong>in</strong> the table).<br />

S<strong>in</strong>ce these test cases conta<strong>in</strong> only variables occurr<strong>in</strong>g <strong>in</strong> the classificationtree,<br />

we have to add them as additional predicate to the orig<strong>in</strong>al schema <strong>in</strong><br />

order to obta<strong>in</strong> complete test cases. For <strong>in</strong>stance, if we add the fourth test case<br />

�<br />

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

Saved successfully!

Ooh no, something went wrong!