Home | History | Annotate | Line # | Download | only in dist
      1  1.1  mrg /*
      2  1.1  mrg  * Copyright 2016      Sven Verdoolaege
      3  1.1  mrg  *
      4  1.1  mrg  * Use of this software is governed by the MIT license
      5  1.1  mrg  *
      6  1.1  mrg  * Written by Sven Verdoolaege.
      7  1.1  mrg  */
      8  1.1  mrg 
      9  1.1  mrg /* This program takes a (possibly parametric) polyhedron as input and
     10  1.1  mrg  * prints print a full-dimensional polyhedron with the same number
     11  1.1  mrg  * of integer points.
     12  1.1  mrg  */
     13  1.1  mrg 
     14  1.1  mrg #include <isl/options.h>
     15  1.1  mrg #include <isl/printer.h>
     16  1.1  mrg #include <isl/set.h>
     17  1.1  mrg 
     18  1.1  mrg #include "isl_morph.h"
     19  1.1  mrg 
     20  1.1  mrg int main(int argc, char **argv)
     21  1.1  mrg {
     22  1.1  mrg 	isl_ctx *ctx;
     23  1.1  mrg 	isl_printer *p;
     24  1.1  mrg 	isl_basic_set *bset;
     25  1.1  mrg 	isl_morph *morph;
     26  1.1  mrg 	struct isl_options *options;
     27  1.1  mrg 
     28  1.1  mrg 	options = isl_options_new_with_defaults();
     29  1.1  mrg 	argc = isl_options_parse(options, argc, argv, ISL_ARG_ALL);
     30  1.1  mrg 	ctx = isl_ctx_alloc_with_options(&isl_options_args, options);
     31  1.1  mrg 
     32  1.1  mrg 	bset = isl_basic_set_read_from_file(ctx, stdin);
     33  1.1  mrg 
     34  1.1  mrg 	morph = isl_basic_set_variable_compression(bset, isl_dim_set);
     35  1.1  mrg 	bset = isl_morph_basic_set(morph, bset);
     36  1.1  mrg 
     37  1.1  mrg 	p = isl_printer_to_file(ctx, stdout);
     38  1.1  mrg 	p = isl_printer_print_basic_set(p, bset);
     39  1.1  mrg 	p = isl_printer_end_line(p);
     40  1.1  mrg 	isl_printer_free(p);
     41  1.1  mrg 
     42  1.1  mrg 	isl_basic_set_free(bset);
     43  1.1  mrg 	isl_ctx_free(ctx);
     44  1.1  mrg 	return 0;
     45  1.1  mrg }
     46