3 #include <polylib/polylibgmp.h>
4 #include "ev_operations.h"
8 /* The input of this example program is a polytope in combined
9 * data and parameter space followed by two lines indicating
10 * the number of existential variables and parameters respectively.
11 * The first lines starts with "E ", followed by a number.
12 * The second lines starts with "P ", followed by a number.
13 * These two lines are (optionally) followed by the names of the parameters.
14 * The polytope is in PolyLib notation.
18 #define getopt_long(a,b,c,d,e) getopt(a,b,c)
21 struct option options
[] = {
22 { "convert", no_argument
, 0, 'c' },
23 { "range", no_argument
, 0, 'r' },
28 int main(int argc
, char **argv
)
40 while ((c
= getopt_long(argc
, argv
, "cr", options
, &ind
)) != -1) {
52 A
= Constraints2Polyhedron(M
, 600);
56 while ((*s
=='#') || (sscanf(s
, "E %d", &exist
)<1))
60 while ((*s
=='#') || (sscanf(s
, "P %d", &nparam
)<1))
63 Polyhedron_Print(stdout
, P_VALUE_FMT
, A
);
64 printf("exist: %d, nparam: %d\n", exist
, nparam
);
65 param_name
= Read_ParamNames(stdin
, nparam
);
66 EP
= barvinok_enumerate_e(A
, exist
, nparam
, 600);
70 evalue_range_reduction(EP
);
71 print_evalue(stdout
, EP
, param_name
);
73 evalue_mod2table(EP
, nparam
);
74 print_evalue(stdout
, EP
, param_name
);
78 Free_ParamNames(param_name
, nparam
);