12.07.2015 Views

Full Theoretical Runtime Analysis of Alternating ... - IEEE Xplore

Full Theoretical Runtime Analysis of Alternating ... - IEEE Xplore

Full Theoretical Runtime Analysis of Alternating ... - IEEE Xplore

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.

In our analyses, the size n <strong>of</strong> the problem defines therange R = {−n/2 +1,...,n/2} in which the variablesin I can be chosen (i.e., x, y, z ∈ R). Hence, the searchspace S is defined as S = {(x, y, z)|x, y, z ∈ R}, and it iscomposed <strong>of</strong> n 3 elements. Without loss <strong>of</strong> generality n iseven. To obtain full coverage, it is necessary that n ≥ 8,otherwise the branch regarding the classification as scalenewill never be covered. Note that one can consider differenttypes <strong>of</strong> R (e.g., R ′ = {0,...,n}), and each type may leadto different behaviours <strong>of</strong> the search algorithms. We basedour choice on what is commonly used in literature. For simplicityand without loss <strong>of</strong> generality, search algorithms areallowed to generate solutions outside S. In fact, R is mainlyused when random solutions need to be initialised.The employed fitness function f is the commonly usedapproximation level A plus the branch distance δ [15]. Fora target branch z, we have that the fitness function f z is:f z (I) =A z (I)+ω(δ w (I)) .Note that the branch distance δ is calculated on the node<strong>of</strong> diversion, i.e. the last node in which a critical decision(not taking the branch w) is made that makes the execution<strong>of</strong> z not possible. For example, branch z could be nestedto a node N (in the control flow graph) in which branch wrepresents the then branch. If the execution flow reachesN but then the else branch is taken, then N is the node <strong>of</strong>diversion for z. The search hence gets guided by δ w to enterin the nested branches.Let be {N 0 ,...,N k } the sequence <strong>of</strong> diversion nodesfor the target z, with N i nested to all N j>i . Let be D i theset <strong>of</strong> inputs for which the computation diverges at node N iand none <strong>of</strong> the nested nodes N j0, the fitness functions for the 12branches (i.e., f i is the fitness function for branch ID i )areshown in Figure 2. Note that the branch distance dependson the status <strong>of</strong> the computation (e.g., the values <strong>of</strong> the localvariables) when the predicates are evaluated. For simplicity,in an equivalent way we show the fitness functions basedonly on the inputs I.1: int tri_type(int x, int y, int z) {2: int type;3: int a=x, b=y, c=z;4: if (x > y) { /* ID_0 */5: int t = a; a = b; b = t;6: } else { /* ID_1 */}7: if (a > z) { /* ID_2 */8: int t = a; a = c; c = t;9: } else { /* ID_3 */}10: if (b > c) { /* ID_4 */11: int t = b; b = c; c = t;12: } else { /* ID_5 */}13: if (a + b

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

Saved successfully!

Ooh no, something went wrong!