-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathmain.cpp
More file actions
37 lines (35 loc) · 1.07 KB
/
main.cpp
File metadata and controls
37 lines (35 loc) · 1.07 KB
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
#include "helpers.h"
#include "time_testing_marco.h"
vector<int> getInts(string s){
string digits(s.length(), ' ');
copy_if(s.begin(), s.end(), digits.begin(), [](char c){
return isdigit(c);
});
int len = digits.find_last_not_of(' ') + 1;
vector<int> res(len);
transform(digits.begin(), digits.begin() + len, res.begin(), [](char c){
return c^'0';
});
return res;
}
int main(int argc, char **argv) {
vector<int> left = {2,0,1,8},
right = {1,1,4,5,1,4};
int limit = NO_LIMIT;
bool digest = !I_WANT_DIGEST;
if(argc > 2 && argc < 5){
left = getInts(argv[1]);
right = getInts(argv[2]);
if(argc == 4){
auto arg = argv[3][0];
digest = arg == 't' || arg == 'T' || arg == 'b';
if(!digest){
stringstream ss(argv[3]);
ss >> limit;
}
}
cout << "Proving: " << argv[1] << " == " << argv[2] << " limits " << limit << (digest?" brief":"") << endl;
}
inmu::startProve(left, right, limit, digest);
return 0;
}