isl_stream: keep track of textual representation of tokens for better error reporting
[isl.git] / closure.c
blob43d69d499952be84e8dbfe4b027f476c5e91aa8a
1 #include <assert.h>
2 #include <isl/map.h>
4 int main(int argc, char **argv)
6 struct isl_ctx *ctx;
7 struct isl_map *map;
8 struct isl_options *options;
9 int exact;
11 options = isl_options_new_with_defaults();
12 assert(options);
13 argc = isl_options_parse(options, argc, argv, ISL_ARG_ALL);
15 ctx = isl_ctx_alloc_with_options(isl_options_arg, options);
17 map = isl_map_read_from_file(ctx, stdin, -1);
18 map = isl_map_transitive_closure(map, &exact);
19 if (!exact)
20 printf("# NOT exact\n");
21 isl_map_print(map, stdout, 0, ISL_FORMAT_ISL);
22 printf("\n");
23 map = isl_map_compute_divs(map);
24 map = isl_map_coalesce(map);
25 printf("# coalesced\n");
26 isl_map_print(map, stdout, 0, ISL_FORMAT_ISL);
27 printf("\n");
28 isl_map_free(map);
30 isl_ctx_free(ctx);
32 return 0;