script.kps 1.2 KB
Newer Older
Lulu Luong's avatar
Lulu Luong committed
1 2 3 4 5
script interaction() {
    impRight;
    cut;
}

Lulu Luong's avatar
#54  
Lulu Luong committed
6 7 8 9
script empty(){

}

Sarah Grebing's avatar
minor  
Sarah Grebing committed
10 11 12 13 14
script full(){
  impRight;
  impRight;
  impLeft;
  cases {
Sarah Grebing's avatar
Sarah Grebing committed
15
	case derivable `p`:
Sarah Grebing's avatar
minor  
Sarah Grebing committed
16 17 18 19
   }
}


20
script full2(){
Sarah Grebing's avatar
Sarah Grebing committed
21 22 23 24 25 26 27
  impRight;
  impRight;
  impLeft;
  cases {
	case match `!q ==> p`:
		notLeft;
		notRight;
Sarah Grebing's avatar
Sarah Grebing committed
28 29
		closeAntec;

Sarah Grebing's avatar
Sarah Grebing committed
30 31 32 33 34 35

	case match `q==>!p`:
		notLeft;
		closeAntec;
   }
}
36

Sarah Grebing's avatar
Sarah Grebing committed
37
script autoScript(){
38 39
    __STRICT_MODE := true;
    auto;
Sarah Grebing's avatar
Sarah Grebing committed
40 41
}

42

43
script interactive(){
44
  impRight;
Sarah Grebing's avatar
Sarah Grebing committed
45
  impRight;
46
  impLeft;
47
//after execution of this script, manual interaction can be performed
48
}
49
script interactive_with_match(){
50
impRight;
LULUDBR\Lulu's avatar
LULUDBR\Lulu committed
51
impRight;
52
#save 'test0' force='yes';
53 54
impLeft;
cases{
55
    case match `==> !(?Z), ?Z`:
56
      notRight;
LULUDBR\Lulu's avatar
LULUDBR\Lulu committed
57 58 59 60

    default:
      notLeft;

61
    }
62 63

}
Sarah Grebing's avatar
Sarah Grebing committed
64 65 66 67 68 69 70 71 72

script usageOfTryInCases(){
cases{
    try: impLeft; //if this mutator is successful, do this operation otherwise use next case

    default:
        __KEY_MAX_STEPS:= 100;
        impRight;
    }
73
    auto;
74 75
}

76
script varDecl1(){
77 78 79
    var1 : INT :=  1;
    var2 : INT :=  2;
    var3 : INT :=  3;
80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101
}

script varDecl2(){
  var1 : INT :=  1;
  impRight;
  impRight;
  impLeft;
  cases {
	case match `!q ==> p`:
		notLeft;
		var2 : INT :=  2;
		notRight;



	case match `q==>!p`:
		notLeft;
		var3 : INT :=  3;
   }



Sarah Grebing's avatar
Sarah Grebing committed
102
}