3 // libdyninst validation suite test #1
4 // Author: Jeff Hollingsworth (1/7/97)
5 // derived from a previous test by Bryan Buck
8 // This program tests the basic features of the dyninst API.
9 // The mutatee that goes with this file is test1.mutatee.c
11 // Naming conventions:
12 // All functions, variables, etc are name funcXX_YY, exprXX_YY, etc.
13 // XX is the test number
14 // YY is the instance withing the test
15 // func1_2 is the second function used in test case #1.
20 * Revision 1.2 1997/04/29 16:58:55 buck
21 * Added features to dyninstAPI library, including the ability to delete
22 * inserted snippets and the start of type checking.
24 * Revision 1.3 1997/04/09 17:20:51 buck
25 * Added test for deleting snippets.
27 * Revision 1.2 1997/04/03 20:08:56 buck
28 * Added BPatch class and moved global library data/functions into it.
30 * Revision 1.1.1.1 1997/04/01 20:25:15 buck
31 * Update Maryland repository with latest from Wisconsin.
33 * Revision 1.1 1997/03/18 19:45:21 buck
34 * first commit of dyninst library. Also includes:
35 * moving templates from paradynd to dyninstAPI
36 * converting showError into a function (in showerror.C)
37 * many ifdefs for BPATCH_LIBRARY in dyinstAPI/src.
46 #include "BPatch_Vector.h"
47 #include "BPatch_thread.h"
48 #include "BPatch_snippet.h"
54 // control debug printf statements
55 #define dprintf if (debugPrint) printf
58 // Start Test Case #6 - mutator side (arithmetic operators)
60 void mutatorTest6(BPatch_thread *appThread, BPatch_image *appImage)
62 // Find the entry point to the procedure "func6_1"
63 BPatch_Vector<BPatch_point *> *point6_1 =
64 appImage->findProcedurePoint("func6_1", BPatch_entry);
65 BPatch_variableExpr *expr6_1 = appImage->findVariable("globalVariable6_1");
66 BPatch_variableExpr *expr6_2 = appImage->findVariable("globalVariable6_2");
67 BPatch_variableExpr *expr6_3 = appImage->findVariable("globalVariable6_3");
68 BPatch_variableExpr *expr6_4 = appImage->findVariable("globalVariable6_4");
69 BPatch_variableExpr *expr6_5 = appImage->findVariable("globalVariable6_5");
70 BPatch_variableExpr *expr6_6 = appImage->findVariable("globalVariable6_6");
71 if (!expr6_1 || !expr6_2 || !expr6_3 || !expr6_4 ||
72 !expr6_5 || !expr6_6) {
73 fprintf(stderr, "**Failed** test #6 (arithmetic operators)\n");
74 fprintf(stderr, " Unable to locate one of globalVariable6_?\n");
78 BPatch_Vector<BPatch_snippet*> vect6_1;
80 // globalVariable6_1 = 60 + 2
81 BPatch_arithExpr arith6_1 (BPatch_assign, *expr6_1,
82 BPatch_arithExpr(BPatch_plus,BPatch_constExpr(60), BPatch_constExpr(2)));
83 vect6_1.push_back(&arith6_1);
85 // globalVariable6_2 = 64 - 1
86 BPatch_arithExpr arith6_2 (BPatch_assign, *expr6_2,
87 BPatch_arithExpr(BPatch_minus,BPatch_constExpr(64),BPatch_constExpr(1)));
88 vect6_1.push_back(&arith6_2);
90 // globalVariable6_3 = 66 / 3
91 BPatch_arithExpr arith6_3 (BPatch_assign, *expr6_3, BPatch_arithExpr(
92 BPatch_divide,BPatch_constExpr(66),BPatch_constExpr(3)));
93 vect6_1.push_back(&arith6_3);
95 // globalVariable6_4 = 67 / 3
96 BPatch_arithExpr arith6_4 (BPatch_assign, *expr6_4, BPatch_arithExpr(
97 BPatch_divide,BPatch_constExpr(67),BPatch_constExpr(3)));
98 vect6_1.push_back(&arith6_4);
100 // globalVariable6_5 = 6 * 5
101 BPatch_arithExpr arith6_5 (BPatch_assign, *expr6_5, BPatch_arithExpr(
102 BPatch_times,BPatch_constExpr(6),BPatch_constExpr(5)));
103 vect6_1.push_back(&arith6_5);
105 // globalVariable6_6 = 10,3
106 BPatch_arithExpr arith6_6 (BPatch_assign, *expr6_6,
107 BPatch_arithExpr(BPatch_seq,BPatch_constExpr(10),BPatch_constExpr(3)));
108 vect6_1.push_back(&arith6_6);
110 appThread->insertSnippet( BPatch_sequence(vect6_1), *point6_1);
113 void genRelTest(BPatch_image *appImage,BPatch_Vector<BPatch_snippet*> &vect7_1,
114 BPatch_relOp op, int r1, int r2, char *var1)
116 BPatch_variableExpr *varExpr1 = appImage->findVariable(var1);
118 fprintf(stderr, "**Failed** test #7 (relational operators)\n");
119 fprintf(stderr, " Unable to locate variable %s\n", var1);
122 BPatch_ifExpr *tempExpr1 = new BPatch_ifExpr(
123 BPatch_boolExpr(op, BPatch_constExpr(r1), BPatch_constExpr(r2)),
124 BPatch_arithExpr(BPatch_assign, *varExpr1, BPatch_constExpr(72)));
125 vect7_1.push_back(tempExpr1);
130 // Start Test Case #7 - mutator side (relational operators)
132 void mutatorTest7(BPatch_thread *appThread, BPatch_image *appImage)
134 // Find the entry point to the procedure "func7_1"
135 BPatch_Vector<BPatch_point *> *point7_1 =
136 appImage->findProcedurePoint("func7_1", BPatch_entry);
137 BPatch_Vector<BPatch_snippet*> vect7_1;
139 genRelTest(appImage, vect7_1, BPatch_lt, 0, 1, "globalVariable7_1");
140 genRelTest(appImage, vect7_1, BPatch_lt, 1, 0, "globalVariable7_2");
141 genRelTest(appImage, vect7_1, BPatch_eq, 2, 2, "globalVariable7_3");
142 genRelTest(appImage, vect7_1, BPatch_eq, 2, 3, "globalVariable7_4");
143 genRelTest(appImage, vect7_1, BPatch_gt, 4, 3, "globalVariable7_5");
144 genRelTest(appImage, vect7_1, BPatch_gt, 3, 4, "globalVariable7_6");
145 genRelTest(appImage, vect7_1, BPatch_le, 3, 4, "globalVariable7_7");
146 genRelTest(appImage, vect7_1, BPatch_le, 4, 3, "globalVariable7_8");
147 genRelTest(appImage, vect7_1, BPatch_ne, 5, 6, "globalVariable7_9");
148 genRelTest(appImage, vect7_1, BPatch_ne, 5, 5, "globalVariable7_10");
149 genRelTest(appImage, vect7_1, BPatch_ge, 9, 7, "globalVariable7_11");
150 genRelTest(appImage, vect7_1, BPatch_ge, 7, 9, "globalVariable7_12");
151 genRelTest(appImage, vect7_1, BPatch_and, 1, 1, "globalVariable7_13");
152 genRelTest(appImage, vect7_1, BPatch_and, 1, 0, "globalVariable7_14");
153 genRelTest(appImage, vect7_1, BPatch_or, 1, 0, "globalVariable7_15");
154 genRelTest(appImage, vect7_1, BPatch_or, 0, 0, "globalVariable7_16");
156 dprintf("relops test vector length is %d\n", vect7_1.size());
158 appThread->insertSnippet( BPatch_sequence(vect7_1), *point7_1);
162 // Start Test Case #8 - mutator side (preserve registers - expr)
164 void mutatorTest8(BPatch_thread *appThread, BPatch_image *appImage)
166 // Find the entry point to the procedure "func8_1"
167 BPatch_Vector<BPatch_point *> *point8_1 =
168 appImage->findProcedurePoint("func8_1", BPatch_entry);
169 BPatch_Vector<BPatch_snippet*> vect8_1;
171 BPatch_variableExpr *expr8_1 = appImage->findVariable("globalVariable8_1");
173 fprintf(stderr, "**Failed** test #3 (passing variables)\n");
174 fprintf(stderr, " Unable to locate variable globalVariable8_1\n");
178 BPatch_arithExpr arith8_1 (BPatch_assign, *expr8_1,
179 BPatch_arithExpr(BPatch_plus,
180 BPatch_arithExpr(BPatch_plus,
181 BPatch_arithExpr(BPatch_plus, BPatch_constExpr(81),
182 BPatch_constExpr(82)),
183 BPatch_arithExpr(BPatch_plus, BPatch_constExpr(83),
184 BPatch_constExpr(84))),
185 BPatch_arithExpr(BPatch_plus,
186 BPatch_arithExpr(BPatch_plus, BPatch_constExpr(85),
187 BPatch_constExpr(86)),
188 BPatch_arithExpr(BPatch_plus, BPatch_constExpr(87),
189 BPatch_constExpr(88)))));
190 vect8_1.push_back(&arith8_1);
192 appThread->insertSnippet( BPatch_sequence(vect8_1), *point8_1);
196 // Start Test Case #9 - mutator side (preserve registers - funcCall)
198 void mutatorTest9(BPatch_thread *appThread, BPatch_image *appImage)
200 // Find the entry point to the procedure "func9_1"
201 BPatch_Vector<BPatch_point *> *point9_1 =
202 appImage->findProcedurePoint("func9_1", BPatch_entry);
204 BPatch_function *call9_func = appImage->findFunction("call9_1");
205 if (call9_func == NULL) {
206 fprintf(stderr, "Unable to find function \"call9_1.\"\n");
210 BPatch_Vector<BPatch_snippet *> call9_args;
212 BPatch_constExpr constExpr91(91);
213 call9_args.push_back(&constExpr91);
215 BPatch_constExpr constExpr92(92);
216 call9_args.push_back(&constExpr92);
218 BPatch_constExpr constExpr93(93);
219 call9_args.push_back(&constExpr93);
221 BPatch_constExpr constExpr94(94);
222 call9_args.push_back(&constExpr94);
224 BPatch_constExpr constExpr95(95);
225 call9_args.push_back(&constExpr95);
227 BPatch_funcCallExpr call9Expr(*call9_func, call9_args);
229 appThread->insertSnippet( call9Expr, *point9_1);
234 // Start Test Case #10 - mutator side (insert snippet order)
236 void mutatorTest10(BPatch_thread *appThread, BPatch_image *appImage)
238 // Find the entry point to the procedure "func10_1"
239 BPatch_Vector<BPatch_point *> *point10_1 =
240 appImage->findProcedurePoint("func10_1", BPatch_entry);
242 BPatch_function *call10_1_func = appImage->findFunction("call10_1");
243 if (call10_1_func == NULL) {
244 fprintf(stderr, "Unable to find function \"call10_1.\"\n");
248 BPatch_function *call10_2_func = appImage->findFunction("call10_2");
249 if (call10_2_func == NULL) {
250 fprintf(stderr, "Unable to find function \"call10_2.\"\n");
254 BPatch_function *call10_3_func = appImage->findFunction("call10_3");
255 if (call10_3_func == NULL) {
256 fprintf(stderr, "Unable to find function \"call10_3.\"\n");
260 BPatch_Vector<BPatch_snippet *> nullArgs;
261 BPatch_funcCallExpr call10_1Expr(*call10_1_func, nullArgs);
262 BPatch_funcCallExpr call10_2Expr(*call10_2_func, nullArgs);
263 BPatch_funcCallExpr call10_3Expr(*call10_3_func, nullArgs);
265 appThread->insertSnippet( call10_2Expr, *point10_1);
266 appThread->insertSnippet( call10_1Expr, *point10_1, BPatch_callBefore,
267 BPatch_firstSnippet);
268 appThread->insertSnippet( call10_3Expr, *point10_1, BPatch_callBefore,
274 // Start Test Case #11 - mutator side (snippets at entry,exit,call)
276 void mutatorTest11(BPatch_thread *appThread, BPatch_image *appImage)
278 // Find the entry point to the procedure "func11_1"
279 BPatch_Vector<BPatch_point *> *point11_1 =
280 appImage->findProcedurePoint("func11_1", BPatch_entry);
282 fprintf(stderr, "Unable to find point func11_1 - entry.\n");
286 // Find the subroutine points for the procedure "func11_1"
287 BPatch_Vector<BPatch_point *> *point11_2 =
288 appImage->findProcedurePoint("func11_1", BPatch_subroutine);
290 fprintf(stderr, "Unable to find point func11_1 - calls.\n");
294 // Find the exit point to the procedure "func11_1"
295 BPatch_Vector<BPatch_point *> *point11_3 =
296 appImage->findProcedurePoint("func11_1", BPatch_exit);
298 fprintf(stderr, "Unable to find point func11_1 - exit.\n");
302 BPatch_function *call11_1_func = appImage->findFunction("call11_1");
303 if (call11_1_func == NULL) {
304 fprintf(stderr, "Unable to find function \"call11_1.\"\n");
308 BPatch_function *call11_2_func = appImage->findFunction("call11_2");
309 if (call11_2_func == NULL) {
310 fprintf(stderr, "Unable to find function \"call11_2.\"\n");
314 BPatch_function *call11_3_func = appImage->findFunction("call11_3");
315 if (call11_3_func == NULL) {
316 fprintf(stderr, "Unable to find function \"call11_3.\"\n");
320 BPatch_function *call11_4_func = appImage->findFunction("call11_4");
321 if (call11_4_func == NULL) {
322 fprintf(stderr, "Unable to find function \"call11_4.\"\n");
326 BPatch_Vector<BPatch_snippet *> nullArgs;
327 BPatch_funcCallExpr call11_1Expr(*call11_1_func, nullArgs);
328 BPatch_funcCallExpr call11_2Expr(*call11_2_func, nullArgs);
329 BPatch_funcCallExpr call11_3Expr(*call11_3_func, nullArgs);
330 BPatch_funcCallExpr call11_4Expr(*call11_4_func, nullArgs);
332 appThread->insertSnippet(call11_1Expr, *point11_1);
333 appThread->insertSnippet(call11_2Expr, *point11_2, BPatch_callBefore);
334 appThread->insertSnippet(call11_3Expr, *point11_2, BPatch_callAfter);
335 appThread->insertSnippet(call11_4Expr, *point11_3);
339 BPatchSnippetHandle *snippetHandle12_1;
340 BPatch_variableExpr *varExpr12_1;
343 // Start Test Case #12 - mutator side (insert/remove and malloc/free)
345 void mutatorTest12a(BPatch_thread *appThread, BPatch_image *appImage)
347 // Find the entry point to the procedure "func12_2"
348 BPatch_Vector<BPatch_point *> *point12_2 =
349 appImage->findProcedurePoint("func12_2", BPatch_entry);
351 fprintf(stderr, "Unable to find point func12_2 - entry.\n");
355 varExpr12_1 = appThread->malloc(100);
357 fprintf(stderr, "Unable to allocate 100 bytes in mutatee\n");
361 BPatch_function *call12_1_func = appImage->findFunction("call12_1");
362 if (call12_1_func == NULL) {
363 fprintf(stderr, "Unable to find function \"call12_1.\"\n");
367 BPatch_Vector<BPatch_snippet *> nullArgs;
368 BPatch_funcCallExpr call12_1Expr(*call12_1_func, nullArgs);
369 snippetHandle12_1 = appThread->insertSnippet(call12_1Expr, *point12_2);
370 if (!snippetHandle12_1) {
372 "Unable to insert snippet to call function \"call12_1.\"\n");
377 void mutatorTest12b(BPatch_thread *appThread, BPatch_image *appImage)
379 while (!appThread->isStopped() && !appThread->isTerminated()) ;
380 if (appThread->stopSignal() == SIGSTOP) {
381 // remove instrumentation and free memory
382 if (!appThread->deleteSnippet(snippetHandle12_1)) {
383 printf("**Failed test #12 (insert/remove and malloc/free)\n");
384 printf(" deleteSnippet returned an error\n");
387 appThread->free(*varExpr12_1);
390 appThread->continueExecution();
391 } else if (appThread->isStopped()) {
392 printf("**Failed test #12 (insert/remove and malloc/free)\n");
393 printf(" process stopped on signal %d, not SIGSTOP\n",
394 appThread->stopSignal());
397 printf("**Failed test #12 (insert/remove and malloc/free)\n");
398 printf(" process did not signal mutator via SIGSTOP\n");
405 // Start Test Case #13 - mutator side (paramExpr,nullExpr)
407 void mutatorTest13(BPatch_thread *appThread, BPatch_image *appImage)
409 // Find the entry point to the procedure "func13_1"
410 BPatch_Vector<BPatch_point *> *point13_1 =
411 appImage->findProcedurePoint("func13_1", BPatch_entry);
413 fprintf(stderr, "Unable to find point func13_1 - entry.\n");
417 BPatch_function *call13_1_func = appImage->findFunction("call13_1");
418 if (call13_1_func == NULL) {
419 fprintf(stderr, "Unable to find function \"call13_1.\"\n");
423 BPatch_Vector<BPatch_snippet *> funcArgs;
424 funcArgs.push_back(new BPatch_paramExpr(0));
425 funcArgs.push_back(new BPatch_paramExpr(1));
426 funcArgs.push_back(new BPatch_paramExpr(2));
427 funcArgs.push_back(new BPatch_paramExpr(3));
428 funcArgs.push_back(new BPatch_paramExpr(4));
429 BPatch_funcCallExpr call13_1Expr(*call13_1_func, funcArgs);
430 BPatch_nullExpr call13_2Expr;
432 appThread->insertSnippet(call13_1Expr, *point13_1);
433 // This causes a crash right now jkh 3/7/97
434 // appThread->insertSnippet(call13_2Expr, *point13_1);
437 void mutatorMAIN(char *pathname)
439 // Create an instance of the bpatch library
443 printf("Starting \"%s\"\n", pathname);
445 char *child_argv[] = { pathname, "-verbose", NULL };
447 // null out the verbose mode if not enabled.
448 child_argv[1] = NULL;
450 BPatch_thread *appThread =
451 new BPatch_thread(pathname, child_argv, NULL);
453 if (appThread->isTerminated()) {
454 fprintf(stderr, "Unable to run test program.\n");
458 // Read the program's image and get an associated image object
459 BPatch_image *appImage = appThread->getImage();
461 BPatch_Vector<BPatch_function *> *p = appImage->getProcedures();
462 for (int i=0; i < p->size(); i++) {
463 // dprintf("func %s\n", (*p)[i]->name());
466 // Start Test Case #1 - mutator side (call a zero argument function)
468 // Find the entry point to the procedure "func1_1"
469 BPatch_Vector<BPatch_point *> *point1_1 =
470 appImage->findProcedurePoint("func1_1", BPatch_entry);
472 if ((*point1_1).size() == 0) {
473 fprintf(stderr, "**Failed** test #1 (zero arg function call)\n");
474 fprintf(stderr, " Unable to find entry point to \"func1_1.\"\n");
478 BPatch_function *call1_func = appImage->findFunction("call1_1");
479 if (call1_func == NULL) {
480 fprintf(stderr, "**Failed** test #1 (zero arg function call)\n");
481 fprintf(stderr, "Unable to find function \"call1_1\"\n");
485 BPatch_Vector<BPatch_snippet *> call1_args;
486 BPatch_funcCallExpr call1Expr(*call1_func, call1_args);
488 dprintf("Inserted snippet2\n");
489 appThread->insertSnippet(call1Expr, *point1_1);
493 // Start Test Case #2 - mutator side (call a three argument function)
496 // Find the entry point to the procedure "func2_1"
497 BPatch_Vector<BPatch_point *> *point2_1 =
498 appImage->findProcedurePoint("func2_1", BPatch_entry);
500 if (!point2_1 || ((*point2_1).size() == 0)) {
501 fprintf(stderr, "**Failed** test #2 (three parameter function)\n");
502 fprintf(stderr, " Unable to find entry point to \"func2_1.\"\n");
506 BPatch_function *call2_func = appImage->findFunction("call2_1");
507 if (call2_func == NULL) {
508 fprintf(stderr, "**Failed** test #2 (three parameter function)\n");
509 fprintf(stderr, " Unable to find function \"call2_1.\"\n");
513 BPatch_Vector<BPatch_snippet *> call2_args;
514 BPatch_constExpr expr2_1(1);
515 BPatch_constExpr expr2_2(2);
516 BPatch_constExpr expr2_3("testString2_1");
517 call2_args.push_back(&expr2_1);
518 call2_args.push_back(&expr2_2);
519 call2_args.push_back(&expr2_3);
521 BPatch_funcCallExpr call2Expr(*call2_func, call2_args);
523 dprintf("Inserted snippet2\n");
524 appThread->insertSnippet(call2Expr, *point2_1);
527 // Start Test Case #3 - mutator side (passing variables to function)
530 // Find the entry point to the procedure "func3_1"
531 BPatch_Vector<BPatch_point *> *point3_1 =
532 appImage->findProcedurePoint("func3_1", BPatch_entry);
534 if (!point3_1 || ((*point3_1).size() == 0)) {
535 fprintf(stderr, "Unable to find entry point to \"func3_1.\"\n");
539 BPatch_function *call3_func = appImage->findFunction("call3_1");
540 if (call3_func == NULL) {
541 fprintf(stderr, "Unable to find function \"call3_1.\"\n");
545 BPatch_Vector<BPatch_snippet *> call3_args;
547 BPatch_variableExpr *expr3_1 = appImage->findVariable("globalVariable3_1");
549 fprintf(stderr, "**Failed** test #3 (passing variables)\n");
550 fprintf(stderr, " Unable to locate variable globalVariable3_1\n");
554 BPatch_variableExpr *expr3_2 = appThread->malloc(*appImage->findType("int"));
556 fprintf(stderr, "**Failed** test #3 (passing variables)\n");
557 fprintf(stderr, " Unable to create new int variable\n");
561 call3_args.push_back(expr3_1);
562 call3_args.push_back(expr3_2);
564 BPatch_funcCallExpr call3Expr(*call3_func, call3_args);
565 appThread->insertSnippet(call3Expr, *point3_1);
567 BPatch_arithExpr expr3_3(BPatch_assign, *expr3_2, BPatch_constExpr(32));
568 appThread->insertSnippet(expr3_3, *point3_1);
570 dprintf("Inserted snippet3\n");
573 // Start Test Case #4 - mutator side (sequence)
576 // Find the entry point to the procedure "func4_1"
577 BPatch_Vector<BPatch_point *> *point4_1 =
578 appImage->findProcedurePoint("func4_1", BPatch_entry);
581 BPatch_variableExpr *expr4_1 = appImage->findVariable("globalVariable4_1");
583 fprintf(stderr, "**Failed** test #4 (sequence)\n");
584 fprintf(stderr, " Unable to locate variable globalVariable4_1\n");
588 BPatch_arithExpr expr4_2(BPatch_assign, *expr4_1, BPatch_constExpr(42));
589 BPatch_arithExpr expr4_3(BPatch_assign, *expr4_1, BPatch_constExpr(43));
591 BPatch_Vector<BPatch_snippet*> vect4_1;
592 vect4_1.push_back(&expr4_2);
593 vect4_1.push_back(&expr4_3);
595 BPatch_sequence expr4_4(vect4_1);
596 appThread->insertSnippet(expr4_4, *point4_1);
599 // Start Test Case #5 - mutator side (if w.o. else)
602 // Find the entry point to the procedure "func5_1"
603 BPatch_Vector<BPatch_point *> *point5_1 =
604 appImage->findProcedurePoint("func5_1", BPatch_entry);
605 BPatch_variableExpr *expr5_1 = appImage->findVariable("globalVariable5_1");
606 BPatch_variableExpr *expr5_2 = appImage->findVariable("globalVariable5_2");
607 if (!expr5_1 || !expr5_2) {
608 fprintf(stderr, "**Failed** test #5 (f w.o. else)\n");
609 fprintf(stderr, " Unable to locate variable globalVariable5_1 or ");
610 fprintf(stderr, " variable globalVariable5_2\n");
614 BPatch_Vector<BPatch_snippet*> vect5_1;
616 // if (0 == 1) globalVariable5_1 = 52;
617 BPatch_ifExpr expr5_3(
618 BPatch_boolExpr(BPatch_eq, BPatch_constExpr(0), BPatch_constExpr(1)),
619 BPatch_arithExpr(BPatch_assign, *expr5_1, BPatch_constExpr(52)));
621 // if (1 == 1) globalVariable5_2 = 53;
622 BPatch_ifExpr expr5_4(
623 BPatch_boolExpr(BPatch_eq, BPatch_constExpr(1), BPatch_constExpr(1)),
624 BPatch_arithExpr(BPatch_assign, *expr5_2, BPatch_constExpr(53)));
626 vect5_1.push_back(&expr5_3);
627 vect5_1.push_back(&expr5_4);
629 BPatch_sequence expr5_5(vect5_1);
630 appThread->insertSnippet(expr5_5, *point5_1);
632 mutatorTest6(appThread, appImage);
634 mutatorTest7(appThread, appImage);
636 mutatorTest8(appThread, appImage);
638 mutatorTest9(appThread, appImage);
640 mutatorTest10(appThread, appImage);
642 mutatorTest11(appThread, appImage);
644 mutatorTest12a(appThread, appImage);
646 mutatorTest13(appThread, appImage);
648 // Start of code to continue the process.
649 dprintf("starting program execution.\n");
650 appThread->continueExecution();
652 mutatorTest12b(appThread, appImage);
654 while (!appThread->isTerminated()) ;
659 // main - decide our role and call the correct "main"
661 main(int argc, char *argv[])
664 // become the mutator
665 mutatorMAIN("./test1.mutatee");
666 } else if (argc == 2 && !strcmp(argv[1], "-verbose")) {
668 mutatorMAIN("./test1.mutatee");
670 fprintf(stderr, "Usage: test1 [-verbose]\n");