46 lines · c
1/*2 * Copyright 2016 Sven Verdoolaege3 *4 * Use of this software is governed by the MIT license5 *6 * Written by Sven Verdoolaege.7 */8 9/* This program takes a (possibly parametric) polyhedron as input and10 * prints print a full-dimensional polyhedron with the same number11 * of integer points.12 */13 14#include <isl/options.h>15#include <isl/printer.h>16#include <isl/set.h>17 18#include "isl_morph.h"19 20int main(int argc, char **argv)21{22 isl_ctx *ctx;23 isl_printer *p;24 isl_basic_set *bset;25 isl_morph *morph;26 struct isl_options *options;27 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);31 32 bset = isl_basic_set_read_from_file(ctx, stdin);33 34 morph = isl_basic_set_variable_compression(bset, isl_dim_set);35 bset = isl_morph_basic_set(morph, bset);36 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);41 42 isl_basic_set_free(bset);43 isl_ctx_free(ctx);44 return 0;45}46