isl_map_coalesce: avoid ignoring constraints redundant wrt implicit equalities
[isl.git] / polyhedron_remove_redundant_equalities.c
blob2de47acdc20606957488b804acedc82a08c71a7a
1 /*
2 * Copyright 2016 Sven Verdoolaege
4 * Use of this software is governed by the MIT license
6 * Written by Sven Verdoolaege.
7 */
9 /* This program takes a (possibly parametric) polyhedron as input and
10 * prints print a full-dimensional polyhedron with the same number
11 * of integer points.
14 #include <isl/options.h>
15 #include <isl/printer.h>
16 #include <isl/set.h>
18 #include "isl_morph.h"
20 int main(int argc, char **argv)
22 isl_ctx *ctx;
23 isl_printer *p;
24 isl_basic_set *bset;
25 isl_morph *morph;
26 struct isl_options *options;
28 options = isl_options_new_with_defaults();
29 argc = isl_options_parse(options, argc, argv, ISL_ARG_ALL);
30 ctx = isl_ctx_alloc_with_options(&isl_options_args, options);
32 bset = isl_basic_set_read_from_file(ctx, stdin);
34 morph = isl_basic_set_variable_compression(bset, isl_dim_set);
35 bset = isl_morph_basic_set(morph, bset);
37 p = isl_printer_to_file(ctx, stdout);
38 p = isl_printer_print_basic_set(p, bset);
39 p = isl_printer_end_line(p);
40 isl_printer_free(p);
42 isl_basic_set_free(bset);
43 isl_ctx_free(ctx);
44 return 0;