00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043 #include "gecode/kernel.hh"
00044 #if defined(GECODE_HAS_INT_VARS)
00045 #include "gecode/int.hh"
00046 #endif
00047 #if defined(GECODE_HAS_SET_VARS)
00048 #include "gecode/set.hh"
00049 #endif
00050 #if defined(GECODE_HAS_INT_VARS)
00051 #include "gecode/minimodel.hh"
00052 #endif
00053
00054 #include "gecode/serialization.hh"
00055
00056 namespace {
00057 #if defined(GECODE_HAS_INT_VARS)
00058 Gecode::IntValBranch toEnum_IntValBranch(Gecode::Reflection::Arg* a) {
00059 assert(a->isString());
00060 const char* av = a->toString();
00061 if (!strcmp(av, "INT_VAL_MIN"))
00062 return Gecode::INT_VAL_MIN;
00063 if (!strcmp(av, "INT_VAL_MED"))
00064 return Gecode::INT_VAL_MED;
00065 if (!strcmp(av, "INT_VAL_MAX"))
00066 return Gecode::INT_VAL_MAX;
00067 if (!strcmp(av, "INT_VAL_SPLIT_MIN"))
00068 return Gecode::INT_VAL_SPLIT_MIN;
00069 if (!strcmp(av, "INT_VAL_SPLIT_MAX"))
00070 return Gecode::INT_VAL_SPLIT_MAX;
00071 throw Gecode::Reflection::ReflectionException("Internal error");
00072 }
00073 bool isEnum_IntValBranch(Gecode::Reflection::Arg* a) {
00074 if (!a->isString())
00075 return false;
00076 const char* av = a->toString();
00077 if (!strcmp(av, "INT_VAL_MIN"))
00078 return true;
00079 if (!strcmp(av, "INT_VAL_MED"))
00080 return true;
00081 if (!strcmp(av, "INT_VAL_MAX"))
00082 return true;
00083 if (!strcmp(av, "INT_VAL_SPLIT_MIN"))
00084 return true;
00085 if (!strcmp(av, "INT_VAL_SPLIT_MAX"))
00086 return true;
00087 return false;
00088 }
00089 #endif
00090 #if defined(GECODE_HAS_SET_VARS)
00091 Gecode::SetOpType toEnum_SetOpType(Gecode::Reflection::Arg* a) {
00092 assert(a->isString());
00093 const char* av = a->toString();
00094 if (!strcmp(av, "SOT_UNION"))
00095 return Gecode::SOT_UNION;
00096 if (!strcmp(av, "SOT_DUNION"))
00097 return Gecode::SOT_DUNION;
00098 if (!strcmp(av, "SOT_INTER"))
00099 return Gecode::SOT_INTER;
00100 if (!strcmp(av, "SOT_MINUS"))
00101 return Gecode::SOT_MINUS;
00102 throw Gecode::Reflection::ReflectionException("Internal error");
00103 }
00104 bool isEnum_SetOpType(Gecode::Reflection::Arg* a) {
00105 if (!a->isString())
00106 return false;
00107 const char* av = a->toString();
00108 if (!strcmp(av, "SOT_UNION"))
00109 return true;
00110 if (!strcmp(av, "SOT_DUNION"))
00111 return true;
00112 if (!strcmp(av, "SOT_INTER"))
00113 return true;
00114 if (!strcmp(av, "SOT_MINUS"))
00115 return true;
00116 return false;
00117 }
00118 #endif
00119 #if defined(GECODE_HAS_SET_VARS)
00120 Gecode::SetValBranch toEnum_SetValBranch(Gecode::Reflection::Arg* a) {
00121 assert(a->isString());
00122 const char* av = a->toString();
00123 if (!strcmp(av, "SET_VAL_MIN"))
00124 return Gecode::SET_VAL_MIN;
00125 if (!strcmp(av, "SET_VAL_MAX"))
00126 return Gecode::SET_VAL_MAX;
00127 throw Gecode::Reflection::ReflectionException("Internal error");
00128 }
00129 bool isEnum_SetValBranch(Gecode::Reflection::Arg* a) {
00130 if (!a->isString())
00131 return false;
00132 const char* av = a->toString();
00133 if (!strcmp(av, "SET_VAL_MIN"))
00134 return true;
00135 if (!strcmp(av, "SET_VAL_MAX"))
00136 return true;
00137 return false;
00138 }
00139 #endif
00140 #if defined(GECODE_HAS_SET_VARS)
00141 Gecode::SetVarBranch toEnum_SetVarBranch(Gecode::Reflection::Arg* a) {
00142 assert(a->isString());
00143 const char* av = a->toString();
00144 if (!strcmp(av, "SET_VAR_NONE"))
00145 return Gecode::SET_VAR_NONE;
00146 if (!strcmp(av, "SET_VAR_MIN_CARD"))
00147 return Gecode::SET_VAR_MIN_CARD;
00148 if (!strcmp(av, "SET_VAR_MAX_CARD"))
00149 return Gecode::SET_VAR_MAX_CARD;
00150 if (!strcmp(av, "SET_VAR_MIN_UNKNOWN_ELEM"))
00151 return Gecode::SET_VAR_MIN_UNKNOWN_ELEM;
00152 if (!strcmp(av, "SET_VAR_MAX_UNKNOWN_ELEM"))
00153 return Gecode::SET_VAR_MAX_UNKNOWN_ELEM;
00154 throw Gecode::Reflection::ReflectionException("Internal error");
00155 }
00156 bool isEnum_SetVarBranch(Gecode::Reflection::Arg* a) {
00157 if (!a->isString())
00158 return false;
00159 const char* av = a->toString();
00160 if (!strcmp(av, "SET_VAR_NONE"))
00161 return true;
00162 if (!strcmp(av, "SET_VAR_MIN_CARD"))
00163 return true;
00164 if (!strcmp(av, "SET_VAR_MAX_CARD"))
00165 return true;
00166 if (!strcmp(av, "SET_VAR_MIN_UNKNOWN_ELEM"))
00167 return true;
00168 if (!strcmp(av, "SET_VAR_MAX_UNKNOWN_ELEM"))
00169 return true;
00170 return false;
00171 }
00172 #endif
00173 #if defined(GECODE_HAS_INT_VARS)
00174 Gecode::IntVarBranch toEnum_IntVarBranch(Gecode::Reflection::Arg* a) {
00175 assert(a->isString());
00176 const char* av = a->toString();
00177 if (!strcmp(av, "INT_VAR_NONE"))
00178 return Gecode::INT_VAR_NONE;
00179 if (!strcmp(av, "INT_VAR_MIN_MIN"))
00180 return Gecode::INT_VAR_MIN_MIN;
00181 if (!strcmp(av, "INT_VAR_MIN_MAX"))
00182 return Gecode::INT_VAR_MIN_MAX;
00183 if (!strcmp(av, "INT_VAR_MAX_MIN"))
00184 return Gecode::INT_VAR_MAX_MIN;
00185 if (!strcmp(av, "INT_VAR_MAX_MAX"))
00186 return Gecode::INT_VAR_MAX_MAX;
00187 if (!strcmp(av, "INT_VAR_SIZE_MIN"))
00188 return Gecode::INT_VAR_SIZE_MIN;
00189 if (!strcmp(av, "INT_VAR_SIZE_MAX"))
00190 return Gecode::INT_VAR_SIZE_MAX;
00191 if (!strcmp(av, "INT_VAR_DEGREE_MIN"))
00192 return Gecode::INT_VAR_DEGREE_MIN;
00193 if (!strcmp(av, "INT_VAR_DEGREE_MAX"))
00194 return Gecode::INT_VAR_DEGREE_MAX;
00195 if (!strcmp(av, "INT_VAR_SIZE_DEGREE_MIN"))
00196 return Gecode::INT_VAR_SIZE_DEGREE_MIN;
00197 if (!strcmp(av, "INT_VAR_SIZE_DEGREE_MAX"))
00198 return Gecode::INT_VAR_SIZE_DEGREE_MAX;
00199 if (!strcmp(av, "INT_VAR_REGRET_MIN_MIN"))
00200 return Gecode::INT_VAR_REGRET_MIN_MIN;
00201 if (!strcmp(av, "INT_VAR_REGRET_MIN_MAX"))
00202 return Gecode::INT_VAR_REGRET_MIN_MAX;
00203 if (!strcmp(av, "INT_VAR_REGRET_MAX_MIN"))
00204 return Gecode::INT_VAR_REGRET_MAX_MIN;
00205 if (!strcmp(av, "INT_VAR_REGRET_MAX_MAX"))
00206 return Gecode::INT_VAR_REGRET_MAX_MAX;
00207 throw Gecode::Reflection::ReflectionException("Internal error");
00208 }
00209 bool isEnum_IntVarBranch(Gecode::Reflection::Arg* a) {
00210 if (!a->isString())
00211 return false;
00212 const char* av = a->toString();
00213 if (!strcmp(av, "INT_VAR_NONE"))
00214 return true;
00215 if (!strcmp(av, "INT_VAR_MIN_MIN"))
00216 return true;
00217 if (!strcmp(av, "INT_VAR_MIN_MAX"))
00218 return true;
00219 if (!strcmp(av, "INT_VAR_MAX_MIN"))
00220 return true;
00221 if (!strcmp(av, "INT_VAR_MAX_MAX"))
00222 return true;
00223 if (!strcmp(av, "INT_VAR_SIZE_MIN"))
00224 return true;
00225 if (!strcmp(av, "INT_VAR_SIZE_MAX"))
00226 return true;
00227 if (!strcmp(av, "INT_VAR_DEGREE_MIN"))
00228 return true;
00229 if (!strcmp(av, "INT_VAR_DEGREE_MAX"))
00230 return true;
00231 if (!strcmp(av, "INT_VAR_SIZE_DEGREE_MIN"))
00232 return true;
00233 if (!strcmp(av, "INT_VAR_SIZE_DEGREE_MAX"))
00234 return true;
00235 if (!strcmp(av, "INT_VAR_REGRET_MIN_MIN"))
00236 return true;
00237 if (!strcmp(av, "INT_VAR_REGRET_MIN_MAX"))
00238 return true;
00239 if (!strcmp(av, "INT_VAR_REGRET_MAX_MIN"))
00240 return true;
00241 if (!strcmp(av, "INT_VAR_REGRET_MAX_MAX"))
00242 return true;
00243 return false;
00244 }
00245 #endif
00246 #if defined(GECODE_HAS_INT_VARS)
00247 Gecode::IntRelType toEnum_IntRelType(Gecode::Reflection::Arg* a) {
00248 assert(a->isString());
00249 const char* av = a->toString();
00250 if (!strcmp(av, "IRT_EQ"))
00251 return Gecode::IRT_EQ;
00252 if (!strcmp(av, "IRT_NQ"))
00253 return Gecode::IRT_NQ;
00254 if (!strcmp(av, "IRT_LQ"))
00255 return Gecode::IRT_LQ;
00256 if (!strcmp(av, "IRT_LE"))
00257 return Gecode::IRT_LE;
00258 if (!strcmp(av, "IRT_GQ"))
00259 return Gecode::IRT_GQ;
00260 if (!strcmp(av, "IRT_GR"))
00261 return Gecode::IRT_GR;
00262 throw Gecode::Reflection::ReflectionException("Internal error");
00263 }
00264 bool isEnum_IntRelType(Gecode::Reflection::Arg* a) {
00265 if (!a->isString())
00266 return false;
00267 const char* av = a->toString();
00268 if (!strcmp(av, "IRT_EQ"))
00269 return true;
00270 if (!strcmp(av, "IRT_NQ"))
00271 return true;
00272 if (!strcmp(av, "IRT_LQ"))
00273 return true;
00274 if (!strcmp(av, "IRT_LE"))
00275 return true;
00276 if (!strcmp(av, "IRT_GQ"))
00277 return true;
00278 if (!strcmp(av, "IRT_GR"))
00279 return true;
00280 return false;
00281 }
00282 #endif
00283 #if defined(GECODE_HAS_INT_VARS)
00284 Gecode::IntConLevel toEnum_IntConLevel(Gecode::Reflection::Arg* a) {
00285 assert(a->isString());
00286 const char* av = a->toString();
00287 if (!strcmp(av, "ICL_VAL"))
00288 return Gecode::ICL_VAL;
00289 if (!strcmp(av, "ICL_BND"))
00290 return Gecode::ICL_BND;
00291 if (!strcmp(av, "ICL_DOM"))
00292 return Gecode::ICL_DOM;
00293 if (!strcmp(av, "ICL_DEF"))
00294 return Gecode::ICL_DEF;
00295 throw Gecode::Reflection::ReflectionException("Internal error");
00296 }
00297 bool isEnum_IntConLevel(Gecode::Reflection::Arg* a) {
00298 if (!a->isString())
00299 return false;
00300 const char* av = a->toString();
00301 if (!strcmp(av, "ICL_VAL"))
00302 return true;
00303 if (!strcmp(av, "ICL_BND"))
00304 return true;
00305 if (!strcmp(av, "ICL_DOM"))
00306 return true;
00307 if (!strcmp(av, "ICL_DEF"))
00308 return true;
00309 return false;
00310 }
00311 #endif
00312 #if defined(GECODE_HAS_INT_VARS)
00313 Gecode::BoolOpType toEnum_BoolOpType(Gecode::Reflection::Arg* a) {
00314 assert(a->isString());
00315 const char* av = a->toString();
00316 if (!strcmp(av, "BOT_AND"))
00317 return Gecode::BOT_AND;
00318 if (!strcmp(av, "BOT_OR"))
00319 return Gecode::BOT_OR;
00320 if (!strcmp(av, "BOT_IMP"))
00321 return Gecode::BOT_IMP;
00322 if (!strcmp(av, "BOT_EQV"))
00323 return Gecode::BOT_EQV;
00324 if (!strcmp(av, "BOT_XOR"))
00325 return Gecode::BOT_XOR;
00326 throw Gecode::Reflection::ReflectionException("Internal error");
00327 }
00328 bool isEnum_BoolOpType(Gecode::Reflection::Arg* a) {
00329 if (!a->isString())
00330 return false;
00331 const char* av = a->toString();
00332 if (!strcmp(av, "BOT_AND"))
00333 return true;
00334 if (!strcmp(av, "BOT_OR"))
00335 return true;
00336 if (!strcmp(av, "BOT_IMP"))
00337 return true;
00338 if (!strcmp(av, "BOT_EQV"))
00339 return true;
00340 if (!strcmp(av, "BOT_XOR"))
00341 return true;
00342 return false;
00343 }
00344 #endif
00345 #if 1
00346 Gecode::PropKind toEnum_PropKind(Gecode::Reflection::Arg* a) {
00347 assert(a->isString());
00348 const char* av = a->toString();
00349 if (!strcmp(av, "PK_DEF"))
00350 return Gecode::PK_DEF;
00351 if (!strcmp(av, "PK_SPEED"))
00352 return Gecode::PK_SPEED;
00353 if (!strcmp(av, "PK_MEMORY"))
00354 return Gecode::PK_MEMORY;
00355 throw Gecode::Reflection::ReflectionException("Internal error");
00356 }
00357 bool isEnum_PropKind(Gecode::Reflection::Arg* a) {
00358 if (!a->isString())
00359 return false;
00360 const char* av = a->toString();
00361 if (!strcmp(av, "PK_DEF"))
00362 return true;
00363 if (!strcmp(av, "PK_SPEED"))
00364 return true;
00365 if (!strcmp(av, "PK_MEMORY"))
00366 return true;
00367 return false;
00368 }
00369 #endif
00370 #if defined(GECODE_HAS_INT_VARS)
00371 Gecode::IntAssign toEnum_IntAssign(Gecode::Reflection::Arg* a) {
00372 assert(a->isString());
00373 const char* av = a->toString();
00374 if (!strcmp(av, "INT_ASSIGN_MIN"))
00375 return Gecode::INT_ASSIGN_MIN;
00376 if (!strcmp(av, "INT_ASSIGN_MED"))
00377 return Gecode::INT_ASSIGN_MED;
00378 if (!strcmp(av, "INT_ASSIGN_MAX"))
00379 return Gecode::INT_ASSIGN_MAX;
00380 throw Gecode::Reflection::ReflectionException("Internal error");
00381 }
00382 bool isEnum_IntAssign(Gecode::Reflection::Arg* a) {
00383 if (!a->isString())
00384 return false;
00385 const char* av = a->toString();
00386 if (!strcmp(av, "INT_ASSIGN_MIN"))
00387 return true;
00388 if (!strcmp(av, "INT_ASSIGN_MED"))
00389 return true;
00390 if (!strcmp(av, "INT_ASSIGN_MAX"))
00391 return true;
00392 return false;
00393 }
00394 #endif
00395 #if defined(GECODE_HAS_SET_VARS)
00396 Gecode::SetRelType toEnum_SetRelType(Gecode::Reflection::Arg* a) {
00397 assert(a->isString());
00398 const char* av = a->toString();
00399 if (!strcmp(av, "SRT_EQ"))
00400 return Gecode::SRT_EQ;
00401 if (!strcmp(av, "SRT_NQ"))
00402 return Gecode::SRT_NQ;
00403 if (!strcmp(av, "SRT_SUB"))
00404 return Gecode::SRT_SUB;
00405 if (!strcmp(av, "SRT_SUP"))
00406 return Gecode::SRT_SUP;
00407 if (!strcmp(av, "SRT_DISJ"))
00408 return Gecode::SRT_DISJ;
00409 if (!strcmp(av, "SRT_CMPL"))
00410 return Gecode::SRT_CMPL;
00411 throw Gecode::Reflection::ReflectionException("Internal error");
00412 }
00413 bool isEnum_SetRelType(Gecode::Reflection::Arg* a) {
00414 if (!a->isString())
00415 return false;
00416 const char* av = a->toString();
00417 if (!strcmp(av, "SRT_EQ"))
00418 return true;
00419 if (!strcmp(av, "SRT_NQ"))
00420 return true;
00421 if (!strcmp(av, "SRT_SUB"))
00422 return true;
00423 if (!strcmp(av, "SRT_SUP"))
00424 return true;
00425 if (!strcmp(av, "SRT_DISJ"))
00426 return true;
00427 if (!strcmp(av, "SRT_CMPL"))
00428 return true;
00429 return false;
00430 }
00431 #endif
00432
00434 template <class Var>
00435 bool isVar(Gecode::Reflection::VarMap& vm, Gecode::Reflection::Arg* a) {
00436 if (!a->isVar())
00437 return false;
00438 Gecode::Reflection::VarSpec& s = vm.spec(a->toVar());
00439 typedef typename Gecode::VarViewTraits<Var>::View View;
00440 typedef typename Gecode::ViewVarImpTraits<View>::VarImp VarImp;
00441 return s.vti() == VarImp::vti;
00442 }
00443
00445 template <class Var>
00446 bool isVarArgs(Gecode::Reflection::VarMap& vm, Gecode::Reflection::Arg* a) {
00447 if (!a->isArray())
00448 return false;
00449 Gecode::Reflection::ArrayArg& aa = *a->toArray();
00450 for (int i=aa.size(); i--;)
00451 if (!isVar<Var>(vm, aa[i]))
00452 return false;
00453 return true;
00454 }
00455
00456 bool isIntSetArgs(Gecode::Reflection::Arg* a) {
00457 if (!a->isArray())
00458 return false;
00459 Gecode::Reflection::ArrayArg& aa = *a->toArray();
00460 for (int i=aa.size(); i--;)
00461 if (!aa[i]->isIntArray())
00462 return false;
00463 return true;
00464 }
00465
00466 class Register_rel {
00467 public:
00469 static Gecode::Support::Symbol ati(void) {
00470 return "Gecode::Post::rel";
00471 }
00472
00474 static void post(Gecode::Space* home, Gecode::Reflection::VarMap& vm,
00475 const Gecode::Reflection::ActorSpec& spec) {
00476 switch(spec.noOfArgs()) {
00477 case 2:
00478 {
00479 #if defined(GECODE_HAS_INT_VARS)
00480 if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
00481 isEnum_IntRelType(spec[1]))
00482 {
00483 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
00484 Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
00485 for (int i=a0.size(); i--;)
00486 x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
00487 Gecode::IntRelType x1 = toEnum_IntRelType(spec[1]);
00488 Gecode::rel(home, x0,x1);
00489 return;
00490 }
00491 #endif
00492 #if defined(GECODE_HAS_INT_VARS)
00493 if (isVarArgs<Gecode::BoolVar>(vm, spec[0]) &&
00494 isEnum_IntRelType(spec[1]))
00495 {
00496 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
00497 Gecode::VarArgArray<Gecode::BoolVar> x0(a0.size());
00498 for (int i=a0.size(); i--;)
00499 x0[i] = Gecode::BoolVar(vm.var(a0[i]->toVar()));
00500 Gecode::IntRelType x1 = toEnum_IntRelType(spec[1]);
00501 Gecode::rel(home, x0,x1);
00502 return;
00503 }
00504 #endif
00505 throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::rel");
00506 }
00507 break;
00508 case 3:
00509 {
00510 #if defined(GECODE_HAS_INT_VARS)
00511 if (isVar<Gecode::IntVar>(vm, spec[0]) &&
00512 isEnum_IntRelType(spec[1]) &&
00513 isVar<Gecode::IntVar>(vm, spec[2]))
00514 {
00515 Gecode::IntVar x0(vm.var(spec[0]->toVar()));
00516 Gecode::IntRelType x1 = toEnum_IntRelType(spec[1]);
00517 Gecode::IntVar x2(vm.var(spec[2]->toVar()));
00518 Gecode::rel(home, x0,x1,x2);
00519 return;
00520 }
00521 #endif
00522 #if defined(GECODE_HAS_INT_VARS)
00523 if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
00524 isEnum_IntRelType(spec[1]) &&
00525 isVar<Gecode::IntVar>(vm, spec[2]))
00526 {
00527 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
00528 Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
00529 for (int i=a0.size(); i--;)
00530 x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
00531 Gecode::IntRelType x1 = toEnum_IntRelType(spec[1]);
00532 Gecode::IntVar x2(vm.var(spec[2]->toVar()));
00533 Gecode::rel(home, x0,x1,x2);
00534 return;
00535 }
00536 #endif
00537 #if defined(GECODE_HAS_INT_VARS)
00538 if (isVar<Gecode::IntVar>(vm, spec[0]) &&
00539 isEnum_IntRelType(spec[1]) &&
00540 spec[2]->isInt())
00541 {
00542 Gecode::IntVar x0(vm.var(spec[0]->toVar()));
00543 Gecode::IntRelType x1 = toEnum_IntRelType(spec[1]);
00544 int x2 = static_cast<int>(spec[2]->toInt());
00545 Gecode::rel(home, x0,x1,x2);
00546 return;
00547 }
00548 #endif
00549 #if defined(GECODE_HAS_INT_VARS)
00550 if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
00551 isEnum_IntRelType(spec[1]) &&
00552 spec[2]->isInt())
00553 {
00554 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
00555 Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
00556 for (int i=a0.size(); i--;)
00557 x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
00558 Gecode::IntRelType x1 = toEnum_IntRelType(spec[1]);
00559 int x2 = static_cast<int>(spec[2]->toInt());
00560 Gecode::rel(home, x0,x1,x2);
00561 return;
00562 }
00563 #endif
00564 #if defined(GECODE_HAS_INT_VARS)
00565 if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
00566 isEnum_IntRelType(spec[1]) &&
00567 isEnum_IntConLevel(spec[2]))
00568 {
00569 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
00570 Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
00571 for (int i=a0.size(); i--;)
00572 x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
00573 Gecode::IntRelType x1 = toEnum_IntRelType(spec[1]);
00574 Gecode::IntConLevel x2 = toEnum_IntConLevel(spec[2]);
00575 Gecode::rel(home, x0,x1,x2);
00576 return;
00577 }
00578 #endif
00579 #if defined(GECODE_HAS_INT_VARS)
00580 if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
00581 isEnum_IntRelType(spec[1]) &&
00582 isVarArgs<Gecode::IntVar>(vm, spec[2]))
00583 {
00584 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
00585 Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
00586 for (int i=a0.size(); i--;)
00587 x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
00588 Gecode::IntRelType x1 = toEnum_IntRelType(spec[1]);
00589 Gecode::Reflection::ArrayArg& a2 = *spec[2]->toArray();
00590 Gecode::VarArgArray<Gecode::IntVar> x2(a2.size());
00591 for (int i=a2.size(); i--;)
00592 x2[i] = Gecode::IntVar(vm.var(a2[i]->toVar()));
00593 Gecode::rel(home, x0,x1,x2);
00594 return;
00595 }
00596 #endif
00597 #if defined(GECODE_HAS_INT_VARS)
00598 if (isVar<Gecode::BoolVar>(vm, spec[0]) &&
00599 isEnum_IntRelType(spec[1]) &&
00600 isVar<Gecode::BoolVar>(vm, spec[2]))
00601 {
00602 Gecode::BoolVar x0(vm.var(spec[0]->toVar()));
00603 Gecode::IntRelType x1 = toEnum_IntRelType(spec[1]);
00604 Gecode::BoolVar x2(vm.var(spec[2]->toVar()));
00605 Gecode::rel(home, x0,x1,x2);
00606 return;
00607 }
00608 #endif
00609 #if defined(GECODE_HAS_INT_VARS)
00610 if (isVarArgs<Gecode::BoolVar>(vm, spec[0]) &&
00611 isEnum_IntRelType(spec[1]) &&
00612 isVar<Gecode::BoolVar>(vm, spec[2]))
00613 {
00614 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
00615 Gecode::VarArgArray<Gecode::BoolVar> x0(a0.size());
00616 for (int i=a0.size(); i--;)
00617 x0[i] = Gecode::BoolVar(vm.var(a0[i]->toVar()));
00618 Gecode::IntRelType x1 = toEnum_IntRelType(spec[1]);
00619 Gecode::BoolVar x2(vm.var(spec[2]->toVar()));
00620 Gecode::rel(home, x0,x1,x2);
00621 return;
00622 }
00623 #endif
00624 #if defined(GECODE_HAS_INT_VARS)
00625 if (isVar<Gecode::BoolVar>(vm, spec[0]) &&
00626 isEnum_IntRelType(spec[1]) &&
00627 spec[2]->isInt())
00628 {
00629 Gecode::BoolVar x0(vm.var(spec[0]->toVar()));
00630 Gecode::IntRelType x1 = toEnum_IntRelType(spec[1]);
00631 int x2 = static_cast<int>(spec[2]->toInt());
00632 Gecode::rel(home, x0,x1,x2);
00633 return;
00634 }
00635 #endif
00636 #if defined(GECODE_HAS_INT_VARS)
00637 if (isVarArgs<Gecode::BoolVar>(vm, spec[0]) &&
00638 isEnum_IntRelType(spec[1]) &&
00639 spec[2]->isInt())
00640 {
00641 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
00642 Gecode::VarArgArray<Gecode::BoolVar> x0(a0.size());
00643 for (int i=a0.size(); i--;)
00644 x0[i] = Gecode::BoolVar(vm.var(a0[i]->toVar()));
00645 Gecode::IntRelType x1 = toEnum_IntRelType(spec[1]);
00646 int x2 = static_cast<int>(spec[2]->toInt());
00647 Gecode::rel(home, x0,x1,x2);
00648 return;
00649 }
00650 #endif
00651 #if defined(GECODE_HAS_INT_VARS)
00652 if (isVarArgs<Gecode::BoolVar>(vm, spec[0]) &&
00653 isEnum_IntRelType(spec[1]) &&
00654 isVarArgs<Gecode::BoolVar>(vm, spec[2]))
00655 {
00656 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
00657 Gecode::VarArgArray<Gecode::BoolVar> x0(a0.size());
00658 for (int i=a0.size(); i--;)
00659 x0[i] = Gecode::BoolVar(vm.var(a0[i]->toVar()));
00660 Gecode::IntRelType x1 = toEnum_IntRelType(spec[1]);
00661 Gecode::Reflection::ArrayArg& a2 = *spec[2]->toArray();
00662 Gecode::VarArgArray<Gecode::BoolVar> x2(a2.size());
00663 for (int i=a2.size(); i--;)
00664 x2[i] = Gecode::BoolVar(vm.var(a2[i]->toVar()));
00665 Gecode::rel(home, x0,x1,x2);
00666 return;
00667 }
00668 #endif
00669 #if defined(GECODE_HAS_INT_VARS)
00670 if (isVarArgs<Gecode::BoolVar>(vm, spec[0]) &&
00671 isEnum_IntRelType(spec[1]) &&
00672 isEnum_IntConLevel(spec[2]))
00673 {
00674 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
00675 Gecode::VarArgArray<Gecode::BoolVar> x0(a0.size());
00676 for (int i=a0.size(); i--;)
00677 x0[i] = Gecode::BoolVar(vm.var(a0[i]->toVar()));
00678 Gecode::IntRelType x1 = toEnum_IntRelType(spec[1]);
00679 Gecode::IntConLevel x2 = toEnum_IntConLevel(spec[2]);
00680 Gecode::rel(home, x0,x1,x2);
00681 return;
00682 }
00683 #endif
00684 #if defined(GECODE_HAS_INT_VARS)
00685 if (isEnum_BoolOpType(spec[0]) &&
00686 isVarArgs<Gecode::BoolVar>(vm, spec[1]) &&
00687 isVar<Gecode::BoolVar>(vm, spec[2]))
00688 {
00689 Gecode::BoolOpType x0 = toEnum_BoolOpType(spec[0]);
00690 Gecode::Reflection::ArrayArg& a1 = *spec[1]->toArray();
00691 Gecode::VarArgArray<Gecode::BoolVar> x1(a1.size());
00692 for (int i=a1.size(); i--;)
00693 x1[i] = Gecode::BoolVar(vm.var(a1[i]->toVar()));
00694 Gecode::BoolVar x2(vm.var(spec[2]->toVar()));
00695 Gecode::rel(home, x0,x1,x2);
00696 return;
00697 }
00698 #endif
00699 #if defined(GECODE_HAS_INT_VARS)
00700 if (isEnum_BoolOpType(spec[0]) &&
00701 isVarArgs<Gecode::BoolVar>(vm, spec[1]) &&
00702 spec[2]->isInt())
00703 {
00704 Gecode::BoolOpType x0 = toEnum_BoolOpType(spec[0]);
00705 Gecode::Reflection::ArrayArg& a1 = *spec[1]->toArray();
00706 Gecode::VarArgArray<Gecode::BoolVar> x1(a1.size());
00707 for (int i=a1.size(); i--;)
00708 x1[i] = Gecode::BoolVar(vm.var(a1[i]->toVar()));
00709 int x2 = static_cast<int>(spec[2]->toInt());
00710 Gecode::rel(home, x0,x1,x2);
00711 return;
00712 }
00713 #endif
00714 #if defined(GECODE_HAS_SET_VARS)
00715 if (isVar<Gecode::SetVar>(vm, spec[0]) &&
00716 isEnum_SetRelType(spec[1]) &&
00717 isVar<Gecode::SetVar>(vm, spec[2]))
00718 {
00719 Gecode::SetVar x0(vm.var(spec[0]->toVar()));
00720 Gecode::SetRelType x1 = toEnum_SetRelType(spec[1]);
00721 Gecode::SetVar x2(vm.var(spec[2]->toVar()));
00722 Gecode::rel(home, x0,x1,x2);
00723 return;
00724 }
00725 #endif
00726 #if defined(GECODE_HAS_SET_VARS)
00727 if (isVar<Gecode::SetVar>(vm, spec[0]) &&
00728 isEnum_SetRelType(spec[1]) &&
00729 isVar<Gecode::IntVar>(vm, spec[2]))
00730 {
00731 Gecode::SetVar x0(vm.var(spec[0]->toVar()));
00732 Gecode::SetRelType x1 = toEnum_SetRelType(spec[1]);
00733 Gecode::IntVar x2(vm.var(spec[2]->toVar()));
00734 Gecode::rel(home, x0,x1,x2);
00735 return;
00736 }
00737 #endif
00738 #if defined(GECODE_HAS_SET_VARS)
00739 if (isVar<Gecode::IntVar>(vm, spec[0]) &&
00740 isEnum_SetRelType(spec[1]) &&
00741 isVar<Gecode::SetVar>(vm, spec[2]))
00742 {
00743 Gecode::IntVar x0(vm.var(spec[0]->toVar()));
00744 Gecode::SetRelType x1 = toEnum_SetRelType(spec[1]);
00745 Gecode::SetVar x2(vm.var(spec[2]->toVar()));
00746 Gecode::rel(home, x0,x1,x2);
00747 return;
00748 }
00749 #endif
00750 #if defined(GECODE_HAS_SET_VARS)
00751 if (isVar<Gecode::SetVar>(vm, spec[0]) &&
00752 isEnum_IntRelType(spec[1]) &&
00753 isVar<Gecode::IntVar>(vm, spec[2]))
00754 {
00755 Gecode::SetVar x0(vm.var(spec[0]->toVar()));
00756 Gecode::IntRelType x1 = toEnum_IntRelType(spec[1]);
00757 Gecode::IntVar x2(vm.var(spec[2]->toVar()));
00758 Gecode::rel(home, x0,x1,x2);
00759 return;
00760 }
00761 #endif
00762 #if defined(GECODE_HAS_SET_VARS)
00763 if (isVar<Gecode::IntVar>(vm, spec[0]) &&
00764 isEnum_IntRelType(spec[1]) &&
00765 isVar<Gecode::SetVar>(vm, spec[2]))
00766 {
00767 Gecode::IntVar x0(vm.var(spec[0]->toVar()));
00768 Gecode::IntRelType x1 = toEnum_IntRelType(spec[1]);
00769 Gecode::SetVar x2(vm.var(spec[2]->toVar()));
00770 Gecode::rel(home, x0,x1,x2);
00771 return;
00772 }
00773 #endif
00774 #if defined(GECODE_HAS_SET_VARS)
00775 if (isEnum_SetOpType(spec[0]) &&
00776 isVarArgs<Gecode::SetVar>(vm, spec[1]) &&
00777 isVar<Gecode::SetVar>(vm, spec[2]))
00778 {
00779 Gecode::SetOpType x0 = toEnum_SetOpType(spec[0]);
00780 Gecode::Reflection::ArrayArg& a1 = *spec[1]->toArray();
00781 Gecode::VarArgArray<Gecode::SetVar> x1(a1.size());
00782 for (int i=a1.size(); i--;)
00783 x1[i] = Gecode::SetVar(vm.var(a1[i]->toVar()));
00784 Gecode::SetVar x2(vm.var(spec[2]->toVar()));
00785 Gecode::rel(home, x0,x1,x2);
00786 return;
00787 }
00788 #endif
00789 #if defined(GECODE_HAS_SET_VARS)
00790 if (isEnum_SetOpType(spec[0]) &&
00791 isVarArgs<Gecode::IntVar>(vm, spec[1]) &&
00792 isVar<Gecode::SetVar>(vm, spec[2]))
00793 {
00794 Gecode::SetOpType x0 = toEnum_SetOpType(spec[0]);
00795 Gecode::Reflection::ArrayArg& a1 = *spec[1]->toArray();
00796 Gecode::VarArgArray<Gecode::IntVar> x1(a1.size());
00797 for (int i=a1.size(); i--;)
00798 x1[i] = Gecode::IntVar(vm.var(a1[i]->toVar()));
00799 Gecode::SetVar x2(vm.var(spec[2]->toVar()));
00800 Gecode::rel(home, x0,x1,x2);
00801 return;
00802 }
00803 #endif
00804 throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::rel");
00805 }
00806 break;
00807 case 4:
00808 {
00809 #if defined(GECODE_HAS_INT_VARS)
00810 if (isVar<Gecode::IntVar>(vm, spec[0]) &&
00811 isEnum_IntRelType(spec[1]) &&
00812 isVar<Gecode::IntVar>(vm, spec[2]) &&
00813 isEnum_IntConLevel(spec[3]))
00814 {
00815 Gecode::IntVar x0(vm.var(spec[0]->toVar()));
00816 Gecode::IntRelType x1 = toEnum_IntRelType(spec[1]);
00817 Gecode::IntVar x2(vm.var(spec[2]->toVar()));
00818 Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
00819 Gecode::rel(home, x0,x1,x2,x3);
00820 return;
00821 }
00822 #endif
00823 #if defined(GECODE_HAS_INT_VARS)
00824 if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
00825 isEnum_IntRelType(spec[1]) &&
00826 isVar<Gecode::IntVar>(vm, spec[2]) &&
00827 isEnum_IntConLevel(spec[3]))
00828 {
00829 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
00830 Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
00831 for (int i=a0.size(); i--;)
00832 x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
00833 Gecode::IntRelType x1 = toEnum_IntRelType(spec[1]);
00834 Gecode::IntVar x2(vm.var(spec[2]->toVar()));
00835 Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
00836 Gecode::rel(home, x0,x1,x2,x3);
00837 return;
00838 }
00839 #endif
00840 #if defined(GECODE_HAS_INT_VARS)
00841 if (isVar<Gecode::IntVar>(vm, spec[0]) &&
00842 isEnum_IntRelType(spec[1]) &&
00843 spec[2]->isInt() &&
00844 isEnum_IntConLevel(spec[3]))
00845 {
00846 Gecode::IntVar x0(vm.var(spec[0]->toVar()));
00847 Gecode::IntRelType x1 = toEnum_IntRelType(spec[1]);
00848 int x2 = static_cast<int>(spec[2]->toInt());
00849 Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
00850 Gecode::rel(home, x0,x1,x2,x3);
00851 return;
00852 }
00853 #endif
00854 #if defined(GECODE_HAS_INT_VARS)
00855 if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
00856 isEnum_IntRelType(spec[1]) &&
00857 spec[2]->isInt() &&
00858 isEnum_IntConLevel(spec[3]))
00859 {
00860 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
00861 Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
00862 for (int i=a0.size(); i--;)
00863 x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
00864 Gecode::IntRelType x1 = toEnum_IntRelType(spec[1]);
00865 int x2 = static_cast<int>(spec[2]->toInt());
00866 Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
00867 Gecode::rel(home, x0,x1,x2,x3);
00868 return;
00869 }
00870 #endif
00871 #if defined(GECODE_HAS_INT_VARS)
00872 if (isVar<Gecode::IntVar>(vm, spec[0]) &&
00873 isEnum_IntRelType(spec[1]) &&
00874 isVar<Gecode::IntVar>(vm, spec[2]) &&
00875 isVar<Gecode::BoolVar>(vm, spec[3]))
00876 {
00877 Gecode::IntVar x0(vm.var(spec[0]->toVar()));
00878 Gecode::IntRelType x1 = toEnum_IntRelType(spec[1]);
00879 Gecode::IntVar x2(vm.var(spec[2]->toVar()));
00880 Gecode::BoolVar x3(vm.var(spec[3]->toVar()));
00881 Gecode::rel(home, x0,x1,x2,x3);
00882 return;
00883 }
00884 #endif
00885 #if defined(GECODE_HAS_INT_VARS)
00886 if (isVar<Gecode::IntVar>(vm, spec[0]) &&
00887 isEnum_IntRelType(spec[1]) &&
00888 spec[2]->isInt() &&
00889 isVar<Gecode::BoolVar>(vm, spec[3]))
00890 {
00891 Gecode::IntVar x0(vm.var(spec[0]->toVar()));
00892 Gecode::IntRelType x1 = toEnum_IntRelType(spec[1]);
00893 int x2 = static_cast<int>(spec[2]->toInt());
00894 Gecode::BoolVar x3(vm.var(spec[3]->toVar()));
00895 Gecode::rel(home, x0,x1,x2,x3);
00896 return;
00897 }
00898 #endif
00899 #if defined(GECODE_HAS_INT_VARS)
00900 if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
00901 isEnum_IntRelType(spec[1]) &&
00902 isEnum_IntConLevel(spec[2]) &&
00903 isEnum_PropKind(spec[3]))
00904 {
00905 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
00906 Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
00907 for (int i=a0.size(); i--;)
00908 x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
00909 Gecode::IntRelType x1 = toEnum_IntRelType(spec[1]);
00910 Gecode::IntConLevel x2 = toEnum_IntConLevel(spec[2]);
00911 Gecode::PropKind x3 = toEnum_PropKind(spec[3]);
00912 Gecode::rel(home, x0,x1,x2,x3);
00913 return;
00914 }
00915 #endif
00916 #if defined(GECODE_HAS_INT_VARS)
00917 if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
00918 isEnum_IntRelType(spec[1]) &&
00919 isVarArgs<Gecode::IntVar>(vm, spec[2]) &&
00920 isEnum_IntConLevel(spec[3]))
00921 {
00922 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
00923 Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
00924 for (int i=a0.size(); i--;)
00925 x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
00926 Gecode::IntRelType x1 = toEnum_IntRelType(spec[1]);
00927 Gecode::Reflection::ArrayArg& a2 = *spec[2]->toArray();
00928 Gecode::VarArgArray<Gecode::IntVar> x2(a2.size());
00929 for (int i=a2.size(); i--;)
00930 x2[i] = Gecode::IntVar(vm.var(a2[i]->toVar()));
00931 Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
00932 Gecode::rel(home, x0,x1,x2,x3);
00933 return;
00934 }
00935 #endif
00936 #if defined(GECODE_HAS_INT_VARS)
00937 if (isVar<Gecode::BoolVar>(vm, spec[0]) &&
00938 isEnum_IntRelType(spec[1]) &&
00939 isVar<Gecode::BoolVar>(vm, spec[2]) &&
00940 isEnum_IntConLevel(spec[3]))
00941 {
00942 Gecode::BoolVar x0(vm.var(spec[0]->toVar()));
00943 Gecode::IntRelType x1 = toEnum_IntRelType(spec[1]);
00944 Gecode::BoolVar x2(vm.var(spec[2]->toVar()));
00945 Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
00946 Gecode::rel(home, x0,x1,x2,x3);
00947 return;
00948 }
00949 #endif
00950 #if defined(GECODE_HAS_INT_VARS)
00951 if (isVar<Gecode::BoolVar>(vm, spec[0]) &&
00952 isEnum_IntRelType(spec[1]) &&
00953 isVar<Gecode::BoolVar>(vm, spec[2]) &&
00954 isVar<Gecode::BoolVar>(vm, spec[3]))
00955 {
00956 Gecode::BoolVar x0(vm.var(spec[0]->toVar()));
00957 Gecode::IntRelType x1 = toEnum_IntRelType(spec[1]);
00958 Gecode::BoolVar x2(vm.var(spec[2]->toVar()));
00959 Gecode::BoolVar x3(vm.var(spec[3]->toVar()));
00960 Gecode::rel(home, x0,x1,x2,x3);
00961 return;
00962 }
00963 #endif
00964 #if defined(GECODE_HAS_INT_VARS)
00965 if (isVarArgs<Gecode::BoolVar>(vm, spec[0]) &&
00966 isEnum_IntRelType(spec[1]) &&
00967 isVar<Gecode::BoolVar>(vm, spec[2]) &&
00968 isEnum_IntConLevel(spec[3]))
00969 {
00970 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
00971 Gecode::VarArgArray<Gecode::BoolVar> x0(a0.size());
00972 for (int i=a0.size(); i--;)
00973 x0[i] = Gecode::BoolVar(vm.var(a0[i]->toVar()));
00974 Gecode::IntRelType x1 = toEnum_IntRelType(spec[1]);
00975 Gecode::BoolVar x2(vm.var(spec[2]->toVar()));
00976 Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
00977 Gecode::rel(home, x0,x1,x2,x3);
00978 return;
00979 }
00980 #endif
00981 #if defined(GECODE_HAS_INT_VARS)
00982 if (isVar<Gecode::BoolVar>(vm, spec[0]) &&
00983 isEnum_IntRelType(spec[1]) &&
00984 spec[2]->isInt() &&
00985 isEnum_IntConLevel(spec[3]))
00986 {
00987 Gecode::BoolVar x0(vm.var(spec[0]->toVar()));
00988 Gecode::IntRelType x1 = toEnum_IntRelType(spec[1]);
00989 int x2 = static_cast<int>(spec[2]->toInt());
00990 Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
00991 Gecode::rel(home, x0,x1,x2,x3);
00992 return;
00993 }
00994 #endif
00995 #if defined(GECODE_HAS_INT_VARS)
00996 if (isVar<Gecode::BoolVar>(vm, spec[0]) &&
00997 isEnum_IntRelType(spec[1]) &&
00998 spec[2]->isInt() &&
00999 isVar<Gecode::BoolVar>(vm, spec[3]))
01000 {
01001 Gecode::BoolVar x0(vm.var(spec[0]->toVar()));
01002 Gecode::IntRelType x1 = toEnum_IntRelType(spec[1]);
01003 int x2 = static_cast<int>(spec[2]->toInt());
01004 Gecode::BoolVar x3(vm.var(spec[3]->toVar()));
01005 Gecode::rel(home, x0,x1,x2,x3);
01006 return;
01007 }
01008 #endif
01009 #if defined(GECODE_HAS_INT_VARS)
01010 if (isVarArgs<Gecode::BoolVar>(vm, spec[0]) &&
01011 isEnum_IntRelType(spec[1]) &&
01012 spec[2]->isInt() &&
01013 isEnum_IntConLevel(spec[3]))
01014 {
01015 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
01016 Gecode::VarArgArray<Gecode::BoolVar> x0(a0.size());
01017 for (int i=a0.size(); i--;)
01018 x0[i] = Gecode::BoolVar(vm.var(a0[i]->toVar()));
01019 Gecode::IntRelType x1 = toEnum_IntRelType(spec[1]);
01020 int x2 = static_cast<int>(spec[2]->toInt());
01021 Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
01022 Gecode::rel(home, x0,x1,x2,x3);
01023 return;
01024 }
01025 #endif
01026 #if defined(GECODE_HAS_INT_VARS)
01027 if (isVarArgs<Gecode::BoolVar>(vm, spec[0]) &&
01028 isEnum_IntRelType(spec[1]) &&
01029 isVarArgs<Gecode::BoolVar>(vm, spec[2]) &&
01030 isEnum_IntConLevel(spec[3]))
01031 {
01032 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
01033 Gecode::VarArgArray<Gecode::BoolVar> x0(a0.size());
01034 for (int i=a0.size(); i--;)
01035 x0[i] = Gecode::BoolVar(vm.var(a0[i]->toVar()));
01036 Gecode::IntRelType x1 = toEnum_IntRelType(spec[1]);
01037 Gecode::Reflection::ArrayArg& a2 = *spec[2]->toArray();
01038 Gecode::VarArgArray<Gecode::BoolVar> x2(a2.size());
01039 for (int i=a2.size(); i--;)
01040 x2[i] = Gecode::BoolVar(vm.var(a2[i]->toVar()));
01041 Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
01042 Gecode::rel(home, x0,x1,x2,x3);
01043 return;
01044 }
01045 #endif
01046 #if defined(GECODE_HAS_INT_VARS)
01047 if (isVarArgs<Gecode::BoolVar>(vm, spec[0]) &&
01048 isEnum_IntRelType(spec[1]) &&
01049 isEnum_IntConLevel(spec[2]) &&
01050 isEnum_PropKind(spec[3]))
01051 {
01052 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
01053 Gecode::VarArgArray<Gecode::BoolVar> x0(a0.size());
01054 for (int i=a0.size(); i--;)
01055 x0[i] = Gecode::BoolVar(vm.var(a0[i]->toVar()));
01056 Gecode::IntRelType x1 = toEnum_IntRelType(spec[1]);
01057 Gecode::IntConLevel x2 = toEnum_IntConLevel(spec[2]);
01058 Gecode::PropKind x3 = toEnum_PropKind(spec[3]);
01059 Gecode::rel(home, x0,x1,x2,x3);
01060 return;
01061 }
01062 #endif
01063 #if defined(GECODE_HAS_INT_VARS)
01064 if (isVar<Gecode::BoolVar>(vm, spec[0]) &&
01065 isEnum_BoolOpType(spec[1]) &&
01066 isVar<Gecode::BoolVar>(vm, spec[2]) &&
01067 isVar<Gecode::BoolVar>(vm, spec[3]))
01068 {
01069 Gecode::BoolVar x0(vm.var(spec[0]->toVar()));
01070 Gecode::BoolOpType x1 = toEnum_BoolOpType(spec[1]);
01071 Gecode::BoolVar x2(vm.var(spec[2]->toVar()));
01072 Gecode::BoolVar x3(vm.var(spec[3]->toVar()));
01073 Gecode::rel(home, x0,x1,x2,x3);
01074 return;
01075 }
01076 #endif
01077 #if defined(GECODE_HAS_INT_VARS)
01078 if (isVar<Gecode::BoolVar>(vm, spec[0]) &&
01079 isEnum_BoolOpType(spec[1]) &&
01080 isVar<Gecode::BoolVar>(vm, spec[2]) &&
01081 spec[3]->isInt())
01082 {
01083 Gecode::BoolVar x0(vm.var(spec[0]->toVar()));
01084 Gecode::BoolOpType x1 = toEnum_BoolOpType(spec[1]);
01085 Gecode::BoolVar x2(vm.var(spec[2]->toVar()));
01086 int x3 = static_cast<int>(spec[3]->toInt());
01087 Gecode::rel(home, x0,x1,x2,x3);
01088 return;
01089 }
01090 #endif
01091 #if defined(GECODE_HAS_INT_VARS)
01092 if (isEnum_BoolOpType(spec[0]) &&
01093 isVarArgs<Gecode::BoolVar>(vm, spec[1]) &&
01094 isVar<Gecode::BoolVar>(vm, spec[2]) &&
01095 isEnum_IntConLevel(spec[3]))
01096 {
01097 Gecode::BoolOpType x0 = toEnum_BoolOpType(spec[0]);
01098 Gecode::Reflection::ArrayArg& a1 = *spec[1]->toArray();
01099 Gecode::VarArgArray<Gecode::BoolVar> x1(a1.size());
01100 for (int i=a1.size(); i--;)
01101 x1[i] = Gecode::BoolVar(vm.var(a1[i]->toVar()));
01102 Gecode::BoolVar x2(vm.var(spec[2]->toVar()));
01103 Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
01104 Gecode::rel(home, x0,x1,x2,x3);
01105 return;
01106 }
01107 #endif
01108 #if defined(GECODE_HAS_INT_VARS)
01109 if (isEnum_BoolOpType(spec[0]) &&
01110 isVarArgs<Gecode::BoolVar>(vm, spec[1]) &&
01111 spec[2]->isInt() &&
01112 isEnum_IntConLevel(spec[3]))
01113 {
01114 Gecode::BoolOpType x0 = toEnum_BoolOpType(spec[0]);
01115 Gecode::Reflection::ArrayArg& a1 = *spec[1]->toArray();
01116 Gecode::VarArgArray<Gecode::BoolVar> x1(a1.size());
01117 for (int i=a1.size(); i--;)
01118 x1[i] = Gecode::BoolVar(vm.var(a1[i]->toVar()));
01119 int x2 = static_cast<int>(spec[2]->toInt());
01120 Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
01121 Gecode::rel(home, x0,x1,x2,x3);
01122 return;
01123 }
01124 #endif
01125 #if defined(GECODE_HAS_SET_VARS)
01126 if (isVar<Gecode::SetVar>(vm, spec[0]) &&
01127 isEnum_SetRelType(spec[1]) &&
01128 isVar<Gecode::SetVar>(vm, spec[2]) &&
01129 isVar<Gecode::BoolVar>(vm, spec[3]))
01130 {
01131 Gecode::SetVar x0(vm.var(spec[0]->toVar()));
01132 Gecode::SetRelType x1 = toEnum_SetRelType(spec[1]);
01133 Gecode::SetVar x2(vm.var(spec[2]->toVar()));
01134 Gecode::BoolVar x3(vm.var(spec[3]->toVar()));
01135 Gecode::rel(home, x0,x1,x2,x3);
01136 return;
01137 }
01138 #endif
01139 #if defined(GECODE_HAS_SET_VARS)
01140 if (isVar<Gecode::SetVar>(vm, spec[0]) &&
01141 isEnum_SetRelType(spec[1]) &&
01142 isVar<Gecode::IntVar>(vm, spec[2]) &&
01143 isVar<Gecode::BoolVar>(vm, spec[3]))
01144 {
01145 Gecode::SetVar x0(vm.var(spec[0]->toVar()));
01146 Gecode::SetRelType x1 = toEnum_SetRelType(spec[1]);
01147 Gecode::IntVar x2(vm.var(spec[2]->toVar()));
01148 Gecode::BoolVar x3(vm.var(spec[3]->toVar()));
01149 Gecode::rel(home, x0,x1,x2,x3);
01150 return;
01151 }
01152 #endif
01153 #if defined(GECODE_HAS_SET_VARS)
01154 if (isVar<Gecode::IntVar>(vm, spec[0]) &&
01155 isEnum_SetRelType(spec[1]) &&
01156 isVar<Gecode::SetVar>(vm, spec[2]) &&
01157 isVar<Gecode::BoolVar>(vm, spec[3]))
01158 {
01159 Gecode::IntVar x0(vm.var(spec[0]->toVar()));
01160 Gecode::SetRelType x1 = toEnum_SetRelType(spec[1]);
01161 Gecode::SetVar x2(vm.var(spec[2]->toVar()));
01162 Gecode::BoolVar x3(vm.var(spec[3]->toVar()));
01163 Gecode::rel(home, x0,x1,x2,x3);
01164 return;
01165 }
01166 #endif
01167 #if defined(GECODE_HAS_SET_VARS)
01168 if (isEnum_SetOpType(spec[0]) &&
01169 isVarArgs<Gecode::SetVar>(vm, spec[1]) &&
01170 spec[2]->isIntArray() &&
01171 isVar<Gecode::SetVar>(vm, spec[3]))
01172 {
01173 Gecode::SetOpType x0 = toEnum_SetOpType(spec[0]);
01174 Gecode::Reflection::ArrayArg& a1 = *spec[1]->toArray();
01175 Gecode::VarArgArray<Gecode::SetVar> x1(a1.size());
01176 for (int i=a1.size(); i--;)
01177 x1[i] = Gecode::SetVar(vm.var(a1[i]->toVar()));
01178 Gecode::Reflection::IntArrayArg* a2 = spec[2]->toIntArray();
01179 Gecode::Reflection::IntArrayArgRanges ar2(a2);
01180 Gecode::IntSet x2(ar2);
01181 Gecode::SetVar x3(vm.var(spec[3]->toVar()));
01182 Gecode::rel(home, x0,x1,x2,x3);
01183 return;
01184 }
01185 #endif
01186 #if defined(GECODE_HAS_SET_VARS)
01187 if (isEnum_SetOpType(spec[0]) &&
01188 isVarArgs<Gecode::IntVar>(vm, spec[1]) &&
01189 spec[2]->isIntArray() &&
01190 isVar<Gecode::SetVar>(vm, spec[3]))
01191 {
01192 Gecode::SetOpType x0 = toEnum_SetOpType(spec[0]);
01193 Gecode::Reflection::ArrayArg& a1 = *spec[1]->toArray();
01194 Gecode::VarArgArray<Gecode::IntVar> x1(a1.size());
01195 for (int i=a1.size(); i--;)
01196 x1[i] = Gecode::IntVar(vm.var(a1[i]->toVar()));
01197 Gecode::Reflection::IntArrayArg* a2 = spec[2]->toIntArray();
01198 Gecode::Reflection::IntArrayArgRanges ar2(a2);
01199 Gecode::IntSet x2(ar2);
01200 Gecode::SetVar x3(vm.var(spec[3]->toVar()));
01201 Gecode::rel(home, x0,x1,x2,x3);
01202 return;
01203 }
01204 #endif
01205 throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::rel");
01206 }
01207 break;
01208 case 5:
01209 {
01210 #if defined(GECODE_HAS_INT_VARS)
01211 if (isVar<Gecode::IntVar>(vm, spec[0]) &&
01212 isEnum_IntRelType(spec[1]) &&
01213 isVar<Gecode::IntVar>(vm, spec[2]) &&
01214 isEnum_IntConLevel(spec[3]) &&
01215 isEnum_PropKind(spec[4]))
01216 {
01217 Gecode::IntVar x0(vm.var(spec[0]->toVar()));
01218 Gecode::IntRelType x1 = toEnum_IntRelType(spec[1]);
01219 Gecode::IntVar x2(vm.var(spec[2]->toVar()));
01220 Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
01221 Gecode::PropKind x4 = toEnum_PropKind(spec[4]);
01222 Gecode::rel(home, x0,x1,x2,x3,x4);
01223 return;
01224 }
01225 #endif
01226 #if defined(GECODE_HAS_INT_VARS)
01227 if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
01228 isEnum_IntRelType(spec[1]) &&
01229 isVar<Gecode::IntVar>(vm, spec[2]) &&
01230 isEnum_IntConLevel(spec[3]) &&
01231 isEnum_PropKind(spec[4]))
01232 {
01233 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
01234 Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
01235 for (int i=a0.size(); i--;)
01236 x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
01237 Gecode::IntRelType x1 = toEnum_IntRelType(spec[1]);
01238 Gecode::IntVar x2(vm.var(spec[2]->toVar()));
01239 Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
01240 Gecode::PropKind x4 = toEnum_PropKind(spec[4]);
01241 Gecode::rel(home, x0,x1,x2,x3,x4);
01242 return;
01243 }
01244 #endif
01245 #if defined(GECODE_HAS_INT_VARS)
01246 if (isVar<Gecode::IntVar>(vm, spec[0]) &&
01247 isEnum_IntRelType(spec[1]) &&
01248 spec[2]->isInt() &&
01249 isEnum_IntConLevel(spec[3]) &&
01250 isEnum_PropKind(spec[4]))
01251 {
01252 Gecode::IntVar x0(vm.var(spec[0]->toVar()));
01253 Gecode::IntRelType x1 = toEnum_IntRelType(spec[1]);
01254 int x2 = static_cast<int>(spec[2]->toInt());
01255 Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
01256 Gecode::PropKind x4 = toEnum_PropKind(spec[4]);
01257 Gecode::rel(home, x0,x1,x2,x3,x4);
01258 return;
01259 }
01260 #endif
01261 #if defined(GECODE_HAS_INT_VARS)
01262 if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
01263 isEnum_IntRelType(spec[1]) &&
01264 spec[2]->isInt() &&
01265 isEnum_IntConLevel(spec[3]) &&
01266 isEnum_PropKind(spec[4]))
01267 {
01268 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
01269 Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
01270 for (int i=a0.size(); i--;)
01271 x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
01272 Gecode::IntRelType x1 = toEnum_IntRelType(spec[1]);
01273 int x2 = static_cast<int>(spec[2]->toInt());
01274 Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
01275 Gecode::PropKind x4 = toEnum_PropKind(spec[4]);
01276 Gecode::rel(home, x0,x1,x2,x3,x4);
01277 return;
01278 }
01279 #endif
01280 #if defined(GECODE_HAS_INT_VARS)
01281 if (isVar<Gecode::IntVar>(vm, spec[0]) &&
01282 isEnum_IntRelType(spec[1]) &&
01283 isVar<Gecode::IntVar>(vm, spec[2]) &&
01284 isVar<Gecode::BoolVar>(vm, spec[3]) &&
01285 isEnum_IntConLevel(spec[4]))
01286 {
01287 Gecode::IntVar x0(vm.var(spec[0]->toVar()));
01288 Gecode::IntRelType x1 = toEnum_IntRelType(spec[1]);
01289 Gecode::IntVar x2(vm.var(spec[2]->toVar()));
01290 Gecode::BoolVar x3(vm.var(spec[3]->toVar()));
01291 Gecode::IntConLevel x4 = toEnum_IntConLevel(spec[4]);
01292 Gecode::rel(home, x0,x1,x2,x3,x4);
01293 return;
01294 }
01295 #endif
01296 #if defined(GECODE_HAS_INT_VARS)
01297 if (isVar<Gecode::IntVar>(vm, spec[0]) &&
01298 isEnum_IntRelType(spec[1]) &&
01299 spec[2]->isInt() &&
01300 isVar<Gecode::BoolVar>(vm, spec[3]) &&
01301 isEnum_IntConLevel(spec[4]))
01302 {
01303 Gecode::IntVar x0(vm.var(spec[0]->toVar()));
01304 Gecode::IntRelType x1 = toEnum_IntRelType(spec[1]);
01305 int x2 = static_cast<int>(spec[2]->toInt());
01306 Gecode::BoolVar x3(vm.var(spec[3]->toVar()));
01307 Gecode::IntConLevel x4 = toEnum_IntConLevel(spec[4]);
01308 Gecode::rel(home, x0,x1,x2,x3,x4);
01309 return;
01310 }
01311 #endif
01312 #if defined(GECODE_HAS_INT_VARS)
01313 if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
01314 isEnum_IntRelType(spec[1]) &&
01315 isVarArgs<Gecode::IntVar>(vm, spec[2]) &&
01316 isEnum_IntConLevel(spec[3]) &&
01317 isEnum_PropKind(spec[4]))
01318 {
01319 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
01320 Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
01321 for (int i=a0.size(); i--;)
01322 x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
01323 Gecode::IntRelType x1 = toEnum_IntRelType(spec[1]);
01324 Gecode::Reflection::ArrayArg& a2 = *spec[2]->toArray();
01325 Gecode::VarArgArray<Gecode::IntVar> x2(a2.size());
01326 for (int i=a2.size(); i--;)
01327 x2[i] = Gecode::IntVar(vm.var(a2[i]->toVar()));
01328 Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
01329 Gecode::PropKind x4 = toEnum_PropKind(spec[4]);
01330 Gecode::rel(home, x0,x1,x2,x3,x4);
01331 return;
01332 }
01333 #endif
01334 #if defined(GECODE_HAS_INT_VARS)
01335 if (isVar<Gecode::BoolVar>(vm, spec[0]) &&
01336 isEnum_IntRelType(spec[1]) &&
01337 isVar<Gecode::BoolVar>(vm, spec[2]) &&
01338 isEnum_IntConLevel(spec[3]) &&
01339 isEnum_PropKind(spec[4]))
01340 {
01341 Gecode::BoolVar x0(vm.var(spec[0]->toVar()));
01342 Gecode::IntRelType x1 = toEnum_IntRelType(spec[1]);
01343 Gecode::BoolVar x2(vm.var(spec[2]->toVar()));
01344 Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
01345 Gecode::PropKind x4 = toEnum_PropKind(spec[4]);
01346 Gecode::rel(home, x0,x1,x2,x3,x4);
01347 return;
01348 }
01349 #endif
01350 #if defined(GECODE_HAS_INT_VARS)
01351 if (isVar<Gecode::BoolVar>(vm, spec[0]) &&
01352 isEnum_IntRelType(spec[1]) &&
01353 isVar<Gecode::BoolVar>(vm, spec[2]) &&
01354 isVar<Gecode::BoolVar>(vm, spec[3]) &&
01355 isEnum_IntConLevel(spec[4]))
01356 {
01357 Gecode::BoolVar x0(vm.var(spec[0]->toVar()));
01358 Gecode::IntRelType x1 = toEnum_IntRelType(spec[1]);
01359 Gecode::BoolVar x2(vm.var(spec[2]->toVar()));
01360 Gecode::BoolVar x3(vm.var(spec[3]->toVar()));
01361 Gecode::IntConLevel x4 = toEnum_IntConLevel(spec[4]);
01362 Gecode::rel(home, x0,x1,x2,x3,x4);
01363 return;
01364 }
01365 #endif
01366 #if defined(GECODE_HAS_INT_VARS)
01367 if (isVarArgs<Gecode::BoolVar>(vm, spec[0]) &&
01368 isEnum_IntRelType(spec[1]) &&
01369 isVar<Gecode::BoolVar>(vm, spec[2]) &&
01370 isEnum_IntConLevel(spec[3]) &&
01371 isEnum_PropKind(spec[4]))
01372 {
01373 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
01374 Gecode::VarArgArray<Gecode::BoolVar> x0(a0.size());
01375 for (int i=a0.size(); i--;)
01376 x0[i] = Gecode::BoolVar(vm.var(a0[i]->toVar()));
01377 Gecode::IntRelType x1 = toEnum_IntRelType(spec[1]);
01378 Gecode::BoolVar x2(vm.var(spec[2]->toVar()));
01379 Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
01380 Gecode::PropKind x4 = toEnum_PropKind(spec[4]);
01381 Gecode::rel(home, x0,x1,x2,x3,x4);
01382 return;
01383 }
01384 #endif
01385 #if defined(GECODE_HAS_INT_VARS)
01386 if (isVar<Gecode::BoolVar>(vm, spec[0]) &&
01387 isEnum_IntRelType(spec[1]) &&
01388 spec[2]->isInt() &&
01389 isEnum_IntConLevel(spec[3]) &&
01390 isEnum_PropKind(spec[4]))
01391 {
01392 Gecode::BoolVar x0(vm.var(spec[0]->toVar()));
01393 Gecode::IntRelType x1 = toEnum_IntRelType(spec[1]);
01394 int x2 = static_cast<int>(spec[2]->toInt());
01395 Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
01396 Gecode::PropKind x4 = toEnum_PropKind(spec[4]);
01397 Gecode::rel(home, x0,x1,x2,x3,x4);
01398 return;
01399 }
01400 #endif
01401 #if defined(GECODE_HAS_INT_VARS)
01402 if (isVar<Gecode::BoolVar>(vm, spec[0]) &&
01403 isEnum_IntRelType(spec[1]) &&
01404 spec[2]->isInt() &&
01405 isVar<Gecode::BoolVar>(vm, spec[3]) &&
01406 isEnum_IntConLevel(spec[4]))
01407 {
01408 Gecode::BoolVar x0(vm.var(spec[0]->toVar()));
01409 Gecode::IntRelType x1 = toEnum_IntRelType(spec[1]);
01410 int x2 = static_cast<int>(spec[2]->toInt());
01411 Gecode::BoolVar x3(vm.var(spec[3]->toVar()));
01412 Gecode::IntConLevel x4 = toEnum_IntConLevel(spec[4]);
01413 Gecode::rel(home, x0,x1,x2,x3,x4);
01414 return;
01415 }
01416 #endif
01417 #if defined(GECODE_HAS_INT_VARS)
01418 if (isVarArgs<Gecode::BoolVar>(vm, spec[0]) &&
01419 isEnum_IntRelType(spec[1]) &&
01420 spec[2]->isInt() &&
01421 isEnum_IntConLevel(spec[3]) &&
01422 isEnum_PropKind(spec[4]))
01423 {
01424 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
01425 Gecode::VarArgArray<Gecode::BoolVar> x0(a0.size());
01426 for (int i=a0.size(); i--;)
01427 x0[i] = Gecode::BoolVar(vm.var(a0[i]->toVar()));
01428 Gecode::IntRelType x1 = toEnum_IntRelType(spec[1]);
01429 int x2 = static_cast<int>(spec[2]->toInt());
01430 Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
01431 Gecode::PropKind x4 = toEnum_PropKind(spec[4]);
01432 Gecode::rel(home, x0,x1,x2,x3,x4);
01433 return;
01434 }
01435 #endif
01436 #if defined(GECODE_HAS_INT_VARS)
01437 if (isVarArgs<Gecode::BoolVar>(vm, spec[0]) &&
01438 isEnum_IntRelType(spec[1]) &&
01439 isVarArgs<Gecode::BoolVar>(vm, spec[2]) &&
01440 isEnum_IntConLevel(spec[3]) &&
01441 isEnum_PropKind(spec[4]))
01442 {
01443 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
01444 Gecode::VarArgArray<Gecode::BoolVar> x0(a0.size());
01445 for (int i=a0.size(); i--;)
01446 x0[i] = Gecode::BoolVar(vm.var(a0[i]->toVar()));
01447 Gecode::IntRelType x1 = toEnum_IntRelType(spec[1]);
01448 Gecode::Reflection::ArrayArg& a2 = *spec[2]->toArray();
01449 Gecode::VarArgArray<Gecode::BoolVar> x2(a2.size());
01450 for (int i=a2.size(); i--;)
01451 x2[i] = Gecode::BoolVar(vm.var(a2[i]->toVar()));
01452 Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
01453 Gecode::PropKind x4 = toEnum_PropKind(spec[4]);
01454 Gecode::rel(home, x0,x1,x2,x3,x4);
01455 return;
01456 }
01457 #endif
01458 #if defined(GECODE_HAS_INT_VARS)
01459 if (isVar<Gecode::BoolVar>(vm, spec[0]) &&
01460 isEnum_BoolOpType(spec[1]) &&
01461 isVar<Gecode::BoolVar>(vm, spec[2]) &&
01462 isVar<Gecode::BoolVar>(vm, spec[3]) &&
01463 isEnum_IntConLevel(spec[4]))
01464 {
01465 Gecode::BoolVar x0(vm.var(spec[0]->toVar()));
01466 Gecode::BoolOpType x1 = toEnum_BoolOpType(spec[1]);
01467 Gecode::BoolVar x2(vm.var(spec[2]->toVar()));
01468 Gecode::BoolVar x3(vm.var(spec[3]->toVar()));
01469 Gecode::IntConLevel x4 = toEnum_IntConLevel(spec[4]);
01470 Gecode::rel(home, x0,x1,x2,x3,x4);
01471 return;
01472 }
01473 #endif
01474 #if defined(GECODE_HAS_INT_VARS)
01475 if (isVar<Gecode::BoolVar>(vm, spec[0]) &&
01476 isEnum_BoolOpType(spec[1]) &&
01477 isVar<Gecode::BoolVar>(vm, spec[2]) &&
01478 spec[3]->isInt() &&
01479 isEnum_IntConLevel(spec[4]))
01480 {
01481 Gecode::BoolVar x0(vm.var(spec[0]->toVar()));
01482 Gecode::BoolOpType x1 = toEnum_BoolOpType(spec[1]);
01483 Gecode::BoolVar x2(vm.var(spec[2]->toVar()));
01484 int x3 = static_cast<int>(spec[3]->toInt());
01485 Gecode::IntConLevel x4 = toEnum_IntConLevel(spec[4]);
01486 Gecode::rel(home, x0,x1,x2,x3,x4);
01487 return;
01488 }
01489 #endif
01490 #if defined(GECODE_HAS_INT_VARS)
01491 if (isEnum_BoolOpType(spec[0]) &&
01492 isVarArgs<Gecode::BoolVar>(vm, spec[1]) &&
01493 isVar<Gecode::BoolVar>(vm, spec[2]) &&
01494 isEnum_IntConLevel(spec[3]) &&
01495 isEnum_PropKind(spec[4]))
01496 {
01497 Gecode::BoolOpType x0 = toEnum_BoolOpType(spec[0]);
01498 Gecode::Reflection::ArrayArg& a1 = *spec[1]->toArray();
01499 Gecode::VarArgArray<Gecode::BoolVar> x1(a1.size());
01500 for (int i=a1.size(); i--;)
01501 x1[i] = Gecode::BoolVar(vm.var(a1[i]->toVar()));
01502 Gecode::BoolVar x2(vm.var(spec[2]->toVar()));
01503 Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
01504 Gecode::PropKind x4 = toEnum_PropKind(spec[4]);
01505 Gecode::rel(home, x0,x1,x2,x3,x4);
01506 return;
01507 }
01508 #endif
01509 #if defined(GECODE_HAS_INT_VARS)
01510 if (isEnum_BoolOpType(spec[0]) &&
01511 isVarArgs<Gecode::BoolVar>(vm, spec[1]) &&
01512 spec[2]->isInt() &&
01513 isEnum_IntConLevel(spec[3]) &&
01514 isEnum_PropKind(spec[4]))
01515 {
01516 Gecode::BoolOpType x0 = toEnum_BoolOpType(spec[0]);
01517 Gecode::Reflection::ArrayArg& a1 = *spec[1]->toArray();
01518 Gecode::VarArgArray<Gecode::BoolVar> x1(a1.size());
01519 for (int i=a1.size(); i--;)
01520 x1[i] = Gecode::BoolVar(vm.var(a1[i]->toVar()));
01521 int x2 = static_cast<int>(spec[2]->toInt());
01522 Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
01523 Gecode::PropKind x4 = toEnum_PropKind(spec[4]);
01524 Gecode::rel(home, x0,x1,x2,x3,x4);
01525 return;
01526 }
01527 #endif
01528 #if defined(GECODE_HAS_SET_VARS)
01529 if (isVar<Gecode::SetVar>(vm, spec[0]) &&
01530 isEnum_SetOpType(spec[1]) &&
01531 isVar<Gecode::SetVar>(vm, spec[2]) &&
01532 isEnum_SetRelType(spec[3]) &&
01533 isVar<Gecode::SetVar>(vm, spec[4]))
01534 {
01535 Gecode::SetVar x0(vm.var(spec[0]->toVar()));
01536 Gecode::SetOpType x1 = toEnum_SetOpType(spec[1]);
01537 Gecode::SetVar x2(vm.var(spec[2]->toVar()));
01538 Gecode::SetRelType x3 = toEnum_SetRelType(spec[3]);
01539 Gecode::SetVar x4(vm.var(spec[4]->toVar()));
01540 Gecode::rel(home, x0,x1,x2,x3,x4);
01541 return;
01542 }
01543 #endif
01544 #if defined(GECODE_HAS_SET_VARS)
01545 if (spec[0]->isIntArray() &&
01546 isEnum_SetOpType(spec[1]) &&
01547 isVar<Gecode::SetVar>(vm, spec[2]) &&
01548 isEnum_SetRelType(spec[3]) &&
01549 isVar<Gecode::SetVar>(vm, spec[4]))
01550 {
01551 Gecode::Reflection::IntArrayArg* a0 = spec[0]->toIntArray();
01552 Gecode::Reflection::IntArrayArgRanges ar0(a0);
01553 Gecode::IntSet x0(ar0);
01554 Gecode::SetOpType x1 = toEnum_SetOpType(spec[1]);
01555 Gecode::SetVar x2(vm.var(spec[2]->toVar()));
01556 Gecode::SetRelType x3 = toEnum_SetRelType(spec[3]);
01557 Gecode::SetVar x4(vm.var(spec[4]->toVar()));
01558 Gecode::rel(home, x0,x1,x2,x3,x4);
01559 return;
01560 }
01561 #endif
01562 #if defined(GECODE_HAS_SET_VARS)
01563 if (isVar<Gecode::SetVar>(vm, spec[0]) &&
01564 isEnum_SetOpType(spec[1]) &&
01565 spec[2]->isIntArray() &&
01566 isEnum_SetRelType(spec[3]) &&
01567 isVar<Gecode::SetVar>(vm, spec[4]))
01568 {
01569 Gecode::SetVar x0(vm.var(spec[0]->toVar()));
01570 Gecode::SetOpType x1 = toEnum_SetOpType(spec[1]);
01571 Gecode::Reflection::IntArrayArg* a2 = spec[2]->toIntArray();
01572 Gecode::Reflection::IntArrayArgRanges ar2(a2);
01573 Gecode::IntSet x2(ar2);
01574 Gecode::SetRelType x3 = toEnum_SetRelType(spec[3]);
01575 Gecode::SetVar x4(vm.var(spec[4]->toVar()));
01576 Gecode::rel(home, x0,x1,x2,x3,x4);
01577 return;
01578 }
01579 #endif
01580 #if defined(GECODE_HAS_SET_VARS)
01581 if (isVar<Gecode::SetVar>(vm, spec[0]) &&
01582 isEnum_SetOpType(spec[1]) &&
01583 isVar<Gecode::SetVar>(vm, spec[2]) &&
01584 isEnum_SetRelType(spec[3]) &&
01585 spec[4]->isIntArray())
01586 {
01587 Gecode::SetVar x0(vm.var(spec[0]->toVar()));
01588 Gecode::SetOpType x1 = toEnum_SetOpType(spec[1]);
01589 Gecode::SetVar x2(vm.var(spec[2]->toVar()));
01590 Gecode::SetRelType x3 = toEnum_SetRelType(spec[3]);
01591 Gecode::Reflection::IntArrayArg* a4 = spec[4]->toIntArray();
01592 Gecode::Reflection::IntArrayArgRanges ar4(a4);
01593 Gecode::IntSet x4(ar4);
01594 Gecode::rel(home, x0,x1,x2,x3,x4);
01595 return;
01596 }
01597 #endif
01598 #if defined(GECODE_HAS_SET_VARS)
01599 if (spec[0]->isIntArray() &&
01600 isEnum_SetOpType(spec[1]) &&
01601 isVar<Gecode::SetVar>(vm, spec[2]) &&
01602 isEnum_SetRelType(spec[3]) &&
01603 spec[4]->isIntArray())
01604 {
01605 Gecode::Reflection::IntArrayArg* a0 = spec[0]->toIntArray();
01606 Gecode::Reflection::IntArrayArgRanges ar0(a0);
01607 Gecode::IntSet x0(ar0);
01608 Gecode::SetOpType x1 = toEnum_SetOpType(spec[1]);
01609 Gecode::SetVar x2(vm.var(spec[2]->toVar()));
01610 Gecode::SetRelType x3 = toEnum_SetRelType(spec[3]);
01611 Gecode::Reflection::IntArrayArg* a4 = spec[4]->toIntArray();
01612 Gecode::Reflection::IntArrayArgRanges ar4(a4);
01613 Gecode::IntSet x4(ar4);
01614 Gecode::rel(home, x0,x1,x2,x3,x4);
01615 return;
01616 }
01617 #endif
01618 #if defined(GECODE_HAS_SET_VARS)
01619 if (isVar<Gecode::SetVar>(vm, spec[0]) &&
01620 isEnum_SetOpType(spec[1]) &&
01621 spec[2]->isIntArray() &&
01622 isEnum_SetRelType(spec[3]) &&
01623 spec[4]->isIntArray())
01624 {
01625 Gecode::SetVar x0(vm.var(spec[0]->toVar()));
01626 Gecode::SetOpType x1 = toEnum_SetOpType(spec[1]);
01627 Gecode::Reflection::IntArrayArg* a2 = spec[2]->toIntArray();
01628 Gecode::Reflection::IntArrayArgRanges ar2(a2);
01629 Gecode::IntSet x2(ar2);
01630 Gecode::SetRelType x3 = toEnum_SetRelType(spec[3]);
01631 Gecode::Reflection::IntArrayArg* a4 = spec[4]->toIntArray();
01632 Gecode::Reflection::IntArrayArgRanges ar4(a4);
01633 Gecode::IntSet x4(ar4);
01634 Gecode::rel(home, x0,x1,x2,x3,x4);
01635 return;
01636 }
01637 #endif
01638 throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::rel");
01639 }
01640 break;
01641 case 6:
01642 {
01643 #if defined(GECODE_HAS_INT_VARS)
01644 if (isVar<Gecode::IntVar>(vm, spec[0]) &&
01645 isEnum_IntRelType(spec[1]) &&
01646 isVar<Gecode::IntVar>(vm, spec[2]) &&
01647 isVar<Gecode::BoolVar>(vm, spec[3]) &&
01648 isEnum_IntConLevel(spec[4]) &&
01649 isEnum_PropKind(spec[5]))
01650 {
01651 Gecode::IntVar x0(vm.var(spec[0]->toVar()));
01652 Gecode::IntRelType x1 = toEnum_IntRelType(spec[1]);
01653 Gecode::IntVar x2(vm.var(spec[2]->toVar()));
01654 Gecode::BoolVar x3(vm.var(spec[3]->toVar()));
01655 Gecode::IntConLevel x4 = toEnum_IntConLevel(spec[4]);
01656 Gecode::PropKind x5 = toEnum_PropKind(spec[5]);
01657 Gecode::rel(home, x0,x1,x2,x3,x4,x5);
01658 return;
01659 }
01660 #endif
01661 #if defined(GECODE_HAS_INT_VARS)
01662 if (isVar<Gecode::IntVar>(vm, spec[0]) &&
01663 isEnum_IntRelType(spec[1]) &&
01664 spec[2]->isInt() &&
01665 isVar<Gecode::BoolVar>(vm, spec[3]) &&
01666 isEnum_IntConLevel(spec[4]) &&
01667 isEnum_PropKind(spec[5]))
01668 {
01669 Gecode::IntVar x0(vm.var(spec[0]->toVar()));
01670 Gecode::IntRelType x1 = toEnum_IntRelType(spec[1]);
01671 int x2 = static_cast<int>(spec[2]->toInt());
01672 Gecode::BoolVar x3(vm.var(spec[3]->toVar()));
01673 Gecode::IntConLevel x4 = toEnum_IntConLevel(spec[4]);
01674 Gecode::PropKind x5 = toEnum_PropKind(spec[5]);
01675 Gecode::rel(home, x0,x1,x2,x3,x4,x5);
01676 return;
01677 }
01678 #endif
01679 #if defined(GECODE_HAS_INT_VARS)
01680 if (isVar<Gecode::BoolVar>(vm, spec[0]) &&
01681 isEnum_IntRelType(spec[1]) &&
01682 isVar<Gecode::BoolVar>(vm, spec[2]) &&
01683 isVar<Gecode::BoolVar>(vm, spec[3]) &&
01684 isEnum_IntConLevel(spec[4]) &&
01685 isEnum_PropKind(spec[5]))
01686 {
01687 Gecode::BoolVar x0(vm.var(spec[0]->toVar()));
01688 Gecode::IntRelType x1 = toEnum_IntRelType(spec[1]);
01689 Gecode::BoolVar x2(vm.var(spec[2]->toVar()));
01690 Gecode::BoolVar x3(vm.var(spec[3]->toVar()));
01691 Gecode::IntConLevel x4 = toEnum_IntConLevel(spec[4]);
01692 Gecode::PropKind x5 = toEnum_PropKind(spec[5]);
01693 Gecode::rel(home, x0,x1,x2,x3,x4,x5);
01694 return;
01695 }
01696 #endif
01697 #if defined(GECODE_HAS_INT_VARS)
01698 if (isVar<Gecode::BoolVar>(vm, spec[0]) &&
01699 isEnum_IntRelType(spec[1]) &&
01700 spec[2]->isInt() &&
01701 isVar<Gecode::BoolVar>(vm, spec[3]) &&
01702 isEnum_IntConLevel(spec[4]) &&
01703 isEnum_PropKind(spec[5]))
01704 {
01705 Gecode::BoolVar x0(vm.var(spec[0]->toVar()));
01706 Gecode::IntRelType x1 = toEnum_IntRelType(spec[1]);
01707 int x2 = static_cast<int>(spec[2]->toInt());
01708 Gecode::BoolVar x3(vm.var(spec[3]->toVar()));
01709 Gecode::IntConLevel x4 = toEnum_IntConLevel(spec[4]);
01710 Gecode::PropKind x5 = toEnum_PropKind(spec[5]);
01711 Gecode::rel(home, x0,x1,x2,x3,x4,x5);
01712 return;
01713 }
01714 #endif
01715 #if defined(GECODE_HAS_INT_VARS)
01716 if (isVar<Gecode::BoolVar>(vm, spec[0]) &&
01717 isEnum_BoolOpType(spec[1]) &&
01718 isVar<Gecode::BoolVar>(vm, spec[2]) &&
01719 isVar<Gecode::BoolVar>(vm, spec[3]) &&
01720 isEnum_IntConLevel(spec[4]) &&
01721 isEnum_PropKind(spec[5]))
01722 {
01723 Gecode::BoolVar x0(vm.var(spec[0]->toVar()));
01724 Gecode::BoolOpType x1 = toEnum_BoolOpType(spec[1]);
01725 Gecode::BoolVar x2(vm.var(spec[2]->toVar()));
01726 Gecode::BoolVar x3(vm.var(spec[3]->toVar()));
01727 Gecode::IntConLevel x4 = toEnum_IntConLevel(spec[4]);
01728 Gecode::PropKind x5 = toEnum_PropKind(spec[5]);
01729 Gecode::rel(home, x0,x1,x2,x3,x4,x5);
01730 return;
01731 }
01732 #endif
01733 #if defined(GECODE_HAS_INT_VARS)
01734 if (isVar<Gecode::BoolVar>(vm, spec[0]) &&
01735 isEnum_BoolOpType(spec[1]) &&
01736 isVar<Gecode::BoolVar>(vm, spec[2]) &&
01737 spec[3]->isInt() &&
01738 isEnum_IntConLevel(spec[4]) &&
01739 isEnum_PropKind(spec[5]))
01740 {
01741 Gecode::BoolVar x0(vm.var(spec[0]->toVar()));
01742 Gecode::BoolOpType x1 = toEnum_BoolOpType(spec[1]);
01743 Gecode::BoolVar x2(vm.var(spec[2]->toVar()));
01744 int x3 = static_cast<int>(spec[3]->toInt());
01745 Gecode::IntConLevel x4 = toEnum_IntConLevel(spec[4]);
01746 Gecode::PropKind x5 = toEnum_PropKind(spec[5]);
01747 Gecode::rel(home, x0,x1,x2,x3,x4,x5);
01748 return;
01749 }
01750 #endif
01751 throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::rel");
01752 }
01753 break;
01754 default: throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::rel");
01755 }
01756 }
01757 };
01758
01759 class Register_sqrt {
01760 public:
01762 static Gecode::Support::Symbol ati(void) {
01763 return "Gecode::Post::sqrt";
01764 }
01765
01767 static void post(Gecode::Space* home, Gecode::Reflection::VarMap& vm,
01768 const Gecode::Reflection::ActorSpec& spec) {
01769 switch(spec.noOfArgs()) {
01770 case 2:
01771 {
01772 #if defined(GECODE_HAS_INT_VARS)
01773 if (isVar<Gecode::IntVar>(vm, spec[0]) &&
01774 isVar<Gecode::IntVar>(vm, spec[1]))
01775 {
01776 Gecode::IntVar x0(vm.var(spec[0]->toVar()));
01777 Gecode::IntVar x1(vm.var(spec[1]->toVar()));
01778 Gecode::sqrt(home, x0,x1);
01779 return;
01780 }
01781 #endif
01782 throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::sqrt");
01783 }
01784 break;
01785 case 3:
01786 {
01787 #if defined(GECODE_HAS_INT_VARS)
01788 if (isVar<Gecode::IntVar>(vm, spec[0]) &&
01789 isVar<Gecode::IntVar>(vm, spec[1]) &&
01790 isEnum_IntConLevel(spec[2]))
01791 {
01792 Gecode::IntVar x0(vm.var(spec[0]->toVar()));
01793 Gecode::IntVar x1(vm.var(spec[1]->toVar()));
01794 Gecode::IntConLevel x2 = toEnum_IntConLevel(spec[2]);
01795 Gecode::sqrt(home, x0,x1,x2);
01796 return;
01797 }
01798 #endif
01799 throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::sqrt");
01800 }
01801 break;
01802 case 4:
01803 {
01804 #if defined(GECODE_HAS_INT_VARS)
01805 if (isVar<Gecode::IntVar>(vm, spec[0]) &&
01806 isVar<Gecode::IntVar>(vm, spec[1]) &&
01807 isEnum_IntConLevel(spec[2]) &&
01808 isEnum_PropKind(spec[3]))
01809 {
01810 Gecode::IntVar x0(vm.var(spec[0]->toVar()));
01811 Gecode::IntVar x1(vm.var(spec[1]->toVar()));
01812 Gecode::IntConLevel x2 = toEnum_IntConLevel(spec[2]);
01813 Gecode::PropKind x3 = toEnum_PropKind(spec[3]);
01814 Gecode::sqrt(home, x0,x1,x2,x3);
01815 return;
01816 }
01817 #endif
01818 throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::sqrt");
01819 }
01820 break;
01821 default: throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::sqrt");
01822 }
01823 }
01824 };
01825
01826 class Register_sequence {
01827 public:
01829 static Gecode::Support::Symbol ati(void) {
01830 return "Gecode::Post::sequence";
01831 }
01832
01834 static void post(Gecode::Space* home, Gecode::Reflection::VarMap& vm,
01835 const Gecode::Reflection::ActorSpec& spec) {
01836 switch(spec.noOfArgs()) {
01837 case 1:
01838 {
01839 #if defined(GECODE_HAS_SET_VARS)
01840 if (isVarArgs<Gecode::SetVar>(vm, spec[0]))
01841 {
01842 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
01843 Gecode::VarArgArray<Gecode::SetVar> x0(a0.size());
01844 for (int i=a0.size(); i--;)
01845 x0[i] = Gecode::SetVar(vm.var(a0[i]->toVar()));
01846 Gecode::sequence(home, x0);
01847 return;
01848 }
01849 #endif
01850 throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::sequence");
01851 }
01852 break;
01853 default: throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::sequence");
01854 }
01855 }
01856 };
01857
01858 class Register_sorted {
01859 public:
01861 static Gecode::Support::Symbol ati(void) {
01862 return "Gecode::Post::sorted";
01863 }
01864
01866 static void post(Gecode::Space* home, Gecode::Reflection::VarMap& vm,
01867 const Gecode::Reflection::ActorSpec& spec) {
01868 switch(spec.noOfArgs()) {
01869 case 2:
01870 {
01871 #if defined(GECODE_HAS_INT_VARS)
01872 if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
01873 isVarArgs<Gecode::IntVar>(vm, spec[1]))
01874 {
01875 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
01876 Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
01877 for (int i=a0.size(); i--;)
01878 x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
01879 Gecode::Reflection::ArrayArg& a1 = *spec[1]->toArray();
01880 Gecode::VarArgArray<Gecode::IntVar> x1(a1.size());
01881 for (int i=a1.size(); i--;)
01882 x1[i] = Gecode::IntVar(vm.var(a1[i]->toVar()));
01883 Gecode::sorted(home, x0,x1);
01884 return;
01885 }
01886 #endif
01887 throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::sorted");
01888 }
01889 break;
01890 case 3:
01891 {
01892 #if defined(GECODE_HAS_INT_VARS)
01893 if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
01894 isVarArgs<Gecode::IntVar>(vm, spec[1]) &&
01895 isEnum_IntConLevel(spec[2]))
01896 {
01897 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
01898 Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
01899 for (int i=a0.size(); i--;)
01900 x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
01901 Gecode::Reflection::ArrayArg& a1 = *spec[1]->toArray();
01902 Gecode::VarArgArray<Gecode::IntVar> x1(a1.size());
01903 for (int i=a1.size(); i--;)
01904 x1[i] = Gecode::IntVar(vm.var(a1[i]->toVar()));
01905 Gecode::IntConLevel x2 = toEnum_IntConLevel(spec[2]);
01906 Gecode::sorted(home, x0,x1,x2);
01907 return;
01908 }
01909 #endif
01910 throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::sorted");
01911 }
01912 break;
01913 case 4:
01914 {
01915 #if defined(GECODE_HAS_INT_VARS)
01916 if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
01917 isVarArgs<Gecode::IntVar>(vm, spec[1]) &&
01918 isEnum_IntConLevel(spec[2]) &&
01919 isEnum_PropKind(spec[3]))
01920 {
01921 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
01922 Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
01923 for (int i=a0.size(); i--;)
01924 x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
01925 Gecode::Reflection::ArrayArg& a1 = *spec[1]->toArray();
01926 Gecode::VarArgArray<Gecode::IntVar> x1(a1.size());
01927 for (int i=a1.size(); i--;)
01928 x1[i] = Gecode::IntVar(vm.var(a1[i]->toVar()));
01929 Gecode::IntConLevel x2 = toEnum_IntConLevel(spec[2]);
01930 Gecode::PropKind x3 = toEnum_PropKind(spec[3]);
01931 Gecode::sorted(home, x0,x1,x2,x3);
01932 return;
01933 }
01934 #endif
01935 throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::sorted");
01936 }
01937 break;
01938 default: throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::sorted");
01939 }
01940 }
01941 };
01942
01943 class Register_exactly {
01944 public:
01946 static Gecode::Support::Symbol ati(void) {
01947 return "Gecode::Post::exactly";
01948 }
01949
01951 static void post(Gecode::Space* home, Gecode::Reflection::VarMap& vm,
01952 const Gecode::Reflection::ActorSpec& spec) {
01953 switch(spec.noOfArgs()) {
01954 case 3:
01955 {
01956 #if defined(GECODE_HAS_INT_VARS)
01957 if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
01958 spec[1]->isInt() &&
01959 spec[2]->isInt())
01960 {
01961 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
01962 Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
01963 for (int i=a0.size(); i--;)
01964 x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
01965 int x1 = static_cast<int>(spec[1]->toInt());
01966 int x2 = static_cast<int>(spec[2]->toInt());
01967 Gecode::exactly(home, x0,x1,x2);
01968 return;
01969 }
01970 #endif
01971 #if defined(GECODE_HAS_INT_VARS)
01972 if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
01973 isVar<Gecode::IntVar>(vm, spec[1]) &&
01974 spec[2]->isInt())
01975 {
01976 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
01977 Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
01978 for (int i=a0.size(); i--;)
01979 x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
01980 Gecode::IntVar x1(vm.var(spec[1]->toVar()));
01981 int x2 = static_cast<int>(spec[2]->toInt());
01982 Gecode::exactly(home, x0,x1,x2);
01983 return;
01984 }
01985 #endif
01986 #if defined(GECODE_HAS_INT_VARS)
01987 if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
01988 spec[1]->isIntArray() &&
01989 spec[2]->isInt())
01990 {
01991 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
01992 Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
01993 for (int i=a0.size(); i--;)
01994 x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
01995 Gecode::Reflection::IntArrayArg& a1 = *spec[1]->toIntArray();
01996 Gecode::IntArgs x1(a1.size());
01997 for (int i=a1.size(); i--;) x1[i] = a1[i];
01998 int x2 = static_cast<int>(spec[2]->toInt());
01999 Gecode::exactly(home, x0,x1,x2);
02000 return;
02001 }
02002 #endif
02003 #if defined(GECODE_HAS_INT_VARS)
02004 if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
02005 spec[1]->isInt() &&
02006 isVar<Gecode::IntVar>(vm, spec[2]))
02007 {
02008 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
02009 Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
02010 for (int i=a0.size(); i--;)
02011 x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
02012 int x1 = static_cast<int>(spec[1]->toInt());
02013 Gecode::IntVar x2(vm.var(spec[2]->toVar()));
02014 Gecode::exactly(home, x0,x1,x2);
02015 return;
02016 }
02017 #endif
02018 #if defined(GECODE_HAS_INT_VARS)
02019 if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
02020 isVar<Gecode::IntVar>(vm, spec[1]) &&
02021 isVar<Gecode::IntVar>(vm, spec[2]))
02022 {
02023 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
02024 Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
02025 for (int i=a0.size(); i--;)
02026 x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
02027 Gecode::IntVar x1(vm.var(spec[1]->toVar()));
02028 Gecode::IntVar x2(vm.var(spec[2]->toVar()));
02029 Gecode::exactly(home, x0,x1,x2);
02030 return;
02031 }
02032 #endif
02033 #if defined(GECODE_HAS_INT_VARS)
02034 if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
02035 spec[1]->isIntArray() &&
02036 isVar<Gecode::IntVar>(vm, spec[2]))
02037 {
02038 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
02039 Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
02040 for (int i=a0.size(); i--;)
02041 x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
02042 Gecode::Reflection::IntArrayArg& a1 = *spec[1]->toIntArray();
02043 Gecode::IntArgs x1(a1.size());
02044 for (int i=a1.size(); i--;) x1[i] = a1[i];
02045 Gecode::IntVar x2(vm.var(spec[2]->toVar()));
02046 Gecode::exactly(home, x0,x1,x2);
02047 return;
02048 }
02049 #endif
02050 throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::exactly");
02051 }
02052 break;
02053 case 4:
02054 {
02055 #if defined(GECODE_HAS_INT_VARS)
02056 if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
02057 spec[1]->isInt() &&
02058 spec[2]->isInt() &&
02059 isEnum_IntConLevel(spec[3]))
02060 {
02061 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
02062 Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
02063 for (int i=a0.size(); i--;)
02064 x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
02065 int x1 = static_cast<int>(spec[1]->toInt());
02066 int x2 = static_cast<int>(spec[2]->toInt());
02067 Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
02068 Gecode::exactly(home, x0,x1,x2,x3);
02069 return;
02070 }
02071 #endif
02072 #if defined(GECODE_HAS_INT_VARS)
02073 if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
02074 isVar<Gecode::IntVar>(vm, spec[1]) &&
02075 spec[2]->isInt() &&
02076 isEnum_IntConLevel(spec[3]))
02077 {
02078 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
02079 Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
02080 for (int i=a0.size(); i--;)
02081 x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
02082 Gecode::IntVar x1(vm.var(spec[1]->toVar()));
02083 int x2 = static_cast<int>(spec[2]->toInt());
02084 Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
02085 Gecode::exactly(home, x0,x1,x2,x3);
02086 return;
02087 }
02088 #endif
02089 #if defined(GECODE_HAS_INT_VARS)
02090 if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
02091 spec[1]->isIntArray() &&
02092 spec[2]->isInt() &&
02093 isEnum_IntConLevel(spec[3]))
02094 {
02095 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
02096 Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
02097 for (int i=a0.size(); i--;)
02098 x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
02099 Gecode::Reflection::IntArrayArg& a1 = *spec[1]->toIntArray();
02100 Gecode::IntArgs x1(a1.size());
02101 for (int i=a1.size(); i--;) x1[i] = a1[i];
02102 int x2 = static_cast<int>(spec[2]->toInt());
02103 Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
02104 Gecode::exactly(home, x0,x1,x2,x3);
02105 return;
02106 }
02107 #endif
02108 #if defined(GECODE_HAS_INT_VARS)
02109 if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
02110 spec[1]->isInt() &&
02111 isVar<Gecode::IntVar>(vm, spec[2]) &&
02112 isEnum_IntConLevel(spec[3]))
02113 {
02114 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
02115 Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
02116 for (int i=a0.size(); i--;)
02117 x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
02118 int x1 = static_cast<int>(spec[1]->toInt());
02119 Gecode::IntVar x2(vm.var(spec[2]->toVar()));
02120 Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
02121 Gecode::exactly(home, x0,x1,x2,x3);
02122 return;
02123 }
02124 #endif
02125 #if defined(GECODE_HAS_INT_VARS)
02126 if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
02127 isVar<Gecode::IntVar>(vm, spec[1]) &&
02128 isVar<Gecode::IntVar>(vm, spec[2]) &&
02129 isEnum_IntConLevel(spec[3]))
02130 {
02131 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
02132 Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
02133 for (int i=a0.size(); i--;)
02134 x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
02135 Gecode::IntVar x1(vm.var(spec[1]->toVar()));
02136 Gecode::IntVar x2(vm.var(spec[2]->toVar()));
02137 Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
02138 Gecode::exactly(home, x0,x1,x2,x3);
02139 return;
02140 }
02141 #endif
02142 #if defined(GECODE_HAS_INT_VARS)
02143 if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
02144 spec[1]->isIntArray() &&
02145 isVar<Gecode::IntVar>(vm, spec[2]) &&
02146 isEnum_IntConLevel(spec[3]))
02147 {
02148 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
02149 Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
02150 for (int i=a0.size(); i--;)
02151 x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
02152 Gecode::Reflection::IntArrayArg& a1 = *spec[1]->toIntArray();
02153 Gecode::IntArgs x1(a1.size());
02154 for (int i=a1.size(); i--;) x1[i] = a1[i];
02155 Gecode::IntVar x2(vm.var(spec[2]->toVar()));
02156 Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
02157 Gecode::exactly(home, x0,x1,x2,x3);
02158 return;
02159 }
02160 #endif
02161 throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::exactly");
02162 }
02163 break;
02164 case 5:
02165 {
02166 #if defined(GECODE_HAS_INT_VARS)
02167 if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
02168 spec[1]->isInt() &&
02169 spec[2]->isInt() &&
02170 isEnum_IntConLevel(spec[3]) &&
02171 isEnum_PropKind(spec[4]))
02172 {
02173 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
02174 Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
02175 for (int i=a0.size(); i--;)
02176 x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
02177 int x1 = static_cast<int>(spec[1]->toInt());
02178 int x2 = static_cast<int>(spec[2]->toInt());
02179 Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
02180 Gecode::PropKind x4 = toEnum_PropKind(spec[4]);
02181 Gecode::exactly(home, x0,x1,x2,x3,x4);
02182 return;
02183 }
02184 #endif
02185 #if defined(GECODE_HAS_INT_VARS)
02186 if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
02187 isVar<Gecode::IntVar>(vm, spec[1]) &&
02188 spec[2]->isInt() &&
02189 isEnum_IntConLevel(spec[3]) &&
02190 isEnum_PropKind(spec[4]))
02191 {
02192 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
02193 Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
02194 for (int i=a0.size(); i--;)
02195 x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
02196 Gecode::IntVar x1(vm.var(spec[1]->toVar()));
02197 int x2 = static_cast<int>(spec[2]->toInt());
02198 Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
02199 Gecode::PropKind x4 = toEnum_PropKind(spec[4]);
02200 Gecode::exactly(home, x0,x1,x2,x3,x4);
02201 return;
02202 }
02203 #endif
02204 #if defined(GECODE_HAS_INT_VARS)
02205 if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
02206 spec[1]->isIntArray() &&
02207 spec[2]->isInt() &&
02208 isEnum_IntConLevel(spec[3]) &&
02209 isEnum_PropKind(spec[4]))
02210 {
02211 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
02212 Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
02213 for (int i=a0.size(); i--;)
02214 x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
02215 Gecode::Reflection::IntArrayArg& a1 = *spec[1]->toIntArray();
02216 Gecode::IntArgs x1(a1.size());
02217 for (int i=a1.size(); i--;) x1[i] = a1[i];
02218 int x2 = static_cast<int>(spec[2]->toInt());
02219 Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
02220 Gecode::PropKind x4 = toEnum_PropKind(spec[4]);
02221 Gecode::exactly(home, x0,x1,x2,x3,x4);
02222 return;
02223 }
02224 #endif
02225 #if defined(GECODE_HAS_INT_VARS)
02226 if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
02227 spec[1]->isInt() &&
02228 isVar<Gecode::IntVar>(vm, spec[2]) &&
02229 isEnum_IntConLevel(spec[3]) &&
02230 isEnum_PropKind(spec[4]))
02231 {
02232 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
02233 Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
02234 for (int i=a0.size(); i--;)
02235 x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
02236 int x1 = static_cast<int>(spec[1]->toInt());
02237 Gecode::IntVar x2(vm.var(spec[2]->toVar()));
02238 Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
02239 Gecode::PropKind x4 = toEnum_PropKind(spec[4]);
02240 Gecode::exactly(home, x0,x1,x2,x3,x4);
02241 return;
02242 }
02243 #endif
02244 #if defined(GECODE_HAS_INT_VARS)
02245 if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
02246 isVar<Gecode::IntVar>(vm, spec[1]) &&
02247 isVar<Gecode::IntVar>(vm, spec[2]) &&
02248 isEnum_IntConLevel(spec[3]) &&
02249 isEnum_PropKind(spec[4]))
02250 {
02251 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
02252 Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
02253 for (int i=a0.size(); i--;)
02254 x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
02255 Gecode::IntVar x1(vm.var(spec[1]->toVar()));
02256 Gecode::IntVar x2(vm.var(spec[2]->toVar()));
02257 Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
02258 Gecode::PropKind x4 = toEnum_PropKind(spec[4]);
02259 Gecode::exactly(home, x0,x1,x2,x3,x4);
02260 return;
02261 }
02262 #endif
02263 #if defined(GECODE_HAS_INT_VARS)
02264 if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
02265 spec[1]->isIntArray() &&
02266 isVar<Gecode::IntVar>(vm, spec[2]) &&
02267 isEnum_IntConLevel(spec[3]) &&
02268 isEnum_PropKind(spec[4]))
02269 {
02270 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
02271 Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
02272 for (int i=a0.size(); i--;)
02273 x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
02274 Gecode::Reflection::IntArrayArg& a1 = *spec[1]->toIntArray();
02275 Gecode::IntArgs x1(a1.size());
02276 for (int i=a1.size(); i--;) x1[i] = a1[i];
02277 Gecode::IntVar x2(vm.var(spec[2]->toVar()));
02278 Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
02279 Gecode::PropKind x4 = toEnum_PropKind(spec[4]);
02280 Gecode::exactly(home, x0,x1,x2,x3,x4);
02281 return;
02282 }
02283 #endif
02284 throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::exactly");
02285 }
02286 break;
02287 default: throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::exactly");
02288 }
02289 }
02290 };
02291
02292 class Register_max {
02293 public:
02295 static Gecode::Support::Symbol ati(void) {
02296 return "Gecode::Post::max";
02297 }
02298
02300 static void post(Gecode::Space* home, Gecode::Reflection::VarMap& vm,
02301 const Gecode::Reflection::ActorSpec& spec) {
02302 switch(spec.noOfArgs()) {
02303 case 2:
02304 {
02305 #if defined(GECODE_HAS_INT_VARS)
02306 if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
02307 isVar<Gecode::IntVar>(vm, spec[1]))
02308 {
02309 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
02310 Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
02311 for (int i=a0.size(); i--;)
02312 x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
02313 Gecode::IntVar x1(vm.var(spec[1]->toVar()));
02314 Gecode::max(home, x0,x1);
02315 return;
02316 }
02317 #endif
02318 #if defined(GECODE_HAS_SET_VARS)
02319 if (isVar<Gecode::SetVar>(vm, spec[0]) &&
02320 isVar<Gecode::IntVar>(vm, spec[1]))
02321 {
02322 Gecode::SetVar x0(vm.var(spec[0]->toVar()));
02323 Gecode::IntVar x1(vm.var(spec[1]->toVar()));
02324 Gecode::max(home, x0,x1);
02325 return;
02326 }
02327 #endif
02328 throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::max");
02329 }
02330 break;
02331 case 3:
02332 {
02333 #if defined(GECODE_HAS_INT_VARS)
02334 if (isVar<Gecode::IntVar>(vm, spec[0]) &&
02335 isVar<Gecode::IntVar>(vm, spec[1]) &&
02336 isVar<Gecode::IntVar>(vm, spec[2]))
02337 {
02338 Gecode::IntVar x0(vm.var(spec[0]->toVar()));
02339 Gecode::IntVar x1(vm.var(spec[1]->toVar()));
02340 Gecode::IntVar x2(vm.var(spec[2]->toVar()));
02341 Gecode::max(home, x0,x1,x2);
02342 return;
02343 }
02344 #endif
02345 #if defined(GECODE_HAS_INT_VARS)
02346 if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
02347 isVar<Gecode::IntVar>(vm, spec[1]) &&
02348 isEnum_IntConLevel(spec[2]))
02349 {
02350 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
02351 Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
02352 for (int i=a0.size(); i--;)
02353 x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
02354 Gecode::IntVar x1(vm.var(spec[1]->toVar()));
02355 Gecode::IntConLevel x2 = toEnum_IntConLevel(spec[2]);
02356 Gecode::max(home, x0,x1,x2);
02357 return;
02358 }
02359 #endif
02360 throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::max");
02361 }
02362 break;
02363 case 4:
02364 {
02365 #if defined(GECODE_HAS_INT_VARS)
02366 if (isVar<Gecode::IntVar>(vm, spec[0]) &&
02367 isVar<Gecode::IntVar>(vm, spec[1]) &&
02368 isVar<Gecode::IntVar>(vm, spec[2]) &&
02369 isEnum_IntConLevel(spec[3]))
02370 {
02371 Gecode::IntVar x0(vm.var(spec[0]->toVar()));
02372 Gecode::IntVar x1(vm.var(spec[1]->toVar()));
02373 Gecode::IntVar x2(vm.var(spec[2]->toVar()));
02374 Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
02375 Gecode::max(home, x0,x1,x2,x3);
02376 return;
02377 }
02378 #endif
02379 #if defined(GECODE_HAS_INT_VARS)
02380 if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
02381 isVar<Gecode::IntVar>(vm, spec[1]) &&
02382 isEnum_IntConLevel(spec[2]) &&
02383 isEnum_PropKind(spec[3]))
02384 {
02385 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
02386 Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
02387 for (int i=a0.size(); i--;)
02388 x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
02389 Gecode::IntVar x1(vm.var(spec[1]->toVar()));
02390 Gecode::IntConLevel x2 = toEnum_IntConLevel(spec[2]);
02391 Gecode::PropKind x3 = toEnum_PropKind(spec[3]);
02392 Gecode::max(home, x0,x1,x2,x3);
02393 return;
02394 }
02395 #endif
02396 throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::max");
02397 }
02398 break;
02399 case 5:
02400 {
02401 #if defined(GECODE_HAS_INT_VARS)
02402 if (isVar<Gecode::IntVar>(vm, spec[0]) &&
02403 isVar<Gecode::IntVar>(vm, spec[1]) &&
02404 isVar<Gecode::IntVar>(vm, spec[2]) &&
02405 isEnum_IntConLevel(spec[3]) &&
02406 isEnum_PropKind(spec[4]))
02407 {
02408 Gecode::IntVar x0(vm.var(spec[0]->toVar()));
02409 Gecode::IntVar x1(vm.var(spec[1]->toVar()));
02410 Gecode::IntVar x2(vm.var(spec[2]->toVar()));
02411 Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
02412 Gecode::PropKind x4 = toEnum_PropKind(spec[4]);
02413 Gecode::max(home, x0,x1,x2,x3,x4);
02414 return;
02415 }
02416 #endif
02417 throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::max");
02418 }
02419 break;
02420 default: throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::max");
02421 }
02422 }
02423 };
02424
02425 class Register_divmod {
02426 public:
02428 static Gecode::Support::Symbol ati(void) {
02429 return "Gecode::Post::divmod";
02430 }
02431
02433 static void post(Gecode::Space* home, Gecode::Reflection::VarMap& vm,
02434 const Gecode::Reflection::ActorSpec& spec) {
02435 switch(spec.noOfArgs()) {
02436 case 4:
02437 {
02438 #if defined(GECODE_HAS_INT_VARS)
02439 if (isVar<Gecode::IntVar>(vm, spec[0]) &&
02440 isVar<Gecode::IntVar>(vm, spec[1]) &&
02441 isVar<Gecode::IntVar>(vm, spec[2]) &&
02442 isVar<Gecode::IntVar>(vm, spec[3]))
02443 {
02444 Gecode::IntVar x0(vm.var(spec[0]->toVar()));
02445 Gecode::IntVar x1(vm.var(spec[1]->toVar()));
02446 Gecode::IntVar x2(vm.var(spec[2]->toVar()));
02447 Gecode::IntVar x3(vm.var(spec[3]->toVar()));
02448 Gecode::divmod(home, x0,x1,x2,x3);
02449 return;
02450 }
02451 #endif
02452 throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::divmod");
02453 }
02454 break;
02455 case 5:
02456 {
02457 #if defined(GECODE_HAS_INT_VARS)
02458 if (isVar<Gecode::IntVar>(vm, spec[0]) &&
02459 isVar<Gecode::IntVar>(vm, spec[1]) &&
02460 isVar<Gecode::IntVar>(vm, spec[2]) &&
02461 isVar<Gecode::IntVar>(vm, spec[3]) &&
02462 isEnum_IntConLevel(spec[4]))
02463 {
02464 Gecode::IntVar x0(vm.var(spec[0]->toVar()));
02465 Gecode::IntVar x1(vm.var(spec[1]->toVar()));
02466 Gecode::IntVar x2(vm.var(spec[2]->toVar()));
02467 Gecode::IntVar x3(vm.var(spec[3]->toVar()));
02468 Gecode::IntConLevel x4 = toEnum_IntConLevel(spec[4]);
02469 Gecode::divmod(home, x0,x1,x2,x3,x4);
02470 return;
02471 }
02472 #endif
02473 throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::divmod");
02474 }
02475 break;
02476 case 6:
02477 {
02478 #if defined(GECODE_HAS_INT_VARS)
02479 if (isVar<Gecode::IntVar>(vm, spec[0]) &&
02480 isVar<Gecode::IntVar>(vm, spec[1]) &&
02481 isVar<Gecode::IntVar>(vm, spec[2]) &&
02482 isVar<Gecode::IntVar>(vm, spec[3]) &&
02483 isEnum_IntConLevel(spec[4]) &&
02484 isEnum_PropKind(spec[5]))
02485 {
02486 Gecode::IntVar x0(vm.var(spec[0]->toVar()));
02487 Gecode::IntVar x1(vm.var(spec[1]->toVar()));
02488 Gecode::IntVar x2(vm.var(spec[2]->toVar()));
02489 Gecode::IntVar x3(vm.var(spec[3]->toVar()));
02490 Gecode::IntConLevel x4 = toEnum_IntConLevel(spec[4]);
02491 Gecode::PropKind x5 = toEnum_PropKind(spec[5]);
02492 Gecode::divmod(home, x0,x1,x2,x3,x4,x5);
02493 return;
02494 }
02495 #endif
02496 throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::divmod");
02497 }
02498 break;
02499 default: throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::divmod");
02500 }
02501 }
02502 };
02503
02504 class Register_distinct {
02505 public:
02507 static Gecode::Support::Symbol ati(void) {
02508 return "Gecode::Post::distinct";
02509 }
02510
02512 static void post(Gecode::Space* home, Gecode::Reflection::VarMap& vm,
02513 const Gecode::Reflection::ActorSpec& spec) {
02514 switch(spec.noOfArgs()) {
02515 case 1:
02516 {
02517 #if defined(GECODE_HAS_INT_VARS)
02518 if (isVarArgs<Gecode::IntVar>(vm, spec[0]))
02519 {
02520 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
02521 Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
02522 for (int i=a0.size(); i--;)
02523 x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
02524 Gecode::distinct(home, x0);
02525 return;
02526 }
02527 #endif
02528 throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::distinct");
02529 }
02530 break;
02531 case 2:
02532 {
02533 #if defined(GECODE_HAS_INT_VARS)
02534 if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
02535 isEnum_IntConLevel(spec[1]))
02536 {
02537 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
02538 Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
02539 for (int i=a0.size(); i--;)
02540 x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
02541 Gecode::IntConLevel x1 = toEnum_IntConLevel(spec[1]);
02542 Gecode::distinct(home, x0,x1);
02543 return;
02544 }
02545 #endif
02546 #if defined(GECODE_HAS_INT_VARS)
02547 if (spec[0]->isIntArray() &&
02548 isVarArgs<Gecode::IntVar>(vm, spec[1]))
02549 {
02550 Gecode::Reflection::IntArrayArg& a0 = *spec[0]->toIntArray();
02551 Gecode::IntArgs x0(a0.size());
02552 for (int i=a0.size(); i--;) x0[i] = a0[i];
02553 Gecode::Reflection::ArrayArg& a1 = *spec[1]->toArray();
02554 Gecode::VarArgArray<Gecode::IntVar> x1(a1.size());
02555 for (int i=a1.size(); i--;)
02556 x1[i] = Gecode::IntVar(vm.var(a1[i]->toVar()));
02557 Gecode::distinct(home, x0,x1);
02558 return;
02559 }
02560 #endif
02561 throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::distinct");
02562 }
02563 break;
02564 case 3:
02565 {
02566 #if defined(GECODE_HAS_INT_VARS)
02567 if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
02568 isEnum_IntConLevel(spec[1]) &&
02569 isEnum_PropKind(spec[2]))
02570 {
02571 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
02572 Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
02573 for (int i=a0.size(); i--;)
02574 x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
02575 Gecode::IntConLevel x1 = toEnum_IntConLevel(spec[1]);
02576 Gecode::PropKind x2 = toEnum_PropKind(spec[2]);
02577 Gecode::distinct(home, x0,x1,x2);
02578 return;
02579 }
02580 #endif
02581 #if defined(GECODE_HAS_INT_VARS)
02582 if (spec[0]->isIntArray() &&
02583 isVarArgs<Gecode::IntVar>(vm, spec[1]) &&
02584 isEnum_IntConLevel(spec[2]))
02585 {
02586 Gecode::Reflection::IntArrayArg& a0 = *spec[0]->toIntArray();
02587 Gecode::IntArgs x0(a0.size());
02588 for (int i=a0.size(); i--;) x0[i] = a0[i];
02589 Gecode::Reflection::ArrayArg& a1 = *spec[1]->toArray();
02590 Gecode::VarArgArray<Gecode::IntVar> x1(a1.size());
02591 for (int i=a1.size(); i--;)
02592 x1[i] = Gecode::IntVar(vm.var(a1[i]->toVar()));
02593 Gecode::IntConLevel x2 = toEnum_IntConLevel(spec[2]);
02594 Gecode::distinct(home, x0,x1,x2);
02595 return;
02596 }
02597 #endif
02598 throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::distinct");
02599 }
02600 break;
02601 case 4:
02602 {
02603 #if defined(GECODE_HAS_INT_VARS)
02604 if (spec[0]->isIntArray() &&
02605 isVarArgs<Gecode::IntVar>(vm, spec[1]) &&
02606 isEnum_IntConLevel(spec[2]) &&
02607 isEnum_PropKind(spec[3]))
02608 {
02609 Gecode::Reflection::IntArrayArg& a0 = *spec[0]->toIntArray();
02610 Gecode::IntArgs x0(a0.size());
02611 for (int i=a0.size(); i--;) x0[i] = a0[i];
02612 Gecode::Reflection::ArrayArg& a1 = *spec[1]->toArray();
02613 Gecode::VarArgArray<Gecode::IntVar> x1(a1.size());
02614 for (int i=a1.size(); i--;)
02615 x1[i] = Gecode::IntVar(vm.var(a1[i]->toVar()));
02616 Gecode::IntConLevel x2 = toEnum_IntConLevel(spec[2]);
02617 Gecode::PropKind x3 = toEnum_PropKind(spec[3]);
02618 Gecode::distinct(home, x0,x1,x2,x3);
02619 return;
02620 }
02621 #endif
02622 throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::distinct");
02623 }
02624 break;
02625 default: throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::distinct");
02626 }
02627 }
02628 };
02629
02630 class Register_dom {
02631 public:
02633 static Gecode::Support::Symbol ati(void) {
02634 return "Gecode::Post::dom";
02635 }
02636
02638 static void post(Gecode::Space* home, Gecode::Reflection::VarMap& vm,
02639 const Gecode::Reflection::ActorSpec& spec) {
02640 switch(spec.noOfArgs()) {
02641 case 2:
02642 {
02643 #if defined(GECODE_HAS_INT_VARS)
02644 if (isVar<Gecode::IntVar>(vm, spec[0]) &&
02645 spec[1]->isIntArray())
02646 {
02647 Gecode::IntVar x0(vm.var(spec[0]->toVar()));
02648 Gecode::Reflection::IntArrayArg* a1 = spec[1]->toIntArray();
02649 Gecode::Reflection::IntArrayArgRanges ar1(a1);
02650 Gecode::IntSet x1(ar1);
02651 Gecode::dom(home, x0,x1);
02652 return;
02653 }
02654 #endif
02655 #if defined(GECODE_HAS_INT_VARS)
02656 if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
02657 spec[1]->isIntArray())
02658 {
02659 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
02660 Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
02661 for (int i=a0.size(); i--;)
02662 x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
02663 Gecode::Reflection::IntArrayArg* a1 = spec[1]->toIntArray();
02664 Gecode::Reflection::IntArrayArgRanges ar1(a1);
02665 Gecode::IntSet x1(ar1);
02666 Gecode::dom(home, x0,x1);
02667 return;
02668 }
02669 #endif
02670 throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::dom");
02671 }
02672 break;
02673 case 3:
02674 {
02675 #if defined(GECODE_HAS_INT_VARS)
02676 if (isVar<Gecode::IntVar>(vm, spec[0]) &&
02677 spec[1]->isInt() &&
02678 spec[2]->isInt())
02679 {
02680 Gecode::IntVar x0(vm.var(spec[0]->toVar()));
02681 int x1 = static_cast<int>(spec[1]->toInt());
02682 int x2 = static_cast<int>(spec[2]->toInt());
02683 Gecode::dom(home, x0,x1,x2);
02684 return;
02685 }
02686 #endif
02687 #if defined(GECODE_HAS_INT_VARS)
02688 if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
02689 spec[1]->isInt() &&
02690 spec[2]->isInt())
02691 {
02692 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
02693 Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
02694 for (int i=a0.size(); i--;)
02695 x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
02696 int x1 = static_cast<int>(spec[1]->toInt());
02697 int x2 = static_cast<int>(spec[2]->toInt());
02698 Gecode::dom(home, x0,x1,x2);
02699 return;
02700 }
02701 #endif
02702 #if defined(GECODE_HAS_INT_VARS)
02703 if (isVar<Gecode::IntVar>(vm, spec[0]) &&
02704 spec[1]->isIntArray() &&
02705 isEnum_IntConLevel(spec[2]))
02706 {
02707 Gecode::IntVar x0(vm.var(spec[0]->toVar()));
02708 Gecode::Reflection::IntArrayArg* a1 = spec[1]->toIntArray();
02709 Gecode::Reflection::IntArrayArgRanges ar1(a1);
02710 Gecode::IntSet x1(ar1);
02711 Gecode::IntConLevel x2 = toEnum_IntConLevel(spec[2]);
02712 Gecode::dom(home, x0,x1,x2);
02713 return;
02714 }
02715 #endif
02716 #if defined(GECODE_HAS_INT_VARS)
02717 if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
02718 spec[1]->isIntArray() &&
02719 isEnum_IntConLevel(spec[2]))
02720 {
02721 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
02722 Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
02723 for (int i=a0.size(); i--;)
02724 x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
02725 Gecode::Reflection::IntArrayArg* a1 = spec[1]->toIntArray();
02726 Gecode::Reflection::IntArrayArgRanges ar1(a1);
02727 Gecode::IntSet x1(ar1);
02728 Gecode::IntConLevel x2 = toEnum_IntConLevel(spec[2]);
02729 Gecode::dom(home, x0,x1,x2);
02730 return;
02731 }
02732 #endif
02733 #if defined(GECODE_HAS_INT_VARS)
02734 if (isVar<Gecode::IntVar>(vm, spec[0]) &&
02735 spec[1]->isIntArray() &&
02736 isVar<Gecode::BoolVar>(vm, spec[2]))
02737 {
02738 Gecode::IntVar x0(vm.var(spec[0]->toVar()));
02739 Gecode::Reflection::IntArrayArg* a1 = spec[1]->toIntArray();
02740 Gecode::Reflection::IntArrayArgRanges ar1(a1);
02741 Gecode::IntSet x1(ar1);
02742 Gecode::BoolVar x2(vm.var(spec[2]->toVar()));
02743 Gecode::dom(home, x0,x1,x2);
02744 return;
02745 }
02746 #endif
02747 #if defined(GECODE_HAS_SET_VARS)
02748 if (isVar<Gecode::SetVar>(vm, spec[0]) &&
02749 isEnum_SetRelType(spec[1]) &&
02750 spec[2]->isInt())
02751 {
02752 Gecode::SetVar x0(vm.var(spec[0]->toVar()));
02753 Gecode::SetRelType x1 = toEnum_SetRelType(spec[1]);
02754 int x2 = static_cast<int>(spec[2]->toInt());
02755 Gecode::dom(home, x0,x1,x2);
02756 return;
02757 }
02758 #endif
02759 #if defined(GECODE_HAS_SET_VARS)
02760 if (isVar<Gecode::SetVar>(vm, spec[0]) &&
02761 isEnum_SetRelType(spec[1]) &&
02762 spec[2]->isIntArray())
02763 {
02764 Gecode::SetVar x0(vm.var(spec[0]->toVar()));
02765 Gecode::SetRelType x1 = toEnum_SetRelType(spec[1]);
02766 Gecode::Reflection::IntArrayArg* a2 = spec[2]->toIntArray();
02767 Gecode::Reflection::IntArrayArgRanges ar2(a2);
02768 Gecode::IntSet x2(ar2);
02769 Gecode::dom(home, x0,x1,x2);
02770 return;
02771 }
02772 #endif
02773 throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::dom");
02774 }
02775 break;
02776 case 4:
02777 {
02778 #if defined(GECODE_HAS_INT_VARS)
02779 if (isVar<Gecode::IntVar>(vm, spec[0]) &&
02780 spec[1]->isInt() &&
02781 spec[2]->isInt() &&
02782 isEnum_IntConLevel(spec[3]))
02783 {
02784 Gecode::IntVar x0(vm.var(spec[0]->toVar()));
02785 int x1 = static_cast<int>(spec[1]->toInt());
02786 int x2 = static_cast<int>(spec[2]->toInt());
02787 Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
02788 Gecode::dom(home, x0,x1,x2,x3);
02789 return;
02790 }
02791 #endif
02792 #if defined(GECODE_HAS_INT_VARS)
02793 if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
02794 spec[1]->isInt() &&
02795 spec[2]->isInt() &&
02796 isEnum_IntConLevel(spec[3]))
02797 {
02798 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
02799 Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
02800 for (int i=a0.size(); i--;)
02801 x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
02802 int x1 = static_cast<int>(spec[1]->toInt());
02803 int x2 = static_cast<int>(spec[2]->toInt());
02804 Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
02805 Gecode::dom(home, x0,x1,x2,x3);
02806 return;
02807 }
02808 #endif
02809 #if defined(GECODE_HAS_INT_VARS)
02810 if (isVar<Gecode::IntVar>(vm, spec[0]) &&
02811 spec[1]->isIntArray() &&
02812 isEnum_IntConLevel(spec[2]) &&
02813 isEnum_PropKind(spec[3]))
02814 {
02815 Gecode::IntVar x0(vm.var(spec[0]->toVar()));
02816 Gecode::Reflection::IntArrayArg* a1 = spec[1]->toIntArray();
02817 Gecode::Reflection::IntArrayArgRanges ar1(a1);
02818 Gecode::IntSet x1(ar1);
02819 Gecode::IntConLevel x2 = toEnum_IntConLevel(spec[2]);
02820 Gecode::PropKind x3 = toEnum_PropKind(spec[3]);
02821 Gecode::dom(home, x0,x1,x2,x3);
02822 return;
02823 }
02824 #endif
02825 #if defined(GECODE_HAS_INT_VARS)
02826 if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
02827 spec[1]->isIntArray() &&
02828 isEnum_IntConLevel(spec[2]) &&
02829 isEnum_PropKind(spec[3]))
02830 {
02831 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
02832 Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
02833 for (int i=a0.size(); i--;)
02834 x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
02835 Gecode::Reflection::IntArrayArg* a1 = spec[1]->toIntArray();
02836 Gecode::Reflection::IntArrayArgRanges ar1(a1);
02837 Gecode::IntSet x1(ar1);
02838 Gecode::IntConLevel x2 = toEnum_IntConLevel(spec[2]);
02839 Gecode::PropKind x3 = toEnum_PropKind(spec[3]);
02840 Gecode::dom(home, x0,x1,x2,x3);
02841 return;
02842 }
02843 #endif
02844 #if defined(GECODE_HAS_INT_VARS)
02845 if (isVar<Gecode::IntVar>(vm, spec[0]) &&
02846 spec[1]->isInt() &&
02847 spec[2]->isInt() &&
02848 isVar<Gecode::BoolVar>(vm, spec[3]))
02849 {
02850 Gecode::IntVar x0(vm.var(spec[0]->toVar()));
02851 int x1 = static_cast<int>(spec[1]->toInt());
02852 int x2 = static_cast<int>(spec[2]->toInt());
02853 Gecode::BoolVar x3(vm.var(spec[3]->toVar()));
02854 Gecode::dom(home, x0,x1,x2,x3);
02855 return;
02856 }
02857 #endif
02858 #if defined(GECODE_HAS_INT_VARS)
02859 if (isVar<Gecode::IntVar>(vm, spec[0]) &&
02860 spec[1]->isIntArray() &&
02861 isVar<Gecode::BoolVar>(vm, spec[2]) &&
02862 isEnum_IntConLevel(spec[3]))
02863 {
02864 Gecode::IntVar x0(vm.var(spec[0]->toVar()));
02865 Gecode::Reflection::IntArrayArg* a1 = spec[1]->toIntArray();
02866 Gecode::Reflection::IntArrayArgRanges ar1(a1);
02867 Gecode::IntSet x1(ar1);
02868 Gecode::BoolVar x2(vm.var(spec[2]->toVar()));
02869 Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
02870 Gecode::dom(home, x0,x1,x2,x3);
02871 return;
02872 }
02873 #endif
02874 #if defined(GECODE_HAS_SET_VARS)
02875 if (isVar<Gecode::SetVar>(vm, spec[0]) &&
02876 isEnum_SetRelType(spec[1]) &&
02877 spec[2]->isInt() &&
02878 spec[3]->isInt())
02879 {
02880 Gecode::SetVar x0(vm.var(spec[0]->toVar()));
02881 Gecode::SetRelType x1 = toEnum_SetRelType(spec[1]);
02882 int x2 = static_cast<int>(spec[2]->toInt());
02883 int x3 = static_cast<int>(spec[3]->toInt());
02884 Gecode::dom(home, x0,x1,x2,x3);
02885 return;
02886 }
02887 #endif
02888 #if defined(GECODE_HAS_SET_VARS)
02889 if (isVar<Gecode::SetVar>(vm, spec[0]) &&
02890 isEnum_SetRelType(spec[1]) &&
02891 spec[2]->isInt() &&
02892 isVar<Gecode::BoolVar>(vm, spec[3]))
02893 {
02894 Gecode::SetVar x0(vm.var(spec[0]->toVar()));
02895 Gecode::SetRelType x1 = toEnum_SetRelType(spec[1]);
02896 int x2 = static_cast<int>(spec[2]->toInt());
02897 Gecode::BoolVar x3(vm.var(spec[3]->toVar()));
02898 Gecode::dom(home, x0,x1,x2,x3);
02899 return;
02900 }
02901 #endif
02902 #if defined(GECODE_HAS_SET_VARS)
02903 if (isVar<Gecode::SetVar>(vm, spec[0]) &&
02904 isEnum_SetRelType(spec[1]) &&
02905 spec[2]->isIntArray() &&
02906 isVar<Gecode::BoolVar>(vm, spec[3]))
02907 {
02908 Gecode::SetVar x0(vm.var(spec[0]->toVar()));
02909 Gecode::SetRelType x1 = toEnum_SetRelType(spec[1]);
02910 Gecode::Reflection::IntArrayArg* a2 = spec[2]->toIntArray();
02911 Gecode::Reflection::IntArrayArgRanges ar2(a2);
02912 Gecode::IntSet x2(ar2);
02913 Gecode::BoolVar x3(vm.var(spec[3]->toVar()));
02914 Gecode::dom(home, x0,x1,x2,x3);
02915 return;
02916 }
02917 #endif
02918 throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::dom");
02919 }
02920 break;
02921 case 5:
02922 {
02923 #if defined(GECODE_HAS_INT_VARS)
02924 if (isVar<Gecode::IntVar>(vm, spec[0]) &&
02925 spec[1]->isInt() &&
02926 spec[2]->isInt() &&
02927 isEnum_IntConLevel(spec[3]) &&
02928 isEnum_PropKind(spec[4]))
02929 {
02930 Gecode::IntVar x0(vm.var(spec[0]->toVar()));
02931 int x1 = static_cast<int>(spec[1]->toInt());
02932 int x2 = static_cast<int>(spec[2]->toInt());
02933 Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
02934 Gecode::PropKind x4 = toEnum_PropKind(spec[4]);
02935 Gecode::dom(home, x0,x1,x2,x3,x4);
02936 return;
02937 }
02938 #endif
02939 #if defined(GECODE_HAS_INT_VARS)
02940 if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
02941 spec[1]->isInt() &&
02942 spec[2]->isInt() &&
02943 isEnum_IntConLevel(spec[3]) &&
02944 isEnum_PropKind(spec[4]))
02945 {
02946 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
02947 Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
02948 for (int i=a0.size(); i--;)
02949 x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
02950 int x1 = static_cast<int>(spec[1]->toInt());
02951 int x2 = static_cast<int>(spec[2]->toInt());
02952 Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
02953 Gecode::PropKind x4 = toEnum_PropKind(spec[4]);
02954 Gecode::dom(home, x0,x1,x2,x3,x4);
02955 return;
02956 }
02957 #endif
02958 #if defined(GECODE_HAS_INT_VARS)
02959 if (isVar<Gecode::IntVar>(vm, spec[0]) &&
02960 spec[1]->isInt() &&
02961 spec[2]->isInt() &&
02962 isVar<Gecode::BoolVar>(vm, spec[3]) &&
02963 isEnum_IntConLevel(spec[4]))
02964 {
02965 Gecode::IntVar x0(vm.var(spec[0]->toVar()));
02966 int x1 = static_cast<int>(spec[1]->toInt());
02967 int x2 = static_cast<int>(spec[2]->toInt());
02968 Gecode::BoolVar x3(vm.var(spec[3]->toVar()));
02969 Gecode::IntConLevel x4 = toEnum_IntConLevel(spec[4]);
02970 Gecode::dom(home, x0,x1,x2,x3,x4);
02971 return;
02972 }
02973 #endif
02974 #if defined(GECODE_HAS_INT_VARS)
02975 if (isVar<Gecode::IntVar>(vm, spec[0]) &&
02976 spec[1]->isIntArray() &&
02977 isVar<Gecode::BoolVar>(vm, spec[2]) &&
02978 isEnum_IntConLevel(spec[3]) &&
02979 isEnum_PropKind(spec[4]))
02980 {
02981 Gecode::IntVar x0(vm.var(spec[0]->toVar()));
02982 Gecode::Reflection::IntArrayArg* a1 = spec[1]->toIntArray();
02983 Gecode::Reflection::IntArrayArgRanges ar1(a1);
02984 Gecode::IntSet x1(ar1);
02985 Gecode::BoolVar x2(vm.var(spec[2]->toVar()));
02986 Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
02987 Gecode::PropKind x4 = toEnum_PropKind(spec[4]);
02988 Gecode::dom(home, x0,x1,x2,x3,x4);
02989 return;
02990 }
02991 #endif
02992 #if defined(GECODE_HAS_SET_VARS)
02993 if (isVar<Gecode::SetVar>(vm, spec[0]) &&
02994 isEnum_SetRelType(spec[1]) &&
02995 spec[2]->isInt() &&
02996 spec[3]->isInt() &&
02997 isVar<Gecode::BoolVar>(vm, spec[4]))
02998 {
02999 Gecode::SetVar x0(vm.var(spec[0]->toVar()));
03000 Gecode::SetRelType x1 = toEnum_SetRelType(spec[1]);
03001 int x2 = static_cast<int>(spec[2]->toInt());
03002 int x3 = static_cast<int>(spec[3]->toInt());
03003 Gecode::BoolVar x4(vm.var(spec[4]->toVar()));
03004 Gecode::dom(home, x0,x1,x2,x3,x4);
03005 return;
03006 }
03007 #endif
03008 throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::dom");
03009 }
03010 break;
03011 case 6:
03012 {
03013 #if defined(GECODE_HAS_INT_VARS)
03014 if (isVar<Gecode::IntVar>(vm, spec[0]) &&
03015 spec[1]->isInt() &&
03016 spec[2]->isInt() &&
03017 isVar<Gecode::BoolVar>(vm, spec[3]) &&
03018 isEnum_IntConLevel(spec[4]) &&
03019 isEnum_PropKind(spec[5]))
03020 {
03021 Gecode::IntVar x0(vm.var(spec[0]->toVar()));
03022 int x1 = static_cast<int>(spec[1]->toInt());
03023 int x2 = static_cast<int>(spec[2]->toInt());
03024 Gecode::BoolVar x3(vm.var(spec[3]->toVar()));
03025 Gecode::IntConLevel x4 = toEnum_IntConLevel(spec[4]);
03026 Gecode::PropKind x5 = toEnum_PropKind(spec[5]);
03027 Gecode::dom(home, x0,x1,x2,x3,x4,x5);
03028 return;
03029 }
03030 #endif
03031 throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::dom");
03032 }
03033 break;
03034 default: throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::dom");
03035 }
03036 }
03037 };
03038
03039 class Register_count {
03040 public:
03042 static Gecode::Support::Symbol ati(void) {
03043 return "Gecode::Post::count";
03044 }
03045
03047 static void post(Gecode::Space* home, Gecode::Reflection::VarMap& vm,
03048 const Gecode::Reflection::ActorSpec& spec) {
03049 switch(spec.noOfArgs()) {
03050 case 2:
03051 {
03052 #if defined(GECODE_HAS_INT_VARS)
03053 if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
03054 isVarArgs<Gecode::IntVar>(vm, spec[1]))
03055 {
03056 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
03057 Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
03058 for (int i=a0.size(); i--;)
03059 x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
03060 Gecode::Reflection::ArrayArg& a1 = *spec[1]->toArray();
03061 Gecode::VarArgArray<Gecode::IntVar> x1(a1.size());
03062 for (int i=a1.size(); i--;)
03063 x1[i] = Gecode::IntVar(vm.var(a1[i]->toVar()));
03064 Gecode::count(home, x0,x1);
03065 return;
03066 }
03067 #endif
03068 #if defined(GECODE_HAS_INT_VARS)
03069 if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
03070 isIntSetArgs(spec[1]))
03071 {
03072 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
03073 Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
03074 for (int i=a0.size(); i--;)
03075 x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
03076 Gecode::Reflection::ArrayArg& a1 = *spec[1]->toArray();
03077 Gecode::IntSetArgs x1(a1.size());
03078 for (int i=a1.size(); i--;) {
03079 Gecode::Reflection::IntArrayArg* aa1 = a1[i]->toIntArray();
03080 Gecode::Reflection::IntArrayArgRanges aar1(aa1);
03081 x1[i] = Gecode::IntSet(aar1);
03082 }
03083 Gecode::count(home, x0,x1);
03084 return;
03085 }
03086 #endif
03087 throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::count");
03088 }
03089 break;
03090 case 3:
03091 {
03092 #if defined(GECODE_HAS_INT_VARS)
03093 if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
03094 isVarArgs<Gecode::IntVar>(vm, spec[1]) &&
03095 isEnum_IntConLevel(spec[2]))
03096 {
03097 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
03098 Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
03099 for (int i=a0.size(); i--;)
03100 x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
03101 Gecode::Reflection::ArrayArg& a1 = *spec[1]->toArray();
03102 Gecode::VarArgArray<Gecode::IntVar> x1(a1.size());
03103 for (int i=a1.size(); i--;)
03104 x1[i] = Gecode::IntVar(vm.var(a1[i]->toVar()));
03105 Gecode::IntConLevel x2 = toEnum_IntConLevel(spec[2]);
03106 Gecode::count(home, x0,x1,x2);
03107 return;
03108 }
03109 #endif
03110 #if defined(GECODE_HAS_INT_VARS)
03111 if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
03112 isIntSetArgs(spec[1]) &&
03113 isEnum_IntConLevel(spec[2]))
03114 {
03115 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
03116 Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
03117 for (int i=a0.size(); i--;)
03118 x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
03119 Gecode::Reflection::ArrayArg& a1 = *spec[1]->toArray();
03120 Gecode::IntSetArgs x1(a1.size());
03121 for (int i=a1.size(); i--;) {
03122 Gecode::Reflection::IntArrayArg* aa1 = a1[i]->toIntArray();
03123 Gecode::Reflection::IntArrayArgRanges aar1(aa1);
03124 x1[i] = Gecode::IntSet(aar1);
03125 }
03126 Gecode::IntConLevel x2 = toEnum_IntConLevel(spec[2]);
03127 Gecode::count(home, x0,x1,x2);
03128 return;
03129 }
03130 #endif
03131 #if defined(GECODE_HAS_INT_VARS)
03132 if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
03133 isVarArgs<Gecode::IntVar>(vm, spec[1]) &&
03134 spec[2]->isIntArray())
03135 {
03136 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
03137 Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
03138 for (int i=a0.size(); i--;)
03139 x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
03140 Gecode::Reflection::ArrayArg& a1 = *spec[1]->toArray();
03141 Gecode::VarArgArray<Gecode::IntVar> x1(a1.size());
03142 for (int i=a1.size(); i--;)
03143 x1[i] = Gecode::IntVar(vm.var(a1[i]->toVar()));
03144 Gecode::Reflection::IntArrayArg& a2 = *spec[2]->toIntArray();
03145 Gecode::IntArgs x2(a2.size());
03146 for (int i=a2.size(); i--;) x2[i] = a2[i];
03147 Gecode::count(home, x0,x1,x2);
03148 return;
03149 }
03150 #endif
03151 #if defined(GECODE_HAS_INT_VARS)
03152 if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
03153 isIntSetArgs(spec[1]) &&
03154 spec[2]->isIntArray())
03155 {
03156 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
03157 Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
03158 for (int i=a0.size(); i--;)
03159 x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
03160 Gecode::Reflection::ArrayArg& a1 = *spec[1]->toArray();
03161 Gecode::IntSetArgs x1(a1.size());
03162 for (int i=a1.size(); i--;) {
03163 Gecode::Reflection::IntArrayArg* aa1 = a1[i]->toIntArray();
03164 Gecode::Reflection::IntArrayArgRanges aar1(aa1);
03165 x1[i] = Gecode::IntSet(aar1);
03166 }
03167 Gecode::Reflection::IntArrayArg& a2 = *spec[2]->toIntArray();
03168 Gecode::IntArgs x2(a2.size());
03169 for (int i=a2.size(); i--;) x2[i] = a2[i];
03170 Gecode::count(home, x0,x1,x2);
03171 return;
03172 }
03173 #endif
03174 #if defined(GECODE_HAS_INT_VARS)
03175 if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
03176 spec[1]->isIntArray() &&
03177 spec[2]->isIntArray())
03178 {
03179 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
03180 Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
03181 for (int i=a0.size(); i--;)
03182 x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
03183 Gecode::Reflection::IntArrayArg* a1 = spec[1]->toIntArray();
03184 Gecode::Reflection::IntArrayArgRanges ar1(a1);
03185 Gecode::IntSet x1(ar1);
03186 Gecode::Reflection::IntArrayArg& a2 = *spec[2]->toIntArray();
03187 Gecode::IntArgs x2(a2.size());
03188 for (int i=a2.size(); i--;) x2[i] = a2[i];
03189 Gecode::count(home, x0,x1,x2);
03190 return;
03191 }
03192 #endif
03193 throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::count");
03194 }
03195 break;
03196 case 4:
03197 {
03198 #if defined(GECODE_HAS_INT_VARS)
03199 if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
03200 spec[1]->isInt() &&
03201 isEnum_IntRelType(spec[2]) &&
03202 spec[3]->isInt())
03203 {
03204 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
03205 Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
03206 for (int i=a0.size(); i--;)
03207 x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
03208 int x1 = static_cast<int>(spec[1]->toInt());
03209 Gecode::IntRelType x2 = toEnum_IntRelType(spec[2]);
03210 int x3 = static_cast<int>(spec[3]->toInt());
03211 Gecode::count(home, x0,x1,x2,x3);
03212 return;
03213 }
03214 #endif
03215 #if defined(GECODE_HAS_INT_VARS)
03216 if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
03217 isVar<Gecode::IntVar>(vm, spec[1]) &&
03218 isEnum_IntRelType(spec[2]) &&
03219 spec[3]->isInt())
03220 {
03221 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
03222 Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
03223 for (int i=a0.size(); i--;)
03224 x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
03225 Gecode::IntVar x1(vm.var(spec[1]->toVar()));
03226 Gecode::IntRelType x2 = toEnum_IntRelType(spec[2]);
03227 int x3 = static_cast<int>(spec[3]->toInt());
03228 Gecode::count(home, x0,x1,x2,x3);
03229 return;
03230 }
03231 #endif
03232 #if defined(GECODE_HAS_INT_VARS)
03233 if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
03234 spec[1]->isIntArray() &&
03235 isEnum_IntRelType(spec[2]) &&
03236 spec[3]->isInt())
03237 {
03238 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
03239 Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
03240 for (int i=a0.size(); i--;)
03241 x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
03242 Gecode::Reflection::IntArrayArg& a1 = *spec[1]->toIntArray();
03243 Gecode::IntArgs x1(a1.size());
03244 for (int i=a1.size(); i--;) x1[i] = a1[i];
03245 Gecode::IntRelType x2 = toEnum_IntRelType(spec[2]);
03246 int x3 = static_cast<int>(spec[3]->toInt());
03247 Gecode::count(home, x0,x1,x2,x3);
03248 return;
03249 }
03250 #endif
03251 #if defined(GECODE_HAS_INT_VARS)
03252 if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
03253 spec[1]->isInt() &&
03254 isEnum_IntRelType(spec[2]) &&
03255 isVar<Gecode::IntVar>(vm, spec[3]))
03256 {
03257 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
03258 Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
03259 for (int i=a0.size(); i--;)
03260 x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
03261 int x1 = static_cast<int>(spec[1]->toInt());
03262 Gecode::IntRelType x2 = toEnum_IntRelType(spec[2]);
03263 Gecode::IntVar x3(vm.var(spec[3]->toVar()));
03264 Gecode::count(home, x0,x1,x2,x3);
03265 return;
03266 }
03267 #endif
03268 #if defined(GECODE_HAS_INT_VARS)
03269 if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
03270 isVar<Gecode::IntVar>(vm, spec[1]) &&
03271 isEnum_IntRelType(spec[2]) &&
03272 isVar<Gecode::IntVar>(vm, spec[3]))
03273 {
03274 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
03275 Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
03276 for (int i=a0.size(); i--;)
03277 x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
03278 Gecode::IntVar x1(vm.var(spec[1]->toVar()));
03279 Gecode::IntRelType x2 = toEnum_IntRelType(spec[2]);
03280 Gecode::IntVar x3(vm.var(spec[3]->toVar()));
03281 Gecode::count(home, x0,x1,x2,x3);
03282 return;
03283 }
03284 #endif
03285 #if defined(GECODE_HAS_INT_VARS)
03286 if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
03287 spec[1]->isIntArray() &&
03288 isEnum_IntRelType(spec[2]) &&
03289 isVar<Gecode::IntVar>(vm, spec[3]))
03290 {
03291 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
03292 Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
03293 for (int i=a0.size(); i--;)
03294 x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
03295 Gecode::Reflection::IntArrayArg& a1 = *spec[1]->toIntArray();
03296 Gecode::IntArgs x1(a1.size());
03297 for (int i=a1.size(); i--;) x1[i] = a1[i];
03298 Gecode::IntRelType x2 = toEnum_IntRelType(spec[2]);
03299 Gecode::IntVar x3(vm.var(spec[3]->toVar()));
03300 Gecode::count(home, x0,x1,x2,x3);
03301 return;
03302 }
03303 #endif
03304 #if defined(GECODE_HAS_INT_VARS)
03305 if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
03306 isVarArgs<Gecode::IntVar>(vm, spec[1]) &&
03307 isEnum_IntConLevel(spec[2]) &&
03308 isEnum_PropKind(spec[3]))
03309 {
03310 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
03311 Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
03312 for (int i=a0.size(); i--;)
03313 x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
03314 Gecode::Reflection::ArrayArg& a1 = *spec[1]->toArray();
03315 Gecode::VarArgArray<Gecode::IntVar> x1(a1.size());
03316 for (int i=a1.size(); i--;)
03317 x1[i] = Gecode::IntVar(vm.var(a1[i]->toVar()));
03318 Gecode::IntConLevel x2 = toEnum_IntConLevel(spec[2]);
03319 Gecode::PropKind x3 = toEnum_PropKind(spec[3]);
03320 Gecode::count(home, x0,x1,x2,x3);
03321 return;
03322 }
03323 #endif
03324 #if defined(GECODE_HAS_INT_VARS)
03325 if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
03326 isIntSetArgs(spec[1]) &&
03327 isEnum_IntConLevel(spec[2]) &&
03328 isEnum_PropKind(spec[3]))
03329 {
03330 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
03331 Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
03332 for (int i=a0.size(); i--;)
03333 x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
03334 Gecode::Reflection::ArrayArg& a1 = *spec[1]->toArray();
03335 Gecode::IntSetArgs x1(a1.size());
03336 for (int i=a1.size(); i--;) {
03337 Gecode::Reflection::IntArrayArg* aa1 = a1[i]->toIntArray();
03338 Gecode::Reflection::IntArrayArgRanges aar1(aa1);
03339 x1[i] = Gecode::IntSet(aar1);
03340 }
03341 Gecode::IntConLevel x2 = toEnum_IntConLevel(spec[2]);
03342 Gecode::PropKind x3 = toEnum_PropKind(spec[3]);
03343 Gecode::count(home, x0,x1,x2,x3);
03344 return;
03345 }
03346 #endif
03347 #if defined(GECODE_HAS_INT_VARS)
03348 if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
03349 isVarArgs<Gecode::IntVar>(vm, spec[1]) &&
03350 spec[2]->isIntArray() &&
03351 isEnum_IntConLevel(spec[3]))
03352 {
03353 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
03354 Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
03355 for (int i=a0.size(); i--;)
03356 x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
03357 Gecode::Reflection::ArrayArg& a1 = *spec[1]->toArray();
03358 Gecode::VarArgArray<Gecode::IntVar> x1(a1.size());
03359 for (int i=a1.size(); i--;)
03360 x1[i] = Gecode::IntVar(vm.var(a1[i]->toVar()));
03361 Gecode::Reflection::IntArrayArg& a2 = *spec[2]->toIntArray();
03362 Gecode::IntArgs x2(a2.size());
03363 for (int i=a2.size(); i--;) x2[i] = a2[i];
03364 Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
03365 Gecode::count(home, x0,x1,x2,x3);
03366 return;
03367 }
03368 #endif
03369 #if defined(GECODE_HAS_INT_VARS)
03370 if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
03371 isIntSetArgs(spec[1]) &&
03372 spec[2]->isIntArray() &&
03373 isEnum_IntConLevel(spec[3]))
03374 {
03375 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
03376 Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
03377 for (int i=a0.size(); i--;)
03378 x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
03379 Gecode::Reflection::ArrayArg& a1 = *spec[1]->toArray();
03380 Gecode::IntSetArgs x1(a1.size());
03381 for (int i=a1.size(); i--;) {
03382 Gecode::Reflection::IntArrayArg* aa1 = a1[i]->toIntArray();
03383 Gecode::Reflection::IntArrayArgRanges aar1(aa1);
03384 x1[i] = Gecode::IntSet(aar1);
03385 }
03386 Gecode::Reflection::IntArrayArg& a2 = *spec[2]->toIntArray();
03387 Gecode::IntArgs x2(a2.size());
03388 for (int i=a2.size(); i--;) x2[i] = a2[i];
03389 Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
03390 Gecode::count(home, x0,x1,x2,x3);
03391 return;
03392 }
03393 #endif
03394 #if defined(GECODE_HAS_INT_VARS)
03395 if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
03396 spec[1]->isIntArray() &&
03397 spec[2]->isIntArray() &&
03398 isEnum_IntConLevel(spec[3]))
03399 {
03400 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
03401 Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
03402 for (int i=a0.size(); i--;)
03403 x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
03404 Gecode::Reflection::IntArrayArg* a1 = spec[1]->toIntArray();
03405 Gecode::Reflection::IntArrayArgRanges ar1(a1);
03406 Gecode::IntSet x1(ar1);
03407 Gecode::Reflection::IntArrayArg& a2 = *spec[2]->toIntArray();
03408 Gecode::IntArgs x2(a2.size());
03409 for (int i=a2.size(); i--;) x2[i] = a2[i];
03410 Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
03411 Gecode::count(home, x0,x1,x2,x3);
03412 return;
03413 }
03414 #endif
03415 throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::count");
03416 }
03417 break;
03418 case 5:
03419 {
03420 #if defined(GECODE_HAS_INT_VARS)
03421 if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
03422 spec[1]->isInt() &&
03423 isEnum_IntRelType(spec[2]) &&
03424 spec[3]->isInt() &&
03425 isEnum_IntConLevel(spec[4]))
03426 {
03427 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
03428 Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
03429 for (int i=a0.size(); i--;)
03430 x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
03431 int x1 = static_cast<int>(spec[1]->toInt());
03432 Gecode::IntRelType x2 = toEnum_IntRelType(spec[2]);
03433 int x3 = static_cast<int>(spec[3]->toInt());
03434 Gecode::IntConLevel x4 = toEnum_IntConLevel(spec[4]);
03435 Gecode::count(home, x0,x1,x2,x3,x4);
03436 return;
03437 }
03438 #endif
03439 #if defined(GECODE_HAS_INT_VARS)
03440 if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
03441 isVar<Gecode::IntVar>(vm, spec[1]) &&
03442 isEnum_IntRelType(spec[2]) &&
03443 spec[3]->isInt() &&
03444 isEnum_IntConLevel(spec[4]))
03445 {
03446 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
03447 Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
03448 for (int i=a0.size(); i--;)
03449 x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
03450 Gecode::IntVar x1(vm.var(spec[1]->toVar()));
03451 Gecode::IntRelType x2 = toEnum_IntRelType(spec[2]);
03452 int x3 = static_cast<int>(spec[3]->toInt());
03453 Gecode::IntConLevel x4 = toEnum_IntConLevel(spec[4]);
03454 Gecode::count(home, x0,x1,x2,x3,x4);
03455 return;
03456 }
03457 #endif
03458 #if defined(GECODE_HAS_INT_VARS)
03459 if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
03460 spec[1]->isIntArray() &&
03461 isEnum_IntRelType(spec[2]) &&
03462 spec[3]->isInt() &&
03463 isEnum_IntConLevel(spec[4]))
03464 {
03465 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
03466 Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
03467 for (int i=a0.size(); i--;)
03468 x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
03469 Gecode::Reflection::IntArrayArg& a1 = *spec[1]->toIntArray();
03470 Gecode::IntArgs x1(a1.size());
03471 for (int i=a1.size(); i--;) x1[i] = a1[i];
03472 Gecode::IntRelType x2 = toEnum_IntRelType(spec[2]);
03473 int x3 = static_cast<int>(spec[3]->toInt());
03474 Gecode::IntConLevel x4 = toEnum_IntConLevel(spec[4]);
03475 Gecode::count(home, x0,x1,x2,x3,x4);
03476 return;
03477 }
03478 #endif
03479 #if defined(GECODE_HAS_INT_VARS)
03480 if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
03481 spec[1]->isInt() &&
03482 isEnum_IntRelType(spec[2]) &&
03483 isVar<Gecode::IntVar>(vm, spec[3]) &&
03484 isEnum_IntConLevel(spec[4]))
03485 {
03486 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
03487 Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
03488 for (int i=a0.size(); i--;)
03489 x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
03490 int x1 = static_cast<int>(spec[1]->toInt());
03491 Gecode::IntRelType x2 = toEnum_IntRelType(spec[2]);
03492 Gecode::IntVar x3(vm.var(spec[3]->toVar()));
03493 Gecode::IntConLevel x4 = toEnum_IntConLevel(spec[4]);
03494 Gecode::count(home, x0,x1,x2,x3,x4);
03495 return;
03496 }
03497 #endif
03498 #if defined(GECODE_HAS_INT_VARS)
03499 if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
03500 isVar<Gecode::IntVar>(vm, spec[1]) &&
03501 isEnum_IntRelType(spec[2]) &&
03502 isVar<Gecode::IntVar>(vm, spec[3]) &&
03503 isEnum_IntConLevel(spec[4]))
03504 {
03505 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
03506 Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
03507 for (int i=a0.size(); i--;)
03508 x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
03509 Gecode::IntVar x1(vm.var(spec[1]->toVar()));
03510 Gecode::IntRelType x2 = toEnum_IntRelType(spec[2]);
03511 Gecode::IntVar x3(vm.var(spec[3]->toVar()));
03512 Gecode::IntConLevel x4 = toEnum_IntConLevel(spec[4]);
03513 Gecode::count(home, x0,x1,x2,x3,x4);
03514 return;
03515 }
03516 #endif
03517 #if defined(GECODE_HAS_INT_VARS)
03518 if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
03519 spec[1]->isIntArray() &&
03520 isEnum_IntRelType(spec[2]) &&
03521 isVar<Gecode::IntVar>(vm, spec[3]) &&
03522 isEnum_IntConLevel(spec[4]))
03523 {
03524 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
03525 Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
03526 for (int i=a0.size(); i--;)
03527 x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
03528 Gecode::Reflection::IntArrayArg& a1 = *spec[1]->toIntArray();
03529 Gecode::IntArgs x1(a1.size());
03530 for (int i=a1.size(); i--;) x1[i] = a1[i];
03531 Gecode::IntRelType x2 = toEnum_IntRelType(spec[2]);
03532 Gecode::IntVar x3(vm.var(spec[3]->toVar()));
03533 Gecode::IntConLevel x4 = toEnum_IntConLevel(spec[4]);
03534 Gecode::count(home, x0,x1,x2,x3,x4);
03535 return;
03536 }
03537 #endif
03538 #if defined(GECODE_HAS_INT_VARS)
03539 if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
03540 isVarArgs<Gecode::IntVar>(vm, spec[1]) &&
03541 spec[2]->isIntArray() &&
03542 isEnum_IntConLevel(spec[3]) &&
03543 isEnum_PropKind(spec[4]))
03544 {
03545 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
03546 Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
03547 for (int i=a0.size(); i--;)
03548 x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
03549 Gecode::Reflection::ArrayArg& a1 = *spec[1]->toArray();
03550 Gecode::VarArgArray<Gecode::IntVar> x1(a1.size());
03551 for (int i=a1.size(); i--;)
03552 x1[i] = Gecode::IntVar(vm.var(a1[i]->toVar()));
03553 Gecode::Reflection::IntArrayArg& a2 = *spec[2]->toIntArray();
03554 Gecode::IntArgs x2(a2.size());
03555 for (int i=a2.size(); i--;) x2[i] = a2[i];
03556 Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
03557 Gecode::PropKind x4 = toEnum_PropKind(spec[4]);
03558 Gecode::count(home, x0,x1,x2,x3,x4);
03559 return;
03560 }
03561 #endif
03562 #if defined(GECODE_HAS_INT_VARS)
03563 if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
03564 isIntSetArgs(spec[1]) &&
03565 spec[2]->isIntArray() &&
03566 isEnum_IntConLevel(spec[3]) &&
03567 isEnum_PropKind(spec[4]))
03568 {
03569 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
03570 Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
03571 for (int i=a0.size(); i--;)
03572 x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
03573 Gecode::Reflection::ArrayArg& a1 = *spec[1]->toArray();
03574 Gecode::IntSetArgs x1(a1.size());
03575 for (int i=a1.size(); i--;) {
03576 Gecode::Reflection::IntArrayArg* aa1 = a1[i]->toIntArray();
03577 Gecode::Reflection::IntArrayArgRanges aar1(aa1);
03578 x1[i] = Gecode::IntSet(aar1);
03579 }
03580 Gecode::Reflection::IntArrayArg& a2 = *spec[2]->toIntArray();
03581 Gecode::IntArgs x2(a2.size());
03582 for (int i=a2.size(); i--;) x2[i] = a2[i];
03583 Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
03584 Gecode::PropKind x4 = toEnum_PropKind(spec[4]);
03585 Gecode::count(home, x0,x1,x2,x3,x4);
03586 return;
03587 }
03588 #endif
03589 #if defined(GECODE_HAS_INT_VARS)
03590 if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
03591 spec[1]->isIntArray() &&
03592 spec[2]->isIntArray() &&
03593 isEnum_IntConLevel(spec[3]) &&
03594 isEnum_PropKind(spec[4]))
03595 {
03596 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
03597 Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
03598 for (int i=a0.size(); i--;)
03599 x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
03600 Gecode::Reflection::IntArrayArg* a1 = spec[1]->toIntArray();
03601 Gecode::Reflection::IntArrayArgRanges ar1(a1);
03602 Gecode::IntSet x1(ar1);
03603 Gecode::Reflection::IntArrayArg& a2 = *spec[2]->toIntArray();
03604 Gecode::IntArgs x2(a2.size());
03605 for (int i=a2.size(); i--;) x2[i] = a2[i];
03606 Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
03607 Gecode::PropKind x4 = toEnum_PropKind(spec[4]);
03608 Gecode::count(home, x0,x1,x2,x3,x4);
03609 return;
03610 }
03611 #endif
03612 throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::count");
03613 }
03614 break;
03615 case 6:
03616 {
03617 #if defined(GECODE_HAS_INT_VARS)
03618 if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
03619 spec[1]->isInt() &&
03620 isEnum_IntRelType(spec[2]) &&
03621 spec[3]->isInt() &&
03622 isEnum_IntConLevel(spec[4]) &&
03623 isEnum_PropKind(spec[5]))
03624 {
03625 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
03626 Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
03627 for (int i=a0.size(); i--;)
03628 x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
03629 int x1 = static_cast<int>(spec[1]->toInt());
03630 Gecode::IntRelType x2 = toEnum_IntRelType(spec[2]);
03631 int x3 = static_cast<int>(spec[3]->toInt());
03632 Gecode::IntConLevel x4 = toEnum_IntConLevel(spec[4]);
03633 Gecode::PropKind x5 = toEnum_PropKind(spec[5]);
03634 Gecode::count(home, x0,x1,x2,x3,x4,x5);
03635 return;
03636 }
03637 #endif
03638 #if defined(GECODE_HAS_INT_VARS)
03639 if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
03640 isVar<Gecode::IntVar>(vm, spec[1]) &&
03641 isEnum_IntRelType(spec[2]) &&
03642 spec[3]->isInt() &&
03643 isEnum_IntConLevel(spec[4]) &&
03644 isEnum_PropKind(spec[5]))
03645 {
03646 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
03647 Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
03648 for (int i=a0.size(); i--;)
03649 x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
03650 Gecode::IntVar x1(vm.var(spec[1]->toVar()));
03651 Gecode::IntRelType x2 = toEnum_IntRelType(spec[2]);
03652 int x3 = static_cast<int>(spec[3]->toInt());
03653 Gecode::IntConLevel x4 = toEnum_IntConLevel(spec[4]);
03654 Gecode::PropKind x5 = toEnum_PropKind(spec[5]);
03655 Gecode::count(home, x0,x1,x2,x3,x4,x5);
03656 return;
03657 }
03658 #endif
03659 #if defined(GECODE_HAS_INT_VARS)
03660 if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
03661 spec[1]->isIntArray() &&
03662 isEnum_IntRelType(spec[2]) &&
03663 spec[3]->isInt() &&
03664 isEnum_IntConLevel(spec[4]) &&
03665 isEnum_PropKind(spec[5]))
03666 {
03667 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
03668 Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
03669 for (int i=a0.size(); i--;)
03670 x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
03671 Gecode::Reflection::IntArrayArg& a1 = *spec[1]->toIntArray();
03672 Gecode::IntArgs x1(a1.size());
03673 for (int i=a1.size(); i--;) x1[i] = a1[i];
03674 Gecode::IntRelType x2 = toEnum_IntRelType(spec[2]);
03675 int x3 = static_cast<int>(spec[3]->toInt());
03676 Gecode::IntConLevel x4 = toEnum_IntConLevel(spec[4]);
03677 Gecode::PropKind x5 = toEnum_PropKind(spec[5]);
03678 Gecode::count(home, x0,x1,x2,x3,x4,x5);
03679 return;
03680 }
03681 #endif
03682 #if defined(GECODE_HAS_INT_VARS)
03683 if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
03684 spec[1]->isInt() &&
03685 isEnum_IntRelType(spec[2]) &&
03686 isVar<Gecode::IntVar>(vm, spec[3]) &&
03687 isEnum_IntConLevel(spec[4]) &&
03688 isEnum_PropKind(spec[5]))
03689 {
03690 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
03691 Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
03692 for (int i=a0.size(); i--;)
03693 x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
03694 int x1 = static_cast<int>(spec[1]->toInt());
03695 Gecode::IntRelType x2 = toEnum_IntRelType(spec[2]);
03696 Gecode::IntVar x3(vm.var(spec[3]->toVar()));
03697 Gecode::IntConLevel x4 = toEnum_IntConLevel(spec[4]);
03698 Gecode::PropKind x5 = toEnum_PropKind(spec[5]);
03699 Gecode::count(home, x0,x1,x2,x3,x4,x5);
03700 return;
03701 }
03702 #endif
03703 #if defined(GECODE_HAS_INT_VARS)
03704 if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
03705 isVar<Gecode::IntVar>(vm, spec[1]) &&
03706 isEnum_IntRelType(spec[2]) &&
03707 isVar<Gecode::IntVar>(vm, spec[3]) &&
03708 isEnum_IntConLevel(spec[4]) &&
03709 isEnum_PropKind(spec[5]))
03710 {
03711 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
03712 Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
03713 for (int i=a0.size(); i--;)
03714 x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
03715 Gecode::IntVar x1(vm.var(spec[1]->toVar()));
03716 Gecode::IntRelType x2 = toEnum_IntRelType(spec[2]);
03717 Gecode::IntVar x3(vm.var(spec[3]->toVar()));
03718 Gecode::IntConLevel x4 = toEnum_IntConLevel(spec[4]);
03719 Gecode::PropKind x5 = toEnum_PropKind(spec[5]);
03720 Gecode::count(home, x0,x1,x2,x3,x4,x5);
03721 return;
03722 }
03723 #endif
03724 #if defined(GECODE_HAS_INT_VARS)
03725 if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
03726 spec[1]->isIntArray() &&
03727 isEnum_IntRelType(spec[2]) &&
03728 isVar<Gecode::IntVar>(vm, spec[3]) &&
03729 isEnum_IntConLevel(spec[4]) &&
03730 isEnum_PropKind(spec[5]))
03731 {
03732 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
03733 Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
03734 for (int i=a0.size(); i--;)
03735 x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
03736 Gecode::Reflection::IntArrayArg& a1 = *spec[1]->toIntArray();
03737 Gecode::IntArgs x1(a1.size());
03738 for (int i=a1.size(); i--;) x1[i] = a1[i];
03739 Gecode::IntRelType x2 = toEnum_IntRelType(spec[2]);
03740 Gecode::IntVar x3(vm.var(spec[3]->toVar()));
03741 Gecode::IntConLevel x4 = toEnum_IntConLevel(spec[4]);
03742 Gecode::PropKind x5 = toEnum_PropKind(spec[5]);
03743 Gecode::count(home, x0,x1,x2,x3,x4,x5);
03744 return;
03745 }
03746 #endif
03747 throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::count");
03748 }
03749 break;
03750 default: throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::count");
03751 }
03752 }
03753 };
03754
03755 class Register_match {
03756 public:
03758 static Gecode::Support::Symbol ati(void) {
03759 return "Gecode::Post::match";
03760 }
03761
03763 static void post(Gecode::Space* home, Gecode::Reflection::VarMap& vm,
03764 const Gecode::Reflection::ActorSpec& spec) {
03765 switch(spec.noOfArgs()) {
03766 case 2:
03767 {
03768 #if defined(GECODE_HAS_SET_VARS)
03769 if (isVar<Gecode::SetVar>(vm, spec[0]) &&
03770 isVarArgs<Gecode::IntVar>(vm, spec[1]))
03771 {
03772 Gecode::SetVar x0(vm.var(spec[0]->toVar()));
03773 Gecode::Reflection::ArrayArg& a1 = *spec[1]->toArray();
03774 Gecode::VarArgArray<Gecode::IntVar> x1(a1.size());
03775 for (int i=a1.size(); i--;)
03776 x1[i] = Gecode::IntVar(vm.var(a1[i]->toVar()));
03777 Gecode::match(home, x0,x1);
03778 return;
03779 }
03780 #endif
03781 throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::match");
03782 }
03783 break;
03784 default: throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::match");
03785 }
03786 }
03787 };
03788
03789 class Register_element {
03790 public:
03792 static Gecode::Support::Symbol ati(void) {
03793 return "Gecode::Post::element";
03794 }
03795
03797 static void post(Gecode::Space* home, Gecode::Reflection::VarMap& vm,
03798 const Gecode::Reflection::ActorSpec& spec) {
03799 switch(spec.noOfArgs()) {
03800 case 3:
03801 {
03802 #if defined(GECODE_HAS_INT_VARS)
03803 if (spec[0]->isIntArray() &&
03804 isVar<Gecode::IntVar>(vm, spec[1]) &&
03805 isVar<Gecode::IntVar>(vm, spec[2]))
03806 {
03807 Gecode::Reflection::IntArrayArg& a0 = *spec[0]->toIntArray();
03808 Gecode::IntArgs x0(a0.size());
03809 for (int i=a0.size(); i--;) x0[i] = a0[i];
03810 Gecode::IntVar x1(vm.var(spec[1]->toVar()));
03811 Gecode::IntVar x2(vm.var(spec[2]->toVar()));
03812 Gecode::element(home, x0,x1,x2);
03813 return;
03814 }
03815 #endif
03816 #if defined(GECODE_HAS_INT_VARS)
03817 if (spec[0]->isIntArray() &&
03818 isVar<Gecode::IntVar>(vm, spec[1]) &&
03819 isVar<Gecode::BoolVar>(vm, spec[2]))
03820 {
03821 Gecode::Reflection::IntArrayArg& a0 = *spec[0]->toIntArray();
03822 Gecode::IntArgs x0(a0.size());
03823 for (int i=a0.size(); i--;) x0[i] = a0[i];
03824 Gecode::IntVar x1(vm.var(spec[1]->toVar()));
03825 Gecode::BoolVar x2(vm.var(spec[2]->toVar()));
03826 Gecode::element(home, x0,x1,x2);
03827 return;
03828 }
03829 #endif
03830 #if defined(GECODE_HAS_INT_VARS)
03831 if (spec[0]->isIntArray() &&
03832 isVar<Gecode::IntVar>(vm, spec[1]) &&
03833 spec[2]->isInt())
03834 {
03835 Gecode::Reflection::IntArrayArg& a0 = *spec[0]->toIntArray();
03836 Gecode::IntArgs x0(a0.size());
03837 for (int i=a0.size(); i--;) x0[i] = a0[i];
03838 Gecode::IntVar x1(vm.var(spec[1]->toVar()));
03839 int x2 = static_cast<int>(spec[2]->toInt());
03840 Gecode::element(home, x0,x1,x2);
03841 return;
03842 }
03843 #endif
03844 #if defined(GECODE_HAS_INT_VARS)
03845 if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
03846 isVar<Gecode::IntVar>(vm, spec[1]) &&
03847 isVar<Gecode::IntVar>(vm, spec[2]))
03848 {
03849 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
03850 Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
03851 for (int i=a0.size(); i--;)
03852 x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
03853 Gecode::IntVar x1(vm.var(spec[1]->toVar()));
03854 Gecode::IntVar x2(vm.var(spec[2]->toVar()));
03855 Gecode::element(home, x0,x1,x2);
03856 return;
03857 }
03858 #endif
03859 #if defined(GECODE_HAS_INT_VARS)
03860 if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
03861 isVar<Gecode::IntVar>(vm, spec[1]) &&
03862 spec[2]->isInt())
03863 {
03864 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
03865 Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
03866 for (int i=a0.size(); i--;)
03867 x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
03868 Gecode::IntVar x1(vm.var(spec[1]->toVar()));
03869 int x2 = static_cast<int>(spec[2]->toInt());
03870 Gecode::element(home, x0,x1,x2);
03871 return;
03872 }
03873 #endif
03874 #if defined(GECODE_HAS_INT_VARS)
03875 if (isVarArgs<Gecode::BoolVar>(vm, spec[0]) &&
03876 isVar<Gecode::IntVar>(vm, spec[1]) &&
03877 isVar<Gecode::BoolVar>(vm, spec[2]))
03878 {
03879 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
03880 Gecode::VarArgArray<Gecode::BoolVar> x0(a0.size());
03881 for (int i=a0.size(); i--;)
03882 x0[i] = Gecode::BoolVar(vm.var(a0[i]->toVar()));
03883 Gecode::IntVar x1(vm.var(spec[1]->toVar()));
03884 Gecode::BoolVar x2(vm.var(spec[2]->toVar()));
03885 Gecode::element(home, x0,x1,x2);
03886 return;
03887 }
03888 #endif
03889 #if defined(GECODE_HAS_INT_VARS)
03890 if (isVarArgs<Gecode::BoolVar>(vm, spec[0]) &&
03891 isVar<Gecode::IntVar>(vm, spec[1]) &&
03892 spec[2]->isInt())
03893 {
03894 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
03895 Gecode::VarArgArray<Gecode::BoolVar> x0(a0.size());
03896 for (int i=a0.size(); i--;)
03897 x0[i] = Gecode::BoolVar(vm.var(a0[i]->toVar()));
03898 Gecode::IntVar x1(vm.var(spec[1]->toVar()));
03899 int x2 = static_cast<int>(spec[2]->toInt());
03900 Gecode::element(home, x0,x1,x2);
03901 return;
03902 }
03903 #endif
03904 #if defined(GECODE_HAS_SET_VARS)
03905 if (isVarArgs<Gecode::SetVar>(vm, spec[0]) &&
03906 isVar<Gecode::IntVar>(vm, spec[1]) &&
03907 isVar<Gecode::SetVar>(vm, spec[2]))
03908 {
03909 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
03910 Gecode::VarArgArray<Gecode::SetVar> x0(a0.size());
03911 for (int i=a0.size(); i--;)
03912 x0[i] = Gecode::SetVar(vm.var(a0[i]->toVar()));
03913 Gecode::IntVar x1(vm.var(spec[1]->toVar()));
03914 Gecode::SetVar x2(vm.var(spec[2]->toVar()));
03915 Gecode::element(home, x0,x1,x2);
03916 return;
03917 }
03918 #endif
03919 #if defined(GECODE_HAS_SET_VARS)
03920 if (isIntSetArgs(spec[0]) &&
03921 isVar<Gecode::IntVar>(vm, spec[1]) &&
03922 isVar<Gecode::SetVar>(vm, spec[2]))
03923 {
03924 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
03925 Gecode::IntSetArgs x0(a0.size());
03926 for (int i=a0.size(); i--;) {
03927 Gecode::Reflection::IntArrayArg* aa0 = a0[i]->toIntArray();
03928 Gecode::Reflection::IntArrayArgRanges aar0(aa0);
03929 x0[i] = Gecode::IntSet(aar0);
03930 }
03931 Gecode::IntVar x1(vm.var(spec[1]->toVar()));
03932 Gecode::SetVar x2(vm.var(spec[2]->toVar()));
03933 Gecode::element(home, x0,x1,x2);
03934 return;
03935 }
03936 #endif
03937 throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::element");
03938 }
03939 break;
03940 case 4:
03941 {
03942 #if defined(GECODE_HAS_INT_VARS)
03943 if (spec[0]->isIntArray() &&
03944 isVar<Gecode::IntVar>(vm, spec[1]) &&
03945 isVar<Gecode::IntVar>(vm, spec[2]) &&
03946 isEnum_IntConLevel(spec[3]))
03947 {
03948 Gecode::Reflection::IntArrayArg& a0 = *spec[0]->toIntArray();
03949 Gecode::IntArgs x0(a0.size());
03950 for (int i=a0.size(); i--;) x0[i] = a0[i];
03951 Gecode::IntVar x1(vm.var(spec[1]->toVar()));
03952 Gecode::IntVar x2(vm.var(spec[2]->toVar()));
03953 Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
03954 Gecode::element(home, x0,x1,x2,x3);
03955 return;
03956 }
03957 #endif
03958 #if defined(GECODE_HAS_INT_VARS)
03959 if (spec[0]->isIntArray() &&
03960 isVar<Gecode::IntVar>(vm, spec[1]) &&
03961 isVar<Gecode::BoolVar>(vm, spec[2]) &&
03962 isEnum_IntConLevel(spec[3]))
03963 {
03964 Gecode::Reflection::IntArrayArg& a0 = *spec[0]->toIntArray();
03965 Gecode::IntArgs x0(a0.size());
03966 for (int i=a0.size(); i--;) x0[i] = a0[i];
03967 Gecode::IntVar x1(vm.var(spec[1]->toVar()));
03968 Gecode::BoolVar x2(vm.var(spec[2]->toVar()));
03969 Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
03970 Gecode::element(home, x0,x1,x2,x3);
03971 return;
03972 }
03973 #endif
03974 #if defined(GECODE_HAS_INT_VARS)
03975 if (spec[0]->isIntArray() &&
03976 isVar<Gecode::IntVar>(vm, spec[1]) &&
03977 spec[2]->isInt() &&
03978 isEnum_IntConLevel(spec[3]))
03979 {
03980 Gecode::Reflection::IntArrayArg& a0 = *spec[0]->toIntArray();
03981 Gecode::IntArgs x0(a0.size());
03982 for (int i=a0.size(); i--;) x0[i] = a0[i];
03983 Gecode::IntVar x1(vm.var(spec[1]->toVar()));
03984 int x2 = static_cast<int>(spec[2]->toInt());
03985 Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
03986 Gecode::element(home, x0,x1,x2,x3);
03987 return;
03988 }
03989 #endif
03990 #if defined(GECODE_HAS_INT_VARS)
03991 if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
03992 isVar<Gecode::IntVar>(vm, spec[1]) &&
03993 isVar<Gecode::IntVar>(vm, spec[2]) &&
03994 isEnum_IntConLevel(spec[3]))
03995 {
03996 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
03997 Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
03998 for (int i=a0.size(); i--;)
03999 x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
04000 Gecode::IntVar x1(vm.var(spec[1]->toVar()));
04001 Gecode::IntVar x2(vm.var(spec[2]->toVar()));
04002 Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
04003 Gecode::element(home, x0,x1,x2,x3);
04004 return;
04005 }
04006 #endif
04007 #if defined(GECODE_HAS_INT_VARS)
04008 if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
04009 isVar<Gecode::IntVar>(vm, spec[1]) &&
04010 spec[2]->isInt() &&
04011 isEnum_IntConLevel(spec[3]))
04012 {
04013 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
04014 Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
04015 for (int i=a0.size(); i--;)
04016 x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
04017 Gecode::IntVar x1(vm.var(spec[1]->toVar()));
04018 int x2 = static_cast<int>(spec[2]->toInt());
04019 Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
04020 Gecode::element(home, x0,x1,x2,x3);
04021 return;
04022 }
04023 #endif
04024 #if defined(GECODE_HAS_INT_VARS)
04025 if (isVarArgs<Gecode::BoolVar>(vm, spec[0]) &&
04026 isVar<Gecode::IntVar>(vm, spec[1]) &&
04027 isVar<Gecode::BoolVar>(vm, spec[2]) &&
04028 isEnum_IntConLevel(spec[3]))
04029 {
04030 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
04031 Gecode::VarArgArray<Gecode::BoolVar> x0(a0.size());
04032 for (int i=a0.size(); i--;)
04033 x0[i] = Gecode::BoolVar(vm.var(a0[i]->toVar()));
04034 Gecode::IntVar x1(vm.var(spec[1]->toVar()));
04035 Gecode::BoolVar x2(vm.var(spec[2]->toVar()));
04036 Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
04037 Gecode::element(home, x0,x1,x2,x3);
04038 return;
04039 }
04040 #endif
04041 #if defined(GECODE_HAS_INT_VARS)
04042 if (isVarArgs<Gecode::BoolVar>(vm, spec[0]) &&
04043 isVar<Gecode::IntVar>(vm, spec[1]) &&
04044 spec[2]->isInt() &&
04045 isEnum_IntConLevel(spec[3]))
04046 {
04047 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
04048 Gecode::VarArgArray<Gecode::BoolVar> x0(a0.size());
04049 for (int i=a0.size(); i--;)
04050 x0[i] = Gecode::BoolVar(vm.var(a0[i]->toVar()));
04051 Gecode::IntVar x1(vm.var(spec[1]->toVar()));
04052 int x2 = static_cast<int>(spec[2]->toInt());
04053 Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
04054 Gecode::element(home, x0,x1,x2,x3);
04055 return;
04056 }
04057 #endif
04058 throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::element");
04059 }
04060 break;
04061 case 5:
04062 {
04063 #if defined(GECODE_HAS_INT_VARS)
04064 if (spec[0]->isIntArray() &&
04065 isVar<Gecode::IntVar>(vm, spec[1]) &&
04066 isVar<Gecode::IntVar>(vm, spec[2]) &&
04067 isEnum_IntConLevel(spec[3]) &&
04068 isEnum_PropKind(spec[4]))
04069 {
04070 Gecode::Reflection::IntArrayArg& a0 = *spec[0]->toIntArray();
04071 Gecode::IntArgs x0(a0.size());
04072 for (int i=a0.size(); i--;) x0[i] = a0[i];
04073 Gecode::IntVar x1(vm.var(spec[1]->toVar()));
04074 Gecode::IntVar x2(vm.var(spec[2]->toVar()));
04075 Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
04076 Gecode::PropKind x4 = toEnum_PropKind(spec[4]);
04077 Gecode::element(home, x0,x1,x2,x3,x4);
04078 return;
04079 }
04080 #endif
04081 #if defined(GECODE_HAS_INT_VARS)
04082 if (spec[0]->isIntArray() &&
04083 isVar<Gecode::IntVar>(vm, spec[1]) &&
04084 isVar<Gecode::BoolVar>(vm, spec[2]) &&
04085 isEnum_IntConLevel(spec[3]) &&
04086 isEnum_PropKind(spec[4]))
04087 {
04088 Gecode::Reflection::IntArrayArg& a0 = *spec[0]->toIntArray();
04089 Gecode::IntArgs x0(a0.size());
04090 for (int i=a0.size(); i--;) x0[i] = a0[i];
04091 Gecode::IntVar x1(vm.var(spec[1]->toVar()));
04092 Gecode::BoolVar x2(vm.var(spec[2]->toVar()));
04093 Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
04094 Gecode::PropKind x4 = toEnum_PropKind(spec[4]);
04095 Gecode::element(home, x0,x1,x2,x3,x4);
04096 return;
04097 }
04098 #endif
04099 #if defined(GECODE_HAS_INT_VARS)
04100 if (spec[0]->isIntArray() &&
04101 isVar<Gecode::IntVar>(vm, spec[1]) &&
04102 spec[2]->isInt() &&
04103 isEnum_IntConLevel(spec[3]) &&
04104 isEnum_PropKind(spec[4]))
04105 {
04106 Gecode::Reflection::IntArrayArg& a0 = *spec[0]->toIntArray();
04107 Gecode::IntArgs x0(a0.size());
04108 for (int i=a0.size(); i--;) x0[i] = a0[i];
04109 Gecode::IntVar x1(vm.var(spec[1]->toVar()));
04110 int x2 = static_cast<int>(spec[2]->toInt());
04111 Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
04112 Gecode::PropKind x4 = toEnum_PropKind(spec[4]);
04113 Gecode::element(home, x0,x1,x2,x3,x4);
04114 return;
04115 }
04116 #endif
04117 #if defined(GECODE_HAS_INT_VARS)
04118 if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
04119 isVar<Gecode::IntVar>(vm, spec[1]) &&
04120 isVar<Gecode::IntVar>(vm, spec[2]) &&
04121 isEnum_IntConLevel(spec[3]) &&
04122 isEnum_PropKind(spec[4]))
04123 {
04124 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
04125 Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
04126 for (int i=a0.size(); i--;)
04127 x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
04128 Gecode::IntVar x1(vm.var(spec[1]->toVar()));
04129 Gecode::IntVar x2(vm.var(spec[2]->toVar()));
04130 Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
04131 Gecode::PropKind x4 = toEnum_PropKind(spec[4]);
04132 Gecode::element(home, x0,x1,x2,x3,x4);
04133 return;
04134 }
04135 #endif
04136 #if defined(GECODE_HAS_INT_VARS)
04137 if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
04138 isVar<Gecode::IntVar>(vm, spec[1]) &&
04139 spec[2]->isInt() &&
04140 isEnum_IntConLevel(spec[3]) &&
04141 isEnum_PropKind(spec[4]))
04142 {
04143 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
04144 Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
04145 for (int i=a0.size(); i--;)
04146 x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
04147 Gecode::IntVar x1(vm.var(spec[1]->toVar()));
04148 int x2 = static_cast<int>(spec[2]->toInt());
04149 Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
04150 Gecode::PropKind x4 = toEnum_PropKind(spec[4]);
04151 Gecode::element(home, x0,x1,x2,x3,x4);
04152 return;
04153 }
04154 #endif
04155 #if defined(GECODE_HAS_INT_VARS)
04156 if (isVarArgs<Gecode::BoolVar>(vm, spec[0]) &&
04157 isVar<Gecode::IntVar>(vm, spec[1]) &&
04158 isVar<Gecode::BoolVar>(vm, spec[2]) &&
04159 isEnum_IntConLevel(spec[3]) &&
04160 isEnum_PropKind(spec[4]))
04161 {
04162 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
04163 Gecode::VarArgArray<Gecode::BoolVar> x0(a0.size());
04164 for (int i=a0.size(); i--;)
04165 x0[i] = Gecode::BoolVar(vm.var(a0[i]->toVar()));
04166 Gecode::IntVar x1(vm.var(spec[1]->toVar()));
04167 Gecode::BoolVar x2(vm.var(spec[2]->toVar()));
04168 Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
04169 Gecode::PropKind x4 = toEnum_PropKind(spec[4]);
04170 Gecode::element(home, x0,x1,x2,x3,x4);
04171 return;
04172 }
04173 #endif
04174 #if defined(GECODE_HAS_INT_VARS)
04175 if (isVarArgs<Gecode::BoolVar>(vm, spec[0]) &&
04176 isVar<Gecode::IntVar>(vm, spec[1]) &&
04177 spec[2]->isInt() &&
04178 isEnum_IntConLevel(spec[3]) &&
04179 isEnum_PropKind(spec[4]))
04180 {
04181 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
04182 Gecode::VarArgArray<Gecode::BoolVar> x0(a0.size());
04183 for (int i=a0.size(); i--;)
04184 x0[i] = Gecode::BoolVar(vm.var(a0[i]->toVar()));
04185 Gecode::IntVar x1(vm.var(spec[1]->toVar()));
04186 int x2 = static_cast<int>(spec[2]->toInt());
04187 Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
04188 Gecode::PropKind x4 = toEnum_PropKind(spec[4]);
04189 Gecode::element(home, x0,x1,x2,x3,x4);
04190 return;
04191 }
04192 #endif
04193 throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::element");
04194 }
04195 break;
04196 default: throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::element");
04197 }
04198 }
04199 };
04200
04201 class Register_abs {
04202 public:
04204 static Gecode::Support::Symbol ati(void) {
04205 return "Gecode::Post::abs";
04206 }
04207
04209 static void post(Gecode::Space* home, Gecode::Reflection::VarMap& vm,
04210 const Gecode::Reflection::ActorSpec& spec) {
04211 switch(spec.noOfArgs()) {
04212 case 2:
04213 {
04214 #if defined(GECODE_HAS_INT_VARS)
04215 if (isVar<Gecode::IntVar>(vm, spec[0]) &&
04216 isVar<Gecode::IntVar>(vm, spec[1]))
04217 {
04218 Gecode::IntVar x0(vm.var(spec[0]->toVar()));
04219 Gecode::IntVar x1(vm.var(spec[1]->toVar()));
04220 Gecode::abs(home, x0,x1);
04221 return;
04222 }
04223 #endif
04224 throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::abs");
04225 }
04226 break;
04227 case 3:
04228 {
04229 #if defined(GECODE_HAS_INT_VARS)
04230 if (isVar<Gecode::IntVar>(vm, spec[0]) &&
04231 isVar<Gecode::IntVar>(vm, spec[1]) &&
04232 isEnum_IntConLevel(spec[2]))
04233 {
04234 Gecode::IntVar x0(vm.var(spec[0]->toVar()));
04235 Gecode::IntVar x1(vm.var(spec[1]->toVar()));
04236 Gecode::IntConLevel x2 = toEnum_IntConLevel(spec[2]);
04237 Gecode::abs(home, x0,x1,x2);
04238 return;
04239 }
04240 #endif
04241 throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::abs");
04242 }
04243 break;
04244 case 4:
04245 {
04246 #if defined(GECODE_HAS_INT_VARS)
04247 if (isVar<Gecode::IntVar>(vm, spec[0]) &&
04248 isVar<Gecode::IntVar>(vm, spec[1]) &&
04249 isEnum_IntConLevel(spec[2]) &&
04250 isEnum_PropKind(spec[3]))
04251 {
04252 Gecode::IntVar x0(vm.var(spec[0]->toVar()));
04253 Gecode::IntVar x1(vm.var(spec[1]->toVar()));
04254 Gecode::IntConLevel x2 = toEnum_IntConLevel(spec[2]);
04255 Gecode::PropKind x3 = toEnum_PropKind(spec[3]);
04256 Gecode::abs(home, x0,x1,x2,x3);
04257 return;
04258 }
04259 #endif
04260 throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::abs");
04261 }
04262 break;
04263 default: throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::abs");
04264 }
04265 }
04266 };
04267
04268 class Register_elementsUnion {
04269 public:
04271 static Gecode::Support::Symbol ati(void) {
04272 return "Gecode::Post::elementsUnion";
04273 }
04274
04276 static void post(Gecode::Space* home, Gecode::Reflection::VarMap& vm,
04277 const Gecode::Reflection::ActorSpec& spec) {
04278 switch(spec.noOfArgs()) {
04279 case 3:
04280 {
04281 #if defined(GECODE_HAS_SET_VARS)
04282 if (isVarArgs<Gecode::SetVar>(vm, spec[0]) &&
04283 isVar<Gecode::SetVar>(vm, spec[1]) &&
04284 isVar<Gecode::SetVar>(vm, spec[2]))
04285 {
04286 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
04287 Gecode::VarArgArray<Gecode::SetVar> x0(a0.size());
04288 for (int i=a0.size(); i--;)
04289 x0[i] = Gecode::SetVar(vm.var(a0[i]->toVar()));
04290 Gecode::SetVar x1(vm.var(spec[1]->toVar()));
04291 Gecode::SetVar x2(vm.var(spec[2]->toVar()));
04292 Gecode::elementsUnion(home, x0,x1,x2);
04293 return;
04294 }
04295 #endif
04296 #if defined(GECODE_HAS_SET_VARS)
04297 if (isIntSetArgs(spec[0]) &&
04298 isVar<Gecode::SetVar>(vm, spec[1]) &&
04299 isVar<Gecode::SetVar>(vm, spec[2]))
04300 {
04301 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
04302 Gecode::IntSetArgs x0(a0.size());
04303 for (int i=a0.size(); i--;) {
04304 Gecode::Reflection::IntArrayArg* aa0 = a0[i]->toIntArray();
04305 Gecode::Reflection::IntArrayArgRanges aar0(aa0);
04306 x0[i] = Gecode::IntSet(aar0);
04307 }
04308 Gecode::SetVar x1(vm.var(spec[1]->toVar()));
04309 Gecode::SetVar x2(vm.var(spec[2]->toVar()));
04310 Gecode::elementsUnion(home, x0,x1,x2);
04311 return;
04312 }
04313 #endif
04314 throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::elementsUnion");
04315 }
04316 break;
04317 default: throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::elementsUnion");
04318 }
04319 }
04320 };
04321
04322 class Register_atmost {
04323 public:
04325 static Gecode::Support::Symbol ati(void) {
04326 return "Gecode::Post::atmost";
04327 }
04328
04330 static void post(Gecode::Space* home, Gecode::Reflection::VarMap& vm,
04331 const Gecode::Reflection::ActorSpec& spec) {
04332 switch(spec.noOfArgs()) {
04333 case 3:
04334 {
04335 #if defined(GECODE_HAS_INT_VARS)
04336 if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
04337 spec[1]->isInt() &&
04338 spec[2]->isInt())
04339 {
04340 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
04341 Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
04342 for (int i=a0.size(); i--;)
04343 x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
04344 int x1 = static_cast<int>(spec[1]->toInt());
04345 int x2 = static_cast<int>(spec[2]->toInt());
04346 Gecode::atmost(home, x0,x1,x2);
04347 return;
04348 }
04349 #endif
04350 #if defined(GECODE_HAS_INT_VARS)
04351 if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
04352 isVar<Gecode::IntVar>(vm, spec[1]) &&
04353 spec[2]->isInt())
04354 {
04355 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
04356 Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
04357 for (int i=a0.size(); i--;)
04358 x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
04359 Gecode::IntVar x1(vm.var(spec[1]->toVar()));
04360 int x2 = static_cast<int>(spec[2]->toInt());
04361 Gecode::atmost(home, x0,x1,x2);
04362 return;
04363 }
04364 #endif
04365 #if defined(GECODE_HAS_INT_VARS)
04366 if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
04367 spec[1]->isIntArray() &&
04368 spec[2]->isInt())
04369 {
04370 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
04371 Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
04372 for (int i=a0.size(); i--;)
04373 x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
04374 Gecode::Reflection::IntArrayArg& a1 = *spec[1]->toIntArray();
04375 Gecode::IntArgs x1(a1.size());
04376 for (int i=a1.size(); i--;) x1[i] = a1[i];
04377 int x2 = static_cast<int>(spec[2]->toInt());
04378 Gecode::atmost(home, x0,x1,x2);
04379 return;
04380 }
04381 #endif
04382 #if defined(GECODE_HAS_INT_VARS)
04383 if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
04384 spec[1]->isInt() &&
04385 isVar<Gecode::IntVar>(vm, spec[2]))
04386 {
04387 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
04388 Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
04389 for (int i=a0.size(); i--;)
04390 x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
04391 int x1 = static_cast<int>(spec[1]->toInt());
04392 Gecode::IntVar x2(vm.var(spec[2]->toVar()));
04393 Gecode::atmost(home, x0,x1,x2);
04394 return;
04395 }
04396 #endif
04397 #if defined(GECODE_HAS_INT_VARS)
04398 if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
04399 isVar<Gecode::IntVar>(vm, spec[1]) &&
04400 isVar<Gecode::IntVar>(vm, spec[2]))
04401 {
04402 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
04403 Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
04404 for (int i=a0.size(); i--;)
04405 x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
04406 Gecode::IntVar x1(vm.var(spec[1]->toVar()));
04407 Gecode::IntVar x2(vm.var(spec[2]->toVar()));
04408 Gecode::atmost(home, x0,x1,x2);
04409 return;
04410 }
04411 #endif
04412 #if defined(GECODE_HAS_INT_VARS)
04413 if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
04414 spec[1]->isIntArray() &&
04415 isVar<Gecode::IntVar>(vm, spec[2]))
04416 {
04417 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
04418 Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
04419 for (int i=a0.size(); i--;)
04420 x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
04421 Gecode::Reflection::IntArrayArg& a1 = *spec[1]->toIntArray();
04422 Gecode::IntArgs x1(a1.size());
04423 for (int i=a1.size(); i--;) x1[i] = a1[i];
04424 Gecode::IntVar x2(vm.var(spec[2]->toVar()));
04425 Gecode::atmost(home, x0,x1,x2);
04426 return;
04427 }
04428 #endif
04429 throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::atmost");
04430 }
04431 break;
04432 case 4:
04433 {
04434 #if defined(GECODE_HAS_INT_VARS)
04435 if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
04436 spec[1]->isInt() &&
04437 spec[2]->isInt() &&
04438 isEnum_IntConLevel(spec[3]))
04439 {
04440 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
04441 Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
04442 for (int i=a0.size(); i--;)
04443 x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
04444 int x1 = static_cast<int>(spec[1]->toInt());
04445 int x2 = static_cast<int>(spec[2]->toInt());
04446 Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
04447 Gecode::atmost(home, x0,x1,x2,x3);
04448 return;
04449 }
04450 #endif
04451 #if defined(GECODE_HAS_INT_VARS)
04452 if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
04453 isVar<Gecode::IntVar>(vm, spec[1]) &&
04454 spec[2]->isInt() &&
04455 isEnum_IntConLevel(spec[3]))
04456 {
04457 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
04458 Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
04459 for (int i=a0.size(); i--;)
04460 x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
04461 Gecode::IntVar x1(vm.var(spec[1]->toVar()));
04462 int x2 = static_cast<int>(spec[2]->toInt());
04463 Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
04464 Gecode::atmost(home, x0,x1,x2,x3);
04465 return;
04466 }
04467 #endif
04468 #if defined(GECODE_HAS_INT_VARS)
04469 if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
04470 spec[1]->isIntArray() &&
04471 spec[2]->isInt() &&
04472 isEnum_IntConLevel(spec[3]))
04473 {
04474 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
04475 Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
04476 for (int i=a0.size(); i--;)
04477 x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
04478 Gecode::Reflection::IntArrayArg& a1 = *spec[1]->toIntArray();
04479 Gecode::IntArgs x1(a1.size());
04480 for (int i=a1.size(); i--;) x1[i] = a1[i];
04481 int x2 = static_cast<int>(spec[2]->toInt());
04482 Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
04483 Gecode::atmost(home, x0,x1,x2,x3);
04484 return;
04485 }
04486 #endif
04487 #if defined(GECODE_HAS_INT_VARS)
04488 if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
04489 spec[1]->isInt() &&
04490 isVar<Gecode::IntVar>(vm, spec[2]) &&
04491 isEnum_IntConLevel(spec[3]))
04492 {
04493 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
04494 Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
04495 for (int i=a0.size(); i--;)
04496 x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
04497 int x1 = static_cast<int>(spec[1]->toInt());
04498 Gecode::IntVar x2(vm.var(spec[2]->toVar()));
04499 Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
04500 Gecode::atmost(home, x0,x1,x2,x3);
04501 return;
04502 }
04503 #endif
04504 #if defined(GECODE_HAS_INT_VARS)
04505 if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
04506 isVar<Gecode::IntVar>(vm, spec[1]) &&
04507 isVar<Gecode::IntVar>(vm, spec[2]) &&
04508 isEnum_IntConLevel(spec[3]))
04509 {
04510 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
04511 Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
04512 for (int i=a0.size(); i--;)
04513 x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
04514 Gecode::IntVar x1(vm.var(spec[1]->toVar()));
04515 Gecode::IntVar x2(vm.var(spec[2]->toVar()));
04516 Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
04517 Gecode::atmost(home, x0,x1,x2,x3);
04518 return;
04519 }
04520 #endif
04521 #if defined(GECODE_HAS_INT_VARS)
04522 if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
04523 spec[1]->isIntArray() &&
04524 isVar<Gecode::IntVar>(vm, spec[2]) &&
04525 isEnum_IntConLevel(spec[3]))
04526 {
04527 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
04528 Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
04529 for (int i=a0.size(); i--;)
04530 x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
04531 Gecode::Reflection::IntArrayArg& a1 = *spec[1]->toIntArray();
04532 Gecode::IntArgs x1(a1.size());
04533 for (int i=a1.size(); i--;) x1[i] = a1[i];
04534 Gecode::IntVar x2(vm.var(spec[2]->toVar()));
04535 Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
04536 Gecode::atmost(home, x0,x1,x2,x3);
04537 return;
04538 }
04539 #endif
04540 throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::atmost");
04541 }
04542 break;
04543 case 5:
04544 {
04545 #if defined(GECODE_HAS_INT_VARS)
04546 if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
04547 spec[1]->isInt() &&
04548 spec[2]->isInt() &&
04549 isEnum_IntConLevel(spec[3]) &&
04550 isEnum_PropKind(spec[4]))
04551 {
04552 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
04553 Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
04554 for (int i=a0.size(); i--;)
04555 x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
04556 int x1 = static_cast<int>(spec[1]->toInt());
04557 int x2 = static_cast<int>(spec[2]->toInt());
04558 Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
04559 Gecode::PropKind x4 = toEnum_PropKind(spec[4]);
04560 Gecode::atmost(home, x0,x1,x2,x3,x4);
04561 return;
04562 }
04563 #endif
04564 #if defined(GECODE_HAS_INT_VARS)
04565 if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
04566 isVar<Gecode::IntVar>(vm, spec[1]) &&
04567 spec[2]->isInt() &&
04568 isEnum_IntConLevel(spec[3]) &&
04569 isEnum_PropKind(spec[4]))
04570 {
04571 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
04572 Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
04573 for (int i=a0.size(); i--;)
04574 x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
04575 Gecode::IntVar x1(vm.var(spec[1]->toVar()));
04576 int x2 = static_cast<int>(spec[2]->toInt());
04577 Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
04578 Gecode::PropKind x4 = toEnum_PropKind(spec[4]);
04579 Gecode::atmost(home, x0,x1,x2,x3,x4);
04580 return;
04581 }
04582 #endif
04583 #if defined(GECODE_HAS_INT_VARS)
04584 if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
04585 spec[1]->isIntArray() &&
04586 spec[2]->isInt() &&
04587 isEnum_IntConLevel(spec[3]) &&
04588 isEnum_PropKind(spec[4]))
04589 {
04590 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
04591 Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
04592 for (int i=a0.size(); i--;)
04593 x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
04594 Gecode::Reflection::IntArrayArg& a1 = *spec[1]->toIntArray();
04595 Gecode::IntArgs x1(a1.size());
04596 for (int i=a1.size(); i--;) x1[i] = a1[i];
04597 int x2 = static_cast<int>(spec[2]->toInt());
04598 Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
04599 Gecode::PropKind x4 = toEnum_PropKind(spec[4]);
04600 Gecode::atmost(home, x0,x1,x2,x3,x4);
04601 return;
04602 }
04603 #endif
04604 #if defined(GECODE_HAS_INT_VARS)
04605 if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
04606 spec[1]->isInt() &&
04607 isVar<Gecode::IntVar>(vm, spec[2]) &&
04608 isEnum_IntConLevel(spec[3]) &&
04609 isEnum_PropKind(spec[4]))
04610 {
04611 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
04612 Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
04613 for (int i=a0.size(); i--;)
04614 x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
04615 int x1 = static_cast<int>(spec[1]->toInt());
04616 Gecode::IntVar x2(vm.var(spec[2]->toVar()));
04617 Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
04618 Gecode::PropKind x4 = toEnum_PropKind(spec[4]);
04619 Gecode::atmost(home, x0,x1,x2,x3,x4);
04620 return;
04621 }
04622 #endif
04623 #if defined(GECODE_HAS_INT_VARS)
04624 if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
04625 isVar<Gecode::IntVar>(vm, spec[1]) &&
04626 isVar<Gecode::IntVar>(vm, spec[2]) &&
04627 isEnum_IntConLevel(spec[3]) &&
04628 isEnum_PropKind(spec[4]))
04629 {
04630 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
04631 Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
04632 for (int i=a0.size(); i--;)
04633 x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
04634 Gecode::IntVar x1(vm.var(spec[1]->toVar()));
04635 Gecode::IntVar x2(vm.var(spec[2]->toVar()));
04636 Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
04637 Gecode::PropKind x4 = toEnum_PropKind(spec[4]);
04638 Gecode::atmost(home, x0,x1,x2,x3,x4);
04639 return;
04640 }
04641 #endif
04642 #if defined(GECODE_HAS_INT_VARS)
04643 if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
04644 spec[1]->isIntArray() &&
04645 isVar<Gecode::IntVar>(vm, spec[2]) &&
04646 isEnum_IntConLevel(spec[3]) &&
04647 isEnum_PropKind(spec[4]))
04648 {
04649 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
04650 Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
04651 for (int i=a0.size(); i--;)
04652 x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
04653 Gecode::Reflection::IntArrayArg& a1 = *spec[1]->toIntArray();
04654 Gecode::IntArgs x1(a1.size());
04655 for (int i=a1.size(); i--;) x1[i] = a1[i];
04656 Gecode::IntVar x2(vm.var(spec[2]->toVar()));
04657 Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
04658 Gecode::PropKind x4 = toEnum_PropKind(spec[4]);
04659 Gecode::atmost(home, x0,x1,x2,x3,x4);
04660 return;
04661 }
04662 #endif
04663 throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::atmost");
04664 }
04665 break;
04666 default: throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::atmost");
04667 }
04668 }
04669 };
04670
04671 class Register_circuit {
04672 public:
04674 static Gecode::Support::Symbol ati(void) {
04675 return "Gecode::Post::circuit";
04676 }
04677
04679 static void post(Gecode::Space* home, Gecode::Reflection::VarMap& vm,
04680 const Gecode::Reflection::ActorSpec& spec) {
04681 switch(spec.noOfArgs()) {
04682 case 1:
04683 {
04684 #if defined(GECODE_HAS_INT_VARS)
04685 if (isVarArgs<Gecode::IntVar>(vm, spec[0]))
04686 {
04687 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
04688 Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
04689 for (int i=a0.size(); i--;)
04690 x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
04691 Gecode::circuit(home, x0);
04692 return;
04693 }
04694 #endif
04695 throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::circuit");
04696 }
04697 break;
04698 case 2:
04699 {
04700 #if defined(GECODE_HAS_INT_VARS)
04701 if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
04702 isEnum_IntConLevel(spec[1]))
04703 {
04704 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
04705 Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
04706 for (int i=a0.size(); i--;)
04707 x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
04708 Gecode::IntConLevel x1 = toEnum_IntConLevel(spec[1]);
04709 Gecode::circuit(home, x0,x1);
04710 return;
04711 }
04712 #endif
04713 throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::circuit");
04714 }
04715 break;
04716 case 3:
04717 {
04718 #if defined(GECODE_HAS_INT_VARS)
04719 if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
04720 isEnum_IntConLevel(spec[1]) &&
04721 isEnum_PropKind(spec[2]))
04722 {
04723 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
04724 Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
04725 for (int i=a0.size(); i--;)
04726 x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
04727 Gecode::IntConLevel x1 = toEnum_IntConLevel(spec[1]);
04728 Gecode::PropKind x2 = toEnum_PropKind(spec[2]);
04729 Gecode::circuit(home, x0,x1,x2);
04730 return;
04731 }
04732 #endif
04733 throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::circuit");
04734 }
04735 break;
04736 default: throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::circuit");
04737 }
04738 }
04739 };
04740
04741 class Register_assign {
04742 public:
04744 static Gecode::Support::Symbol ati(void) {
04745 return "Gecode::Post::assign";
04746 }
04747
04749 static void post(Gecode::Space* home, Gecode::Reflection::VarMap& vm,
04750 const Gecode::Reflection::ActorSpec& spec) {
04751 switch(spec.noOfArgs()) {
04752 case 2:
04753 {
04754 #if defined(GECODE_HAS_INT_VARS)
04755 if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
04756 isEnum_IntAssign(spec[1]))
04757 {
04758 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
04759 Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
04760 for (int i=a0.size(); i--;)
04761 x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
04762 Gecode::IntAssign x1 = toEnum_IntAssign(spec[1]);
04763 Gecode::assign(home, x0,x1);
04764 return;
04765 }
04766 #endif
04767 #if defined(GECODE_HAS_INT_VARS)
04768 if (isVarArgs<Gecode::BoolVar>(vm, spec[0]) &&
04769 isEnum_IntAssign(spec[1]))
04770 {
04771 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
04772 Gecode::VarArgArray<Gecode::BoolVar> x0(a0.size());
04773 for (int i=a0.size(); i--;)
04774 x0[i] = Gecode::BoolVar(vm.var(a0[i]->toVar()));
04775 Gecode::IntAssign x1 = toEnum_IntAssign(spec[1]);
04776 Gecode::assign(home, x0,x1);
04777 return;
04778 }
04779 #endif
04780 throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::assign");
04781 }
04782 break;
04783 default: throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::assign");
04784 }
04785 }
04786 };
04787
04788 class Register_mult {
04789 public:
04791 static Gecode::Support::Symbol ati(void) {
04792 return "Gecode::Post::mult";
04793 }
04794
04796 static void post(Gecode::Space* home, Gecode::Reflection::VarMap& vm,
04797 const Gecode::Reflection::ActorSpec& spec) {
04798 switch(spec.noOfArgs()) {
04799 case 3:
04800 {
04801 #if defined(GECODE_HAS_INT_VARS)
04802 if (isVar<Gecode::IntVar>(vm, spec[0]) &&
04803 isVar<Gecode::IntVar>(vm, spec[1]) &&
04804 isVar<Gecode::IntVar>(vm, spec[2]))
04805 {
04806 Gecode::IntVar x0(vm.var(spec[0]->toVar()));
04807 Gecode::IntVar x1(vm.var(spec[1]->toVar()));
04808 Gecode::IntVar x2(vm.var(spec[2]->toVar()));
04809 Gecode::mult(home, x0,x1,x2);
04810 return;
04811 }
04812 #endif
04813 throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::mult");
04814 }
04815 break;
04816 case 4:
04817 {
04818 #if defined(GECODE_HAS_INT_VARS)
04819 if (isVar<Gecode::IntVar>(vm, spec[0]) &&
04820 isVar<Gecode::IntVar>(vm, spec[1]) &&
04821 isVar<Gecode::IntVar>(vm, spec[2]) &&
04822 isEnum_IntConLevel(spec[3]))
04823 {
04824 Gecode::IntVar x0(vm.var(spec[0]->toVar()));
04825 Gecode::IntVar x1(vm.var(spec[1]->toVar()));
04826 Gecode::IntVar x2(vm.var(spec[2]->toVar()));
04827 Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
04828 Gecode::mult(home, x0,x1,x2,x3);
04829 return;
04830 }
04831 #endif
04832 throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::mult");
04833 }
04834 break;
04835 case 5:
04836 {
04837 #if defined(GECODE_HAS_INT_VARS)
04838 if (isVar<Gecode::IntVar>(vm, spec[0]) &&
04839 isVar<Gecode::IntVar>(vm, spec[1]) &&
04840 isVar<Gecode::IntVar>(vm, spec[2]) &&
04841 isEnum_IntConLevel(spec[3]) &&
04842 isEnum_PropKind(spec[4]))
04843 {
04844 Gecode::IntVar x0(vm.var(spec[0]->toVar()));
04845 Gecode::IntVar x1(vm.var(spec[1]->toVar()));
04846 Gecode::IntVar x2(vm.var(spec[2]->toVar()));
04847 Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
04848 Gecode::PropKind x4 = toEnum_PropKind(spec[4]);
04849 Gecode::mult(home, x0,x1,x2,x3,x4);
04850 return;
04851 }
04852 #endif
04853 throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::mult");
04854 }
04855 break;
04856 default: throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::mult");
04857 }
04858 }
04859 };
04860
04861 class Register_atmostOne {
04862 public:
04864 static Gecode::Support::Symbol ati(void) {
04865 return "Gecode::Post::atmostOne";
04866 }
04867
04869 static void post(Gecode::Space* home, Gecode::Reflection::VarMap& vm,
04870 const Gecode::Reflection::ActorSpec& spec) {
04871 switch(spec.noOfArgs()) {
04872 case 2:
04873 {
04874 #if defined(GECODE_HAS_SET_VARS)
04875 if (isVarArgs<Gecode::SetVar>(vm, spec[0]) &&
04876 spec[1]->isInt())
04877 {
04878 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
04879 Gecode::VarArgArray<Gecode::SetVar> x0(a0.size());
04880 for (int i=a0.size(); i--;)
04881 x0[i] = Gecode::SetVar(vm.var(a0[i]->toVar()));
04882 unsigned int x1 = static_cast<unsigned int>(spec[1]->toInt());
04883 Gecode::atmostOne(home, x0,x1);
04884 return;
04885 }
04886 #endif
04887 throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::atmostOne");
04888 }
04889 break;
04890 default: throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::atmostOne");
04891 }
04892 }
04893 };
04894
04895 class Register_div {
04896 public:
04898 static Gecode::Support::Symbol ati(void) {
04899 return "Gecode::Post::div";
04900 }
04901
04903 static void post(Gecode::Space* home, Gecode::Reflection::VarMap& vm,
04904 const Gecode::Reflection::ActorSpec& spec) {
04905 switch(spec.noOfArgs()) {
04906 case 3:
04907 {
04908 #if defined(GECODE_HAS_INT_VARS)
04909 if (isVar<Gecode::IntVar>(vm, spec[0]) &&
04910 isVar<Gecode::IntVar>(vm, spec[1]) &&
04911 isVar<Gecode::IntVar>(vm, spec[2]))
04912 {
04913 Gecode::IntVar x0(vm.var(spec[0]->toVar()));
04914 Gecode::IntVar x1(vm.var(spec[1]->toVar()));
04915 Gecode::IntVar x2(vm.var(spec[2]->toVar()));
04916 Gecode::div(home, x0,x1,x2);
04917 return;
04918 }
04919 #endif
04920 throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::div");
04921 }
04922 break;
04923 case 4:
04924 {
04925 #if defined(GECODE_HAS_INT_VARS)
04926 if (isVar<Gecode::IntVar>(vm, spec[0]) &&
04927 isVar<Gecode::IntVar>(vm, spec[1]) &&
04928 isVar<Gecode::IntVar>(vm, spec[2]) &&
04929 isEnum_IntConLevel(spec[3]))
04930 {
04931 Gecode::IntVar x0(vm.var(spec[0]->toVar()));
04932 Gecode::IntVar x1(vm.var(spec[1]->toVar()));
04933 Gecode::IntVar x2(vm.var(spec[2]->toVar()));
04934 Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
04935 Gecode::div(home, x0,x1,x2,x3);
04936 return;
04937 }
04938 #endif
04939 throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::div");
04940 }
04941 break;
04942 case 5:
04943 {
04944 #if defined(GECODE_HAS_INT_VARS)
04945 if (isVar<Gecode::IntVar>(vm, spec[0]) &&
04946 isVar<Gecode::IntVar>(vm, spec[1]) &&
04947 isVar<Gecode::IntVar>(vm, spec[2]) &&
04948 isEnum_IntConLevel(spec[3]) &&
04949 isEnum_PropKind(spec[4]))
04950 {
04951 Gecode::IntVar x0(vm.var(spec[0]->toVar()));
04952 Gecode::IntVar x1(vm.var(spec[1]->toVar()));
04953 Gecode::IntVar x2(vm.var(spec[2]->toVar()));
04954 Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
04955 Gecode::PropKind x4 = toEnum_PropKind(spec[4]);
04956 Gecode::div(home, x0,x1,x2,x3,x4);
04957 return;
04958 }
04959 #endif
04960 throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::div");
04961 }
04962 break;
04963 default: throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::div");
04964 }
04965 }
04966 };
04967
04968 class Register_convex {
04969 public:
04971 static Gecode::Support::Symbol ati(void) {
04972 return "Gecode::Post::convex";
04973 }
04974
04976 static void post(Gecode::Space* home, Gecode::Reflection::VarMap& vm,
04977 const Gecode::Reflection::ActorSpec& spec) {
04978 switch(spec.noOfArgs()) {
04979 case 1:
04980 {
04981 #if defined(GECODE_HAS_SET_VARS)
04982 if (isVar<Gecode::SetVar>(vm, spec[0]))
04983 {
04984 Gecode::SetVar x0(vm.var(spec[0]->toVar()));
04985 Gecode::convex(home, x0);
04986 return;
04987 }
04988 #endif
04989 throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::convex");
04990 }
04991 break;
04992 default: throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::convex");
04993 }
04994 }
04995 };
04996
04997 class Register_unshare {
04998 public:
05000 static Gecode::Support::Symbol ati(void) {
05001 return "Gecode::Post::unshare";
05002 }
05003
05005 static void post(Gecode::Space* home, Gecode::Reflection::VarMap& vm,
05006 const Gecode::Reflection::ActorSpec& spec) {
05007 switch(spec.noOfArgs()) {
05008 case 1:
05009 {
05010 #if defined(GECODE_HAS_INT_VARS)
05011 if (isVarArgs<Gecode::IntVar>(vm, spec[0]))
05012 {
05013 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
05014 Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
05015 for (int i=a0.size(); i--;)
05016 x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
05017 Gecode::unshare(home, x0);
05018 return;
05019 }
05020 #endif
05021 #if defined(GECODE_HAS_INT_VARS)
05022 if (isVarArgs<Gecode::BoolVar>(vm, spec[0]))
05023 {
05024 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
05025 Gecode::VarArgArray<Gecode::BoolVar> x0(a0.size());
05026 for (int i=a0.size(); i--;)
05027 x0[i] = Gecode::BoolVar(vm.var(a0[i]->toVar()));
05028 Gecode::unshare(home, x0);
05029 return;
05030 }
05031 #endif
05032 throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::unshare");
05033 }
05034 break;
05035 case 2:
05036 {
05037 #if defined(GECODE_HAS_INT_VARS)
05038 if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
05039 isEnum_IntConLevel(spec[1]))
05040 {
05041 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
05042 Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
05043 for (int i=a0.size(); i--;)
05044 x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
05045 Gecode::IntConLevel x1 = toEnum_IntConLevel(spec[1]);
05046 Gecode::unshare(home, x0,x1);
05047 return;
05048 }
05049 #endif
05050 #if defined(GECODE_HAS_INT_VARS)
05051 if (isVarArgs<Gecode::BoolVar>(vm, spec[0]) &&
05052 isEnum_IntConLevel(spec[1]))
05053 {
05054 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
05055 Gecode::VarArgArray<Gecode::BoolVar> x0(a0.size());
05056 for (int i=a0.size(); i--;)
05057 x0[i] = Gecode::BoolVar(vm.var(a0[i]->toVar()));
05058 Gecode::IntConLevel x1 = toEnum_IntConLevel(spec[1]);
05059 Gecode::unshare(home, x0,x1);
05060 return;
05061 }
05062 #endif
05063 throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::unshare");
05064 }
05065 break;
05066 case 3:
05067 {
05068 #if defined(GECODE_HAS_INT_VARS)
05069 if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
05070 isEnum_IntConLevel(spec[1]) &&
05071 isEnum_PropKind(spec[2]))
05072 {
05073 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
05074 Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
05075 for (int i=a0.size(); i--;)
05076 x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
05077 Gecode::IntConLevel x1 = toEnum_IntConLevel(spec[1]);
05078 Gecode::PropKind x2 = toEnum_PropKind(spec[2]);
05079 Gecode::unshare(home, x0,x1,x2);
05080 return;
05081 }
05082 #endif
05083 #if defined(GECODE_HAS_INT_VARS)
05084 if (isVarArgs<Gecode::BoolVar>(vm, spec[0]) &&
05085 isEnum_IntConLevel(spec[1]) &&
05086 isEnum_PropKind(spec[2]))
05087 {
05088 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
05089 Gecode::VarArgArray<Gecode::BoolVar> x0(a0.size());
05090 for (int i=a0.size(); i--;)
05091 x0[i] = Gecode::BoolVar(vm.var(a0[i]->toVar()));
05092 Gecode::IntConLevel x1 = toEnum_IntConLevel(spec[1]);
05093 Gecode::PropKind x2 = toEnum_PropKind(spec[2]);
05094 Gecode::unshare(home, x0,x1,x2);
05095 return;
05096 }
05097 #endif
05098 throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::unshare");
05099 }
05100 break;
05101 default: throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::unshare");
05102 }
05103 }
05104 };
05105
05106 class Register_weights {
05107 public:
05109 static Gecode::Support::Symbol ati(void) {
05110 return "Gecode::Post::weights";
05111 }
05112
05114 static void post(Gecode::Space* home, Gecode::Reflection::VarMap& vm,
05115 const Gecode::Reflection::ActorSpec& spec) {
05116 switch(spec.noOfArgs()) {
05117 case 4:
05118 {
05119 #if defined(GECODE_HAS_SET_VARS)
05120 if (spec[0]->isIntArray() &&
05121 spec[1]->isIntArray() &&
05122 isVar<Gecode::SetVar>(vm, spec[2]) &&
05123 isVar<Gecode::IntVar>(vm, spec[3]))
05124 {
05125 Gecode::Reflection::IntArrayArg& a0 = *spec[0]->toIntArray();
05126 Gecode::IntArgs x0(a0.size());
05127 for (int i=a0.size(); i--;) x0[i] = a0[i];
05128 Gecode::Reflection::IntArrayArg& a1 = *spec[1]->toIntArray();
05129 Gecode::IntArgs x1(a1.size());
05130 for (int i=a1.size(); i--;) x1[i] = a1[i];
05131 Gecode::SetVar x2(vm.var(spec[2]->toVar()));
05132 Gecode::IntVar x3(vm.var(spec[3]->toVar()));
05133 Gecode::weights(home, x0,x1,x2,x3);
05134 return;
05135 }
05136 #endif
05137 throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::weights");
05138 }
05139 break;
05140 default: throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::weights");
05141 }
05142 }
05143 };
05144
05145 class Register_linear {
05146 public:
05148 static Gecode::Support::Symbol ati(void) {
05149 return "Gecode::Post::linear";
05150 }
05151
05153 static void post(Gecode::Space* home, Gecode::Reflection::VarMap& vm,
05154 const Gecode::Reflection::ActorSpec& spec) {
05155 switch(spec.noOfArgs()) {
05156 case 3:
05157 {
05158 #if defined(GECODE_HAS_INT_VARS)
05159 if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
05160 isEnum_IntRelType(spec[1]) &&
05161 spec[2]->isInt())
05162 {
05163 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
05164 Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
05165 for (int i=a0.size(); i--;)
05166 x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
05167 Gecode::IntRelType x1 = toEnum_IntRelType(spec[1]);
05168 int x2 = static_cast<int>(spec[2]->toInt());
05169 Gecode::linear(home, x0,x1,x2);
05170 return;
05171 }
05172 #endif
05173 #if defined(GECODE_HAS_INT_VARS)
05174 if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
05175 isEnum_IntRelType(spec[1]) &&
05176 isVar<Gecode::IntVar>(vm, spec[2]))
05177 {
05178 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
05179 Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
05180 for (int i=a0.size(); i--;)
05181 x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
05182 Gecode::IntRelType x1 = toEnum_IntRelType(spec[1]);
05183 Gecode::IntVar x2(vm.var(spec[2]->toVar()));
05184 Gecode::linear(home, x0,x1,x2);
05185 return;
05186 }
05187 #endif
05188 #if defined(GECODE_HAS_INT_VARS)
05189 if (isVarArgs<Gecode::BoolVar>(vm, spec[0]) &&
05190 isEnum_IntRelType(spec[1]) &&
05191 spec[2]->isInt())
05192 {
05193 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
05194 Gecode::VarArgArray<Gecode::BoolVar> x0(a0.size());
05195 for (int i=a0.size(); i--;)
05196 x0[i] = Gecode::BoolVar(vm.var(a0[i]->toVar()));
05197 Gecode::IntRelType x1 = toEnum_IntRelType(spec[1]);
05198 int x2 = static_cast<int>(spec[2]->toInt());
05199 Gecode::linear(home, x0,x1,x2);
05200 return;
05201 }
05202 #endif
05203 #if defined(GECODE_HAS_INT_VARS)
05204 if (isVarArgs<Gecode::BoolVar>(vm, spec[0]) &&
05205 isEnum_IntRelType(spec[1]) &&
05206 isVar<Gecode::IntVar>(vm, spec[2]))
05207 {
05208 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
05209 Gecode::VarArgArray<Gecode::BoolVar> x0(a0.size());
05210 for (int i=a0.size(); i--;)
05211 x0[i] = Gecode::BoolVar(vm.var(a0[i]->toVar()));
05212 Gecode::IntRelType x1 = toEnum_IntRelType(spec[1]);
05213 Gecode::IntVar x2(vm.var(spec[2]->toVar()));
05214 Gecode::linear(home, x0,x1,x2);
05215 return;
05216 }
05217 #endif
05218 throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::linear");
05219 }
05220 break;
05221 case 4:
05222 {
05223 #if defined(GECODE_HAS_INT_VARS)
05224 if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
05225 isEnum_IntRelType(spec[1]) &&
05226 spec[2]->isInt() &&
05227 isEnum_IntConLevel(spec[3]))
05228 {
05229 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
05230 Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
05231 for (int i=a0.size(); i--;)
05232 x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
05233 Gecode::IntRelType x1 = toEnum_IntRelType(spec[1]);
05234 int x2 = static_cast<int>(spec[2]->toInt());
05235 Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
05236 Gecode::linear(home, x0,x1,x2,x3);
05237 return;
05238 }
05239 #endif
05240 #if defined(GECODE_HAS_INT_VARS)
05241 if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
05242 isEnum_IntRelType(spec[1]) &&
05243 isVar<Gecode::IntVar>(vm, spec[2]) &&
05244 isEnum_IntConLevel(spec[3]))
05245 {
05246 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
05247 Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
05248 for (int i=a0.size(); i--;)
05249 x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
05250 Gecode::IntRelType x1 = toEnum_IntRelType(spec[1]);
05251 Gecode::IntVar x2(vm.var(spec[2]->toVar()));
05252 Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
05253 Gecode::linear(home, x0,x1,x2,x3);
05254 return;
05255 }
05256 #endif
05257 #if defined(GECODE_HAS_INT_VARS)
05258 if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
05259 isEnum_IntRelType(spec[1]) &&
05260 spec[2]->isInt() &&
05261 isVar<Gecode::BoolVar>(vm, spec[3]))
05262 {
05263 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
05264 Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
05265 for (int i=a0.size(); i--;)
05266 x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
05267 Gecode::IntRelType x1 = toEnum_IntRelType(spec[1]);
05268 int x2 = static_cast<int>(spec[2]->toInt());
05269 Gecode::BoolVar x3(vm.var(spec[3]->toVar()));
05270 Gecode::linear(home, x0,x1,x2,x3);
05271 return;
05272 }
05273 #endif
05274 #if defined(GECODE_HAS_INT_VARS)
05275 if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
05276 isEnum_IntRelType(spec[1]) &&
05277 isVar<Gecode::IntVar>(vm, spec[2]) &&
05278 isVar<Gecode::BoolVar>(vm, spec[3]))
05279 {
05280 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
05281 Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
05282 for (int i=a0.size(); i--;)
05283 x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
05284 Gecode::IntRelType x1 = toEnum_IntRelType(spec[1]);
05285 Gecode::IntVar x2(vm.var(spec[2]->toVar()));
05286 Gecode::BoolVar x3(vm.var(spec[3]->toVar()));
05287 Gecode::linear(home, x0,x1,x2,x3);
05288 return;
05289 }
05290 #endif
05291 #if defined(GECODE_HAS_INT_VARS)
05292 if (spec[0]->isIntArray() &&
05293 isVarArgs<Gecode::IntVar>(vm, spec[1]) &&
05294 isEnum_IntRelType(spec[2]) &&
05295 spec[3]->isInt())
05296 {
05297 Gecode::Reflection::IntArrayArg& a0 = *spec[0]->toIntArray();
05298 Gecode::IntArgs x0(a0.size());
05299 for (int i=a0.size(); i--;) x0[i] = a0[i];
05300 Gecode::Reflection::ArrayArg& a1 = *spec[1]->toArray();
05301 Gecode::VarArgArray<Gecode::IntVar> x1(a1.size());
05302 for (int i=a1.size(); i--;)
05303 x1[i] = Gecode::IntVar(vm.var(a1[i]->toVar()));
05304 Gecode::IntRelType x2 = toEnum_IntRelType(spec[2]);
05305 int x3 = static_cast<int>(spec[3]->toInt());
05306 Gecode::linear(home, x0,x1,x2,x3);
05307 return;
05308 }
05309 #endif
05310 #if defined(GECODE_HAS_INT_VARS)
05311 if (spec[0]->isIntArray() &&
05312 isVarArgs<Gecode::IntVar>(vm, spec[1]) &&
05313 isEnum_IntRelType(spec[2]) &&
05314 isVar<Gecode::IntVar>(vm, spec[3]))
05315 {
05316 Gecode::Reflection::IntArrayArg& a0 = *spec[0]->toIntArray();
05317 Gecode::IntArgs x0(a0.size());
05318 for (int i=a0.size(); i--;) x0[i] = a0[i];
05319 Gecode::Reflection::ArrayArg& a1 = *spec[1]->toArray();
05320 Gecode::VarArgArray<Gecode::IntVar> x1(a1.size());
05321 for (int i=a1.size(); i--;)
05322 x1[i] = Gecode::IntVar(vm.var(a1[i]->toVar()));
05323 Gecode::IntRelType x2 = toEnum_IntRelType(spec[2]);
05324 Gecode::IntVar x3(vm.var(spec[3]->toVar()));
05325 Gecode::linear(home, x0,x1,x2,x3);
05326 return;
05327 }
05328 #endif
05329 #if defined(GECODE_HAS_INT_VARS)
05330 if (isVarArgs<Gecode::BoolVar>(vm, spec[0]) &&
05331 isEnum_IntRelType(spec[1]) &&
05332 spec[2]->isInt() &&
05333 isEnum_IntConLevel(spec[3]))
05334 {
05335 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
05336 Gecode::VarArgArray<Gecode::BoolVar> x0(a0.size());
05337 for (int i=a0.size(); i--;)
05338 x0[i] = Gecode::BoolVar(vm.var(a0[i]->toVar()));
05339 Gecode::IntRelType x1 = toEnum_IntRelType(spec[1]);
05340 int x2 = static_cast<int>(spec[2]->toInt());
05341 Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
05342 Gecode::linear(home, x0,x1,x2,x3);
05343 return;
05344 }
05345 #endif
05346 #if defined(GECODE_HAS_INT_VARS)
05347 if (isVarArgs<Gecode::BoolVar>(vm, spec[0]) &&
05348 isEnum_IntRelType(spec[1]) &&
05349 spec[2]->isInt() &&
05350 isVar<Gecode::BoolVar>(vm, spec[3]))
05351 {
05352 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
05353 Gecode::VarArgArray<Gecode::BoolVar> x0(a0.size());
05354 for (int i=a0.size(); i--;)
05355 x0[i] = Gecode::BoolVar(vm.var(a0[i]->toVar()));
05356 Gecode::IntRelType x1 = toEnum_IntRelType(spec[1]);
05357 int x2 = static_cast<int>(spec[2]->toInt());
05358 Gecode::BoolVar x3(vm.var(spec[3]->toVar()));
05359 Gecode::linear(home, x0,x1,x2,x3);
05360 return;
05361 }
05362 #endif
05363 #if defined(GECODE_HAS_INT_VARS)
05364 if (isVarArgs<Gecode::BoolVar>(vm, spec[0]) &&
05365 isEnum_IntRelType(spec[1]) &&
05366 isVar<Gecode::IntVar>(vm, spec[2]) &&
05367 isEnum_IntConLevel(spec[3]))
05368 {
05369 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
05370 Gecode::VarArgArray<Gecode::BoolVar> x0(a0.size());
05371 for (int i=a0.size(); i--;)
05372 x0[i] = Gecode::BoolVar(vm.var(a0[i]->toVar()));
05373 Gecode::IntRelType x1 = toEnum_IntRelType(spec[1]);
05374 Gecode::IntVar x2(vm.var(spec[2]->toVar()));
05375 Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
05376 Gecode::linear(home, x0,x1,x2,x3);
05377 return;
05378 }
05379 #endif
05380 #if defined(GECODE_HAS_INT_VARS)
05381 if (isVarArgs<Gecode::BoolVar>(vm, spec[0]) &&
05382 isEnum_IntRelType(spec[1]) &&
05383 isVar<Gecode::IntVar>(vm, spec[2]) &&
05384 isVar<Gecode::BoolVar>(vm, spec[3]))
05385 {
05386 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
05387 Gecode::VarArgArray<Gecode::BoolVar> x0(a0.size());
05388 for (int i=a0.size(); i--;)
05389 x0[i] = Gecode::BoolVar(vm.var(a0[i]->toVar()));
05390 Gecode::IntRelType x1 = toEnum_IntRelType(spec[1]);
05391 Gecode::IntVar x2(vm.var(spec[2]->toVar()));
05392 Gecode::BoolVar x3(vm.var(spec[3]->toVar()));
05393 Gecode::linear(home, x0,x1,x2,x3);
05394 return;
05395 }
05396 #endif
05397 #if defined(GECODE_HAS_INT_VARS)
05398 if (spec[0]->isIntArray() &&
05399 isVarArgs<Gecode::BoolVar>(vm, spec[1]) &&
05400 isEnum_IntRelType(spec[2]) &&
05401 spec[3]->isInt())
05402 {
05403 Gecode::Reflection::IntArrayArg& a0 = *spec[0]->toIntArray();
05404 Gecode::IntArgs x0(a0.size());
05405 for (int i=a0.size(); i--;) x0[i] = a0[i];
05406 Gecode::Reflection::ArrayArg& a1 = *spec[1]->toArray();
05407 Gecode::VarArgArray<Gecode::BoolVar> x1(a1.size());
05408 for (int i=a1.size(); i--;)
05409 x1[i] = Gecode::BoolVar(vm.var(a1[i]->toVar()));
05410 Gecode::IntRelType x2 = toEnum_IntRelType(spec[2]);
05411 int x3 = static_cast<int>(spec[3]->toInt());
05412 Gecode::linear(home, x0,x1,x2,x3);
05413 return;
05414 }
05415 #endif
05416 #if defined(GECODE_HAS_INT_VARS)
05417 if (spec[0]->isIntArray() &&
05418 isVarArgs<Gecode::BoolVar>(vm, spec[1]) &&
05419 isEnum_IntRelType(spec[2]) &&
05420 isVar<Gecode::IntVar>(vm, spec[3]))
05421 {
05422 Gecode::Reflection::IntArrayArg& a0 = *spec[0]->toIntArray();
05423 Gecode::IntArgs x0(a0.size());
05424 for (int i=a0.size(); i--;) x0[i] = a0[i];
05425 Gecode::Reflection::ArrayArg& a1 = *spec[1]->toArray();
05426 Gecode::VarArgArray<Gecode::BoolVar> x1(a1.size());
05427 for (int i=a1.size(); i--;)
05428 x1[i] = Gecode::BoolVar(vm.var(a1[i]->toVar()));
05429 Gecode::IntRelType x2 = toEnum_IntRelType(spec[2]);
05430 Gecode::IntVar x3(vm.var(spec[3]->toVar()));
05431 Gecode::linear(home, x0,x1,x2,x3);
05432 return;
05433 }
05434 #endif
05435 throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::linear");
05436 }
05437 break;
05438 case 5:
05439 {
05440 #if defined(GECODE_HAS_INT_VARS)
05441 if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
05442 isEnum_IntRelType(spec[1]) &&
05443 spec[2]->isInt() &&
05444 isEnum_IntConLevel(spec[3]) &&
05445 isEnum_PropKind(spec[4]))
05446 {
05447 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
05448 Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
05449 for (int i=a0.size(); i--;)
05450 x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
05451 Gecode::IntRelType x1 = toEnum_IntRelType(spec[1]);
05452 int x2 = static_cast<int>(spec[2]->toInt());
05453 Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
05454 Gecode::PropKind x4 = toEnum_PropKind(spec[4]);
05455 Gecode::linear(home, x0,x1,x2,x3,x4);
05456 return;
05457 }
05458 #endif
05459 #if defined(GECODE_HAS_INT_VARS)
05460 if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
05461 isEnum_IntRelType(spec[1]) &&
05462 isVar<Gecode::IntVar>(vm, spec[2]) &&
05463 isEnum_IntConLevel(spec[3]) &&
05464 isEnum_PropKind(spec[4]))
05465 {
05466 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
05467 Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
05468 for (int i=a0.size(); i--;)
05469 x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
05470 Gecode::IntRelType x1 = toEnum_IntRelType(spec[1]);
05471 Gecode::IntVar x2(vm.var(spec[2]->toVar()));
05472 Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
05473 Gecode::PropKind x4 = toEnum_PropKind(spec[4]);
05474 Gecode::linear(home, x0,x1,x2,x3,x4);
05475 return;
05476 }
05477 #endif
05478 #if defined(GECODE_HAS_INT_VARS)
05479 if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
05480 isEnum_IntRelType(spec[1]) &&
05481 spec[2]->isInt() &&
05482 isVar<Gecode::BoolVar>(vm, spec[3]) &&
05483 isEnum_IntConLevel(spec[4]))
05484 {
05485 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
05486 Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
05487 for (int i=a0.size(); i--;)
05488 x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
05489 Gecode::IntRelType x1 = toEnum_IntRelType(spec[1]);
05490 int x2 = static_cast<int>(spec[2]->toInt());
05491 Gecode::BoolVar x3(vm.var(spec[3]->toVar()));
05492 Gecode::IntConLevel x4 = toEnum_IntConLevel(spec[4]);
05493 Gecode::linear(home, x0,x1,x2,x3,x4);
05494 return;
05495 }
05496 #endif
05497 #if defined(GECODE_HAS_INT_VARS)
05498 if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
05499 isEnum_IntRelType(spec[1]) &&
05500 isVar<Gecode::IntVar>(vm, spec[2]) &&
05501 isVar<Gecode::BoolVar>(vm, spec[3]) &&
05502 isEnum_IntConLevel(spec[4]))
05503 {
05504 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
05505 Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
05506 for (int i=a0.size(); i--;)
05507 x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
05508 Gecode::IntRelType x1 = toEnum_IntRelType(spec[1]);
05509 Gecode::IntVar x2(vm.var(spec[2]->toVar()));
05510 Gecode::BoolVar x3(vm.var(spec[3]->toVar()));
05511 Gecode::IntConLevel x4 = toEnum_IntConLevel(spec[4]);
05512 Gecode::linear(home, x0,x1,x2,x3,x4);
05513 return;
05514 }
05515 #endif
05516 #if defined(GECODE_HAS_INT_VARS)
05517 if (spec[0]->isIntArray() &&
05518 isVarArgs<Gecode::IntVar>(vm, spec[1]) &&
05519 isEnum_IntRelType(spec[2]) &&
05520 spec[3]->isInt() &&
05521 isEnum_IntConLevel(spec[4]))
05522 {
05523 Gecode::Reflection::IntArrayArg& a0 = *spec[0]->toIntArray();
05524 Gecode::IntArgs x0(a0.size());
05525 for (int i=a0.size(); i--;) x0[i] = a0[i];
05526 Gecode::Reflection::ArrayArg& a1 = *spec[1]->toArray();
05527 Gecode::VarArgArray<Gecode::IntVar> x1(a1.size());
05528 for (int i=a1.size(); i--;)
05529 x1[i] = Gecode::IntVar(vm.var(a1[i]->toVar()));
05530 Gecode::IntRelType x2 = toEnum_IntRelType(spec[2]);
05531 int x3 = static_cast<int>(spec[3]->toInt());
05532 Gecode::IntConLevel x4 = toEnum_IntConLevel(spec[4]);
05533 Gecode::linear(home, x0,x1,x2,x3,x4);
05534 return;
05535 }
05536 #endif
05537 #if defined(GECODE_HAS_INT_VARS)
05538 if (spec[0]->isIntArray() &&
05539 isVarArgs<Gecode::IntVar>(vm, spec[1]) &&
05540 isEnum_IntRelType(spec[2]) &&
05541 isVar<Gecode::IntVar>(vm, spec[3]) &&
05542 isEnum_IntConLevel(spec[4]))
05543 {
05544 Gecode::Reflection::IntArrayArg& a0 = *spec[0]->toIntArray();
05545 Gecode::IntArgs x0(a0.size());
05546 for (int i=a0.size(); i--;) x0[i] = a0[i];
05547 Gecode::Reflection::ArrayArg& a1 = *spec[1]->toArray();
05548 Gecode::VarArgArray<Gecode::IntVar> x1(a1.size());
05549 for (int i=a1.size(); i--;)
05550 x1[i] = Gecode::IntVar(vm.var(a1[i]->toVar()));
05551 Gecode::IntRelType x2 = toEnum_IntRelType(spec[2]);
05552 Gecode::IntVar x3(vm.var(spec[3]->toVar()));
05553 Gecode::IntConLevel x4 = toEnum_IntConLevel(spec[4]);
05554 Gecode::linear(home, x0,x1,x2,x3,x4);
05555 return;
05556 }
05557 #endif
05558 #if defined(GECODE_HAS_INT_VARS)
05559 if (spec[0]->isIntArray() &&
05560 isVarArgs<Gecode::IntVar>(vm, spec[1]) &&
05561 isEnum_IntRelType(spec[2]) &&
05562 spec[3]->isInt() &&
05563 isVar<Gecode::BoolVar>(vm, spec[4]))
05564 {
05565 Gecode::Reflection::IntArrayArg& a0 = *spec[0]->toIntArray();
05566 Gecode::IntArgs x0(a0.size());
05567 for (int i=a0.size(); i--;) x0[i] = a0[i];
05568 Gecode::Reflection::ArrayArg& a1 = *spec[1]->toArray();
05569 Gecode::VarArgArray<Gecode::IntVar> x1(a1.size());
05570 for (int i=a1.size(); i--;)
05571 x1[i] = Gecode::IntVar(vm.var(a1[i]->toVar()));
05572 Gecode::IntRelType x2 = toEnum_IntRelType(spec[2]);
05573 int x3 = static_cast<int>(spec[3]->toInt());
05574 Gecode::BoolVar x4(vm.var(spec[4]->toVar()));
05575 Gecode::linear(home, x0,x1,x2,x3,x4);
05576 return;
05577 }
05578 #endif
05579 #if defined(GECODE_HAS_INT_VARS)
05580 if (spec[0]->isIntArray() &&
05581 isVarArgs<Gecode::IntVar>(vm, spec[1]) &&
05582 isEnum_IntRelType(spec[2]) &&
05583 isVar<Gecode::IntVar>(vm, spec[3]) &&
05584 isVar<Gecode::BoolVar>(vm, spec[4]))
05585 {
05586 Gecode::Reflection::IntArrayArg& a0 = *spec[0]->toIntArray();
05587 Gecode::IntArgs x0(a0.size());
05588 for (int i=a0.size(); i--;) x0[i] = a0[i];
05589 Gecode::Reflection::ArrayArg& a1 = *spec[1]->toArray();
05590 Gecode::VarArgArray<Gecode::IntVar> x1(a1.size());
05591 for (int i=a1.size(); i--;)
05592 x1[i] = Gecode::IntVar(vm.var(a1[i]->toVar()));
05593 Gecode::IntRelType x2 = toEnum_IntRelType(spec[2]);
05594 Gecode::IntVar x3(vm.var(spec[3]->toVar()));
05595 Gecode::BoolVar x4(vm.var(spec[4]->toVar()));
05596 Gecode::linear(home, x0,x1,x2,x3,x4);
05597 return;
05598 }
05599 #endif
05600 #if defined(GECODE_HAS_INT_VARS)
05601 if (isVarArgs<Gecode::BoolVar>(vm, spec[0]) &&
05602 isEnum_IntRelType(spec[1]) &&
05603 spec[2]->isInt() &&
05604 isEnum_IntConLevel(spec[3]) &&
05605 isEnum_PropKind(spec[4]))
05606 {
05607 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
05608 Gecode::VarArgArray<Gecode::BoolVar> x0(a0.size());
05609 for (int i=a0.size(); i--;)
05610 x0[i] = Gecode::BoolVar(vm.var(a0[i]->toVar()));
05611 Gecode::IntRelType x1 = toEnum_IntRelType(spec[1]);
05612 int x2 = static_cast<int>(spec[2]->toInt());
05613 Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
05614 Gecode::PropKind x4 = toEnum_PropKind(spec[4]);
05615 Gecode::linear(home, x0,x1,x2,x3,x4);
05616 return;
05617 }
05618 #endif
05619 #if defined(GECODE_HAS_INT_VARS)
05620 if (isVarArgs<Gecode::BoolVar>(vm, spec[0]) &&
05621 isEnum_IntRelType(spec[1]) &&
05622 spec[2]->isInt() &&
05623 isVar<Gecode::BoolVar>(vm, spec[3]) &&
05624 isEnum_IntConLevel(spec[4]))
05625 {
05626 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
05627 Gecode::VarArgArray<Gecode::BoolVar> x0(a0.size());
05628 for (int i=a0.size(); i--;)
05629 x0[i] = Gecode::BoolVar(vm.var(a0[i]->toVar()));
05630 Gecode::IntRelType x1 = toEnum_IntRelType(spec[1]);
05631 int x2 = static_cast<int>(spec[2]->toInt());
05632 Gecode::BoolVar x3(vm.var(spec[3]->toVar()));
05633 Gecode::IntConLevel x4 = toEnum_IntConLevel(spec[4]);
05634 Gecode::linear(home, x0,x1,x2,x3,x4);
05635 return;
05636 }
05637 #endif
05638 #if defined(GECODE_HAS_INT_VARS)
05639 if (isVarArgs<Gecode::BoolVar>(vm, spec[0]) &&
05640 isEnum_IntRelType(spec[1]) &&
05641 isVar<Gecode::IntVar>(vm, spec[2]) &&
05642 isEnum_IntConLevel(spec[3]) &&
05643 isEnum_PropKind(spec[4]))
05644 {
05645 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
05646 Gecode::VarArgArray<Gecode::BoolVar> x0(a0.size());
05647 for (int i=a0.size(); i--;)
05648 x0[i] = Gecode::BoolVar(vm.var(a0[i]->toVar()));
05649 Gecode::IntRelType x1 = toEnum_IntRelType(spec[1]);
05650 Gecode::IntVar x2(vm.var(spec[2]->toVar()));
05651 Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
05652 Gecode::PropKind x4 = toEnum_PropKind(spec[4]);
05653 Gecode::linear(home, x0,x1,x2,x3,x4);
05654 return;
05655 }
05656 #endif
05657 #if defined(GECODE_HAS_INT_VARS)
05658 if (isVarArgs<Gecode::BoolVar>(vm, spec[0]) &&
05659 isEnum_IntRelType(spec[1]) &&
05660 isVar<Gecode::IntVar>(vm, spec[2]) &&
05661 isVar<Gecode::BoolVar>(vm, spec[3]) &&
05662 isEnum_IntConLevel(spec[4]))
05663 {
05664 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
05665 Gecode::VarArgArray<Gecode::BoolVar> x0(a0.size());
05666 for (int i=a0.size(); i--;)
05667 x0[i] = Gecode::BoolVar(vm.var(a0[i]->toVar()));
05668 Gecode::IntRelType x1 = toEnum_IntRelType(spec[1]);
05669 Gecode::IntVar x2(vm.var(spec[2]->toVar()));
05670 Gecode::BoolVar x3(vm.var(spec[3]->toVar()));
05671 Gecode::IntConLevel x4 = toEnum_IntConLevel(spec[4]);
05672 Gecode::linear(home, x0,x1,x2,x3,x4);
05673 return;
05674 }
05675 #endif
05676 #if defined(GECODE_HAS_INT_VARS)
05677 if (spec[0]->isIntArray() &&
05678 isVarArgs<Gecode::BoolVar>(vm, spec[1]) &&
05679 isEnum_IntRelType(spec[2]) &&
05680 spec[3]->isInt() &&
05681 isEnum_IntConLevel(spec[4]))
05682 {
05683 Gecode::Reflection::IntArrayArg& a0 = *spec[0]->toIntArray();
05684 Gecode::IntArgs x0(a0.size());
05685 for (int i=a0.size(); i--;) x0[i] = a0[i];
05686 Gecode::Reflection::ArrayArg& a1 = *spec[1]->toArray();
05687 Gecode::VarArgArray<Gecode::BoolVar> x1(a1.size());
05688 for (int i=a1.size(); i--;)
05689 x1[i] = Gecode::BoolVar(vm.var(a1[i]->toVar()));
05690 Gecode::IntRelType x2 = toEnum_IntRelType(spec[2]);
05691 int x3 = static_cast<int>(spec[3]->toInt());
05692 Gecode::IntConLevel x4 = toEnum_IntConLevel(spec[4]);
05693 Gecode::linear(home, x0,x1,x2,x3,x4);
05694 return;
05695 }
05696 #endif
05697 #if defined(GECODE_HAS_INT_VARS)
05698 if (spec[0]->isIntArray() &&
05699 isVarArgs<Gecode::BoolVar>(vm, spec[1]) &&
05700 isEnum_IntRelType(spec[2]) &&
05701 spec[3]->isInt() &&
05702 isVar<Gecode::BoolVar>(vm, spec[4]))
05703 {
05704 Gecode::Reflection::IntArrayArg& a0 = *spec[0]->toIntArray();
05705 Gecode::IntArgs x0(a0.size());
05706 for (int i=a0.size(); i--;) x0[i] = a0[i];
05707 Gecode::Reflection::ArrayArg& a1 = *spec[1]->toArray();
05708 Gecode::VarArgArray<Gecode::BoolVar> x1(a1.size());
05709 for (int i=a1.size(); i--;)
05710 x1[i] = Gecode::BoolVar(vm.var(a1[i]->toVar()));
05711 Gecode::IntRelType x2 = toEnum_IntRelType(spec[2]);
05712 int x3 = static_cast<int>(spec[3]->toInt());
05713 Gecode::BoolVar x4(vm.var(spec[4]->toVar()));
05714 Gecode::linear(home, x0,x1,x2,x3,x4);
05715 return;
05716 }
05717 #endif
05718 #if defined(GECODE_HAS_INT_VARS)
05719 if (spec[0]->isIntArray() &&
05720 isVarArgs<Gecode::BoolVar>(vm, spec[1]) &&
05721 isEnum_IntRelType(spec[2]) &&
05722 isVar<Gecode::IntVar>(vm, spec[3]) &&
05723 isEnum_IntConLevel(spec[4]))
05724 {
05725 Gecode::Reflection::IntArrayArg& a0 = *spec[0]->toIntArray();
05726 Gecode::IntArgs x0(a0.size());
05727 for (int i=a0.size(); i--;) x0[i] = a0[i];
05728 Gecode::Reflection::ArrayArg& a1 = *spec[1]->toArray();
05729 Gecode::VarArgArray<Gecode::BoolVar> x1(a1.size());
05730 for (int i=a1.size(); i--;)
05731 x1[i] = Gecode::BoolVar(vm.var(a1[i]->toVar()));
05732 Gecode::IntRelType x2 = toEnum_IntRelType(spec[2]);
05733 Gecode::IntVar x3(vm.var(spec[3]->toVar()));
05734 Gecode::IntConLevel x4 = toEnum_IntConLevel(spec[4]);
05735 Gecode::linear(home, x0,x1,x2,x3,x4);
05736 return;
05737 }
05738 #endif
05739 #if defined(GECODE_HAS_INT_VARS)
05740 if (spec[0]->isIntArray() &&
05741 isVarArgs<Gecode::BoolVar>(vm, spec[1]) &&
05742 isEnum_IntRelType(spec[2]) &&
05743 isVar<Gecode::IntVar>(vm, spec[3]) &&
05744 isVar<Gecode::BoolVar>(vm, spec[4]))
05745 {
05746 Gecode::Reflection::IntArrayArg& a0 = *spec[0]->toIntArray();
05747 Gecode::IntArgs x0(a0.size());
05748 for (int i=a0.size(); i--;) x0[i] = a0[i];
05749 Gecode::Reflection::ArrayArg& a1 = *spec[1]->toArray();
05750 Gecode::VarArgArray<Gecode::BoolVar> x1(a1.size());
05751 for (int i=a1.size(); i--;)
05752 x1[i] = Gecode::BoolVar(vm.var(a1[i]->toVar()));
05753 Gecode::IntRelType x2 = toEnum_IntRelType(spec[2]);
05754 Gecode::IntVar x3(vm.var(spec[3]->toVar()));
05755 Gecode::BoolVar x4(vm.var(spec[4]->toVar()));
05756 Gecode::linear(home, x0,x1,x2,x3,x4);
05757 return;
05758 }
05759 #endif
05760 throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::linear");
05761 }
05762 break;
05763 case 6:
05764 {
05765 #if defined(GECODE_HAS_INT_VARS)
05766 if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
05767 isEnum_IntRelType(spec[1]) &&
05768 spec[2]->isInt() &&
05769 isVar<Gecode::BoolVar>(vm, spec[3]) &&
05770 isEnum_IntConLevel(spec[4]) &&
05771 isEnum_PropKind(spec[5]))
05772 {
05773 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
05774 Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
05775 for (int i=a0.size(); i--;)
05776 x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
05777 Gecode::IntRelType x1 = toEnum_IntRelType(spec[1]);
05778 int x2 = static_cast<int>(spec[2]->toInt());
05779 Gecode::BoolVar x3(vm.var(spec[3]->toVar()));
05780 Gecode::IntConLevel x4 = toEnum_IntConLevel(spec[4]);
05781 Gecode::PropKind x5 = toEnum_PropKind(spec[5]);
05782 Gecode::linear(home, x0,x1,x2,x3,x4,x5);
05783 return;
05784 }
05785 #endif
05786 #if defined(GECODE_HAS_INT_VARS)
05787 if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
05788 isEnum_IntRelType(spec[1]) &&
05789 isVar<Gecode::IntVar>(vm, spec[2]) &&
05790 isVar<Gecode::BoolVar>(vm, spec[3]) &&
05791 isEnum_IntConLevel(spec[4]) &&
05792 isEnum_PropKind(spec[5]))
05793 {
05794 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
05795 Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
05796 for (int i=a0.size(); i--;)
05797 x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
05798 Gecode::IntRelType x1 = toEnum_IntRelType(spec[1]);
05799 Gecode::IntVar x2(vm.var(spec[2]->toVar()));
05800 Gecode::BoolVar x3(vm.var(spec[3]->toVar()));
05801 Gecode::IntConLevel x4 = toEnum_IntConLevel(spec[4]);
05802 Gecode::PropKind x5 = toEnum_PropKind(spec[5]);
05803 Gecode::linear(home, x0,x1,x2,x3,x4,x5);
05804 return;
05805 }
05806 #endif
05807 #if defined(GECODE_HAS_INT_VARS)
05808 if (spec[0]->isIntArray() &&
05809 isVarArgs<Gecode::IntVar>(vm, spec[1]) &&
05810 isEnum_IntRelType(spec[2]) &&
05811 spec[3]->isInt() &&
05812 isEnum_IntConLevel(spec[4]) &&
05813 isEnum_PropKind(spec[5]))
05814 {
05815 Gecode::Reflection::IntArrayArg& a0 = *spec[0]->toIntArray();
05816 Gecode::IntArgs x0(a0.size());
05817 for (int i=a0.size(); i--;) x0[i] = a0[i];
05818 Gecode::Reflection::ArrayArg& a1 = *spec[1]->toArray();
05819 Gecode::VarArgArray<Gecode::IntVar> x1(a1.size());
05820 for (int i=a1.size(); i--;)
05821 x1[i] = Gecode::IntVar(vm.var(a1[i]->toVar()));
05822 Gecode::IntRelType x2 = toEnum_IntRelType(spec[2]);
05823 int x3 = static_cast<int>(spec[3]->toInt());
05824 Gecode::IntConLevel x4 = toEnum_IntConLevel(spec[4]);
05825 Gecode::PropKind x5 = toEnum_PropKind(spec[5]);
05826 Gecode::linear(home, x0,x1,x2,x3,x4,x5);
05827 return;
05828 }
05829 #endif
05830 #if defined(GECODE_HAS_INT_VARS)
05831 if (spec[0]->isIntArray() &&
05832 isVarArgs<Gecode::IntVar>(vm, spec[1]) &&
05833 isEnum_IntRelType(spec[2]) &&
05834 isVar<Gecode::IntVar>(vm, spec[3]) &&
05835 isEnum_IntConLevel(spec[4]) &&
05836 isEnum_PropKind(spec[5]))
05837 {
05838 Gecode::Reflection::IntArrayArg& a0 = *spec[0]->toIntArray();
05839 Gecode::IntArgs x0(a0.size());
05840 for (int i=a0.size(); i--;) x0[i] = a0[i];
05841 Gecode::Reflection::ArrayArg& a1 = *spec[1]->toArray();
05842 Gecode::VarArgArray<Gecode::IntVar> x1(a1.size());
05843 for (int i=a1.size(); i--;)
05844 x1[i] = Gecode::IntVar(vm.var(a1[i]->toVar()));
05845 Gecode::IntRelType x2 = toEnum_IntRelType(spec[2]);
05846 Gecode::IntVar x3(vm.var(spec[3]->toVar()));
05847 Gecode::IntConLevel x4 = toEnum_IntConLevel(spec[4]);
05848 Gecode::PropKind x5 = toEnum_PropKind(spec[5]);
05849 Gecode::linear(home, x0,x1,x2,x3,x4,x5);
05850 return;
05851 }
05852 #endif
05853 #if defined(GECODE_HAS_INT_VARS)
05854 if (spec[0]->isIntArray() &&
05855 isVarArgs<Gecode::IntVar>(vm, spec[1]) &&
05856 isEnum_IntRelType(spec[2]) &&
05857 spec[3]->isInt() &&
05858 isVar<Gecode::BoolVar>(vm, spec[4]) &&
05859 isEnum_IntConLevel(spec[5]))
05860 {
05861 Gecode::Reflection::IntArrayArg& a0 = *spec[0]->toIntArray();
05862 Gecode::IntArgs x0(a0.size());
05863 for (int i=a0.size(); i--;) x0[i] = a0[i];
05864 Gecode::Reflection::ArrayArg& a1 = *spec[1]->toArray();
05865 Gecode::VarArgArray<Gecode::IntVar> x1(a1.size());
05866 for (int i=a1.size(); i--;)
05867 x1[i] = Gecode::IntVar(vm.var(a1[i]->toVar()));
05868 Gecode::IntRelType x2 = toEnum_IntRelType(spec[2]);
05869 int x3 = static_cast<int>(spec[3]->toInt());
05870 Gecode::BoolVar x4(vm.var(spec[4]->toVar()));
05871 Gecode::IntConLevel x5 = toEnum_IntConLevel(spec[5]);
05872 Gecode::linear(home, x0,x1,x2,x3,x4,x5);
05873 return;
05874 }
05875 #endif
05876 #if defined(GECODE_HAS_INT_VARS)
05877 if (spec[0]->isIntArray() &&
05878 isVarArgs<Gecode::IntVar>(vm, spec[1]) &&
05879 isEnum_IntRelType(spec[2]) &&
05880 isVar<Gecode::IntVar>(vm, spec[3]) &&
05881 isVar<Gecode::BoolVar>(vm, spec[4]) &&
05882 isEnum_IntConLevel(spec[5]))
05883 {
05884 Gecode::Reflection::IntArrayArg& a0 = *spec[0]->toIntArray();
05885 Gecode::IntArgs x0(a0.size());
05886 for (int i=a0.size(); i--;) x0[i] = a0[i];
05887 Gecode::Reflection::ArrayArg& a1 = *spec[1]->toArray();
05888 Gecode::VarArgArray<Gecode::IntVar> x1(a1.size());
05889 for (int i=a1.size(); i--;)
05890 x1[i] = Gecode::IntVar(vm.var(a1[i]->toVar()));
05891 Gecode::IntRelType x2 = toEnum_IntRelType(spec[2]);
05892 Gecode::IntVar x3(vm.var(spec[3]->toVar()));
05893 Gecode::BoolVar x4(vm.var(spec[4]->toVar()));
05894 Gecode::IntConLevel x5 = toEnum_IntConLevel(spec[5]);
05895 Gecode::linear(home, x0,x1,x2,x3,x4,x5);
05896 return;
05897 }
05898 #endif
05899 #if defined(GECODE_HAS_INT_VARS)
05900 if (isVarArgs<Gecode::BoolVar>(vm, spec[0]) &&
05901 isEnum_IntRelType(spec[1]) &&
05902 spec[2]->isInt() &&
05903 isVar<Gecode::BoolVar>(vm, spec[3]) &&
05904 isEnum_IntConLevel(spec[4]) &&
05905 isEnum_PropKind(spec[5]))
05906 {
05907 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
05908 Gecode::VarArgArray<Gecode::BoolVar> x0(a0.size());
05909 for (int i=a0.size(); i--;)
05910 x0[i] = Gecode::BoolVar(vm.var(a0[i]->toVar()));
05911 Gecode::IntRelType x1 = toEnum_IntRelType(spec[1]);
05912 int x2 = static_cast<int>(spec[2]->toInt());
05913 Gecode::BoolVar x3(vm.var(spec[3]->toVar()));
05914 Gecode::IntConLevel x4 = toEnum_IntConLevel(spec[4]);
05915 Gecode::PropKind x5 = toEnum_PropKind(spec[5]);
05916 Gecode::linear(home, x0,x1,x2,x3,x4,x5);
05917 return;
05918 }
05919 #endif
05920 #if defined(GECODE_HAS_INT_VARS)
05921 if (isVarArgs<Gecode::BoolVar>(vm, spec[0]) &&
05922 isEnum_IntRelType(spec[1]) &&
05923 isVar<Gecode::IntVar>(vm, spec[2]) &&
05924 isVar<Gecode::BoolVar>(vm, spec[3]) &&
05925 isEnum_IntConLevel(spec[4]) &&
05926 isEnum_PropKind(spec[5]))
05927 {
05928 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
05929 Gecode::VarArgArray<Gecode::BoolVar> x0(a0.size());
05930 for (int i=a0.size(); i--;)
05931 x0[i] = Gecode::BoolVar(vm.var(a0[i]->toVar()));
05932 Gecode::IntRelType x1 = toEnum_IntRelType(spec[1]);
05933 Gecode::IntVar x2(vm.var(spec[2]->toVar()));
05934 Gecode::BoolVar x3(vm.var(spec[3]->toVar()));
05935 Gecode::IntConLevel x4 = toEnum_IntConLevel(spec[4]);
05936 Gecode::PropKind x5 = toEnum_PropKind(spec[5]);
05937 Gecode::linear(home, x0,x1,x2,x3,x4,x5);
05938 return;
05939 }
05940 #endif
05941 #if defined(GECODE_HAS_INT_VARS)
05942 if (spec[0]->isIntArray() &&
05943 isVarArgs<Gecode::BoolVar>(vm, spec[1]) &&
05944 isEnum_IntRelType(spec[2]) &&
05945 spec[3]->isInt() &&
05946 isEnum_IntConLevel(spec[4]) &&
05947 isEnum_PropKind(spec[5]))
05948 {
05949 Gecode::Reflection::IntArrayArg& a0 = *spec[0]->toIntArray();
05950 Gecode::IntArgs x0(a0.size());
05951 for (int i=a0.size(); i--;) x0[i] = a0[i];
05952 Gecode::Reflection::ArrayArg& a1 = *spec[1]->toArray();
05953 Gecode::VarArgArray<Gecode::BoolVar> x1(a1.size());
05954 for (int i=a1.size(); i--;)
05955 x1[i] = Gecode::BoolVar(vm.var(a1[i]->toVar()));
05956 Gecode::IntRelType x2 = toEnum_IntRelType(spec[2]);
05957 int x3 = static_cast<int>(spec[3]->toInt());
05958 Gecode::IntConLevel x4 = toEnum_IntConLevel(spec[4]);
05959 Gecode::PropKind x5 = toEnum_PropKind(spec[5]);
05960 Gecode::linear(home, x0,x1,x2,x3,x4,x5);
05961 return;
05962 }
05963 #endif
05964 #if defined(GECODE_HAS_INT_VARS)
05965 if (spec[0]->isIntArray() &&
05966 isVarArgs<Gecode::BoolVar>(vm, spec[1]) &&
05967 isEnum_IntRelType(spec[2]) &&
05968 spec[3]->isInt() &&
05969 isVar<Gecode::BoolVar>(vm, spec[4]) &&
05970 isEnum_IntConLevel(spec[5]))
05971 {
05972 Gecode::Reflection::IntArrayArg& a0 = *spec[0]->toIntArray();
05973 Gecode::IntArgs x0(a0.size());
05974 for (int i=a0.size(); i--;) x0[i] = a0[i];
05975 Gecode::Reflection::ArrayArg& a1 = *spec[1]->toArray();
05976 Gecode::VarArgArray<Gecode::BoolVar> x1(a1.size());
05977 for (int i=a1.size(); i--;)
05978 x1[i] = Gecode::BoolVar(vm.var(a1[i]->toVar()));
05979 Gecode::IntRelType x2 = toEnum_IntRelType(spec[2]);
05980 int x3 = static_cast<int>(spec[3]->toInt());
05981 Gecode::BoolVar x4(vm.var(spec[4]->toVar()));
05982 Gecode::IntConLevel x5 = toEnum_IntConLevel(spec[5]);
05983 Gecode::linear(home, x0,x1,x2,x3,x4,x5);
05984 return;
05985 }
05986 #endif
05987 #if defined(GECODE_HAS_INT_VARS)
05988 if (spec[0]->isIntArray() &&
05989 isVarArgs<Gecode::BoolVar>(vm, spec[1]) &&
05990 isEnum_IntRelType(spec[2]) &&
05991 isVar<Gecode::IntVar>(vm, spec[3]) &&
05992 isEnum_IntConLevel(spec[4]) &&
05993 isEnum_PropKind(spec[5]))
05994 {
05995 Gecode::Reflection::IntArrayArg& a0 = *spec[0]->toIntArray();
05996 Gecode::IntArgs x0(a0.size());
05997 for (int i=a0.size(); i--;) x0[i] = a0[i];
05998 Gecode::Reflection::ArrayArg& a1 = *spec[1]->toArray();
05999 Gecode::VarArgArray<Gecode::BoolVar> x1(a1.size());
06000 for (int i=a1.size(); i--;)
06001 x1[i] = Gecode::BoolVar(vm.var(a1[i]->toVar()));
06002 Gecode::IntRelType x2 = toEnum_IntRelType(spec[2]);
06003 Gecode::IntVar x3(vm.var(spec[3]->toVar()));
06004 Gecode::IntConLevel x4 = toEnum_IntConLevel(spec[4]);
06005 Gecode::PropKind x5 = toEnum_PropKind(spec[5]);
06006 Gecode::linear(home, x0,x1,x2,x3,x4,x5);
06007 return;
06008 }
06009 #endif
06010 #if defined(GECODE_HAS_INT_VARS)
06011 if (spec[0]->isIntArray() &&
06012 isVarArgs<Gecode::BoolVar>(vm, spec[1]) &&
06013 isEnum_IntRelType(spec[2]) &&
06014 isVar<Gecode::IntVar>(vm, spec[3]) &&
06015 isVar<Gecode::BoolVar>(vm, spec[4]) &&
06016 isEnum_IntConLevel(spec[5]))
06017 {
06018 Gecode::Reflection::IntArrayArg& a0 = *spec[0]->toIntArray();
06019 Gecode::IntArgs x0(a0.size());
06020 for (int i=a0.size(); i--;) x0[i] = a0[i];
06021 Gecode::Reflection::ArrayArg& a1 = *spec[1]->toArray();
06022 Gecode::VarArgArray<Gecode::BoolVar> x1(a1.size());
06023 for (int i=a1.size(); i--;)
06024 x1[i] = Gecode::BoolVar(vm.var(a1[i]->toVar()));
06025 Gecode::IntRelType x2 = toEnum_IntRelType(spec[2]);
06026 Gecode::IntVar x3(vm.var(spec[3]->toVar()));
06027 Gecode::BoolVar x4(vm.var(spec[4]->toVar()));
06028 Gecode::IntConLevel x5 = toEnum_IntConLevel(spec[5]);
06029 Gecode::linear(home, x0,x1,x2,x3,x4,x5);
06030 return;
06031 }
06032 #endif
06033 throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::linear");
06034 }
06035 break;
06036 case 7:
06037 {
06038 #if defined(GECODE_HAS_INT_VARS)
06039 if (spec[0]->isIntArray() &&
06040 isVarArgs<Gecode::IntVar>(vm, spec[1]) &&
06041 isEnum_IntRelType(spec[2]) &&
06042 spec[3]->isInt() &&
06043 isVar<Gecode::BoolVar>(vm, spec[4]) &&
06044 isEnum_IntConLevel(spec[5]) &&
06045 isEnum_PropKind(spec[6]))
06046 {
06047 Gecode::Reflection::IntArrayArg& a0 = *spec[0]->toIntArray();
06048 Gecode::IntArgs x0(a0.size());
06049 for (int i=a0.size(); i--;) x0[i] = a0[i];
06050 Gecode::Reflection::ArrayArg& a1 = *spec[1]->toArray();
06051 Gecode::VarArgArray<Gecode::IntVar> x1(a1.size());
06052 for (int i=a1.size(); i--;)
06053 x1[i] = Gecode::IntVar(vm.var(a1[i]->toVar()));
06054 Gecode::IntRelType x2 = toEnum_IntRelType(spec[2]);
06055 int x3 = static_cast<int>(spec[3]->toInt());
06056 Gecode::BoolVar x4(vm.var(spec[4]->toVar()));
06057 Gecode::IntConLevel x5 = toEnum_IntConLevel(spec[5]);
06058 Gecode::PropKind x6 = toEnum_PropKind(spec[6]);
06059 Gecode::linear(home, x0,x1,x2,x3,x4,x5,x6);
06060 return;
06061 }
06062 #endif
06063 #if defined(GECODE_HAS_INT_VARS)
06064 if (spec[0]->isIntArray() &&
06065 isVarArgs<Gecode::IntVar>(vm, spec[1]) &&
06066 isEnum_IntRelType(spec[2]) &&
06067 isVar<Gecode::IntVar>(vm, spec[3]) &&
06068 isVar<Gecode::BoolVar>(vm, spec[4]) &&
06069 isEnum_IntConLevel(spec[5]) &&
06070 isEnum_PropKind(spec[6]))
06071 {
06072 Gecode::Reflection::IntArrayArg& a0 = *spec[0]->toIntArray();
06073 Gecode::IntArgs x0(a0.size());
06074 for (int i=a0.size(); i--;) x0[i] = a0[i];
06075 Gecode::Reflection::ArrayArg& a1 = *spec[1]->toArray();
06076 Gecode::VarArgArray<Gecode::IntVar> x1(a1.size());
06077 for (int i=a1.size(); i--;)
06078 x1[i] = Gecode::IntVar(vm.var(a1[i]->toVar()));
06079 Gecode::IntRelType x2 = toEnum_IntRelType(spec[2]);
06080 Gecode::IntVar x3(vm.var(spec[3]->toVar()));
06081 Gecode::BoolVar x4(vm.var(spec[4]->toVar()));
06082 Gecode::IntConLevel x5 = toEnum_IntConLevel(spec[5]);
06083 Gecode::PropKind x6 = toEnum_PropKind(spec[6]);
06084 Gecode::linear(home, x0,x1,x2,x3,x4,x5,x6);
06085 return;
06086 }
06087 #endif
06088 #if defined(GECODE_HAS_INT_VARS)
06089 if (spec[0]->isIntArray() &&
06090 isVarArgs<Gecode::BoolVar>(vm, spec[1]) &&
06091 isEnum_IntRelType(spec[2]) &&
06092 spec[3]->isInt() &&
06093 isVar<Gecode::BoolVar>(vm, spec[4]) &&
06094 isEnum_IntConLevel(spec[5]) &&
06095 isEnum_PropKind(spec[6]))
06096 {
06097 Gecode::Reflection::IntArrayArg& a0 = *spec[0]->toIntArray();
06098 Gecode::IntArgs x0(a0.size());
06099 for (int i=a0.size(); i--;) x0[i] = a0[i];
06100 Gecode::Reflection::ArrayArg& a1 = *spec[1]->toArray();
06101 Gecode::VarArgArray<Gecode::BoolVar> x1(a1.size());
06102 for (int i=a1.size(); i--;)
06103 x1[i] = Gecode::BoolVar(vm.var(a1[i]->toVar()));
06104 Gecode::IntRelType x2 = toEnum_IntRelType(spec[2]);
06105 int x3 = static_cast<int>(spec[3]->toInt());
06106 Gecode::BoolVar x4(vm.var(spec[4]->toVar()));
06107 Gecode::IntConLevel x5 = toEnum_IntConLevel(spec[5]);
06108 Gecode::PropKind x6 = toEnum_PropKind(spec[6]);
06109 Gecode::linear(home, x0,x1,x2,x3,x4,x5,x6);
06110 return;
06111 }
06112 #endif
06113 #if defined(GECODE_HAS_INT_VARS)
06114 if (spec[0]->isIntArray() &&
06115 isVarArgs<Gecode::BoolVar>(vm, spec[1]) &&
06116 isEnum_IntRelType(spec[2]) &&
06117 isVar<Gecode::IntVar>(vm, spec[3]) &&
06118 isVar<Gecode::BoolVar>(vm, spec[4]) &&
06119 isEnum_IntConLevel(spec[5]) &&
06120 isEnum_PropKind(spec[6]))
06121 {
06122 Gecode::Reflection::IntArrayArg& a0 = *spec[0]->toIntArray();
06123 Gecode::IntArgs x0(a0.size());
06124 for (int i=a0.size(); i--;) x0[i] = a0[i];
06125 Gecode::Reflection::ArrayArg& a1 = *spec[1]->toArray();
06126 Gecode::VarArgArray<Gecode::BoolVar> x1(a1.size());
06127 for (int i=a1.size(); i--;)
06128 x1[i] = Gecode::BoolVar(vm.var(a1[i]->toVar()));
06129 Gecode::IntRelType x2 = toEnum_IntRelType(spec[2]);
06130 Gecode::IntVar x3(vm.var(spec[3]->toVar()));
06131 Gecode::BoolVar x4(vm.var(spec[4]->toVar()));
06132 Gecode::IntConLevel x5 = toEnum_IntConLevel(spec[5]);
06133 Gecode::PropKind x6 = toEnum_PropKind(spec[6]);
06134 Gecode::linear(home, x0,x1,x2,x3,x4,x5,x6);
06135 return;
06136 }
06137 #endif
06138 throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::linear");
06139 }
06140 break;
06141 default: throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::linear");
06142 }
06143 }
06144 };
06145
06146 class Register_cumulatives {
06147 public:
06149 static Gecode::Support::Symbol ati(void) {
06150 return "Gecode::Post::cumulatives";
06151 }
06152
06154 static void post(Gecode::Space* home, Gecode::Reflection::VarMap& vm,
06155 const Gecode::Reflection::ActorSpec& spec) {
06156 switch(spec.noOfArgs()) {
06157 case 7:
06158 {
06159 #if defined(GECODE_HAS_INT_VARS)
06160 if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
06161 isVarArgs<Gecode::IntVar>(vm, spec[1]) &&
06162 isVarArgs<Gecode::IntVar>(vm, spec[2]) &&
06163 isVarArgs<Gecode::IntVar>(vm, spec[3]) &&
06164 isVarArgs<Gecode::IntVar>(vm, spec[4]) &&
06165 spec[5]->isIntArray() &&
06166 spec[6]->isInt())
06167 {
06168 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
06169 Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
06170 for (int i=a0.size(); i--;)
06171 x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
06172 Gecode::Reflection::ArrayArg& a1 = *spec[1]->toArray();
06173 Gecode::VarArgArray<Gecode::IntVar> x1(a1.size());
06174 for (int i=a1.size(); i--;)
06175 x1[i] = Gecode::IntVar(vm.var(a1[i]->toVar()));
06176 Gecode::Reflection::ArrayArg& a2 = *spec[2]->toArray();
06177 Gecode::VarArgArray<Gecode::IntVar> x2(a2.size());
06178 for (int i=a2.size(); i--;)
06179 x2[i] = Gecode::IntVar(vm.var(a2[i]->toVar()));
06180 Gecode::Reflection::ArrayArg& a3 = *spec[3]->toArray();
06181 Gecode::VarArgArray<Gecode::IntVar> x3(a3.size());
06182 for (int i=a3.size(); i--;)
06183 x3[i] = Gecode::IntVar(vm.var(a3[i]->toVar()));
06184 Gecode::Reflection::ArrayArg& a4 = *spec[4]->toArray();
06185 Gecode::VarArgArray<Gecode::IntVar> x4(a4.size());
06186 for (int i=a4.size(); i--;)
06187 x4[i] = Gecode::IntVar(vm.var(a4[i]->toVar()));
06188 Gecode::Reflection::IntArrayArg& a5 = *spec[5]->toIntArray();
06189 Gecode::IntArgs x5(a5.size());
06190 for (int i=a5.size(); i--;) x5[i] = a5[i];
06191 bool x6 = static_cast<bool>(spec[6]->toInt());
06192 Gecode::cumulatives(home, x0,x1,x2,x3,x4,x5,x6);
06193 return;
06194 }
06195 #endif
06196 #if defined(GECODE_HAS_INT_VARS)
06197 if (spec[0]->isIntArray() &&
06198 isVarArgs<Gecode::IntVar>(vm, spec[1]) &&
06199 isVarArgs<Gecode::IntVar>(vm, spec[2]) &&
06200 isVarArgs<Gecode::IntVar>(vm, spec[3]) &&
06201 isVarArgs<Gecode::IntVar>(vm, spec[4]) &&
06202 spec[5]->isIntArray() &&
06203 spec[6]->isInt())
06204 {
06205 Gecode::Reflection::IntArrayArg& a0 = *spec[0]->toIntArray();
06206 Gecode::IntArgs x0(a0.size());
06207 for (int i=a0.size(); i--;) x0[i] = a0[i];
06208 Gecode::Reflection::ArrayArg& a1 = *spec[1]->toArray();
06209 Gecode::VarArgArray<Gecode::IntVar> x1(a1.size());
06210 for (int i=a1.size(); i--;)
06211 x1[i] = Gecode::IntVar(vm.var(a1[i]->toVar()));
06212 Gecode::Reflection::ArrayArg& a2 = *spec[2]->toArray();
06213 Gecode::VarArgArray<Gecode::IntVar> x2(a2.size());
06214 for (int i=a2.size(); i--;)
06215 x2[i] = Gecode::IntVar(vm.var(a2[i]->toVar()));
06216 Gecode::Reflection::ArrayArg& a3 = *spec[3]->toArray();
06217 Gecode::VarArgArray<Gecode::IntVar> x3(a3.size());
06218 for (int i=a3.size(); i--;)
06219 x3[i] = Gecode::IntVar(vm.var(a3[i]->toVar()));
06220 Gecode::Reflection::ArrayArg& a4 = *spec[4]->toArray();
06221 Gecode::VarArgArray<Gecode::IntVar> x4(a4.size());
06222 for (int i=a4.size(); i--;)
06223 x4[i] = Gecode::IntVar(vm.var(a4[i]->toVar()));
06224 Gecode::Reflection::IntArrayArg& a5 = *spec[5]->toIntArray();
06225 Gecode::IntArgs x5(a5.size());
06226 for (int i=a5.size(); i--;) x5[i] = a5[i];
06227 bool x6 = static_cast<bool>(spec[6]->toInt());
06228 Gecode::cumulatives(home, x0,x1,x2,x3,x4,x5,x6);
06229 return;
06230 }
06231 #endif
06232 #if defined(GECODE_HAS_INT_VARS)
06233 if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
06234 isVarArgs<Gecode::IntVar>(vm, spec[1]) &&
06235 spec[2]->isIntArray() &&
06236 isVarArgs<Gecode::IntVar>(vm, spec[3]) &&
06237 isVarArgs<Gecode::IntVar>(vm, spec[4]) &&
06238 spec[5]->isIntArray() &&
06239 spec[6]->isInt())
06240 {
06241 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
06242 Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
06243 for (int i=a0.size(); i--;)
06244 x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
06245 Gecode::Reflection::ArrayArg& a1 = *spec[1]->toArray();
06246 Gecode::VarArgArray<Gecode::IntVar> x1(a1.size());
06247 for (int i=a1.size(); i--;)
06248 x1[i] = Gecode::IntVar(vm.var(a1[i]->toVar()));
06249 Gecode::Reflection::IntArrayArg& a2 = *spec[2]->toIntArray();
06250 Gecode::IntArgs x2(a2.size());
06251 for (int i=a2.size(); i--;) x2[i] = a2[i];
06252 Gecode::Reflection::ArrayArg& a3 = *spec[3]->toArray();
06253 Gecode::VarArgArray<Gecode::IntVar> x3(a3.size());
06254 for (int i=a3.size(); i--;)
06255 x3[i] = Gecode::IntVar(vm.var(a3[i]->toVar()));
06256 Gecode::Reflection::ArrayArg& a4 = *spec[4]->toArray();
06257 Gecode::VarArgArray<Gecode::IntVar> x4(a4.size());
06258 for (int i=a4.size(); i--;)
06259 x4[i] = Gecode::IntVar(vm.var(a4[i]->toVar()));
06260 Gecode::Reflection::IntArrayArg& a5 = *spec[5]->toIntArray();
06261 Gecode::IntArgs x5(a5.size());
06262 for (int i=a5.size(); i--;) x5[i] = a5[i];
06263 bool x6 = static_cast<bool>(spec[6]->toInt());
06264 Gecode::cumulatives(home, x0,x1,x2,x3,x4,x5,x6);
06265 return;
06266 }
06267 #endif
06268 #if defined(GECODE_HAS_INT_VARS)
06269 if (spec[0]->isIntArray() &&
06270 isVarArgs<Gecode::IntVar>(vm, spec[1]) &&
06271 spec[2]->isIntArray() &&
06272 isVarArgs<Gecode::IntVar>(vm, spec[3]) &&
06273 isVarArgs<Gecode::IntVar>(vm, spec[4]) &&
06274 spec[5]->isIntArray() &&
06275 spec[6]->isInt())
06276 {
06277 Gecode::Reflection::IntArrayArg& a0 = *spec[0]->toIntArray();
06278 Gecode::IntArgs x0(a0.size());
06279 for (int i=a0.size(); i--;) x0[i] = a0[i];
06280 Gecode::Reflection::ArrayArg& a1 = *spec[1]->toArray();
06281 Gecode::VarArgArray<Gecode::IntVar> x1(a1.size());
06282 for (int i=a1.size(); i--;)
06283 x1[i] = Gecode::IntVar(vm.var(a1[i]->toVar()));
06284 Gecode::Reflection::IntArrayArg& a2 = *spec[2]->toIntArray();
06285 Gecode::IntArgs x2(a2.size());
06286 for (int i=a2.size(); i--;) x2[i] = a2[i];
06287 Gecode::Reflection::ArrayArg& a3 = *spec[3]->toArray();
06288 Gecode::VarArgArray<Gecode::IntVar> x3(a3.size());
06289 for (int i=a3.size(); i--;)
06290 x3[i] = Gecode::IntVar(vm.var(a3[i]->toVar()));
06291 Gecode::Reflection::ArrayArg& a4 = *spec[4]->toArray();
06292 Gecode::VarArgArray<Gecode::IntVar> x4(a4.size());
06293 for (int i=a4.size(); i--;)
06294 x4[i] = Gecode::IntVar(vm.var(a4[i]->toVar()));
06295 Gecode::Reflection::IntArrayArg& a5 = *spec[5]->toIntArray();
06296 Gecode::IntArgs x5(a5.size());
06297 for (int i=a5.size(); i--;) x5[i] = a5[i];
06298 bool x6 = static_cast<bool>(spec[6]->toInt());
06299 Gecode::cumulatives(home, x0,x1,x2,x3,x4,x5,x6);
06300 return;
06301 }
06302 #endif
06303 #if defined(GECODE_HAS_INT_VARS)
06304 if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
06305 isVarArgs<Gecode::IntVar>(vm, spec[1]) &&
06306 isVarArgs<Gecode::IntVar>(vm, spec[2]) &&
06307 isVarArgs<Gecode::IntVar>(vm, spec[3]) &&
06308 spec[4]->isIntArray() &&
06309 spec[5]->isIntArray() &&
06310 spec[6]->isInt())
06311 {
06312 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
06313 Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
06314 for (int i=a0.size(); i--;)
06315 x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
06316 Gecode::Reflection::ArrayArg& a1 = *spec[1]->toArray();
06317 Gecode::VarArgArray<Gecode::IntVar> x1(a1.size());
06318 for (int i=a1.size(); i--;)
06319 x1[i] = Gecode::IntVar(vm.var(a1[i]->toVar()));
06320 Gecode::Reflection::ArrayArg& a2 = *spec[2]->toArray();
06321 Gecode::VarArgArray<Gecode::IntVar> x2(a2.size());
06322 for (int i=a2.size(); i--;)
06323 x2[i] = Gecode::IntVar(vm.var(a2[i]->toVar()));
06324 Gecode::Reflection::ArrayArg& a3 = *spec[3]->toArray();
06325 Gecode::VarArgArray<Gecode::IntVar> x3(a3.size());
06326 for (int i=a3.size(); i--;)
06327 x3[i] = Gecode::IntVar(vm.var(a3[i]->toVar()));
06328 Gecode::Reflection::IntArrayArg& a4 = *spec[4]->toIntArray();
06329 Gecode::IntArgs x4(a4.size());
06330 for (int i=a4.size(); i--;) x4[i] = a4[i];
06331 Gecode::Reflection::IntArrayArg& a5 = *spec[5]->toIntArray();
06332 Gecode::IntArgs x5(a5.size());
06333 for (int i=a5.size(); i--;) x5[i] = a5[i];
06334 bool x6 = static_cast<bool>(spec[6]->toInt());
06335 Gecode::cumulatives(home, x0,x1,x2,x3,x4,x5,x6);
06336 return;
06337 }
06338 #endif
06339 #if defined(GECODE_HAS_INT_VARS)
06340 if (spec[0]->isIntArray() &&
06341 isVarArgs<Gecode::IntVar>(vm, spec[1]) &&
06342 isVarArgs<Gecode::IntVar>(vm, spec[2]) &&
06343 isVarArgs<Gecode::IntVar>(vm, spec[3]) &&
06344 spec[4]->isIntArray() &&
06345 spec[5]->isIntArray() &&
06346 spec[6]->isInt())
06347 {
06348 Gecode::Reflection::IntArrayArg& a0 = *spec[0]->toIntArray();
06349 Gecode::IntArgs x0(a0.size());
06350 for (int i=a0.size(); i--;) x0[i] = a0[i];
06351 Gecode::Reflection::ArrayArg& a1 = *spec[1]->toArray();
06352 Gecode::VarArgArray<Gecode::IntVar> x1(a1.size());
06353 for (int i=a1.size(); i--;)
06354 x1[i] = Gecode::IntVar(vm.var(a1[i]->toVar()));
06355 Gecode::Reflection::ArrayArg& a2 = *spec[2]->toArray();
06356 Gecode::VarArgArray<Gecode::IntVar> x2(a2.size());
06357 for (int i=a2.size(); i--;)
06358 x2[i] = Gecode::IntVar(vm.var(a2[i]->toVar()));
06359 Gecode::Reflection::ArrayArg& a3 = *spec[3]->toArray();
06360 Gecode::VarArgArray<Gecode::IntVar> x3(a3.size());
06361 for (int i=a3.size(); i--;)
06362 x3[i] = Gecode::IntVar(vm.var(a3[i]->toVar()));
06363 Gecode::Reflection::IntArrayArg& a4 = *spec[4]->toIntArray();
06364 Gecode::IntArgs x4(a4.size());
06365 for (int i=a4.size(); i--;) x4[i] = a4[i];
06366 Gecode::Reflection::IntArrayArg& a5 = *spec[5]->toIntArray();
06367 Gecode::IntArgs x5(a5.size());
06368 for (int i=a5.size(); i--;) x5[i] = a5[i];
06369 bool x6 = static_cast<bool>(spec[6]->toInt());
06370 Gecode::cumulatives(home, x0,x1,x2,x3,x4,x5,x6);
06371 return;
06372 }
06373 #endif
06374 #if defined(GECODE_HAS_INT_VARS)
06375 if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
06376 isVarArgs<Gecode::IntVar>(vm, spec[1]) &&
06377 spec[2]->isIntArray() &&
06378 isVarArgs<Gecode::IntVar>(vm, spec[3]) &&
06379 spec[4]->isIntArray() &&
06380 spec[5]->isIntArray() &&
06381 spec[6]->isInt())
06382 {
06383 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
06384 Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
06385 for (int i=a0.size(); i--;)
06386 x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
06387 Gecode::Reflection::ArrayArg& a1 = *spec[1]->toArray();
06388 Gecode::VarArgArray<Gecode::IntVar> x1(a1.size());
06389 for (int i=a1.size(); i--;)
06390 x1[i] = Gecode::IntVar(vm.var(a1[i]->toVar()));
06391 Gecode::Reflection::IntArrayArg& a2 = *spec[2]->toIntArray();
06392 Gecode::IntArgs x2(a2.size());
06393 for (int i=a2.size(); i--;) x2[i] = a2[i];
06394 Gecode::Reflection::ArrayArg& a3 = *spec[3]->toArray();
06395 Gecode::VarArgArray<Gecode::IntVar> x3(a3.size());
06396 for (int i=a3.size(); i--;)
06397 x3[i] = Gecode::IntVar(vm.var(a3[i]->toVar()));
06398 Gecode::Reflection::IntArrayArg& a4 = *spec[4]->toIntArray();
06399 Gecode::IntArgs x4(a4.size());
06400 for (int i=a4.size(); i--;) x4[i] = a4[i];
06401 Gecode::Reflection::IntArrayArg& a5 = *spec[5]->toIntArray();
06402 Gecode::IntArgs x5(a5.size());
06403 for (int i=a5.size(); i--;) x5[i] = a5[i];
06404 bool x6 = static_cast<bool>(spec[6]->toInt());
06405 Gecode::cumulatives(home, x0,x1,x2,x3,x4,x5,x6);
06406 return;
06407 }
06408 #endif
06409 #if defined(GECODE_HAS_INT_VARS)
06410 if (spec[0]->isIntArray() &&
06411 isVarArgs<Gecode::IntVar>(vm, spec[1]) &&
06412 spec[2]->isIntArray() &&
06413 isVarArgs<Gecode::IntVar>(vm, spec[3]) &&
06414 spec[4]->isIntArray() &&
06415 spec[5]->isIntArray() &&
06416 spec[6]->isInt())
06417 {
06418 Gecode::Reflection::IntArrayArg& a0 = *spec[0]->toIntArray();
06419 Gecode::IntArgs x0(a0.size());
06420 for (int i=a0.size(); i--;) x0[i] = a0[i];
06421 Gecode::Reflection::ArrayArg& a1 = *spec[1]->toArray();
06422 Gecode::VarArgArray<Gecode::IntVar> x1(a1.size());
06423 for (int i=a1.size(); i--;)
06424 x1[i] = Gecode::IntVar(vm.var(a1[i]->toVar()));
06425 Gecode::Reflection::IntArrayArg& a2 = *spec[2]->toIntArray();
06426 Gecode::IntArgs x2(a2.size());
06427 for (int i=a2.size(); i--;) x2[i] = a2[i];
06428 Gecode::Reflection::ArrayArg& a3 = *spec[3]->toArray();
06429 Gecode::VarArgArray<Gecode::IntVar> x3(a3.size());
06430 for (int i=a3.size(); i--;)
06431 x3[i] = Gecode::IntVar(vm.var(a3[i]->toVar()));
06432 Gecode::Reflection::IntArrayArg& a4 = *spec[4]->toIntArray();
06433 Gecode::IntArgs x4(a4.size());
06434 for (int i=a4.size(); i--;) x4[i] = a4[i];
06435 Gecode::Reflection::IntArrayArg& a5 = *spec[5]->toIntArray();
06436 Gecode::IntArgs x5(a5.size());
06437 for (int i=a5.size(); i--;) x5[i] = a5[i];
06438 bool x6 = static_cast<bool>(spec[6]->toInt());
06439 Gecode::cumulatives(home, x0,x1,x2,x3,x4,x5,x6);
06440 return;
06441 }
06442 #endif
06443 throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::cumulatives");
06444 }
06445 break;
06446 case 8:
06447 {
06448 #if defined(GECODE_HAS_INT_VARS)
06449 if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
06450 isVarArgs<Gecode::IntVar>(vm, spec[1]) &&
06451 isVarArgs<Gecode::IntVar>(vm, spec[2]) &&
06452 isVarArgs<Gecode::IntVar>(vm, spec[3]) &&
06453 isVarArgs<Gecode::IntVar>(vm, spec[4]) &&
06454 spec[5]->isIntArray() &&
06455 spec[6]->isInt() &&
06456 isEnum_IntConLevel(spec[7]))
06457 {
06458 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
06459 Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
06460 for (int i=a0.size(); i--;)
06461 x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
06462 Gecode::Reflection::ArrayArg& a1 = *spec[1]->toArray();
06463 Gecode::VarArgArray<Gecode::IntVar> x1(a1.size());
06464 for (int i=a1.size(); i--;)
06465 x1[i] = Gecode::IntVar(vm.var(a1[i]->toVar()));
06466 Gecode::Reflection::ArrayArg& a2 = *spec[2]->toArray();
06467 Gecode::VarArgArray<Gecode::IntVar> x2(a2.size());
06468 for (int i=a2.size(); i--;)
06469 x2[i] = Gecode::IntVar(vm.var(a2[i]->toVar()));
06470 Gecode::Reflection::ArrayArg& a3 = *spec[3]->toArray();
06471 Gecode::VarArgArray<Gecode::IntVar> x3(a3.size());
06472 for (int i=a3.size(); i--;)
06473 x3[i] = Gecode::IntVar(vm.var(a3[i]->toVar()));
06474 Gecode::Reflection::ArrayArg& a4 = *spec[4]->toArray();
06475 Gecode::VarArgArray<Gecode::IntVar> x4(a4.size());
06476 for (int i=a4.size(); i--;)
06477 x4[i] = Gecode::IntVar(vm.var(a4[i]->toVar()));
06478 Gecode::Reflection::IntArrayArg& a5 = *spec[5]->toIntArray();
06479 Gecode::IntArgs x5(a5.size());
06480 for (int i=a5.size(); i--;) x5[i] = a5[i];
06481 bool x6 = static_cast<bool>(spec[6]->toInt());
06482 Gecode::IntConLevel x7 = toEnum_IntConLevel(spec[7]);
06483 Gecode::cumulatives(home, x0,x1,x2,x3,x4,x5,x6,x7);
06484 return;
06485 }
06486 #endif
06487 #if defined(GECODE_HAS_INT_VARS)
06488 if (spec[0]->isIntArray() &&
06489 isVarArgs<Gecode::IntVar>(vm, spec[1]) &&
06490 isVarArgs<Gecode::IntVar>(vm, spec[2]) &&
06491 isVarArgs<Gecode::IntVar>(vm, spec[3]) &&
06492 isVarArgs<Gecode::IntVar>(vm, spec[4]) &&
06493 spec[5]->isIntArray() &&
06494 spec[6]->isInt() &&
06495 isEnum_IntConLevel(spec[7]))
06496 {
06497 Gecode::Reflection::IntArrayArg& a0 = *spec[0]->toIntArray();
06498 Gecode::IntArgs x0(a0.size());
06499 for (int i=a0.size(); i--;) x0[i] = a0[i];
06500 Gecode::Reflection::ArrayArg& a1 = *spec[1]->toArray();
06501 Gecode::VarArgArray<Gecode::IntVar> x1(a1.size());
06502 for (int i=a1.size(); i--;)
06503 x1[i] = Gecode::IntVar(vm.var(a1[i]->toVar()));
06504 Gecode::Reflection::ArrayArg& a2 = *spec[2]->toArray();
06505 Gecode::VarArgArray<Gecode::IntVar> x2(a2.size());
06506 for (int i=a2.size(); i--;)
06507 x2[i] = Gecode::IntVar(vm.var(a2[i]->toVar()));
06508 Gecode::Reflection::ArrayArg& a3 = *spec[3]->toArray();
06509 Gecode::VarArgArray<Gecode::IntVar> x3(a3.size());
06510 for (int i=a3.size(); i--;)
06511 x3[i] = Gecode::IntVar(vm.var(a3[i]->toVar()));
06512 Gecode::Reflection::ArrayArg& a4 = *spec[4]->toArray();
06513 Gecode::VarArgArray<Gecode::IntVar> x4(a4.size());
06514 for (int i=a4.size(); i--;)
06515 x4[i] = Gecode::IntVar(vm.var(a4[i]->toVar()));
06516 Gecode::Reflection::IntArrayArg& a5 = *spec[5]->toIntArray();
06517 Gecode::IntArgs x5(a5.size());
06518 for (int i=a5.size(); i--;) x5[i] = a5[i];
06519 bool x6 = static_cast<bool>(spec[6]->toInt());
06520 Gecode::IntConLevel x7 = toEnum_IntConLevel(spec[7]);
06521 Gecode::cumulatives(home, x0,x1,x2,x3,x4,x5,x6,x7);
06522 return;
06523 }
06524 #endif
06525 #if defined(GECODE_HAS_INT_VARS)
06526 if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
06527 isVarArgs<Gecode::IntVar>(vm, spec[1]) &&
06528 spec[2]->isIntArray() &&
06529 isVarArgs<Gecode::IntVar>(vm, spec[3]) &&
06530 isVarArgs<Gecode::IntVar>(vm, spec[4]) &&
06531 spec[5]->isIntArray() &&
06532 spec[6]->isInt() &&
06533 isEnum_IntConLevel(spec[7]))
06534 {
06535 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
06536 Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
06537 for (int i=a0.size(); i--;)
06538 x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
06539 Gecode::Reflection::ArrayArg& a1 = *spec[1]->toArray();
06540 Gecode::VarArgArray<Gecode::IntVar> x1(a1.size());
06541 for (int i=a1.size(); i--;)
06542 x1[i] = Gecode::IntVar(vm.var(a1[i]->toVar()));
06543 Gecode::Reflection::IntArrayArg& a2 = *spec[2]->toIntArray();
06544 Gecode::IntArgs x2(a2.size());
06545 for (int i=a2.size(); i--;) x2[i] = a2[i];
06546 Gecode::Reflection::ArrayArg& a3 = *spec[3]->toArray();
06547 Gecode::VarArgArray<Gecode::IntVar> x3(a3.size());
06548 for (int i=a3.size(); i--;)
06549 x3[i] = Gecode::IntVar(vm.var(a3[i]->toVar()));
06550 Gecode::Reflection::ArrayArg& a4 = *spec[4]->toArray();
06551 Gecode::VarArgArray<Gecode::IntVar> x4(a4.size());
06552 for (int i=a4.size(); i--;)
06553 x4[i] = Gecode::IntVar(vm.var(a4[i]->toVar()));
06554 Gecode::Reflection::IntArrayArg& a5 = *spec[5]->toIntArray();
06555 Gecode::IntArgs x5(a5.size());
06556 for (int i=a5.size(); i--;) x5[i] = a5[i];
06557 bool x6 = static_cast<bool>(spec[6]->toInt());
06558 Gecode::IntConLevel x7 = toEnum_IntConLevel(spec[7]);
06559 Gecode::cumulatives(home, x0,x1,x2,x3,x4,x5,x6,x7);
06560 return;
06561 }
06562 #endif
06563 #if defined(GECODE_HAS_INT_VARS)
06564 if (spec[0]->isIntArray() &&
06565 isVarArgs<Gecode::IntVar>(vm, spec[1]) &&
06566 spec[2]->isIntArray() &&
06567 isVarArgs<Gecode::IntVar>(vm, spec[3]) &&
06568 isVarArgs<Gecode::IntVar>(vm, spec[4]) &&
06569 spec[5]->isIntArray() &&
06570 spec[6]->isInt() &&
06571 isEnum_IntConLevel(spec[7]))
06572 {
06573 Gecode::Reflection::IntArrayArg& a0 = *spec[0]->toIntArray();
06574 Gecode::IntArgs x0(a0.size());
06575 for (int i=a0.size(); i--;) x0[i] = a0[i];
06576 Gecode::Reflection::ArrayArg& a1 = *spec[1]->toArray();
06577 Gecode::VarArgArray<Gecode::IntVar> x1(a1.size());
06578 for (int i=a1.size(); i--;)
06579 x1[i] = Gecode::IntVar(vm.var(a1[i]->toVar()));
06580 Gecode::Reflection::IntArrayArg& a2 = *spec[2]->toIntArray();
06581 Gecode::IntArgs x2(a2.size());
06582 for (int i=a2.size(); i--;) x2[i] = a2[i];
06583 Gecode::Reflection::ArrayArg& a3 = *spec[3]->toArray();
06584 Gecode::VarArgArray<Gecode::IntVar> x3(a3.size());
06585 for (int i=a3.size(); i--;)
06586 x3[i] = Gecode::IntVar(vm.var(a3[i]->toVar()));
06587 Gecode::Reflection::ArrayArg& a4 = *spec[4]->toArray();
06588 Gecode::VarArgArray<Gecode::IntVar> x4(a4.size());
06589 for (int i=a4.size(); i--;)
06590 x4[i] = Gecode::IntVar(vm.var(a4[i]->toVar()));
06591 Gecode::Reflection::IntArrayArg& a5 = *spec[5]->toIntArray();
06592 Gecode::IntArgs x5(a5.size());
06593 for (int i=a5.size(); i--;) x5[i] = a5[i];
06594 bool x6 = static_cast<bool>(spec[6]->toInt());
06595 Gecode::IntConLevel x7 = toEnum_IntConLevel(spec[7]);
06596 Gecode::cumulatives(home, x0,x1,x2,x3,x4,x5,x6,x7);
06597 return;
06598 }
06599 #endif
06600 #if defined(GECODE_HAS_INT_VARS)
06601 if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
06602 isVarArgs<Gecode::IntVar>(vm, spec[1]) &&
06603 isVarArgs<Gecode::IntVar>(vm, spec[2]) &&
06604 isVarArgs<Gecode::IntVar>(vm, spec[3]) &&
06605 spec[4]->isIntArray() &&
06606 spec[5]->isIntArray() &&
06607 spec[6]->isInt() &&
06608 isEnum_IntConLevel(spec[7]))
06609 {
06610 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
06611 Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
06612 for (int i=a0.size(); i--;)
06613 x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
06614 Gecode::Reflection::ArrayArg& a1 = *spec[1]->toArray();
06615 Gecode::VarArgArray<Gecode::IntVar> x1(a1.size());
06616 for (int i=a1.size(); i--;)
06617 x1[i] = Gecode::IntVar(vm.var(a1[i]->toVar()));
06618 Gecode::Reflection::ArrayArg& a2 = *spec[2]->toArray();
06619 Gecode::VarArgArray<Gecode::IntVar> x2(a2.size());
06620 for (int i=a2.size(); i--;)
06621 x2[i] = Gecode::IntVar(vm.var(a2[i]->toVar()));
06622 Gecode::Reflection::ArrayArg& a3 = *spec[3]->toArray();
06623 Gecode::VarArgArray<Gecode::IntVar> x3(a3.size());
06624 for (int i=a3.size(); i--;)
06625 x3[i] = Gecode::IntVar(vm.var(a3[i]->toVar()));
06626 Gecode::Reflection::IntArrayArg& a4 = *spec[4]->toIntArray();
06627 Gecode::IntArgs x4(a4.size());
06628 for (int i=a4.size(); i--;) x4[i] = a4[i];
06629 Gecode::Reflection::IntArrayArg& a5 = *spec[5]->toIntArray();
06630 Gecode::IntArgs x5(a5.size());
06631 for (int i=a5.size(); i--;) x5[i] = a5[i];
06632 bool x6 = static_cast<bool>(spec[6]->toInt());
06633 Gecode::IntConLevel x7 = toEnum_IntConLevel(spec[7]);
06634 Gecode::cumulatives(home, x0,x1,x2,x3,x4,x5,x6,x7);
06635 return;
06636 }
06637 #endif
06638 #if defined(GECODE_HAS_INT_VARS)
06639 if (spec[0]->isIntArray() &&
06640 isVarArgs<Gecode::IntVar>(vm, spec[1]) &&
06641 isVarArgs<Gecode::IntVar>(vm, spec[2]) &&
06642 isVarArgs<Gecode::IntVar>(vm, spec[3]) &&
06643 spec[4]->isIntArray() &&
06644 spec[5]->isIntArray() &&
06645 spec[6]->isInt() &&
06646 isEnum_IntConLevel(spec[7]))
06647 {
06648 Gecode::Reflection::IntArrayArg& a0 = *spec[0]->toIntArray();
06649 Gecode::IntArgs x0(a0.size());
06650 for (int i=a0.size(); i--;) x0[i] = a0[i];
06651 Gecode::Reflection::ArrayArg& a1 = *spec[1]->toArray();
06652 Gecode::VarArgArray<Gecode::IntVar> x1(a1.size());
06653 for (int i=a1.size(); i--;)
06654 x1[i] = Gecode::IntVar(vm.var(a1[i]->toVar()));
06655 Gecode::Reflection::ArrayArg& a2 = *spec[2]->toArray();
06656 Gecode::VarArgArray<Gecode::IntVar> x2(a2.size());
06657 for (int i=a2.size(); i--;)
06658 x2[i] = Gecode::IntVar(vm.var(a2[i]->toVar()));
06659 Gecode::Reflection::ArrayArg& a3 = *spec[3]->toArray();
06660 Gecode::VarArgArray<Gecode::IntVar> x3(a3.size());
06661 for (int i=a3.size(); i--;)
06662 x3[i] = Gecode::IntVar(vm.var(a3[i]->toVar()));
06663 Gecode::Reflection::IntArrayArg& a4 = *spec[4]->toIntArray();
06664 Gecode::IntArgs x4(a4.size());
06665 for (int i=a4.size(); i--;) x4[i] = a4[i];
06666 Gecode::Reflection::IntArrayArg& a5 = *spec[5]->toIntArray();
06667 Gecode::IntArgs x5(a5.size());
06668 for (int i=a5.size(); i--;) x5[i] = a5[i];
06669 bool x6 = static_cast<bool>(spec[6]->toInt());
06670 Gecode::IntConLevel x7 = toEnum_IntConLevel(spec[7]);
06671 Gecode::cumulatives(home, x0,x1,x2,x3,x4,x5,x6,x7);
06672 return;
06673 }
06674 #endif
06675 #if defined(GECODE_HAS_INT_VARS)
06676 if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
06677 isVarArgs<Gecode::IntVar>(vm, spec[1]) &&
06678 spec[2]->isIntArray() &&
06679 isVarArgs<Gecode::IntVar>(vm, spec[3]) &&
06680 spec[4]->isIntArray() &&
06681 spec[5]->isIntArray() &&
06682 spec[6]->isInt() &&
06683 isEnum_IntConLevel(spec[7]))
06684 {
06685 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
06686 Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
06687 for (int i=a0.size(); i--;)
06688 x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
06689 Gecode::Reflection::ArrayArg& a1 = *spec[1]->toArray();
06690 Gecode::VarArgArray<Gecode::IntVar> x1(a1.size());
06691 for (int i=a1.size(); i--;)
06692 x1[i] = Gecode::IntVar(vm.var(a1[i]->toVar()));
06693 Gecode::Reflection::IntArrayArg& a2 = *spec[2]->toIntArray();
06694 Gecode::IntArgs x2(a2.size());
06695 for (int i=a2.size(); i--;) x2[i] = a2[i];
06696 Gecode::Reflection::ArrayArg& a3 = *spec[3]->toArray();
06697 Gecode::VarArgArray<Gecode::IntVar> x3(a3.size());
06698 for (int i=a3.size(); i--;)
06699 x3[i] = Gecode::IntVar(vm.var(a3[i]->toVar()));
06700 Gecode::Reflection::IntArrayArg& a4 = *spec[4]->toIntArray();
06701 Gecode::IntArgs x4(a4.size());
06702 for (int i=a4.size(); i--;) x4[i] = a4[i];
06703 Gecode::Reflection::IntArrayArg& a5 = *spec[5]->toIntArray();
06704 Gecode::IntArgs x5(a5.size());
06705 for (int i=a5.size(); i--;) x5[i] = a5[i];
06706 bool x6 = static_cast<bool>(spec[6]->toInt());
06707 Gecode::IntConLevel x7 = toEnum_IntConLevel(spec[7]);
06708 Gecode::cumulatives(home, x0,x1,x2,x3,x4,x5,x6,x7);
06709 return;
06710 }
06711 #endif
06712 #if defined(GECODE_HAS_INT_VARS)
06713 if (spec[0]->isIntArray() &&
06714 isVarArgs<Gecode::IntVar>(vm, spec[1]) &&
06715 spec[2]->isIntArray() &&
06716 isVarArgs<Gecode::IntVar>(vm, spec[3]) &&
06717 spec[4]->isIntArray() &&
06718 spec[5]->isIntArray() &&
06719 spec[6]->isInt() &&
06720 isEnum_IntConLevel(spec[7]))
06721 {
06722 Gecode::Reflection::IntArrayArg& a0 = *spec[0]->toIntArray();
06723 Gecode::IntArgs x0(a0.size());
06724 for (int i=a0.size(); i--;) x0[i] = a0[i];
06725 Gecode::Reflection::ArrayArg& a1 = *spec[1]->toArray();
06726 Gecode::VarArgArray<Gecode::IntVar> x1(a1.size());
06727 for (int i=a1.size(); i--;)
06728 x1[i] = Gecode::IntVar(vm.var(a1[i]->toVar()));
06729 Gecode::Reflection::IntArrayArg& a2 = *spec[2]->toIntArray();
06730 Gecode::IntArgs x2(a2.size());
06731 for (int i=a2.size(); i--;) x2[i] = a2[i];
06732 Gecode::Reflection::ArrayArg& a3 = *spec[3]->toArray();
06733 Gecode::VarArgArray<Gecode::IntVar> x3(a3.size());
06734 for (int i=a3.size(); i--;)
06735 x3[i] = Gecode::IntVar(vm.var(a3[i]->toVar()));
06736 Gecode::Reflection::IntArrayArg& a4 = *spec[4]->toIntArray();
06737 Gecode::IntArgs x4(a4.size());
06738 for (int i=a4.size(); i--;) x4[i] = a4[i];
06739 Gecode::Reflection::IntArrayArg& a5 = *spec[5]->toIntArray();
06740 Gecode::IntArgs x5(a5.size());
06741 for (int i=a5.size(); i--;) x5[i] = a5[i];
06742 bool x6 = static_cast<bool>(spec[6]->toInt());
06743 Gecode::IntConLevel x7 = toEnum_IntConLevel(spec[7]);
06744 Gecode::cumulatives(home, x0,x1,x2,x3,x4,x5,x6,x7);
06745 return;
06746 }
06747 #endif
06748 throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::cumulatives");
06749 }
06750 break;
06751 case 9:
06752 {
06753 #if defined(GECODE_HAS_INT_VARS)
06754 if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
06755 isVarArgs<Gecode::IntVar>(vm, spec[1]) &&
06756 isVarArgs<Gecode::IntVar>(vm, spec[2]) &&
06757 isVarArgs<Gecode::IntVar>(vm, spec[3]) &&
06758 isVarArgs<Gecode::IntVar>(vm, spec[4]) &&
06759 spec[5]->isIntArray() &&
06760 spec[6]->isInt() &&
06761 isEnum_IntConLevel(spec[7]) &&
06762 isEnum_PropKind(spec[8]))
06763 {
06764 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
06765 Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
06766 for (int i=a0.size(); i--;)
06767 x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
06768 Gecode::Reflection::ArrayArg& a1 = *spec[1]->toArray();
06769 Gecode::VarArgArray<Gecode::IntVar> x1(a1.size());
06770 for (int i=a1.size(); i--;)
06771 x1[i] = Gecode::IntVar(vm.var(a1[i]->toVar()));
06772 Gecode::Reflection::ArrayArg& a2 = *spec[2]->toArray();
06773 Gecode::VarArgArray<Gecode::IntVar> x2(a2.size());
06774 for (int i=a2.size(); i--;)
06775 x2[i] = Gecode::IntVar(vm.var(a2[i]->toVar()));
06776 Gecode::Reflection::ArrayArg& a3 = *spec[3]->toArray();
06777 Gecode::VarArgArray<Gecode::IntVar> x3(a3.size());
06778 for (int i=a3.size(); i--;)
06779 x3[i] = Gecode::IntVar(vm.var(a3[i]->toVar()));
06780 Gecode::Reflection::ArrayArg& a4 = *spec[4]->toArray();
06781 Gecode::VarArgArray<Gecode::IntVar> x4(a4.size());
06782 for (int i=a4.size(); i--;)
06783 x4[i] = Gecode::IntVar(vm.var(a4[i]->toVar()));
06784 Gecode::Reflection::IntArrayArg& a5 = *spec[5]->toIntArray();
06785 Gecode::IntArgs x5(a5.size());
06786 for (int i=a5.size(); i--;) x5[i] = a5[i];
06787 bool x6 = static_cast<bool>(spec[6]->toInt());
06788 Gecode::IntConLevel x7 = toEnum_IntConLevel(spec[7]);
06789 Gecode::PropKind x8 = toEnum_PropKind(spec[8]);
06790 Gecode::cumulatives(home, x0,x1,x2,x3,x4,x5,x6,x7,x8);
06791 return;
06792 }
06793 #endif
06794 #if defined(GECODE_HAS_INT_VARS)
06795 if (spec[0]->isIntArray() &&
06796 isVarArgs<Gecode::IntVar>(vm, spec[1]) &&
06797 isVarArgs<Gecode::IntVar>(vm, spec[2]) &&
06798 isVarArgs<Gecode::IntVar>(vm, spec[3]) &&
06799 isVarArgs<Gecode::IntVar>(vm, spec[4]) &&
06800 spec[5]->isIntArray() &&
06801 spec[6]->isInt() &&
06802 isEnum_IntConLevel(spec[7]) &&
06803 isEnum_PropKind(spec[8]))
06804 {
06805 Gecode::Reflection::IntArrayArg& a0 = *spec[0]->toIntArray();
06806 Gecode::IntArgs x0(a0.size());
06807 for (int i=a0.size(); i--;) x0[i] = a0[i];
06808 Gecode::Reflection::ArrayArg& a1 = *spec[1]->toArray();
06809 Gecode::VarArgArray<Gecode::IntVar> x1(a1.size());
06810 for (int i=a1.size(); i--;)
06811 x1[i] = Gecode::IntVar(vm.var(a1[i]->toVar()));
06812 Gecode::Reflection::ArrayArg& a2 = *spec[2]->toArray();
06813 Gecode::VarArgArray<Gecode::IntVar> x2(a2.size());
06814 for (int i=a2.size(); i--;)
06815 x2[i] = Gecode::IntVar(vm.var(a2[i]->toVar()));
06816 Gecode::Reflection::ArrayArg& a3 = *spec[3]->toArray();
06817 Gecode::VarArgArray<Gecode::IntVar> x3(a3.size());
06818 for (int i=a3.size(); i--;)
06819 x3[i] = Gecode::IntVar(vm.var(a3[i]->toVar()));
06820 Gecode::Reflection::ArrayArg& a4 = *spec[4]->toArray();
06821 Gecode::VarArgArray<Gecode::IntVar> x4(a4.size());
06822 for (int i=a4.size(); i--;)
06823 x4[i] = Gecode::IntVar(vm.var(a4[i]->toVar()));
06824 Gecode::Reflection::IntArrayArg& a5 = *spec[5]->toIntArray();
06825 Gecode::IntArgs x5(a5.size());
06826 for (int i=a5.size(); i--;) x5[i] = a5[i];
06827 bool x6 = static_cast<bool>(spec[6]->toInt());
06828 Gecode::IntConLevel x7 = toEnum_IntConLevel(spec[7]);
06829 Gecode::PropKind x8 = toEnum_PropKind(spec[8]);
06830 Gecode::cumulatives(home, x0,x1,x2,x3,x4,x5,x6,x7,x8);
06831 return;
06832 }
06833 #endif
06834 #if defined(GECODE_HAS_INT_VARS)
06835 if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
06836 isVarArgs<Gecode::IntVar>(vm, spec[1]) &&
06837 spec[2]->isIntArray() &&
06838 isVarArgs<Gecode::IntVar>(vm, spec[3]) &&
06839 isVarArgs<Gecode::IntVar>(vm, spec[4]) &&
06840 spec[5]->isIntArray() &&
06841 spec[6]->isInt() &&
06842 isEnum_IntConLevel(spec[7]) &&
06843 isEnum_PropKind(spec[8]))
06844 {
06845 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
06846 Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
06847 for (int i=a0.size(); i--;)
06848 x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
06849 Gecode::Reflection::ArrayArg& a1 = *spec[1]->toArray();
06850 Gecode::VarArgArray<Gecode::IntVar> x1(a1.size());
06851 for (int i=a1.size(); i--;)
06852 x1[i] = Gecode::IntVar(vm.var(a1[i]->toVar()));
06853 Gecode::Reflection::IntArrayArg& a2 = *spec[2]->toIntArray();
06854 Gecode::IntArgs x2(a2.size());
06855 for (int i=a2.size(); i--;) x2[i] = a2[i];
06856 Gecode::Reflection::ArrayArg& a3 = *spec[3]->toArray();
06857 Gecode::VarArgArray<Gecode::IntVar> x3(a3.size());
06858 for (int i=a3.size(); i--;)
06859 x3[i] = Gecode::IntVar(vm.var(a3[i]->toVar()));
06860 Gecode::Reflection::ArrayArg& a4 = *spec[4]->toArray();
06861 Gecode::VarArgArray<Gecode::IntVar> x4(a4.size());
06862 for (int i=a4.size(); i--;)
06863 x4[i] = Gecode::IntVar(vm.var(a4[i]->toVar()));
06864 Gecode::Reflection::IntArrayArg& a5 = *spec[5]->toIntArray();
06865 Gecode::IntArgs x5(a5.size());
06866 for (int i=a5.size(); i--;) x5[i] = a5[i];
06867 bool x6 = static_cast<bool>(spec[6]->toInt());
06868 Gecode::IntConLevel x7 = toEnum_IntConLevel(spec[7]);
06869 Gecode::PropKind x8 = toEnum_PropKind(spec[8]);
06870 Gecode::cumulatives(home, x0,x1,x2,x3,x4,x5,x6,x7,x8);
06871 return;
06872 }
06873 #endif
06874 #if defined(GECODE_HAS_INT_VARS)
06875 if (spec[0]->isIntArray() &&
06876 isVarArgs<Gecode::IntVar>(vm, spec[1]) &&
06877 spec[2]->isIntArray() &&
06878 isVarArgs<Gecode::IntVar>(vm, spec[3]) &&
06879 isVarArgs<Gecode::IntVar>(vm, spec[4]) &&
06880 spec[5]->isIntArray() &&
06881 spec[6]->isInt() &&
06882 isEnum_IntConLevel(spec[7]) &&
06883 isEnum_PropKind(spec[8]))
06884 {
06885 Gecode::Reflection::IntArrayArg& a0 = *spec[0]->toIntArray();
06886 Gecode::IntArgs x0(a0.size());
06887 for (int i=a0.size(); i--;) x0[i] = a0[i];
06888 Gecode::Reflection::ArrayArg& a1 = *spec[1]->toArray();
06889 Gecode::VarArgArray<Gecode::IntVar> x1(a1.size());
06890 for (int i=a1.size(); i--;)
06891 x1[i] = Gecode::IntVar(vm.var(a1[i]->toVar()));
06892 Gecode::Reflection::IntArrayArg& a2 = *spec[2]->toIntArray();
06893 Gecode::IntArgs x2(a2.size());
06894 for (int i=a2.size(); i--;) x2[i] = a2[i];
06895 Gecode::Reflection::ArrayArg& a3 = *spec[3]->toArray();
06896 Gecode::VarArgArray<Gecode::IntVar> x3(a3.size());
06897 for (int i=a3.size(); i--;)
06898 x3[i] = Gecode::IntVar(vm.var(a3[i]->toVar()));
06899 Gecode::Reflection::ArrayArg& a4 = *spec[4]->toArray();
06900 Gecode::VarArgArray<Gecode::IntVar> x4(a4.size());
06901 for (int i=a4.size(); i--;)
06902 x4[i] = Gecode::IntVar(vm.var(a4[i]->toVar()));
06903 Gecode::Reflection::IntArrayArg& a5 = *spec[5]->toIntArray();
06904 Gecode::IntArgs x5(a5.size());
06905 for (int i=a5.size(); i--;) x5[i] = a5[i];
06906 bool x6 = static_cast<bool>(spec[6]->toInt());
06907 Gecode::IntConLevel x7 = toEnum_IntConLevel(spec[7]);
06908 Gecode::PropKind x8 = toEnum_PropKind(spec[8]);
06909 Gecode::cumulatives(home, x0,x1,x2,x3,x4,x5,x6,x7,x8);
06910 return;
06911 }
06912 #endif
06913 #if defined(GECODE_HAS_INT_VARS)
06914 if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
06915 isVarArgs<Gecode::IntVar>(vm, spec[1]) &&
06916 isVarArgs<Gecode::IntVar>(vm, spec[2]) &&
06917 isVarArgs<Gecode::IntVar>(vm, spec[3]) &&
06918 spec[4]->isIntArray() &&
06919 spec[5]->isIntArray() &&
06920 spec[6]->isInt() &&
06921 isEnum_IntConLevel(spec[7]) &&
06922 isEnum_PropKind(spec[8]))
06923 {
06924 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
06925 Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
06926 for (int i=a0.size(); i--;)
06927 x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
06928 Gecode::Reflection::ArrayArg& a1 = *spec[1]->toArray();
06929 Gecode::VarArgArray<Gecode::IntVar> x1(a1.size());
06930 for (int i=a1.size(); i--;)
06931 x1[i] = Gecode::IntVar(vm.var(a1[i]->toVar()));
06932 Gecode::Reflection::ArrayArg& a2 = *spec[2]->toArray();
06933 Gecode::VarArgArray<Gecode::IntVar> x2(a2.size());
06934 for (int i=a2.size(); i--;)
06935 x2[i] = Gecode::IntVar(vm.var(a2[i]->toVar()));
06936 Gecode::Reflection::ArrayArg& a3 = *spec[3]->toArray();
06937 Gecode::VarArgArray<Gecode::IntVar> x3(a3.size());
06938 for (int i=a3.size(); i--;)
06939 x3[i] = Gecode::IntVar(vm.var(a3[i]->toVar()));
06940 Gecode::Reflection::IntArrayArg& a4 = *spec[4]->toIntArray();
06941 Gecode::IntArgs x4(a4.size());
06942 for (int i=a4.size(); i--;) x4[i] = a4[i];
06943 Gecode::Reflection::IntArrayArg& a5 = *spec[5]->toIntArray();
06944 Gecode::IntArgs x5(a5.size());
06945 for (int i=a5.size(); i--;) x5[i] = a5[i];
06946 bool x6 = static_cast<bool>(spec[6]->toInt());
06947 Gecode::IntConLevel x7 = toEnum_IntConLevel(spec[7]);
06948 Gecode::PropKind x8 = toEnum_PropKind(spec[8]);
06949 Gecode::cumulatives(home, x0,x1,x2,x3,x4,x5,x6,x7,x8);
06950 return;
06951 }
06952 #endif
06953 #if defined(GECODE_HAS_INT_VARS)
06954 if (spec[0]->isIntArray() &&
06955 isVarArgs<Gecode::IntVar>(vm, spec[1]) &&
06956 isVarArgs<Gecode::IntVar>(vm, spec[2]) &&
06957 isVarArgs<Gecode::IntVar>(vm, spec[3]) &&
06958 spec[4]->isIntArray() &&
06959 spec[5]->isIntArray() &&
06960 spec[6]->isInt() &&
06961 isEnum_IntConLevel(spec[7]) &&
06962 isEnum_PropKind(spec[8]))
06963 {
06964 Gecode::Reflection::IntArrayArg& a0 = *spec[0]->toIntArray();
06965 Gecode::IntArgs x0(a0.size());
06966 for (int i=a0.size(); i--;) x0[i] = a0[i];
06967 Gecode::Reflection::ArrayArg& a1 = *spec[1]->toArray();
06968 Gecode::VarArgArray<Gecode::IntVar> x1(a1.size());
06969 for (int i=a1.size(); i--;)
06970 x1[i] = Gecode::IntVar(vm.var(a1[i]->toVar()));
06971 Gecode::Reflection::ArrayArg& a2 = *spec[2]->toArray();
06972 Gecode::VarArgArray<Gecode::IntVar> x2(a2.size());
06973 for (int i=a2.size(); i--;)
06974 x2[i] = Gecode::IntVar(vm.var(a2[i]->toVar()));
06975 Gecode::Reflection::ArrayArg& a3 = *spec[3]->toArray();
06976 Gecode::VarArgArray<Gecode::IntVar> x3(a3.size());
06977 for (int i=a3.size(); i--;)
06978 x3[i] = Gecode::IntVar(vm.var(a3[i]->toVar()));
06979 Gecode::Reflection::IntArrayArg& a4 = *spec[4]->toIntArray();
06980 Gecode::IntArgs x4(a4.size());
06981 for (int i=a4.size(); i--;) x4[i] = a4[i];
06982 Gecode::Reflection::IntArrayArg& a5 = *spec[5]->toIntArray();
06983 Gecode::IntArgs x5(a5.size());
06984 for (int i=a5.size(); i--;) x5[i] = a5[i];
06985 bool x6 = static_cast<bool>(spec[6]->toInt());
06986 Gecode::IntConLevel x7 = toEnum_IntConLevel(spec[7]);
06987 Gecode::PropKind x8 = toEnum_PropKind(spec[8]);
06988 Gecode::cumulatives(home, x0,x1,x2,x3,x4,x5,x6,x7,x8);
06989 return;
06990 }
06991 #endif
06992 #if defined(GECODE_HAS_INT_VARS)
06993 if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
06994 isVarArgs<Gecode::IntVar>(vm, spec[1]) &&
06995 spec[2]->isIntArray() &&
06996 isVarArgs<Gecode::IntVar>(vm, spec[3]) &&
06997 spec[4]->isIntArray() &&
06998 spec[5]->isIntArray() &&
06999 spec[6]->isInt() &&
07000 isEnum_IntConLevel(spec[7]) &&
07001 isEnum_PropKind(spec[8]))
07002 {
07003 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
07004 Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
07005 for (int i=a0.size(); i--;)
07006 x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
07007 Gecode::Reflection::ArrayArg& a1 = *spec[1]->toArray();
07008 Gecode::VarArgArray<Gecode::IntVar> x1(a1.size());
07009 for (int i=a1.size(); i--;)
07010 x1[i] = Gecode::IntVar(vm.var(a1[i]->toVar()));
07011 Gecode::Reflection::IntArrayArg& a2 = *spec[2]->toIntArray();
07012 Gecode::IntArgs x2(a2.size());
07013 for (int i=a2.size(); i--;) x2[i] = a2[i];
07014 Gecode::Reflection::ArrayArg& a3 = *spec[3]->toArray();
07015 Gecode::VarArgArray<Gecode::IntVar> x3(a3.size());
07016 for (int i=a3.size(); i--;)
07017 x3[i] = Gecode::IntVar(vm.var(a3[i]->toVar()));
07018 Gecode::Reflection::IntArrayArg& a4 = *spec[4]->toIntArray();
07019 Gecode::IntArgs x4(a4.size());
07020 for (int i=a4.size(); i--;) x4[i] = a4[i];
07021 Gecode::Reflection::IntArrayArg& a5 = *spec[5]->toIntArray();
07022 Gecode::IntArgs x5(a5.size());
07023 for (int i=a5.size(); i--;) x5[i] = a5[i];
07024 bool x6 = static_cast<bool>(spec[6]->toInt());
07025 Gecode::IntConLevel x7 = toEnum_IntConLevel(spec[7]);
07026 Gecode::PropKind x8 = toEnum_PropKind(spec[8]);
07027 Gecode::cumulatives(home, x0,x1,x2,x3,x4,x5,x6,x7,x8);
07028 return;
07029 }
07030 #endif
07031 #if defined(GECODE_HAS_INT_VARS)
07032 if (spec[0]->isIntArray() &&
07033 isVarArgs<Gecode::IntVar>(vm, spec[1]) &&
07034 spec[2]->isIntArray() &&
07035 isVarArgs<Gecode::IntVar>(vm, spec[3]) &&
07036 spec[4]->isIntArray() &&
07037 spec[5]->isIntArray() &&
07038 spec[6]->isInt() &&
07039 isEnum_IntConLevel(spec[7]) &&
07040 isEnum_PropKind(spec[8]))
07041 {
07042 Gecode::Reflection::IntArrayArg& a0 = *spec[0]->toIntArray();
07043 Gecode::IntArgs x0(a0.size());
07044 for (int i=a0.size(); i--;) x0[i] = a0[i];
07045 Gecode::Reflection::ArrayArg& a1 = *spec[1]->toArray();
07046 Gecode::VarArgArray<Gecode::IntVar> x1(a1.size());
07047 for (int i=a1.size(); i--;)
07048 x1[i] = Gecode::IntVar(vm.var(a1[i]->toVar()));
07049 Gecode::Reflection::IntArrayArg& a2 = *spec[2]->toIntArray();
07050 Gecode::IntArgs x2(a2.size());
07051 for (int i=a2.size(); i--;) x2[i] = a2[i];
07052 Gecode::Reflection::ArrayArg& a3 = *spec[3]->toArray();
07053 Gecode::VarArgArray<Gecode::IntVar> x3(a3.size());
07054 for (int i=a3.size(); i--;)
07055 x3[i] = Gecode::IntVar(vm.var(a3[i]->toVar()));
07056 Gecode::Reflection::IntArrayArg& a4 = *spec[4]->toIntArray();
07057 Gecode::IntArgs x4(a4.size());
07058 for (int i=a4.size(); i--;) x4[i] = a4[i];
07059 Gecode::Reflection::IntArrayArg& a5 = *spec[5]->toIntArray();
07060 Gecode::IntArgs x5(a5.size());
07061 for (int i=a5.size(); i--;) x5[i] = a5[i];
07062 bool x6 = static_cast<bool>(spec[6]->toInt());
07063 Gecode::IntConLevel x7 = toEnum_IntConLevel(spec[7]);
07064 Gecode::PropKind x8 = toEnum_PropKind(spec[8]);
07065 Gecode::cumulatives(home, x0,x1,x2,x3,x4,x5,x6,x7,x8);
07066 return;
07067 }
07068 #endif
07069 throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::cumulatives");
07070 }
07071 break;
07072 default: throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::cumulatives");
07073 }
07074 }
07075 };
07076
07077 class Register_channel {
07078 public:
07080 static Gecode::Support::Symbol ati(void) {
07081 return "Gecode::Post::channel";
07082 }
07083
07085 static void post(Gecode::Space* home, Gecode::Reflection::VarMap& vm,
07086 const Gecode::Reflection::ActorSpec& spec) {
07087 switch(spec.noOfArgs()) {
07088 case 2:
07089 {
07090 #if defined(GECODE_HAS_INT_VARS)
07091 if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
07092 isVarArgs<Gecode::IntVar>(vm, spec[1]))
07093 {
07094 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
07095 Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
07096 for (int i=a0.size(); i--;)
07097 x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
07098 Gecode::Reflection::ArrayArg& a1 = *spec[1]->toArray();
07099 Gecode::VarArgArray<Gecode::IntVar> x1(a1.size());
07100 for (int i=a1.size(); i--;)
07101 x1[i] = Gecode::IntVar(vm.var(a1[i]->toVar()));
07102 Gecode::channel(home, x0,x1);
07103 return;
07104 }
07105 #endif
07106 #if defined(GECODE_HAS_INT_VARS)
07107 if (isVar<Gecode::BoolVar>(vm, spec[0]) &&
07108 isVar<Gecode::IntVar>(vm, spec[1]))
07109 {
07110 Gecode::BoolVar x0(vm.var(spec[0]->toVar()));
07111 Gecode::IntVar x1(vm.var(spec[1]->toVar()));
07112 Gecode::channel(home, x0,x1);
07113 return;
07114 }
07115 #endif
07116 #if defined(GECODE_HAS_INT_VARS)
07117 if (isVar<Gecode::IntVar>(vm, spec[0]) &&
07118 isVar<Gecode::BoolVar>(vm, spec[1]))
07119 {
07120 Gecode::IntVar x0(vm.var(spec[0]->toVar()));
07121 Gecode::BoolVar x1(vm.var(spec[1]->toVar()));
07122 Gecode::channel(home, x0,x1);
07123 return;
07124 }
07125 #endif
07126 #if defined(GECODE_HAS_INT_VARS)
07127 if (isVarArgs<Gecode::BoolVar>(vm, spec[0]) &&
07128 isVar<Gecode::IntVar>(vm, spec[1]))
07129 {
07130 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
07131 Gecode::VarArgArray<Gecode::BoolVar> x0(a0.size());
07132 for (int i=a0.size(); i--;)
07133 x0[i] = Gecode::BoolVar(vm.var(a0[i]->toVar()));
07134 Gecode::IntVar x1(vm.var(spec[1]->toVar()));
07135 Gecode::channel(home, x0,x1);
07136 return;
07137 }
07138 #endif
07139 #if defined(GECODE_HAS_SET_VARS)
07140 if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
07141 isVarArgs<Gecode::SetVar>(vm, spec[1]))
07142 {
07143 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
07144 Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
07145 for (int i=a0.size(); i--;)
07146 x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
07147 Gecode::Reflection::ArrayArg& a1 = *spec[1]->toArray();
07148 Gecode::VarArgArray<Gecode::SetVar> x1(a1.size());
07149 for (int i=a1.size(); i--;)
07150 x1[i] = Gecode::SetVar(vm.var(a1[i]->toVar()));
07151 Gecode::channel(home, x0,x1);
07152 return;
07153 }
07154 #endif
07155 #if defined(GECODE_HAS_SET_VARS)
07156 if (isVarArgs<Gecode::BoolVar>(vm, spec[0]) &&
07157 isVar<Gecode::SetVar>(vm, spec[1]))
07158 {
07159 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
07160 Gecode::VarArgArray<Gecode::BoolVar> x0(a0.size());
07161 for (int i=a0.size(); i--;)
07162 x0[i] = Gecode::BoolVar(vm.var(a0[i]->toVar()));
07163 Gecode::SetVar x1(vm.var(spec[1]->toVar()));
07164 Gecode::channel(home, x0,x1);
07165 return;
07166 }
07167 #endif
07168 throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::channel");
07169 }
07170 break;
07171 case 3:
07172 {
07173 #if defined(GECODE_HAS_INT_VARS)
07174 if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
07175 isVarArgs<Gecode::IntVar>(vm, spec[1]) &&
07176 isEnum_IntConLevel(spec[2]))
07177 {
07178 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
07179 Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
07180 for (int i=a0.size(); i--;)
07181 x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
07182 Gecode::Reflection::ArrayArg& a1 = *spec[1]->toArray();
07183 Gecode::VarArgArray<Gecode::IntVar> x1(a1.size());
07184 for (int i=a1.size(); i--;)
07185 x1[i] = Gecode::IntVar(vm.var(a1[i]->toVar()));
07186 Gecode::IntConLevel x2 = toEnum_IntConLevel(spec[2]);
07187 Gecode::channel(home, x0,x1,x2);
07188 return;
07189 }
07190 #endif
07191 #if defined(GECODE_HAS_INT_VARS)
07192 if (isVar<Gecode::BoolVar>(vm, spec[0]) &&
07193 isVar<Gecode::IntVar>(vm, spec[1]) &&
07194 isEnum_IntConLevel(spec[2]))
07195 {
07196 Gecode::BoolVar x0(vm.var(spec[0]->toVar()));
07197 Gecode::IntVar x1(vm.var(spec[1]->toVar()));
07198 Gecode::IntConLevel x2 = toEnum_IntConLevel(spec[2]);
07199 Gecode::channel(home, x0,x1,x2);
07200 return;
07201 }
07202 #endif
07203 #if defined(GECODE_HAS_INT_VARS)
07204 if (isVar<Gecode::IntVar>(vm, spec[0]) &&
07205 isVar<Gecode::BoolVar>(vm, spec[1]) &&
07206 isEnum_IntConLevel(spec[2]))
07207 {
07208 Gecode::IntVar x0(vm.var(spec[0]->toVar()));
07209 Gecode::BoolVar x1(vm.var(spec[1]->toVar()));
07210 Gecode::IntConLevel x2 = toEnum_IntConLevel(spec[2]);
07211 Gecode::channel(home, x0,x1,x2);
07212 return;
07213 }
07214 #endif
07215 #if defined(GECODE_HAS_INT_VARS)
07216 if (isVarArgs<Gecode::BoolVar>(vm, spec[0]) &&
07217 isVar<Gecode::IntVar>(vm, spec[1]) &&
07218 spec[2]->isInt())
07219 {
07220 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
07221 Gecode::VarArgArray<Gecode::BoolVar> x0(a0.size());
07222 for (int i=a0.size(); i--;)
07223 x0[i] = Gecode::BoolVar(vm.var(a0[i]->toVar()));
07224 Gecode::IntVar x1(vm.var(spec[1]->toVar()));
07225 int x2 = static_cast<int>(spec[2]->toInt());
07226 Gecode::channel(home, x0,x1,x2);
07227 return;
07228 }
07229 #endif
07230 throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::channel");
07231 }
07232 break;
07233 case 4:
07234 {
07235 #if defined(GECODE_HAS_INT_VARS)
07236 if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
07237 isVarArgs<Gecode::IntVar>(vm, spec[1]) &&
07238 isEnum_IntConLevel(spec[2]) &&
07239 isEnum_PropKind(spec[3]))
07240 {
07241 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
07242 Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
07243 for (int i=a0.size(); i--;)
07244 x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
07245 Gecode::Reflection::ArrayArg& a1 = *spec[1]->toArray();
07246 Gecode::VarArgArray<Gecode::IntVar> x1(a1.size());
07247 for (int i=a1.size(); i--;)
07248 x1[i] = Gecode::IntVar(vm.var(a1[i]->toVar()));
07249 Gecode::IntConLevel x2 = toEnum_IntConLevel(spec[2]);
07250 Gecode::PropKind x3 = toEnum_PropKind(spec[3]);
07251 Gecode::channel(home, x0,x1,x2,x3);
07252 return;
07253 }
07254 #endif
07255 #if defined(GECODE_HAS_INT_VARS)
07256 if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
07257 spec[1]->isInt() &&
07258 isVarArgs<Gecode::IntVar>(vm, spec[2]) &&
07259 spec[3]->isInt())
07260 {
07261 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
07262 Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
07263 for (int i=a0.size(); i--;)
07264 x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
07265 unsigned int x1 = static_cast<unsigned int>(spec[1]->toInt());
07266 Gecode::Reflection::ArrayArg& a2 = *spec[2]->toArray();
07267 Gecode::VarArgArray<Gecode::IntVar> x2(a2.size());
07268 for (int i=a2.size(); i--;)
07269 x2[i] = Gecode::IntVar(vm.var(a2[i]->toVar()));
07270 unsigned int x3 = static_cast<unsigned int>(spec[3]->toInt());
07271 Gecode::channel(home, x0,x1,x2,x3);
07272 return;
07273 }
07274 #endif
07275 #if defined(GECODE_HAS_INT_VARS)
07276 if (isVar<Gecode::BoolVar>(vm, spec[0]) &&
07277 isVar<Gecode::IntVar>(vm, spec[1]) &&
07278 isEnum_IntConLevel(spec[2]) &&
07279 isEnum_PropKind(spec[3]))
07280 {
07281 Gecode::BoolVar x0(vm.var(spec[0]->toVar()));
07282 Gecode::IntVar x1(vm.var(spec[1]->toVar()));
07283 Gecode::IntConLevel x2 = toEnum_IntConLevel(spec[2]);
07284 Gecode::PropKind x3 = toEnum_PropKind(spec[3]);
07285 Gecode::channel(home, x0,x1,x2,x3);
07286 return;
07287 }
07288 #endif
07289 #if defined(GECODE_HAS_INT_VARS)
07290 if (isVar<Gecode::IntVar>(vm, spec[0]) &&
07291 isVar<Gecode::BoolVar>(vm, spec[1]) &&
07292 isEnum_IntConLevel(spec[2]) &&
07293 isEnum_PropKind(spec[3]))
07294 {
07295 Gecode::IntVar x0(vm.var(spec[0]->toVar()));
07296 Gecode::BoolVar x1(vm.var(spec[1]->toVar()));
07297 Gecode::IntConLevel x2 = toEnum_IntConLevel(spec[2]);
07298 Gecode::PropKind x3 = toEnum_PropKind(spec[3]);
07299 Gecode::channel(home, x0,x1,x2,x3);
07300 return;
07301 }
07302 #endif
07303 #if defined(GECODE_HAS_INT_VARS)
07304 if (isVarArgs<Gecode::BoolVar>(vm, spec[0]) &&
07305 isVar<Gecode::IntVar>(vm, spec[1]) &&
07306 spec[2]->isInt() &&
07307 isEnum_IntConLevel(spec[3]))
07308 {
07309 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
07310 Gecode::VarArgArray<Gecode::BoolVar> x0(a0.size());
07311 for (int i=a0.size(); i--;)
07312 x0[i] = Gecode::BoolVar(vm.var(a0[i]->toVar()));
07313 Gecode::IntVar x1(vm.var(spec[1]->toVar()));
07314 int x2 = static_cast<int>(spec[2]->toInt());
07315 Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
07316 Gecode::channel(home, x0,x1,x2,x3);
07317 return;
07318 }
07319 #endif
07320 throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::channel");
07321 }
07322 break;
07323 case 5:
07324 {
07325 #if defined(GECODE_HAS_INT_VARS)
07326 if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
07327 spec[1]->isInt() &&
07328 isVarArgs<Gecode::IntVar>(vm, spec[2]) &&
07329 spec[3]->isInt() &&
07330 isEnum_IntConLevel(spec[4]))
07331 {
07332 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
07333 Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
07334 for (int i=a0.size(); i--;)
07335 x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
07336 unsigned int x1 = static_cast<unsigned int>(spec[1]->toInt());
07337 Gecode::Reflection::ArrayArg& a2 = *spec[2]->toArray();
07338 Gecode::VarArgArray<Gecode::IntVar> x2(a2.size());
07339 for (int i=a2.size(); i--;)
07340 x2[i] = Gecode::IntVar(vm.var(a2[i]->toVar()));
07341 unsigned int x3 = static_cast<unsigned int>(spec[3]->toInt());
07342 Gecode::IntConLevel x4 = toEnum_IntConLevel(spec[4]);
07343 Gecode::channel(home, x0,x1,x2,x3,x4);
07344 return;
07345 }
07346 #endif
07347 #if defined(GECODE_HAS_INT_VARS)
07348 if (isVarArgs<Gecode::BoolVar>(vm, spec[0]) &&
07349 isVar<Gecode::IntVar>(vm, spec[1]) &&
07350 spec[2]->isInt() &&
07351 isEnum_IntConLevel(spec[3]) &&
07352 isEnum_PropKind(spec[4]))
07353 {
07354 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
07355 Gecode::VarArgArray<Gecode::BoolVar> x0(a0.size());
07356 for (int i=a0.size(); i--;)
07357 x0[i] = Gecode::BoolVar(vm.var(a0[i]->toVar()));
07358 Gecode::IntVar x1(vm.var(spec[1]->toVar()));
07359 int x2 = static_cast<int>(spec[2]->toInt());
07360 Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
07361 Gecode::PropKind x4 = toEnum_PropKind(spec[4]);
07362 Gecode::channel(home, x0,x1,x2,x3,x4);
07363 return;
07364 }
07365 #endif
07366 throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::channel");
07367 }
07368 break;
07369 case 6:
07370 {
07371 #if defined(GECODE_HAS_INT_VARS)
07372 if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
07373 spec[1]->isInt() &&
07374 isVarArgs<Gecode::IntVar>(vm, spec[2]) &&
07375 spec[3]->isInt() &&
07376 isEnum_IntConLevel(spec[4]) &&
07377 isEnum_PropKind(spec[5]))
07378 {
07379 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
07380 Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
07381 for (int i=a0.size(); i--;)
07382 x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
07383 unsigned int x1 = static_cast<unsigned int>(spec[1]->toInt());
07384 Gecode::Reflection::ArrayArg& a2 = *spec[2]->toArray();
07385 Gecode::VarArgArray<Gecode::IntVar> x2(a2.size());
07386 for (int i=a2.size(); i--;)
07387 x2[i] = Gecode::IntVar(vm.var(a2[i]->toVar()));
07388 unsigned int x3 = static_cast<unsigned int>(spec[3]->toInt());
07389 Gecode::IntConLevel x4 = toEnum_IntConLevel(spec[4]);
07390 Gecode::PropKind x5 = toEnum_PropKind(spec[5]);
07391 Gecode::channel(home, x0,x1,x2,x3,x4,x5);
07392 return;
07393 }
07394 #endif
07395 throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::channel");
07396 }
07397 break;
07398 default: throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::channel");
07399 }
07400 }
07401 };
07402
07403 class Register_cardinality {
07404 public:
07406 static Gecode::Support::Symbol ati(void) {
07407 return "Gecode::Post::cardinality";
07408 }
07409
07411 static void post(Gecode::Space* home, Gecode::Reflection::VarMap& vm,
07412 const Gecode::Reflection::ActorSpec& spec) {
07413 switch(spec.noOfArgs()) {
07414 case 2:
07415 {
07416 #if defined(GECODE_HAS_SET_VARS)
07417 if (isVar<Gecode::SetVar>(vm, spec[0]) &&
07418 isVar<Gecode::IntVar>(vm, spec[1]))
07419 {
07420 Gecode::SetVar x0(vm.var(spec[0]->toVar()));
07421 Gecode::IntVar x1(vm.var(spec[1]->toVar()));
07422 Gecode::cardinality(home, x0,x1);
07423 return;
07424 }
07425 #endif
07426 throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::cardinality");
07427 }
07428 break;
07429 case 3:
07430 {
07431 #if defined(GECODE_HAS_SET_VARS)
07432 if (isVar<Gecode::SetVar>(vm, spec[0]) &&
07433 spec[1]->isInt() &&
07434 spec[2]->isInt())
07435 {
07436 Gecode::SetVar x0(vm.var(spec[0]->toVar()));
07437 unsigned int x1 = static_cast<unsigned int>(spec[1]->toInt());
07438 unsigned int x2 = static_cast<unsigned int>(spec[2]->toInt());
07439 Gecode::cardinality(home, x0,x1,x2);
07440 return;
07441 }
07442 #endif
07443 throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::cardinality");
07444 }
07445 break;
07446 default: throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::cardinality");
07447 }
07448 }
07449 };
07450
07451 class Register_elementsDisjoint {
07452 public:
07454 static Gecode::Support::Symbol ati(void) {
07455 return "Gecode::Post::elementsDisjoint";
07456 }
07457
07459 static void post(Gecode::Space* home, Gecode::Reflection::VarMap& vm,
07460 const Gecode::Reflection::ActorSpec& spec) {
07461 switch(spec.noOfArgs()) {
07462 case 2:
07463 {
07464 #if defined(GECODE_HAS_SET_VARS)
07465 if (isVarArgs<Gecode::SetVar>(vm, spec[0]) &&
07466 isVar<Gecode::SetVar>(vm, spec[1]))
07467 {
07468 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
07469 Gecode::VarArgArray<Gecode::SetVar> x0(a0.size());
07470 for (int i=a0.size(); i--;)
07471 x0[i] = Gecode::SetVar(vm.var(a0[i]->toVar()));
07472 Gecode::SetVar x1(vm.var(spec[1]->toVar()));
07473 Gecode::elementsDisjoint(home, x0,x1);
07474 return;
07475 }
07476 #endif
07477 throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::elementsDisjoint");
07478 }
07479 break;
07480 default: throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::elementsDisjoint");
07481 }
07482 }
07483 };
07484
07485 class Register_min {
07486 public:
07488 static Gecode::Support::Symbol ati(void) {
07489 return "Gecode::Post::min";
07490 }
07491
07493 static void post(Gecode::Space* home, Gecode::Reflection::VarMap& vm,
07494 const Gecode::Reflection::ActorSpec& spec) {
07495 switch(spec.noOfArgs()) {
07496 case 2:
07497 {
07498 #if defined(GECODE_HAS_INT_VARS)
07499 if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
07500 isVar<Gecode::IntVar>(vm, spec[1]))
07501 {
07502 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
07503 Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
07504 for (int i=a0.size(); i--;)
07505 x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
07506 Gecode::IntVar x1(vm.var(spec[1]->toVar()));
07507 Gecode::min(home, x0,x1);
07508 return;
07509 }
07510 #endif
07511 #if defined(GECODE_HAS_SET_VARS)
07512 if (isVar<Gecode::SetVar>(vm, spec[0]) &&
07513 isVar<Gecode::IntVar>(vm, spec[1]))
07514 {
07515 Gecode::SetVar x0(vm.var(spec[0]->toVar()));
07516 Gecode::IntVar x1(vm.var(spec[1]->toVar()));
07517 Gecode::min(home, x0,x1);
07518 return;
07519 }
07520 #endif
07521 throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::min");
07522 }
07523 break;
07524 case 3:
07525 {
07526 #if defined(GECODE_HAS_INT_VARS)
07527 if (isVar<Gecode::IntVar>(vm, spec[0]) &&
07528 isVar<Gecode::IntVar>(vm, spec[1]) &&
07529 isVar<Gecode::IntVar>(vm, spec[2]))
07530 {
07531 Gecode::IntVar x0(vm.var(spec[0]->toVar()));
07532 Gecode::IntVar x1(vm.var(spec[1]->toVar()));
07533 Gecode::IntVar x2(vm.var(spec[2]->toVar()));
07534 Gecode::min(home, x0,x1,x2);
07535 return;
07536 }
07537 #endif
07538 #if defined(GECODE_HAS_INT_VARS)
07539 if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
07540 isVar<Gecode::IntVar>(vm, spec[1]) &&
07541 isEnum_IntConLevel(spec[2]))
07542 {
07543 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
07544 Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
07545 for (int i=a0.size(); i--;)
07546 x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
07547 Gecode::IntVar x1(vm.var(spec[1]->toVar()));
07548 Gecode::IntConLevel x2 = toEnum_IntConLevel(spec[2]);
07549 Gecode::min(home, x0,x1,x2);
07550 return;
07551 }
07552 #endif
07553 throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::min");
07554 }
07555 break;
07556 case 4:
07557 {
07558 #if defined(GECODE_HAS_INT_VARS)
07559 if (isVar<Gecode::IntVar>(vm, spec[0]) &&
07560 isVar<Gecode::IntVar>(vm, spec[1]) &&
07561 isVar<Gecode::IntVar>(vm, spec[2]) &&
07562 isEnum_IntConLevel(spec[3]))
07563 {
07564 Gecode::IntVar x0(vm.var(spec[0]->toVar()));
07565 Gecode::IntVar x1(vm.var(spec[1]->toVar()));
07566 Gecode::IntVar x2(vm.var(spec[2]->toVar()));
07567 Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
07568 Gecode::min(home, x0,x1,x2,x3);
07569 return;
07570 }
07571 #endif
07572 #if defined(GECODE_HAS_INT_VARS)
07573 if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
07574 isVar<Gecode::IntVar>(vm, spec[1]) &&
07575 isEnum_IntConLevel(spec[2]) &&
07576 isEnum_PropKind(spec[3]))
07577 {
07578 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
07579 Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
07580 for (int i=a0.size(); i--;)
07581 x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
07582 Gecode::IntVar x1(vm.var(spec[1]->toVar()));
07583 Gecode::IntConLevel x2 = toEnum_IntConLevel(spec[2]);
07584 Gecode::PropKind x3 = toEnum_PropKind(spec[3]);
07585 Gecode::min(home, x0,x1,x2,x3);
07586 return;
07587 }
07588 #endif
07589 throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::min");
07590 }
07591 break;
07592 case 5:
07593 {
07594 #if defined(GECODE_HAS_INT_VARS)
07595 if (isVar<Gecode::IntVar>(vm, spec[0]) &&
07596 isVar<Gecode::IntVar>(vm, spec[1]) &&
07597 isVar<Gecode::IntVar>(vm, spec[2]) &&
07598 isEnum_IntConLevel(spec[3]) &&
07599 isEnum_PropKind(spec[4]))
07600 {
07601 Gecode::IntVar x0(vm.var(spec[0]->toVar()));
07602 Gecode::IntVar x1(vm.var(spec[1]->toVar()));
07603 Gecode::IntVar x2(vm.var(spec[2]->toVar()));
07604 Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
07605 Gecode::PropKind x4 = toEnum_PropKind(spec[4]);
07606 Gecode::min(home, x0,x1,x2,x3,x4);
07607 return;
07608 }
07609 #endif
07610 throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::min");
07611 }
07612 break;
07613 default: throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::min");
07614 }
07615 }
07616 };
07617
07618 class Register_sequentialUnion {
07619 public:
07621 static Gecode::Support::Symbol ati(void) {
07622 return "Gecode::Post::sequentialUnion";
07623 }
07624
07626 static void post(Gecode::Space* home, Gecode::Reflection::VarMap& vm,
07627 const Gecode::Reflection::ActorSpec& spec) {
07628 switch(spec.noOfArgs()) {
07629 case 2:
07630 {
07631 #if defined(GECODE_HAS_SET_VARS)
07632 if (isVarArgs<Gecode::SetVar>(vm, spec[0]) &&
07633 isVar<Gecode::SetVar>(vm, spec[1]))
07634 {
07635 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
07636 Gecode::VarArgArray<Gecode::SetVar> x0(a0.size());
07637 for (int i=a0.size(); i--;)
07638 x0[i] = Gecode::SetVar(vm.var(a0[i]->toVar()));
07639 Gecode::SetVar x1(vm.var(spec[1]->toVar()));
07640 Gecode::sequentialUnion(home, x0,x1);
07641 return;
07642 }
07643 #endif
07644 throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::sequentialUnion");
07645 }
07646 break;
07647 default: throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::sequentialUnion");
07648 }
07649 }
07650 };
07651
07652 class Register_branch {
07653 public:
07655 static Gecode::Support::Symbol ati(void) {
07656 return "Gecode::Post::branch";
07657 }
07658
07660 static void post(Gecode::Space* home, Gecode::Reflection::VarMap& vm,
07661 const Gecode::Reflection::ActorSpec& spec) {
07662 switch(spec.noOfArgs()) {
07663 case 3:
07664 {
07665 #if defined(GECODE_HAS_INT_VARS)
07666 if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
07667 isEnum_IntVarBranch(spec[1]) &&
07668 isEnum_IntValBranch(spec[2]))
07669 {
07670 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
07671 Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
07672 for (int i=a0.size(); i--;)
07673 x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
07674 Gecode::IntVarBranch x1 = toEnum_IntVarBranch(spec[1]);
07675 Gecode::IntValBranch x2 = toEnum_IntValBranch(spec[2]);
07676 Gecode::branch(home, x0,x1,x2);
07677 return;
07678 }
07679 #endif
07680 #if defined(GECODE_HAS_INT_VARS)
07681 if (isVarArgs<Gecode::BoolVar>(vm, spec[0]) &&
07682 isEnum_IntVarBranch(spec[1]) &&
07683 isEnum_IntValBranch(spec[2]))
07684 {
07685 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
07686 Gecode::VarArgArray<Gecode::BoolVar> x0(a0.size());
07687 for (int i=a0.size(); i--;)
07688 x0[i] = Gecode::BoolVar(vm.var(a0[i]->toVar()));
07689 Gecode::IntVarBranch x1 = toEnum_IntVarBranch(spec[1]);
07690 Gecode::IntValBranch x2 = toEnum_IntValBranch(spec[2]);
07691 Gecode::branch(home, x0,x1,x2);
07692 return;
07693 }
07694 #endif
07695 #if defined(GECODE_HAS_SET_VARS)
07696 if (isVarArgs<Gecode::SetVar>(vm, spec[0]) &&
07697 isEnum_SetVarBranch(spec[1]) &&
07698 isEnum_SetValBranch(spec[2]))
07699 {
07700 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
07701 Gecode::VarArgArray<Gecode::SetVar> x0(a0.size());
07702 for (int i=a0.size(); i--;)
07703 x0[i] = Gecode::SetVar(vm.var(a0[i]->toVar()));
07704 Gecode::SetVarBranch x1 = toEnum_SetVarBranch(spec[1]);
07705 Gecode::SetValBranch x2 = toEnum_SetValBranch(spec[2]);
07706 Gecode::branch(home, x0,x1,x2);
07707 return;
07708 }
07709 #endif
07710 throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::branch");
07711 }
07712 break;
07713 default: throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::branch");
07714 }
07715 }
07716 };
07717
07718 class Register_atleast {
07719 public:
07721 static Gecode::Support::Symbol ati(void) {
07722 return "Gecode::Post::atleast";
07723 }
07724
07726 static void post(Gecode::Space* home, Gecode::Reflection::VarMap& vm,
07727 const Gecode::Reflection::ActorSpec& spec) {
07728 switch(spec.noOfArgs()) {
07729 case 3:
07730 {
07731 #if defined(GECODE_HAS_INT_VARS)
07732 if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
07733 spec[1]->isInt() &&
07734 spec[2]->isInt())
07735 {
07736 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
07737 Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
07738 for (int i=a0.size(); i--;)
07739 x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
07740 int x1 = static_cast<int>(spec[1]->toInt());
07741 int x2 = static_cast<int>(spec[2]->toInt());
07742 Gecode::atleast(home, x0,x1,x2);
07743 return;
07744 }
07745 #endif
07746 #if defined(GECODE_HAS_INT_VARS)
07747 if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
07748 isVar<Gecode::IntVar>(vm, spec[1]) &&
07749 spec[2]->isInt())
07750 {
07751 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
07752 Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
07753 for (int i=a0.size(); i--;)
07754 x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
07755 Gecode::IntVar x1(vm.var(spec[1]->toVar()));
07756 int x2 = static_cast<int>(spec[2]->toInt());
07757 Gecode::atleast(home, x0,x1,x2);
07758 return;
07759 }
07760 #endif
07761 #if defined(GECODE_HAS_INT_VARS)
07762 if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
07763 spec[1]->isIntArray() &&
07764 spec[2]->isInt())
07765 {
07766 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
07767 Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
07768 for (int i=a0.size(); i--;)
07769 x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
07770 Gecode::Reflection::IntArrayArg& a1 = *spec[1]->toIntArray();
07771 Gecode::IntArgs x1(a1.size());
07772 for (int i=a1.size(); i--;) x1[i] = a1[i];
07773 int x2 = static_cast<int>(spec[2]->toInt());
07774 Gecode::atleast(home, x0,x1,x2);
07775 return;
07776 }
07777 #endif
07778 #if defined(GECODE_HAS_INT_VARS)
07779 if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
07780 spec[1]->isInt() &&
07781 isVar<Gecode::IntVar>(vm, spec[2]))
07782 {
07783 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
07784 Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
07785 for (int i=a0.size(); i--;)
07786 x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
07787 int x1 = static_cast<int>(spec[1]->toInt());
07788 Gecode::IntVar x2(vm.var(spec[2]->toVar()));
07789 Gecode::atleast(home, x0,x1,x2);
07790 return;
07791 }
07792 #endif
07793 #if defined(GECODE_HAS_INT_VARS)
07794 if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
07795 isVar<Gecode::IntVar>(vm, spec[1]) &&
07796 isVar<Gecode::IntVar>(vm, spec[2]))
07797 {
07798 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
07799 Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
07800 for (int i=a0.size(); i--;)
07801 x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
07802 Gecode::IntVar x1(vm.var(spec[1]->toVar()));
07803 Gecode::IntVar x2(vm.var(spec[2]->toVar()));
07804 Gecode::atleast(home, x0,x1,x2);
07805 return;
07806 }
07807 #endif
07808 #if defined(GECODE_HAS_INT_VARS)
07809 if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
07810 spec[1]->isIntArray() &&
07811 isVar<Gecode::IntVar>(vm, spec[2]))
07812 {
07813 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
07814 Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
07815 for (int i=a0.size(); i--;)
07816 x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
07817 Gecode::Reflection::IntArrayArg& a1 = *spec[1]->toIntArray();
07818 Gecode::IntArgs x1(a1.size());
07819 for (int i=a1.size(); i--;) x1[i] = a1[i];
07820 Gecode::IntVar x2(vm.var(spec[2]->toVar()));
07821 Gecode::atleast(home, x0,x1,x2);
07822 return;
07823 }
07824 #endif
07825 throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::atleast");
07826 }
07827 break;
07828 case 4:
07829 {
07830 #if defined(GECODE_HAS_INT_VARS)
07831 if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
07832 spec[1]->isInt() &&
07833 spec[2]->isInt() &&
07834 isEnum_IntConLevel(spec[3]))
07835 {
07836 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
07837 Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
07838 for (int i=a0.size(); i--;)
07839 x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
07840 int x1 = static_cast<int>(spec[1]->toInt());
07841 int x2 = static_cast<int>(spec[2]->toInt());
07842 Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
07843 Gecode::atleast(home, x0,x1,x2,x3);
07844 return;
07845 }
07846 #endif
07847 #if defined(GECODE_HAS_INT_VARS)
07848 if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
07849 isVar<Gecode::IntVar>(vm, spec[1]) &&
07850 spec[2]->isInt() &&
07851 isEnum_IntConLevel(spec[3]))
07852 {
07853 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
07854 Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
07855 for (int i=a0.size(); i--;)
07856 x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
07857 Gecode::IntVar x1(vm.var(spec[1]->toVar()));
07858 int x2 = static_cast<int>(spec[2]->toInt());
07859 Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
07860 Gecode::atleast(home, x0,x1,x2,x3);
07861 return;
07862 }
07863 #endif
07864 #if defined(GECODE_HAS_INT_VARS)
07865 if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
07866 spec[1]->isIntArray() &&
07867 spec[2]->isInt() &&
07868 isEnum_IntConLevel(spec[3]))
07869 {
07870 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
07871 Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
07872 for (int i=a0.size(); i--;)
07873 x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
07874 Gecode::Reflection::IntArrayArg& a1 = *spec[1]->toIntArray();
07875 Gecode::IntArgs x1(a1.size());
07876 for (int i=a1.size(); i--;) x1[i] = a1[i];
07877 int x2 = static_cast<int>(spec[2]->toInt());
07878 Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
07879 Gecode::atleast(home, x0,x1,x2,x3);
07880 return;
07881 }
07882 #endif
07883 #if defined(GECODE_HAS_INT_VARS)
07884 if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
07885 spec[1]->isInt() &&
07886 isVar<Gecode::IntVar>(vm, spec[2]) &&
07887 isEnum_IntConLevel(spec[3]))
07888 {
07889 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
07890 Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
07891 for (int i=a0.size(); i--;)
07892 x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
07893 int x1 = static_cast<int>(spec[1]->toInt());
07894 Gecode::IntVar x2(vm.var(spec[2]->toVar()));
07895 Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
07896 Gecode::atleast(home, x0,x1,x2,x3);
07897 return;
07898 }
07899 #endif
07900 #if defined(GECODE_HAS_INT_VARS)
07901 if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
07902 isVar<Gecode::IntVar>(vm, spec[1]) &&
07903 isVar<Gecode::IntVar>(vm, spec[2]) &&
07904 isEnum_IntConLevel(spec[3]))
07905 {
07906 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
07907 Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
07908 for (int i=a0.size(); i--;)
07909 x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
07910 Gecode::IntVar x1(vm.var(spec[1]->toVar()));
07911 Gecode::IntVar x2(vm.var(spec[2]->toVar()));
07912 Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
07913 Gecode::atleast(home, x0,x1,x2,x3);
07914 return;
07915 }
07916 #endif
07917 #if defined(GECODE_HAS_INT_VARS)
07918 if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
07919 spec[1]->isIntArray() &&
07920 isVar<Gecode::IntVar>(vm, spec[2]) &&
07921 isEnum_IntConLevel(spec[3]))
07922 {
07923 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
07924 Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
07925 for (int i=a0.size(); i--;)
07926 x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
07927 Gecode::Reflection::IntArrayArg& a1 = *spec[1]->toIntArray();
07928 Gecode::IntArgs x1(a1.size());
07929 for (int i=a1.size(); i--;) x1[i] = a1[i];
07930 Gecode::IntVar x2(vm.var(spec[2]->toVar()));
07931 Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
07932 Gecode::atleast(home, x0,x1,x2,x3);
07933 return;
07934 }
07935 #endif
07936 throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::atleast");
07937 }
07938 break;
07939 case 5:
07940 {
07941 #if defined(GECODE_HAS_INT_VARS)
07942 if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
07943 spec[1]->isInt() &&
07944 spec[2]->isInt() &&
07945 isEnum_IntConLevel(spec[3]) &&
07946 isEnum_PropKind(spec[4]))
07947 {
07948 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
07949 Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
07950 for (int i=a0.size(); i--;)
07951 x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
07952 int x1 = static_cast<int>(spec[1]->toInt());
07953 int x2 = static_cast<int>(spec[2]->toInt());
07954 Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
07955 Gecode::PropKind x4 = toEnum_PropKind(spec[4]);
07956 Gecode::atleast(home, x0,x1,x2,x3,x4);
07957 return;
07958 }
07959 #endif
07960 #if defined(GECODE_HAS_INT_VARS)
07961 if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
07962 isVar<Gecode::IntVar>(vm, spec[1]) &&
07963 spec[2]->isInt() &&
07964 isEnum_IntConLevel(spec[3]) &&
07965 isEnum_PropKind(spec[4]))
07966 {
07967 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
07968 Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
07969 for (int i=a0.size(); i--;)
07970 x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
07971 Gecode::IntVar x1(vm.var(spec[1]->toVar()));
07972 int x2 = static_cast<int>(spec[2]->toInt());
07973 Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
07974 Gecode::PropKind x4 = toEnum_PropKind(spec[4]);
07975 Gecode::atleast(home, x0,x1,x2,x3,x4);
07976 return;
07977 }
07978 #endif
07979 #if defined(GECODE_HAS_INT_VARS)
07980 if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
07981 spec[1]->isIntArray() &&
07982 spec[2]->isInt() &&
07983 isEnum_IntConLevel(spec[3]) &&
07984 isEnum_PropKind(spec[4]))
07985 {
07986 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
07987 Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
07988 for (int i=a0.size(); i--;)
07989 x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
07990 Gecode::Reflection::IntArrayArg& a1 = *spec[1]->toIntArray();
07991 Gecode::IntArgs x1(a1.size());
07992 for (int i=a1.size(); i--;) x1[i] = a1[i];
07993 int x2 = static_cast<int>(spec[2]->toInt());
07994 Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
07995 Gecode::PropKind x4 = toEnum_PropKind(spec[4]);
07996 Gecode::atleast(home, x0,x1,x2,x3,x4);
07997 return;
07998 }
07999 #endif
08000 #if defined(GECODE_HAS_INT_VARS)
08001 if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
08002 spec[1]->isInt() &&
08003 isVar<Gecode::IntVar>(vm, spec[2]) &&
08004 isEnum_IntConLevel(spec[3]) &&
08005 isEnum_PropKind(spec[4]))
08006 {
08007 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
08008 Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
08009 for (int i=a0.size(); i--;)
08010 x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
08011 int x1 = static_cast<int>(spec[1]->toInt());
08012 Gecode::IntVar x2(vm.var(spec[2]->toVar()));
08013 Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
08014 Gecode::PropKind x4 = toEnum_PropKind(spec[4]);
08015 Gecode::atleast(home, x0,x1,x2,x3,x4);
08016 return;
08017 }
08018 #endif
08019 #if defined(GECODE_HAS_INT_VARS)
08020 if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
08021 isVar<Gecode::IntVar>(vm, spec[1]) &&
08022 isVar<Gecode::IntVar>(vm, spec[2]) &&
08023 isEnum_IntConLevel(spec[3]) &&
08024 isEnum_PropKind(spec[4]))
08025 {
08026 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
08027 Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
08028 for (int i=a0.size(); i--;)
08029 x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
08030 Gecode::IntVar x1(vm.var(spec[1]->toVar()));
08031 Gecode::IntVar x2(vm.var(spec[2]->toVar()));
08032 Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
08033 Gecode::PropKind x4 = toEnum_PropKind(spec[4]);
08034 Gecode::atleast(home, x0,x1,x2,x3,x4);
08035 return;
08036 }
08037 #endif
08038 #if defined(GECODE_HAS_INT_VARS)
08039 if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
08040 spec[1]->isIntArray() &&
08041 isVar<Gecode::IntVar>(vm, spec[2]) &&
08042 isEnum_IntConLevel(spec[3]) &&
08043 isEnum_PropKind(spec[4]))
08044 {
08045 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
08046 Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
08047 for (int i=a0.size(); i--;)
08048 x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
08049 Gecode::Reflection::IntArrayArg& a1 = *spec[1]->toIntArray();
08050 Gecode::IntArgs x1(a1.size());
08051 for (int i=a1.size(); i--;) x1[i] = a1[i];
08052 Gecode::IntVar x2(vm.var(spec[2]->toVar()));
08053 Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
08054 Gecode::PropKind x4 = toEnum_PropKind(spec[4]);
08055 Gecode::atleast(home, x0,x1,x2,x3,x4);
08056 return;
08057 }
08058 #endif
08059 throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::atleast");
08060 }
08061 break;
08062 default: throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::atleast");
08063 }
08064 }
08065 };
08066
08067 class Register_convexHull {
08068 public:
08070 static Gecode::Support::Symbol ati(void) {
08071 return "Gecode::Post::convexHull";
08072 }
08073
08075 static void post(Gecode::Space* home, Gecode::Reflection::VarMap& vm,
08076 const Gecode::Reflection::ActorSpec& spec) {
08077 switch(spec.noOfArgs()) {
08078 case 2:
08079 {
08080 #if defined(GECODE_HAS_SET_VARS)
08081 if (isVar<Gecode::SetVar>(vm, spec[0]) &&
08082 isVar<Gecode::SetVar>(vm, spec[1]))
08083 {
08084 Gecode::SetVar x0(vm.var(spec[0]->toVar()));
08085 Gecode::SetVar x1(vm.var(spec[1]->toVar()));
08086 Gecode::convexHull(home, x0,x1);
08087 return;
08088 }
08089 #endif
08090 throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::convexHull");
08091 }
08092 break;
08093 default: throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::convexHull");
08094 }
08095 }
08096 };
08097
08098 class Register_elementsInter {
08099 public:
08101 static Gecode::Support::Symbol ati(void) {
08102 return "Gecode::Post::elementsInter";
08103 }
08104
08106 static void post(Gecode::Space* home, Gecode::Reflection::VarMap& vm,
08107 const Gecode::Reflection::ActorSpec& spec) {
08108 switch(spec.noOfArgs()) {
08109 case 3:
08110 {
08111 #if defined(GECODE_HAS_SET_VARS)
08112 if (isVarArgs<Gecode::SetVar>(vm, spec[0]) &&
08113 isVar<Gecode::SetVar>(vm, spec[1]) &&
08114 isVar<Gecode::SetVar>(vm, spec[2]))
08115 {
08116 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
08117 Gecode::VarArgArray<Gecode::SetVar> x0(a0.size());
08118 for (int i=a0.size(); i--;)
08119 x0[i] = Gecode::SetVar(vm.var(a0[i]->toVar()));
08120 Gecode::SetVar x1(vm.var(spec[1]->toVar()));
08121 Gecode::SetVar x2(vm.var(spec[2]->toVar()));
08122 Gecode::elementsInter(home, x0,x1,x2);
08123 return;
08124 }
08125 #endif
08126 throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::elementsInter");
08127 }
08128 break;
08129 case 4:
08130 {
08131 #if defined(GECODE_HAS_SET_VARS)
08132 if (isVarArgs<Gecode::SetVar>(vm, spec[0]) &&
08133 isVar<Gecode::SetVar>(vm, spec[1]) &&
08134 isVar<Gecode::SetVar>(vm, spec[2]) &&
08135 spec[3]->isIntArray())
08136 {
08137 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
08138 Gecode::VarArgArray<Gecode::SetVar> x0(a0.size());
08139 for (int i=a0.size(); i--;)
08140 x0[i] = Gecode::SetVar(vm.var(a0[i]->toVar()));
08141 Gecode::SetVar x1(vm.var(spec[1]->toVar()));
08142 Gecode::SetVar x2(vm.var(spec[2]->toVar()));
08143 Gecode::Reflection::IntArrayArg* a3 = spec[3]->toIntArray();
08144 Gecode::Reflection::IntArrayArgRanges ar3(a3);
08145 Gecode::IntSet x3(ar3);
08146 Gecode::elementsInter(home, x0,x1,x2,x3);
08147 return;
08148 }
08149 #endif
08150 throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::elementsInter");
08151 }
08152 break;
08153 default: throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::elementsInter");
08154 }
08155 }
08156 };
08157
08158 class Register_sqr {
08159 public:
08161 static Gecode::Support::Symbol ati(void) {
08162 return "Gecode::Post::sqr";
08163 }
08164
08166 static void post(Gecode::Space* home, Gecode::Reflection::VarMap& vm,
08167 const Gecode::Reflection::ActorSpec& spec) {
08168 switch(spec.noOfArgs()) {
08169 case 2:
08170 {
08171 #if defined(GECODE_HAS_INT_VARS)
08172 if (isVar<Gecode::IntVar>(vm, spec[0]) &&
08173 isVar<Gecode::IntVar>(vm, spec[1]))
08174 {
08175 Gecode::IntVar x0(vm.var(spec[0]->toVar()));
08176 Gecode::IntVar x1(vm.var(spec[1]->toVar()));
08177 Gecode::sqr(home, x0,x1);
08178 return;
08179 }
08180 #endif
08181 throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::sqr");
08182 }
08183 break;
08184 case 3:
08185 {
08186 #if defined(GECODE_HAS_INT_VARS)
08187 if (isVar<Gecode::IntVar>(vm, spec[0]) &&
08188 isVar<Gecode::IntVar>(vm, spec[1]) &&
08189 isEnum_IntConLevel(spec[2]))
08190 {
08191 Gecode::IntVar x0(vm.var(spec[0]->toVar()));
08192 Gecode::IntVar x1(vm.var(spec[1]->toVar()));
08193 Gecode::IntConLevel x2 = toEnum_IntConLevel(spec[2]);
08194 Gecode::sqr(home, x0,x1,x2);
08195 return;
08196 }
08197 #endif
08198 throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::sqr");
08199 }
08200 break;
08201 case 4:
08202 {
08203 #if defined(GECODE_HAS_INT_VARS)
08204 if (isVar<Gecode::IntVar>(vm, spec[0]) &&
08205 isVar<Gecode::IntVar>(vm, spec[1]) &&
08206 isEnum_IntConLevel(spec[2]) &&
08207 isEnum_PropKind(spec[3]))
08208 {
08209 Gecode::IntVar x0(vm.var(spec[0]->toVar()));
08210 Gecode::IntVar x1(vm.var(spec[1]->toVar()));
08211 Gecode::IntConLevel x2 = toEnum_IntConLevel(spec[2]);
08212 Gecode::PropKind x3 = toEnum_PropKind(spec[3]);
08213 Gecode::sqr(home, x0,x1,x2,x3);
08214 return;
08215 }
08216 #endif
08217 throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::sqr");
08218 }
08219 break;
08220 default: throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::sqr");
08221 }
08222 }
08223 };
08224
08225 class Register_lex {
08226 public:
08228 static Gecode::Support::Symbol ati(void) {
08229 return "Gecode::Post::lex";
08230 }
08231
08233 static void post(Gecode::Space* home, Gecode::Reflection::VarMap& vm,
08234 const Gecode::Reflection::ActorSpec& spec) {
08235 switch(spec.noOfArgs()) {
08236 case 3:
08237 {
08238 #if defined(GECODE_HAS_INT_VARS)
08239 if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
08240 isEnum_IntRelType(spec[1]) &&
08241 isVarArgs<Gecode::IntVar>(vm, spec[2]))
08242 {
08243 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
08244 Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
08245 for (int i=a0.size(); i--;)
08246 x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
08247 Gecode::IntRelType x1 = toEnum_IntRelType(spec[1]);
08248 Gecode::Reflection::ArrayArg& a2 = *spec[2]->toArray();
08249 Gecode::VarArgArray<Gecode::IntVar> x2(a2.size());
08250 for (int i=a2.size(); i--;)
08251 x2[i] = Gecode::IntVar(vm.var(a2[i]->toVar()));
08252 Gecode::lex(home, x0,x1,x2);
08253 return;
08254 }
08255 #endif
08256 #if defined(GECODE_HAS_INT_VARS)
08257 if (isVarArgs<Gecode::BoolVar>(vm, spec[0]) &&
08258 isEnum_IntRelType(spec[1]) &&
08259 isVarArgs<Gecode::BoolVar>(vm, spec[2]))
08260 {
08261 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
08262 Gecode::VarArgArray<Gecode::BoolVar> x0(a0.size());
08263 for (int i=a0.size(); i--;)
08264 x0[i] = Gecode::BoolVar(vm.var(a0[i]->toVar()));
08265 Gecode::IntRelType x1 = toEnum_IntRelType(spec[1]);
08266 Gecode::Reflection::ArrayArg& a2 = *spec[2]->toArray();
08267 Gecode::VarArgArray<Gecode::BoolVar> x2(a2.size());
08268 for (int i=a2.size(); i--;)
08269 x2[i] = Gecode::BoolVar(vm.var(a2[i]->toVar()));
08270 Gecode::lex(home, x0,x1,x2);
08271 return;
08272 }
08273 #endif
08274 throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::lex");
08275 }
08276 break;
08277 case 4:
08278 {
08279 #if defined(GECODE_HAS_INT_VARS)
08280 if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
08281 isEnum_IntRelType(spec[1]) &&
08282 isVarArgs<Gecode::IntVar>(vm, spec[2]) &&
08283 isEnum_IntConLevel(spec[3]))
08284 {
08285 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
08286 Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
08287 for (int i=a0.size(); i--;)
08288 x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
08289 Gecode::IntRelType x1 = toEnum_IntRelType(spec[1]);
08290 Gecode::Reflection::ArrayArg& a2 = *spec[2]->toArray();
08291 Gecode::VarArgArray<Gecode::IntVar> x2(a2.size());
08292 for (int i=a2.size(); i--;)
08293 x2[i] = Gecode::IntVar(vm.var(a2[i]->toVar()));
08294 Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
08295 Gecode::lex(home, x0,x1,x2,x3);
08296 return;
08297 }
08298 #endif
08299 #if defined(GECODE_HAS_INT_VARS)
08300 if (isVarArgs<Gecode::BoolVar>(vm, spec[0]) &&
08301 isEnum_IntRelType(spec[1]) &&
08302 isVarArgs<Gecode::BoolVar>(vm, spec[2]) &&
08303 isEnum_IntConLevel(spec[3]))
08304 {
08305 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
08306 Gecode::VarArgArray<Gecode::BoolVar> x0(a0.size());
08307 for (int i=a0.size(); i--;)
08308 x0[i] = Gecode::BoolVar(vm.var(a0[i]->toVar()));
08309 Gecode::IntRelType x1 = toEnum_IntRelType(spec[1]);
08310 Gecode::Reflection::ArrayArg& a2 = *spec[2]->toArray();
08311 Gecode::VarArgArray<Gecode::BoolVar> x2(a2.size());
08312 for (int i=a2.size(); i--;)
08313 x2[i] = Gecode::BoolVar(vm.var(a2[i]->toVar()));
08314 Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
08315 Gecode::lex(home, x0,x1,x2,x3);
08316 return;
08317 }
08318 #endif
08319 throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::lex");
08320 }
08321 break;
08322 case 5:
08323 {
08324 #if defined(GECODE_HAS_INT_VARS)
08325 if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
08326 isEnum_IntRelType(spec[1]) &&
08327 isVarArgs<Gecode::IntVar>(vm, spec[2]) &&
08328 isEnum_IntConLevel(spec[3]) &&
08329 isEnum_PropKind(spec[4]))
08330 {
08331 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
08332 Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
08333 for (int i=a0.size(); i--;)
08334 x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
08335 Gecode::IntRelType x1 = toEnum_IntRelType(spec[1]);
08336 Gecode::Reflection::ArrayArg& a2 = *spec[2]->toArray();
08337 Gecode::VarArgArray<Gecode::IntVar> x2(a2.size());
08338 for (int i=a2.size(); i--;)
08339 x2[i] = Gecode::IntVar(vm.var(a2[i]->toVar()));
08340 Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
08341 Gecode::PropKind x4 = toEnum_PropKind(spec[4]);
08342 Gecode::lex(home, x0,x1,x2,x3,x4);
08343 return;
08344 }
08345 #endif
08346 #if defined(GECODE_HAS_INT_VARS)
08347 if (isVarArgs<Gecode::BoolVar>(vm, spec[0]) &&
08348 isEnum_IntRelType(spec[1]) &&
08349 isVarArgs<Gecode::BoolVar>(vm, spec[2]) &&
08350 isEnum_IntConLevel(spec[3]) &&
08351 isEnum_PropKind(spec[4]))
08352 {
08353 Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
08354 Gecode::VarArgArray<Gecode::BoolVar> x0(a0.size());
08355 for (int i=a0.size(); i--;)
08356 x0[i] = Gecode::BoolVar(vm.var(a0[i]->toVar()));
08357 Gecode::IntRelType x1 = toEnum_IntRelType(spec[1]);
08358 Gecode::Reflection::ArrayArg& a2 = *spec[2]->toArray();
08359 Gecode::VarArgArray<Gecode::BoolVar> x2(a2.size());
08360 for (int i=a2.size(); i--;)
08361 x2[i] = Gecode::BoolVar(vm.var(a2[i]->toVar()));
08362 Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
08363 Gecode::PropKind x4 = toEnum_PropKind(spec[4]);
08364 Gecode::lex(home, x0,x1,x2,x3,x4);
08365 return;
08366 }
08367 #endif
08368 throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::lex");
08369 }
08370 break;
08371 default: throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::lex");
08372 }
08373 }
08374 };
08375
08376 class Register_mod {
08377 public:
08379 static Gecode::Support::Symbol ati(void) {
08380 return "Gecode::Post::mod";
08381 }
08382
08384 static void post(Gecode::Space* home, Gecode::Reflection::VarMap& vm,
08385 const Gecode::Reflection::ActorSpec& spec) {
08386 switch(spec.noOfArgs()) {
08387 case 3:
08388 {
08389 #if defined(GECODE_HAS_INT_VARS)
08390 if (isVar<Gecode::IntVar>(vm, spec[0]) &&
08391 isVar<Gecode::IntVar>(vm, spec[1]) &&
08392 isVar<Gecode::IntVar>(vm, spec[2]))
08393 {
08394 Gecode::IntVar x0(vm.var(spec[0]->toVar()));
08395 Gecode::IntVar x1(vm.var(spec[1]->toVar()));
08396 Gecode::IntVar x2(vm.var(spec[2]->toVar()));
08397 Gecode::mod(home, x0,x1,x2);
08398 return;
08399 }
08400 #endif
08401 throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::mod");
08402 }
08403 break;
08404 case 4:
08405 {
08406 #if defined(GECODE_HAS_INT_VARS)
08407 if (isVar<Gecode::IntVar>(vm, spec[0]) &&
08408 isVar<Gecode::IntVar>(vm, spec[1]) &&
08409 isVar<Gecode::IntVar>(vm, spec[2]) &&
08410 isEnum_IntConLevel(spec[3]))
08411 {
08412 Gecode::IntVar x0(vm.var(spec[0]->toVar()));
08413 Gecode::IntVar x1(vm.var(spec[1]->toVar()));
08414 Gecode::IntVar x2(vm.var(spec[2]->toVar()));
08415 Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
08416 Gecode::mod(home, x0,x1,x2,x3);
08417 return;
08418 }
08419 #endif
08420 throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::mod");
08421 }
08422 break;
08423 case 5:
08424 {
08425 #if defined(GECODE_HAS_INT_VARS)
08426 if (isVar<Gecode::IntVar>(vm, spec[0]) &&
08427 isVar<Gecode::IntVar>(vm, spec[1]) &&
08428 isVar<Gecode::IntVar>(vm, spec[2]) &&
08429 isEnum_IntConLevel(spec[3]) &&
08430 isEnum_PropKind(spec[4]))
08431 {
08432 Gecode::IntVar x0(vm.var(spec[0]->toVar()));
08433 Gecode::IntVar x1(vm.var(spec[1]->toVar()));
08434 Gecode::IntVar x2(vm.var(spec[2]->toVar()));
08435 Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
08436 Gecode::PropKind x4 = toEnum_PropKind(spec[4]);
08437 Gecode::mod(home, x0,x1,x2,x3,x4);
08438 return;
08439 }
08440 #endif
08441 throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::mod");
08442 }
08443 break;
08444 default: throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::mod");
08445 }
08446 }
08447 };
08448
08449 class PostRegistrar {
08450 GECODE_REGISTER1(Register_rel);
08451 GECODE_REGISTER1(Register_sqrt);
08452 GECODE_REGISTER1(Register_sequence);
08453 GECODE_REGISTER1(Register_sorted);
08454 GECODE_REGISTER1(Register_exactly);
08455 GECODE_REGISTER1(Register_max);
08456 GECODE_REGISTER1(Register_divmod);
08457 GECODE_REGISTER1(Register_distinct);
08458 GECODE_REGISTER1(Register_dom);
08459 GECODE_REGISTER1(Register_count);
08460 GECODE_REGISTER1(Register_match);
08461 GECODE_REGISTER1(Register_element);
08462 GECODE_REGISTER1(Register_abs);
08463 GECODE_REGISTER1(Register_elementsUnion);
08464 GECODE_REGISTER1(Register_atmost);
08465 GECODE_REGISTER1(Register_circuit);
08466 GECODE_REGISTER1(Register_assign);
08467 GECODE_REGISTER1(Register_mult);
08468 GECODE_REGISTER1(Register_atmostOne);
08469 GECODE_REGISTER1(Register_div);
08470 GECODE_REGISTER1(Register_convex);
08471 GECODE_REGISTER1(Register_unshare);
08472 GECODE_REGISTER1(Register_weights);
08473 GECODE_REGISTER1(Register_linear);
08474 GECODE_REGISTER1(Register_cumulatives);
08475 GECODE_REGISTER1(Register_channel);
08476 GECODE_REGISTER1(Register_cardinality);
08477 GECODE_REGISTER1(Register_elementsDisjoint);
08478 GECODE_REGISTER1(Register_min);
08479 GECODE_REGISTER1(Register_sequentialUnion);
08480 GECODE_REGISTER1(Register_branch);
08481 GECODE_REGISTER1(Register_atleast);
08482 GECODE_REGISTER1(Register_convexHull);
08483 GECODE_REGISTER1(Register_elementsInter);
08484 GECODE_REGISTER1(Register_sqr);
08485 GECODE_REGISTER1(Register_lex);
08486 GECODE_REGISTER1(Register_mod);
08487 };
08488
08489 }
08490 namespace Gecode { namespace Serialization {
08491
08492 void initRegistry(void) {
08493 static PostRegistrar r;
08494 return;
08495 };
08496
08497
08498 }}