-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path28.cpp
37 lines (29 loc) · 823 Bytes
/
28.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
#include "iif.h"
#include <iostream>
using namespace std;
using namespace iif;
int loopFunction(int _reserved_input_[]) {
int i = _reserved_input_[0];
int j = _reserved_input_[1];
if (i < 0) i = -i; if (j < 0) j = -j; if (i == 0) i = 1; if (j == 0) j = 1;
iif_assume( i * i < j * j);
while( i < j) {
recordi(i, j);
j = j - i;
if (j < i) {
j = j + i;
i = j - i;
j = j - i;
}
}
recordi(i, j);
iif_assert(j == i);
return 0;
}
int main(int argc, char** argv) {
iifround = atoi(argv[1]);
initseed = atoi(argv[2]);
iifContext context("/home/lijiaying/Research/zilu/tmp/28.var", loopFunction, "loopFunction", "/home/lijiaying/Research/zilu/tmp/28.ds");
context.addLearner("linear");
return context.learn("/home/lijiaying/Research/zilu/tmp/28.cnt", "/home/lijiaying/Research/zilu/tmp/28");
}