A framework and a web implementation for combinatorial testing
|
|
|
- Gladys Stevens
- 10 years ago
- Views:
Transcription
1 A framework and a web implementation for combinatorial testing Macario Polo Usaola and Beatriz Pérez Lamancha University of Castilla-La Mancha Paseo de la Universidad, Ciudad Real (Spain) Tel.: contact person: [email protected] Abstract. Combinatorial strategies have been widely used for test case generation. In spite of this, few available tools exist which put the implementation of such strategies at the disposal of researchers and practitioners. This article provides a short of review of some strategies and makes them available by means of a website with which, furthermore, test case source code can be generated by means of a simple (but effective) set of reserved words. All the algorithms are based on a hierarchical class structure that takes advantage of the definitions given in an Algorithm superclass. Moreover, test cases are managed as integer numbers instead of test cases or combinations, which provides additional contributions to the use of time and memory. Additionally, the article also presents Comb, a new combination strategy which provides quite good results in very little time, as well as a customized version of a pairwise algorithm. 1. INTRODUCTION According to Myers [1], a good test case is one that has a high probability of detecting an as yet undiscovered error. Thus, writing good test cases requires the execution of the system under test (SUT) in such way that as many errors as possible appear. For this, the SUT s services must receive, in their parameters, values that try to lead the system into an incorrect or unexpected state, which means that the test case has found an error. In general, a first step for having good test cases is the identification of good test values, which are combined in a second step to generate good test cases. For the first point, techniques such as category-partition, boundary values and error guessing [1] are well known and widely used. Once the values have been proposed, they must be adequately combined to obtain good test cases that will probably highlight certain types of errors. Regarding the second point, many errors only arise with the specific interaction of 1
2 certain values of two or more parameters, which is one of the fundamentals of combinatorial testing [2]. In this respect, Grindal et al. carried out a literature search and found 16 different combination strategies described in more than 40 papers published between 1985 and 2004, which were reviewed and collected together in a single survey article [3]. Figure 1 reproduces the classification schema of these authors, which categorizes each technique as deterministic or non-deterministic, generally depending on whether the application of the technique always produces the same results with the same input data. One of the problems with combinatorial testing is finding a compromise between the size of the test suite and its ability to find faults. Take, for example, an object-oriented version of the classic triangle-type determination problem [1]: it consists of a class with three methods to assign values to the three sides of a triangle, plus an additional method to determine its type (an object-oriented version is reported in [4]). Supposing there are four possible values (i.e., {1, 2, 3, 4) for the three parameters, the most exhaustive test set would be composed of 4 4 4=64 test cases, which proceeds from the application of the Deterministic, Iterative and Test case based technique called All combinations. However, many of these test cases will be redundant with respect to others: for example, the test case with the values {2, 2, 2 (corresponding to an equilateral triangle) will probably not find any error that {1, 1, 1 has not previously found. On the other hand, the Each choice technique, in the same category (Test case based), requires that each test value be included in a test case. This technique produces few test cases: for the triangle problem, {(1, 2, 3), (2, 1, 2), (3, 4, 1), (4, 4, 3) is a sufficient set from the Each choice point of view. However, it is likely that the ability of this test set to find faults in the triangle-type class will be very limited. 2
3 Combination strategies Non-deterministic Deterministic Heuristic Artificial- Life based Random Iterative Instant AETG Simulated Annealing Genetic algorithms Ant colony algorithms Test case based Parameter based Orthogonal arrays Covering arrays CATS (t-wise) Each choice Partly pair-wise K-bound Antirandom K-perim Base choice All combinations In parameter order Figure 1. Classification tree for combination strategies (adapted from [3]). Therefore, each technique may or may not be appropriate for any given software and will have advantages and drawbacks, which are some of most important reasons for researching the development of combination strategies. Indeed, a combination strategy is an algorithm which takes a set of test data as inputs and produces a set of test cases as output: inputs are usually provided by the test engineer, and are the values which proceed from the application of one of the aforementioned basic techniques, or from his/her knowledge and experience. The output is generated according to the rules of the specific combination strategy, and consists of sets of combinations of the values of each input set. This article describes an object-oriented model for representing combination strategies such as those represented in Figure 1, as well as the definition of such algorithms. Some of them have been implemented and released into a reusable Java framework, and published on an operative website which can be freely used by users. Some of the algorithms have been also implemented in Microsoft Excel and can be downloaded from the same site. One of the core ideas of the article is the possibility of enumerating all the possible combinations by means of an iterative algorithm which implements the Allcombinations strategy: since the cardinal of all combinations is known a priori (the product of the cardinals of all sets), the algorithm makes it possible to obtain an arbitrary combination given its index. In this way, combinations are actually managed as 3
4 integer numbers (instead of sets of values), which has important implications and advantages regarding memory usage and computational costs. The article also includes two new combination strategies, the first of which is called Comb, whose idea was inspired by the way Antirandom selects test cases [5]. A comparative analysis of both algorithms is included. The second is a selective pairwise algorithm, and proceeds from the actual application of the tool to a software product line project; the idea is to produce pairwise test cases, but exclude any visiting undesired or unneeded pairs. This article is organized as follows: the next section provides an overview of some techniques used for the validation of testing techniques. Section 3 describes an iterative algorithm to generate all combinations. Section 4 presents the software architecture of the library implemented as well as the implementation of some algorithms. Section 4.7 includes some experimental comparisons of different algorithms. Section 6 lists and explains the three releases of the combinatorial system. Finally, Section 7 describes our conclusions and future lines of work. 2. RELATED WORK Most likely, the most widely-used technique to assess the quality of test suites and test generation techniques is mutation, a white-box testing technique based on mutants. A mutant M of a program under test P is a copy of P, but it contains a small change in its code, which is interpreted as a fault. The idea of mutation testing is to write test cases detecting those faults:. simplifying, the more faults found by the test cases, the better the quality of the test suite is. The quality of a test suite is measured in terms of the mutation score, which is the percentage of non-equivalent mutants killed (Figure 2) [6]. K MS( P, T ) =, where: ( M E) P : program under test T : test suite K : number of killed mutants M : number of generated mutants E : number of equivalent mutants Figure 2. Mutation score On the other hand, when the source code is not available or when, for any reason, the developer of a system is not interested in white-box testing, an additional technique to validate the quality of the testing is the assessment of n-wise coverage. Given a set of parameters, each with a set of values, a test suite covers n-wise if any combination of n values of n different parameters is covered by at least one test case. Related to this, 4
5 many combination strategies have been proposed which are summarized in an excellent survey published in 2005 [3]. Since this paper deals with combinatorial strategies for test case generation, we focus on the descriptions of the algorithms, on their implementations and on the mechanism used to make them available to the community. The comparisons shown in Section 5 are therefore based on common parameters for this type of strategy, such as generation time and test data pairs visited. The power of each strategy for white-box coverage (for example, detecting the artificial faults injected into mutants) is beyond the scope of this article. 3. ENUMERATION OF ALL COMBINATIONS All test cases produced by deterministic strategies are contained in test cases produced by All combinations. Actually, All combinations considers each parameter as a set, and it generates test cases by computing the Cartesian product of all of them. The algorithm for constructing the Cartesian product of n sets is almost trivial: if n is known, only n nested loops are required. Otherwise, it can be easily implemented with recursion: the algorithm in Figure 3 returns the Cartesian product of S, a set of n sets (S={S 1, S 2, S n ). In both cases, the cost of the algorithm is Ο( S ), where n is the number of sets (i.e., the number of parameters) and S i is the cardinal of each set (i.e., the number of values in each parameter). function cartesianproduct({s) : Set(Combinations) { return cartesianproduct(0, {S) function cartesianproduct(index, {S):Set(Combinations) { result : Set(Combinations)= if (index= S ) { return else { foreach (element S index) { foreach (combination CartesianProduct(index+1, {S)) { combination=combination { element result.add(combination) return result Figure 3. Recursive algorithm to obtain the Cartesian product of n sets Since the combinations proceeding from the Cartesian product depend on both the number of sets and on the number of elements in each set, it is possible to write a nonrecursive algorithm to enumerate all combinations. As an example, Table 2 shows the Cartesian product of the three parameters in Table 1: there are 4*3*2=24 combinations, n i= 1 i 5
6 each representing a test case. A={1, 2, 3, 4 B={5, 6, 7 C={8, 9 Table 1. Three parameters with their test values The first column of Table 2 represents the zero-based index (i) of the combination; the second, third and fourth columns show the element of each set which contributes to the i-th combination. Finally, the indexes column shows the positions of the elements in their respective sets comprising this combination. As can be seen, the elements corresponding to the third parameter change in each combination, and appear again every C combinations (in this example, since the cardinal of C is 2, each value is repeated every 2 combinations). Each element of B appears C =2 times running. In the same way, each element of A appears B C times running. i A[i] B[i] C[i] indexes {0, 0, {0, 0, {0, 1, {0, 1, {0, 2, {0, 2, {1, 0, {1, 0, {1, 1, {1, 1, {1, 2, {1, 2, {2, 0, {2, 0, {2, 1, {2, 1, {2, 2, {2, 2, {3, 0, {3, 0, {3, 1, {3, 1, {3, 2, {3, 2, 1 Table 2. Cartesian product of the sets in Table 1 In general, having n sets {S 1, S 2, S n, each element of S 1 will appear S 2 S 3 S n times running; elements in S 2, S 3 S 4 S n, etc. Elements in S n appear one time running. Since the number of combinations is known a priori ( S i ), given an arbitrary in- n i= 1 6
7 dex i, n i= 1 S i 0 i <, it is possible to know the combination corresponding to that index. The first loop in the algorithm in Figure 4 evaluates the number of combinations (i.e., the size of the Cartesian product). Then, during numberofcombination times (second loop), the elements in the i-th combination are calculated and added to the result variable, which is returned. function cartesianproduct({s) : Set(Combinations) { numberofcombinations : int = 1; for (i=0; i< S ; i++) { numberofcombinations=numberofcobinations* S i result : Set(Combinations)= for (i=0; i<numberofcombinations; i++) { result= result getcombination(s, i) return result Figure 4. Iterative algorithm to obtain the Cartesian product of n sets (version 1) In order to complete the algorithm, the getcombination function must be implemented. This function must return the combination corresponding to the i index and the sets in S. Each combination is comprised of S elements (the first from the first set, the second from the second set, etc.). For the last set (S n ), the element to be included in the i-th combination will appear in the last position of the combination, and this is the element of S n given by the expression i% S n (note the combination ordering in Table 2). In general, given an arbitrary combination index i, the position of the value of the S j set to be included in that combination depends on the number of values in S j+1, S j+2,, S n. Thus, the selected value from the j-th set for the i-th combination is the element of S j placed at the position given by Equation 1. i positionofthevalue( j, i) = % S j divisors j Equation 1 divisors j is the product of the cardinals from S j to S n, and is 1 for S n. For the example of sets A, B, C (Table 1): divisor A = B C =3 2=6 divisor B = C =2 divisor C =1 Therefore, the function shown in Figure 4 can be rewritten as in Figure 5: now, the nested loop assigns the corresponding divisor of each set to the divisors variable. Later, in the second outer loop, the getcombination function is called, now with three parame- 7
8 ters: The set of sets (S) The index of the desired combination (i) The values of the divisors. Passing this variable as a parameter, the function prevents its computation in every iteration. function cartesianproduct({s) : Set(Combinations) { numberofcombinations : int = 1; divisors : int[] = new int[ S ] for (i=0; i< S ; i++) { numberofcombinations=numberofcobinations* S i divisors[i]=1 for (j=0; j< S ; j++) { divisors[i]=divisors[i]* S j] result : Set(Combinations)= for (i=0; i<numberofcombinations; i++) { result= result getcombination(s, i, divisors) return result Figure 5. Iterative algorithm to obtain the Cartesian product of n sets (version 2) Finally, the getcombination function remains as in Figure 6, whose cost is O ( S ) : function getcombination(s, index, divisors) : Combination { result : Combination = new int[ S ] for (int i=0; i< S ; i++) { result[i]=(index/divisors[i])% S i return result Figure 6. Algorithm to obtain an arbitrary combination The cost of the second version of the cartesianproduct algorithm (Figure 5) is also n i= 1 S i Ο( ), a exponential cost (supposing k elements in every set, is Ο ( k n ) ). However, the cartesianproduct function is iterative and non-recursive, which prevents memory leak problems. Moreover, the getcombination function has an important advantage, which is the possibility of enumerating and recovering any arbitrary combination, given its position. Since the generation of all combinations is not required to recover a small set of combinations, this opportunity is quite useful for implementing combination testing strategies, which is the core of this article. On the other hand, since the maximum number of combinations is delimited and known a priori, any combination (or test case) can be uniquely identified by an integer number. This is also an im- 8
9 portant contribution from a computational point of view, which is useful for the implementation of other algorithms. 4. IMPLEMENTATION OF STRATEGIES FOR TEST CASE GENERATION Any of the strategies represented in Figure 1 can be understood as an algorithm which takes a set of sets as input (S={S 1, S 2,, S n, which correspond to parameters) and produces a set of combinations of the elements in the sets (which correspond to the parameter values): thus, the algorithm implementing each strategy can be seen as a specialization of an abstract Algorithm (Figure 7), which builds its corresponding collection of elements by means of an abstract operation (buildcombinations), which is implemented in each specialization. Figure 7. Hierarchical structure of some algorithms As seen in the figure, each algorithm holds a collection of sets, which represent the parameters. Moreover, each algorithm has a collection of integers (selectedpositions), which hold the positions of the selected combinations. When recovery of the actual test cases (instances of Combination) is required, each integer in this collection is read and passed as an argument to the function described in Figure 6. Each Combination keeps an array of as many integers as there are sets in its positions field. Each integer represents the index of the selected element from the corresponding 9
10 set. Revisiting Table 2, the first combination holds the values (0, 0, 0) in its positions array and the fifth combination holds the values (0, 2, 1). Given a combination, the algorithm extracts the parameter values by visiting its collection of sets Implementation of AllCombinations With the structure shown in Figure 7, the implementation of any combination strategy requires the construction of a subclass of Algorithm. In the case of AllCombinations, the required implementation of the inherited buildcombinations operation translates into Java (which is the programming language where the framework is written) the pseudocode shown in Figure 5. In this case, the code of the method is quite simple (Figure 8): note that only integers are added to the selectedpositions set. Later, if the tester is interested in recovering all the combinations, s/he must simply call the get- Combination function (Figure 6) into a loop, passing the index numbers from 0 to public void buildcombinations() { int numberofcombinations=super.getmaxnumberofcombinations(); for (int i=0; i<numberofcombinations; i++) { this.selectedpositions.add(i); Figure 8. Implementation of buildcombinations in AllCombinations 4.2. Implementation of a random algorithm An algorithm which randomly takes combinations has been also implemented. It takes as input the number of desired combinations, adds random numbers between 0 and numberofcombinations-1 to selectedpositions and, later, returns the set of test cases corresponding to those positions (Figure public void buildcombinations() { if (this.numberofdesiredcombinations==0) return; int numberofcombinations=super.getmaxnumberofcombinations(); int i=0; java.util.random r=new java.util.random(); while (i<this.numberofdesiredcombinations) { int position=r.nextint(numberofcombinations); if (!this.selectedpositions.contains(position)) { this.selectedpositions.add(position); i++; Figure 9. Java code of the RandomAlgorithm 10
11 4.3. Implementation of Antirandom Antirandom is a test generation technique proposed by Malayia [5]. The algorithm starts with a given test case in the suite (i.e., TS={tc 1 ); then, the test case most different to tc 1 is added to the suite. In a second iteration, the test case most different to the one already selected (let be {tc 1, tc k ) is added to the suite. The algorithm continues adding, in each iteration, the most different case to the already existing test cases in the suite. The difference between the two test cases is estimated in terms of the Hamming and the Cartesian distances: 1) For the Hamming distance, each test case is codified by a binary vector. The Hamming distance between two binary vectors is the number of bits in which the two vectors differ. 2) The Cartesian distance between two binary vectors is the square root of the Hamming distance. The distance (Hamming or Cartesian) from a test case t to a test suite is the sum of the distances from t to each test case in the suite. In order to apply these measures, the algorithm calculates the Hamming distance by means of some Java bit operators. Since each test case is represented by an integer (its position in the all combinations collection), the Hamming distance between two integers a and b is returned by the function shown on the left side of Figure 10, and exemplified on the right: protected int hd(int a, int b) { int d=a^b; int count=0; while (d>0) { if (d%2==1) count+=1; d=d>>1; return count; Calculus of hd(25, 40) a=25= b=40= Before loop: d=25^40 = ^ = 49 = count=0 while loop: iter. 1: count=1; d = (49>>1) = = 24 iter. 2: count=1; d = (24>>1) = = 12 iter. 3: count=1; d = (12>>1) = = 6 iter. 4: count=1; d = (6>>1) = 11 2 = 3 iter. 5: count=2; d = (3>>1) = 1 2 = 1 iter. 6: count=3; d = (1>>1) = 0 2 = 0 Figure 10. Calculus of the Hamming distance between two integers (left) and an example of application (right) The implementation given to this combination strategy starts by adding either the first combination (#0) or a randomly chosen one to the suite. Then: 1) A loop iterates numberofdesiredcombinations times and selects the most different test case, according to the Hamming distance (Figure 11). If there are two combinations with the same Hamming distance, then the selection is made based 11
12 on the Cartesian distance (sum of the square roots of the Hamming distance to each preselected test case). 2) When the numberofdesiredcombinations test cases have been selected, the function public void buildcombinations() { if (this.numberofdesiredcombinations==0) return; int numberofcombinations=super.getmaxnumberofcombinations(); int position=this.positionofinicialcombination==-1? new java.util.random().nextint(numberofcombinations) : this.positionofinicialcombination; this.selectedpositions.add(position); int i=0; while (i<this.numberofdesiredcombinations-1) { int pos=selectmostdifferentcombination(); if (!this.selectedpositions.contains(pos)) { this.selectedpositions.add(pos); i++; Figure 11. Implementation of buildcombinations in Antirandom The selectmostdifferentcombination function, which is used by the current version of buildcombinations, goes over the complete list of integers for each combination to be selected (Figure 12). Obviously, this introduces an additional, significant cost to the algorithm. 12
13 protected int selectmostdifferentcombination() { int result=-1; int maxhammingdistance=integer.min_value; double maxcartesiandistance=double.min_value; for (int i=0; i<this.maxnumberofcombinations; i++) { if (!this.selectedpositions.contains(i)) { int[] hammingdistance=new int[1]; double[] cartesiandistance=new double[1]; calculatedistances(i, hammingdistance, cartesiandistance); if (hammingdistance[0]>maxhammingdistance) { maxhammingdistance=hammingdistance[0]; result=i; else if (hammingdistance[0]==maxhammingdistance && cartesiandistance[0]>maxcartesiandistance) { maxcartesiandistance=cartesiandistance[0]; result=i; return result; private void calculatedistances(int pos, int[] hammingdistance, double[] cartesiandistance) { hammingdistance[0]=0; cartesiandistance[0]=0; int selectedposition; for (int i=0; i<selectedpositions.size(); i++) { selectedposition=this.selectedpositions.get(i); int hd=hammingdistance(pos, selectedposition); hammingdistance[0]=hammingdistance[0]+hd; cartesiandistance[0]=cartesiandistance[0]+math.sqrt(hammingdistance[0]); Figure 12. Auxiliary functions selectmostdifferentcombination and calculatedistances in Antirandom 4.4. Comb: a new algorithm for test case generation inspired by Antirandom In the Antirandom algorithm, the continuous search and calculus of the most different combination introduces complex computations to the generation of test cases, which makes the progress of this algorithm slow. However, since we are capable of enumerating all the possible combinations to be generated, the selection of the most different combinations can be made in terms of their index numbers. Thus, in a first iteration, Comb adds the combinations in the first, last and middle positions: supposing there are three sets with 4, 5 and 5 elements, there will be a maximum of 100 combinations: therefore, combinations at positions 0, 99 (the most distant) and 50 (equally distant to the two preselected cases) will be added in a first turn. Then, in the second iteration, the elements placed in the middle of the intervals [0, 50] and [50, 99] are included. This produces the addition of the combinations 25 and 75. In the remaining iterations, the middle elements of the intervals corresponding to the 13
14 previous iteration are added to the suite. The algorithm, whose pseudocode appears in Figure 13, stops when a prefixed number of combinations (numberofdesiredcombinations variable) has been reached. function buildcombinations():set(combinations) { result : Set(Combinations)= last : int = getmaxnumberofcombinations()-1 // zero-based index result.add(getcombination(0)) // The 1 st combination is added result.add(getcombination(last)) // Also the last combination p=(last+1)/2 result.add(getcombination(p)) // The middle is also added while ( result <numberofdesiredcombinations) { k : float = p/2 counter : int = 2 while (k<last && result <numberofdesiredcombinations) { c : Combination = getcombination(k) if (c result) result.add(c) k = counter *(p/2) counter = counter +1 p = p /2 return result // k moves by the middle point of each interval // when k is multiplied by counter, it advances to the next interval Figure 13. Pseudocode of buildcombinations for the Comb algorithm Assuming the aforementioned 100 combinations, the application of the algorithm is illustrated in Figure 14. Before entering the first while loop, combinations 0, 50 and 99 are added, in the first iteration, 25 and 75 and in the second one, 12, 37, 62 and 87. The variables change according to Table 3. The evolution of the selected positions along the line in Figure 14 may remind one of the teeth on a comb, which is the reason that this name was given to the algorithm. 14
15 p k counter index of c (selected combination) {0, 99, {0, 99, 50, {0, 99, 50, 25, {0, 99, 50, 25, 75, 12 result {0, 99, 50, 25, 75, {0, 99, 50, 25, 75, 12, {0, 99, 50, 25, 75, 12, {0, 99, 50, 25, 75, 12, 37, {0, 99, 50, 25, 75, 12, 37, {0, 99, 50, 25, 75, 12, 37, 62, {0, 99, 50, 25, 75, 12, 37, 62, 87, {0, 99, 50, 25, 75, 12, 37, 62, 87, {0, 99, 50, 25, 75, 12, 37, 62, 87, 6, {0, 99, 50, 25, 75, 12, 37, 62, 87, 6, {0, 99, 50, 25, 75, 12, 37, 62, 87, 6, 18, {0, 99, 50, 25, 75, 12, 37, 62, 87, 6, 18, {0, 99, 50, 25, 75, 12, 37, 62, 87, 6, 18, 31, 43 Table 3. Evolution of the variables with the Comb algorithm Figure 14. Illustration of the Comb algorithm 4.5. Implementation of a basic Pairwise algorithm Pairwise algorithms generate test cases with the goal of visiting all the pairs of the parameter values. For this, a basic implementation of a pairwise algorithm builds all the pair tables (n (n-1)/2, being n the number of sets) for all the sets. Each pair contains the positions of the two elements of the two sets. For the example of the three sets in Table 1, the three pair tables shown in Table 4 are created. 15
16 A,B (1, 5) (1, 6) A,C (1, 7) (1, 8) B,C (2, 5) (1, 9) (5, 8) (2, 6) (2, 8) (5, 9) (2, 7) (2, 9) (6, 8) (3, 5) (3, 8) (6, 9) (3, 6) (3, 9) (7, 8) (3, 7) (4, 8) (7, 9) (4, 5) (4, 9) (4, 6) (4, 7) Table 4. Pair tables for the A, B, C sets of Table 1 While there are non-used pairs in the tables, the algorithm (Figure 15) looks for the pairs with fewest visits and uses them to construct the new test case. function buildcombinations():set(combinations) { result : Set(Combinations)= pairstables : Set(PairTable) = buildpairstables() Pair p; while (p=pairstables.getpairwithweight(0)!=null) { min : int = for (i=0; i<maxnumberofcombinations; i++) { c : Combination = getcombination(i) weightofpairs : int = c.getweight(pairstables) if (c.contains(p) && weightofpairs<min) { selectedcombination = c min=weightofpairs selectedcombination.visitpairs(pairstables) result.add(selectedcombination) return result Figure 15. Pseudocode of buildcombinations for the Pairwise algorithm For the example in Table 4, the algorithm takes the first non-visited pair ((1,5)) in the (A,B) table and looks for a compatible non-visited pair in (A,C) and (B,C). The (1,5) pair in (A,B) respectively involves elements 1 and 5 from A and B. Therefore, a pair (1,X) and (5, Y) must be taken from (A, C) and (B, C), for example, (1,8) and (5,8). This produces the test case formed by the test values (1, 5, 8). Additionally, the implementation given to the PairwiseAlgorithm (an specialization of the abstract Algorithm shown in Figure 7) saves, in addition to the generated test cases, the number of uses of each pair (Table 5). 16
17 Test cases A,B 0-> {1, 5, 8 (1, 5), 1 1-> {1, 6, 9 (1, 6), 1 A,C 2-> {1, 7, 8 (1, 7), 1 (1, 8), 2 B,C 3-> {2, 5, 9 (2, 5), 1 (1, 9), 1 (5, 8), 2 4-> {2, 6, 8 (2, 6), 1 (2, 8), 1 (5, 9), 2 5-> {2, 7, 9 (2, 7), 1 (2, 9), 2 (6, 8), 2 6-> {3, 5, 8 (3, 5), 1 (3, 8), 2 (6, 9), 2 7-> {3, 6, 9 (3, 6), 1 (3, 9), 1 (7, 8), 2 8-> {3, 7, 8 (3, 7), 1 (4, 8), 1 (7, 9), 2 9-> {4, 5, 9 (4, 5), 1 (4, 9), 2 10-> {4, 6, 8 (4, 6), 1 11-> {4, 7, 9 (4, 7), 1 Table 5. Test cases generated (table in the left) and number of uses of each pair 4.6. Implementation of AETG AETG is an algorithm proposed by Cohen et al. [7] for covering n-wise. The implementation we have given this algorithm produces pairwise coverage. Cohen et al. describe the algorithm as in Figure 16. Assume that we have a system with k test parameters and that the i-th parameter has li different values. Assume that we have already selected r test cases. We select the r + 1 by first generating M different candidate test cases and then choosing one that covers the most new pairs. Each candidate test case is selected by the following greedy algorithm: 1.Choose a parameter f and a value l for f such that that parameter value appears in the greatest number of uncovered pairs. 2.Let f 1 = f. Then choose a random order for the remaining parameters. Then, we have an order for all k parameters f 1,..., f k. 3.Assume that values have been selected for parameters f 1,..., f j. For 1 i j, let the selected value for f i be called v i. Then, choose a value v j+1 for f j+1 as follows. For each possible value v for f j, find the number of new pairs in the set of pairs {f j+1 = v and f i = v i for 1 i j. Then, let v j+1 be one of the values that appeared in the greatest number of new pairs. Note that, in this step, each parameter value is considered only once for inclusion in a candidate test case. Also, that when choosing a value for parameter f j+1, the possible values are compared with only the j values already chosen for parameters f 1,..., f j. Figure 16. Original explanation of the AETG algorithm for covering pairwise [7] Note there is a random ordering of the parameters in the second step. In order to allow the reproducibility of test generation, we have removed that chance with no loss of validity in our implementation (Figure 17). 17
18 1. Build pairtables for S, the set of sets/parameters 2. let c=combination #0 3. Add c to the selected set 4. Update pairtables with the pairs visited by c 5. while there are unvisited pairs in pairtables 1. initialize c putting the value which visits more unvisited pairs in pairtables 2. complete c with the values of the remaining sets in such way most pairs are jointly visited 3. Add c to the selected set 4. Update pairtables with the pairs visited by c Figure 17. Pseudocode of the implementation given to AETG Thus, assuming the three sets of Table 1 (A={1, 2, 3, B={4, 5, C={6, 7), the algorithm initially builds the pair tables. Then, the first combination (#0, since it is zerobased) is added to the selected set, which corresponds to elements {1, 4, 6. The pair tables are updated with the visits made by combination #0, and the visited pairs are marked (Figure 18): 6 pairs in (A, B) Elements # of visits (1, 4) 1 (1, 5) 0 (2, 4) 0 (2, 5) 0 (3, 4) 0 (3, 5) 0 6 pairs in (A, C) Elements # of visits (1, 6) 1 (1, 7) 0 (2, 6) 0 (2, 7) 0 (3, 6) 0 (3, 7) 0 4 pairs in (B, C) Elements # of visits (4, 6) 1 (4, 7) 0 (5, 6) 0 (5, 7) 0 Figure 18. Pairs visited by the first combination Then: 1. A new combination is initialized. The selected element is that of the three sets which visits the most unvisited pairs. In this case, the selected element is the second element of the B set (#1, since it is zero-based). Thus, the candidate combination is c={-, 5, - 2. To know the most suitable value of the first set (A) to be included as the first element of c, the algorithm considers all the elements of A, and checks how many unvisited pairs each element of A visits with the selected element of B. That 18
19 is, it counts the pairs visited in (1, 5), (2, 5) and (3, 5) (in the table corresponding to parameters (A, B)). The algorithm selects the first element of A (1). 3. To know the most suitable value of the third set to be included as the third element of c, the algorithm considers all the elements of C, and checks how many unvisited pairs each element of C visits with the selected elements of A and B. That is, in table (A, C) it counts the pairs visited by 1 in the pairs (1, 6) and (1, 7) (it uses 1 in A because it has been previously selected). In table (B, C), it considers the pairs (5, 6) and (5,7). In this example, the algorithm selects the second element of C (7). 4. The combination is now completed, and it is comprised of the values (1, 5, 7). It is added to the selected set and the pair tables are updated with the pairs visited by this combination (Figure 19). 6 pairs in (A, B) Elements # of visits (1, 4) 1 (1, 5) 1 (2, 4) 0 (2, 5) 0 (3, 4) 0 (3, 5) 0 6 pairs in (A, C) Elements # of visits (1, 6) 1 (1, 7) 1 (2, 6) 0 (2, 7) 0 (3, 6) 0 (3, 7) 0 4 pairs in (1, 2) Elements # of visits (4, 6) 1 (4, 7) 0 (5, 6) 0 (5, 7) 1 Figure 19. Pairs visited by the second selected combination 5. Later, the algorithm again looks for the element (in any set) which visits more unvisited pairs, selecting element 3 from the A set: c={3, -, The second and third positions of c must be completed. For this, the algorithm looks at what elements in B, together with the selected element of A (3, in this case) visit more pairs. From B, the algorithm selects element 4. In the same way, it looks for the element in C which visits more pairs, taking into account that the selected element of A is 3 and that the selected element of B is 4. Therefore, it selects number 7 from C and leaves c with the values (3, 4, 7). 7. The algorithm continues in this way until all pairs have been visited. The final results are: {1, 4, 6, {1, 5, 7, {3, 4, 7, {3, 5, 6, {2, 4, 6 and {2, 5, 7. 19
20 4.7. Implementation of a customized pairwise One of the research lines we are currently developing is the automatic generation of test cases in Software Product Lines (SPL). Products in an SPL share a set of characteristics (commonalities) and differ in a number of variation points, which represent the variabilities of the products. Commonalities represent assumptions that are true for each member of the SPL, whilst variabilities are a structured list of assumptions on how the family members (products) differ [8]. Software construction in SPL contexts involves two levels: (1) Domain Engineering, referring to the development of common features and the identification of variation points and (2) Product Engineering, where each specific product is built, which leads to the inclusion of the commonalities in the products, and the corresponding adaptation of the variation points. Our SPL makes it possible to play a set of board games (Ludo, Trivial Pursuit, Chess and Checkers). All these games share a set of characteristics (identification of the players, turn management, etc.). Ludo and Trivial require dice, but not Chess nor Checkers. Trivial Pursuit also requires a quiz with the corresponding questions. Chess and Checkers require two players, but the others may accept more. Thus, initially we have sets with games, dice, a quiz and a number of players. It is interesting to test the possible pair combinations, but some of them will not belong to some final products (for example, Chess with Dice and 3 players). Therefore, with our customized pairwise algorithm those pairs which will not be interesting can be excluded. Firstly, the algorithm asks the user to mark the unneeded pairs. Then, it builds all the combinations with the iterative All combinations algorithm. Finally, it removes those combinations which hold undesired pairs Implementation of Each choice This is a very basic algorithm proposed by Amman and Offutt [9]. According to [3], the basic idea behind the Each Choice combination strategy is to include each value of each parameter in at least one test case. This is achieved by generating test cases by successively selecting unused values for each parameter. Thus, the algorithm is very simple: while there are unvisited values, a new combination is built. If a set has any unused value, it is inserted in the combination; otherwise, a random value is picked up. 20
21 5. EXPERIMENTAL RESULTS This section shows the results of some experiments comparing two pairs of algorithms of the same nature. On the one hand, the basic pairwise and the AETG algorithms and on the other, the Antirandom and Comb algorithms. All computations have been locally executed on a standard PC with a Pentium Core Duo processor, a speed of 2.4 Ghz and 4 Mb of RAM memory Cost and result comparison of the basic pairwise algorithm and AETG Both the basic pairwise (Section 4.5) and AETG (Section 4.6) algorithms obtain pairwise coverage, i.e., they visit all the pairs of parameter values in the pair tables. The problem with generating a test suite with the minimal possible size which visits all the pairs is NP-complete, and there have been several proposals for algorithms to find nearto-the-optimal solutions. Thus, the comparison of pairwise algorithms can be done based on three variables: 1) Execution time. 2) Test suite size. 3) Total number of visits to pairs. In a first experiment, we have built pairwise test cases using from 3 to 5 sets. All the sets have the same number of parameters, from 5 to 20. The results of the time comparison in milliseconds appear in Figure 20 and Figure 21. Note the exponential growth of the basic pairwise strategy. 21
22 PW 7 time 8 (39sets) AETG 13 time 14 (3 15 sets) PW time (4 sets) AETG time (4 sets) Figure 20. Time comparison between basic pairwise and AETG for 3 and 4 equally-sized sets PW time (5 sets) AETG time (5 sets) Figure 21. Time comparison between basic pairwise and AETG for 5 equallysized sets Regarding the test suite size and the total number of visits, basic pairwise exhibits slightly better results than AETG which, however, do not compensate for the execution time (Table 6). 22
23 Pair visits Test suite Sets # of elements PW AETG PW AETG Table 6. Comparison of visits and test suite size (basic pairwise and AETG) for equally-sized sets In the second experiment, between 3 and 7 sets were generated with a random num- 23
24 ber of elements (between 3 and 10). The results, shown in Table 7, are quite similar to the previous ones. Time (milliseconds) Visits Test suite Sets # of elements PW AETG PW AETG PW AETG 3 5,9, ,3, ,9, ,3,5,10 2, ,3,7, ,4,7,11 3, ,9,3,11,11 110, ,8,9,5,9 38, ,7,11,10,7 119, ,8,11,7,10,9 785, , ,10,10,9,4,6 113, ,9,11,9,4,7 277, , ,8,9,9,9,10,7 315, , ,9,4,5,10,8,6 396, ,6,9,7,6,4,3 71, Table 7. Time results in the second experiment 5.2. Cost and result comparison of Antirandom and Comb Since the nature of Antirandom and Comb looks similar (selection of test cases as far from the previously selected ones as possible), it is interesting to compare their performance and the quality of the test cases produced. In order to do this comparison, we applied both algorithms to generate several test suites from different sets with different numbers of parameters. In the first experiment, we used from 2 to 7 sets (parameters) with 5 to 10 elements (test values). Then, the two algorithms were executed. We collected the execution time (in seconds) of each algorithm and the percentage of pairs visited in the selected test suite. In this experiment, we generated test suites with 2 Sets test cases, since this is the number of test cases used in the original work by Malayia [5]. The results are shown in Table 8: 1) With respect to time, note the exponential growth of Antirandom. 2) With respect to pairs, Figure 22 shows how, when the number of sets and their sizes are small, the pairwise coverage is almost equal. As these factors increase, Comb provides, in general, better results. 24
25 Sets Sets size Combinations Antirandom % pairs Time visited Comb % pairs Time visited Table 8. Execution results of the two algorithms in the first experiment 25
26 AR pairs Comb pairs Figure 22. Pairwise coverage of Antirandom and Comb in the first experiment In the second experiment, instead of generating 2 Sets test cases, we generated from 10 to 95 test cases in 5 and 6 sets with 5 elements each. As seen in Figure 23, the difference in time (in seconds) is also significant. Regarding pairwise coverage, Figure 24 clearly shows how Comb always obtains better results than Antirandom, quickly evolving to 100%, which seems to be its asymptote AR time (5 sets) Comb time (5 sets) AR time (6 sets) Comb time (6 sets) Figure 23. Times of Antirandom and Comb in the second experiment 26
27 AR pairs (5 sets) Comb pairs (5 sets) AR pairs (6 sets) Comb pairs (6 sets) Figure 24. Pairs visited in the second experiment 6. IMPLEMENTATIONS To allow both the research and the practitioner communities the use of these algorithms, we released them on a website ( 1) First, the algorithms are packaged as a Java library to allow their reuse in other applications, as well as the proposal of new combination strategies by means of the implementation of new subclasses of Algorithm. 2) Second, some of the algorithms are available in Microsoft Excel files. In this way, any user may fill in some cells in a spreadsheet and select the desired combination strategy to obtain the desired combinations. 3) Third, the URL includes a web application where the user can create any number of parameters, adding values and applying any combination strategy (Figure 25). The web application includes a verbose option, which explains how each algorithm produces the results. Note that the web application includes the possibility of generating code for the test cases corresponding to each selected combination: the text area under the sets allows the tester to introduce a template text. The tester uses the TCNUMBER reserved word to reference the test case number, and #A, #B, #C, etc. to reference the corresponding value of each set in the selected combination. When test cases have been generated, the application substitutes these tokens with the corresponding test values and shows the 27
28 corresponding code on the webpage. Then, this code can be easily copied and pasted into the development environment to perform the tests. Figure 25. An excerpt of the web application 7. CONCLUSIONS This article has shown and made available the implementations of several algorithms for test case generation. The article also provides details of the class structure of the application architecture. To the best of our knowledge, this is the first work to provide so many open implementations of so many combination strategies. Our goal is to give researchers and practitioners a system for (1) developing new testing strategies within a framework, which easily allows for comparison and (2) testing actual programs. In another respect, the use of the web application is also highly recommended for teaching in testing courses, both at graduate and postgraduate levels. In fact, we are currently using it in a PhD course at the University of Castilla-La Mancha, with the students expressing a high degree of satisfaction. The verbose option of the applica- 28
29 tion is useful for understanding how algorithms work. One of the principles of all algorithms is the method for obtaining an arbitrary combination (i.e., an arbitrary element of the Cartesian product) by means of its simple enumeration. In the case of the All combinations algorithm, and even though its cost is exponential, the iterative nature of the given implementation and the possibility of recovering any combination from its index helps with the computational behaviour and prevents problems of memory leaks. Moreover, the fact of dealing with simple integer numbers instead of test cases or combination objects also improves the performance of all of the algorithms. Additional contributions of the paper are the Comb and the customizable pairwise algorithms. The former proceeds from an idea similar to that of Antirandom, although it produces better results in much less time. The latter comes from the actual application of combination testing to the development of a software product line. One of our future works is the comparison of Comb with other algorithms using a white-box criterion, such as the mutation score. Regarding the web application, we are already working on the addition of a module to upload a.class file; by reusing the bytecode analysis techniques implemented in testooj [10], the tool will show the list of operations in the class. Then, the tester will be able to write a regular expression to generate tests, as well as add test values to parameters. It is our desire that both researchers and practitioners make use of the combinatorial testing web site. 8. ACKNOWLEDGMENTS This work is partially supported by the PRALÍN (Junta de Comunidades de Castilla- La Mancha/European Social Fund, grant PAC ), DIMITRI (MI- CINN/FEDER, TRA2009_0131) and PEGASO/MAGO (MICINN/FEDER, TIN C02-01) projects. The authors would like to thank José Antonio Cruz for his help in the implementation of the Excel versions of the algorithms. 9. REFERENCES 1. Myers B (2004). The Art of Software Testing, second edition. Hoboken, New Jersey: Wiley. 2. Bryce RC, Lei Y, Kuhn DR and Kacker R (2010). Combinatorial testing. En Software Engineering and Productivity Technologies, M. Ramachandran and R.A.d. Carvalho (eds.). Idea Group Publishing. p Grindal M, Offutt AJ and Andler SF. Combination testing strategies: a survey. Software Testing, 29
30 Verification and Reliability, 15( , Polo M, Piattini M and García-Rodríguez I. Decreasing the cost of mutation testing with secondorder mutants. Software Testing, Verification and Reliability, 19(2), , Malaiya Y. Antirandom testing: Getting the most out of black-box testing. International Symposium on Software Reliability Engineering (ISSRE 95). Toulouse, France, pp IEEE Computer Society Press, Los Alamitos, CA, Hamlet R. Testing programs with the help of a compiler. IEEE Transactions on Software Engineering, 3(4), , Cohen DM, Dalal SR, Parelius J and Patton GC. The combinatorial design approach to automatic test generation. IEEE Transactions on Software Engineering, 13(5), 83-89, Trigaux J and Heymans P. Modelling variability requirements in Software Product Lines: A comparative survey. FUNDP Equipe LIEL, Namur, Ammann P and Offutt AJ. Using formal methods to derive test frames in category-partition testing. Ninth Annual Conference on Computer Assurance (COMPASS'94). Gaithersburg, MD, pp IEEE Computer Society Press, Los Alamitos, CA, Polo M, Piattini M and Tendero S. Integrating techniques and tools for testing automation. Software Testing, Verification and Reliability, 17(1), 3-39,
Mutation testing: practical aspects and cost analysis
Mutation testing: practical aspects and cost analysis Macario Polo and Mario Piattini Alarcos Group Department of Information Systems and Technologies University of Castilla-La Mancha (Spain) [email protected]
Empirically Identifying the Best Genetic Algorithm for Covering Array Generation
Empirically Identifying the Best Genetic Algorithm for Covering Array Generation Liang Yalan 1, Changhai Nie 1, Jonathan M. Kauffman 2, Gregory M. Kapfhammer 2, Hareton Leung 3 1 Department of Computer
Tree Based Test Case Generation and Cost Calculation Strategy for Uniform Parametric Pairwise Testing
Journal of Computer Science 6 (5): 542-547, 2010 ISSN 1549-3636 2010 Science Publications Tree Based Test Case Generation and Cost Calculation Strategy for Uniform Parametric Pairwise Testing Mohammad
Test Case Design Techniques
Summary of Test Case Design Techniques Brian Nielsen, Arne Skou {bnielsen ask}@cs.auc.dk Development of Test Cases Complete testing is impossible Testing cannot guarantee the absence of faults How to select
Why? A central concept in Computer Science. Algorithms are ubiquitous.
Analysis of Algorithms: A Brief Introduction Why? A central concept in Computer Science. Algorithms are ubiquitous. Using the Internet (sending email, transferring files, use of search engines, online
Integer Factorization using the Quadratic Sieve
Integer Factorization using the Quadratic Sieve Chad Seibert* Division of Science and Mathematics University of Minnesota, Morris Morris, MN 56567 [email protected] March 16, 2011 Abstract We give
Test case design techniques I: Whitebox testing CISS
Test case design techniques I: Whitebox testing Overview What is a test case Sources for test case derivation Test case execution White box testing Flowgraphs Test criteria/coverage Statement / branch
Towards an automated testing framework to manage variability using the UML Testing Profile
Automation of Software Test (AST 09) May 18, Vancouver, Canada Towards an automated testing framework to manage variability using the UML Testing Profile Beatriz Pérez Lamancha Software Testing Centre
Security in Outsourcing of Association Rule Mining
Security in Outsourcing of Association Rule Mining W. K. Wong The University of Hong Kong [email protected] David W. Cheung The University of Hong Kong [email protected] Ben Kao The University of Hong
Improving the Performance of a Computer-Controlled Player in a Maze Chase Game using Evolutionary Programming on a Finite-State Machine
Improving the Performance of a Computer-Controlled Player in a Maze Chase Game using Evolutionary Programming on a Finite-State Machine Maximiliano Miranda and Federico Peinado Departamento de Ingeniería
D-optimal plans in observational studies
D-optimal plans in observational studies Constanze Pumplün Stefan Rüping Katharina Morik Claus Weihs October 11, 2005 Abstract This paper investigates the use of Design of Experiments in observational
Automatic generation of fully-executable code from the Domain tier of UML diagrams
Abstract. Automatic generation of fully-executable code from the Domain tier of UML diagrams Macario Polo, Agustín Mayoral, Juan Ángel Gómez and Mario Piattini Alarcos Group - Department of Computer Science
14.10.2014. Overview. Swarms in nature. Fish, birds, ants, termites, Introduction to swarm intelligence principles Particle Swarm Optimization (PSO)
Overview Kyrre Glette kyrrehg@ifi INF3490 Swarm Intelligence Particle Swarm Optimization Introduction to swarm intelligence principles Particle Swarm Optimization (PSO) 3 Swarms in nature Fish, birds,
Experimental Comparison of Concolic and Random Testing for Java Card Applets
Experimental Comparison of Concolic and Random Testing for Java Card Applets Kari Kähkönen, Roland Kindermann, Keijo Heljanko, and Ilkka Niemelä Aalto University, Department of Information and Computer
A simplified implementation of the least squares solution for pairwise comparisons matrices
A simplified implementation of the least squares solution for pairwise comparisons matrices Marcin Anholcer Poznań University of Economics Al. Niepodleg lości 10, 61-875 Poznań, Poland V. Babiy McMaster
Mobile App Design Project #1 Java Boot Camp: Design Model for Chutes and Ladders Board Game
Mobile App Design Project #1 Java Boot Camp: Design Model for Chutes and Ladders Board Game Directions: In mobile Applications the Control Model View model works to divide the work within an application.
Three Effective Top-Down Clustering Algorithms for Location Database Systems
Three Effective Top-Down Clustering Algorithms for Location Database Systems Kwang-Jo Lee and Sung-Bong Yang Department of Computer Science, Yonsei University, Seoul, Republic of Korea {kjlee5435, yang}@cs.yonsei.ac.kr
Performance Based Evaluation of New Software Testing Using Artificial Neural Network
Performance Based Evaluation of New Software Testing Using Artificial Neural Network Jogi John 1, Mangesh Wanjari 2 1 Priyadarshini College of Engineering, Nagpur, Maharashtra, India 2 Shri Ramdeobaba
Cryptography and Network Security Department of Computer Science and Engineering Indian Institute of Technology Kharagpur
Cryptography and Network Security Department of Computer Science and Engineering Indian Institute of Technology Kharagpur Module No. # 01 Lecture No. # 05 Classic Cryptosystems (Refer Slide Time: 00:42)
Web Data Extraction: 1 o Semestre 2007/2008
Web Data : Given Slides baseados nos slides oficiais do livro Web Data Mining c Bing Liu, Springer, December, 2006. Departamento de Engenharia Informática Instituto Superior Técnico 1 o Semestre 2007/2008
IT2305 Database Systems I (Compulsory)
Database Systems I (Compulsory) INTRODUCTION This is one of the 4 modules designed for Semester 2 of Bachelor of Information Technology Degree program. CREDITS: 04 LEARNING OUTCOMES On completion of this
Computing Concepts with Java Essentials
2008 AGI-Information Management Consultants May be used for personal purporses only or by libraries associated to dandelon.com network. Computing Concepts with Java Essentials 3rd Edition Cay Horstmann
Eastern Washington University Department of Computer Science. Questionnaire for Prospective Masters in Computer Science Students
Eastern Washington University Department of Computer Science Questionnaire for Prospective Masters in Computer Science Students I. Personal Information Name: Last First M.I. Mailing Address: Permanent
Design Patterns in Parsing
Abstract Axel T. Schreiner Department of Computer Science Rochester Institute of Technology 102 Lomb Memorial Drive Rochester NY 14623-5608 USA [email protected] Design Patterns in Parsing James E. Heliotis
KITES TECHNOLOGY COURSE MODULE (C, C++, DS)
KITES TECHNOLOGY 360 Degree Solution www.kitestechnology.com/academy.php [email protected] [email protected] Contact: - 8961334776 9433759247 9830639522.NET JAVA WEB DESIGN PHP SQL, PL/SQL
Data Structures. Algorithm Performance and Big O Analysis
Data Structures Algorithm Performance and Big O Analysis What s an Algorithm? a clearly specified set of instructions to be followed to solve a problem. In essence: A computer program. In detail: Defined
ON THE COMPLEXITY OF THE GAME OF SET. {kamalika,pbg,dratajcz,hoeteck}@cs.berkeley.edu
ON THE COMPLEXITY OF THE GAME OF SET KAMALIKA CHAUDHURI, BRIGHTEN GODFREY, DAVID RATAJCZAK, AND HOETECK WEE {kamalika,pbg,dratajcz,hoeteck}@cs.berkeley.edu ABSTRACT. Set R is a card game played with a
Vector storage and access; algorithms in GIS. This is lecture 6
Vector storage and access; algorithms in GIS This is lecture 6 Vector data storage and access Vectors are built from points, line and areas. (x,y) Surface: (x,y,z) Vector data access Access to vector
MULTIPLE-OBJECTIVE DECISION MAKING TECHNIQUE Analytical Hierarchy Process
MULTIPLE-OBJECTIVE DECISION MAKING TECHNIQUE Analytical Hierarchy Process Business Intelligence and Decision Making Professor Jason Chen The analytical hierarchy process (AHP) is a systematic procedure
15.062 Data Mining: Algorithms and Applications Matrix Math Review
.6 Data Mining: Algorithms and Applications Matrix Math Review The purpose of this document is to give a brief review of selected linear algebra concepts that will be useful for the course and to develop
A simple analysis of the TV game WHO WANTS TO BE A MILLIONAIRE? R
A simple analysis of the TV game WHO WANTS TO BE A MILLIONAIRE? R Federico Perea Justo Puerto MaMaEuSch Management Mathematics for European Schools 94342 - CP - 1-2001 - DE - COMENIUS - C21 University
A simple algorithm with no simple verication
A simple algorithm with no simple verication Laszlo Csirmaz Central European University Abstract The correctness of a simple sorting algorithm is resented, which algorithm is \evidently wrong" at the rst
What mathematical optimization can, and cannot, do for biologists. Steven Kelk Department of Knowledge Engineering (DKE) Maastricht University, NL
What mathematical optimization can, and cannot, do for biologists Steven Kelk Department of Knowledge Engineering (DKE) Maastricht University, NL Introduction There is no shortage of literature about the
Test case design techniques II: Blackbox testing CISS
Test case design techniques II: Blackbox testing Overview Black-box testing (or functional testing): Equivalence partitioning Boundary value analysis Domain analysis Cause-effect graphing Behavioural testing
Curriculum Map. Discipline: Computer Science Course: C++
Curriculum Map Discipline: Computer Science Course: C++ August/September: How can computer programs make problem solving easier and more efficient? In what order does a computer execute the lines of code
AP Computer Science A - Syllabus Overview of AP Computer Science A Computer Facilities
AP Computer Science A - Syllabus Overview of AP Computer Science A Computer Facilities The classroom is set up like a traditional classroom on the left side of the room. This is where I will conduct my
Data Analysis 1. SET08104 Database Systems. Copyright @ Napier University
Data Analysis 1 SET08104 Database Systems Copyright @ Napier University Entity Relationship Modelling Overview Database Analysis Life Cycle Components of an Entity Relationship Diagram What is a relationship?
Java 6 'th. Concepts INTERNATIONAL STUDENT VERSION. edition
Java 6 'th edition Concepts INTERNATIONAL STUDENT VERSION CONTENTS PREFACE vii SPECIAL FEATURES xxviii chapter i INTRODUCTION 1 1.1 What Is Programming? 2 J.2 The Anatomy of a Computer 3 1.3 Translating
Iteration CHAPTER 6. Topic Summary
CHAPTER 6 Iteration TOPIC OUTLINE 6.1 while Loops 6.2 for Loops 6.3 Nested Loops 6.4 Off-by-1 Errors 6.5 Random Numbers and Simulations 6.6 Loop Invariants (AB only) Topic Summary 6.1 while Loops Many
Introduction to Computers and Programming. Testing
Introduction to Computers and Programming Prof. I. K. Lundqvist Lecture 13 April 16 2004 Testing Goals of Testing Classification Test Coverage Test Technique Blackbox vs Whitebox Real bugs and software
Approximation Algorithms
Approximation Algorithms or: How I Learned to Stop Worrying and Deal with NP-Completeness Ong Jit Sheng, Jonathan (A0073924B) March, 2012 Overview Key Results (I) General techniques: Greedy algorithms
Linear Codes. Chapter 3. 3.1 Basics
Chapter 3 Linear Codes In order to define codes that we can encode and decode efficiently, we add more structure to the codespace. We shall be mainly interested in linear codes. A linear code of length
How To Compare A Markov Algorithm To A Turing Machine
Markov Algorithm CHEN Yuanmi December 18, 2007 1 Abstract Markov Algorithm can be understood as a priority string rewriting system. In this short paper we give the definition of Markov algorithm and also
Some Polynomial Theorems. John Kennedy Mathematics Department Santa Monica College 1900 Pico Blvd. Santa Monica, CA 90405 [email protected].
Some Polynomial Theorems by John Kennedy Mathematics Department Santa Monica College 1900 Pico Blvd. Santa Monica, CA 90405 [email protected] This paper contains a collection of 31 theorems, lemmas,
Student Project Allocation Using Integer Programming
IEEE TRANSACTIONS ON EDUCATION, VOL. 46, NO. 3, AUGUST 2003 359 Student Project Allocation Using Integer Programming A. A. Anwar and A. S. Bahaj, Member, IEEE Abstract The allocation of projects to students
CHOOSING A COLLEGE. Teacher s Guide Getting Started. Nathan N. Alexander Charlotte, NC
Teacher s Guide Getting Started Nathan N. Alexander Charlotte, NC Purpose In this two-day lesson, students determine their best-matched college. They use decision-making strategies based on their preferences
Towards a Benchmark Suite for Modelica Compilers: Large Models
Towards a Benchmark Suite for Modelica Compilers: Large Models Jens Frenkel +, Christian Schubert +, Günter Kunze +, Peter Fritzson *, Martin Sjölund *, Adrian Pop* + Dresden University of Technology,
Using simulation to calculate the NPV of a project
Using simulation to calculate the NPV of a project Marius Holtan Onward Inc. 5/31/2002 Monte Carlo simulation is fast becoming the technology of choice for evaluating and analyzing assets, be it pure financial
Programming Using Python
Introduction to Computation and Programming Using Python Revised and Expanded Edition John V. Guttag The MIT Press Cambridge, Massachusetts London, England CONTENTS PREFACE xiii ACKNOWLEDGMENTS xv 1 GETTING
An Algorithm for Automatic Base Station Placement in Cellular Network Deployment
An Algorithm for Automatic Base Station Placement in Cellular Network Deployment István Törős and Péter Fazekas High Speed Networks Laboratory Dept. of Telecommunications, Budapest University of Technology
Coverage Criteria for Search Based Automatic Unit Testing of Java Programs
ISSN (Online): 2409-4285 www.ijcsse.org Page: 256-263 Coverage Criteria for Search Based Automatic Unit Testing of Java Programs Ina Papadhopulli 1 and Elinda Meçe 2 1, 2 Department of Computer Engineering,
Factoring & Primality
Factoring & Primality Lecturer: Dimitris Papadopoulos In this lecture we will discuss the problem of integer factorization and primality testing, two problems that have been the focus of a great amount
Optimization of sampling strata with the SamplingStrata package
Optimization of sampling strata with the SamplingStrata package Package version 1.1 Giulio Barcaroli January 12, 2016 Abstract In stratified random sampling the problem of determining the optimal size
Analysis of Binary Search algorithm and Selection Sort algorithm
Analysis of Binary Search algorithm and Selection Sort algorithm In this section we shall take up two representative problems in computer science, work out the algorithms based on the best strategy to
Random vs. Structure-Based Testing of Answer-Set Programs: An Experimental Comparison
Random vs. Structure-Based Testing of Answer-Set Programs: An Experimental Comparison Tomi Janhunen 1, Ilkka Niemelä 1, Johannes Oetsch 2, Jörg Pührer 2, and Hans Tompits 2 1 Aalto University, Department
Chapter 7: Functional Programming Languages
Chapter 7: Functional Programming Languages Aarne Ranta Slides for the book Implementing Programming Languages. An Introduction to Compilers and Interpreters, College Publications, 2012. Fun: a language
Hardware-Aware Analysis and. Presentation Date: Sep 15 th 2009 Chrissie C. Cui
Hardware-Aware Analysis and Optimization of Stable Fluids Presentation Date: Sep 15 th 2009 Chrissie C. Cui Outline Introduction Highlights Flop and Bandwidth Analysis Mehrstellen Schemes Advection Caching
5-1 NUMBER THEORY: DIVISIBILITY; PRIME & COMPOSITE NUMBERS 210 f8
5-1 NUMBER THEORY: DIVISIBILITY; PRIME & COMPOSITE NUMBERS 210 f8 Note: Integers are the w hole numbers and their negatives (additive inverses). While our text discusses only whole numbers, all these ideas
STATISTICA Formula Guide: Logistic Regression. Table of Contents
: Table of Contents... 1 Overview of Model... 1 Dispersion... 2 Parameterization... 3 Sigma-Restricted Model... 3 Overparameterized Model... 4 Reference Coding... 4 Model Summary (Summary Tab)... 5 Summary
Discuss the size of the instance for the minimum spanning tree problem.
3.1 Algorithm complexity The algorithms A, B are given. The former has complexity O(n 2 ), the latter O(2 n ), where n is the size of the instance. Let n A 0 be the size of the largest instance that can
Building Java Programs
Building Java Programs Chapter 5 Lecture 5-2: Random Numbers reading: 5.1-5.2 self-check: #8-17 exercises: #3-6, 10, 12 videos: Ch. 5 #1-2 1 The Random class A Random object generates pseudo-random* numbers.
Unit 2.1. Data Analysis 1 - V2.0 1. Data Analysis 1. Dr Gordon Russell, Copyright @ Napier University
Data Analysis 1 Unit 2.1 Data Analysis 1 - V2.0 1 Entity Relationship Modelling Overview Database Analysis Life Cycle Components of an Entity Relationship Diagram What is a relationship? Entities, attributes,
Laboratory work in AI: First steps in Poker Playing Agents and Opponent Modeling
Laboratory work in AI: First steps in Poker Playing Agents and Opponent Modeling Avram Golbert 01574669 [email protected] Abstract: While Artificial Intelligence research has shown great success in deterministic
AUTOMATED TEST GENERATION FOR SOFTWARE COMPONENTS
TKK Reports in Information and Computer Science Espoo 2009 TKK-ICS-R26 AUTOMATED TEST GENERATION FOR SOFTWARE COMPONENTS Kari Kähkönen ABTEKNILLINEN KORKEAKOULU TEKNISKA HÖGSKOLAN HELSINKI UNIVERSITY OF
Algebra 1 Course Information
Course Information Course Description: Students will study patterns, relations, and functions, and focus on the use of mathematical models to understand and analyze quantitative relationships. Through
Prerequisites Guide. Version 4.0, Rev. 1
Version 4.0, Rev. 1 Contents Software and Hardware Prerequisites Guide... 2 anterradatacenter Version selection... 2 Required Software Components... 2 Sage 300 Construction and Real Estate ODBC... 2 Pervasive
2003 HSC Notes from the Marking Centre Software Design and Development
00 HSC Notes from the Marking Centre Software Design and Development 004 Copyright Board of Studies NSW for and on behalf of the Crown in right of the State of New South Wales. This document contains Material
Dsc+Mock: A Test Case + Mock Class Generator in Support of Coding Against Interfaces
Dsc+Mock: A Test Case + Mock Class Generator in Support of Coding Against Interfaces Mainul Islam, Christoph Csallner Computer Science and Engineering Department University of Texas at Arlington Arlington,
An approach of detecting structure emergence of regional complex network of entrepreneurs: simulation experiment of college student start-ups
An approach of detecting structure emergence of regional complex network of entrepreneurs: simulation experiment of college student start-ups Abstract Yan Shen 1, Bao Wu 2* 3 1 Hangzhou Normal University,
ISSN: 2319-5967 ISO 9001:2008 Certified International Journal of Engineering Science and Innovative Technology (IJESIT) Volume 2, Issue 3, May 2013
Transistor Level Fault Finding in VLSI Circuits using Genetic Algorithm Lalit A. Patel, Sarman K. Hadia CSPIT, CHARUSAT, Changa., CSPIT, CHARUSAT, Changa Abstract This paper presents, genetic based algorithm
Efficient Data Structures for Decision Diagrams
Artificial Intelligence Laboratory Efficient Data Structures for Decision Diagrams Master Thesis Nacereddine Ouaret Professor: Supervisors: Boi Faltings Thomas Léauté Radoslaw Szymanek Contents Introduction...
Test case design techniques I: Whitebox testing CISS
Test case design techniques I: Whitebox testing Overview What is a test case Sources for test case derivation Test case execution White box testing Flowgraphs Test criteria/coverage Statement / branch
Applied Algorithm Design Lecture 5
Applied Algorithm Design Lecture 5 Pietro Michiardi Eurecom Pietro Michiardi (Eurecom) Applied Algorithm Design Lecture 5 1 / 86 Approximation Algorithms Pietro Michiardi (Eurecom) Applied Algorithm Design
Positional Numbering System
APPENDIX B Positional Numbering System A positional numbering system uses a set of symbols. The value that each symbol represents, however, depends on its face value and its place value, the value associated
A Stock Pattern Recognition Algorithm Based on Neural Networks
A Stock Pattern Recognition Algorithm Based on Neural Networks Xinyu Guo [email protected] Xun Liang [email protected] Xiang Li [email protected] Abstract pattern respectively. Recent
Procedia Computer Science 00 (2012) 1 21. Trieu Minh Nhut Le, Jinli Cao, and Zhen He. [email protected], [email protected], [email protected].
Procedia Computer Science 00 (2012) 1 21 Procedia Computer Science Top-k best probability queries and semantics ranking properties on probabilistic databases Trieu Minh Nhut Le, Jinli Cao, and Zhen He
Design and Analysis of ACO algorithms for edge matching problems
Design and Analysis of ACO algorithms for edge matching problems Carl Martin Dissing Söderlind Kgs. Lyngby 2010 DTU Informatics Department of Informatics and Mathematical Modelling Technical University
INTERNATIONAL JOURNAL OF COMPUTER ENGINEERING & TECHNOLOGY (IJCET)
INTERNATIONAL JOURNAL OF COMPUTER ENGINEERING & TECHNOLOGY (IJCET) International Journal of Computer Engineering and Technology (IJCET), ISSN 0976 6367(Print), ISSN 0976 6367(Print) ISSN 0976 6375(Online)
Evolutionary Detection of Rules for Text Categorization. Application to Spam Filtering
Advances in Intelligent Systems and Technologies Proceedings ECIT2004 - Third European Conference on Intelligent Systems and Technologies Iasi, Romania, July 21-23, 2004 Evolutionary Detection of Rules
Revenue Management for Transportation Problems
Revenue Management for Transportation Problems Francesca Guerriero Giovanna Miglionico Filomena Olivito Department of Electronic Informatics and Systems, University of Calabria Via P. Bucci, 87036 Rende
Glossary of Object Oriented Terms
Appendix E Glossary of Object Oriented Terms abstract class: A class primarily intended to define an instance, but can not be instantiated without additional methods. abstract data type: An abstraction
Improving Mutation Testing Process of Python Programs
Improving Mutation Testing Process of Python Programs Anna Derezinska and Konrad Hałas Institute of Computer Science, Warsaw University of Technology Nowowiejska 15/19, 00-665 Warsaw, Poland [email protected]
Evaluation of Complexity of Some Programming Languages on the Travelling Salesman Problem
International Journal of Applied Science and Technology Vol. 3 No. 8; December 2013 Evaluation of Complexity of Some Programming Languages on the Travelling Salesman Problem D. R. Aremu O. A. Gbadamosi
Factoring Patterns in the Gaussian Plane
Factoring Patterns in the Gaussian Plane Steve Phelps Introduction This paper describes discoveries made at the Park City Mathematics Institute, 00, as well as some proofs. Before the summer I understood
December 4, 2013 MATH 171 BASIC LINEAR ALGEBRA B. KITCHENS
December 4, 2013 MATH 171 BASIC LINEAR ALGEBRA B KITCHENS The equation 1 Lines in two-dimensional space (1) 2x y = 3 describes a line in two-dimensional space The coefficients of x and y in the equation
PROBLEM SOLVING SEVENTH EDITION WALTER SAVITCH UNIVERSITY OF CALIFORNIA, SAN DIEGO CONTRIBUTOR KENRICK MOCK UNIVERSITY OF ALASKA, ANCHORAGE PEARSON
PROBLEM SOLVING WITH SEVENTH EDITION WALTER SAVITCH UNIVERSITY OF CALIFORNIA, SAN DIEGO CONTRIBUTOR KENRICK MOCK UNIVERSITY OF ALASKA, ANCHORAGE PEARSON Addison Wesley Boston San Francisco New York London
SMock A Test Platform for the Evaluation of Monitoring Tools
SMock A Test Platform for the Evaluation of Monitoring Tools User Manual Ruth Mizzi Faculty of ICT University of Malta June 20, 2013 Contents 1 Introduction 3 1.1 The Architecture and Design of SMock................
Common Core Unit Summary Grades 6 to 8
Common Core Unit Summary Grades 6 to 8 Grade 8: Unit 1: Congruence and Similarity- 8G1-8G5 rotations reflections and translations,( RRT=congruence) understand congruence of 2 d figures after RRT Dilations
Regular Languages and Finite Automata
Regular Languages and Finite Automata 1 Introduction Hing Leung Department of Computer Science New Mexico State University Sep 16, 2010 In 1943, McCulloch and Pitts [4] published a pioneering work on a
NEW TECHNIQUE TO DEAL WITH DYNAMIC DATA MINING IN THE DATABASE
www.arpapress.com/volumes/vol13issue3/ijrras_13_3_18.pdf NEW TECHNIQUE TO DEAL WITH DYNAMIC DATA MINING IN THE DATABASE Hebah H. O. Nasereddin Middle East University, P.O. Box: 144378, Code 11814, Amman-Jordan
