int main(void) { int i, strict; // srand(time(NULL)); srand(0); intdim = 0; /*for (intdim=1;intdim<2;intdim++) {*/ for (strict=0;strict<2;strict++) { /* init */ pk = pk_manager_alloc(strict); ppl = ap_ppl_poly_manager_alloc(strict); for (i=0;i<AP_EXC_SIZE;i++){ pk->option.abort_if_exception[i] = true; ppl->option.abort_if_exception[i] = true; } printf("\n\ncomparing libraries:\n- %s (%s)\n- %s (%s)\nwith strict=%i int=%i\n\n", pk->library,pk->version,ppl->library,ppl->version,strict,intdim); /* run tests */ test_conv(); test_join(); test_meet(); test_join_array(); test_meet_array(); test_dimadd(); test_dimrem(); test_forget(); test_permute(); test_expand(); test_fold(); test_add_lincons(); test_add_ray(); test_box(); test_vbound(); test_lbound(); test_csat(); test_isat(); test_assign(); test_par_assign(); test_subst(); test_par_subst(); if (!strict) test_widen(); // behave differently in strict mode /* clean-up */ ap_manager_free(pk); ap_manager_free(ppl); } /*}*/ if (error_) printf("\n%i error(s)!\n",error_); else printf("\nall tests passed\n"); return 0; }
int main(int argc, const char **argv) { if (argc < 2) { printf("no file name entered\n"); return 1; } if (argc > 2) printCFG = atoi(&argv[2][0]); if (argc > 3) funcToAnalyze = argv[3]; else funcToAnalyze = "main"; printf("Will analyze function %s\n", funcToAnalyze); // Read file contents into a char array std::ifstream in(argv[1]); std::string contents((std::istreambuf_iterator<char>(in)), std::istreambuf_iterator<char>()); // Interval package man = box_manager_alloc(); printf("******************************\n"); printf("Apron: Library %s, version %s\n", man->library, man->version); printf("******************************\n"); int ret = !clang::tooling::runToolOnCode(new ExampleFrontendAction, contents.c_str()); ap_manager_free(man); return ret; }
int main(void) { man = box_manager_alloc(); loop_example(); ap_manager_free(man); return 0; }