45#ifdef DONT_BREAK_ON_ERROR
46#define PRINT_ALL_RESULTS
49#ifndef PRINT_ALL_RESULTS
62 int nparam,
int pos,Value *z) {
82#ifdef PRINT_ALL_RESULTS
85 for(k=S->
Dimension-nparam+2;k<=S->Dimension;++k) {
96#ifdef PRINT_ALL_RESULTS
105 fprintf(stderr,
"Error !\n");
106 fprintf(stderr,
"EP( ");
108 for(k=S->
Dimension-nparam+2;k<=S->Dimension;++k) {
109 fprintf(stderr,
", ");
112 fprintf(stderr,
" ) should be ");
114 fprintf(stderr,
", while EP eval gives ");
116 fprintf(stderr,
".\n");
117#ifndef DONT_BREAK_ON_ERROR
123#ifdef PRINT_ALL_RESULTS
132#ifndef PRINT_ALL_RESULTS
133 k = VALUE_TO_INT(tmp);
134 if(!pos && !(k%
st)) {
150int main(
int argc,
char *argv[]) {
165 fprintf(stderr,
"Not enough parameters !\n");
183 for(i=1;i<argc;i++) {
184 if(!strncmp(argv[i],
"-m",2)) {
187 m = atoi(&argv[i][2]);
189 else if(!strncmp(argv[i],
"-M",2)) {
192 M = atoi(&argv[i][2]);
194 else if(!strncmp(argv[i],
"-r", 2)) {
197 M = atoi(&argv[i][2]);
201 fprintf(stderr,
"Unknown option: %s\n",argv[i]);
202 fprintf(stderr,
"Usage: %s [-m<>][-M<>][-r<>]\n",argv[0]);
208 fprintf(stderr,
"Nothing to do: min > max !\n");
237 p = (Value *)malloc(
sizeof(Value) * (P->
Dimension+2));
248#ifndef PRINT_ALL_RESULTS
251 if (VALUE_TO_INT(tmp) > 80)
252 st = 1+(VALUE_TO_INT(tmp))/80;
255 for(i=VALUE_TO_INT(
min);i<=VALUE_TO_INT(
max);i+=
st)
264 fprintf(stderr,
"Check failed !\n");
271#ifndef PRINT_ALL_RESULTS
#define value_assign(v1, v2)
#define value_increment(ref, val)
#define value_set_si(val, i)
#define value_print(Dst, fmt, val)
#define value_subtract(ref, val1, val2)
Enumeration * Polyhedron_Enumerate(Polyhedron *Pi, Polyhedron *C, unsigned MAXRAYS, const char **param_name)
Procedure to count points in a parameterized polytope.
void count_points(int pos, Polyhedron *P, Value *context, Value *res)
PROCEDURES TO COMPUTE ENUMERATION.
Value * compute_poly(Enumeration *en, Value *list_args)
int in_domain(Polyhedron *P, Value *list_args)
Matrix * Matrix_Alloc(unsigned NbRows, unsigned NbColumns)
Matrix * Matrix_Read(void)
void Matrix_Free(Matrix *Mat)
Polyhedron * align_context(Polyhedron *Pol, int align_dimension, int NbMaxRays)
Polyhedron * Polyhedron_Image(Polyhedron *Pol, Matrix *Func, unsigned NbMaxConstrs)
Polyhedron * Polyhedron_Scan(Polyhedron *D, Polyhedron *C, unsigned NbMaxRays)
Polyhedron * DomainIntersection(Polyhedron *Pol1, Polyhedron *Pol2, unsigned NbMaxRays)
Return the intersection of two polyhedral domains 'Pol1' and 'Pol2'.
Polyhedron * Constraints2Polyhedron(Matrix *Constraints, unsigned NbMaxRays)
Given a matrix of constraints ('Constraints'), construct and return a polyhedron.
void Domain_Free(Polyhedron *Pol)
int main(int argc, char *argv[])
int check_poly(Polyhedron *S, Polyhedron *C, Enumeration *en, int nparam, int pos, Value *z)