-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathf2.cpp
48 lines (40 loc) · 948 Bytes
/
f2.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#include "iif.h"
#include <iostream>
using namespace std;
using namespace iif;
int loopFunction(int _reserved_input_[]) {
int x = _reserved_input_[0];
int y = _reserved_input_[1];
int z = _reserved_input_[2];
int w = _reserved_input_[3];
iif_assume(x==0&&y==0&&z==0&&w==0);
while(rand()%2) {
recordi(x, y, z, w);
if(rand()%2){
x++;
y=y+2;
}
else if(rand()%2){
if(x>=4){
x++;
y=y+3;
z=z+10;
w=w+10;
}
}
else if(x>=z&&w>=y+1){
x=-x;
y=-y;
}
}
recordi(x, y, z, w);
iif_assert(3*x>y-1);
return 0;
}
int main(int argc, char** argv) {
iifround = atoi(argv[1]);
initseed = atoi(argv[2]);
iifContext context("/home/lijiaying/Research/GitHub/zilu/tmp/f2.var", loopFunction, "loopFunction", "/home/lijiaying/Research/GitHub/zilu/tmp/f2.ds");
context.addLearner("conjunctive");
return context.learn("/home/lijiaying/Research/GitHub/zilu/tmp/f2.cnt", "/home/lijiaying/Research/GitHub/zilu/tmp/f2");
}