da.cc: fix typos in comments
[ppn.git] / adg_cmp.cc
blob9dc8cb9c352ced2f7c3c4a8d45f8251cc1a43e65
1 /*
2 * Copyright 2011 Leiden University. All rights reserved.
3 */
5 #include <assert.h>
6 #include "adg_cmp_options.h"
7 #include "adg_parse.h"
9 int main(int argc, char *argv[])
11 isl_ctx *ctx;
12 struct options *options;
13 FILE *file1, *file2;
14 adg *adg1, *adg2;
15 int equal;
17 options = options_new_with_defaults();
18 assert(options);
19 argc = options_parse(options, argc, argv, ISL_ARG_ALL);
20 ctx = isl_ctx_alloc_with_options(&options_args, options);
22 file1 = fopen(options->adg1, "r");
23 assert(file1);
24 file2 = fopen(options->adg2, "r");
25 assert(file2);
27 adg1 = adg_parse(ctx, file1);
28 assert(adg1);
29 adg2 = adg_parse(ctx, file2);
30 assert(adg2);
32 equal = adg1->is_equal(adg2);
34 delete adg2;
35 delete adg1;
37 fclose(file2);
38 fclose(file1);
39 isl_ctx_free(ctx);
41 return equal ? 0 : 1;