Generated on Mon May 5 05:54:00 2008 for Gecode by doxygen 1.5.5

register.cc

Go to the documentation of this file.
00001 /*
00002  *  CAUTION:
00003  *    This file has been automatically generated. Do not edit,
00004  *    edit the following files instead:
00005  *     - gecode/int.hh
00006  *     - gecode/set.hh
00007  *     - gecode/minimodel.hh
00008  *
00009  *  This file contains generated code fragments which are
00010  *  copyrighted as follows:
00011  *
00012  *  Main author:
00013  *     Guido Tack <tack@gecode.org>
00014  *
00015  *  Copyright:
00016  *     Guido Tack, 2008
00017  *
00018  *  The generated code fragments are part of Gecode, the generic
00019  *  constraint development environment:
00020  *     http://www.gecode.org
00021  *
00022  *  Permission is hereby granted, free of charge, to any person obtaining
00023  *  a copy of this software and associated documentation files (the
00024  *  "Software"), to deal in the Software without restriction, including
00025  *  without limitation the rights to use, copy, modify, merge, publish,
00026  *  distribute, sublicense, and/or sell copies of the Software, and to
00027  *  permit persons to whom the Software is furnished to do so, subject to
00028  *  the following conditions:
00029  *
00030  *  The above copyright notice and this permission notice shall be
00031  *  included in all copies or substantial portions of the Software.
00032  *
00033  *  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
00034  *  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
00035  *  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
00036  *  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
00037  *  LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
00038  *  OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
00039  *  WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
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 (isVarArgs<Gecode::BoolVar>(vm, spec[0]) &&
00952             isEnum_IntRelType(spec[1]) &&
00953             isVar<Gecode::BoolVar>(vm, spec[2]) &&
00954             isEnum_IntConLevel(spec[3]))
00955         {
00956           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
00957           Gecode::VarArgArray<Gecode::BoolVar> x0(a0.size());
00958           for (int i=a0.size(); i--;)
00959             x0[i] = Gecode::BoolVar(vm.var(a0[i]->toVar()));
00960           Gecode::IntRelType x1 = toEnum_IntRelType(spec[1]);
00961           Gecode::BoolVar x2(vm.var(spec[2]->toVar()));
00962           Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
00963           Gecode::rel(home, x0,x1,x2,x3);
00964           return;
00965         }
00966 #endif
00967 #if defined(GECODE_HAS_INT_VARS)
00968         if (isVar<Gecode::BoolVar>(vm, spec[0]) &&
00969             isEnum_IntRelType(spec[1]) &&
00970             spec[2]->isInt() &&
00971             isEnum_IntConLevel(spec[3]))
00972         {
00973           Gecode::BoolVar x0(vm.var(spec[0]->toVar()));
00974           Gecode::IntRelType x1 = toEnum_IntRelType(spec[1]);
00975           int x2 = static_cast<int>(spec[2]->toInt());
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 (isVarArgs<Gecode::BoolVar>(vm, spec[0]) &&
00983             isEnum_IntRelType(spec[1]) &&
00984             spec[2]->isInt() &&
00985             isEnum_IntConLevel(spec[3]))
00986         {
00987           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
00988           Gecode::VarArgArray<Gecode::BoolVar> x0(a0.size());
00989           for (int i=a0.size(); i--;)
00990             x0[i] = Gecode::BoolVar(vm.var(a0[i]->toVar()));
00991           Gecode::IntRelType x1 = toEnum_IntRelType(spec[1]);
00992           int x2 = static_cast<int>(spec[2]->toInt());
00993           Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
00994           Gecode::rel(home, x0,x1,x2,x3);
00995           return;
00996         }
00997 #endif
00998 #if defined(GECODE_HAS_INT_VARS)
00999         if (isVarArgs<Gecode::BoolVar>(vm, spec[0]) &&
01000             isEnum_IntRelType(spec[1]) &&
01001             isVarArgs<Gecode::BoolVar>(vm, spec[2]) &&
01002             isEnum_IntConLevel(spec[3]))
01003         {
01004           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
01005           Gecode::VarArgArray<Gecode::BoolVar> x0(a0.size());
01006           for (int i=a0.size(); i--;)
01007             x0[i] = Gecode::BoolVar(vm.var(a0[i]->toVar()));
01008           Gecode::IntRelType x1 = toEnum_IntRelType(spec[1]);
01009           Gecode::Reflection::ArrayArg& a2 = *spec[2]->toArray();
01010           Gecode::VarArgArray<Gecode::BoolVar> x2(a2.size());
01011           for (int i=a2.size(); i--;)
01012             x2[i] = Gecode::BoolVar(vm.var(a2[i]->toVar()));
01013           Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
01014           Gecode::rel(home, x0,x1,x2,x3);
01015           return;
01016         }
01017 #endif
01018 #if defined(GECODE_HAS_INT_VARS)
01019         if (isVarArgs<Gecode::BoolVar>(vm, spec[0]) &&
01020             isEnum_IntRelType(spec[1]) &&
01021             isEnum_IntConLevel(spec[2]) &&
01022             isEnum_PropKind(spec[3]))
01023         {
01024           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
01025           Gecode::VarArgArray<Gecode::BoolVar> x0(a0.size());
01026           for (int i=a0.size(); i--;)
01027             x0[i] = Gecode::BoolVar(vm.var(a0[i]->toVar()));
01028           Gecode::IntRelType x1 = toEnum_IntRelType(spec[1]);
01029           Gecode::IntConLevel x2 = toEnum_IntConLevel(spec[2]);
01030           Gecode::PropKind x3 = toEnum_PropKind(spec[3]);
01031           Gecode::rel(home, x0,x1,x2,x3);
01032           return;
01033         }
01034 #endif
01035 #if defined(GECODE_HAS_INT_VARS)
01036         if (isVar<Gecode::BoolVar>(vm, spec[0]) &&
01037             isEnum_BoolOpType(spec[1]) &&
01038             isVar<Gecode::BoolVar>(vm, spec[2]) &&
01039             isVar<Gecode::BoolVar>(vm, spec[3]))
01040         {
01041           Gecode::BoolVar x0(vm.var(spec[0]->toVar()));
01042           Gecode::BoolOpType x1 = toEnum_BoolOpType(spec[1]);
01043           Gecode::BoolVar x2(vm.var(spec[2]->toVar()));
01044           Gecode::BoolVar x3(vm.var(spec[3]->toVar()));
01045           Gecode::rel(home, x0,x1,x2,x3);
01046           return;
01047         }
01048 #endif
01049 #if defined(GECODE_HAS_INT_VARS)
01050         if (isVar<Gecode::BoolVar>(vm, spec[0]) &&
01051             isEnum_BoolOpType(spec[1]) &&
01052             isVar<Gecode::BoolVar>(vm, spec[2]) &&
01053             spec[3]->isInt())
01054         {
01055           Gecode::BoolVar x0(vm.var(spec[0]->toVar()));
01056           Gecode::BoolOpType x1 = toEnum_BoolOpType(spec[1]);
01057           Gecode::BoolVar x2(vm.var(spec[2]->toVar()));
01058           int x3 = static_cast<int>(spec[3]->toInt());
01059           Gecode::rel(home, x0,x1,x2,x3);
01060           return;
01061         }
01062 #endif
01063 #if defined(GECODE_HAS_INT_VARS)
01064         if (isEnum_BoolOpType(spec[0]) &&
01065             isVarArgs<Gecode::BoolVar>(vm, spec[1]) &&
01066             isVar<Gecode::BoolVar>(vm, spec[2]) &&
01067             isEnum_IntConLevel(spec[3]))
01068         {
01069           Gecode::BoolOpType x0 = toEnum_BoolOpType(spec[0]);
01070           Gecode::Reflection::ArrayArg& a1 = *spec[1]->toArray();
01071           Gecode::VarArgArray<Gecode::BoolVar> x1(a1.size());
01072           for (int i=a1.size(); i--;)
01073             x1[i] = Gecode::BoolVar(vm.var(a1[i]->toVar()));
01074           Gecode::BoolVar x2(vm.var(spec[2]->toVar()));
01075           Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
01076           Gecode::rel(home, x0,x1,x2,x3);
01077           return;
01078         }
01079 #endif
01080 #if defined(GECODE_HAS_INT_VARS)
01081         if (isEnum_BoolOpType(spec[0]) &&
01082             isVarArgs<Gecode::BoolVar>(vm, spec[1]) &&
01083             spec[2]->isInt() &&
01084             isEnum_IntConLevel(spec[3]))
01085         {
01086           Gecode::BoolOpType x0 = toEnum_BoolOpType(spec[0]);
01087           Gecode::Reflection::ArrayArg& a1 = *spec[1]->toArray();
01088           Gecode::VarArgArray<Gecode::BoolVar> x1(a1.size());
01089           for (int i=a1.size(); i--;)
01090             x1[i] = Gecode::BoolVar(vm.var(a1[i]->toVar()));
01091           int x2 = static_cast<int>(spec[2]->toInt());
01092           Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
01093           Gecode::rel(home, x0,x1,x2,x3);
01094           return;
01095         }
01096 #endif
01097 #if defined(GECODE_HAS_SET_VARS)
01098         if (isVar<Gecode::SetVar>(vm, spec[0]) &&
01099             isEnum_SetRelType(spec[1]) &&
01100             isVar<Gecode::SetVar>(vm, spec[2]) &&
01101             isVar<Gecode::BoolVar>(vm, spec[3]))
01102         {
01103           Gecode::SetVar x0(vm.var(spec[0]->toVar()));
01104           Gecode::SetRelType x1 = toEnum_SetRelType(spec[1]);
01105           Gecode::SetVar x2(vm.var(spec[2]->toVar()));
01106           Gecode::BoolVar x3(vm.var(spec[3]->toVar()));
01107           Gecode::rel(home, x0,x1,x2,x3);
01108           return;
01109         }
01110 #endif
01111 #if defined(GECODE_HAS_SET_VARS)
01112         if (isVar<Gecode::SetVar>(vm, spec[0]) &&
01113             isEnum_SetRelType(spec[1]) &&
01114             isVar<Gecode::IntVar>(vm, spec[2]) &&
01115             isVar<Gecode::BoolVar>(vm, spec[3]))
01116         {
01117           Gecode::SetVar x0(vm.var(spec[0]->toVar()));
01118           Gecode::SetRelType x1 = toEnum_SetRelType(spec[1]);
01119           Gecode::IntVar x2(vm.var(spec[2]->toVar()));
01120           Gecode::BoolVar x3(vm.var(spec[3]->toVar()));
01121           Gecode::rel(home, x0,x1,x2,x3);
01122           return;
01123         }
01124 #endif
01125 #if defined(GECODE_HAS_SET_VARS)
01126         if (isVar<Gecode::IntVar>(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::IntVar 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 (isEnum_SetOpType(spec[0]) &&
01141             isVarArgs<Gecode::SetVar>(vm, spec[1]) &&
01142             spec[2]->isIntArray() &&
01143             isVar<Gecode::SetVar>(vm, spec[3]))
01144         {
01145           Gecode::SetOpType x0 = toEnum_SetOpType(spec[0]);
01146           Gecode::Reflection::ArrayArg& a1 = *spec[1]->toArray();
01147           Gecode::VarArgArray<Gecode::SetVar> x1(a1.size());
01148           for (int i=a1.size(); i--;)
01149             x1[i] = Gecode::SetVar(vm.var(a1[i]->toVar()));
01150           Gecode::Reflection::IntArrayArg* a2 = spec[2]->toIntArray();
01151           Gecode::Reflection::IntArrayArgRanges ar2(a2);
01152           Gecode::IntSet x2(ar2);
01153           Gecode::SetVar x3(vm.var(spec[3]->toVar()));
01154           Gecode::rel(home, x0,x1,x2,x3);
01155           return;
01156         }
01157 #endif
01158 #if defined(GECODE_HAS_SET_VARS)
01159         if (isEnum_SetOpType(spec[0]) &&
01160             isVarArgs<Gecode::IntVar>(vm, spec[1]) &&
01161             spec[2]->isIntArray() &&
01162             isVar<Gecode::SetVar>(vm, spec[3]))
01163         {
01164           Gecode::SetOpType x0 = toEnum_SetOpType(spec[0]);
01165           Gecode::Reflection::ArrayArg& a1 = *spec[1]->toArray();
01166           Gecode::VarArgArray<Gecode::IntVar> x1(a1.size());
01167           for (int i=a1.size(); i--;)
01168             x1[i] = Gecode::IntVar(vm.var(a1[i]->toVar()));
01169           Gecode::Reflection::IntArrayArg* a2 = spec[2]->toIntArray();
01170           Gecode::Reflection::IntArrayArgRanges ar2(a2);
01171           Gecode::IntSet x2(ar2);
01172           Gecode::SetVar x3(vm.var(spec[3]->toVar()));
01173           Gecode::rel(home, x0,x1,x2,x3);
01174           return;
01175         }
01176 #endif
01177         throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::rel");
01178       }
01179       break;
01180     case 5:
01181       {
01182 #if defined(GECODE_HAS_INT_VARS)
01183         if (isVar<Gecode::IntVar>(vm, spec[0]) &&
01184             isEnum_IntRelType(spec[1]) &&
01185             isVar<Gecode::IntVar>(vm, spec[2]) &&
01186             isEnum_IntConLevel(spec[3]) &&
01187             isEnum_PropKind(spec[4]))
01188         {
01189           Gecode::IntVar x0(vm.var(spec[0]->toVar()));
01190           Gecode::IntRelType x1 = toEnum_IntRelType(spec[1]);
01191           Gecode::IntVar x2(vm.var(spec[2]->toVar()));
01192           Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
01193           Gecode::PropKind x4 = toEnum_PropKind(spec[4]);
01194           Gecode::rel(home, x0,x1,x2,x3,x4);
01195           return;
01196         }
01197 #endif
01198 #if defined(GECODE_HAS_INT_VARS)
01199         if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
01200             isEnum_IntRelType(spec[1]) &&
01201             isVar<Gecode::IntVar>(vm, spec[2]) &&
01202             isEnum_IntConLevel(spec[3]) &&
01203             isEnum_PropKind(spec[4]))
01204         {
01205           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
01206           Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
01207           for (int i=a0.size(); i--;)
01208             x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
01209           Gecode::IntRelType x1 = toEnum_IntRelType(spec[1]);
01210           Gecode::IntVar x2(vm.var(spec[2]->toVar()));
01211           Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
01212           Gecode::PropKind x4 = toEnum_PropKind(spec[4]);
01213           Gecode::rel(home, x0,x1,x2,x3,x4);
01214           return;
01215         }
01216 #endif
01217 #if defined(GECODE_HAS_INT_VARS)
01218         if (isVar<Gecode::IntVar>(vm, spec[0]) &&
01219             isEnum_IntRelType(spec[1]) &&
01220             spec[2]->isInt() &&
01221             isEnum_IntConLevel(spec[3]) &&
01222             isEnum_PropKind(spec[4]))
01223         {
01224           Gecode::IntVar x0(vm.var(spec[0]->toVar()));
01225           Gecode::IntRelType x1 = toEnum_IntRelType(spec[1]);
01226           int x2 = static_cast<int>(spec[2]->toInt());
01227           Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
01228           Gecode::PropKind x4 = toEnum_PropKind(spec[4]);
01229           Gecode::rel(home, x0,x1,x2,x3,x4);
01230           return;
01231         }
01232 #endif
01233 #if defined(GECODE_HAS_INT_VARS)
01234         if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
01235             isEnum_IntRelType(spec[1]) &&
01236             spec[2]->isInt() &&
01237             isEnum_IntConLevel(spec[3]) &&
01238             isEnum_PropKind(spec[4]))
01239         {
01240           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
01241           Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
01242           for (int i=a0.size(); i--;)
01243             x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
01244           Gecode::IntRelType x1 = toEnum_IntRelType(spec[1]);
01245           int x2 = static_cast<int>(spec[2]->toInt());
01246           Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
01247           Gecode::PropKind x4 = toEnum_PropKind(spec[4]);
01248           Gecode::rel(home, x0,x1,x2,x3,x4);
01249           return;
01250         }
01251 #endif
01252 #if defined(GECODE_HAS_INT_VARS)
01253         if (isVar<Gecode::IntVar>(vm, spec[0]) &&
01254             isEnum_IntRelType(spec[1]) &&
01255             isVar<Gecode::IntVar>(vm, spec[2]) &&
01256             isVar<Gecode::BoolVar>(vm, spec[3]) &&
01257             isEnum_IntConLevel(spec[4]))
01258         {
01259           Gecode::IntVar x0(vm.var(spec[0]->toVar()));
01260           Gecode::IntRelType x1 = toEnum_IntRelType(spec[1]);
01261           Gecode::IntVar x2(vm.var(spec[2]->toVar()));
01262           Gecode::BoolVar x3(vm.var(spec[3]->toVar()));
01263           Gecode::IntConLevel x4 = toEnum_IntConLevel(spec[4]);
01264           Gecode::rel(home, x0,x1,x2,x3,x4);
01265           return;
01266         }
01267 #endif
01268 #if defined(GECODE_HAS_INT_VARS)
01269         if (isVar<Gecode::IntVar>(vm, spec[0]) &&
01270             isEnum_IntRelType(spec[1]) &&
01271             spec[2]->isInt() &&
01272             isVar<Gecode::BoolVar>(vm, spec[3]) &&
01273             isEnum_IntConLevel(spec[4]))
01274         {
01275           Gecode::IntVar x0(vm.var(spec[0]->toVar()));
01276           Gecode::IntRelType x1 = toEnum_IntRelType(spec[1]);
01277           int x2 = static_cast<int>(spec[2]->toInt());
01278           Gecode::BoolVar x3(vm.var(spec[3]->toVar()));
01279           Gecode::IntConLevel x4 = toEnum_IntConLevel(spec[4]);
01280           Gecode::rel(home, x0,x1,x2,x3,x4);
01281           return;
01282         }
01283 #endif
01284 #if defined(GECODE_HAS_INT_VARS)
01285         if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
01286             isEnum_IntRelType(spec[1]) &&
01287             isVarArgs<Gecode::IntVar>(vm, spec[2]) &&
01288             isEnum_IntConLevel(spec[3]) &&
01289             isEnum_PropKind(spec[4]))
01290         {
01291           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
01292           Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
01293           for (int i=a0.size(); i--;)
01294             x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
01295           Gecode::IntRelType x1 = toEnum_IntRelType(spec[1]);
01296           Gecode::Reflection::ArrayArg& a2 = *spec[2]->toArray();
01297           Gecode::VarArgArray<Gecode::IntVar> x2(a2.size());
01298           for (int i=a2.size(); i--;)
01299             x2[i] = Gecode::IntVar(vm.var(a2[i]->toVar()));
01300           Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
01301           Gecode::PropKind x4 = toEnum_PropKind(spec[4]);
01302           Gecode::rel(home, x0,x1,x2,x3,x4);
01303           return;
01304         }
01305 #endif
01306 #if defined(GECODE_HAS_INT_VARS)
01307         if (isVar<Gecode::BoolVar>(vm, spec[0]) &&
01308             isEnum_IntRelType(spec[1]) &&
01309             isVar<Gecode::BoolVar>(vm, spec[2]) &&
01310             isEnum_IntConLevel(spec[3]) &&
01311             isEnum_PropKind(spec[4]))
01312         {
01313           Gecode::BoolVar x0(vm.var(spec[0]->toVar()));
01314           Gecode::IntRelType x1 = toEnum_IntRelType(spec[1]);
01315           Gecode::BoolVar x2(vm.var(spec[2]->toVar()));
01316           Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
01317           Gecode::PropKind x4 = toEnum_PropKind(spec[4]);
01318           Gecode::rel(home, x0,x1,x2,x3,x4);
01319           return;
01320         }
01321 #endif
01322 #if defined(GECODE_HAS_INT_VARS)
01323         if (isVarArgs<Gecode::BoolVar>(vm, spec[0]) &&
01324             isEnum_IntRelType(spec[1]) &&
01325             isVar<Gecode::BoolVar>(vm, spec[2]) &&
01326             isEnum_IntConLevel(spec[3]) &&
01327             isEnum_PropKind(spec[4]))
01328         {
01329           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
01330           Gecode::VarArgArray<Gecode::BoolVar> x0(a0.size());
01331           for (int i=a0.size(); i--;)
01332             x0[i] = Gecode::BoolVar(vm.var(a0[i]->toVar()));
01333           Gecode::IntRelType x1 = toEnum_IntRelType(spec[1]);
01334           Gecode::BoolVar x2(vm.var(spec[2]->toVar()));
01335           Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
01336           Gecode::PropKind x4 = toEnum_PropKind(spec[4]);
01337           Gecode::rel(home, x0,x1,x2,x3,x4);
01338           return;
01339         }
01340 #endif
01341 #if defined(GECODE_HAS_INT_VARS)
01342         if (isVar<Gecode::BoolVar>(vm, spec[0]) &&
01343             isEnum_IntRelType(spec[1]) &&
01344             spec[2]->isInt() &&
01345             isEnum_IntConLevel(spec[3]) &&
01346             isEnum_PropKind(spec[4]))
01347         {
01348           Gecode::BoolVar x0(vm.var(spec[0]->toVar()));
01349           Gecode::IntRelType x1 = toEnum_IntRelType(spec[1]);
01350           int x2 = static_cast<int>(spec[2]->toInt());
01351           Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
01352           Gecode::PropKind x4 = toEnum_PropKind(spec[4]);
01353           Gecode::rel(home, x0,x1,x2,x3,x4);
01354           return;
01355         }
01356 #endif
01357 #if defined(GECODE_HAS_INT_VARS)
01358         if (isVarArgs<Gecode::BoolVar>(vm, spec[0]) &&
01359             isEnum_IntRelType(spec[1]) &&
01360             spec[2]->isInt() &&
01361             isEnum_IntConLevel(spec[3]) &&
01362             isEnum_PropKind(spec[4]))
01363         {
01364           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
01365           Gecode::VarArgArray<Gecode::BoolVar> x0(a0.size());
01366           for (int i=a0.size(); i--;)
01367             x0[i] = Gecode::BoolVar(vm.var(a0[i]->toVar()));
01368           Gecode::IntRelType x1 = toEnum_IntRelType(spec[1]);
01369           int x2 = static_cast<int>(spec[2]->toInt());
01370           Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
01371           Gecode::PropKind x4 = toEnum_PropKind(spec[4]);
01372           Gecode::rel(home, x0,x1,x2,x3,x4);
01373           return;
01374         }
01375 #endif
01376 #if defined(GECODE_HAS_INT_VARS)
01377         if (isVarArgs<Gecode::BoolVar>(vm, spec[0]) &&
01378             isEnum_IntRelType(spec[1]) &&
01379             isVarArgs<Gecode::BoolVar>(vm, spec[2]) &&
01380             isEnum_IntConLevel(spec[3]) &&
01381             isEnum_PropKind(spec[4]))
01382         {
01383           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
01384           Gecode::VarArgArray<Gecode::BoolVar> x0(a0.size());
01385           for (int i=a0.size(); i--;)
01386             x0[i] = Gecode::BoolVar(vm.var(a0[i]->toVar()));
01387           Gecode::IntRelType x1 = toEnum_IntRelType(spec[1]);
01388           Gecode::Reflection::ArrayArg& a2 = *spec[2]->toArray();
01389           Gecode::VarArgArray<Gecode::BoolVar> x2(a2.size());
01390           for (int i=a2.size(); i--;)
01391             x2[i] = Gecode::BoolVar(vm.var(a2[i]->toVar()));
01392           Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
01393           Gecode::PropKind x4 = toEnum_PropKind(spec[4]);
01394           Gecode::rel(home, x0,x1,x2,x3,x4);
01395           return;
01396         }
01397 #endif
01398 #if defined(GECODE_HAS_INT_VARS)
01399         if (isVar<Gecode::BoolVar>(vm, spec[0]) &&
01400             isEnum_BoolOpType(spec[1]) &&
01401             isVar<Gecode::BoolVar>(vm, spec[2]) &&
01402             isVar<Gecode::BoolVar>(vm, spec[3]) &&
01403             isEnum_IntConLevel(spec[4]))
01404         {
01405           Gecode::BoolVar x0(vm.var(spec[0]->toVar()));
01406           Gecode::BoolOpType x1 = toEnum_BoolOpType(spec[1]);
01407           Gecode::BoolVar x2(vm.var(spec[2]->toVar()));
01408           Gecode::BoolVar x3(vm.var(spec[3]->toVar()));
01409           Gecode::IntConLevel x4 = toEnum_IntConLevel(spec[4]);
01410           Gecode::rel(home, x0,x1,x2,x3,x4);
01411           return;
01412         }
01413 #endif
01414 #if defined(GECODE_HAS_INT_VARS)
01415         if (isVar<Gecode::BoolVar>(vm, spec[0]) &&
01416             isEnum_BoolOpType(spec[1]) &&
01417             isVar<Gecode::BoolVar>(vm, spec[2]) &&
01418             spec[3]->isInt() &&
01419             isEnum_IntConLevel(spec[4]))
01420         {
01421           Gecode::BoolVar x0(vm.var(spec[0]->toVar()));
01422           Gecode::BoolOpType x1 = toEnum_BoolOpType(spec[1]);
01423           Gecode::BoolVar x2(vm.var(spec[2]->toVar()));
01424           int x3 = static_cast<int>(spec[3]->toInt());
01425           Gecode::IntConLevel x4 = toEnum_IntConLevel(spec[4]);
01426           Gecode::rel(home, x0,x1,x2,x3,x4);
01427           return;
01428         }
01429 #endif
01430 #if defined(GECODE_HAS_INT_VARS)
01431         if (isEnum_BoolOpType(spec[0]) &&
01432             isVarArgs<Gecode::BoolVar>(vm, spec[1]) &&
01433             isVar<Gecode::BoolVar>(vm, spec[2]) &&
01434             isEnum_IntConLevel(spec[3]) &&
01435             isEnum_PropKind(spec[4]))
01436         {
01437           Gecode::BoolOpType x0 = toEnum_BoolOpType(spec[0]);
01438           Gecode::Reflection::ArrayArg& a1 = *spec[1]->toArray();
01439           Gecode::VarArgArray<Gecode::BoolVar> x1(a1.size());
01440           for (int i=a1.size(); i--;)
01441             x1[i] = Gecode::BoolVar(vm.var(a1[i]->toVar()));
01442           Gecode::BoolVar x2(vm.var(spec[2]->toVar()));
01443           Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
01444           Gecode::PropKind x4 = toEnum_PropKind(spec[4]);
01445           Gecode::rel(home, x0,x1,x2,x3,x4);
01446           return;
01447         }
01448 #endif
01449 #if defined(GECODE_HAS_INT_VARS)
01450         if (isEnum_BoolOpType(spec[0]) &&
01451             isVarArgs<Gecode::BoolVar>(vm, spec[1]) &&
01452             spec[2]->isInt() &&
01453             isEnum_IntConLevel(spec[3]) &&
01454             isEnum_PropKind(spec[4]))
01455         {
01456           Gecode::BoolOpType x0 = toEnum_BoolOpType(spec[0]);
01457           Gecode::Reflection::ArrayArg& a1 = *spec[1]->toArray();
01458           Gecode::VarArgArray<Gecode::BoolVar> x1(a1.size());
01459           for (int i=a1.size(); i--;)
01460             x1[i] = Gecode::BoolVar(vm.var(a1[i]->toVar()));
01461           int x2 = static_cast<int>(spec[2]->toInt());
01462           Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
01463           Gecode::PropKind x4 = toEnum_PropKind(spec[4]);
01464           Gecode::rel(home, x0,x1,x2,x3,x4);
01465           return;
01466         }
01467 #endif
01468 #if defined(GECODE_HAS_SET_VARS)
01469         if (isVar<Gecode::SetVar>(vm, spec[0]) &&
01470             isEnum_SetOpType(spec[1]) &&
01471             isVar<Gecode::SetVar>(vm, spec[2]) &&
01472             isEnum_SetRelType(spec[3]) &&
01473             isVar<Gecode::SetVar>(vm, spec[4]))
01474         {
01475           Gecode::SetVar x0(vm.var(spec[0]->toVar()));
01476           Gecode::SetOpType x1 = toEnum_SetOpType(spec[1]);
01477           Gecode::SetVar x2(vm.var(spec[2]->toVar()));
01478           Gecode::SetRelType x3 = toEnum_SetRelType(spec[3]);
01479           Gecode::SetVar x4(vm.var(spec[4]->toVar()));
01480           Gecode::rel(home, x0,x1,x2,x3,x4);
01481           return;
01482         }
01483 #endif
01484 #if defined(GECODE_HAS_SET_VARS)
01485         if (spec[0]->isIntArray() &&
01486             isEnum_SetOpType(spec[1]) &&
01487             isVar<Gecode::SetVar>(vm, spec[2]) &&
01488             isEnum_SetRelType(spec[3]) &&
01489             isVar<Gecode::SetVar>(vm, spec[4]))
01490         {
01491           Gecode::Reflection::IntArrayArg* a0 = spec[0]->toIntArray();
01492           Gecode::Reflection::IntArrayArgRanges ar0(a0);
01493           Gecode::IntSet x0(ar0);
01494           Gecode::SetOpType x1 = toEnum_SetOpType(spec[1]);
01495           Gecode::SetVar x2(vm.var(spec[2]->toVar()));
01496           Gecode::SetRelType x3 = toEnum_SetRelType(spec[3]);
01497           Gecode::SetVar x4(vm.var(spec[4]->toVar()));
01498           Gecode::rel(home, x0,x1,x2,x3,x4);
01499           return;
01500         }
01501 #endif
01502 #if defined(GECODE_HAS_SET_VARS)
01503         if (isVar<Gecode::SetVar>(vm, spec[0]) &&
01504             isEnum_SetOpType(spec[1]) &&
01505             spec[2]->isIntArray() &&
01506             isEnum_SetRelType(spec[3]) &&
01507             isVar<Gecode::SetVar>(vm, spec[4]))
01508         {
01509           Gecode::SetVar x0(vm.var(spec[0]->toVar()));
01510           Gecode::SetOpType x1 = toEnum_SetOpType(spec[1]);
01511           Gecode::Reflection::IntArrayArg* a2 = spec[2]->toIntArray();
01512           Gecode::Reflection::IntArrayArgRanges ar2(a2);
01513           Gecode::IntSet x2(ar2);
01514           Gecode::SetRelType x3 = toEnum_SetRelType(spec[3]);
01515           Gecode::SetVar x4(vm.var(spec[4]->toVar()));
01516           Gecode::rel(home, x0,x1,x2,x3,x4);
01517           return;
01518         }
01519 #endif
01520 #if defined(GECODE_HAS_SET_VARS)
01521         if (isVar<Gecode::SetVar>(vm, spec[0]) &&
01522             isEnum_SetOpType(spec[1]) &&
01523             isVar<Gecode::SetVar>(vm, spec[2]) &&
01524             isEnum_SetRelType(spec[3]) &&
01525             spec[4]->isIntArray())
01526         {
01527           Gecode::SetVar x0(vm.var(spec[0]->toVar()));
01528           Gecode::SetOpType x1 = toEnum_SetOpType(spec[1]);
01529           Gecode::SetVar x2(vm.var(spec[2]->toVar()));
01530           Gecode::SetRelType x3 = toEnum_SetRelType(spec[3]);
01531           Gecode::Reflection::IntArrayArg* a4 = spec[4]->toIntArray();
01532           Gecode::Reflection::IntArrayArgRanges ar4(a4);
01533           Gecode::IntSet x4(ar4);
01534           Gecode::rel(home, x0,x1,x2,x3,x4);
01535           return;
01536         }
01537 #endif
01538 #if defined(GECODE_HAS_SET_VARS)
01539         if (spec[0]->isIntArray() &&
01540             isEnum_SetOpType(spec[1]) &&
01541             isVar<Gecode::SetVar>(vm, spec[2]) &&
01542             isEnum_SetRelType(spec[3]) &&
01543             spec[4]->isIntArray())
01544         {
01545           Gecode::Reflection::IntArrayArg* a0 = spec[0]->toIntArray();
01546           Gecode::Reflection::IntArrayArgRanges ar0(a0);
01547           Gecode::IntSet x0(ar0);
01548           Gecode::SetOpType x1 = toEnum_SetOpType(spec[1]);
01549           Gecode::SetVar x2(vm.var(spec[2]->toVar()));
01550           Gecode::SetRelType x3 = toEnum_SetRelType(spec[3]);
01551           Gecode::Reflection::IntArrayArg* a4 = spec[4]->toIntArray();
01552           Gecode::Reflection::IntArrayArgRanges ar4(a4);
01553           Gecode::IntSet x4(ar4);
01554           Gecode::rel(home, x0,x1,x2,x3,x4);
01555           return;
01556         }
01557 #endif
01558 #if defined(GECODE_HAS_SET_VARS)
01559         if (isVar<Gecode::SetVar>(vm, spec[0]) &&
01560             isEnum_SetOpType(spec[1]) &&
01561             spec[2]->isIntArray() &&
01562             isEnum_SetRelType(spec[3]) &&
01563             spec[4]->isIntArray())
01564         {
01565           Gecode::SetVar x0(vm.var(spec[0]->toVar()));
01566           Gecode::SetOpType x1 = toEnum_SetOpType(spec[1]);
01567           Gecode::Reflection::IntArrayArg* a2 = spec[2]->toIntArray();
01568           Gecode::Reflection::IntArrayArgRanges ar2(a2);
01569           Gecode::IntSet x2(ar2);
01570           Gecode::SetRelType x3 = toEnum_SetRelType(spec[3]);
01571           Gecode::Reflection::IntArrayArg* a4 = spec[4]->toIntArray();
01572           Gecode::Reflection::IntArrayArgRanges ar4(a4);
01573           Gecode::IntSet x4(ar4);
01574           Gecode::rel(home, x0,x1,x2,x3,x4);
01575           return;
01576         }
01577 #endif
01578         throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::rel");
01579       }
01580       break;
01581     case 6:
01582       {
01583 #if defined(GECODE_HAS_INT_VARS)
01584         if (isVar<Gecode::IntVar>(vm, spec[0]) &&
01585             isEnum_IntRelType(spec[1]) &&
01586             isVar<Gecode::IntVar>(vm, spec[2]) &&
01587             isVar<Gecode::BoolVar>(vm, spec[3]) &&
01588             isEnum_IntConLevel(spec[4]) &&
01589             isEnum_PropKind(spec[5]))
01590         {
01591           Gecode::IntVar x0(vm.var(spec[0]->toVar()));
01592           Gecode::IntRelType x1 = toEnum_IntRelType(spec[1]);
01593           Gecode::IntVar x2(vm.var(spec[2]->toVar()));
01594           Gecode::BoolVar x3(vm.var(spec[3]->toVar()));
01595           Gecode::IntConLevel x4 = toEnum_IntConLevel(spec[4]);
01596           Gecode::PropKind x5 = toEnum_PropKind(spec[5]);
01597           Gecode::rel(home, x0,x1,x2,x3,x4,x5);
01598           return;
01599         }
01600 #endif
01601 #if defined(GECODE_HAS_INT_VARS)
01602         if (isVar<Gecode::IntVar>(vm, spec[0]) &&
01603             isEnum_IntRelType(spec[1]) &&
01604             spec[2]->isInt() &&
01605             isVar<Gecode::BoolVar>(vm, spec[3]) &&
01606             isEnum_IntConLevel(spec[4]) &&
01607             isEnum_PropKind(spec[5]))
01608         {
01609           Gecode::IntVar x0(vm.var(spec[0]->toVar()));
01610           Gecode::IntRelType x1 = toEnum_IntRelType(spec[1]);
01611           int x2 = static_cast<int>(spec[2]->toInt());
01612           Gecode::BoolVar x3(vm.var(spec[3]->toVar()));
01613           Gecode::IntConLevel x4 = toEnum_IntConLevel(spec[4]);
01614           Gecode::PropKind x5 = toEnum_PropKind(spec[5]);
01615           Gecode::rel(home, x0,x1,x2,x3,x4,x5);
01616           return;
01617         }
01618 #endif
01619 #if defined(GECODE_HAS_INT_VARS)
01620         if (isVar<Gecode::BoolVar>(vm, spec[0]) &&
01621             isEnum_BoolOpType(spec[1]) &&
01622             isVar<Gecode::BoolVar>(vm, spec[2]) &&
01623             isVar<Gecode::BoolVar>(vm, spec[3]) &&
01624             isEnum_IntConLevel(spec[4]) &&
01625             isEnum_PropKind(spec[5]))
01626         {
01627           Gecode::BoolVar x0(vm.var(spec[0]->toVar()));
01628           Gecode::BoolOpType x1 = toEnum_BoolOpType(spec[1]);
01629           Gecode::BoolVar x2(vm.var(spec[2]->toVar()));
01630           Gecode::BoolVar x3(vm.var(spec[3]->toVar()));
01631           Gecode::IntConLevel x4 = toEnum_IntConLevel(spec[4]);
01632           Gecode::PropKind x5 = toEnum_PropKind(spec[5]);
01633           Gecode::rel(home, x0,x1,x2,x3,x4,x5);
01634           return;
01635         }
01636 #endif
01637 #if defined(GECODE_HAS_INT_VARS)
01638         if (isVar<Gecode::BoolVar>(vm, spec[0]) &&
01639             isEnum_BoolOpType(spec[1]) &&
01640             isVar<Gecode::BoolVar>(vm, spec[2]) &&
01641             spec[3]->isInt() &&
01642             isEnum_IntConLevel(spec[4]) &&
01643             isEnum_PropKind(spec[5]))
01644         {
01645           Gecode::BoolVar x0(vm.var(spec[0]->toVar()));
01646           Gecode::BoolOpType x1 = toEnum_BoolOpType(spec[1]);
01647           Gecode::BoolVar x2(vm.var(spec[2]->toVar()));
01648           int x3 = static_cast<int>(spec[3]->toInt());
01649           Gecode::IntConLevel x4 = toEnum_IntConLevel(spec[4]);
01650           Gecode::PropKind x5 = toEnum_PropKind(spec[5]);
01651           Gecode::rel(home, x0,x1,x2,x3,x4,x5);
01652           return;
01653         }
01654 #endif
01655         throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::rel");
01656       }
01657       break;
01658     default: throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::rel");
01659     }
01660   }
01661 };
01662 
01663 class Register_sqrt {
01664 public:
01666   static Gecode::Support::Symbol ati(void) {
01667     return "Gecode::Post::sqrt";
01668   }
01669   
01671   static void post(Gecode::Space* home, Gecode::Reflection::VarMap& vm,
01672                    const Gecode::Reflection::ActorSpec& spec) {
01673     switch(spec.noOfArgs()) {
01674     case 2:
01675       {
01676 #if defined(GECODE_HAS_INT_VARS)
01677         if (isVar<Gecode::IntVar>(vm, spec[0]) &&
01678             isVar<Gecode::IntVar>(vm, spec[1]))
01679         {
01680           Gecode::IntVar x0(vm.var(spec[0]->toVar()));
01681           Gecode::IntVar x1(vm.var(spec[1]->toVar()));
01682           Gecode::sqrt(home, x0,x1);
01683           return;
01684         }
01685 #endif
01686         throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::sqrt");
01687       }
01688       break;
01689     case 3:
01690       {
01691 #if defined(GECODE_HAS_INT_VARS)
01692         if (isVar<Gecode::IntVar>(vm, spec[0]) &&
01693             isVar<Gecode::IntVar>(vm, spec[1]) &&
01694             isEnum_IntConLevel(spec[2]))
01695         {
01696           Gecode::IntVar x0(vm.var(spec[0]->toVar()));
01697           Gecode::IntVar x1(vm.var(spec[1]->toVar()));
01698           Gecode::IntConLevel x2 = toEnum_IntConLevel(spec[2]);
01699           Gecode::sqrt(home, x0,x1,x2);
01700           return;
01701         }
01702 #endif
01703         throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::sqrt");
01704       }
01705       break;
01706     case 4:
01707       {
01708 #if defined(GECODE_HAS_INT_VARS)
01709         if (isVar<Gecode::IntVar>(vm, spec[0]) &&
01710             isVar<Gecode::IntVar>(vm, spec[1]) &&
01711             isEnum_IntConLevel(spec[2]) &&
01712             isEnum_PropKind(spec[3]))
01713         {
01714           Gecode::IntVar x0(vm.var(spec[0]->toVar()));
01715           Gecode::IntVar x1(vm.var(spec[1]->toVar()));
01716           Gecode::IntConLevel x2 = toEnum_IntConLevel(spec[2]);
01717           Gecode::PropKind x3 = toEnum_PropKind(spec[3]);
01718           Gecode::sqrt(home, x0,x1,x2,x3);
01719           return;
01720         }
01721 #endif
01722         throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::sqrt");
01723       }
01724       break;
01725     default: throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::sqrt");
01726     }
01727   }
01728 };
01729 
01730 class Register_selectInterIn {
01731 public:
01733   static Gecode::Support::Symbol ati(void) {
01734     return "Gecode::Post::selectInterIn";
01735   }
01736   
01738   static void post(Gecode::Space* home, Gecode::Reflection::VarMap& vm,
01739                    const Gecode::Reflection::ActorSpec& spec) {
01740     switch(spec.noOfArgs()) {
01741     case 4:
01742       {
01743 #if defined(GECODE_HAS_SET_VARS)
01744         if (isVarArgs<Gecode::SetVar>(vm, spec[0]) &&
01745             isVar<Gecode::SetVar>(vm, spec[1]) &&
01746             isVar<Gecode::SetVar>(vm, spec[2]) &&
01747             spec[3]->isIntArray())
01748         {
01749           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
01750           Gecode::VarArgArray<Gecode::SetVar> x0(a0.size());
01751           for (int i=a0.size(); i--;)
01752             x0[i] = Gecode::SetVar(vm.var(a0[i]->toVar()));
01753           Gecode::SetVar x1(vm.var(spec[1]->toVar()));
01754           Gecode::SetVar x2(vm.var(spec[2]->toVar()));
01755           Gecode::Reflection::IntArrayArg* a3 = spec[3]->toIntArray();
01756           Gecode::Reflection::IntArrayArgRanges ar3(a3);
01757           Gecode::IntSet x3(ar3);
01758           Gecode::selectInterIn(home, x0,x1,x2,x3);
01759           return;
01760         }
01761 #endif
01762         throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::selectInterIn");
01763       }
01764       break;
01765     default: throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::selectInterIn");
01766     }
01767   }
01768 };
01769 
01770 class Register_sequence {
01771 public:
01773   static Gecode::Support::Symbol ati(void) {
01774     return "Gecode::Post::sequence";
01775   }
01776   
01778   static void post(Gecode::Space* home, Gecode::Reflection::VarMap& vm,
01779                    const Gecode::Reflection::ActorSpec& spec) {
01780     switch(spec.noOfArgs()) {
01781     case 1:
01782       {
01783 #if defined(GECODE_HAS_SET_VARS)
01784         if (isVarArgs<Gecode::SetVar>(vm, spec[0]))
01785         {
01786           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
01787           Gecode::VarArgArray<Gecode::SetVar> x0(a0.size());
01788           for (int i=a0.size(); i--;)
01789             x0[i] = Gecode::SetVar(vm.var(a0[i]->toVar()));
01790           Gecode::sequence(home, x0);
01791           return;
01792         }
01793 #endif
01794         throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::sequence");
01795       }
01796       break;
01797     default: throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::sequence");
01798     }
01799   }
01800 };
01801 
01802 class Register_sorted {
01803 public:
01805   static Gecode::Support::Symbol ati(void) {
01806     return "Gecode::Post::sorted";
01807   }
01808   
01810   static void post(Gecode::Space* home, Gecode::Reflection::VarMap& vm,
01811                    const Gecode::Reflection::ActorSpec& spec) {
01812     switch(spec.noOfArgs()) {
01813     case 2:
01814       {
01815 #if defined(GECODE_HAS_INT_VARS)
01816         if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
01817             isVarArgs<Gecode::IntVar>(vm, spec[1]))
01818         {
01819           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
01820           Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
01821           for (int i=a0.size(); i--;)
01822             x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
01823           Gecode::Reflection::ArrayArg& a1 = *spec[1]->toArray();
01824           Gecode::VarArgArray<Gecode::IntVar> x1(a1.size());
01825           for (int i=a1.size(); i--;)
01826             x1[i] = Gecode::IntVar(vm.var(a1[i]->toVar()));
01827           Gecode::sorted(home, x0,x1);
01828           return;
01829         }
01830 #endif
01831         throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::sorted");
01832       }
01833       break;
01834     case 3:
01835       {
01836 #if defined(GECODE_HAS_INT_VARS)
01837         if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
01838             isVarArgs<Gecode::IntVar>(vm, spec[1]) &&
01839             isEnum_IntConLevel(spec[2]))
01840         {
01841           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
01842           Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
01843           for (int i=a0.size(); i--;)
01844             x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
01845           Gecode::Reflection::ArrayArg& a1 = *spec[1]->toArray();
01846           Gecode::VarArgArray<Gecode::IntVar> x1(a1.size());
01847           for (int i=a1.size(); i--;)
01848             x1[i] = Gecode::IntVar(vm.var(a1[i]->toVar()));
01849           Gecode::IntConLevel x2 = toEnum_IntConLevel(spec[2]);
01850           Gecode::sorted(home, x0,x1,x2);
01851           return;
01852         }
01853 #endif
01854         throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::sorted");
01855       }
01856       break;
01857     case 4:
01858       {
01859 #if defined(GECODE_HAS_INT_VARS)
01860         if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
01861             isVarArgs<Gecode::IntVar>(vm, spec[1]) &&
01862             isEnum_IntConLevel(spec[2]) &&
01863             isEnum_PropKind(spec[3]))
01864         {
01865           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
01866           Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
01867           for (int i=a0.size(); i--;)
01868             x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
01869           Gecode::Reflection::ArrayArg& a1 = *spec[1]->toArray();
01870           Gecode::VarArgArray<Gecode::IntVar> x1(a1.size());
01871           for (int i=a1.size(); i--;)
01872             x1[i] = Gecode::IntVar(vm.var(a1[i]->toVar()));
01873           Gecode::IntConLevel x2 = toEnum_IntConLevel(spec[2]);
01874           Gecode::PropKind x3 = toEnum_PropKind(spec[3]);
01875           Gecode::sorted(home, x0,x1,x2,x3);
01876           return;
01877         }
01878 #endif
01879         throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::sorted");
01880       }
01881       break;
01882     default: throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::sorted");
01883     }
01884   }
01885 };
01886 
01887 class Register_exactly {
01888 public:
01890   static Gecode::Support::Symbol ati(void) {
01891     return "Gecode::Post::exactly";
01892   }
01893   
01895   static void post(Gecode::Space* home, Gecode::Reflection::VarMap& vm,
01896                    const Gecode::Reflection::ActorSpec& spec) {
01897     switch(spec.noOfArgs()) {
01898     case 3:
01899       {
01900 #if defined(GECODE_HAS_INT_VARS)
01901         if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
01902             spec[1]->isInt() &&
01903             spec[2]->isInt())
01904         {
01905           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
01906           Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
01907           for (int i=a0.size(); i--;)
01908             x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
01909           int x1 = static_cast<int>(spec[1]->toInt());
01910           int x2 = static_cast<int>(spec[2]->toInt());
01911           Gecode::exactly(home, x0,x1,x2);
01912           return;
01913         }
01914 #endif
01915 #if defined(GECODE_HAS_INT_VARS)
01916         if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
01917             isVar<Gecode::IntVar>(vm, spec[1]) &&
01918             spec[2]->isInt())
01919         {
01920           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
01921           Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
01922           for (int i=a0.size(); i--;)
01923             x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
01924           Gecode::IntVar x1(vm.var(spec[1]->toVar()));
01925           int x2 = static_cast<int>(spec[2]->toInt());
01926           Gecode::exactly(home, x0,x1,x2);
01927           return;
01928         }
01929 #endif
01930 #if defined(GECODE_HAS_INT_VARS)
01931         if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
01932             spec[1]->isIntArray() &&
01933             spec[2]->isInt())
01934         {
01935           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
01936           Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
01937           for (int i=a0.size(); i--;)
01938             x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
01939           Gecode::Reflection::IntArrayArg& a1 = *spec[1]->toIntArray();
01940           Gecode::IntArgs x1(a1.size());
01941           for (int i=a1.size(); i--;) x1[i] = a1[i];
01942           int x2 = static_cast<int>(spec[2]->toInt());
01943           Gecode::exactly(home, x0,x1,x2);
01944           return;
01945         }
01946 #endif
01947 #if defined(GECODE_HAS_INT_VARS)
01948         if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
01949             spec[1]->isInt() &&
01950             isVar<Gecode::IntVar>(vm, spec[2]))
01951         {
01952           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
01953           Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
01954           for (int i=a0.size(); i--;)
01955             x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
01956           int x1 = static_cast<int>(spec[1]->toInt());
01957           Gecode::IntVar x2(vm.var(spec[2]->toVar()));
01958           Gecode::exactly(home, x0,x1,x2);
01959           return;
01960         }
01961 #endif
01962 #if defined(GECODE_HAS_INT_VARS)
01963         if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
01964             isVar<Gecode::IntVar>(vm, spec[1]) &&
01965             isVar<Gecode::IntVar>(vm, spec[2]))
01966         {
01967           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
01968           Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
01969           for (int i=a0.size(); i--;)
01970             x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
01971           Gecode::IntVar x1(vm.var(spec[1]->toVar()));
01972           Gecode::IntVar x2(vm.var(spec[2]->toVar()));
01973           Gecode::exactly(home, x0,x1,x2);
01974           return;
01975         }
01976 #endif
01977 #if defined(GECODE_HAS_INT_VARS)
01978         if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
01979             spec[1]->isIntArray() &&
01980             isVar<Gecode::IntVar>(vm, spec[2]))
01981         {
01982           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
01983           Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
01984           for (int i=a0.size(); i--;)
01985             x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
01986           Gecode::Reflection::IntArrayArg& a1 = *spec[1]->toIntArray();
01987           Gecode::IntArgs x1(a1.size());
01988           for (int i=a1.size(); i--;) x1[i] = a1[i];
01989           Gecode::IntVar x2(vm.var(spec[2]->toVar()));
01990           Gecode::exactly(home, x0,x1,x2);
01991           return;
01992         }
01993 #endif
01994         throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::exactly");
01995       }
01996       break;
01997     case 4:
01998       {
01999 #if defined(GECODE_HAS_INT_VARS)
02000         if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
02001             spec[1]->isInt() &&
02002             spec[2]->isInt() &&
02003             isEnum_IntConLevel(spec[3]))
02004         {
02005           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
02006           Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
02007           for (int i=a0.size(); i--;)
02008             x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
02009           int x1 = static_cast<int>(spec[1]->toInt());
02010           int x2 = static_cast<int>(spec[2]->toInt());
02011           Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
02012           Gecode::exactly(home, x0,x1,x2,x3);
02013           return;
02014         }
02015 #endif
02016 #if defined(GECODE_HAS_INT_VARS)
02017         if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
02018             isVar<Gecode::IntVar>(vm, spec[1]) &&
02019             spec[2]->isInt() &&
02020             isEnum_IntConLevel(spec[3]))
02021         {
02022           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
02023           Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
02024           for (int i=a0.size(); i--;)
02025             x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
02026           Gecode::IntVar x1(vm.var(spec[1]->toVar()));
02027           int x2 = static_cast<int>(spec[2]->toInt());
02028           Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
02029           Gecode::exactly(home, x0,x1,x2,x3);
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             spec[2]->isInt() &&
02037             isEnum_IntConLevel(spec[3]))
02038         {
02039           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
02040           Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
02041           for (int i=a0.size(); i--;)
02042             x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
02043           Gecode::Reflection::IntArrayArg& a1 = *spec[1]->toIntArray();
02044           Gecode::IntArgs x1(a1.size());
02045           for (int i=a1.size(); i--;) x1[i] = a1[i];
02046           int x2 = static_cast<int>(spec[2]->toInt());
02047           Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
02048           Gecode::exactly(home, x0,x1,x2,x3);
02049           return;
02050         }
02051 #endif
02052 #if defined(GECODE_HAS_INT_VARS)
02053         if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
02054             spec[1]->isInt() &&
02055             isVar<Gecode::IntVar>(vm, spec[2]) &&
02056             isEnum_IntConLevel(spec[3]))
02057         {
02058           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
02059           Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
02060           for (int i=a0.size(); i--;)
02061             x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
02062           int x1 = static_cast<int>(spec[1]->toInt());
02063           Gecode::IntVar x2(vm.var(spec[2]->toVar()));
02064           Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
02065           Gecode::exactly(home, x0,x1,x2,x3);
02066           return;
02067         }
02068 #endif
02069 #if defined(GECODE_HAS_INT_VARS)
02070         if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
02071             isVar<Gecode::IntVar>(vm, spec[1]) &&
02072             isVar<Gecode::IntVar>(vm, spec[2]) &&
02073             isEnum_IntConLevel(spec[3]))
02074         {
02075           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
02076           Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
02077           for (int i=a0.size(); i--;)
02078             x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
02079           Gecode::IntVar x1(vm.var(spec[1]->toVar()));
02080           Gecode::IntVar x2(vm.var(spec[2]->toVar()));
02081           Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
02082           Gecode::exactly(home, x0,x1,x2,x3);
02083           return;
02084         }
02085 #endif
02086 #if defined(GECODE_HAS_INT_VARS)
02087         if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
02088             spec[1]->isIntArray() &&
02089             isVar<Gecode::IntVar>(vm, spec[2]) &&
02090             isEnum_IntConLevel(spec[3]))
02091         {
02092           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
02093           Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
02094           for (int i=a0.size(); i--;)
02095             x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
02096           Gecode::Reflection::IntArrayArg& a1 = *spec[1]->toIntArray();
02097           Gecode::IntArgs x1(a1.size());
02098           for (int i=a1.size(); i--;) x1[i] = a1[i];
02099           Gecode::IntVar x2(vm.var(spec[2]->toVar()));
02100           Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
02101           Gecode::exactly(home, x0,x1,x2,x3);
02102           return;
02103         }
02104 #endif
02105         throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::exactly");
02106       }
02107       break;
02108     case 5:
02109       {
02110 #if defined(GECODE_HAS_INT_VARS)
02111         if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
02112             spec[1]->isInt() &&
02113             spec[2]->isInt() &&
02114             isEnum_IntConLevel(spec[3]) &&
02115             isEnum_PropKind(spec[4]))
02116         {
02117           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
02118           Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
02119           for (int i=a0.size(); i--;)
02120             x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
02121           int x1 = static_cast<int>(spec[1]->toInt());
02122           int x2 = static_cast<int>(spec[2]->toInt());
02123           Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
02124           Gecode::PropKind x4 = toEnum_PropKind(spec[4]);
02125           Gecode::exactly(home, x0,x1,x2,x3,x4);
02126           return;
02127         }
02128 #endif
02129 #if defined(GECODE_HAS_INT_VARS)
02130         if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
02131             isVar<Gecode::IntVar>(vm, spec[1]) &&
02132             spec[2]->isInt() &&
02133             isEnum_IntConLevel(spec[3]) &&
02134             isEnum_PropKind(spec[4]))
02135         {
02136           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
02137           Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
02138           for (int i=a0.size(); i--;)
02139             x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
02140           Gecode::IntVar x1(vm.var(spec[1]->toVar()));
02141           int x2 = static_cast<int>(spec[2]->toInt());
02142           Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
02143           Gecode::PropKind x4 = toEnum_PropKind(spec[4]);
02144           Gecode::exactly(home, x0,x1,x2,x3,x4);
02145           return;
02146         }
02147 #endif
02148 #if defined(GECODE_HAS_INT_VARS)
02149         if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
02150             spec[1]->isIntArray() &&
02151             spec[2]->isInt() &&
02152             isEnum_IntConLevel(spec[3]) &&
02153             isEnum_PropKind(spec[4]))
02154         {
02155           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
02156           Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
02157           for (int i=a0.size(); i--;)
02158             x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
02159           Gecode::Reflection::IntArrayArg& a1 = *spec[1]->toIntArray();
02160           Gecode::IntArgs x1(a1.size());
02161           for (int i=a1.size(); i--;) x1[i] = a1[i];
02162           int x2 = static_cast<int>(spec[2]->toInt());
02163           Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
02164           Gecode::PropKind x4 = toEnum_PropKind(spec[4]);
02165           Gecode::exactly(home, x0,x1,x2,x3,x4);
02166           return;
02167         }
02168 #endif
02169 #if defined(GECODE_HAS_INT_VARS)
02170         if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
02171             spec[1]->isInt() &&
02172             isVar<Gecode::IntVar>(vm, spec[2]) &&
02173             isEnum_IntConLevel(spec[3]) &&
02174             isEnum_PropKind(spec[4]))
02175         {
02176           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
02177           Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
02178           for (int i=a0.size(); i--;)
02179             x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
02180           int x1 = static_cast<int>(spec[1]->toInt());
02181           Gecode::IntVar x2(vm.var(spec[2]->toVar()));
02182           Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
02183           Gecode::PropKind x4 = toEnum_PropKind(spec[4]);
02184           Gecode::exactly(home, x0,x1,x2,x3,x4);
02185           return;
02186         }
02187 #endif
02188 #if defined(GECODE_HAS_INT_VARS)
02189         if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
02190             isVar<Gecode::IntVar>(vm, spec[1]) &&
02191             isVar<Gecode::IntVar>(vm, spec[2]) &&
02192             isEnum_IntConLevel(spec[3]) &&
02193             isEnum_PropKind(spec[4]))
02194         {
02195           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
02196           Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
02197           for (int i=a0.size(); i--;)
02198             x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
02199           Gecode::IntVar x1(vm.var(spec[1]->toVar()));
02200           Gecode::IntVar x2(vm.var(spec[2]->toVar()));
02201           Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
02202           Gecode::PropKind x4 = toEnum_PropKind(spec[4]);
02203           Gecode::exactly(home, x0,x1,x2,x3,x4);
02204           return;
02205         }
02206 #endif
02207 #if defined(GECODE_HAS_INT_VARS)
02208         if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
02209             spec[1]->isIntArray() &&
02210             isVar<Gecode::IntVar>(vm, spec[2]) &&
02211             isEnum_IntConLevel(spec[3]) &&
02212             isEnum_PropKind(spec[4]))
02213         {
02214           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
02215           Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
02216           for (int i=a0.size(); i--;)
02217             x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
02218           Gecode::Reflection::IntArrayArg& a1 = *spec[1]->toIntArray();
02219           Gecode::IntArgs x1(a1.size());
02220           for (int i=a1.size(); i--;) x1[i] = a1[i];
02221           Gecode::IntVar x2(vm.var(spec[2]->toVar()));
02222           Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
02223           Gecode::PropKind x4 = toEnum_PropKind(spec[4]);
02224           Gecode::exactly(home, x0,x1,x2,x3,x4);
02225           return;
02226         }
02227 #endif
02228         throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::exactly");
02229       }
02230       break;
02231     default: throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::exactly");
02232     }
02233   }
02234 };
02235 
02236 class Register_max {
02237 public:
02239   static Gecode::Support::Symbol ati(void) {
02240     return "Gecode::Post::max";
02241   }
02242   
02244   static void post(Gecode::Space* home, Gecode::Reflection::VarMap& vm,
02245                    const Gecode::Reflection::ActorSpec& spec) {
02246     switch(spec.noOfArgs()) {
02247     case 2:
02248       {
02249 #if defined(GECODE_HAS_INT_VARS)
02250         if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
02251             isVar<Gecode::IntVar>(vm, spec[1]))
02252         {
02253           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
02254           Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
02255           for (int i=a0.size(); i--;)
02256             x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
02257           Gecode::IntVar x1(vm.var(spec[1]->toVar()));
02258           Gecode::max(home, x0,x1);
02259           return;
02260         }
02261 #endif
02262 #if defined(GECODE_HAS_SET_VARS)
02263         if (isVar<Gecode::SetVar>(vm, spec[0]) &&
02264             isVar<Gecode::IntVar>(vm, spec[1]))
02265         {
02266           Gecode::SetVar x0(vm.var(spec[0]->toVar()));
02267           Gecode::IntVar x1(vm.var(spec[1]->toVar()));
02268           Gecode::max(home, x0,x1);
02269           return;
02270         }
02271 #endif
02272         throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::max");
02273       }
02274       break;
02275     case 3:
02276       {
02277 #if defined(GECODE_HAS_INT_VARS)
02278         if (isVar<Gecode::IntVar>(vm, spec[0]) &&
02279             isVar<Gecode::IntVar>(vm, spec[1]) &&
02280             isVar<Gecode::IntVar>(vm, spec[2]))
02281         {
02282           Gecode::IntVar x0(vm.var(spec[0]->toVar()));
02283           Gecode::IntVar x1(vm.var(spec[1]->toVar()));
02284           Gecode::IntVar x2(vm.var(spec[2]->toVar()));
02285           Gecode::max(home, x0,x1,x2);
02286           return;
02287         }
02288 #endif
02289 #if defined(GECODE_HAS_INT_VARS)
02290         if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
02291             isVar<Gecode::IntVar>(vm, spec[1]) &&
02292             isEnum_IntConLevel(spec[2]))
02293         {
02294           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
02295           Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
02296           for (int i=a0.size(); i--;)
02297             x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
02298           Gecode::IntVar x1(vm.var(spec[1]->toVar()));
02299           Gecode::IntConLevel x2 = toEnum_IntConLevel(spec[2]);
02300           Gecode::max(home, x0,x1,x2);
02301           return;
02302         }
02303 #endif
02304         throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::max");
02305       }
02306       break;
02307     case 4:
02308       {
02309 #if defined(GECODE_HAS_INT_VARS)
02310         if (isVar<Gecode::IntVar>(vm, spec[0]) &&
02311             isVar<Gecode::IntVar>(vm, spec[1]) &&
02312             isVar<Gecode::IntVar>(vm, spec[2]) &&
02313             isEnum_IntConLevel(spec[3]))
02314         {
02315           Gecode::IntVar x0(vm.var(spec[0]->toVar()));
02316           Gecode::IntVar x1(vm.var(spec[1]->toVar()));
02317           Gecode::IntVar x2(vm.var(spec[2]->toVar()));
02318           Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
02319           Gecode::max(home, x0,x1,x2,x3);
02320           return;
02321         }
02322 #endif
02323 #if defined(GECODE_HAS_INT_VARS)
02324         if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
02325             isVar<Gecode::IntVar>(vm, spec[1]) &&
02326             isEnum_IntConLevel(spec[2]) &&
02327             isEnum_PropKind(spec[3]))
02328         {
02329           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
02330           Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
02331           for (int i=a0.size(); i--;)
02332             x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
02333           Gecode::IntVar x1(vm.var(spec[1]->toVar()));
02334           Gecode::IntConLevel x2 = toEnum_IntConLevel(spec[2]);
02335           Gecode::PropKind x3 = toEnum_PropKind(spec[3]);
02336           Gecode::max(home, x0,x1,x2,x3);
02337           return;
02338         }
02339 #endif
02340         throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::max");
02341       }
02342       break;
02343     case 5:
02344       {
02345 #if defined(GECODE_HAS_INT_VARS)
02346         if (isVar<Gecode::IntVar>(vm, spec[0]) &&
02347             isVar<Gecode::IntVar>(vm, spec[1]) &&
02348             isVar<Gecode::IntVar>(vm, spec[2]) &&
02349             isEnum_IntConLevel(spec[3]) &&
02350             isEnum_PropKind(spec[4]))
02351         {
02352           Gecode::IntVar x0(vm.var(spec[0]->toVar()));
02353           Gecode::IntVar x1(vm.var(spec[1]->toVar()));
02354           Gecode::IntVar x2(vm.var(spec[2]->toVar()));
02355           Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
02356           Gecode::PropKind x4 = toEnum_PropKind(spec[4]);
02357           Gecode::max(home, x0,x1,x2,x3,x4);
02358           return;
02359         }
02360 #endif
02361         throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::max");
02362       }
02363       break;
02364     default: throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::max");
02365     }
02366   }
02367 };
02368 
02369 class Register_distinct {
02370 public:
02372   static Gecode::Support::Symbol ati(void) {
02373     return "Gecode::Post::distinct";
02374   }
02375   
02377   static void post(Gecode::Space* home, Gecode::Reflection::VarMap& vm,
02378                    const Gecode::Reflection::ActorSpec& spec) {
02379     switch(spec.noOfArgs()) {
02380     case 1:
02381       {
02382 #if defined(GECODE_HAS_INT_VARS)
02383         if (isVarArgs<Gecode::IntVar>(vm, spec[0]))
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::distinct(home, x0);
02390           return;
02391         }
02392 #endif
02393         throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::distinct");
02394       }
02395       break;
02396     case 2:
02397       {
02398 #if defined(GECODE_HAS_INT_VARS)
02399         if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
02400             isEnum_IntConLevel(spec[1]))
02401         {
02402           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
02403           Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
02404           for (int i=a0.size(); i--;)
02405             x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
02406           Gecode::IntConLevel x1 = toEnum_IntConLevel(spec[1]);
02407           Gecode::distinct(home, x0,x1);
02408           return;
02409         }
02410 #endif
02411 #if defined(GECODE_HAS_INT_VARS)
02412         if (spec[0]->isIntArray() &&
02413             isVarArgs<Gecode::IntVar>(vm, spec[1]))
02414         {
02415           Gecode::Reflection::IntArrayArg& a0 = *spec[0]->toIntArray();
02416           Gecode::IntArgs x0(a0.size());
02417           for (int i=a0.size(); i--;) x0[i] = a0[i];
02418           Gecode::Reflection::ArrayArg& a1 = *spec[1]->toArray();
02419           Gecode::VarArgArray<Gecode::IntVar> x1(a1.size());
02420           for (int i=a1.size(); i--;)
02421             x1[i] = Gecode::IntVar(vm.var(a1[i]->toVar()));
02422           Gecode::distinct(home, x0,x1);
02423           return;
02424         }
02425 #endif
02426         throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::distinct");
02427       }
02428       break;
02429     case 3:
02430       {
02431 #if defined(GECODE_HAS_INT_VARS)
02432         if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
02433             isEnum_IntConLevel(spec[1]) &&
02434             isEnum_PropKind(spec[2]))
02435         {
02436           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
02437           Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
02438           for (int i=a0.size(); i--;)
02439             x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
02440           Gecode::IntConLevel x1 = toEnum_IntConLevel(spec[1]);
02441           Gecode::PropKind x2 = toEnum_PropKind(spec[2]);
02442           Gecode::distinct(home, x0,x1,x2);
02443           return;
02444         }
02445 #endif
02446 #if defined(GECODE_HAS_INT_VARS)
02447         if (spec[0]->isIntArray() &&
02448             isVarArgs<Gecode::IntVar>(vm, spec[1]) &&
02449             isEnum_IntConLevel(spec[2]))
02450         {
02451           Gecode::Reflection::IntArrayArg& a0 = *spec[0]->toIntArray();
02452           Gecode::IntArgs x0(a0.size());
02453           for (int i=a0.size(); i--;) x0[i] = a0[i];
02454           Gecode::Reflection::ArrayArg& a1 = *spec[1]->toArray();
02455           Gecode::VarArgArray<Gecode::IntVar> x1(a1.size());
02456           for (int i=a1.size(); i--;)
02457             x1[i] = Gecode::IntVar(vm.var(a1[i]->toVar()));
02458           Gecode::IntConLevel x2 = toEnum_IntConLevel(spec[2]);
02459           Gecode::distinct(home, x0,x1,x2);
02460           return;
02461         }
02462 #endif
02463         throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::distinct");
02464       }
02465       break;
02466     case 4:
02467       {
02468 #if defined(GECODE_HAS_INT_VARS)
02469         if (spec[0]->isIntArray() &&
02470             isVarArgs<Gecode::IntVar>(vm, spec[1]) &&
02471             isEnum_IntConLevel(spec[2]) &&
02472             isEnum_PropKind(spec[3]))
02473         {
02474           Gecode::Reflection::IntArrayArg& a0 = *spec[0]->toIntArray();
02475           Gecode::IntArgs x0(a0.size());
02476           for (int i=a0.size(); i--;) x0[i] = a0[i];
02477           Gecode::Reflection::ArrayArg& a1 = *spec[1]->toArray();
02478           Gecode::VarArgArray<Gecode::IntVar> x1(a1.size());
02479           for (int i=a1.size(); i--;)
02480             x1[i] = Gecode::IntVar(vm.var(a1[i]->toVar()));
02481           Gecode::IntConLevel x2 = toEnum_IntConLevel(spec[2]);
02482           Gecode::PropKind x3 = toEnum_PropKind(spec[3]);
02483           Gecode::distinct(home, x0,x1,x2,x3);
02484           return;
02485         }
02486 #endif
02487         throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::distinct");
02488       }
02489       break;
02490     default: throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::distinct");
02491     }
02492   }
02493 };
02494 
02495 class Register_dom {
02496 public:
02498   static Gecode::Support::Symbol ati(void) {
02499     return "Gecode::Post::dom";
02500   }
02501   
02503   static void post(Gecode::Space* home, Gecode::Reflection::VarMap& vm,
02504                    const Gecode::Reflection::ActorSpec& spec) {
02505     switch(spec.noOfArgs()) {
02506     case 2:
02507       {
02508 #if defined(GECODE_HAS_INT_VARS)
02509         if (isVar<Gecode::IntVar>(vm, spec[0]) &&
02510             spec[1]->isIntArray())
02511         {
02512           Gecode::IntVar x0(vm.var(spec[0]->toVar()));
02513           Gecode::Reflection::IntArrayArg* a1 = spec[1]->toIntArray();
02514           Gecode::Reflection::IntArrayArgRanges ar1(a1);
02515           Gecode::IntSet x1(ar1);
02516           Gecode::dom(home, x0,x1);
02517           return;
02518         }
02519 #endif
02520 #if defined(GECODE_HAS_INT_VARS)
02521         if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
02522             spec[1]->isIntArray())
02523         {
02524           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
02525           Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
02526           for (int i=a0.size(); i--;)
02527             x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
02528           Gecode::Reflection::IntArrayArg* a1 = spec[1]->toIntArray();
02529           Gecode::Reflection::IntArrayArgRanges ar1(a1);
02530           Gecode::IntSet x1(ar1);
02531           Gecode::dom(home, x0,x1);
02532           return;
02533         }
02534 #endif
02535         throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::dom");
02536       }
02537       break;
02538     case 3:
02539       {
02540 #if defined(GECODE_HAS_INT_VARS)
02541         if (isVar<Gecode::IntVar>(vm, spec[0]) &&
02542             spec[1]->isInt() &&
02543             spec[2]->isInt())
02544         {
02545           Gecode::IntVar x0(vm.var(spec[0]->toVar()));
02546           int x1 = static_cast<int>(spec[1]->toInt());
02547           int x2 = static_cast<int>(spec[2]->toInt());
02548           Gecode::dom(home, x0,x1,x2);
02549           return;
02550         }
02551 #endif
02552 #if defined(GECODE_HAS_INT_VARS)
02553         if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
02554             spec[1]->isInt() &&
02555             spec[2]->isInt())
02556         {
02557           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
02558           Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
02559           for (int i=a0.size(); i--;)
02560             x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
02561           int x1 = static_cast<int>(spec[1]->toInt());
02562           int x2 = static_cast<int>(spec[2]->toInt());
02563           Gecode::dom(home, x0,x1,x2);
02564           return;
02565         }
02566 #endif
02567 #if defined(GECODE_HAS_INT_VARS)
02568         if (isVar<Gecode::IntVar>(vm, spec[0]) &&
02569             spec[1]->isIntArray() &&
02570             isEnum_IntConLevel(spec[2]))
02571         {
02572           Gecode::IntVar x0(vm.var(spec[0]->toVar()));
02573           Gecode::Reflection::IntArrayArg* a1 = spec[1]->toIntArray();
02574           Gecode::Reflection::IntArrayArgRanges ar1(a1);
02575           Gecode::IntSet x1(ar1);
02576           Gecode::IntConLevel x2 = toEnum_IntConLevel(spec[2]);
02577           Gecode::dom(home, x0,x1,x2);
02578           return;
02579         }
02580 #endif
02581 #if defined(GECODE_HAS_INT_VARS)
02582         if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
02583             spec[1]->isIntArray() &&
02584             isEnum_IntConLevel(spec[2]))
02585         {
02586           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
02587           Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
02588           for (int i=a0.size(); i--;)
02589             x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
02590           Gecode::Reflection::IntArrayArg* a1 = spec[1]->toIntArray();
02591           Gecode::Reflection::IntArrayArgRanges ar1(a1);
02592           Gecode::IntSet x1(ar1);
02593           Gecode::IntConLevel x2 = toEnum_IntConLevel(spec[2]);
02594           Gecode::dom(home, x0,x1,x2);
02595           return;
02596         }
02597 #endif
02598 #if defined(GECODE_HAS_INT_VARS)
02599         if (isVar<Gecode::IntVar>(vm, spec[0]) &&
02600             spec[1]->isIntArray() &&
02601             isVar<Gecode::BoolVar>(vm, spec[2]))
02602         {
02603           Gecode::IntVar x0(vm.var(spec[0]->toVar()));
02604           Gecode::Reflection::IntArrayArg* a1 = spec[1]->toIntArray();
02605           Gecode::Reflection::IntArrayArgRanges ar1(a1);
02606           Gecode::IntSet x1(ar1);
02607           Gecode::BoolVar x2(vm.var(spec[2]->toVar()));
02608           Gecode::dom(home, x0,x1,x2);
02609           return;
02610         }
02611 #endif
02612 #if defined(GECODE_HAS_SET_VARS)
02613         if (isVar<Gecode::SetVar>(vm, spec[0]) &&
02614             isEnum_SetRelType(spec[1]) &&
02615             spec[2]->isInt())
02616         {
02617           Gecode::SetVar x0(vm.var(spec[0]->toVar()));
02618           Gecode::SetRelType x1 = toEnum_SetRelType(spec[1]);
02619           int x2 = static_cast<int>(spec[2]->toInt());
02620           Gecode::dom(home, x0,x1,x2);
02621           return;
02622         }
02623 #endif
02624 #if defined(GECODE_HAS_SET_VARS)
02625         if (isVar<Gecode::SetVar>(vm, spec[0]) &&
02626             isEnum_SetRelType(spec[1]) &&
02627             spec[2]->isIntArray())
02628         {
02629           Gecode::SetVar x0(vm.var(spec[0]->toVar()));
02630           Gecode::SetRelType x1 = toEnum_SetRelType(spec[1]);
02631           Gecode::Reflection::IntArrayArg* a2 = spec[2]->toIntArray();
02632           Gecode::Reflection::IntArrayArgRanges ar2(a2);
02633           Gecode::IntSet x2(ar2);
02634           Gecode::dom(home, x0,x1,x2);
02635           return;
02636         }
02637 #endif
02638         throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::dom");
02639       }
02640       break;
02641     case 4:
02642       {
02643 #if defined(GECODE_HAS_INT_VARS)
02644         if (isVar<Gecode::IntVar>(vm, spec[0]) &&
02645             spec[1]->isInt() &&
02646             spec[2]->isInt() &&
02647             isEnum_IntConLevel(spec[3]))
02648         {
02649           Gecode::IntVar x0(vm.var(spec[0]->toVar()));
02650           int x1 = static_cast<int>(spec[1]->toInt());
02651           int x2 = static_cast<int>(spec[2]->toInt());
02652           Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
02653           Gecode::dom(home, x0,x1,x2,x3);
02654           return;
02655         }
02656 #endif
02657 #if defined(GECODE_HAS_INT_VARS)
02658         if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
02659             spec[1]->isInt() &&
02660             spec[2]->isInt() &&
02661             isEnum_IntConLevel(spec[3]))
02662         {
02663           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
02664           Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
02665           for (int i=a0.size(); i--;)
02666             x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
02667           int x1 = static_cast<int>(spec[1]->toInt());
02668           int x2 = static_cast<int>(spec[2]->toInt());
02669           Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
02670           Gecode::dom(home, x0,x1,x2,x3);
02671           return;
02672         }
02673 #endif
02674 #if defined(GECODE_HAS_INT_VARS)
02675         if (isVar<Gecode::IntVar>(vm, spec[0]) &&
02676             spec[1]->isIntArray() &&
02677             isEnum_IntConLevel(spec[2]) &&
02678             isEnum_PropKind(spec[3]))
02679         {
02680           Gecode::IntVar x0(vm.var(spec[0]->toVar()));
02681           Gecode::Reflection::IntArrayArg* a1 = spec[1]->toIntArray();
02682           Gecode::Reflection::IntArrayArgRanges ar1(a1);
02683           Gecode::IntSet x1(ar1);
02684           Gecode::IntConLevel x2 = toEnum_IntConLevel(spec[2]);
02685           Gecode::PropKind x3 = toEnum_PropKind(spec[3]);
02686           Gecode::dom(home, x0,x1,x2,x3);
02687           return;
02688         }
02689 #endif
02690 #if defined(GECODE_HAS_INT_VARS)
02691         if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
02692             spec[1]->isIntArray() &&
02693             isEnum_IntConLevel(spec[2]) &&
02694             isEnum_PropKind(spec[3]))
02695         {
02696           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
02697           Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
02698           for (int i=a0.size(); i--;)
02699             x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
02700           Gecode::Reflection::IntArrayArg* a1 = spec[1]->toIntArray();
02701           Gecode::Reflection::IntArrayArgRanges ar1(a1);
02702           Gecode::IntSet x1(ar1);
02703           Gecode::IntConLevel x2 = toEnum_IntConLevel(spec[2]);
02704           Gecode::PropKind x3 = toEnum_PropKind(spec[3]);
02705           Gecode::dom(home, x0,x1,x2,x3);
02706           return;
02707         }
02708 #endif
02709 #if defined(GECODE_HAS_INT_VARS)
02710         if (isVar<Gecode::IntVar>(vm, spec[0]) &&
02711             spec[1]->isInt() &&
02712             spec[2]->isInt() &&
02713             isVar<Gecode::BoolVar>(vm, spec[3]))
02714         {
02715           Gecode::IntVar x0(vm.var(spec[0]->toVar()));
02716           int x1 = static_cast<int>(spec[1]->toInt());
02717           int x2 = static_cast<int>(spec[2]->toInt());
02718           Gecode::BoolVar x3(vm.var(spec[3]->toVar()));
02719           Gecode::dom(home, x0,x1,x2,x3);
02720           return;
02721         }
02722 #endif
02723 #if defined(GECODE_HAS_INT_VARS)
02724         if (isVar<Gecode::IntVar>(vm, spec[0]) &&
02725             spec[1]->isIntArray() &&
02726             isVar<Gecode::BoolVar>(vm, spec[2]) &&
02727             isEnum_IntConLevel(spec[3]))
02728         {
02729           Gecode::IntVar x0(vm.var(spec[0]->toVar()));
02730           Gecode::Reflection::IntArrayArg* a1 = spec[1]->toIntArray();
02731           Gecode::Reflection::IntArrayArgRanges ar1(a1);
02732           Gecode::IntSet x1(ar1);
02733           Gecode::BoolVar x2(vm.var(spec[2]->toVar()));
02734           Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
02735           Gecode::dom(home, x0,x1,x2,x3);
02736           return;
02737         }
02738 #endif
02739 #if defined(GECODE_HAS_SET_VARS)
02740         if (isVar<Gecode::SetVar>(vm, spec[0]) &&
02741             isEnum_SetRelType(spec[1]) &&
02742             spec[2]->isInt() &&
02743             spec[3]->isInt())
02744         {
02745           Gecode::SetVar x0(vm.var(spec[0]->toVar()));
02746           Gecode::SetRelType x1 = toEnum_SetRelType(spec[1]);
02747           int x2 = static_cast<int>(spec[2]->toInt());
02748           int x3 = static_cast<int>(spec[3]->toInt());
02749           Gecode::dom(home, x0,x1,x2,x3);
02750           return;
02751         }
02752 #endif
02753 #if defined(GECODE_HAS_SET_VARS)
02754         if (isVar<Gecode::SetVar>(vm, spec[0]) &&
02755             isEnum_SetRelType(spec[1]) &&
02756             spec[2]->isInt() &&
02757             isVar<Gecode::BoolVar>(vm, spec[3]))
02758         {
02759           Gecode::SetVar x0(vm.var(spec[0]->toVar()));
02760           Gecode::SetRelType x1 = toEnum_SetRelType(spec[1]);
02761           int x2 = static_cast<int>(spec[2]->toInt());
02762           Gecode::BoolVar x3(vm.var(spec[3]->toVar()));
02763           Gecode::dom(home, x0,x1,x2,x3);
02764           return;
02765         }
02766 #endif
02767 #if defined(GECODE_HAS_SET_VARS)
02768         if (isVar<Gecode::SetVar>(vm, spec[0]) &&
02769             isEnum_SetRelType(spec[1]) &&
02770             spec[2]->isIntArray() &&
02771             isVar<Gecode::BoolVar>(vm, spec[3]))
02772         {
02773           Gecode::SetVar x0(vm.var(spec[0]->toVar()));
02774           Gecode::SetRelType x1 = toEnum_SetRelType(spec[1]);
02775           Gecode::Reflection::IntArrayArg* a2 = spec[2]->toIntArray();
02776           Gecode::Reflection::IntArrayArgRanges ar2(a2);
02777           Gecode::IntSet x2(ar2);
02778           Gecode::BoolVar x3(vm.var(spec[3]->toVar()));
02779           Gecode::dom(home, x0,x1,x2,x3);
02780           return;
02781         }
02782 #endif
02783         throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::dom");
02784       }
02785       break;
02786     case 5:
02787       {
02788 #if defined(GECODE_HAS_INT_VARS)
02789         if (isVar<Gecode::IntVar>(vm, spec[0]) &&
02790             spec[1]->isInt() &&
02791             spec[2]->isInt() &&
02792             isEnum_IntConLevel(spec[3]) &&
02793             isEnum_PropKind(spec[4]))
02794         {
02795           Gecode::IntVar x0(vm.var(spec[0]->toVar()));
02796           int x1 = static_cast<int>(spec[1]->toInt());
02797           int x2 = static_cast<int>(spec[2]->toInt());
02798           Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
02799           Gecode::PropKind x4 = toEnum_PropKind(spec[4]);
02800           Gecode::dom(home, x0,x1,x2,x3,x4);
02801           return;
02802         }
02803 #endif
02804 #if defined(GECODE_HAS_INT_VARS)
02805         if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
02806             spec[1]->isInt() &&
02807             spec[2]->isInt() &&
02808             isEnum_IntConLevel(spec[3]) &&
02809             isEnum_PropKind(spec[4]))
02810         {
02811           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
02812           Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
02813           for (int i=a0.size(); i--;)
02814             x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
02815           int x1 = static_cast<int>(spec[1]->toInt());
02816           int x2 = static_cast<int>(spec[2]->toInt());
02817           Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
02818           Gecode::PropKind x4 = toEnum_PropKind(spec[4]);
02819           Gecode::dom(home, x0,x1,x2,x3,x4);
02820           return;
02821         }
02822 #endif
02823 #if defined(GECODE_HAS_INT_VARS)
02824         if (isVar<Gecode::IntVar>(vm, spec[0]) &&
02825             spec[1]->isInt() &&
02826             spec[2]->isInt() &&
02827             isVar<Gecode::BoolVar>(vm, spec[3]) &&
02828             isEnum_IntConLevel(spec[4]))
02829         {
02830           Gecode::IntVar x0(vm.var(spec[0]->toVar()));
02831           int x1 = static_cast<int>(spec[1]->toInt());
02832           int x2 = static_cast<int>(spec[2]->toInt());
02833           Gecode::BoolVar x3(vm.var(spec[3]->toVar()));
02834           Gecode::IntConLevel x4 = toEnum_IntConLevel(spec[4]);
02835           Gecode::dom(home, x0,x1,x2,x3,x4);
02836           return;
02837         }
02838 #endif
02839 #if defined(GECODE_HAS_INT_VARS)
02840         if (isVar<Gecode::IntVar>(vm, spec[0]) &&
02841             spec[1]->isIntArray() &&
02842             isVar<Gecode::BoolVar>(vm, spec[2]) &&
02843             isEnum_IntConLevel(spec[3]) &&
02844             isEnum_PropKind(spec[4]))
02845         {
02846           Gecode::IntVar x0(vm.var(spec[0]->toVar()));
02847           Gecode::Reflection::IntArrayArg* a1 = spec[1]->toIntArray();
02848           Gecode::Reflection::IntArrayArgRanges ar1(a1);
02849           Gecode::IntSet x1(ar1);
02850           Gecode::BoolVar x2(vm.var(spec[2]->toVar()));
02851           Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
02852           Gecode::PropKind x4 = toEnum_PropKind(spec[4]);
02853           Gecode::dom(home, x0,x1,x2,x3,x4);
02854           return;
02855         }
02856 #endif
02857 #if defined(GECODE_HAS_SET_VARS)
02858         if (isVar<Gecode::SetVar>(vm, spec[0]) &&
02859             isEnum_SetRelType(spec[1]) &&
02860             spec[2]->isInt() &&
02861             spec[3]->isInt() &&
02862             isVar<Gecode::BoolVar>(vm, spec[4]))
02863         {
02864           Gecode::SetVar x0(vm.var(spec[0]->toVar()));
02865           Gecode::SetRelType x1 = toEnum_SetRelType(spec[1]);
02866           int x2 = static_cast<int>(spec[2]->toInt());
02867           int x3 = static_cast<int>(spec[3]->toInt());
02868           Gecode::BoolVar x4(vm.var(spec[4]->toVar()));
02869           Gecode::dom(home, x0,x1,x2,x3,x4);
02870           return;
02871         }
02872 #endif
02873         throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::dom");
02874       }
02875       break;
02876     case 6:
02877       {
02878 #if defined(GECODE_HAS_INT_VARS)
02879         if (isVar<Gecode::IntVar>(vm, spec[0]) &&
02880             spec[1]->isInt() &&
02881             spec[2]->isInt() &&
02882             isVar<Gecode::BoolVar>(vm, spec[3]) &&
02883             isEnum_IntConLevel(spec[4]) &&
02884             isEnum_PropKind(spec[5]))
02885         {
02886           Gecode::IntVar x0(vm.var(spec[0]->toVar()));
02887           int x1 = static_cast<int>(spec[1]->toInt());
02888           int x2 = static_cast<int>(spec[2]->toInt());
02889           Gecode::BoolVar x3(vm.var(spec[3]->toVar()));
02890           Gecode::IntConLevel x4 = toEnum_IntConLevel(spec[4]);
02891           Gecode::PropKind x5 = toEnum_PropKind(spec[5]);
02892           Gecode::dom(home, x0,x1,x2,x3,x4,x5);
02893           return;
02894         }
02895 #endif
02896         throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::dom");
02897       }
02898       break;
02899     default: throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::dom");
02900     }
02901   }
02902 };
02903 
02904 class Register_count {
02905 public:
02907   static Gecode::Support::Symbol ati(void) {
02908     return "Gecode::Post::count";
02909   }
02910   
02912   static void post(Gecode::Space* home, Gecode::Reflection::VarMap& vm,
02913                    const Gecode::Reflection::ActorSpec& spec) {
02914     switch(spec.noOfArgs()) {
02915     case 2:
02916       {
02917 #if defined(GECODE_HAS_INT_VARS)
02918         if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
02919             isVarArgs<Gecode::IntVar>(vm, spec[1]))
02920         {
02921           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
02922           Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
02923           for (int i=a0.size(); i--;)
02924             x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
02925           Gecode::Reflection::ArrayArg& a1 = *spec[1]->toArray();
02926           Gecode::VarArgArray<Gecode::IntVar> x1(a1.size());
02927           for (int i=a1.size(); i--;)
02928             x1[i] = Gecode::IntVar(vm.var(a1[i]->toVar()));
02929           Gecode::count(home, x0,x1);
02930           return;
02931         }
02932 #endif
02933 #if defined(GECODE_HAS_INT_VARS)
02934         if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
02935             isIntSetArgs(spec[1]))
02936         {
02937           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
02938           Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
02939           for (int i=a0.size(); i--;)
02940             x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
02941           Gecode::Reflection::ArrayArg& a1 = *spec[1]->toArray();
02942           Gecode::IntSetArgs x1(a1.size());
02943           for (int i=a1.size(); i--;) {
02944             Gecode::Reflection::IntArrayArg* aa1 = a1[i]->toIntArray();
02945             Gecode::Reflection::IntArrayArgRanges aar1(aa1);
02946             x1[i] = Gecode::IntSet(aar1);
02947           }
02948           Gecode::count(home, x0,x1);
02949           return;
02950         }
02951 #endif
02952         throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::count");
02953       }
02954       break;
02955     case 3:
02956       {
02957 #if defined(GECODE_HAS_INT_VARS)
02958         if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
02959             isVarArgs<Gecode::IntVar>(vm, spec[1]) &&
02960             isEnum_IntConLevel(spec[2]))
02961         {
02962           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
02963           Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
02964           for (int i=a0.size(); i--;)
02965             x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
02966           Gecode::Reflection::ArrayArg& a1 = *spec[1]->toArray();
02967           Gecode::VarArgArray<Gecode::IntVar> x1(a1.size());
02968           for (int i=a1.size(); i--;)
02969             x1[i] = Gecode::IntVar(vm.var(a1[i]->toVar()));
02970           Gecode::IntConLevel x2 = toEnum_IntConLevel(spec[2]);
02971           Gecode::count(home, x0,x1,x2);
02972           return;
02973         }
02974 #endif
02975 #if defined(GECODE_HAS_INT_VARS)
02976         if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
02977             isIntSetArgs(spec[1]) &&
02978             isEnum_IntConLevel(spec[2]))
02979         {
02980           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
02981           Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
02982           for (int i=a0.size(); i--;)
02983             x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
02984           Gecode::Reflection::ArrayArg& a1 = *spec[1]->toArray();
02985           Gecode::IntSetArgs x1(a1.size());
02986           for (int i=a1.size(); i--;) {
02987             Gecode::Reflection::IntArrayArg* aa1 = a1[i]->toIntArray();
02988             Gecode::Reflection::IntArrayArgRanges aar1(aa1);
02989             x1[i] = Gecode::IntSet(aar1);
02990           }
02991           Gecode::IntConLevel x2 = toEnum_IntConLevel(spec[2]);
02992           Gecode::count(home, x0,x1,x2);
02993           return;
02994         }
02995 #endif
02996 #if defined(GECODE_HAS_INT_VARS)
02997         if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
02998             isVarArgs<Gecode::IntVar>(vm, spec[1]) &&
02999             spec[2]->isIntArray())
03000         {
03001           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
03002           Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
03003           for (int i=a0.size(); i--;)
03004             x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
03005           Gecode::Reflection::ArrayArg& a1 = *spec[1]->toArray();
03006           Gecode::VarArgArray<Gecode::IntVar> x1(a1.size());
03007           for (int i=a1.size(); i--;)
03008             x1[i] = Gecode::IntVar(vm.var(a1[i]->toVar()));
03009           Gecode::Reflection::IntArrayArg& a2 = *spec[2]->toIntArray();
03010           Gecode::IntArgs x2(a2.size());
03011           for (int i=a2.size(); i--;) x2[i] = a2[i];
03012           Gecode::count(home, x0,x1,x2);
03013           return;
03014         }
03015 #endif
03016 #if defined(GECODE_HAS_INT_VARS)
03017         if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
03018             isIntSetArgs(spec[1]) &&
03019             spec[2]->isIntArray())
03020         {
03021           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
03022           Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
03023           for (int i=a0.size(); i--;)
03024             x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
03025           Gecode::Reflection::ArrayArg& a1 = *spec[1]->toArray();
03026           Gecode::IntSetArgs x1(a1.size());
03027           for (int i=a1.size(); i--;) {
03028             Gecode::Reflection::IntArrayArg* aa1 = a1[i]->toIntArray();
03029             Gecode::Reflection::IntArrayArgRanges aar1(aa1);
03030             x1[i] = Gecode::IntSet(aar1);
03031           }
03032           Gecode::Reflection::IntArrayArg& a2 = *spec[2]->toIntArray();
03033           Gecode::IntArgs x2(a2.size());
03034           for (int i=a2.size(); i--;) x2[i] = a2[i];
03035           Gecode::count(home, x0,x1,x2);
03036           return;
03037         }
03038 #endif
03039 #if defined(GECODE_HAS_INT_VARS)
03040         if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
03041             spec[1]->isIntArray() &&
03042             spec[2]->isIntArray())
03043         {
03044           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
03045           Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
03046           for (int i=a0.size(); i--;)
03047             x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
03048           Gecode::Reflection::IntArrayArg* a1 = spec[1]->toIntArray();
03049           Gecode::Reflection::IntArrayArgRanges ar1(a1);
03050           Gecode::IntSet x1(ar1);
03051           Gecode::Reflection::IntArrayArg& a2 = *spec[2]->toIntArray();
03052           Gecode::IntArgs x2(a2.size());
03053           for (int i=a2.size(); i--;) x2[i] = a2[i];
03054           Gecode::count(home, x0,x1,x2);
03055           return;
03056         }
03057 #endif
03058         throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::count");
03059       }
03060       break;
03061     case 4:
03062       {
03063 #if defined(GECODE_HAS_INT_VARS)
03064         if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
03065             spec[1]->isInt() &&
03066             isEnum_IntRelType(spec[2]) &&
03067             spec[3]->isInt())
03068         {
03069           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
03070           Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
03071           for (int i=a0.size(); i--;)
03072             x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
03073           int x1 = static_cast<int>(spec[1]->toInt());
03074           Gecode::IntRelType x2 = toEnum_IntRelType(spec[2]);
03075           int x3 = static_cast<int>(spec[3]->toInt());
03076           Gecode::count(home, x0,x1,x2,x3);
03077           return;
03078         }
03079 #endif
03080 #if defined(GECODE_HAS_INT_VARS)
03081         if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
03082             isVar<Gecode::IntVar>(vm, spec[1]) &&
03083             isEnum_IntRelType(spec[2]) &&
03084             spec[3]->isInt())
03085         {
03086           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
03087           Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
03088           for (int i=a0.size(); i--;)
03089             x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
03090           Gecode::IntVar x1(vm.var(spec[1]->toVar()));
03091           Gecode::IntRelType x2 = toEnum_IntRelType(spec[2]);
03092           int x3 = static_cast<int>(spec[3]->toInt());
03093           Gecode::count(home, x0,x1,x2,x3);
03094           return;
03095         }
03096 #endif
03097 #if defined(GECODE_HAS_INT_VARS)
03098         if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
03099             spec[1]->isIntArray() &&
03100             isEnum_IntRelType(spec[2]) &&
03101             spec[3]->isInt())
03102         {
03103           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
03104           Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
03105           for (int i=a0.size(); i--;)
03106             x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
03107           Gecode::Reflection::IntArrayArg& a1 = *spec[1]->toIntArray();
03108           Gecode::IntArgs x1(a1.size());
03109           for (int i=a1.size(); i--;) x1[i] = a1[i];
03110           Gecode::IntRelType x2 = toEnum_IntRelType(spec[2]);
03111           int x3 = static_cast<int>(spec[3]->toInt());
03112           Gecode::count(home, x0,x1,x2,x3);
03113           return;
03114         }
03115 #endif
03116 #if defined(GECODE_HAS_INT_VARS)
03117         if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
03118             spec[1]->isInt() &&
03119             isEnum_IntRelType(spec[2]) &&
03120             isVar<Gecode::IntVar>(vm, spec[3]))
03121         {
03122           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
03123           Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
03124           for (int i=a0.size(); i--;)
03125             x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
03126           int x1 = static_cast<int>(spec[1]->toInt());
03127           Gecode::IntRelType x2 = toEnum_IntRelType(spec[2]);
03128           Gecode::IntVar x3(vm.var(spec[3]->toVar()));
03129           Gecode::count(home, x0,x1,x2,x3);
03130           return;
03131         }
03132 #endif
03133 #if defined(GECODE_HAS_INT_VARS)
03134         if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
03135             isVar<Gecode::IntVar>(vm, spec[1]) &&
03136             isEnum_IntRelType(spec[2]) &&
03137             isVar<Gecode::IntVar>(vm, spec[3]))
03138         {
03139           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
03140           Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
03141           for (int i=a0.size(); i--;)
03142             x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
03143           Gecode::IntVar x1(vm.var(spec[1]->toVar()));
03144           Gecode::IntRelType x2 = toEnum_IntRelType(spec[2]);
03145           Gecode::IntVar x3(vm.var(spec[3]->toVar()));
03146           Gecode::count(home, x0,x1,x2,x3);
03147           return;
03148         }
03149 #endif
03150 #if defined(GECODE_HAS_INT_VARS)
03151         if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
03152             spec[1]->isIntArray() &&
03153             isEnum_IntRelType(spec[2]) &&
03154             isVar<Gecode::IntVar>(vm, spec[3]))
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::IntArrayArg& a1 = *spec[1]->toIntArray();
03161           Gecode::IntArgs x1(a1.size());
03162           for (int i=a1.size(); i--;) x1[i] = a1[i];
03163           Gecode::IntRelType x2 = toEnum_IntRelType(spec[2]);
03164           Gecode::IntVar x3(vm.var(spec[3]->toVar()));
03165           Gecode::count(home, x0,x1,x2,x3);
03166           return;
03167         }
03168 #endif
03169 #if defined(GECODE_HAS_INT_VARS)
03170         if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
03171             isVarArgs<Gecode::IntVar>(vm, spec[1]) &&
03172             isEnum_IntConLevel(spec[2]) &&
03173             isEnum_PropKind(spec[3]))
03174         {
03175           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
03176           Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
03177           for (int i=a0.size(); i--;)
03178             x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
03179           Gecode::Reflection::ArrayArg& a1 = *spec[1]->toArray();
03180           Gecode::VarArgArray<Gecode::IntVar> x1(a1.size());
03181           for (int i=a1.size(); i--;)
03182             x1[i] = Gecode::IntVar(vm.var(a1[i]->toVar()));
03183           Gecode::IntConLevel x2 = toEnum_IntConLevel(spec[2]);
03184           Gecode::PropKind x3 = toEnum_PropKind(spec[3]);
03185           Gecode::count(home, x0,x1,x2,x3);
03186           return;
03187         }
03188 #endif
03189 #if defined(GECODE_HAS_INT_VARS)
03190         if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
03191             isIntSetArgs(spec[1]) &&
03192             isEnum_IntConLevel(spec[2]) &&
03193             isEnum_PropKind(spec[3]))
03194         {
03195           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
03196           Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
03197           for (int i=a0.size(); i--;)
03198             x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
03199           Gecode::Reflection::ArrayArg& a1 = *spec[1]->toArray();
03200           Gecode::IntSetArgs x1(a1.size());
03201           for (int i=a1.size(); i--;) {
03202             Gecode::Reflection::IntArrayArg* aa1 = a1[i]->toIntArray();
03203             Gecode::Reflection::IntArrayArgRanges aar1(aa1);
03204             x1[i] = Gecode::IntSet(aar1);
03205           }
03206           Gecode::IntConLevel x2 = toEnum_IntConLevel(spec[2]);
03207           Gecode::PropKind x3 = toEnum_PropKind(spec[3]);
03208           Gecode::count(home, x0,x1,x2,x3);
03209           return;
03210         }
03211 #endif
03212 #if defined(GECODE_HAS_INT_VARS)
03213         if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
03214             isVarArgs<Gecode::IntVar>(vm, spec[1]) &&
03215             spec[2]->isIntArray() &&
03216             isEnum_IntConLevel(spec[3]))
03217         {
03218           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
03219           Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
03220           for (int i=a0.size(); i--;)
03221             x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
03222           Gecode::Reflection::ArrayArg& a1 = *spec[1]->toArray();
03223           Gecode::VarArgArray<Gecode::IntVar> x1(a1.size());
03224           for (int i=a1.size(); i--;)
03225             x1[i] = Gecode::IntVar(vm.var(a1[i]->toVar()));
03226           Gecode::Reflection::IntArrayArg& a2 = *spec[2]->toIntArray();
03227           Gecode::IntArgs x2(a2.size());
03228           for (int i=a2.size(); i--;) x2[i] = a2[i];
03229           Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
03230           Gecode::count(home, x0,x1,x2,x3);
03231           return;
03232         }
03233 #endif
03234 #if defined(GECODE_HAS_INT_VARS)
03235         if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
03236             isIntSetArgs(spec[1]) &&
03237             spec[2]->isIntArray() &&
03238             isEnum_IntConLevel(spec[3]))
03239         {
03240           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
03241           Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
03242           for (int i=a0.size(); i--;)
03243             x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
03244           Gecode::Reflection::ArrayArg& a1 = *spec[1]->toArray();
03245           Gecode::IntSetArgs x1(a1.size());
03246           for (int i=a1.size(); i--;) {
03247             Gecode::Reflection::IntArrayArg* aa1 = a1[i]->toIntArray();
03248             Gecode::Reflection::IntArrayArgRanges aar1(aa1);
03249             x1[i] = Gecode::IntSet(aar1);
03250           }
03251           Gecode::Reflection::IntArrayArg& a2 = *spec[2]->toIntArray();
03252           Gecode::IntArgs x2(a2.size());
03253           for (int i=a2.size(); i--;) x2[i] = a2[i];
03254           Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
03255           Gecode::count(home, x0,x1,x2,x3);
03256           return;
03257         }
03258 #endif
03259 #if defined(GECODE_HAS_INT_VARS)
03260         if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
03261             spec[1]->isIntArray() &&
03262             spec[2]->isIntArray() &&
03263             isEnum_IntConLevel(spec[3]))
03264         {
03265           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
03266           Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
03267           for (int i=a0.size(); i--;)
03268             x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
03269           Gecode::Reflection::IntArrayArg* a1 = spec[1]->toIntArray();
03270           Gecode::Reflection::IntArrayArgRanges ar1(a1);
03271           Gecode::IntSet x1(ar1);
03272           Gecode::Reflection::IntArrayArg& a2 = *spec[2]->toIntArray();
03273           Gecode::IntArgs x2(a2.size());
03274           for (int i=a2.size(); i--;) x2[i] = a2[i];
03275           Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
03276           Gecode::count(home, x0,x1,x2,x3);
03277           return;
03278         }
03279 #endif
03280         throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::count");
03281       }
03282       break;
03283     case 5:
03284       {
03285 #if defined(GECODE_HAS_INT_VARS)
03286         if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
03287             spec[1]->isInt() &&
03288             isEnum_IntRelType(spec[2]) &&
03289             spec[3]->isInt() &&
03290             isEnum_IntConLevel(spec[4]))
03291         {
03292           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
03293           Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
03294           for (int i=a0.size(); i--;)
03295             x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
03296           int x1 = static_cast<int>(spec[1]->toInt());
03297           Gecode::IntRelType x2 = toEnum_IntRelType(spec[2]);
03298           int x3 = static_cast<int>(spec[3]->toInt());
03299           Gecode::IntConLevel x4 = toEnum_IntConLevel(spec[4]);
03300           Gecode::count(home, x0,x1,x2,x3,x4);
03301           return;
03302         }
03303 #endif
03304 #if defined(GECODE_HAS_INT_VARS)
03305         if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
03306             isVar<Gecode::IntVar>(vm, spec[1]) &&
03307             isEnum_IntRelType(spec[2]) &&
03308             spec[3]->isInt() &&
03309             isEnum_IntConLevel(spec[4]))
03310         {
03311           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
03312           Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
03313           for (int i=a0.size(); i--;)
03314             x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
03315           Gecode::IntVar x1(vm.var(spec[1]->toVar()));
03316           Gecode::IntRelType x2 = toEnum_IntRelType(spec[2]);
03317           int x3 = static_cast<int>(spec[3]->toInt());
03318           Gecode::IntConLevel x4 = toEnum_IntConLevel(spec[4]);
03319           Gecode::count(home, x0,x1,x2,x3,x4);
03320           return;
03321         }
03322 #endif
03323 #if defined(GECODE_HAS_INT_VARS)
03324         if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
03325             spec[1]->isIntArray() &&
03326             isEnum_IntRelType(spec[2]) &&
03327             spec[3]->isInt() &&
03328             isEnum_IntConLevel(spec[4]))
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::IntArrayArg& a1 = *spec[1]->toIntArray();
03335           Gecode::IntArgs x1(a1.size());
03336           for (int i=a1.size(); i--;) x1[i] = a1[i];
03337           Gecode::IntRelType x2 = toEnum_IntRelType(spec[2]);
03338           int x3 = static_cast<int>(spec[3]->toInt());
03339           Gecode::IntConLevel x4 = toEnum_IntConLevel(spec[4]);
03340           Gecode::count(home, x0,x1,x2,x3,x4);
03341           return;
03342         }
03343 #endif
03344 #if defined(GECODE_HAS_INT_VARS)
03345         if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
03346             spec[1]->isInt() &&
03347             isEnum_IntRelType(spec[2]) &&
03348             isVar<Gecode::IntVar>(vm, spec[3]) &&
03349             isEnum_IntConLevel(spec[4]))
03350         {
03351           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
03352           Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
03353           for (int i=a0.size(); i--;)
03354             x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
03355           int x1 = static_cast<int>(spec[1]->toInt());
03356           Gecode::IntRelType x2 = toEnum_IntRelType(spec[2]);
03357           Gecode::IntVar x3(vm.var(spec[3]->toVar()));
03358           Gecode::IntConLevel x4 = toEnum_IntConLevel(spec[4]);
03359           Gecode::count(home, x0,x1,x2,x3,x4);
03360           return;
03361         }
03362 #endif
03363 #if defined(GECODE_HAS_INT_VARS)
03364         if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
03365             isVar<Gecode::IntVar>(vm, spec[1]) &&
03366             isEnum_IntRelType(spec[2]) &&
03367             isVar<Gecode::IntVar>(vm, spec[3]) &&
03368             isEnum_IntConLevel(spec[4]))
03369         {
03370           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
03371           Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
03372           for (int i=a0.size(); i--;)
03373             x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
03374           Gecode::IntVar x1(vm.var(spec[1]->toVar()));
03375           Gecode::IntRelType x2 = toEnum_IntRelType(spec[2]);
03376           Gecode::IntVar x3(vm.var(spec[3]->toVar()));
03377           Gecode::IntConLevel x4 = toEnum_IntConLevel(spec[4]);
03378           Gecode::count(home, x0,x1,x2,x3,x4);
03379           return;
03380         }
03381 #endif
03382 #if defined(GECODE_HAS_INT_VARS)
03383         if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
03384             spec[1]->isIntArray() &&
03385             isEnum_IntRelType(spec[2]) &&
03386             isVar<Gecode::IntVar>(vm, spec[3]) &&
03387             isEnum_IntConLevel(spec[4]))
03388         {
03389           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
03390           Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
03391           for (int i=a0.size(); i--;)
03392             x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
03393           Gecode::Reflection::IntArrayArg& a1 = *spec[1]->toIntArray();
03394           Gecode::IntArgs x1(a1.size());
03395           for (int i=a1.size(); i--;) x1[i] = a1[i];
03396           Gecode::IntRelType x2 = toEnum_IntRelType(spec[2]);
03397           Gecode::IntVar x3(vm.var(spec[3]->toVar()));
03398           Gecode::IntConLevel x4 = toEnum_IntConLevel(spec[4]);
03399           Gecode::count(home, x0,x1,x2,x3,x4);
03400           return;
03401         }
03402 #endif
03403 #if defined(GECODE_HAS_INT_VARS)
03404         if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
03405             isVarArgs<Gecode::IntVar>(vm, spec[1]) &&
03406             spec[2]->isIntArray() &&
03407             isEnum_IntConLevel(spec[3]) &&
03408             isEnum_PropKind(spec[4]))
03409         {
03410           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
03411           Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
03412           for (int i=a0.size(); i--;)
03413             x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
03414           Gecode::Reflection::ArrayArg& a1 = *spec[1]->toArray();
03415           Gecode::VarArgArray<Gecode::IntVar> x1(a1.size());
03416           for (int i=a1.size(); i--;)
03417             x1[i] = Gecode::IntVar(vm.var(a1[i]->toVar()));
03418           Gecode::Reflection::IntArrayArg& a2 = *spec[2]->toIntArray();
03419           Gecode::IntArgs x2(a2.size());
03420           for (int i=a2.size(); i--;) x2[i] = a2[i];
03421           Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
03422           Gecode::PropKind x4 = toEnum_PropKind(spec[4]);
03423           Gecode::count(home, x0,x1,x2,x3,x4);
03424           return;
03425         }
03426 #endif
03427 #if defined(GECODE_HAS_INT_VARS)
03428         if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
03429             isIntSetArgs(spec[1]) &&
03430             spec[2]->isIntArray() &&
03431             isEnum_IntConLevel(spec[3]) &&
03432             isEnum_PropKind(spec[4]))
03433         {
03434           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
03435           Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
03436           for (int i=a0.size(); i--;)
03437             x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
03438           Gecode::Reflection::ArrayArg& a1 = *spec[1]->toArray();
03439           Gecode::IntSetArgs x1(a1.size());
03440           for (int i=a1.size(); i--;) {
03441             Gecode::Reflection::IntArrayArg* aa1 = a1[i]->toIntArray();
03442             Gecode::Reflection::IntArrayArgRanges aar1(aa1);
03443             x1[i] = Gecode::IntSet(aar1);
03444           }
03445           Gecode::Reflection::IntArrayArg& a2 = *spec[2]->toIntArray();
03446           Gecode::IntArgs x2(a2.size());
03447           for (int i=a2.size(); i--;) x2[i] = a2[i];
03448           Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
03449           Gecode::PropKind x4 = toEnum_PropKind(spec[4]);
03450           Gecode::count(home, x0,x1,x2,x3,x4);
03451           return;
03452         }
03453 #endif
03454 #if defined(GECODE_HAS_INT_VARS)
03455         if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
03456             spec[1]->isIntArray() &&
03457             spec[2]->isIntArray() &&
03458             isEnum_IntConLevel(spec[3]) &&
03459             isEnum_PropKind(spec[4]))
03460         {
03461           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
03462           Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
03463           for (int i=a0.size(); i--;)
03464             x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
03465           Gecode::Reflection::IntArrayArg* a1 = spec[1]->toIntArray();
03466           Gecode::Reflection::IntArrayArgRanges ar1(a1);
03467           Gecode::IntSet x1(ar1);
03468           Gecode::Reflection::IntArrayArg& a2 = *spec[2]->toIntArray();
03469           Gecode::IntArgs x2(a2.size());
03470           for (int i=a2.size(); i--;) x2[i] = a2[i];
03471           Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
03472           Gecode::PropKind x4 = toEnum_PropKind(spec[4]);
03473           Gecode::count(home, x0,x1,x2,x3,x4);
03474           return;
03475         }
03476 #endif
03477         throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::count");
03478       }
03479       break;
03480     case 6:
03481       {
03482 #if defined(GECODE_HAS_INT_VARS)
03483         if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
03484             spec[1]->isInt() &&
03485             isEnum_IntRelType(spec[2]) &&
03486             spec[3]->isInt() &&
03487             isEnum_IntConLevel(spec[4]) &&
03488             isEnum_PropKind(spec[5]))
03489         {
03490           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
03491           Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
03492           for (int i=a0.size(); i--;)
03493             x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
03494           int x1 = static_cast<int>(spec[1]->toInt());
03495           Gecode::IntRelType x2 = toEnum_IntRelType(spec[2]);
03496           int x3 = static_cast<int>(spec[3]->toInt());
03497           Gecode::IntConLevel x4 = toEnum_IntConLevel(spec[4]);
03498           Gecode::PropKind x5 = toEnum_PropKind(spec[5]);
03499           Gecode::count(home, x0,x1,x2,x3,x4,x5);
03500           return;
03501         }
03502 #endif
03503 #if defined(GECODE_HAS_INT_VARS)
03504         if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
03505             isVar<Gecode::IntVar>(vm, spec[1]) &&
03506             isEnum_IntRelType(spec[2]) &&
03507             spec[3]->isInt() &&
03508             isEnum_IntConLevel(spec[4]) &&
03509             isEnum_PropKind(spec[5]))
03510         {
03511           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
03512           Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
03513           for (int i=a0.size(); i--;)
03514             x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
03515           Gecode::IntVar x1(vm.var(spec[1]->toVar()));
03516           Gecode::IntRelType x2 = toEnum_IntRelType(spec[2]);
03517           int x3 = static_cast<int>(spec[3]->toInt());
03518           Gecode::IntConLevel x4 = toEnum_IntConLevel(spec[4]);
03519           Gecode::PropKind x5 = toEnum_PropKind(spec[5]);
03520           Gecode::count(home, x0,x1,x2,x3,x4,x5);
03521           return;
03522         }
03523 #endif
03524 #if defined(GECODE_HAS_INT_VARS)
03525         if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
03526             spec[1]->isIntArray() &&
03527             isEnum_IntRelType(spec[2]) &&
03528             spec[3]->isInt() &&
03529             isEnum_IntConLevel(spec[4]) &&
03530             isEnum_PropKind(spec[5]))
03531         {
03532           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
03533           Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
03534           for (int i=a0.size(); i--;)
03535             x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
03536           Gecode::Reflection::IntArrayArg& a1 = *spec[1]->toIntArray();
03537           Gecode::IntArgs x1(a1.size());
03538           for (int i=a1.size(); i--;) x1[i] = a1[i];
03539           Gecode::IntRelType x2 = toEnum_IntRelType(spec[2]);
03540           int x3 = static_cast<int>(spec[3]->toInt());
03541           Gecode::IntConLevel x4 = toEnum_IntConLevel(spec[4]);
03542           Gecode::PropKind x5 = toEnum_PropKind(spec[5]);
03543           Gecode::count(home, x0,x1,x2,x3,x4,x5);
03544           return;
03545         }
03546 #endif
03547 #if defined(GECODE_HAS_INT_VARS)
03548         if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
03549             spec[1]->isInt() &&
03550             isEnum_IntRelType(spec[2]) &&
03551             isVar<Gecode::IntVar>(vm, spec[3]) &&
03552             isEnum_IntConLevel(spec[4]) &&
03553             isEnum_PropKind(spec[5]))
03554         {
03555           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
03556           Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
03557           for (int i=a0.size(); i--;)
03558             x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
03559           int x1 = static_cast<int>(spec[1]->toInt());
03560           Gecode::IntRelType x2 = toEnum_IntRelType(spec[2]);
03561           Gecode::IntVar x3(vm.var(spec[3]->toVar()));
03562           Gecode::IntConLevel x4 = toEnum_IntConLevel(spec[4]);
03563           Gecode::PropKind x5 = toEnum_PropKind(spec[5]);
03564           Gecode::count(home, x0,x1,x2,x3,x4,x5);
03565           return;
03566         }
03567 #endif
03568 #if defined(GECODE_HAS_INT_VARS)
03569         if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
03570             isVar<Gecode::IntVar>(vm, spec[1]) &&
03571             isEnum_IntRelType(spec[2]) &&
03572             isVar<Gecode::IntVar>(vm, spec[3]) &&
03573             isEnum_IntConLevel(spec[4]) &&
03574             isEnum_PropKind(spec[5]))
03575         {
03576           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
03577           Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
03578           for (int i=a0.size(); i--;)
03579             x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
03580           Gecode::IntVar x1(vm.var(spec[1]->toVar()));
03581           Gecode::IntRelType x2 = toEnum_IntRelType(spec[2]);
03582           Gecode::IntVar x3(vm.var(spec[3]->toVar()));
03583           Gecode::IntConLevel x4 = toEnum_IntConLevel(spec[4]);
03584           Gecode::PropKind x5 = toEnum_PropKind(spec[5]);
03585           Gecode::count(home, x0,x1,x2,x3,x4,x5);
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             isEnum_IntRelType(spec[2]) &&
03593             isVar<Gecode::IntVar>(vm, spec[3]) &&
03594             isEnum_IntConLevel(spec[4]) &&
03595             isEnum_PropKind(spec[5]))
03596         {
03597           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
03598           Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
03599           for (int i=a0.size(); i--;)
03600             x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
03601           Gecode::Reflection::IntArrayArg& a1 = *spec[1]->toIntArray();
03602           Gecode::IntArgs x1(a1.size());
03603           for (int i=a1.size(); i--;) x1[i] = a1[i];
03604           Gecode::IntRelType x2 = toEnum_IntRelType(spec[2]);
03605           Gecode::IntVar x3(vm.var(spec[3]->toVar()));
03606           Gecode::IntConLevel x4 = toEnum_IntConLevel(spec[4]);
03607           Gecode::PropKind x5 = toEnum_PropKind(spec[5]);
03608           Gecode::count(home, x0,x1,x2,x3,x4,x5);
03609           return;
03610         }
03611 #endif
03612         throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::count");
03613       }
03614       break;
03615     default: throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::count");
03616     }
03617   }
03618 };
03619 
03620 class Register_match {
03621 public:
03623   static Gecode::Support::Symbol ati(void) {
03624     return "Gecode::Post::match";
03625   }
03626   
03628   static void post(Gecode::Space* home, Gecode::Reflection::VarMap& vm,
03629                    const Gecode::Reflection::ActorSpec& spec) {
03630     switch(spec.noOfArgs()) {
03631     case 2:
03632       {
03633 #if defined(GECODE_HAS_SET_VARS)
03634         if (isVar<Gecode::SetVar>(vm, spec[0]) &&
03635             isVarArgs<Gecode::IntVar>(vm, spec[1]))
03636         {
03637           Gecode::SetVar x0(vm.var(spec[0]->toVar()));
03638           Gecode::Reflection::ArrayArg& a1 = *spec[1]->toArray();
03639           Gecode::VarArgArray<Gecode::IntVar> x1(a1.size());
03640           for (int i=a1.size(); i--;)
03641             x1[i] = Gecode::IntVar(vm.var(a1[i]->toVar()));
03642           Gecode::match(home, x0,x1);
03643           return;
03644         }
03645 #endif
03646         throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::match");
03647       }
03648       break;
03649     default: throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::match");
03650     }
03651   }
03652 };
03653 
03654 class Register_selectUnion {
03655 public:
03657   static Gecode::Support::Symbol ati(void) {
03658     return "Gecode::Post::selectUnion";
03659   }
03660   
03662   static void post(Gecode::Space* home, Gecode::Reflection::VarMap& vm,
03663                    const Gecode::Reflection::ActorSpec& spec) {
03664     switch(spec.noOfArgs()) {
03665     case 3:
03666       {
03667 #if defined(GECODE_HAS_SET_VARS)
03668         if (isVarArgs<Gecode::SetVar>(vm, spec[0]) &&
03669             isVar<Gecode::SetVar>(vm, spec[1]) &&
03670             isVar<Gecode::SetVar>(vm, spec[2]))
03671         {
03672           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
03673           Gecode::VarArgArray<Gecode::SetVar> x0(a0.size());
03674           for (int i=a0.size(); i--;)
03675             x0[i] = Gecode::SetVar(vm.var(a0[i]->toVar()));
03676           Gecode::SetVar x1(vm.var(spec[1]->toVar()));
03677           Gecode::SetVar x2(vm.var(spec[2]->toVar()));
03678           Gecode::selectUnion(home, x0,x1,x2);
03679           return;
03680         }
03681 #endif
03682 #if defined(GECODE_HAS_SET_VARS)
03683         if (isIntSetArgs(spec[0]) &&
03684             isVar<Gecode::SetVar>(vm, spec[1]) &&
03685             isVar<Gecode::SetVar>(vm, spec[2]))
03686         {
03687           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
03688           Gecode::IntSetArgs x0(a0.size());
03689           for (int i=a0.size(); i--;) {
03690             Gecode::Reflection::IntArrayArg* aa0 = a0[i]->toIntArray();
03691             Gecode::Reflection::IntArrayArgRanges aar0(aa0);
03692             x0[i] = Gecode::IntSet(aar0);
03693           }
03694           Gecode::SetVar x1(vm.var(spec[1]->toVar()));
03695           Gecode::SetVar x2(vm.var(spec[2]->toVar()));
03696           Gecode::selectUnion(home, x0,x1,x2);
03697           return;
03698         }
03699 #endif
03700         throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::selectUnion");
03701       }
03702       break;
03703     default: throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::selectUnion");
03704     }
03705   }
03706 };
03707 
03708 class Register_element {
03709 public:
03711   static Gecode::Support::Symbol ati(void) {
03712     return "Gecode::Post::element";
03713   }
03714   
03716   static void post(Gecode::Space* home, Gecode::Reflection::VarMap& vm,
03717                    const Gecode::Reflection::ActorSpec& spec) {
03718     switch(spec.noOfArgs()) {
03719     case 3:
03720       {
03721 #if defined(GECODE_HAS_INT_VARS)
03722         if (spec[0]->isIntArray() &&
03723             isVar<Gecode::IntVar>(vm, spec[1]) &&
03724             isVar<Gecode::IntVar>(vm, spec[2]))
03725         {
03726           Gecode::Reflection::IntArrayArg& a0 = *spec[0]->toIntArray();
03727           Gecode::IntArgs x0(a0.size());
03728           for (int i=a0.size(); i--;) x0[i] = a0[i];
03729           Gecode::IntVar x1(vm.var(spec[1]->toVar()));
03730           Gecode::IntVar x2(vm.var(spec[2]->toVar()));
03731           Gecode::element(home, x0,x1,x2);
03732           return;
03733         }
03734 #endif
03735 #if defined(GECODE_HAS_INT_VARS)
03736         if (spec[0]->isIntArray() &&
03737             isVar<Gecode::IntVar>(vm, spec[1]) &&
03738             isVar<Gecode::BoolVar>(vm, spec[2]))
03739         {
03740           Gecode::Reflection::IntArrayArg& a0 = *spec[0]->toIntArray();
03741           Gecode::IntArgs x0(a0.size());
03742           for (int i=a0.size(); i--;) x0[i] = a0[i];
03743           Gecode::IntVar x1(vm.var(spec[1]->toVar()));
03744           Gecode::BoolVar x2(vm.var(spec[2]->toVar()));
03745           Gecode::element(home, x0,x1,x2);
03746           return;
03747         }
03748 #endif
03749 #if defined(GECODE_HAS_INT_VARS)
03750         if (spec[0]->isIntArray() &&
03751             isVar<Gecode::IntVar>(vm, spec[1]) &&
03752             spec[2]->isInt())
03753         {
03754           Gecode::Reflection::IntArrayArg& a0 = *spec[0]->toIntArray();
03755           Gecode::IntArgs x0(a0.size());
03756           for (int i=a0.size(); i--;) x0[i] = a0[i];
03757           Gecode::IntVar x1(vm.var(spec[1]->toVar()));
03758           int x2 = static_cast<int>(spec[2]->toInt());
03759           Gecode::element(home, x0,x1,x2);
03760           return;
03761         }
03762 #endif
03763 #if defined(GECODE_HAS_INT_VARS)
03764         if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
03765             isVar<Gecode::IntVar>(vm, spec[1]) &&
03766             isVar<Gecode::IntVar>(vm, spec[2]))
03767         {
03768           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
03769           Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
03770           for (int i=a0.size(); i--;)
03771             x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
03772           Gecode::IntVar x1(vm.var(spec[1]->toVar()));
03773           Gecode::IntVar x2(vm.var(spec[2]->toVar()));
03774           Gecode::element(home, x0,x1,x2);
03775           return;
03776         }
03777 #endif
03778 #if defined(GECODE_HAS_INT_VARS)
03779         if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
03780             isVar<Gecode::IntVar>(vm, spec[1]) &&
03781             spec[2]->isInt())
03782         {
03783           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
03784           Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
03785           for (int i=a0.size(); i--;)
03786             x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
03787           Gecode::IntVar x1(vm.var(spec[1]->toVar()));
03788           int x2 = static_cast<int>(spec[2]->toInt());
03789           Gecode::element(home, x0,x1,x2);
03790           return;
03791         }
03792 #endif
03793 #if defined(GECODE_HAS_INT_VARS)
03794         if (isVarArgs<Gecode::BoolVar>(vm, spec[0]) &&
03795             isVar<Gecode::IntVar>(vm, spec[1]) &&
03796             isVar<Gecode::BoolVar>(vm, spec[2]))
03797         {
03798           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
03799           Gecode::VarArgArray<Gecode::BoolVar> x0(a0.size());
03800           for (int i=a0.size(); i--;)
03801             x0[i] = Gecode::BoolVar(vm.var(a0[i]->toVar()));
03802           Gecode::IntVar x1(vm.var(spec[1]->toVar()));
03803           Gecode::BoolVar x2(vm.var(spec[2]->toVar()));
03804           Gecode::element(home, x0,x1,x2);
03805           return;
03806         }
03807 #endif
03808 #if defined(GECODE_HAS_INT_VARS)
03809         if (isVarArgs<Gecode::BoolVar>(vm, spec[0]) &&
03810             isVar<Gecode::IntVar>(vm, spec[1]) &&
03811             spec[2]->isInt())
03812         {
03813           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
03814           Gecode::VarArgArray<Gecode::BoolVar> x0(a0.size());
03815           for (int i=a0.size(); i--;)
03816             x0[i] = Gecode::BoolVar(vm.var(a0[i]->toVar()));
03817           Gecode::IntVar x1(vm.var(spec[1]->toVar()));
03818           int x2 = static_cast<int>(spec[2]->toInt());
03819           Gecode::element(home, x0,x1,x2);
03820           return;
03821         }
03822 #endif
03823         throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::element");
03824       }
03825       break;
03826     case 4:
03827       {
03828 #if defined(GECODE_HAS_INT_VARS)
03829         if (spec[0]->isIntArray() &&
03830             isVar<Gecode::IntVar>(vm, spec[1]) &&
03831             isVar<Gecode::IntVar>(vm, spec[2]) &&
03832             isEnum_IntConLevel(spec[3]))
03833         {
03834           Gecode::Reflection::IntArrayArg& a0 = *spec[0]->toIntArray();
03835           Gecode::IntArgs x0(a0.size());
03836           for (int i=a0.size(); i--;) x0[i] = a0[i];
03837           Gecode::IntVar x1(vm.var(spec[1]->toVar()));
03838           Gecode::IntVar x2(vm.var(spec[2]->toVar()));
03839           Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
03840           Gecode::element(home, x0,x1,x2,x3);
03841           return;
03842         }
03843 #endif
03844 #if defined(GECODE_HAS_INT_VARS)
03845         if (spec[0]->isIntArray() &&
03846             isVar<Gecode::IntVar>(vm, spec[1]) &&
03847             isVar<Gecode::BoolVar>(vm, spec[2]) &&
03848             isEnum_IntConLevel(spec[3]))
03849         {
03850           Gecode::Reflection::IntArrayArg& a0 = *spec[0]->toIntArray();
03851           Gecode::IntArgs x0(a0.size());
03852           for (int i=a0.size(); i--;) x0[i] = a0[i];
03853           Gecode::IntVar x1(vm.var(spec[1]->toVar()));
03854           Gecode::BoolVar x2(vm.var(spec[2]->toVar()));
03855           Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
03856           Gecode::element(home, x0,x1,x2,x3);
03857           return;
03858         }
03859 #endif
03860 #if defined(GECODE_HAS_INT_VARS)
03861         if (spec[0]->isIntArray() &&
03862             isVar<Gecode::IntVar>(vm, spec[1]) &&
03863             spec[2]->isInt() &&
03864             isEnum_IntConLevel(spec[3]))
03865         {
03866           Gecode::Reflection::IntArrayArg& a0 = *spec[0]->toIntArray();
03867           Gecode::IntArgs x0(a0.size());
03868           for (int i=a0.size(); i--;) x0[i] = a0[i];
03869           Gecode::IntVar x1(vm.var(spec[1]->toVar()));
03870           int x2 = static_cast<int>(spec[2]->toInt());
03871           Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
03872           Gecode::element(home, x0,x1,x2,x3);
03873           return;
03874         }
03875 #endif
03876 #if defined(GECODE_HAS_INT_VARS)
03877         if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
03878             isVar<Gecode::IntVar>(vm, spec[1]) &&
03879             isVar<Gecode::IntVar>(vm, spec[2]) &&
03880             isEnum_IntConLevel(spec[3]))
03881         {
03882           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
03883           Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
03884           for (int i=a0.size(); i--;)
03885             x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
03886           Gecode::IntVar x1(vm.var(spec[1]->toVar()));
03887           Gecode::IntVar x2(vm.var(spec[2]->toVar()));
03888           Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
03889           Gecode::element(home, x0,x1,x2,x3);
03890           return;
03891         }
03892 #endif
03893 #if defined(GECODE_HAS_INT_VARS)
03894         if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
03895             isVar<Gecode::IntVar>(vm, spec[1]) &&
03896             spec[2]->isInt() &&
03897             isEnum_IntConLevel(spec[3]))
03898         {
03899           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
03900           Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
03901           for (int i=a0.size(); i--;)
03902             x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
03903           Gecode::IntVar x1(vm.var(spec[1]->toVar()));
03904           int x2 = static_cast<int>(spec[2]->toInt());
03905           Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
03906           Gecode::element(home, x0,x1,x2,x3);
03907           return;
03908         }
03909 #endif
03910 #if defined(GECODE_HAS_INT_VARS)
03911         if (isVarArgs<Gecode::BoolVar>(vm, spec[0]) &&
03912             isVar<Gecode::IntVar>(vm, spec[1]) &&
03913             isVar<Gecode::BoolVar>(vm, spec[2]) &&
03914             isEnum_IntConLevel(spec[3]))
03915         {
03916           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
03917           Gecode::VarArgArray<Gecode::BoolVar> x0(a0.size());
03918           for (int i=a0.size(); i--;)
03919             x0[i] = Gecode::BoolVar(vm.var(a0[i]->toVar()));
03920           Gecode::IntVar x1(vm.var(spec[1]->toVar()));
03921           Gecode::BoolVar x2(vm.var(spec[2]->toVar()));
03922           Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
03923           Gecode::element(home, x0,x1,x2,x3);
03924           return;
03925         }
03926 #endif
03927 #if defined(GECODE_HAS_INT_VARS)
03928         if (isVarArgs<Gecode::BoolVar>(vm, spec[0]) &&
03929             isVar<Gecode::IntVar>(vm, spec[1]) &&
03930             spec[2]->isInt() &&
03931             isEnum_IntConLevel(spec[3]))
03932         {
03933           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
03934           Gecode::VarArgArray<Gecode::BoolVar> x0(a0.size());
03935           for (int i=a0.size(); i--;)
03936             x0[i] = Gecode::BoolVar(vm.var(a0[i]->toVar()));
03937           Gecode::IntVar x1(vm.var(spec[1]->toVar()));
03938           int x2 = static_cast<int>(spec[2]->toInt());
03939           Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
03940           Gecode::element(home, x0,x1,x2,x3);
03941           return;
03942         }
03943 #endif
03944         throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::element");
03945       }
03946       break;
03947     case 5:
03948       {
03949 #if defined(GECODE_HAS_INT_VARS)
03950         if (spec[0]->isIntArray() &&
03951             isVar<Gecode::IntVar>(vm, spec[1]) &&
03952             isVar<Gecode::IntVar>(vm, spec[2]) &&
03953             isEnum_IntConLevel(spec[3]) &&
03954             isEnum_PropKind(spec[4]))
03955         {
03956           Gecode::Reflection::IntArrayArg& a0 = *spec[0]->toIntArray();
03957           Gecode::IntArgs x0(a0.size());
03958           for (int i=a0.size(); i--;) x0[i] = a0[i];
03959           Gecode::IntVar x1(vm.var(spec[1]->toVar()));
03960           Gecode::IntVar x2(vm.var(spec[2]->toVar()));
03961           Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
03962           Gecode::PropKind x4 = toEnum_PropKind(spec[4]);
03963           Gecode::element(home, x0,x1,x2,x3,x4);
03964           return;
03965         }
03966 #endif
03967 #if defined(GECODE_HAS_INT_VARS)
03968         if (spec[0]->isIntArray() &&
03969             isVar<Gecode::IntVar>(vm, spec[1]) &&
03970             isVar<Gecode::BoolVar>(vm, spec[2]) &&
03971             isEnum_IntConLevel(spec[3]) &&
03972             isEnum_PropKind(spec[4]))
03973         {
03974           Gecode::Reflection::IntArrayArg& a0 = *spec[0]->toIntArray();
03975           Gecode::IntArgs x0(a0.size());
03976           for (int i=a0.size(); i--;) x0[i] = a0[i];
03977           Gecode::IntVar x1(vm.var(spec[1]->toVar()));
03978           Gecode::BoolVar x2(vm.var(spec[2]->toVar()));
03979           Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
03980           Gecode::PropKind x4 = toEnum_PropKind(spec[4]);
03981           Gecode::element(home, x0,x1,x2,x3,x4);
03982           return;
03983         }
03984 #endif
03985 #if defined(GECODE_HAS_INT_VARS)
03986         if (spec[0]->isIntArray() &&
03987             isVar<Gecode::IntVar>(vm, spec[1]) &&
03988             spec[2]->isInt() &&
03989             isEnum_IntConLevel(spec[3]) &&
03990             isEnum_PropKind(spec[4]))
03991         {
03992           Gecode::Reflection::IntArrayArg& a0 = *spec[0]->toIntArray();
03993           Gecode::IntArgs x0(a0.size());
03994           for (int i=a0.size(); i--;) x0[i] = a0[i];
03995           Gecode::IntVar x1(vm.var(spec[1]->toVar()));
03996           int x2 = static_cast<int>(spec[2]->toInt());
03997           Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
03998           Gecode::PropKind x4 = toEnum_PropKind(spec[4]);
03999           Gecode::element(home, x0,x1,x2,x3,x4);
04000           return;
04001         }
04002 #endif
04003 #if defined(GECODE_HAS_INT_VARS)
04004         if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
04005             isVar<Gecode::IntVar>(vm, spec[1]) &&
04006             isVar<Gecode::IntVar>(vm, spec[2]) &&
04007             isEnum_IntConLevel(spec[3]) &&
04008             isEnum_PropKind(spec[4]))
04009         {
04010           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
04011           Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
04012           for (int i=a0.size(); i--;)
04013             x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
04014           Gecode::IntVar x1(vm.var(spec[1]->toVar()));
04015           Gecode::IntVar x2(vm.var(spec[2]->toVar()));
04016           Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
04017           Gecode::PropKind x4 = toEnum_PropKind(spec[4]);
04018           Gecode::element(home, x0,x1,x2,x3,x4);
04019           return;
04020         }
04021 #endif
04022 #if defined(GECODE_HAS_INT_VARS)
04023         if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
04024             isVar<Gecode::IntVar>(vm, spec[1]) &&
04025             spec[2]->isInt() &&
04026             isEnum_IntConLevel(spec[3]) &&
04027             isEnum_PropKind(spec[4]))
04028         {
04029           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
04030           Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
04031           for (int i=a0.size(); i--;)
04032             x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
04033           Gecode::IntVar x1(vm.var(spec[1]->toVar()));
04034           int x2 = static_cast<int>(spec[2]->toInt());
04035           Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
04036           Gecode::PropKind x4 = toEnum_PropKind(spec[4]);
04037           Gecode::element(home, x0,x1,x2,x3,x4);
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             isVar<Gecode::BoolVar>(vm, spec[2]) &&
04045             isEnum_IntConLevel(spec[3]) &&
04046             isEnum_PropKind(spec[4]))
04047         {
04048           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
04049           Gecode::VarArgArray<Gecode::BoolVar> x0(a0.size());
04050           for (int i=a0.size(); i--;)
04051             x0[i] = Gecode::BoolVar(vm.var(a0[i]->toVar()));
04052           Gecode::IntVar x1(vm.var(spec[1]->toVar()));
04053           Gecode::BoolVar x2(vm.var(spec[2]->toVar()));
04054           Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
04055           Gecode::PropKind x4 = toEnum_PropKind(spec[4]);
04056           Gecode::element(home, x0,x1,x2,x3,x4);
04057           return;
04058         }
04059 #endif
04060 #if defined(GECODE_HAS_INT_VARS)
04061         if (isVarArgs<Gecode::BoolVar>(vm, spec[0]) &&
04062             isVar<Gecode::IntVar>(vm, spec[1]) &&
04063             spec[2]->isInt() &&
04064             isEnum_IntConLevel(spec[3]) &&
04065             isEnum_PropKind(spec[4]))
04066         {
04067           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
04068           Gecode::VarArgArray<Gecode::BoolVar> x0(a0.size());
04069           for (int i=a0.size(); i--;)
04070             x0[i] = Gecode::BoolVar(vm.var(a0[i]->toVar()));
04071           Gecode::IntVar x1(vm.var(spec[1]->toVar()));
04072           int x2 = static_cast<int>(spec[2]->toInt());
04073           Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
04074           Gecode::PropKind x4 = toEnum_PropKind(spec[4]);
04075           Gecode::element(home, x0,x1,x2,x3,x4);
04076           return;
04077         }
04078 #endif
04079         throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::element");
04080       }
04081       break;
04082     default: throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::element");
04083     }
04084   }
04085 };
04086 
04087 class Register_abs {
04088 public:
04090   static Gecode::Support::Symbol ati(void) {
04091     return "Gecode::Post::abs";
04092   }
04093   
04095   static void post(Gecode::Space* home, Gecode::Reflection::VarMap& vm,
04096                    const Gecode::Reflection::ActorSpec& spec) {
04097     switch(spec.noOfArgs()) {
04098     case 2:
04099       {
04100 #if defined(GECODE_HAS_INT_VARS)
04101         if (isVar<Gecode::IntVar>(vm, spec[0]) &&
04102             isVar<Gecode::IntVar>(vm, spec[1]))
04103         {
04104           Gecode::IntVar x0(vm.var(spec[0]->toVar()));
04105           Gecode::IntVar x1(vm.var(spec[1]->toVar()));
04106           Gecode::abs(home, x0,x1);
04107           return;
04108         }
04109 #endif
04110         throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::abs");
04111       }
04112       break;
04113     case 3:
04114       {
04115 #if defined(GECODE_HAS_INT_VARS)
04116         if (isVar<Gecode::IntVar>(vm, spec[0]) &&
04117             isVar<Gecode::IntVar>(vm, spec[1]) &&
04118             isEnum_IntConLevel(spec[2]))
04119         {
04120           Gecode::IntVar x0(vm.var(spec[0]->toVar()));
04121           Gecode::IntVar x1(vm.var(spec[1]->toVar()));
04122           Gecode::IntConLevel x2 = toEnum_IntConLevel(spec[2]);
04123           Gecode::abs(home, x0,x1,x2);
04124           return;
04125         }
04126 #endif
04127         throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::abs");
04128       }
04129       break;
04130     case 4:
04131       {
04132 #if defined(GECODE_HAS_INT_VARS)
04133         if (isVar<Gecode::IntVar>(vm, spec[0]) &&
04134             isVar<Gecode::IntVar>(vm, spec[1]) &&
04135             isEnum_IntConLevel(spec[2]) &&
04136             isEnum_PropKind(spec[3]))
04137         {
04138           Gecode::IntVar x0(vm.var(spec[0]->toVar()));
04139           Gecode::IntVar x1(vm.var(spec[1]->toVar()));
04140           Gecode::IntConLevel x2 = toEnum_IntConLevel(spec[2]);
04141           Gecode::PropKind x3 = toEnum_PropKind(spec[3]);
04142           Gecode::abs(home, x0,x1,x2,x3);
04143           return;
04144         }
04145 #endif
04146         throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::abs");
04147       }
04148       break;
04149     default: throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::abs");
04150     }
04151   }
04152 };
04153 
04154 class Register_atmost {
04155 public:
04157   static Gecode::Support::Symbol ati(void) {
04158     return "Gecode::Post::atmost";
04159   }
04160   
04162   static void post(Gecode::Space* home, Gecode::Reflection::VarMap& vm,
04163                    const Gecode::Reflection::ActorSpec& spec) {
04164     switch(spec.noOfArgs()) {
04165     case 3:
04166       {
04167 #if defined(GECODE_HAS_INT_VARS)
04168         if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
04169             spec[1]->isInt() &&
04170             spec[2]->isInt())
04171         {
04172           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
04173           Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
04174           for (int i=a0.size(); i--;)
04175             x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
04176           int x1 = static_cast<int>(spec[1]->toInt());
04177           int x2 = static_cast<int>(spec[2]->toInt());
04178           Gecode::atmost(home, x0,x1,x2);
04179           return;
04180         }
04181 #endif
04182 #if defined(GECODE_HAS_INT_VARS)
04183         if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
04184             isVar<Gecode::IntVar>(vm, spec[1]) &&
04185             spec[2]->isInt())
04186         {
04187           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
04188           Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
04189           for (int i=a0.size(); i--;)
04190             x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
04191           Gecode::IntVar x1(vm.var(spec[1]->toVar()));
04192           int x2 = static_cast<int>(spec[2]->toInt());
04193           Gecode::atmost(home, x0,x1,x2);
04194           return;
04195         }
04196 #endif
04197 #if defined(GECODE_HAS_INT_VARS)
04198         if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
04199             spec[1]->isIntArray() &&
04200             spec[2]->isInt())
04201         {
04202           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
04203           Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
04204           for (int i=a0.size(); i--;)
04205             x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
04206           Gecode::Reflection::IntArrayArg& a1 = *spec[1]->toIntArray();
04207           Gecode::IntArgs x1(a1.size());
04208           for (int i=a1.size(); i--;) x1[i] = a1[i];
04209           int x2 = static_cast<int>(spec[2]->toInt());
04210           Gecode::atmost(home, x0,x1,x2);
04211           return;
04212         }
04213 #endif
04214 #if defined(GECODE_HAS_INT_VARS)
04215         if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
04216             spec[1]->isInt() &&
04217             isVar<Gecode::IntVar>(vm, spec[2]))
04218         {
04219           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
04220           Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
04221           for (int i=a0.size(); i--;)
04222             x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
04223           int x1 = static_cast<int>(spec[1]->toInt());
04224           Gecode::IntVar x2(vm.var(spec[2]->toVar()));
04225           Gecode::atmost(home, x0,x1,x2);
04226           return;
04227         }
04228 #endif
04229 #if defined(GECODE_HAS_INT_VARS)
04230         if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
04231             isVar<Gecode::IntVar>(vm, spec[1]) &&
04232             isVar<Gecode::IntVar>(vm, spec[2]))
04233         {
04234           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
04235           Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
04236           for (int i=a0.size(); i--;)
04237             x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
04238           Gecode::IntVar x1(vm.var(spec[1]->toVar()));
04239           Gecode::IntVar x2(vm.var(spec[2]->toVar()));
04240           Gecode::atmost(home, x0,x1,x2);
04241           return;
04242         }
04243 #endif
04244 #if defined(GECODE_HAS_INT_VARS)
04245         if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
04246             spec[1]->isIntArray() &&
04247             isVar<Gecode::IntVar>(vm, spec[2]))
04248         {
04249           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
04250           Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
04251           for (int i=a0.size(); i--;)
04252             x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
04253           Gecode::Reflection::IntArrayArg& a1 = *spec[1]->toIntArray();
04254           Gecode::IntArgs x1(a1.size());
04255           for (int i=a1.size(); i--;) x1[i] = a1[i];
04256           Gecode::IntVar x2(vm.var(spec[2]->toVar()));
04257           Gecode::atmost(home, x0,x1,x2);
04258           return;
04259         }
04260 #endif
04261         throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::atmost");
04262       }
04263       break;
04264     case 4:
04265       {
04266 #if defined(GECODE_HAS_INT_VARS)
04267         if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
04268             spec[1]->isInt() &&
04269             spec[2]->isInt() &&
04270             isEnum_IntConLevel(spec[3]))
04271         {
04272           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
04273           Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
04274           for (int i=a0.size(); i--;)
04275             x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
04276           int x1 = static_cast<int>(spec[1]->toInt());
04277           int x2 = static_cast<int>(spec[2]->toInt());
04278           Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
04279           Gecode::atmost(home, x0,x1,x2,x3);
04280           return;
04281         }
04282 #endif
04283 #if defined(GECODE_HAS_INT_VARS)
04284         if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
04285             isVar<Gecode::IntVar>(vm, spec[1]) &&
04286             spec[2]->isInt() &&
04287             isEnum_IntConLevel(spec[3]))
04288         {
04289           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
04290           Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
04291           for (int i=a0.size(); i--;)
04292             x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
04293           Gecode::IntVar x1(vm.var(spec[1]->toVar()));
04294           int x2 = static_cast<int>(spec[2]->toInt());
04295           Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
04296           Gecode::atmost(home, x0,x1,x2,x3);
04297           return;
04298         }
04299 #endif
04300 #if defined(GECODE_HAS_INT_VARS)
04301         if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
04302             spec[1]->isIntArray() &&
04303             spec[2]->isInt() &&
04304             isEnum_IntConLevel(spec[3]))
04305         {
04306           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
04307           Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
04308           for (int i=a0.size(); i--;)
04309             x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
04310           Gecode::Reflection::IntArrayArg& a1 = *spec[1]->toIntArray();
04311           Gecode::IntArgs x1(a1.size());
04312           for (int i=a1.size(); i--;) x1[i] = a1[i];
04313           int x2 = static_cast<int>(spec[2]->toInt());
04314           Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
04315           Gecode::atmost(home, x0,x1,x2,x3);
04316           return;
04317         }
04318 #endif
04319 #if defined(GECODE_HAS_INT_VARS)
04320         if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
04321             spec[1]->isInt() &&
04322             isVar<Gecode::IntVar>(vm, spec[2]) &&
04323             isEnum_IntConLevel(spec[3]))
04324         {
04325           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
04326           Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
04327           for (int i=a0.size(); i--;)
04328             x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
04329           int x1 = static_cast<int>(spec[1]->toInt());
04330           Gecode::IntVar x2(vm.var(spec[2]->toVar()));
04331           Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
04332           Gecode::atmost(home, x0,x1,x2,x3);
04333           return;
04334         }
04335 #endif
04336 #if defined(GECODE_HAS_INT_VARS)
04337         if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
04338             isVar<Gecode::IntVar>(vm, spec[1]) &&
04339             isVar<Gecode::IntVar>(vm, spec[2]) &&
04340             isEnum_IntConLevel(spec[3]))
04341         {
04342           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
04343           Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
04344           for (int i=a0.size(); i--;)
04345             x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
04346           Gecode::IntVar x1(vm.var(spec[1]->toVar()));
04347           Gecode::IntVar x2(vm.var(spec[2]->toVar()));
04348           Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
04349           Gecode::atmost(home, x0,x1,x2,x3);
04350           return;
04351         }
04352 #endif
04353 #if defined(GECODE_HAS_INT_VARS)
04354         if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
04355             spec[1]->isIntArray() &&
04356             isVar<Gecode::IntVar>(vm, spec[2]) &&
04357             isEnum_IntConLevel(spec[3]))
04358         {
04359           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
04360           Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
04361           for (int i=a0.size(); i--;)
04362             x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
04363           Gecode::Reflection::IntArrayArg& a1 = *spec[1]->toIntArray();
04364           Gecode::IntArgs x1(a1.size());
04365           for (int i=a1.size(); i--;) x1[i] = a1[i];
04366           Gecode::IntVar x2(vm.var(spec[2]->toVar()));
04367           Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
04368           Gecode::atmost(home, x0,x1,x2,x3);
04369           return;
04370         }
04371 #endif
04372         throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::atmost");
04373       }
04374       break;
04375     case 5:
04376       {
04377 #if defined(GECODE_HAS_INT_VARS)
04378         if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
04379             spec[1]->isInt() &&
04380             spec[2]->isInt() &&
04381             isEnum_IntConLevel(spec[3]) &&
04382             isEnum_PropKind(spec[4]))
04383         {
04384           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
04385           Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
04386           for (int i=a0.size(); i--;)
04387             x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
04388           int x1 = static_cast<int>(spec[1]->toInt());
04389           int x2 = static_cast<int>(spec[2]->toInt());
04390           Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
04391           Gecode::PropKind x4 = toEnum_PropKind(spec[4]);
04392           Gecode::atmost(home, x0,x1,x2,x3,x4);
04393           return;
04394         }
04395 #endif
04396 #if defined(GECODE_HAS_INT_VARS)
04397         if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
04398             isVar<Gecode::IntVar>(vm, spec[1]) &&
04399             spec[2]->isInt() &&
04400             isEnum_IntConLevel(spec[3]) &&
04401             isEnum_PropKind(spec[4]))
04402         {
04403           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
04404           Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
04405           for (int i=a0.size(); i--;)
04406             x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
04407           Gecode::IntVar x1(vm.var(spec[1]->toVar()));
04408           int x2 = static_cast<int>(spec[2]->toInt());
04409           Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
04410           Gecode::PropKind x4 = toEnum_PropKind(spec[4]);
04411           Gecode::atmost(home, x0,x1,x2,x3,x4);
04412           return;
04413         }
04414 #endif
04415 #if defined(GECODE_HAS_INT_VARS)
04416         if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
04417             spec[1]->isIntArray() &&
04418             spec[2]->isInt() &&
04419             isEnum_IntConLevel(spec[3]) &&
04420             isEnum_PropKind(spec[4]))
04421         {
04422           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
04423           Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
04424           for (int i=a0.size(); i--;)
04425             x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
04426           Gecode::Reflection::IntArrayArg& a1 = *spec[1]->toIntArray();
04427           Gecode::IntArgs x1(a1.size());
04428           for (int i=a1.size(); i--;) x1[i] = a1[i];
04429           int x2 = static_cast<int>(spec[2]->toInt());
04430           Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
04431           Gecode::PropKind x4 = toEnum_PropKind(spec[4]);
04432           Gecode::atmost(home, x0,x1,x2,x3,x4);
04433           return;
04434         }
04435 #endif
04436 #if defined(GECODE_HAS_INT_VARS)
04437         if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
04438             spec[1]->isInt() &&
04439             isVar<Gecode::IntVar>(vm, spec[2]) &&
04440             isEnum_IntConLevel(spec[3]) &&
04441             isEnum_PropKind(spec[4]))
04442         {
04443           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
04444           Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
04445           for (int i=a0.size(); i--;)
04446             x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
04447           int x1 = static_cast<int>(spec[1]->toInt());
04448           Gecode::IntVar x2(vm.var(spec[2]->toVar()));
04449           Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
04450           Gecode::PropKind x4 = toEnum_PropKind(spec[4]);
04451           Gecode::atmost(home, x0,x1,x2,x3,x4);
04452           return;
04453         }
04454 #endif
04455 #if defined(GECODE_HAS_INT_VARS)
04456         if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
04457             isVar<Gecode::IntVar>(vm, spec[1]) &&
04458             isVar<Gecode::IntVar>(vm, spec[2]) &&
04459             isEnum_IntConLevel(spec[3]) &&
04460             isEnum_PropKind(spec[4]))
04461         {
04462           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
04463           Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
04464           for (int i=a0.size(); i--;)
04465             x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
04466           Gecode::IntVar x1(vm.var(spec[1]->toVar()));
04467           Gecode::IntVar x2(vm.var(spec[2]->toVar()));
04468           Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
04469           Gecode::PropKind x4 = toEnum_PropKind(spec[4]);
04470           Gecode::atmost(home, x0,x1,x2,x3,x4);
04471           return;
04472         }
04473 #endif
04474 #if defined(GECODE_HAS_INT_VARS)
04475         if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
04476             spec[1]->isIntArray() &&
04477             isVar<Gecode::IntVar>(vm, spec[2]) &&
04478             isEnum_IntConLevel(spec[3]) &&
04479             isEnum_PropKind(spec[4]))
04480         {
04481           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
04482           Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
04483           for (int i=a0.size(); i--;)
04484             x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
04485           Gecode::Reflection::IntArrayArg& a1 = *spec[1]->toIntArray();
04486           Gecode::IntArgs x1(a1.size());
04487           for (int i=a1.size(); i--;) x1[i] = a1[i];
04488           Gecode::IntVar x2(vm.var(spec[2]->toVar()));
04489           Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
04490           Gecode::PropKind x4 = toEnum_PropKind(spec[4]);
04491           Gecode::atmost(home, x0,x1,x2,x3,x4);
04492           return;
04493         }
04494 #endif
04495         throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::atmost");
04496       }
04497       break;
04498     default: throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::atmost");
04499     }
04500   }
04501 };
04502 
04503 class Register_circuit {
04504 public:
04506   static Gecode::Support::Symbol ati(void) {
04507     return "Gecode::Post::circuit";
04508   }
04509   
04511   static void post(Gecode::Space* home, Gecode::Reflection::VarMap& vm,
04512                    const Gecode::Reflection::ActorSpec& spec) {
04513     switch(spec.noOfArgs()) {
04514     case 1:
04515       {
04516 #if defined(GECODE_HAS_INT_VARS)
04517         if (isVarArgs<Gecode::IntVar>(vm, spec[0]))
04518         {
04519           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
04520           Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
04521           for (int i=a0.size(); i--;)
04522             x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
04523           Gecode::circuit(home, x0);
04524           return;
04525         }
04526 #endif
04527         throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::circuit");
04528       }
04529       break;
04530     case 2:
04531       {
04532 #if defined(GECODE_HAS_INT_VARS)
04533         if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
04534             isEnum_IntConLevel(spec[1]))
04535         {
04536           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
04537           Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
04538           for (int i=a0.size(); i--;)
04539             x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
04540           Gecode::IntConLevel x1 = toEnum_IntConLevel(spec[1]);
04541           Gecode::circuit(home, x0,x1);
04542           return;
04543         }
04544 #endif
04545         throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::circuit");
04546       }
04547       break;
04548     case 3:
04549       {
04550 #if defined(GECODE_HAS_INT_VARS)
04551         if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
04552             isEnum_IntConLevel(spec[1]) &&
04553             isEnum_PropKind(spec[2]))
04554         {
04555           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
04556           Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
04557           for (int i=a0.size(); i--;)
04558             x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
04559           Gecode::IntConLevel x1 = toEnum_IntConLevel(spec[1]);
04560           Gecode::PropKind x2 = toEnum_PropKind(spec[2]);
04561           Gecode::circuit(home, x0,x1,x2);
04562           return;
04563         }
04564 #endif
04565         throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::circuit");
04566       }
04567       break;
04568     default: throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::circuit");
04569     }
04570   }
04571 };
04572 
04573 class Register_assign {
04574 public:
04576   static Gecode::Support::Symbol ati(void) {
04577     return "Gecode::Post::assign";
04578   }
04579   
04581   static void post(Gecode::Space* home, Gecode::Reflection::VarMap& vm,
04582                    const Gecode::Reflection::ActorSpec& spec) {
04583     switch(spec.noOfArgs()) {
04584     case 2:
04585       {
04586 #if defined(GECODE_HAS_INT_VARS)
04587         if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
04588             isEnum_IntAssign(spec[1]))
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::IntAssign x1 = toEnum_IntAssign(spec[1]);
04595           Gecode::assign(home, x0,x1);
04596           return;
04597         }
04598 #endif
04599 #if defined(GECODE_HAS_INT_VARS)
04600         if (isVarArgs<Gecode::BoolVar>(vm, spec[0]) &&
04601             isEnum_IntAssign(spec[1]))
04602         {
04603           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
04604           Gecode::VarArgArray<Gecode::BoolVar> x0(a0.size());
04605           for (int i=a0.size(); i--;)
04606             x0[i] = Gecode::BoolVar(vm.var(a0[i]->toVar()));
04607           Gecode::IntAssign x1 = toEnum_IntAssign(spec[1]);
04608           Gecode::assign(home, x0,x1);
04609           return;
04610         }
04611 #endif
04612         throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::assign");
04613       }
04614       break;
04615     default: throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::assign");
04616     }
04617   }
04618 };
04619 
04620 class Register_mult {
04621 public:
04623   static Gecode::Support::Symbol ati(void) {
04624     return "Gecode::Post::mult";
04625   }
04626   
04628   static void post(Gecode::Space* home, Gecode::Reflection::VarMap& vm,
04629                    const Gecode::Reflection::ActorSpec& spec) {
04630     switch(spec.noOfArgs()) {
04631     case 3:
04632       {
04633 #if defined(GECODE_HAS_INT_VARS)
04634         if (isVar<Gecode::IntVar>(vm, spec[0]) &&
04635             isVar<Gecode::IntVar>(vm, spec[1]) &&
04636             isVar<Gecode::IntVar>(vm, spec[2]))
04637         {
04638           Gecode::IntVar x0(vm.var(spec[0]->toVar()));
04639           Gecode::IntVar x1(vm.var(spec[1]->toVar()));
04640           Gecode::IntVar x2(vm.var(spec[2]->toVar()));
04641           Gecode::mult(home, x0,x1,x2);
04642           return;
04643         }
04644 #endif
04645         throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::mult");
04646       }
04647       break;
04648     case 4:
04649       {
04650 #if defined(GECODE_HAS_INT_VARS)
04651         if (isVar<Gecode::IntVar>(vm, spec[0]) &&
04652             isVar<Gecode::IntVar>(vm, spec[1]) &&
04653             isVar<Gecode::IntVar>(vm, spec[2]) &&
04654             isEnum_IntConLevel(spec[3]))
04655         {
04656           Gecode::IntVar x0(vm.var(spec[0]->toVar()));
04657           Gecode::IntVar x1(vm.var(spec[1]->toVar()));
04658           Gecode::IntVar x2(vm.var(spec[2]->toVar()));
04659           Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
04660           Gecode::mult(home, x0,x1,x2,x3);
04661           return;
04662         }
04663 #endif
04664         throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::mult");
04665       }
04666       break;
04667     case 5:
04668       {
04669 #if defined(GECODE_HAS_INT_VARS)
04670         if (isVar<Gecode::IntVar>(vm, spec[0]) &&
04671             isVar<Gecode::IntVar>(vm, spec[1]) &&
04672             isVar<Gecode::IntVar>(vm, spec[2]) &&
04673             isEnum_IntConLevel(spec[3]) &&
04674             isEnum_PropKind(spec[4]))
04675         {
04676           Gecode::IntVar x0(vm.var(spec[0]->toVar()));
04677           Gecode::IntVar x1(vm.var(spec[1]->toVar()));
04678           Gecode::IntVar x2(vm.var(spec[2]->toVar()));
04679           Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
04680           Gecode::PropKind x4 = toEnum_PropKind(spec[4]);
04681           Gecode::mult(home, x0,x1,x2,x3,x4);
04682           return;
04683         }
04684 #endif
04685         throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::mult");
04686       }
04687       break;
04688     default: throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::mult");
04689     }
04690   }
04691 };
04692 
04693 class Register_atmostOne {
04694 public:
04696   static Gecode::Support::Symbol ati(void) {
04697     return "Gecode::Post::atmostOne";
04698   }
04699   
04701   static void post(Gecode::Space* home, Gecode::Reflection::VarMap& vm,
04702                    const Gecode::Reflection::ActorSpec& spec) {
04703     switch(spec.noOfArgs()) {
04704     case 2:
04705       {
04706 #if defined(GECODE_HAS_SET_VARS)
04707         if (isVarArgs<Gecode::SetVar>(vm, spec[0]) &&
04708             spec[1]->isInt())
04709         {
04710           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
04711           Gecode::VarArgArray<Gecode::SetVar> x0(a0.size());
04712           for (int i=a0.size(); i--;)
04713             x0[i] = Gecode::SetVar(vm.var(a0[i]->toVar()));
04714           unsigned int x1 = static_cast<unsigned int>(spec[1]->toInt());
04715           Gecode::atmostOne(home, x0,x1);
04716           return;
04717         }
04718 #endif
04719         throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::atmostOne");
04720       }
04721       break;
04722     default: throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::atmostOne");
04723     }
04724   }
04725 };
04726 
04727 class Register_convex {
04728 public:
04730   static Gecode::Support::Symbol ati(void) {
04731     return "Gecode::Post::convex";
04732   }
04733   
04735   static void post(Gecode::Space* home, Gecode::Reflection::VarMap& vm,
04736                    const Gecode::Reflection::ActorSpec& spec) {
04737     switch(spec.noOfArgs()) {
04738     case 1:
04739       {
04740 #if defined(GECODE_HAS_SET_VARS)
04741         if (isVar<Gecode::SetVar>(vm, spec[0]))
04742         {
04743           Gecode::SetVar x0(vm.var(spec[0]->toVar()));
04744           Gecode::convex(home, x0);
04745           return;
04746         }
04747 #endif
04748         throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::convex");
04749       }
04750       break;
04751     default: throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::convex");
04752     }
04753   }
04754 };
04755 
04756 class Register_unshare {
04757 public:
04759   static Gecode::Support::Symbol ati(void) {
04760     return "Gecode::Post::unshare";
04761   }
04762   
04764   static void post(Gecode::Space* home, Gecode::Reflection::VarMap& vm,
04765                    const Gecode::Reflection::ActorSpec& spec) {
04766     switch(spec.noOfArgs()) {
04767     case 1:
04768       {
04769 #if defined(GECODE_HAS_INT_VARS)
04770         if (isVarArgs<Gecode::IntVar>(vm, spec[0]))
04771         {
04772           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
04773           Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
04774           for (int i=a0.size(); i--;)
04775             x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
04776           Gecode::unshare(home, x0);
04777           return;
04778         }
04779 #endif
04780 #if defined(GECODE_HAS_INT_VARS)
04781         if (isVarArgs<Gecode::BoolVar>(vm, spec[0]))
04782         {
04783           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
04784           Gecode::VarArgArray<Gecode::BoolVar> x0(a0.size());
04785           for (int i=a0.size(); i--;)
04786             x0[i] = Gecode::BoolVar(vm.var(a0[i]->toVar()));
04787           Gecode::unshare(home, x0);
04788           return;
04789         }
04790 #endif
04791         throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::unshare");
04792       }
04793       break;
04794     case 2:
04795       {
04796 #if defined(GECODE_HAS_INT_VARS)
04797         if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
04798             isEnum_IntConLevel(spec[1]))
04799         {
04800           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
04801           Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
04802           for (int i=a0.size(); i--;)
04803             x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
04804           Gecode::IntConLevel x1 = toEnum_IntConLevel(spec[1]);
04805           Gecode::unshare(home, x0,x1);
04806           return;
04807         }
04808 #endif
04809 #if defined(GECODE_HAS_INT_VARS)
04810         if (isVarArgs<Gecode::BoolVar>(vm, spec[0]) &&
04811             isEnum_IntConLevel(spec[1]))
04812         {
04813           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
04814           Gecode::VarArgArray<Gecode::BoolVar> x0(a0.size());
04815           for (int i=a0.size(); i--;)
04816             x0[i] = Gecode::BoolVar(vm.var(a0[i]->toVar()));
04817           Gecode::IntConLevel x1 = toEnum_IntConLevel(spec[1]);
04818           Gecode::unshare(home, x0,x1);
04819           return;
04820         }
04821 #endif
04822         throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::unshare");
04823       }
04824       break;
04825     case 3:
04826       {
04827 #if defined(GECODE_HAS_INT_VARS)
04828         if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
04829             isEnum_IntConLevel(spec[1]) &&
04830             isEnum_PropKind(spec[2]))
04831         {
04832           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
04833           Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
04834           for (int i=a0.size(); i--;)
04835             x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
04836           Gecode::IntConLevel x1 = toEnum_IntConLevel(spec[1]);
04837           Gecode::PropKind x2 = toEnum_PropKind(spec[2]);
04838           Gecode::unshare(home, x0,x1,x2);
04839           return;
04840         }
04841 #endif
04842 #if defined(GECODE_HAS_INT_VARS)
04843         if (isVarArgs<Gecode::BoolVar>(vm, spec[0]) &&
04844             isEnum_IntConLevel(spec[1]) &&
04845             isEnum_PropKind(spec[2]))
04846         {
04847           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
04848           Gecode::VarArgArray<Gecode::BoolVar> x0(a0.size());
04849           for (int i=a0.size(); i--;)
04850             x0[i] = Gecode::BoolVar(vm.var(a0[i]->toVar()));
04851           Gecode::IntConLevel x1 = toEnum_IntConLevel(spec[1]);
04852           Gecode::PropKind x2 = toEnum_PropKind(spec[2]);
04853           Gecode::unshare(home, x0,x1,x2);
04854           return;
04855         }
04856 #endif
04857         throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::unshare");
04858       }
04859       break;
04860     default: throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::unshare");
04861     }
04862   }
04863 };
04864 
04865 class Register_weights {
04866 public:
04868   static Gecode::Support::Symbol ati(void) {
04869     return "Gecode::Post::weights";
04870   }
04871   
04873   static void post(Gecode::Space* home, Gecode::Reflection::VarMap& vm,
04874                    const Gecode::Reflection::ActorSpec& spec) {
04875     switch(spec.noOfArgs()) {
04876     case 4:
04877       {
04878 #if defined(GECODE_HAS_SET_VARS)
04879         if (spec[0]->isIntArray() &&
04880             spec[1]->isIntArray() &&
04881             isVar<Gecode::SetVar>(vm, spec[2]) &&
04882             isVar<Gecode::IntVar>(vm, spec[3]))
04883         {
04884           Gecode::Reflection::IntArrayArg& a0 = *spec[0]->toIntArray();
04885           Gecode::IntArgs x0(a0.size());
04886           for (int i=a0.size(); i--;) x0[i] = a0[i];
04887           Gecode::Reflection::IntArrayArg& a1 = *spec[1]->toIntArray();
04888           Gecode::IntArgs x1(a1.size());
04889           for (int i=a1.size(); i--;) x1[i] = a1[i];
04890           Gecode::SetVar x2(vm.var(spec[2]->toVar()));
04891           Gecode::IntVar x3(vm.var(spec[3]->toVar()));
04892           Gecode::weights(home, x0,x1,x2,x3);
04893           return;
04894         }
04895 #endif
04896         throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::weights");
04897       }
04898       break;
04899     default: throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::weights");
04900     }
04901   }
04902 };
04903 
04904 class Register_selectInter {
04905 public:
04907   static Gecode::Support::Symbol ati(void) {
04908     return "Gecode::Post::selectInter";
04909   }
04910   
04912   static void post(Gecode::Space* home, Gecode::Reflection::VarMap& vm,
04913                    const Gecode::Reflection::ActorSpec& spec) {
04914     switch(spec.noOfArgs()) {
04915     case 3:
04916       {
04917 #if defined(GECODE_HAS_SET_VARS)
04918         if (isVarArgs<Gecode::SetVar>(vm, spec[0]) &&
04919             isVar<Gecode::SetVar>(vm, spec[1]) &&
04920             isVar<Gecode::SetVar>(vm, spec[2]))
04921         {
04922           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
04923           Gecode::VarArgArray<Gecode::SetVar> x0(a0.size());
04924           for (int i=a0.size(); i--;)
04925             x0[i] = Gecode::SetVar(vm.var(a0[i]->toVar()));
04926           Gecode::SetVar x1(vm.var(spec[1]->toVar()));
04927           Gecode::SetVar x2(vm.var(spec[2]->toVar()));
04928           Gecode::selectInter(home, x0,x1,x2);
04929           return;
04930         }
04931 #endif
04932         throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::selectInter");
04933       }
04934       break;
04935     default: throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::selectInter");
04936     }
04937   }
04938 };
04939 
04940 class Register_selectDisjoint {
04941 public:
04943   static Gecode::Support::Symbol ati(void) {
04944     return "Gecode::Post::selectDisjoint";
04945   }
04946   
04948   static void post(Gecode::Space* home, Gecode::Reflection::VarMap& vm,
04949                    const Gecode::Reflection::ActorSpec& spec) {
04950     switch(spec.noOfArgs()) {
04951     case 2:
04952       {
04953 #if defined(GECODE_HAS_SET_VARS)
04954         if (isVarArgs<Gecode::SetVar>(vm, spec[0]) &&
04955             isVar<Gecode::SetVar>(vm, spec[1]))
04956         {
04957           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
04958           Gecode::VarArgArray<Gecode::SetVar> x0(a0.size());
04959           for (int i=a0.size(); i--;)
04960             x0[i] = Gecode::SetVar(vm.var(a0[i]->toVar()));
04961           Gecode::SetVar x1(vm.var(spec[1]->toVar()));
04962           Gecode::selectDisjoint(home, x0,x1);
04963           return;
04964         }
04965 #endif
04966         throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::selectDisjoint");
04967       }
04968       break;
04969     default: throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::selectDisjoint");
04970     }
04971   }
04972 };
04973 
04974 class Register_linear {
04975 public:
04977   static Gecode::Support::Symbol ati(void) {
04978     return "Gecode::Post::linear";
04979   }
04980   
04982   static void post(Gecode::Space* home, Gecode::Reflection::VarMap& vm,
04983                    const Gecode::Reflection::ActorSpec& spec) {
04984     switch(spec.noOfArgs()) {
04985     case 3:
04986       {
04987 #if defined(GECODE_HAS_INT_VARS)
04988         if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
04989             isEnum_IntRelType(spec[1]) &&
04990             spec[2]->isInt())
04991         {
04992           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
04993           Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
04994           for (int i=a0.size(); i--;)
04995             x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
04996           Gecode::IntRelType x1 = toEnum_IntRelType(spec[1]);
04997           int x2 = static_cast<int>(spec[2]->toInt());
04998           Gecode::linear(home, x0,x1,x2);
04999           return;
05000         }
05001 #endif
05002 #if defined(GECODE_HAS_INT_VARS)
05003         if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
05004             isEnum_IntRelType(spec[1]) &&
05005             isVar<Gecode::IntVar>(vm, spec[2]))
05006         {
05007           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
05008           Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
05009           for (int i=a0.size(); i--;)
05010             x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
05011           Gecode::IntRelType x1 = toEnum_IntRelType(spec[1]);
05012           Gecode::IntVar x2(vm.var(spec[2]->toVar()));
05013           Gecode::linear(home, x0,x1,x2);
05014           return;
05015         }
05016 #endif
05017 #if defined(GECODE_HAS_INT_VARS)
05018         if (isVarArgs<Gecode::BoolVar>(vm, spec[0]) &&
05019             isEnum_IntRelType(spec[1]) &&
05020             spec[2]->isInt())
05021         {
05022           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
05023           Gecode::VarArgArray<Gecode::BoolVar> x0(a0.size());
05024           for (int i=a0.size(); i--;)
05025             x0[i] = Gecode::BoolVar(vm.var(a0[i]->toVar()));
05026           Gecode::IntRelType x1 = toEnum_IntRelType(spec[1]);
05027           int x2 = static_cast<int>(spec[2]->toInt());
05028           Gecode::linear(home, x0,x1,x2);
05029           return;
05030         }
05031 #endif
05032 #if defined(GECODE_HAS_INT_VARS)
05033         if (isVarArgs<Gecode::BoolVar>(vm, spec[0]) &&
05034             isEnum_IntRelType(spec[1]) &&
05035             isVar<Gecode::IntVar>(vm, spec[2]))
05036         {
05037           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
05038           Gecode::VarArgArray<Gecode::BoolVar> x0(a0.size());
05039           for (int i=a0.size(); i--;)
05040             x0[i] = Gecode::BoolVar(vm.var(a0[i]->toVar()));
05041           Gecode::IntRelType x1 = toEnum_IntRelType(spec[1]);
05042           Gecode::IntVar x2(vm.var(spec[2]->toVar()));
05043           Gecode::linear(home, x0,x1,x2);
05044           return;
05045         }
05046 #endif
05047         throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::linear");
05048       }
05049       break;
05050     case 4:
05051       {
05052 #if defined(GECODE_HAS_INT_VARS)
05053         if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
05054             isEnum_IntRelType(spec[1]) &&
05055             spec[2]->isInt() &&
05056             isEnum_IntConLevel(spec[3]))
05057         {
05058           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
05059           Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
05060           for (int i=a0.size(); i--;)
05061             x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
05062           Gecode::IntRelType x1 = toEnum_IntRelType(spec[1]);
05063           int x2 = static_cast<int>(spec[2]->toInt());
05064           Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
05065           Gecode::linear(home, x0,x1,x2,x3);
05066           return;
05067         }
05068 #endif
05069 #if defined(GECODE_HAS_INT_VARS)
05070         if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
05071             isEnum_IntRelType(spec[1]) &&
05072             isVar<Gecode::IntVar>(vm, spec[2]) &&
05073             isEnum_IntConLevel(spec[3]))
05074         {
05075           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
05076           Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
05077           for (int i=a0.size(); i--;)
05078             x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
05079           Gecode::IntRelType x1 = toEnum_IntRelType(spec[1]);
05080           Gecode::IntVar x2(vm.var(spec[2]->toVar()));
05081           Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
05082           Gecode::linear(home, x0,x1,x2,x3);
05083           return;
05084         }
05085 #endif
05086 #if defined(GECODE_HAS_INT_VARS)
05087         if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
05088             isEnum_IntRelType(spec[1]) &&
05089             spec[2]->isInt() &&
05090             isVar<Gecode::BoolVar>(vm, spec[3]))
05091         {
05092           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
05093           Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
05094           for (int i=a0.size(); i--;)
05095             x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
05096           Gecode::IntRelType x1 = toEnum_IntRelType(spec[1]);
05097           int x2 = static_cast<int>(spec[2]->toInt());
05098           Gecode::BoolVar x3(vm.var(spec[3]->toVar()));
05099           Gecode::linear(home, x0,x1,x2,x3);
05100           return;
05101         }
05102 #endif
05103 #if defined(GECODE_HAS_INT_VARS)
05104         if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
05105             isEnum_IntRelType(spec[1]) &&
05106             isVar<Gecode::IntVar>(vm, spec[2]) &&
05107             isVar<Gecode::BoolVar>(vm, spec[3]))
05108         {
05109           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
05110           Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
05111           for (int i=a0.size(); i--;)
05112             x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
05113           Gecode::IntRelType x1 = toEnum_IntRelType(spec[1]);
05114           Gecode::IntVar x2(vm.var(spec[2]->toVar()));
05115           Gecode::BoolVar x3(vm.var(spec[3]->toVar()));
05116           Gecode::linear(home, x0,x1,x2,x3);
05117           return;
05118         }
05119 #endif
05120 #if defined(GECODE_HAS_INT_VARS)
05121         if (spec[0]->isIntArray() &&
05122             isVarArgs<Gecode::IntVar>(vm, spec[1]) &&
05123             isEnum_IntRelType(spec[2]) &&
05124             spec[3]->isInt())
05125         {
05126           Gecode::Reflection::IntArrayArg& a0 = *spec[0]->toIntArray();
05127           Gecode::IntArgs x0(a0.size());
05128           for (int i=a0.size(); i--;) x0[i] = a0[i];
05129           Gecode::Reflection::ArrayArg& a1 = *spec[1]->toArray();
05130           Gecode::VarArgArray<Gecode::IntVar> x1(a1.size());
05131           for (int i=a1.size(); i--;)
05132             x1[i] = Gecode::IntVar(vm.var(a1[i]->toVar()));
05133           Gecode::IntRelType x2 = toEnum_IntRelType(spec[2]);
05134           int x3 = static_cast<int>(spec[3]->toInt());
05135           Gecode::linear(home, x0,x1,x2,x3);
05136           return;
05137         }
05138 #endif
05139 #if defined(GECODE_HAS_INT_VARS)
05140         if (spec[0]->isIntArray() &&
05141             isVarArgs<Gecode::IntVar>(vm, spec[1]) &&
05142             isEnum_IntRelType(spec[2]) &&
05143             isVar<Gecode::IntVar>(vm, spec[3]))
05144         {
05145           Gecode::Reflection::IntArrayArg& a0 = *spec[0]->toIntArray();
05146           Gecode::IntArgs x0(a0.size());
05147           for (int i=a0.size(); i--;) x0[i] = a0[i];
05148           Gecode::Reflection::ArrayArg& a1 = *spec[1]->toArray();
05149           Gecode::VarArgArray<Gecode::IntVar> x1(a1.size());
05150           for (int i=a1.size(); i--;)
05151             x1[i] = Gecode::IntVar(vm.var(a1[i]->toVar()));
05152           Gecode::IntRelType x2 = toEnum_IntRelType(spec[2]);
05153           Gecode::IntVar x3(vm.var(spec[3]->toVar()));
05154           Gecode::linear(home, x0,x1,x2,x3);
05155           return;
05156         }
05157 #endif
05158 #if defined(GECODE_HAS_INT_VARS)
05159         if (isVarArgs<Gecode::BoolVar>(vm, spec[0]) &&
05160             isEnum_IntRelType(spec[1]) &&
05161             spec[2]->isInt() &&
05162             isEnum_IntConLevel(spec[3]))
05163         {
05164           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
05165           Gecode::VarArgArray<Gecode::BoolVar> x0(a0.size());
05166           for (int i=a0.size(); i--;)
05167             x0[i] = Gecode::BoolVar(vm.var(a0[i]->toVar()));
05168           Gecode::IntRelType x1 = toEnum_IntRelType(spec[1]);
05169           int x2 = static_cast<int>(spec[2]->toInt());
05170           Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
05171           Gecode::linear(home, x0,x1,x2,x3);
05172           return;
05173         }
05174 #endif
05175 #if defined(GECODE_HAS_INT_VARS)
05176         if (isVarArgs<Gecode::BoolVar>(vm, spec[0]) &&
05177             isEnum_IntRelType(spec[1]) &&
05178             spec[2]->isInt() &&
05179             isVar<Gecode::BoolVar>(vm, spec[3]))
05180         {
05181           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
05182           Gecode::VarArgArray<Gecode::BoolVar> x0(a0.size());
05183           for (int i=a0.size(); i--;)
05184             x0[i] = Gecode::BoolVar(vm.var(a0[i]->toVar()));
05185           Gecode::IntRelType x1 = toEnum_IntRelType(spec[1]);
05186           int x2 = static_cast<int>(spec[2]->toInt());
05187           Gecode::BoolVar x3(vm.var(spec[3]->toVar()));
05188           Gecode::linear(home, x0,x1,x2,x3);
05189           return;
05190         }
05191 #endif
05192 #if defined(GECODE_HAS_INT_VARS)
05193         if (isVarArgs<Gecode::BoolVar>(vm, spec[0]) &&
05194             isEnum_IntRelType(spec[1]) &&
05195             isVar<Gecode::IntVar>(vm, spec[2]) &&
05196             isEnum_IntConLevel(spec[3]))
05197         {
05198           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
05199           Gecode::VarArgArray<Gecode::BoolVar> x0(a0.size());
05200           for (int i=a0.size(); i--;)
05201             x0[i] = Gecode::BoolVar(vm.var(a0[i]->toVar()));
05202           Gecode::IntRelType x1 = toEnum_IntRelType(spec[1]);
05203           Gecode::IntVar x2(vm.var(spec[2]->toVar()));
05204           Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
05205           Gecode::linear(home, x0,x1,x2,x3);
05206           return;
05207         }
05208 #endif
05209 #if defined(GECODE_HAS_INT_VARS)
05210         if (isVarArgs<Gecode::BoolVar>(vm, spec[0]) &&
05211             isEnum_IntRelType(spec[1]) &&
05212             isVar<Gecode::IntVar>(vm, spec[2]) &&
05213             isVar<Gecode::BoolVar>(vm, spec[3]))
05214         {
05215           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
05216           Gecode::VarArgArray<Gecode::BoolVar> x0(a0.size());
05217           for (int i=a0.size(); i--;)
05218             x0[i] = Gecode::BoolVar(vm.var(a0[i]->toVar()));
05219           Gecode::IntRelType x1 = toEnum_IntRelType(spec[1]);
05220           Gecode::IntVar x2(vm.var(spec[2]->toVar()));
05221           Gecode::BoolVar x3(vm.var(spec[3]->toVar()));
05222           Gecode::linear(home, x0,x1,x2,x3);
05223           return;
05224         }
05225 #endif
05226 #if defined(GECODE_HAS_INT_VARS)
05227         if (spec[0]->isIntArray() &&
05228             isVarArgs<Gecode::BoolVar>(vm, spec[1]) &&
05229             isEnum_IntRelType(spec[2]) &&
05230             spec[3]->isInt())
05231         {
05232           Gecode::Reflection::IntArrayArg& a0 = *spec[0]->toIntArray();
05233           Gecode::IntArgs x0(a0.size());
05234           for (int i=a0.size(); i--;) x0[i] = a0[i];
05235           Gecode::Reflection::ArrayArg& a1 = *spec[1]->toArray();
05236           Gecode::VarArgArray<Gecode::BoolVar> x1(a1.size());
05237           for (int i=a1.size(); i--;)
05238             x1[i] = Gecode::BoolVar(vm.var(a1[i]->toVar()));
05239           Gecode::IntRelType x2 = toEnum_IntRelType(spec[2]);
05240           int x3 = static_cast<int>(spec[3]->toInt());
05241           Gecode::linear(home, x0,x1,x2,x3);
05242           return;
05243         }
05244 #endif
05245 #if defined(GECODE_HAS_INT_VARS)
05246         if (spec[0]->isIntArray() &&
05247             isVarArgs<Gecode::BoolVar>(vm, spec[1]) &&
05248             isEnum_IntRelType(spec[2]) &&
05249             isVar<Gecode::IntVar>(vm, spec[3]))
05250         {
05251           Gecode::Reflection::IntArrayArg& a0 = *spec[0]->toIntArray();
05252           Gecode::IntArgs x0(a0.size());
05253           for (int i=a0.size(); i--;) x0[i] = a0[i];
05254           Gecode::Reflection::ArrayArg& a1 = *spec[1]->toArray();
05255           Gecode::VarArgArray<Gecode::BoolVar> x1(a1.size());
05256           for (int i=a1.size(); i--;)
05257             x1[i] = Gecode::BoolVar(vm.var(a1[i]->toVar()));
05258           Gecode::IntRelType x2 = toEnum_IntRelType(spec[2]);
05259           Gecode::IntVar x3(vm.var(spec[3]->toVar()));
05260           Gecode::linear(home, x0,x1,x2,x3);
05261           return;
05262         }
05263 #endif
05264         throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::linear");
05265       }
05266       break;
05267     case 5:
05268       {
05269 #if defined(GECODE_HAS_INT_VARS)
05270         if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
05271             isEnum_IntRelType(spec[1]) &&
05272             spec[2]->isInt() &&
05273             isEnum_IntConLevel(spec[3]) &&
05274             isEnum_PropKind(spec[4]))
05275         {
05276           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
05277           Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
05278           for (int i=a0.size(); i--;)
05279             x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
05280           Gecode::IntRelType x1 = toEnum_IntRelType(spec[1]);
05281           int x2 = static_cast<int>(spec[2]->toInt());
05282           Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
05283           Gecode::PropKind x4 = toEnum_PropKind(spec[4]);
05284           Gecode::linear(home, x0,x1,x2,x3,x4);
05285           return;
05286         }
05287 #endif
05288 #if defined(GECODE_HAS_INT_VARS)
05289         if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
05290             isEnum_IntRelType(spec[1]) &&
05291             isVar<Gecode::IntVar>(vm, spec[2]) &&
05292             isEnum_IntConLevel(spec[3]) &&
05293             isEnum_PropKind(spec[4]))
05294         {
05295           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
05296           Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
05297           for (int i=a0.size(); i--;)
05298             x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
05299           Gecode::IntRelType x1 = toEnum_IntRelType(spec[1]);
05300           Gecode::IntVar x2(vm.var(spec[2]->toVar()));
05301           Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
05302           Gecode::PropKind x4 = toEnum_PropKind(spec[4]);
05303           Gecode::linear(home, x0,x1,x2,x3,x4);
05304           return;
05305         }
05306 #endif
05307 #if defined(GECODE_HAS_INT_VARS)
05308         if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
05309             isEnum_IntRelType(spec[1]) &&
05310             spec[2]->isInt() &&
05311             isVar<Gecode::BoolVar>(vm, spec[3]) &&
05312             isEnum_IntConLevel(spec[4]))
05313         {
05314           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
05315           Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
05316           for (int i=a0.size(); i--;)
05317             x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
05318           Gecode::IntRelType x1 = toEnum_IntRelType(spec[1]);
05319           int x2 = static_cast<int>(spec[2]->toInt());
05320           Gecode::BoolVar x3(vm.var(spec[3]->toVar()));
05321           Gecode::IntConLevel x4 = toEnum_IntConLevel(spec[4]);
05322           Gecode::linear(home, x0,x1,x2,x3,x4);
05323           return;
05324         }
05325 #endif
05326 #if defined(GECODE_HAS_INT_VARS)
05327         if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
05328             isEnum_IntRelType(spec[1]) &&
05329             isVar<Gecode::IntVar>(vm, spec[2]) &&
05330             isVar<Gecode::BoolVar>(vm, spec[3]) &&
05331             isEnum_IntConLevel(spec[4]))
05332         {
05333           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
05334           Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
05335           for (int i=a0.size(); i--;)
05336             x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
05337           Gecode::IntRelType x1 = toEnum_IntRelType(spec[1]);
05338           Gecode::IntVar x2(vm.var(spec[2]->toVar()));
05339           Gecode::BoolVar x3(vm.var(spec[3]->toVar()));
05340           Gecode::IntConLevel x4 = toEnum_IntConLevel(spec[4]);
05341           Gecode::linear(home, x0,x1,x2,x3,x4);
05342           return;
05343         }
05344 #endif
05345 #if defined(GECODE_HAS_INT_VARS)
05346         if (spec[0]->isIntArray() &&
05347             isVarArgs<Gecode::IntVar>(vm, spec[1]) &&
05348             isEnum_IntRelType(spec[2]) &&
05349             spec[3]->isInt() &&
05350             isEnum_IntConLevel(spec[4]))
05351         {
05352           Gecode::Reflection::IntArrayArg& a0 = *spec[0]->toIntArray();
05353           Gecode::IntArgs x0(a0.size());
05354           for (int i=a0.size(); i--;) x0[i] = a0[i];
05355           Gecode::Reflection::ArrayArg& a1 = *spec[1]->toArray();
05356           Gecode::VarArgArray<Gecode::IntVar> x1(a1.size());
05357           for (int i=a1.size(); i--;)
05358             x1[i] = Gecode::IntVar(vm.var(a1[i]->toVar()));
05359           Gecode::IntRelType x2 = toEnum_IntRelType(spec[2]);
05360           int x3 = static_cast<int>(spec[3]->toInt());
05361           Gecode::IntConLevel x4 = toEnum_IntConLevel(spec[4]);
05362           Gecode::linear(home, x0,x1,x2,x3,x4);
05363           return;
05364         }
05365 #endif
05366 #if defined(GECODE_HAS_INT_VARS)
05367         if (spec[0]->isIntArray() &&
05368             isVarArgs<Gecode::IntVar>(vm, spec[1]) &&
05369             isEnum_IntRelType(spec[2]) &&
05370             isVar<Gecode::IntVar>(vm, spec[3]) &&
05371             isEnum_IntConLevel(spec[4]))
05372         {
05373           Gecode::Reflection::IntArrayArg& a0 = *spec[0]->toIntArray();
05374           Gecode::IntArgs x0(a0.size());
05375           for (int i=a0.size(); i--;) x0[i] = a0[i];
05376           Gecode::Reflection::ArrayArg& a1 = *spec[1]->toArray();
05377           Gecode::VarArgArray<Gecode::IntVar> x1(a1.size());
05378           for (int i=a1.size(); i--;)
05379             x1[i] = Gecode::IntVar(vm.var(a1[i]->toVar()));
05380           Gecode::IntRelType x2 = toEnum_IntRelType(spec[2]);
05381           Gecode::IntVar x3(vm.var(spec[3]->toVar()));
05382           Gecode::IntConLevel x4 = toEnum_IntConLevel(spec[4]);
05383           Gecode::linear(home, x0,x1,x2,x3,x4);
05384           return;
05385         }
05386 #endif
05387 #if defined(GECODE_HAS_INT_VARS)
05388         if (spec[0]->isIntArray() &&
05389             isVarArgs<Gecode::IntVar>(vm, spec[1]) &&
05390             isEnum_IntRelType(spec[2]) &&
05391             spec[3]->isInt() &&
05392             isVar<Gecode::BoolVar>(vm, spec[4]))
05393         {
05394           Gecode::Reflection::IntArrayArg& a0 = *spec[0]->toIntArray();
05395           Gecode::IntArgs x0(a0.size());
05396           for (int i=a0.size(); i--;) x0[i] = a0[i];
05397           Gecode::Reflection::ArrayArg& a1 = *spec[1]->toArray();
05398           Gecode::VarArgArray<Gecode::IntVar> x1(a1.size());
05399           for (int i=a1.size(); i--;)
05400             x1[i] = Gecode::IntVar(vm.var(a1[i]->toVar()));
05401           Gecode::IntRelType x2 = toEnum_IntRelType(spec[2]);
05402           int x3 = static_cast<int>(spec[3]->toInt());
05403           Gecode::BoolVar x4(vm.var(spec[4]->toVar()));
05404           Gecode::linear(home, x0,x1,x2,x3,x4);
05405           return;
05406         }
05407 #endif
05408 #if defined(GECODE_HAS_INT_VARS)
05409         if (spec[0]->isIntArray() &&
05410             isVarArgs<Gecode::IntVar>(vm, spec[1]) &&
05411             isEnum_IntRelType(spec[2]) &&
05412             isVar<Gecode::IntVar>(vm, spec[3]) &&
05413             isVar<Gecode::BoolVar>(vm, spec[4]))
05414         {
05415           Gecode::Reflection::IntArrayArg& a0 = *spec[0]->toIntArray();
05416           Gecode::IntArgs x0(a0.size());
05417           for (int i=a0.size(); i--;) x0[i] = a0[i];
05418           Gecode::Reflection::ArrayArg& a1 = *spec[1]->toArray();
05419           Gecode::VarArgArray<Gecode::IntVar> x1(a1.size());
05420           for (int i=a1.size(); i--;)
05421             x1[i] = Gecode::IntVar(vm.var(a1[i]->toVar()));
05422           Gecode::IntRelType x2 = toEnum_IntRelType(spec[2]);
05423           Gecode::IntVar x3(vm.var(spec[3]->toVar()));
05424           Gecode::BoolVar x4(vm.var(spec[4]->toVar()));
05425           Gecode::linear(home, x0,x1,x2,x3,x4);
05426           return;
05427         }
05428 #endif
05429 #if defined(GECODE_HAS_INT_VARS)
05430         if (isVarArgs<Gecode::BoolVar>(vm, spec[0]) &&
05431             isEnum_IntRelType(spec[1]) &&
05432             spec[2]->isInt() &&
05433             isEnum_IntConLevel(spec[3]) &&
05434             isEnum_PropKind(spec[4]))
05435         {
05436           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
05437           Gecode::VarArgArray<Gecode::BoolVar> x0(a0.size());
05438           for (int i=a0.size(); i--;)
05439             x0[i] = Gecode::BoolVar(vm.var(a0[i]->toVar()));
05440           Gecode::IntRelType x1 = toEnum_IntRelType(spec[1]);
05441           int x2 = static_cast<int>(spec[2]->toInt());
05442           Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
05443           Gecode::PropKind x4 = toEnum_PropKind(spec[4]);
05444           Gecode::linear(home, x0,x1,x2,x3,x4);
05445           return;
05446         }
05447 #endif
05448 #if defined(GECODE_HAS_INT_VARS)
05449         if (isVarArgs<Gecode::BoolVar>(vm, spec[0]) &&
05450             isEnum_IntRelType(spec[1]) &&
05451             spec[2]->isInt() &&
05452             isVar<Gecode::BoolVar>(vm, spec[3]) &&
05453             isEnum_IntConLevel(spec[4]))
05454         {
05455           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
05456           Gecode::VarArgArray<Gecode::BoolVar> x0(a0.size());
05457           for (int i=a0.size(); i--;)
05458             x0[i] = Gecode::BoolVar(vm.var(a0[i]->toVar()));
05459           Gecode::IntRelType x1 = toEnum_IntRelType(spec[1]);
05460           int x2 = static_cast<int>(spec[2]->toInt());
05461           Gecode::BoolVar x3(vm.var(spec[3]->toVar()));
05462           Gecode::IntConLevel x4 = toEnum_IntConLevel(spec[4]);
05463           Gecode::linear(home, x0,x1,x2,x3,x4);
05464           return;
05465         }
05466 #endif
05467 #if defined(GECODE_HAS_INT_VARS)
05468         if (isVarArgs<Gecode::BoolVar>(vm, spec[0]) &&
05469             isEnum_IntRelType(spec[1]) &&
05470             isVar<Gecode::IntVar>(vm, spec[2]) &&
05471             isEnum_IntConLevel(spec[3]) &&
05472             isEnum_PropKind(spec[4]))
05473         {
05474           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
05475           Gecode::VarArgArray<Gecode::BoolVar> x0(a0.size());
05476           for (int i=a0.size(); i--;)
05477             x0[i] = Gecode::BoolVar(vm.var(a0[i]->toVar()));
05478           Gecode::IntRelType x1 = toEnum_IntRelType(spec[1]);
05479           Gecode::IntVar x2(vm.var(spec[2]->toVar()));
05480           Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
05481           Gecode::PropKind x4 = toEnum_PropKind(spec[4]);
05482           Gecode::linear(home, x0,x1,x2,x3,x4);
05483           return;
05484         }
05485 #endif
05486 #if defined(GECODE_HAS_INT_VARS)
05487         if (isVarArgs<Gecode::BoolVar>(vm, spec[0]) &&
05488             isEnum_IntRelType(spec[1]) &&
05489             isVar<Gecode::IntVar>(vm, spec[2]) &&
05490             isVar<Gecode::BoolVar>(vm, spec[3]) &&
05491             isEnum_IntConLevel(spec[4]))
05492         {
05493           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
05494           Gecode::VarArgArray<Gecode::BoolVar> x0(a0.size());
05495           for (int i=a0.size(); i--;)
05496             x0[i] = Gecode::BoolVar(vm.var(a0[i]->toVar()));
05497           Gecode::IntRelType x1 = toEnum_IntRelType(spec[1]);
05498           Gecode::IntVar x2(vm.var(spec[2]->toVar()));
05499           Gecode::BoolVar x3(vm.var(spec[3]->toVar()));
05500           Gecode::IntConLevel x4 = toEnum_IntConLevel(spec[4]);
05501           Gecode::linear(home, x0,x1,x2,x3,x4);
05502           return;
05503         }
05504 #endif
05505 #if defined(GECODE_HAS_INT_VARS)
05506         if (spec[0]->isIntArray() &&
05507             isVarArgs<Gecode::BoolVar>(vm, spec[1]) &&
05508             isEnum_IntRelType(spec[2]) &&
05509             spec[3]->isInt() &&
05510             isEnum_IntConLevel(spec[4]))
05511         {
05512           Gecode::Reflection::IntArrayArg& a0 = *spec[0]->toIntArray();
05513           Gecode::IntArgs x0(a0.size());
05514           for (int i=a0.size(); i--;) x0[i] = a0[i];
05515           Gecode::Reflection::ArrayArg& a1 = *spec[1]->toArray();
05516           Gecode::VarArgArray<Gecode::BoolVar> x1(a1.size());
05517           for (int i=a1.size(); i--;)
05518             x1[i] = Gecode::BoolVar(vm.var(a1[i]->toVar()));
05519           Gecode::IntRelType x2 = toEnum_IntRelType(spec[2]);
05520           int x3 = static_cast<int>(spec[3]->toInt());
05521           Gecode::IntConLevel x4 = toEnum_IntConLevel(spec[4]);
05522           Gecode::linear(home, x0,x1,x2,x3,x4);
05523           return;
05524         }
05525 #endif
05526 #if defined(GECODE_HAS_INT_VARS)
05527         if (spec[0]->isIntArray() &&
05528             isVarArgs<Gecode::BoolVar>(vm, spec[1]) &&
05529             isEnum_IntRelType(spec[2]) &&
05530             spec[3]->isInt() &&
05531             isVar<Gecode::BoolVar>(vm, spec[4]))
05532         {
05533           Gecode::Reflection::IntArrayArg& a0 = *spec[0]->toIntArray();
05534           Gecode::IntArgs x0(a0.size());
05535           for (int i=a0.size(); i--;) x0[i] = a0[i];
05536           Gecode::Reflection::ArrayArg& a1 = *spec[1]->toArray();
05537           Gecode::VarArgArray<Gecode::BoolVar> x1(a1.size());
05538           for (int i=a1.size(); i--;)
05539             x1[i] = Gecode::BoolVar(vm.var(a1[i]->toVar()));
05540           Gecode::IntRelType x2 = toEnum_IntRelType(spec[2]);
05541           int x3 = static_cast<int>(spec[3]->toInt());
05542           Gecode::BoolVar x4(vm.var(spec[4]->toVar()));
05543           Gecode::linear(home, x0,x1,x2,x3,x4);
05544           return;
05545         }
05546 #endif
05547 #if defined(GECODE_HAS_INT_VARS)
05548         if (spec[0]->isIntArray() &&
05549             isVarArgs<Gecode::BoolVar>(vm, spec[1]) &&
05550             isEnum_IntRelType(spec[2]) &&
05551             isVar<Gecode::IntVar>(vm, spec[3]) &&
05552             isEnum_IntConLevel(spec[4]))
05553         {
05554           Gecode::Reflection::IntArrayArg& a0 = *spec[0]->toIntArray();
05555           Gecode::IntArgs x0(a0.size());
05556           for (int i=a0.size(); i--;) x0[i] = a0[i];
05557           Gecode::Reflection::ArrayArg& a1 = *spec[1]->toArray();
05558           Gecode::VarArgArray<Gecode::BoolVar> x1(a1.size());
05559           for (int i=a1.size(); i--;)
05560             x1[i] = Gecode::BoolVar(vm.var(a1[i]->toVar()));
05561           Gecode::IntRelType x2 = toEnum_IntRelType(spec[2]);
05562           Gecode::IntVar x3(vm.var(spec[3]->toVar()));
05563           Gecode::IntConLevel x4 = toEnum_IntConLevel(spec[4]);
05564           Gecode::linear(home, x0,x1,x2,x3,x4);
05565           return;
05566         }
05567 #endif
05568 #if defined(GECODE_HAS_INT_VARS)
05569         if (spec[0]->isIntArray() &&
05570             isVarArgs<Gecode::BoolVar>(vm, spec[1]) &&
05571             isEnum_IntRelType(spec[2]) &&
05572             isVar<Gecode::IntVar>(vm, spec[3]) &&
05573             isVar<Gecode::BoolVar>(vm, spec[4]))
05574         {
05575           Gecode::Reflection::IntArrayArg& a0 = *spec[0]->toIntArray();
05576           Gecode::IntArgs x0(a0.size());
05577           for (int i=a0.size(); i--;) x0[i] = a0[i];
05578           Gecode::Reflection::ArrayArg& a1 = *spec[1]->toArray();
05579           Gecode::VarArgArray<Gecode::BoolVar> x1(a1.size());
05580           for (int i=a1.size(); i--;)
05581             x1[i] = Gecode::BoolVar(vm.var(a1[i]->toVar()));
05582           Gecode::IntRelType x2 = toEnum_IntRelType(spec[2]);
05583           Gecode::IntVar x3(vm.var(spec[3]->toVar()));
05584           Gecode::BoolVar x4(vm.var(spec[4]->toVar()));
05585           Gecode::linear(home, x0,x1,x2,x3,x4);
05586           return;
05587         }
05588 #endif
05589         throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::linear");
05590       }
05591       break;
05592     case 6:
05593       {
05594 #if defined(GECODE_HAS_INT_VARS)
05595         if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
05596             isEnum_IntRelType(spec[1]) &&
05597             spec[2]->isInt() &&
05598             isVar<Gecode::BoolVar>(vm, spec[3]) &&
05599             isEnum_IntConLevel(spec[4]) &&
05600             isEnum_PropKind(spec[5]))
05601         {
05602           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
05603           Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
05604           for (int i=a0.size(); i--;)
05605             x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
05606           Gecode::IntRelType x1 = toEnum_IntRelType(spec[1]);
05607           int x2 = static_cast<int>(spec[2]->toInt());
05608           Gecode::BoolVar x3(vm.var(spec[3]->toVar()));
05609           Gecode::IntConLevel x4 = toEnum_IntConLevel(spec[4]);
05610           Gecode::PropKind x5 = toEnum_PropKind(spec[5]);
05611           Gecode::linear(home, x0,x1,x2,x3,x4,x5);
05612           return;
05613         }
05614 #endif
05615 #if defined(GECODE_HAS_INT_VARS)
05616         if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
05617             isEnum_IntRelType(spec[1]) &&
05618             isVar<Gecode::IntVar>(vm, spec[2]) &&
05619             isVar<Gecode::BoolVar>(vm, spec[3]) &&
05620             isEnum_IntConLevel(spec[4]) &&
05621             isEnum_PropKind(spec[5]))
05622         {
05623           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
05624           Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
05625           for (int i=a0.size(); i--;)
05626             x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
05627           Gecode::IntRelType x1 = toEnum_IntRelType(spec[1]);
05628           Gecode::IntVar x2(vm.var(spec[2]->toVar()));
05629           Gecode::BoolVar x3(vm.var(spec[3]->toVar()));
05630           Gecode::IntConLevel x4 = toEnum_IntConLevel(spec[4]);
05631           Gecode::PropKind x5 = toEnum_PropKind(spec[5]);
05632           Gecode::linear(home, x0,x1,x2,x3,x4,x5);
05633           return;
05634         }
05635 #endif
05636 #if defined(GECODE_HAS_INT_VARS)
05637         if (spec[0]->isIntArray() &&
05638             isVarArgs<Gecode::IntVar>(vm, spec[1]) &&
05639             isEnum_IntRelType(spec[2]) &&
05640             spec[3]->isInt() &&
05641             isEnum_IntConLevel(spec[4]) &&
05642             isEnum_PropKind(spec[5]))
05643         {
05644           Gecode::Reflection::IntArrayArg& a0 = *spec[0]->toIntArray();
05645           Gecode::IntArgs x0(a0.size());
05646           for (int i=a0.size(); i--;) x0[i] = a0[i];
05647           Gecode::Reflection::ArrayArg& a1 = *spec[1]->toArray();
05648           Gecode::VarArgArray<Gecode::IntVar> x1(a1.size());
05649           for (int i=a1.size(); i--;)
05650             x1[i] = Gecode::IntVar(vm.var(a1[i]->toVar()));
05651           Gecode::IntRelType x2 = toEnum_IntRelType(spec[2]);
05652           int x3 = static_cast<int>(spec[3]->toInt());
05653           Gecode::IntConLevel x4 = toEnum_IntConLevel(spec[4]);
05654           Gecode::PropKind x5 = toEnum_PropKind(spec[5]);
05655           Gecode::linear(home, x0,x1,x2,x3,x4,x5);
05656           return;
05657         }
05658 #endif
05659 #if defined(GECODE_HAS_INT_VARS)
05660         if (spec[0]->isIntArray() &&
05661             isVarArgs<Gecode::IntVar>(vm, spec[1]) &&
05662             isEnum_IntRelType(spec[2]) &&
05663             isVar<Gecode::IntVar>(vm, spec[3]) &&
05664             isEnum_IntConLevel(spec[4]) &&
05665             isEnum_PropKind(spec[5]))
05666         {
05667           Gecode::Reflection::IntArrayArg& a0 = *spec[0]->toIntArray();
05668           Gecode::IntArgs x0(a0.size());
05669           for (int i=a0.size(); i--;) x0[i] = a0[i];
05670           Gecode::Reflection::ArrayArg& a1 = *spec[1]->toArray();
05671           Gecode::VarArgArray<Gecode::IntVar> x1(a1.size());
05672           for (int i=a1.size(); i--;)
05673             x1[i] = Gecode::IntVar(vm.var(a1[i]->toVar()));
05674           Gecode::IntRelType x2 = toEnum_IntRelType(spec[2]);
05675           Gecode::IntVar x3(vm.var(spec[3]->toVar()));
05676           Gecode::IntConLevel x4 = toEnum_IntConLevel(spec[4]);
05677           Gecode::PropKind x5 = toEnum_PropKind(spec[5]);
05678           Gecode::linear(home, x0,x1,x2,x3,x4,x5);
05679           return;
05680         }
05681 #endif
05682 #if defined(GECODE_HAS_INT_VARS)
05683         if (spec[0]->isIntArray() &&
05684             isVarArgs<Gecode::IntVar>(vm, spec[1]) &&
05685             isEnum_IntRelType(spec[2]) &&
05686             spec[3]->isInt() &&
05687             isVar<Gecode::BoolVar>(vm, spec[4]) &&
05688             isEnum_IntConLevel(spec[5]))
05689         {
05690           Gecode::Reflection::IntArrayArg& a0 = *spec[0]->toIntArray();
05691           Gecode::IntArgs x0(a0.size());
05692           for (int i=a0.size(); i--;) x0[i] = a0[i];
05693           Gecode::Reflection::ArrayArg& a1 = *spec[1]->toArray();
05694           Gecode::VarArgArray<Gecode::IntVar> x1(a1.size());
05695           for (int i=a1.size(); i--;)
05696             x1[i] = Gecode::IntVar(vm.var(a1[i]->toVar()));
05697           Gecode::IntRelType x2 = toEnum_IntRelType(spec[2]);
05698           int x3 = static_cast<int>(spec[3]->toInt());
05699           Gecode::BoolVar x4(vm.var(spec[4]->toVar()));
05700           Gecode::IntConLevel x5 = toEnum_IntConLevel(spec[5]);
05701           Gecode::linear(home, x0,x1,x2,x3,x4,x5);
05702           return;
05703         }
05704 #endif
05705 #if defined(GECODE_HAS_INT_VARS)
05706         if (spec[0]->isIntArray() &&
05707             isVarArgs<Gecode::IntVar>(vm, spec[1]) &&
05708             isEnum_IntRelType(spec[2]) &&
05709             isVar<Gecode::IntVar>(vm, spec[3]) &&
05710             isVar<Gecode::BoolVar>(vm, spec[4]) &&
05711             isEnum_IntConLevel(spec[5]))
05712         {
05713           Gecode::Reflection::IntArrayArg& a0 = *spec[0]->toIntArray();
05714           Gecode::IntArgs x0(a0.size());
05715           for (int i=a0.size(); i--;) x0[i] = a0[i];
05716           Gecode::Reflection::ArrayArg& a1 = *spec[1]->toArray();
05717           Gecode::VarArgArray<Gecode::IntVar> x1(a1.size());
05718           for (int i=a1.size(); i--;)
05719             x1[i] = Gecode::IntVar(vm.var(a1[i]->toVar()));
05720           Gecode::IntRelType x2 = toEnum_IntRelType(spec[2]);
05721           Gecode::IntVar x3(vm.var(spec[3]->toVar()));
05722           Gecode::BoolVar x4(vm.var(spec[4]->toVar()));
05723           Gecode::IntConLevel x5 = toEnum_IntConLevel(spec[5]);
05724           Gecode::linear(home, x0,x1,x2,x3,x4,x5);
05725           return;
05726         }
05727 #endif
05728 #if defined(GECODE_HAS_INT_VARS)
05729         if (isVarArgs<Gecode::BoolVar>(vm, spec[0]) &&
05730             isEnum_IntRelType(spec[1]) &&
05731             spec[2]->isInt() &&
05732             isVar<Gecode::BoolVar>(vm, spec[3]) &&
05733             isEnum_IntConLevel(spec[4]) &&
05734             isEnum_PropKind(spec[5]))
05735         {
05736           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
05737           Gecode::VarArgArray<Gecode::BoolVar> x0(a0.size());
05738           for (int i=a0.size(); i--;)
05739             x0[i] = Gecode::BoolVar(vm.var(a0[i]->toVar()));
05740           Gecode::IntRelType x1 = toEnum_IntRelType(spec[1]);
05741           int x2 = static_cast<int>(spec[2]->toInt());
05742           Gecode::BoolVar x3(vm.var(spec[3]->toVar()));
05743           Gecode::IntConLevel x4 = toEnum_IntConLevel(spec[4]);
05744           Gecode::PropKind x5 = toEnum_PropKind(spec[5]);
05745           Gecode::linear(home, x0,x1,x2,x3,x4,x5);
05746           return;
05747         }
05748 #endif
05749 #if defined(GECODE_HAS_INT_VARS)
05750         if (isVarArgs<Gecode::BoolVar>(vm, spec[0]) &&
05751             isEnum_IntRelType(spec[1]) &&
05752             isVar<Gecode::IntVar>(vm, spec[2]) &&
05753             isVar<Gecode::BoolVar>(vm, spec[3]) &&
05754             isEnum_IntConLevel(spec[4]) &&
05755             isEnum_PropKind(spec[5]))
05756         {
05757           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
05758           Gecode::VarArgArray<Gecode::BoolVar> x0(a0.size());
05759           for (int i=a0.size(); i--;)
05760             x0[i] = Gecode::BoolVar(vm.var(a0[i]->toVar()));
05761           Gecode::IntRelType x1 = toEnum_IntRelType(spec[1]);
05762           Gecode::IntVar x2(vm.var(spec[2]->toVar()));
05763           Gecode::BoolVar x3(vm.var(spec[3]->toVar()));
05764           Gecode::IntConLevel x4 = toEnum_IntConLevel(spec[4]);
05765           Gecode::PropKind x5 = toEnum_PropKind(spec[5]);
05766           Gecode::linear(home, x0,x1,x2,x3,x4,x5);
05767           return;
05768         }
05769 #endif
05770 #if defined(GECODE_HAS_INT_VARS)
05771         if (spec[0]->isIntArray() &&
05772             isVarArgs<Gecode::BoolVar>(vm, spec[1]) &&
05773             isEnum_IntRelType(spec[2]) &&
05774             spec[3]->isInt() &&
05775             isEnum_IntConLevel(spec[4]) &&
05776             isEnum_PropKind(spec[5]))
05777         {
05778           Gecode::Reflection::IntArrayArg& a0 = *spec[0]->toIntArray();
05779           Gecode::IntArgs x0(a0.size());
05780           for (int i=a0.size(); i--;) x0[i] = a0[i];
05781           Gecode::Reflection::ArrayArg& a1 = *spec[1]->toArray();
05782           Gecode::VarArgArray<Gecode::BoolVar> x1(a1.size());
05783           for (int i=a1.size(); i--;)
05784             x1[i] = Gecode::BoolVar(vm.var(a1[i]->toVar()));
05785           Gecode::IntRelType x2 = toEnum_IntRelType(spec[2]);
05786           int x3 = static_cast<int>(spec[3]->toInt());
05787           Gecode::IntConLevel x4 = toEnum_IntConLevel(spec[4]);
05788           Gecode::PropKind x5 = toEnum_PropKind(spec[5]);
05789           Gecode::linear(home, x0,x1,x2,x3,x4,x5);
05790           return;
05791         }
05792 #endif
05793 #if defined(GECODE_HAS_INT_VARS)
05794         if (spec[0]->isIntArray() &&
05795             isVarArgs<Gecode::BoolVar>(vm, spec[1]) &&
05796             isEnum_IntRelType(spec[2]) &&
05797             spec[3]->isInt() &&
05798             isVar<Gecode::BoolVar>(vm, spec[4]) &&
05799             isEnum_IntConLevel(spec[5]))
05800         {
05801           Gecode::Reflection::IntArrayArg& a0 = *spec[0]->toIntArray();
05802           Gecode::IntArgs x0(a0.size());
05803           for (int i=a0.size(); i--;) x0[i] = a0[i];
05804           Gecode::Reflection::ArrayArg& a1 = *spec[1]->toArray();
05805           Gecode::VarArgArray<Gecode::BoolVar> x1(a1.size());
05806           for (int i=a1.size(); i--;)
05807             x1[i] = Gecode::BoolVar(vm.var(a1[i]->toVar()));
05808           Gecode::IntRelType x2 = toEnum_IntRelType(spec[2]);
05809           int x3 = static_cast<int>(spec[3]->toInt());
05810           Gecode::BoolVar x4(vm.var(spec[4]->toVar()));
05811           Gecode::IntConLevel x5 = toEnum_IntConLevel(spec[5]);
05812           Gecode::linear(home, x0,x1,x2,x3,x4,x5);
05813           return;
05814         }
05815 #endif
05816 #if defined(GECODE_HAS_INT_VARS)
05817         if (spec[0]->isIntArray() &&
05818             isVarArgs<Gecode::BoolVar>(vm, spec[1]) &&
05819             isEnum_IntRelType(spec[2]) &&
05820             isVar<Gecode::IntVar>(vm, spec[3]) &&
05821             isEnum_IntConLevel(spec[4]) &&
05822             isEnum_PropKind(spec[5]))
05823         {
05824           Gecode::Reflection::IntArrayArg& a0 = *spec[0]->toIntArray();
05825           Gecode::IntArgs x0(a0.size());
05826           for (int i=a0.size(); i--;) x0[i] = a0[i];
05827           Gecode::Reflection::ArrayArg& a1 = *spec[1]->toArray();
05828           Gecode::VarArgArray<Gecode::BoolVar> x1(a1.size());
05829           for (int i=a1.size(); i--;)
05830             x1[i] = Gecode::BoolVar(vm.var(a1[i]->toVar()));
05831           Gecode::IntRelType x2 = toEnum_IntRelType(spec[2]);
05832           Gecode::IntVar x3(vm.var(spec[3]->toVar()));
05833           Gecode::IntConLevel x4 = toEnum_IntConLevel(spec[4]);
05834           Gecode::PropKind x5 = toEnum_PropKind(spec[5]);
05835           Gecode::linear(home, x0,x1,x2,x3,x4,x5);
05836           return;
05837         }
05838 #endif
05839 #if defined(GECODE_HAS_INT_VARS)
05840         if (spec[0]->isIntArray() &&
05841             isVarArgs<Gecode::BoolVar>(vm, spec[1]) &&
05842             isEnum_IntRelType(spec[2]) &&
05843             isVar<Gecode::IntVar>(vm, spec[3]) &&
05844             isVar<Gecode::BoolVar>(vm, spec[4]) &&
05845             isEnum_IntConLevel(spec[5]))
05846         {
05847           Gecode::Reflection::IntArrayArg& a0 = *spec[0]->toIntArray();
05848           Gecode::IntArgs x0(a0.size());
05849           for (int i=a0.size(); i--;) x0[i] = a0[i];
05850           Gecode::Reflection::ArrayArg& a1 = *spec[1]->toArray();
05851           Gecode::VarArgArray<Gecode::BoolVar> x1(a1.size());
05852           for (int i=a1.size(); i--;)
05853             x1[i] = Gecode::BoolVar(vm.var(a1[i]->toVar()));
05854           Gecode::IntRelType x2 = toEnum_IntRelType(spec[2]);
05855           Gecode::IntVar x3(vm.var(spec[3]->toVar()));
05856           Gecode::BoolVar x4(vm.var(spec[4]->toVar()));
05857           Gecode::IntConLevel x5 = toEnum_IntConLevel(spec[5]);
05858           Gecode::linear(home, x0,x1,x2,x3,x4,x5);
05859           return;
05860         }
05861 #endif
05862         throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::linear");
05863       }
05864       break;
05865     case 7:
05866       {
05867 #if defined(GECODE_HAS_INT_VARS)
05868         if (spec[0]->isIntArray() &&
05869             isVarArgs<Gecode::IntVar>(vm, spec[1]) &&
05870             isEnum_IntRelType(spec[2]) &&
05871             spec[3]->isInt() &&
05872             isVar<Gecode::BoolVar>(vm, spec[4]) &&
05873             isEnum_IntConLevel(spec[5]) &&
05874             isEnum_PropKind(spec[6]))
05875         {
05876           Gecode::Reflection::IntArrayArg& a0 = *spec[0]->toIntArray();
05877           Gecode::IntArgs x0(a0.size());
05878           for (int i=a0.size(); i--;) x0[i] = a0[i];
05879           Gecode::Reflection::ArrayArg& a1 = *spec[1]->toArray();
05880           Gecode::VarArgArray<Gecode::IntVar> x1(a1.size());
05881           for (int i=a1.size(); i--;)
05882             x1[i] = Gecode::IntVar(vm.var(a1[i]->toVar()));
05883           Gecode::IntRelType x2 = toEnum_IntRelType(spec[2]);
05884           int x3 = static_cast<int>(spec[3]->toInt());
05885           Gecode::BoolVar x4(vm.var(spec[4]->toVar()));
05886           Gecode::IntConLevel x5 = toEnum_IntConLevel(spec[5]);
05887           Gecode::PropKind x6 = toEnum_PropKind(spec[6]);
05888           Gecode::linear(home, x0,x1,x2,x3,x4,x5,x6);
05889           return;
05890         }
05891 #endif
05892 #if defined(GECODE_HAS_INT_VARS)
05893         if (spec[0]->isIntArray() &&
05894             isVarArgs<Gecode::IntVar>(vm, spec[1]) &&
05895             isEnum_IntRelType(spec[2]) &&
05896             isVar<Gecode::IntVar>(vm, spec[3]) &&
05897             isVar<Gecode::BoolVar>(vm, spec[4]) &&
05898             isEnum_IntConLevel(spec[5]) &&
05899             isEnum_PropKind(spec[6]))
05900         {
05901           Gecode::Reflection::IntArrayArg& a0 = *spec[0]->toIntArray();
05902           Gecode::IntArgs x0(a0.size());
05903           for (int i=a0.size(); i--;) x0[i] = a0[i];
05904           Gecode::Reflection::ArrayArg& a1 = *spec[1]->toArray();
05905           Gecode::VarArgArray<Gecode::IntVar> x1(a1.size());
05906           for (int i=a1.size(); i--;)
05907             x1[i] = Gecode::IntVar(vm.var(a1[i]->toVar()));
05908           Gecode::IntRelType x2 = toEnum_IntRelType(spec[2]);
05909           Gecode::IntVar x3(vm.var(spec[3]->toVar()));
05910           Gecode::BoolVar x4(vm.var(spec[4]->toVar()));
05911           Gecode::IntConLevel x5 = toEnum_IntConLevel(spec[5]);
05912           Gecode::PropKind x6 = toEnum_PropKind(spec[6]);
05913           Gecode::linear(home, x0,x1,x2,x3,x4,x5,x6);
05914           return;
05915         }
05916 #endif
05917 #if defined(GECODE_HAS_INT_VARS)
05918         if (spec[0]->isIntArray() &&
05919             isVarArgs<Gecode::BoolVar>(vm, spec[1]) &&
05920             isEnum_IntRelType(spec[2]) &&
05921             spec[3]->isInt() &&
05922             isVar<Gecode::BoolVar>(vm, spec[4]) &&
05923             isEnum_IntConLevel(spec[5]) &&
05924             isEnum_PropKind(spec[6]))
05925         {
05926           Gecode::Reflection::IntArrayArg& a0 = *spec[0]->toIntArray();
05927           Gecode::IntArgs x0(a0.size());
05928           for (int i=a0.size(); i--;) x0[i] = a0[i];
05929           Gecode::Reflection::ArrayArg& a1 = *spec[1]->toArray();
05930           Gecode::VarArgArray<Gecode::BoolVar> x1(a1.size());
05931           for (int i=a1.size(); i--;)
05932             x1[i] = Gecode::BoolVar(vm.var(a1[i]->toVar()));
05933           Gecode::IntRelType x2 = toEnum_IntRelType(spec[2]);
05934           int x3 = static_cast<int>(spec[3]->toInt());
05935           Gecode::BoolVar x4(vm.var(spec[4]->toVar()));
05936           Gecode::IntConLevel x5 = toEnum_IntConLevel(spec[5]);
05937           Gecode::PropKind x6 = toEnum_PropKind(spec[6]);
05938           Gecode::linear(home, x0,x1,x2,x3,x4,x5,x6);
05939           return;
05940         }
05941 #endif
05942 #if defined(GECODE_HAS_INT_VARS)
05943         if (spec[0]->isIntArray() &&
05944             isVarArgs<Gecode::BoolVar>(vm, spec[1]) &&
05945             isEnum_IntRelType(spec[2]) &&
05946             isVar<Gecode::IntVar>(vm, spec[3]) &&
05947             isVar<Gecode::BoolVar>(vm, spec[4]) &&
05948             isEnum_IntConLevel(spec[5]) &&
05949             isEnum_PropKind(spec[6]))
05950         {
05951           Gecode::Reflection::IntArrayArg& a0 = *spec[0]->toIntArray();
05952           Gecode::IntArgs x0(a0.size());
05953           for (int i=a0.size(); i--;) x0[i] = a0[i];
05954           Gecode::Reflection::ArrayArg& a1 = *spec[1]->toArray();
05955           Gecode::VarArgArray<Gecode::BoolVar> x1(a1.size());
05956           for (int i=a1.size(); i--;)
05957             x1[i] = Gecode::BoolVar(vm.var(a1[i]->toVar()));
05958           Gecode::IntRelType x2 = toEnum_IntRelType(spec[2]);
05959           Gecode::IntVar x3(vm.var(spec[3]->toVar()));
05960           Gecode::BoolVar x4(vm.var(spec[4]->toVar()));
05961           Gecode::IntConLevel x5 = toEnum_IntConLevel(spec[5]);
05962           Gecode::PropKind x6 = toEnum_PropKind(spec[6]);
05963           Gecode::linear(home, x0,x1,x2,x3,x4,x5,x6);
05964           return;
05965         }
05966 #endif
05967         throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::linear");
05968       }
05969       break;
05970     default: throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::linear");
05971     }
05972   }
05973 };
05974 
05975 class Register_cumulatives {
05976 public:
05978   static Gecode::Support::Symbol ati(void) {
05979     return "Gecode::Post::cumulatives";
05980   }
05981   
05983   static void post(Gecode::Space* home, Gecode::Reflection::VarMap& vm,
05984                    const Gecode::Reflection::ActorSpec& spec) {
05985     switch(spec.noOfArgs()) {
05986     case 7:
05987       {
05988 #if defined(GECODE_HAS_INT_VARS)
05989         if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
05990             isVarArgs<Gecode::IntVar>(vm, spec[1]) &&
05991             isVarArgs<Gecode::IntVar>(vm, spec[2]) &&
05992             isVarArgs<Gecode::IntVar>(vm, spec[3]) &&
05993             isVarArgs<Gecode::IntVar>(vm, spec[4]) &&
05994             spec[5]->isIntArray() &&
05995             spec[6]->isInt())
05996         {
05997           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
05998           Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
05999           for (int i=a0.size(); i--;)
06000             x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
06001           Gecode::Reflection::ArrayArg& a1 = *spec[1]->toArray();
06002           Gecode::VarArgArray<Gecode::IntVar> x1(a1.size());
06003           for (int i=a1.size(); i--;)
06004             x1[i] = Gecode::IntVar(vm.var(a1[i]->toVar()));
06005           Gecode::Reflection::ArrayArg& a2 = *spec[2]->toArray();
06006           Gecode::VarArgArray<Gecode::IntVar> x2(a2.size());
06007           for (int i=a2.size(); i--;)
06008             x2[i] = Gecode::IntVar(vm.var(a2[i]->toVar()));
06009           Gecode::Reflection::ArrayArg& a3 = *spec[3]->toArray();
06010           Gecode::VarArgArray<Gecode::IntVar> x3(a3.size());
06011           for (int i=a3.size(); i--;)
06012             x3[i] = Gecode::IntVar(vm.var(a3[i]->toVar()));
06013           Gecode::Reflection::ArrayArg& a4 = *spec[4]->toArray();
06014           Gecode::VarArgArray<Gecode::IntVar> x4(a4.size());
06015           for (int i=a4.size(); i--;)
06016             x4[i] = Gecode::IntVar(vm.var(a4[i]->toVar()));
06017           Gecode::Reflection::IntArrayArg& a5 = *spec[5]->toIntArray();
06018           Gecode::IntArgs x5(a5.size());
06019           for (int i=a5.size(); i--;) x5[i] = a5[i];
06020           bool x6 = static_cast<bool>(spec[6]->toInt());
06021           Gecode::cumulatives(home, x0,x1,x2,x3,x4,x5,x6);
06022           return;
06023         }
06024 #endif
06025 #if defined(GECODE_HAS_INT_VARS)
06026         if (spec[0]->isIntArray() &&
06027             isVarArgs<Gecode::IntVar>(vm, spec[1]) &&
06028             isVarArgs<Gecode::IntVar>(vm, spec[2]) &&
06029             isVarArgs<Gecode::IntVar>(vm, spec[3]) &&
06030             isVarArgs<Gecode::IntVar>(vm, spec[4]) &&
06031             spec[5]->isIntArray() &&
06032             spec[6]->isInt())
06033         {
06034           Gecode::Reflection::IntArrayArg& a0 = *spec[0]->toIntArray();
06035           Gecode::IntArgs x0(a0.size());
06036           for (int i=a0.size(); i--;) x0[i] = a0[i];
06037           Gecode::Reflection::ArrayArg& a1 = *spec[1]->toArray();
06038           Gecode::VarArgArray<Gecode::IntVar> x1(a1.size());
06039           for (int i=a1.size(); i--;)
06040             x1[i] = Gecode::IntVar(vm.var(a1[i]->toVar()));
06041           Gecode::Reflection::ArrayArg& a2 = *spec[2]->toArray();
06042           Gecode::VarArgArray<Gecode::IntVar> x2(a2.size());
06043           for (int i=a2.size(); i--;)
06044             x2[i] = Gecode::IntVar(vm.var(a2[i]->toVar()));
06045           Gecode::Reflection::ArrayArg& a3 = *spec[3]->toArray();
06046           Gecode::VarArgArray<Gecode::IntVar> x3(a3.size());
06047           for (int i=a3.size(); i--;)
06048             x3[i] = Gecode::IntVar(vm.var(a3[i]->toVar()));
06049           Gecode::Reflection::ArrayArg& a4 = *spec[4]->toArray();
06050           Gecode::VarArgArray<Gecode::IntVar> x4(a4.size());
06051           for (int i=a4.size(); i--;)
06052             x4[i] = Gecode::IntVar(vm.var(a4[i]->toVar()));
06053           Gecode::Reflection::IntArrayArg& a5 = *spec[5]->toIntArray();
06054           Gecode::IntArgs x5(a5.size());
06055           for (int i=a5.size(); i--;) x5[i] = a5[i];
06056           bool x6 = static_cast<bool>(spec[6]->toInt());
06057           Gecode::cumulatives(home, x0,x1,x2,x3,x4,x5,x6);
06058           return;
06059         }
06060 #endif
06061 #if defined(GECODE_HAS_INT_VARS)
06062         if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
06063             isVarArgs<Gecode::IntVar>(vm, spec[1]) &&
06064             spec[2]->isIntArray() &&
06065             isVarArgs<Gecode::IntVar>(vm, spec[3]) &&
06066             isVarArgs<Gecode::IntVar>(vm, spec[4]) &&
06067             spec[5]->isIntArray() &&
06068             spec[6]->isInt())
06069         {
06070           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
06071           Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
06072           for (int i=a0.size(); i--;)
06073             x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
06074           Gecode::Reflection::ArrayArg& a1 = *spec[1]->toArray();
06075           Gecode::VarArgArray<Gecode::IntVar> x1(a1.size());
06076           for (int i=a1.size(); i--;)
06077             x1[i] = Gecode::IntVar(vm.var(a1[i]->toVar()));
06078           Gecode::Reflection::IntArrayArg& a2 = *spec[2]->toIntArray();
06079           Gecode::IntArgs x2(a2.size());
06080           for (int i=a2.size(); i--;) x2[i] = a2[i];
06081           Gecode::Reflection::ArrayArg& a3 = *spec[3]->toArray();
06082           Gecode::VarArgArray<Gecode::IntVar> x3(a3.size());
06083           for (int i=a3.size(); i--;)
06084             x3[i] = Gecode::IntVar(vm.var(a3[i]->toVar()));
06085           Gecode::Reflection::ArrayArg& a4 = *spec[4]->toArray();
06086           Gecode::VarArgArray<Gecode::IntVar> x4(a4.size());
06087           for (int i=a4.size(); i--;)
06088             x4[i] = Gecode::IntVar(vm.var(a4[i]->toVar()));
06089           Gecode::Reflection::IntArrayArg& a5 = *spec[5]->toIntArray();
06090           Gecode::IntArgs x5(a5.size());
06091           for (int i=a5.size(); i--;) x5[i] = a5[i];
06092           bool x6 = static_cast<bool>(spec[6]->toInt());
06093           Gecode::cumulatives(home, x0,x1,x2,x3,x4,x5,x6);
06094           return;
06095         }
06096 #endif
06097 #if defined(GECODE_HAS_INT_VARS)
06098         if (spec[0]->isIntArray() &&
06099             isVarArgs<Gecode::IntVar>(vm, spec[1]) &&
06100             spec[2]->isIntArray() &&
06101             isVarArgs<Gecode::IntVar>(vm, spec[3]) &&
06102             isVarArgs<Gecode::IntVar>(vm, spec[4]) &&
06103             spec[5]->isIntArray() &&
06104             spec[6]->isInt())
06105         {
06106           Gecode::Reflection::IntArrayArg& a0 = *spec[0]->toIntArray();
06107           Gecode::IntArgs x0(a0.size());
06108           for (int i=a0.size(); i--;) x0[i] = a0[i];
06109           Gecode::Reflection::ArrayArg& a1 = *spec[1]->toArray();
06110           Gecode::VarArgArray<Gecode::IntVar> x1(a1.size());
06111           for (int i=a1.size(); i--;)
06112             x1[i] = Gecode::IntVar(vm.var(a1[i]->toVar()));
06113           Gecode::Reflection::IntArrayArg& a2 = *spec[2]->toIntArray();
06114           Gecode::IntArgs x2(a2.size());
06115           for (int i=a2.size(); i--;) x2[i] = a2[i];
06116           Gecode::Reflection::ArrayArg& a3 = *spec[3]->toArray();
06117           Gecode::VarArgArray<Gecode::IntVar> x3(a3.size());
06118           for (int i=a3.size(); i--;)
06119             x3[i] = Gecode::IntVar(vm.var(a3[i]->toVar()));
06120           Gecode::Reflection::ArrayArg& a4 = *spec[4]->toArray();
06121           Gecode::VarArgArray<Gecode::IntVar> x4(a4.size());
06122           for (int i=a4.size(); i--;)
06123             x4[i] = Gecode::IntVar(vm.var(a4[i]->toVar()));
06124           Gecode::Reflection::IntArrayArg& a5 = *spec[5]->toIntArray();
06125           Gecode::IntArgs x5(a5.size());
06126           for (int i=a5.size(); i--;) x5[i] = a5[i];
06127           bool x6 = static_cast<bool>(spec[6]->toInt());
06128           Gecode::cumulatives(home, x0,x1,x2,x3,x4,x5,x6);
06129           return;
06130         }
06131 #endif
06132 #if defined(GECODE_HAS_INT_VARS)
06133         if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
06134             isVarArgs<Gecode::IntVar>(vm, spec[1]) &&
06135             isVarArgs<Gecode::IntVar>(vm, spec[2]) &&
06136             isVarArgs<Gecode::IntVar>(vm, spec[3]) &&
06137             spec[4]->isIntArray() &&
06138             spec[5]->isIntArray() &&
06139             spec[6]->isInt())
06140         {
06141           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
06142           Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
06143           for (int i=a0.size(); i--;)
06144             x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
06145           Gecode::Reflection::ArrayArg& a1 = *spec[1]->toArray();
06146           Gecode::VarArgArray<Gecode::IntVar> x1(a1.size());
06147           for (int i=a1.size(); i--;)
06148             x1[i] = Gecode::IntVar(vm.var(a1[i]->toVar()));
06149           Gecode::Reflection::ArrayArg& a2 = *spec[2]->toArray();
06150           Gecode::VarArgArray<Gecode::IntVar> x2(a2.size());
06151           for (int i=a2.size(); i--;)
06152             x2[i] = Gecode::IntVar(vm.var(a2[i]->toVar()));
06153           Gecode::Reflection::ArrayArg& a3 = *spec[3]->toArray();
06154           Gecode::VarArgArray<Gecode::IntVar> x3(a3.size());
06155           for (int i=a3.size(); i--;)
06156             x3[i] = Gecode::IntVar(vm.var(a3[i]->toVar()));
06157           Gecode::Reflection::IntArrayArg& a4 = *spec[4]->toIntArray();
06158           Gecode::IntArgs x4(a4.size());
06159           for (int i=a4.size(); i--;) x4[i] = a4[i];
06160           Gecode::Reflection::IntArrayArg& a5 = *spec[5]->toIntArray();
06161           Gecode::IntArgs x5(a5.size());
06162           for (int i=a5.size(); i--;) x5[i] = a5[i];
06163           bool x6 = static_cast<bool>(spec[6]->toInt());
06164           Gecode::cumulatives(home, x0,x1,x2,x3,x4,x5,x6);
06165           return;
06166         }
06167 #endif
06168 #if defined(GECODE_HAS_INT_VARS)
06169         if (spec[0]->isIntArray() &&
06170             isVarArgs<Gecode::IntVar>(vm, spec[1]) &&
06171             isVarArgs<Gecode::IntVar>(vm, spec[2]) &&
06172             isVarArgs<Gecode::IntVar>(vm, spec[3]) &&
06173             spec[4]->isIntArray() &&
06174             spec[5]->isIntArray() &&
06175             spec[6]->isInt())
06176         {
06177           Gecode::Reflection::IntArrayArg& a0 = *spec[0]->toIntArray();
06178           Gecode::IntArgs x0(a0.size());
06179           for (int i=a0.size(); i--;) x0[i] = a0[i];
06180           Gecode::Reflection::ArrayArg& a1 = *spec[1]->toArray();
06181           Gecode::VarArgArray<Gecode::IntVar> x1(a1.size());
06182           for (int i=a1.size(); i--;)
06183             x1[i] = Gecode::IntVar(vm.var(a1[i]->toVar()));
06184           Gecode::Reflection::ArrayArg& a2 = *spec[2]->toArray();
06185           Gecode::VarArgArray<Gecode::IntVar> x2(a2.size());
06186           for (int i=a2.size(); i--;)
06187             x2[i] = Gecode::IntVar(vm.var(a2[i]->toVar()));
06188           Gecode::Reflection::ArrayArg& a3 = *spec[3]->toArray();
06189           Gecode::VarArgArray<Gecode::IntVar> x3(a3.size());
06190           for (int i=a3.size(); i--;)
06191             x3[i] = Gecode::IntVar(vm.var(a3[i]->toVar()));
06192           Gecode::Reflection::IntArrayArg& a4 = *spec[4]->toIntArray();
06193           Gecode::IntArgs x4(a4.size());
06194           for (int i=a4.size(); i--;) x4[i] = a4[i];
06195           Gecode::Reflection::IntArrayArg& a5 = *spec[5]->toIntArray();
06196           Gecode::IntArgs x5(a5.size());
06197           for (int i=a5.size(); i--;) x5[i] = a5[i];
06198           bool x6 = static_cast<bool>(spec[6]->toInt());
06199           Gecode::cumulatives(home, x0,x1,x2,x3,x4,x5,x6);
06200           return;
06201         }
06202 #endif
06203 #if defined(GECODE_HAS_INT_VARS)
06204         if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
06205             isVarArgs<Gecode::IntVar>(vm, spec[1]) &&
06206             spec[2]->isIntArray() &&
06207             isVarArgs<Gecode::IntVar>(vm, spec[3]) &&
06208             spec[4]->isIntArray() &&
06209             spec[5]->isIntArray() &&
06210             spec[6]->isInt())
06211         {
06212           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
06213           Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
06214           for (int i=a0.size(); i--;)
06215             x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
06216           Gecode::Reflection::ArrayArg& a1 = *spec[1]->toArray();
06217           Gecode::VarArgArray<Gecode::IntVar> x1(a1.size());
06218           for (int i=a1.size(); i--;)
06219             x1[i] = Gecode::IntVar(vm.var(a1[i]->toVar()));
06220           Gecode::Reflection::IntArrayArg& a2 = *spec[2]->toIntArray();
06221           Gecode::IntArgs x2(a2.size());
06222           for (int i=a2.size(); i--;) x2[i] = a2[i];
06223           Gecode::Reflection::ArrayArg& a3 = *spec[3]->toArray();
06224           Gecode::VarArgArray<Gecode::IntVar> x3(a3.size());
06225           for (int i=a3.size(); i--;)
06226             x3[i] = Gecode::IntVar(vm.var(a3[i]->toVar()));
06227           Gecode::Reflection::IntArrayArg& a4 = *spec[4]->toIntArray();
06228           Gecode::IntArgs x4(a4.size());
06229           for (int i=a4.size(); i--;) x4[i] = a4[i];
06230           Gecode::Reflection::IntArrayArg& a5 = *spec[5]->toIntArray();
06231           Gecode::IntArgs x5(a5.size());
06232           for (int i=a5.size(); i--;) x5[i] = a5[i];
06233           bool x6 = static_cast<bool>(spec[6]->toInt());
06234           Gecode::cumulatives(home, x0,x1,x2,x3,x4,x5,x6);
06235           return;
06236         }
06237 #endif
06238 #if defined(GECODE_HAS_INT_VARS)
06239         if (spec[0]->isIntArray() &&
06240             isVarArgs<Gecode::IntVar>(vm, spec[1]) &&
06241             spec[2]->isIntArray() &&
06242             isVarArgs<Gecode::IntVar>(vm, spec[3]) &&
06243             spec[4]->isIntArray() &&
06244             spec[5]->isIntArray() &&
06245             spec[6]->isInt())
06246         {
06247           Gecode::Reflection::IntArrayArg& a0 = *spec[0]->toIntArray();
06248           Gecode::IntArgs x0(a0.size());
06249           for (int i=a0.size(); i--;) x0[i] = a0[i];
06250           Gecode::Reflection::ArrayArg& a1 = *spec[1]->toArray();
06251           Gecode::VarArgArray<Gecode::IntVar> x1(a1.size());
06252           for (int i=a1.size(); i--;)
06253             x1[i] = Gecode::IntVar(vm.var(a1[i]->toVar()));
06254           Gecode::Reflection::IntArrayArg& a2 = *spec[2]->toIntArray();
06255           Gecode::IntArgs x2(a2.size());
06256           for (int i=a2.size(); i--;) x2[i] = a2[i];
06257           Gecode::Reflection::ArrayArg& a3 = *spec[3]->toArray();
06258           Gecode::VarArgArray<Gecode::IntVar> x3(a3.size());
06259           for (int i=a3.size(); i--;)
06260             x3[i] = Gecode::IntVar(vm.var(a3[i]->toVar()));
06261           Gecode::Reflection::IntArrayArg& a4 = *spec[4]->toIntArray();
06262           Gecode::IntArgs x4(a4.size());
06263           for (int i=a4.size(); i--;) x4[i] = a4[i];
06264           Gecode::Reflection::IntArrayArg& a5 = *spec[5]->toIntArray();
06265           Gecode::IntArgs x5(a5.size());
06266           for (int i=a5.size(); i--;) x5[i] = a5[i];
06267           bool x6 = static_cast<bool>(spec[6]->toInt());
06268           Gecode::cumulatives(home, x0,x1,x2,x3,x4,x5,x6);
06269           return;
06270         }
06271 #endif
06272         throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::cumulatives");
06273       }
06274       break;
06275     case 8:
06276       {
06277 #if defined(GECODE_HAS_INT_VARS)
06278         if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
06279             isVarArgs<Gecode::IntVar>(vm, spec[1]) &&
06280             isVarArgs<Gecode::IntVar>(vm, spec[2]) &&
06281             isVarArgs<Gecode::IntVar>(vm, spec[3]) &&
06282             isVarArgs<Gecode::IntVar>(vm, spec[4]) &&
06283             spec[5]->isIntArray() &&
06284             spec[6]->isInt() &&
06285             isEnum_IntConLevel(spec[7]))
06286         {
06287           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
06288           Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
06289           for (int i=a0.size(); i--;)
06290             x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
06291           Gecode::Reflection::ArrayArg& a1 = *spec[1]->toArray();
06292           Gecode::VarArgArray<Gecode::IntVar> x1(a1.size());
06293           for (int i=a1.size(); i--;)
06294             x1[i] = Gecode::IntVar(vm.var(a1[i]->toVar()));
06295           Gecode::Reflection::ArrayArg& a2 = *spec[2]->toArray();
06296           Gecode::VarArgArray<Gecode::IntVar> x2(a2.size());
06297           for (int i=a2.size(); i--;)
06298             x2[i] = Gecode::IntVar(vm.var(a2[i]->toVar()));
06299           Gecode::Reflection::ArrayArg& a3 = *spec[3]->toArray();
06300           Gecode::VarArgArray<Gecode::IntVar> x3(a3.size());
06301           for (int i=a3.size(); i--;)
06302             x3[i] = Gecode::IntVar(vm.var(a3[i]->toVar()));
06303           Gecode::Reflection::ArrayArg& a4 = *spec[4]->toArray();
06304           Gecode::VarArgArray<Gecode::IntVar> x4(a4.size());
06305           for (int i=a4.size(); i--;)
06306             x4[i] = Gecode::IntVar(vm.var(a4[i]->toVar()));
06307           Gecode::Reflection::IntArrayArg& a5 = *spec[5]->toIntArray();
06308           Gecode::IntArgs x5(a5.size());
06309           for (int i=a5.size(); i--;) x5[i] = a5[i];
06310           bool x6 = static_cast<bool>(spec[6]->toInt());
06311           Gecode::IntConLevel x7 = toEnum_IntConLevel(spec[7]);
06312           Gecode::cumulatives(home, x0,x1,x2,x3,x4,x5,x6,x7);
06313           return;
06314         }
06315 #endif
06316 #if defined(GECODE_HAS_INT_VARS)
06317         if (spec[0]->isIntArray() &&
06318             isVarArgs<Gecode::IntVar>(vm, spec[1]) &&
06319             isVarArgs<Gecode::IntVar>(vm, spec[2]) &&
06320             isVarArgs<Gecode::IntVar>(vm, spec[3]) &&
06321             isVarArgs<Gecode::IntVar>(vm, spec[4]) &&
06322             spec[5]->isIntArray() &&
06323             spec[6]->isInt() &&
06324             isEnum_IntConLevel(spec[7]))
06325         {
06326           Gecode::Reflection::IntArrayArg& a0 = *spec[0]->toIntArray();
06327           Gecode::IntArgs x0(a0.size());
06328           for (int i=a0.size(); i--;) x0[i] = a0[i];
06329           Gecode::Reflection::ArrayArg& a1 = *spec[1]->toArray();
06330           Gecode::VarArgArray<Gecode::IntVar> x1(a1.size());
06331           for (int i=a1.size(); i--;)
06332             x1[i] = Gecode::IntVar(vm.var(a1[i]->toVar()));
06333           Gecode::Reflection::ArrayArg& a2 = *spec[2]->toArray();
06334           Gecode::VarArgArray<Gecode::IntVar> x2(a2.size());
06335           for (int i=a2.size(); i--;)
06336             x2[i] = Gecode::IntVar(vm.var(a2[i]->toVar()));
06337           Gecode::Reflection::ArrayArg& a3 = *spec[3]->toArray();
06338           Gecode::VarArgArray<Gecode::IntVar> x3(a3.size());
06339           for (int i=a3.size(); i--;)
06340             x3[i] = Gecode::IntVar(vm.var(a3[i]->toVar()));
06341           Gecode::Reflection::ArrayArg& a4 = *spec[4]->toArray();
06342           Gecode::VarArgArray<Gecode::IntVar> x4(a4.size());
06343           for (int i=a4.size(); i--;)
06344             x4[i] = Gecode::IntVar(vm.var(a4[i]->toVar()));
06345           Gecode::Reflection::IntArrayArg& a5 = *spec[5]->toIntArray();
06346           Gecode::IntArgs x5(a5.size());
06347           for (int i=a5.size(); i--;) x5[i] = a5[i];
06348           bool x6 = static_cast<bool>(spec[6]->toInt());
06349           Gecode::IntConLevel x7 = toEnum_IntConLevel(spec[7]);
06350           Gecode::cumulatives(home, x0,x1,x2,x3,x4,x5,x6,x7);
06351           return;
06352         }
06353 #endif
06354 #if defined(GECODE_HAS_INT_VARS)
06355         if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
06356             isVarArgs<Gecode::IntVar>(vm, spec[1]) &&
06357             spec[2]->isIntArray() &&
06358             isVarArgs<Gecode::IntVar>(vm, spec[3]) &&
06359             isVarArgs<Gecode::IntVar>(vm, spec[4]) &&
06360             spec[5]->isIntArray() &&
06361             spec[6]->isInt() &&
06362             isEnum_IntConLevel(spec[7]))
06363         {
06364           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
06365           Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
06366           for (int i=a0.size(); i--;)
06367             x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
06368           Gecode::Reflection::ArrayArg& a1 = *spec[1]->toArray();
06369           Gecode::VarArgArray<Gecode::IntVar> x1(a1.size());
06370           for (int i=a1.size(); i--;)
06371             x1[i] = Gecode::IntVar(vm.var(a1[i]->toVar()));
06372           Gecode::Reflection::IntArrayArg& a2 = *spec[2]->toIntArray();
06373           Gecode::IntArgs x2(a2.size());
06374           for (int i=a2.size(); i--;) x2[i] = a2[i];
06375           Gecode::Reflection::ArrayArg& a3 = *spec[3]->toArray();
06376           Gecode::VarArgArray<Gecode::IntVar> x3(a3.size());
06377           for (int i=a3.size(); i--;)
06378             x3[i] = Gecode::IntVar(vm.var(a3[i]->toVar()));
06379           Gecode::Reflection::ArrayArg& a4 = *spec[4]->toArray();
06380           Gecode::VarArgArray<Gecode::IntVar> x4(a4.size());
06381           for (int i=a4.size(); i--;)
06382             x4[i] = Gecode::IntVar(vm.var(a4[i]->toVar()));
06383           Gecode::Reflection::IntArrayArg& a5 = *spec[5]->toIntArray();
06384           Gecode::IntArgs x5(a5.size());
06385           for (int i=a5.size(); i--;) x5[i] = a5[i];
06386           bool x6 = static_cast<bool>(spec[6]->toInt());
06387           Gecode::IntConLevel x7 = toEnum_IntConLevel(spec[7]);
06388           Gecode::cumulatives(home, x0,x1,x2,x3,x4,x5,x6,x7);
06389           return;
06390         }
06391 #endif
06392 #if defined(GECODE_HAS_INT_VARS)
06393         if (spec[0]->isIntArray() &&
06394             isVarArgs<Gecode::IntVar>(vm, spec[1]) &&
06395             spec[2]->isIntArray() &&
06396             isVarArgs<Gecode::IntVar>(vm, spec[3]) &&
06397             isVarArgs<Gecode::IntVar>(vm, spec[4]) &&
06398             spec[5]->isIntArray() &&
06399             spec[6]->isInt() &&
06400             isEnum_IntConLevel(spec[7]))
06401         {
06402           Gecode::Reflection::IntArrayArg& a0 = *spec[0]->toIntArray();
06403           Gecode::IntArgs x0(a0.size());
06404           for (int i=a0.size(); i--;) x0[i] = a0[i];
06405           Gecode::Reflection::ArrayArg& a1 = *spec[1]->toArray();
06406           Gecode::VarArgArray<Gecode::IntVar> x1(a1.size());
06407           for (int i=a1.size(); i--;)
06408             x1[i] = Gecode::IntVar(vm.var(a1[i]->toVar()));
06409           Gecode::Reflection::IntArrayArg& a2 = *spec[2]->toIntArray();
06410           Gecode::IntArgs x2(a2.size());
06411           for (int i=a2.size(); i--;) x2[i] = a2[i];
06412           Gecode::Reflection::ArrayArg& a3 = *spec[3]->toArray();
06413           Gecode::VarArgArray<Gecode::IntVar> x3(a3.size());
06414           for (int i=a3.size(); i--;)
06415             x3[i] = Gecode::IntVar(vm.var(a3[i]->toVar()));
06416           Gecode::Reflection::ArrayArg& a4 = *spec[4]->toArray();
06417           Gecode::VarArgArray<Gecode::IntVar> x4(a4.size());
06418           for (int i=a4.size(); i--;)
06419             x4[i] = Gecode::IntVar(vm.var(a4[i]->toVar()));
06420           Gecode::Reflection::IntArrayArg& a5 = *spec[5]->toIntArray();
06421           Gecode::IntArgs x5(a5.size());
06422           for (int i=a5.size(); i--;) x5[i] = a5[i];
06423           bool x6 = static_cast<bool>(spec[6]->toInt());
06424           Gecode::IntConLevel x7 = toEnum_IntConLevel(spec[7]);
06425           Gecode::cumulatives(home, x0,x1,x2,x3,x4,x5,x6,x7);
06426           return;
06427         }
06428 #endif
06429 #if defined(GECODE_HAS_INT_VARS)
06430         if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
06431             isVarArgs<Gecode::IntVar>(vm, spec[1]) &&
06432             isVarArgs<Gecode::IntVar>(vm, spec[2]) &&
06433             isVarArgs<Gecode::IntVar>(vm, spec[3]) &&
06434             spec[4]->isIntArray() &&
06435             spec[5]->isIntArray() &&
06436             spec[6]->isInt() &&
06437             isEnum_IntConLevel(spec[7]))
06438         {
06439           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
06440           Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
06441           for (int i=a0.size(); i--;)
06442             x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
06443           Gecode::Reflection::ArrayArg& a1 = *spec[1]->toArray();
06444           Gecode::VarArgArray<Gecode::IntVar> x1(a1.size());
06445           for (int i=a1.size(); i--;)
06446             x1[i] = Gecode::IntVar(vm.var(a1[i]->toVar()));
06447           Gecode::Reflection::ArrayArg& a2 = *spec[2]->toArray();
06448           Gecode::VarArgArray<Gecode::IntVar> x2(a2.size());
06449           for (int i=a2.size(); i--;)
06450             x2[i] = Gecode::IntVar(vm.var(a2[i]->toVar()));
06451           Gecode::Reflection::ArrayArg& a3 = *spec[3]->toArray();
06452           Gecode::VarArgArray<Gecode::IntVar> x3(a3.size());
06453           for (int i=a3.size(); i--;)
06454             x3[i] = Gecode::IntVar(vm.var(a3[i]->toVar()));
06455           Gecode::Reflection::IntArrayArg& a4 = *spec[4]->toIntArray();
06456           Gecode::IntArgs x4(a4.size());
06457           for (int i=a4.size(); i--;) x4[i] = a4[i];
06458           Gecode::Reflection::IntArrayArg& a5 = *spec[5]->toIntArray();
06459           Gecode::IntArgs x5(a5.size());
06460           for (int i=a5.size(); i--;) x5[i] = a5[i];
06461           bool x6 = static_cast<bool>(spec[6]->toInt());
06462           Gecode::IntConLevel x7 = toEnum_IntConLevel(spec[7]);
06463           Gecode::cumulatives(home, x0,x1,x2,x3,x4,x5,x6,x7);
06464           return;
06465         }
06466 #endif
06467 #if defined(GECODE_HAS_INT_VARS)
06468         if (spec[0]->isIntArray() &&
06469             isVarArgs<Gecode::IntVar>(vm, spec[1]) &&
06470             isVarArgs<Gecode::IntVar>(vm, spec[2]) &&
06471             isVarArgs<Gecode::IntVar>(vm, spec[3]) &&
06472             spec[4]->isIntArray() &&
06473             spec[5]->isIntArray() &&
06474             spec[6]->isInt() &&
06475             isEnum_IntConLevel(spec[7]))
06476         {
06477           Gecode::Reflection::IntArrayArg& a0 = *spec[0]->toIntArray();
06478           Gecode::IntArgs x0(a0.size());
06479           for (int i=a0.size(); i--;) x0[i] = a0[i];
06480           Gecode::Reflection::ArrayArg& a1 = *spec[1]->toArray();
06481           Gecode::VarArgArray<Gecode::IntVar> x1(a1.size());
06482           for (int i=a1.size(); i--;)
06483             x1[i] = Gecode::IntVar(vm.var(a1[i]->toVar()));
06484           Gecode::Reflection::ArrayArg& a2 = *spec[2]->toArray();
06485           Gecode::VarArgArray<Gecode::IntVar> x2(a2.size());
06486           for (int i=a2.size(); i--;)
06487             x2[i] = Gecode::IntVar(vm.var(a2[i]->toVar()));
06488           Gecode::Reflection::ArrayArg& a3 = *spec[3]->toArray();
06489           Gecode::VarArgArray<Gecode::IntVar> x3(a3.size());
06490           for (int i=a3.size(); i--;)
06491             x3[i] = Gecode::IntVar(vm.var(a3[i]->toVar()));
06492           Gecode::Reflection::IntArrayArg& a4 = *spec[4]->toIntArray();
06493           Gecode::IntArgs x4(a4.size());
06494           for (int i=a4.size(); i--;) x4[i] = a4[i];
06495           Gecode::Reflection::IntArrayArg& a5 = *spec[5]->toIntArray();
06496           Gecode::IntArgs x5(a5.size());
06497           for (int i=a5.size(); i--;) x5[i] = a5[i];
06498           bool x6 = static_cast<bool>(spec[6]->toInt());
06499           Gecode::IntConLevel x7 = toEnum_IntConLevel(spec[7]);
06500           Gecode::cumulatives(home, x0,x1,x2,x3,x4,x5,x6,x7);
06501           return;
06502         }
06503 #endif
06504 #if defined(GECODE_HAS_INT_VARS)
06505         if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
06506             isVarArgs<Gecode::IntVar>(vm, spec[1]) &&
06507             spec[2]->isIntArray() &&
06508             isVarArgs<Gecode::IntVar>(vm, spec[3]) &&
06509             spec[4]->isIntArray() &&
06510             spec[5]->isIntArray() &&
06511             spec[6]->isInt() &&
06512             isEnum_IntConLevel(spec[7]))
06513         {
06514           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
06515           Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
06516           for (int i=a0.size(); i--;)
06517             x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
06518           Gecode::Reflection::ArrayArg& a1 = *spec[1]->toArray();
06519           Gecode::VarArgArray<Gecode::IntVar> x1(a1.size());
06520           for (int i=a1.size(); i--;)
06521             x1[i] = Gecode::IntVar(vm.var(a1[i]->toVar()));
06522           Gecode::Reflection::IntArrayArg& a2 = *spec[2]->toIntArray();
06523           Gecode::IntArgs x2(a2.size());
06524           for (int i=a2.size(); i--;) x2[i] = a2[i];
06525           Gecode::Reflection::ArrayArg& a3 = *spec[3]->toArray();
06526           Gecode::VarArgArray<Gecode::IntVar> x3(a3.size());
06527           for (int i=a3.size(); i--;)
06528             x3[i] = Gecode::IntVar(vm.var(a3[i]->toVar()));
06529           Gecode::Reflection::IntArrayArg& a4 = *spec[4]->toIntArray();
06530           Gecode::IntArgs x4(a4.size());
06531           for (int i=a4.size(); i--;) x4[i] = a4[i];
06532           Gecode::Reflection::IntArrayArg& a5 = *spec[5]->toIntArray();
06533           Gecode::IntArgs x5(a5.size());
06534           for (int i=a5.size(); i--;) x5[i] = a5[i];
06535           bool x6 = static_cast<bool>(spec[6]->toInt());
06536           Gecode::IntConLevel x7 = toEnum_IntConLevel(spec[7]);
06537           Gecode::cumulatives(home, x0,x1,x2,x3,x4,x5,x6,x7);
06538           return;
06539         }
06540 #endif
06541 #if defined(GECODE_HAS_INT_VARS)
06542         if (spec[0]->isIntArray() &&
06543             isVarArgs<Gecode::IntVar>(vm, spec[1]) &&
06544             spec[2]->isIntArray() &&
06545             isVarArgs<Gecode::IntVar>(vm, spec[3]) &&
06546             spec[4]->isIntArray() &&
06547             spec[5]->isIntArray() &&
06548             spec[6]->isInt() &&
06549             isEnum_IntConLevel(spec[7]))
06550         {
06551           Gecode::Reflection::IntArrayArg& a0 = *spec[0]->toIntArray();
06552           Gecode::IntArgs x0(a0.size());
06553           for (int i=a0.size(); i--;) x0[i] = a0[i];
06554           Gecode::Reflection::ArrayArg& a1 = *spec[1]->toArray();
06555           Gecode::VarArgArray<Gecode::IntVar> x1(a1.size());
06556           for (int i=a1.size(); i--;)
06557             x1[i] = Gecode::IntVar(vm.var(a1[i]->toVar()));
06558           Gecode::Reflection::IntArrayArg& a2 = *spec[2]->toIntArray();
06559           Gecode::IntArgs x2(a2.size());
06560           for (int i=a2.size(); i--;) x2[i] = a2[i];
06561           Gecode::Reflection::ArrayArg& a3 = *spec[3]->toArray();
06562           Gecode::VarArgArray<Gecode::IntVar> x3(a3.size());
06563           for (int i=a3.size(); i--;)
06564             x3[i] = Gecode::IntVar(vm.var(a3[i]->toVar()));
06565           Gecode::Reflection::IntArrayArg& a4 = *spec[4]->toIntArray();
06566           Gecode::IntArgs x4(a4.size());
06567           for (int i=a4.size(); i--;) x4[i] = a4[i];
06568           Gecode::Reflection::IntArrayArg& a5 = *spec[5]->toIntArray();
06569           Gecode::IntArgs x5(a5.size());
06570           for (int i=a5.size(); i--;) x5[i] = a5[i];
06571           bool x6 = static_cast<bool>(spec[6]->toInt());
06572           Gecode::IntConLevel x7 = toEnum_IntConLevel(spec[7]);
06573           Gecode::cumulatives(home, x0,x1,x2,x3,x4,x5,x6,x7);
06574           return;
06575         }
06576 #endif
06577         throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::cumulatives");
06578       }
06579       break;
06580     case 9:
06581       {
06582 #if defined(GECODE_HAS_INT_VARS)
06583         if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
06584             isVarArgs<Gecode::IntVar>(vm, spec[1]) &&
06585             isVarArgs<Gecode::IntVar>(vm, spec[2]) &&
06586             isVarArgs<Gecode::IntVar>(vm, spec[3]) &&
06587             isVarArgs<Gecode::IntVar>(vm, spec[4]) &&
06588             spec[5]->isIntArray() &&
06589             spec[6]->isInt() &&
06590             isEnum_IntConLevel(spec[7]) &&
06591             isEnum_PropKind(spec[8]))
06592         {
06593           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
06594           Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
06595           for (int i=a0.size(); i--;)
06596             x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
06597           Gecode::Reflection::ArrayArg& a1 = *spec[1]->toArray();
06598           Gecode::VarArgArray<Gecode::IntVar> x1(a1.size());
06599           for (int i=a1.size(); i--;)
06600             x1[i] = Gecode::IntVar(vm.var(a1[i]->toVar()));
06601           Gecode::Reflection::ArrayArg& a2 = *spec[2]->toArray();
06602           Gecode::VarArgArray<Gecode::IntVar> x2(a2.size());
06603           for (int i=a2.size(); i--;)
06604             x2[i] = Gecode::IntVar(vm.var(a2[i]->toVar()));
06605           Gecode::Reflection::ArrayArg& a3 = *spec[3]->toArray();
06606           Gecode::VarArgArray<Gecode::IntVar> x3(a3.size());
06607           for (int i=a3.size(); i--;)
06608             x3[i] = Gecode::IntVar(vm.var(a3[i]->toVar()));
06609           Gecode::Reflection::ArrayArg& a4 = *spec[4]->toArray();
06610           Gecode::VarArgArray<Gecode::IntVar> x4(a4.size());
06611           for (int i=a4.size(); i--;)
06612             x4[i] = Gecode::IntVar(vm.var(a4[i]->toVar()));
06613           Gecode::Reflection::IntArrayArg& a5 = *spec[5]->toIntArray();
06614           Gecode::IntArgs x5(a5.size());
06615           for (int i=a5.size(); i--;) x5[i] = a5[i];
06616           bool x6 = static_cast<bool>(spec[6]->toInt());
06617           Gecode::IntConLevel x7 = toEnum_IntConLevel(spec[7]);
06618           Gecode::PropKind x8 = toEnum_PropKind(spec[8]);
06619           Gecode::cumulatives(home, x0,x1,x2,x3,x4,x5,x6,x7,x8);
06620           return;
06621         }
06622 #endif
06623 #if defined(GECODE_HAS_INT_VARS)
06624         if (spec[0]->isIntArray() &&
06625             isVarArgs<Gecode::IntVar>(vm, spec[1]) &&
06626             isVarArgs<Gecode::IntVar>(vm, spec[2]) &&
06627             isVarArgs<Gecode::IntVar>(vm, spec[3]) &&
06628             isVarArgs<Gecode::IntVar>(vm, spec[4]) &&
06629             spec[5]->isIntArray() &&
06630             spec[6]->isInt() &&
06631             isEnum_IntConLevel(spec[7]) &&
06632             isEnum_PropKind(spec[8]))
06633         {
06634           Gecode::Reflection::IntArrayArg& a0 = *spec[0]->toIntArray();
06635           Gecode::IntArgs x0(a0.size());
06636           for (int i=a0.size(); i--;) x0[i] = a0[i];
06637           Gecode::Reflection::ArrayArg& a1 = *spec[1]->toArray();
06638           Gecode::VarArgArray<Gecode::IntVar> x1(a1.size());
06639           for (int i=a1.size(); i--;)
06640             x1[i] = Gecode::IntVar(vm.var(a1[i]->toVar()));
06641           Gecode::Reflection::ArrayArg& a2 = *spec[2]->toArray();
06642           Gecode::VarArgArray<Gecode::IntVar> x2(a2.size());
06643           for (int i=a2.size(); i--;)
06644             x2[i] = Gecode::IntVar(vm.var(a2[i]->toVar()));
06645           Gecode::Reflection::ArrayArg& a3 = *spec[3]->toArray();
06646           Gecode::VarArgArray<Gecode::IntVar> x3(a3.size());
06647           for (int i=a3.size(); i--;)
06648             x3[i] = Gecode::IntVar(vm.var(a3[i]->toVar()));
06649           Gecode::Reflection::ArrayArg& a4 = *spec[4]->toArray();
06650           Gecode::VarArgArray<Gecode::IntVar> x4(a4.size());
06651           for (int i=a4.size(); i--;)
06652             x4[i] = Gecode::IntVar(vm.var(a4[i]->toVar()));
06653           Gecode::Reflection::IntArrayArg& a5 = *spec[5]->toIntArray();
06654           Gecode::IntArgs x5(a5.size());
06655           for (int i=a5.size(); i--;) x5[i] = a5[i];
06656           bool x6 = static_cast<bool>(spec[6]->toInt());
06657           Gecode::IntConLevel x7 = toEnum_IntConLevel(spec[7]);
06658           Gecode::PropKind x8 = toEnum_PropKind(spec[8]);
06659           Gecode::cumulatives(home, x0,x1,x2,x3,x4,x5,x6,x7,x8);
06660           return;
06661         }
06662 #endif
06663 #if defined(GECODE_HAS_INT_VARS)
06664         if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
06665             isVarArgs<Gecode::IntVar>(vm, spec[1]) &&
06666             spec[2]->isIntArray() &&
06667             isVarArgs<Gecode::IntVar>(vm, spec[3]) &&
06668             isVarArgs<Gecode::IntVar>(vm, spec[4]) &&
06669             spec[5]->isIntArray() &&
06670             spec[6]->isInt() &&
06671             isEnum_IntConLevel(spec[7]) &&
06672             isEnum_PropKind(spec[8]))
06673         {
06674           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
06675           Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
06676           for (int i=a0.size(); i--;)
06677             x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
06678           Gecode::Reflection::ArrayArg& a1 = *spec[1]->toArray();
06679           Gecode::VarArgArray<Gecode::IntVar> x1(a1.size());
06680           for (int i=a1.size(); i--;)
06681             x1[i] = Gecode::IntVar(vm.var(a1[i]->toVar()));
06682           Gecode::Reflection::IntArrayArg& a2 = *spec[2]->toIntArray();
06683           Gecode::IntArgs x2(a2.size());
06684           for (int i=a2.size(); i--;) x2[i] = a2[i];
06685           Gecode::Reflection::ArrayArg& a3 = *spec[3]->toArray();
06686           Gecode::VarArgArray<Gecode::IntVar> x3(a3.size());
06687           for (int i=a3.size(); i--;)
06688             x3[i] = Gecode::IntVar(vm.var(a3[i]->toVar()));
06689           Gecode::Reflection::ArrayArg& a4 = *spec[4]->toArray();
06690           Gecode::VarArgArray<Gecode::IntVar> x4(a4.size());
06691           for (int i=a4.size(); i--;)
06692             x4[i] = Gecode::IntVar(vm.var(a4[i]->toVar()));
06693           Gecode::Reflection::IntArrayArg& a5 = *spec[5]->toIntArray();
06694           Gecode::IntArgs x5(a5.size());
06695           for (int i=a5.size(); i--;) x5[i] = a5[i];
06696           bool x6 = static_cast<bool>(spec[6]->toInt());
06697           Gecode::IntConLevel x7 = toEnum_IntConLevel(spec[7]);
06698           Gecode::PropKind x8 = toEnum_PropKind(spec[8]);
06699           Gecode::cumulatives(home, x0,x1,x2,x3,x4,x5,x6,x7,x8);
06700           return;
06701         }
06702 #endif
06703 #if defined(GECODE_HAS_INT_VARS)
06704         if (spec[0]->isIntArray() &&
06705             isVarArgs<Gecode::IntVar>(vm, spec[1]) &&
06706             spec[2]->isIntArray() &&
06707             isVarArgs<Gecode::IntVar>(vm, spec[3]) &&
06708             isVarArgs<Gecode::IntVar>(vm, spec[4]) &&
06709             spec[5]->isIntArray() &&
06710             spec[6]->isInt() &&
06711             isEnum_IntConLevel(spec[7]) &&
06712             isEnum_PropKind(spec[8]))
06713         {
06714           Gecode::Reflection::IntArrayArg& a0 = *spec[0]->toIntArray();
06715           Gecode::IntArgs x0(a0.size());
06716           for (int i=a0.size(); i--;) x0[i] = a0[i];
06717           Gecode::Reflection::ArrayArg& a1 = *spec[1]->toArray();
06718           Gecode::VarArgArray<Gecode::IntVar> x1(a1.size());
06719           for (int i=a1.size(); i--;)
06720             x1[i] = Gecode::IntVar(vm.var(a1[i]->toVar()));
06721           Gecode::Reflection::IntArrayArg& a2 = *spec[2]->toIntArray();
06722           Gecode::IntArgs x2(a2.size());
06723           for (int i=a2.size(); i--;) x2[i] = a2[i];
06724           Gecode::Reflection::ArrayArg& a3 = *spec[3]->toArray();
06725           Gecode::VarArgArray<Gecode::IntVar> x3(a3.size());
06726           for (int i=a3.size(); i--;)
06727             x3[i] = Gecode::IntVar(vm.var(a3[i]->toVar()));
06728           Gecode::Reflection::ArrayArg& a4 = *spec[4]->toArray();
06729           Gecode::VarArgArray<Gecode::IntVar> x4(a4.size());
06730           for (int i=a4.size(); i--;)
06731             x4[i] = Gecode::IntVar(vm.var(a4[i]->toVar()));
06732           Gecode::Reflection::IntArrayArg& a5 = *spec[5]->toIntArray();
06733           Gecode::IntArgs x5(a5.size());
06734           for (int i=a5.size(); i--;) x5[i] = a5[i];
06735           bool x6 = static_cast<bool>(spec[6]->toInt());
06736           Gecode::IntConLevel x7 = toEnum_IntConLevel(spec[7]);
06737           Gecode::PropKind x8 = toEnum_PropKind(spec[8]);
06738           Gecode::cumulatives(home, x0,x1,x2,x3,x4,x5,x6,x7,x8);
06739           return;
06740         }
06741 #endif
06742 #if defined(GECODE_HAS_INT_VARS)
06743         if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
06744             isVarArgs<Gecode::IntVar>(vm, spec[1]) &&
06745             isVarArgs<Gecode::IntVar>(vm, spec[2]) &&
06746             isVarArgs<Gecode::IntVar>(vm, spec[3]) &&
06747             spec[4]->isIntArray() &&
06748             spec[5]->isIntArray() &&
06749             spec[6]->isInt() &&
06750             isEnum_IntConLevel(spec[7]) &&
06751             isEnum_PropKind(spec[8]))
06752         {
06753           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
06754           Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
06755           for (int i=a0.size(); i--;)
06756             x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
06757           Gecode::Reflection::ArrayArg& a1 = *spec[1]->toArray();
06758           Gecode::VarArgArray<Gecode::IntVar> x1(a1.size());
06759           for (int i=a1.size(); i--;)
06760             x1[i] = Gecode::IntVar(vm.var(a1[i]->toVar()));
06761           Gecode::Reflection::ArrayArg& a2 = *spec[2]->toArray();
06762           Gecode::VarArgArray<Gecode::IntVar> x2(a2.size());
06763           for (int i=a2.size(); i--;)
06764             x2[i] = Gecode::IntVar(vm.var(a2[i]->toVar()));
06765           Gecode::Reflection::ArrayArg& a3 = *spec[3]->toArray();
06766           Gecode::VarArgArray<Gecode::IntVar> x3(a3.size());
06767           for (int i=a3.size(); i--;)
06768             x3[i] = Gecode::IntVar(vm.var(a3[i]->toVar()));
06769           Gecode::Reflection::IntArrayArg& a4 = *spec[4]->toIntArray();
06770           Gecode::IntArgs x4(a4.size());
06771           for (int i=a4.size(); i--;) x4[i] = a4[i];
06772           Gecode::Reflection::IntArrayArg& a5 = *spec[5]->toIntArray();
06773           Gecode::IntArgs x5(a5.size());
06774           for (int i=a5.size(); i--;) x5[i] = a5[i];
06775           bool x6 = static_cast<bool>(spec[6]->toInt());
06776           Gecode::IntConLevel x7 = toEnum_IntConLevel(spec[7]);
06777           Gecode::PropKind x8 = toEnum_PropKind(spec[8]);
06778           Gecode::cumulatives(home, x0,x1,x2,x3,x4,x5,x6,x7,x8);
06779           return;
06780         }
06781 #endif
06782 #if defined(GECODE_HAS_INT_VARS)
06783         if (spec[0]->isIntArray() &&
06784             isVarArgs<Gecode::IntVar>(vm, spec[1]) &&
06785             isVarArgs<Gecode::IntVar>(vm, spec[2]) &&
06786             isVarArgs<Gecode::IntVar>(vm, spec[3]) &&
06787             spec[4]->isIntArray() &&
06788             spec[5]->isIntArray() &&
06789             spec[6]->isInt() &&
06790             isEnum_IntConLevel(spec[7]) &&
06791             isEnum_PropKind(spec[8]))
06792         {
06793           Gecode::Reflection::IntArrayArg& a0 = *spec[0]->toIntArray();
06794           Gecode::IntArgs x0(a0.size());
06795           for (int i=a0.size(); i--;) x0[i] = a0[i];
06796           Gecode::Reflection::ArrayArg& a1 = *spec[1]->toArray();
06797           Gecode::VarArgArray<Gecode::IntVar> x1(a1.size());
06798           for (int i=a1.size(); i--;)
06799             x1[i] = Gecode::IntVar(vm.var(a1[i]->toVar()));
06800           Gecode::Reflection::ArrayArg& a2 = *spec[2]->toArray();
06801           Gecode::VarArgArray<Gecode::IntVar> x2(a2.size());
06802           for (int i=a2.size(); i--;)
06803             x2[i] = Gecode::IntVar(vm.var(a2[i]->toVar()));
06804           Gecode::Reflection::ArrayArg& a3 = *spec[3]->toArray();
06805           Gecode::VarArgArray<Gecode::IntVar> x3(a3.size());
06806           for (int i=a3.size(); i--;)
06807             x3[i] = Gecode::IntVar(vm.var(a3[i]->toVar()));
06808           Gecode::Reflection::IntArrayArg& a4 = *spec[4]->toIntArray();
06809           Gecode::IntArgs x4(a4.size());
06810           for (int i=a4.size(); i--;) x4[i] = a4[i];
06811           Gecode::Reflection::IntArrayArg& a5 = *spec[5]->toIntArray();
06812           Gecode::IntArgs x5(a5.size());
06813           for (int i=a5.size(); i--;) x5[i] = a5[i];
06814           bool x6 = static_cast<bool>(spec[6]->toInt());
06815           Gecode::IntConLevel x7 = toEnum_IntConLevel(spec[7]);
06816           Gecode::PropKind x8 = toEnum_PropKind(spec[8]);
06817           Gecode::cumulatives(home, x0,x1,x2,x3,x4,x5,x6,x7,x8);
06818           return;
06819         }
06820 #endif
06821 #if defined(GECODE_HAS_INT_VARS)
06822         if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
06823             isVarArgs<Gecode::IntVar>(vm, spec[1]) &&
06824             spec[2]->isIntArray() &&
06825             isVarArgs<Gecode::IntVar>(vm, spec[3]) &&
06826             spec[4]->isIntArray() &&
06827             spec[5]->isIntArray() &&
06828             spec[6]->isInt() &&
06829             isEnum_IntConLevel(spec[7]) &&
06830             isEnum_PropKind(spec[8]))
06831         {
06832           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
06833           Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
06834           for (int i=a0.size(); i--;)
06835             x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
06836           Gecode::Reflection::ArrayArg& a1 = *spec[1]->toArray();
06837           Gecode::VarArgArray<Gecode::IntVar> x1(a1.size());
06838           for (int i=a1.size(); i--;)
06839             x1[i] = Gecode::IntVar(vm.var(a1[i]->toVar()));
06840           Gecode::Reflection::IntArrayArg& a2 = *spec[2]->toIntArray();
06841           Gecode::IntArgs x2(a2.size());
06842           for (int i=a2.size(); i--;) x2[i] = a2[i];
06843           Gecode::Reflection::ArrayArg& a3 = *spec[3]->toArray();
06844           Gecode::VarArgArray<Gecode::IntVar> x3(a3.size());
06845           for (int i=a3.size(); i--;)
06846             x3[i] = Gecode::IntVar(vm.var(a3[i]->toVar()));
06847           Gecode::Reflection::IntArrayArg& a4 = *spec[4]->toIntArray();
06848           Gecode::IntArgs x4(a4.size());
06849           for (int i=a4.size(); i--;) x4[i] = a4[i];
06850           Gecode::Reflection::IntArrayArg& a5 = *spec[5]->toIntArray();
06851           Gecode::IntArgs x5(a5.size());
06852           for (int i=a5.size(); i--;) x5[i] = a5[i];
06853           bool x6 = static_cast<bool>(spec[6]->toInt());
06854           Gecode::IntConLevel x7 = toEnum_IntConLevel(spec[7]);
06855           Gecode::PropKind x8 = toEnum_PropKind(spec[8]);
06856           Gecode::cumulatives(home, x0,x1,x2,x3,x4,x5,x6,x7,x8);
06857           return;
06858         }
06859 #endif
06860 #if defined(GECODE_HAS_INT_VARS)
06861         if (spec[0]->isIntArray() &&
06862             isVarArgs<Gecode::IntVar>(vm, spec[1]) &&
06863             spec[2]->isIntArray() &&
06864             isVarArgs<Gecode::IntVar>(vm, spec[3]) &&
06865             spec[4]->isIntArray() &&
06866             spec[5]->isIntArray() &&
06867             spec[6]->isInt() &&
06868             isEnum_IntConLevel(spec[7]) &&
06869             isEnum_PropKind(spec[8]))
06870         {
06871           Gecode::Reflection::IntArrayArg& a0 = *spec[0]->toIntArray();
06872           Gecode::IntArgs x0(a0.size());
06873           for (int i=a0.size(); i--;) x0[i] = a0[i];
06874           Gecode::Reflection::ArrayArg& a1 = *spec[1]->toArray();
06875           Gecode::VarArgArray<Gecode::IntVar> x1(a1.size());
06876           for (int i=a1.size(); i--;)
06877             x1[i] = Gecode::IntVar(vm.var(a1[i]->toVar()));
06878           Gecode::Reflection::IntArrayArg& a2 = *spec[2]->toIntArray();
06879           Gecode::IntArgs x2(a2.size());
06880           for (int i=a2.size(); i--;) x2[i] = a2[i];
06881           Gecode::Reflection::ArrayArg& a3 = *spec[3]->toArray();
06882           Gecode::VarArgArray<Gecode::IntVar> x3(a3.size());
06883           for (int i=a3.size(); i--;)
06884             x3[i] = Gecode::IntVar(vm.var(a3[i]->toVar()));
06885           Gecode::Reflection::IntArrayArg& a4 = *spec[4]->toIntArray();
06886           Gecode::IntArgs x4(a4.size());
06887           for (int i=a4.size(); i--;) x4[i] = a4[i];
06888           Gecode::Reflection::IntArrayArg& a5 = *spec[5]->toIntArray();
06889           Gecode::IntArgs x5(a5.size());
06890           for (int i=a5.size(); i--;) x5[i] = a5[i];
06891           bool x6 = static_cast<bool>(spec[6]->toInt());
06892           Gecode::IntConLevel x7 = toEnum_IntConLevel(spec[7]);
06893           Gecode::PropKind x8 = toEnum_PropKind(spec[8]);
06894           Gecode::cumulatives(home, x0,x1,x2,x3,x4,x5,x6,x7,x8);
06895           return;
06896         }
06897 #endif
06898         throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::cumulatives");
06899       }
06900       break;
06901     default: throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::cumulatives");
06902     }
06903   }
06904 };
06905 
06906 class Register_channel {
06907 public:
06909   static Gecode::Support::Symbol ati(void) {
06910     return "Gecode::Post::channel";
06911   }
06912   
06914   static void post(Gecode::Space* home, Gecode::Reflection::VarMap& vm,
06915                    const Gecode::Reflection::ActorSpec& spec) {
06916     switch(spec.noOfArgs()) {
06917     case 2:
06918       {
06919 #if defined(GECODE_HAS_INT_VARS)
06920         if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
06921             isVarArgs<Gecode::IntVar>(vm, spec[1]))
06922         {
06923           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
06924           Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
06925           for (int i=a0.size(); i--;)
06926             x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
06927           Gecode::Reflection::ArrayArg& a1 = *spec[1]->toArray();
06928           Gecode::VarArgArray<Gecode::IntVar> x1(a1.size());
06929           for (int i=a1.size(); i--;)
06930             x1[i] = Gecode::IntVar(vm.var(a1[i]->toVar()));
06931           Gecode::channel(home, x0,x1);
06932           return;
06933         }
06934 #endif
06935 #if defined(GECODE_HAS_INT_VARS)
06936         if (isVar<Gecode::BoolVar>(vm, spec[0]) &&
06937             isVar<Gecode::IntVar>(vm, spec[1]))
06938         {
06939           Gecode::BoolVar x0(vm.var(spec[0]->toVar()));
06940           Gecode::IntVar x1(vm.var(spec[1]->toVar()));
06941           Gecode::channel(home, x0,x1);
06942           return;
06943         }
06944 #endif
06945 #if defined(GECODE_HAS_INT_VARS)
06946         if (isVar<Gecode::IntVar>(vm, spec[0]) &&
06947             isVar<Gecode::BoolVar>(vm, spec[1]))
06948         {
06949           Gecode::IntVar x0(vm.var(spec[0]->toVar()));
06950           Gecode::BoolVar x1(vm.var(spec[1]->toVar()));
06951           Gecode::channel(home, x0,x1);
06952           return;
06953         }
06954 #endif
06955 #if defined(GECODE_HAS_INT_VARS)
06956         if (isVarArgs<Gecode::BoolVar>(vm, spec[0]) &&
06957             isVar<Gecode::IntVar>(vm, spec[1]))
06958         {
06959           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
06960           Gecode::VarArgArray<Gecode::BoolVar> x0(a0.size());
06961           for (int i=a0.size(); i--;)
06962             x0[i] = Gecode::BoolVar(vm.var(a0[i]->toVar()));
06963           Gecode::IntVar x1(vm.var(spec[1]->toVar()));
06964           Gecode::channel(home, x0,x1);
06965           return;
06966         }
06967 #endif
06968 #if defined(GECODE_HAS_SET_VARS)
06969         if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
06970             isVarArgs<Gecode::SetVar>(vm, spec[1]))
06971         {
06972           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
06973           Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
06974           for (int i=a0.size(); i--;)
06975             x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
06976           Gecode::Reflection::ArrayArg& a1 = *spec[1]->toArray();
06977           Gecode::VarArgArray<Gecode::SetVar> x1(a1.size());
06978           for (int i=a1.size(); i--;)
06979             x1[i] = Gecode::SetVar(vm.var(a1[i]->toVar()));
06980           Gecode::channel(home, x0,x1);
06981           return;
06982         }
06983 #endif
06984 #if defined(GECODE_HAS_SET_VARS)
06985         if (isVarArgs<Gecode::BoolVar>(vm, spec[0]) &&
06986             isVar<Gecode::SetVar>(vm, spec[1]))
06987         {
06988           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
06989           Gecode::VarArgArray<Gecode::BoolVar> x0(a0.size());
06990           for (int i=a0.size(); i--;)
06991             x0[i] = Gecode::BoolVar(vm.var(a0[i]->toVar()));
06992           Gecode::SetVar x1(vm.var(spec[1]->toVar()));
06993           Gecode::channel(home, x0,x1);
06994           return;
06995         }
06996 #endif
06997         throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::channel");
06998       }
06999       break;
07000     case 3:
07001       {
07002 #if defined(GECODE_HAS_INT_VARS)
07003         if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
07004             isVarArgs<Gecode::IntVar>(vm, spec[1]) &&
07005             isEnum_IntConLevel(spec[2]))
07006         {
07007           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
07008           Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
07009           for (int i=a0.size(); i--;)
07010             x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
07011           Gecode::Reflection::ArrayArg& a1 = *spec[1]->toArray();
07012           Gecode::VarArgArray<Gecode::IntVar> x1(a1.size());
07013           for (int i=a1.size(); i--;)
07014             x1[i] = Gecode::IntVar(vm.var(a1[i]->toVar()));
07015           Gecode::IntConLevel x2 = toEnum_IntConLevel(spec[2]);
07016           Gecode::channel(home, x0,x1,x2);
07017           return;
07018         }
07019 #endif
07020 #if defined(GECODE_HAS_INT_VARS)
07021         if (isVar<Gecode::BoolVar>(vm, spec[0]) &&
07022             isVar<Gecode::IntVar>(vm, spec[1]) &&
07023             isEnum_IntConLevel(spec[2]))
07024         {
07025           Gecode::BoolVar x0(vm.var(spec[0]->toVar()));
07026           Gecode::IntVar x1(vm.var(spec[1]->toVar()));
07027           Gecode::IntConLevel x2 = toEnum_IntConLevel(spec[2]);
07028           Gecode::channel(home, x0,x1,x2);
07029           return;
07030         }
07031 #endif
07032 #if defined(GECODE_HAS_INT_VARS)
07033         if (isVar<Gecode::IntVar>(vm, spec[0]) &&
07034             isVar<Gecode::BoolVar>(vm, spec[1]) &&
07035             isEnum_IntConLevel(spec[2]))
07036         {
07037           Gecode::IntVar x0(vm.var(spec[0]->toVar()));
07038           Gecode::BoolVar x1(vm.var(spec[1]->toVar()));
07039           Gecode::IntConLevel x2 = toEnum_IntConLevel(spec[2]);
07040           Gecode::channel(home, x0,x1,x2);
07041           return;
07042         }
07043 #endif
07044 #if defined(GECODE_HAS_INT_VARS)
07045         if (isVarArgs<Gecode::BoolVar>(vm, spec[0]) &&
07046             isVar<Gecode::IntVar>(vm, spec[1]) &&
07047             spec[2]->isInt())
07048         {
07049           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
07050           Gecode::VarArgArray<Gecode::BoolVar> x0(a0.size());
07051           for (int i=a0.size(); i--;)
07052             x0[i] = Gecode::BoolVar(vm.var(a0[i]->toVar()));
07053           Gecode::IntVar x1(vm.var(spec[1]->toVar()));
07054           int x2 = static_cast<int>(spec[2]->toInt());
07055           Gecode::channel(home, x0,x1,x2);
07056           return;
07057         }
07058 #endif
07059         throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::channel");
07060       }
07061       break;
07062     case 4:
07063       {
07064 #if defined(GECODE_HAS_INT_VARS)
07065         if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
07066             isVarArgs<Gecode::IntVar>(vm, spec[1]) &&
07067             isEnum_IntConLevel(spec[2]) &&
07068             isEnum_PropKind(spec[3]))
07069         {
07070           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
07071           Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
07072           for (int i=a0.size(); i--;)
07073             x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
07074           Gecode::Reflection::ArrayArg& a1 = *spec[1]->toArray();
07075           Gecode::VarArgArray<Gecode::IntVar> x1(a1.size());
07076           for (int i=a1.size(); i--;)
07077             x1[i] = Gecode::IntVar(vm.var(a1[i]->toVar()));
07078           Gecode::IntConLevel x2 = toEnum_IntConLevel(spec[2]);
07079           Gecode::PropKind x3 = toEnum_PropKind(spec[3]);
07080           Gecode::channel(home, x0,x1,x2,x3);
07081           return;
07082         }
07083 #endif
07084 #if defined(GECODE_HAS_INT_VARS)
07085         if (isVar<Gecode::BoolVar>(vm, spec[0]) &&
07086             isVar<Gecode::IntVar>(vm, spec[1]) &&
07087             isEnum_IntConLevel(spec[2]) &&
07088             isEnum_PropKind(spec[3]))
07089         {
07090           Gecode::BoolVar x0(vm.var(spec[0]->toVar()));
07091           Gecode::IntVar x1(vm.var(spec[1]->toVar()));
07092           Gecode::IntConLevel x2 = toEnum_IntConLevel(spec[2]);
07093           Gecode::PropKind x3 = toEnum_PropKind(spec[3]);
07094           Gecode::channel(home, x0,x1,x2,x3);
07095           return;
07096         }
07097 #endif
07098 #if defined(GECODE_HAS_INT_VARS)
07099         if (isVar<Gecode::IntVar>(vm, spec[0]) &&
07100             isVar<Gecode::BoolVar>(vm, spec[1]) &&
07101             isEnum_IntConLevel(spec[2]) &&
07102             isEnum_PropKind(spec[3]))
07103         {
07104           Gecode::IntVar x0(vm.var(spec[0]->toVar()));
07105           Gecode::BoolVar x1(vm.var(spec[1]->toVar()));
07106           Gecode::IntConLevel x2 = toEnum_IntConLevel(spec[2]);
07107           Gecode::PropKind x3 = toEnum_PropKind(spec[3]);
07108           Gecode::channel(home, x0,x1,x2,x3);
07109           return;
07110         }
07111 #endif
07112 #if defined(GECODE_HAS_INT_VARS)
07113         if (isVarArgs<Gecode::BoolVar>(vm, spec[0]) &&
07114             isVar<Gecode::IntVar>(vm, spec[1]) &&
07115             spec[2]->isInt() &&
07116             isEnum_IntConLevel(spec[3]))
07117         {
07118           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
07119           Gecode::VarArgArray<Gecode::BoolVar> x0(a0.size());
07120           for (int i=a0.size(); i--;)
07121             x0[i] = Gecode::BoolVar(vm.var(a0[i]->toVar()));
07122           Gecode::IntVar x1(vm.var(spec[1]->toVar()));
07123           int x2 = static_cast<int>(spec[2]->toInt());
07124           Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
07125           Gecode::channel(home, x0,x1,x2,x3);
07126           return;
07127         }
07128 #endif
07129         throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::channel");
07130       }
07131       break;
07132     case 5:
07133       {
07134 #if defined(GECODE_HAS_INT_VARS)
07135         if (isVarArgs<Gecode::BoolVar>(vm, spec[0]) &&
07136             isVar<Gecode::IntVar>(vm, spec[1]) &&
07137             spec[2]->isInt() &&
07138             isEnum_IntConLevel(spec[3]) &&
07139             isEnum_PropKind(spec[4]))
07140         {
07141           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
07142           Gecode::VarArgArray<Gecode::BoolVar> x0(a0.size());
07143           for (int i=a0.size(); i--;)
07144             x0[i] = Gecode::BoolVar(vm.var(a0[i]->toVar()));
07145           Gecode::IntVar x1(vm.var(spec[1]->toVar()));
07146           int x2 = static_cast<int>(spec[2]->toInt());
07147           Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
07148           Gecode::PropKind x4 = toEnum_PropKind(spec[4]);
07149           Gecode::channel(home, x0,x1,x2,x3,x4);
07150           return;
07151         }
07152 #endif
07153         throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::channel");
07154       }
07155       break;
07156     default: throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::channel");
07157     }
07158   }
07159 };
07160 
07161 class Register_cardinality {
07162 public:
07164   static Gecode::Support::Symbol ati(void) {
07165     return "Gecode::Post::cardinality";
07166   }
07167   
07169   static void post(Gecode::Space* home, Gecode::Reflection::VarMap& vm,
07170                    const Gecode::Reflection::ActorSpec& spec) {
07171     switch(spec.noOfArgs()) {
07172     case 2:
07173       {
07174 #if defined(GECODE_HAS_SET_VARS)
07175         if (isVar<Gecode::SetVar>(vm, spec[0]) &&
07176             isVar<Gecode::IntVar>(vm, spec[1]))
07177         {
07178           Gecode::SetVar x0(vm.var(spec[0]->toVar()));
07179           Gecode::IntVar x1(vm.var(spec[1]->toVar()));
07180           Gecode::cardinality(home, x0,x1);
07181           return;
07182         }
07183 #endif
07184         throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::cardinality");
07185       }
07186       break;
07187     case 3:
07188       {
07189 #if defined(GECODE_HAS_SET_VARS)
07190         if (isVar<Gecode::SetVar>(vm, spec[0]) &&
07191             spec[1]->isInt() &&
07192             spec[2]->isInt())
07193         {
07194           Gecode::SetVar x0(vm.var(spec[0]->toVar()));
07195           unsigned int x1 = static_cast<unsigned int>(spec[1]->toInt());
07196           unsigned int x2 = static_cast<unsigned int>(spec[2]->toInt());
07197           Gecode::cardinality(home, x0,x1,x2);
07198           return;
07199         }
07200 #endif
07201         throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::cardinality");
07202       }
07203       break;
07204     default: throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::cardinality");
07205     }
07206   }
07207 };
07208 
07209 class Register_selectSet {
07210 public:
07212   static Gecode::Support::Symbol ati(void) {
07213     return "Gecode::Post::selectSet";
07214   }
07215   
07217   static void post(Gecode::Space* home, Gecode::Reflection::VarMap& vm,
07218                    const Gecode::Reflection::ActorSpec& spec) {
07219     switch(spec.noOfArgs()) {
07220     case 3:
07221       {
07222 #if defined(GECODE_HAS_SET_VARS)
07223         if (isVarArgs<Gecode::SetVar>(vm, spec[0]) &&
07224             isVar<Gecode::IntVar>(vm, spec[1]) &&
07225             isVar<Gecode::SetVar>(vm, spec[2]))
07226         {
07227           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
07228           Gecode::VarArgArray<Gecode::SetVar> x0(a0.size());
07229           for (int i=a0.size(); i--;)
07230             x0[i] = Gecode::SetVar(vm.var(a0[i]->toVar()));
07231           Gecode::IntVar x1(vm.var(spec[1]->toVar()));
07232           Gecode::SetVar x2(vm.var(spec[2]->toVar()));
07233           Gecode::selectSet(home, x0,x1,x2);
07234           return;
07235         }
07236 #endif
07237 #if defined(GECODE_HAS_SET_VARS)
07238         if (isIntSetArgs(spec[0]) &&
07239             isVar<Gecode::IntVar>(vm, spec[1]) &&
07240             isVar<Gecode::SetVar>(vm, spec[2]))
07241         {
07242           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
07243           Gecode::IntSetArgs x0(a0.size());
07244           for (int i=a0.size(); i--;) {
07245             Gecode::Reflection::IntArrayArg* aa0 = a0[i]->toIntArray();
07246             Gecode::Reflection::IntArrayArgRanges aar0(aa0);
07247             x0[i] = Gecode::IntSet(aar0);
07248           }
07249           Gecode::IntVar x1(vm.var(spec[1]->toVar()));
07250           Gecode::SetVar x2(vm.var(spec[2]->toVar()));
07251           Gecode::selectSet(home, x0,x1,x2);
07252           return;
07253         }
07254 #endif
07255         throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::selectSet");
07256       }
07257       break;
07258     default: throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::selectSet");
07259     }
07260   }
07261 };
07262 
07263 class Register_min {
07264 public:
07266   static Gecode::Support::Symbol ati(void) {
07267     return "Gecode::Post::min";
07268   }
07269   
07271   static void post(Gecode::Space* home, Gecode::Reflection::VarMap& vm,
07272                    const Gecode::Reflection::ActorSpec& spec) {
07273     switch(spec.noOfArgs()) {
07274     case 2:
07275       {
07276 #if defined(GECODE_HAS_INT_VARS)
07277         if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
07278             isVar<Gecode::IntVar>(vm, spec[1]))
07279         {
07280           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
07281           Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
07282           for (int i=a0.size(); i--;)
07283             x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
07284           Gecode::IntVar x1(vm.var(spec[1]->toVar()));
07285           Gecode::min(home, x0,x1);
07286           return;
07287         }
07288 #endif
07289 #if defined(GECODE_HAS_SET_VARS)
07290         if (isVar<Gecode::SetVar>(vm, spec[0]) &&
07291             isVar<Gecode::IntVar>(vm, spec[1]))
07292         {
07293           Gecode::SetVar x0(vm.var(spec[0]->toVar()));
07294           Gecode::IntVar x1(vm.var(spec[1]->toVar()));
07295           Gecode::min(home, x0,x1);
07296           return;
07297         }
07298 #endif
07299         throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::min");
07300       }
07301       break;
07302     case 3:
07303       {
07304 #if defined(GECODE_HAS_INT_VARS)
07305         if (isVar<Gecode::IntVar>(vm, spec[0]) &&
07306             isVar<Gecode::IntVar>(vm, spec[1]) &&
07307             isVar<Gecode::IntVar>(vm, spec[2]))
07308         {
07309           Gecode::IntVar x0(vm.var(spec[0]->toVar()));
07310           Gecode::IntVar x1(vm.var(spec[1]->toVar()));
07311           Gecode::IntVar x2(vm.var(spec[2]->toVar()));
07312           Gecode::min(home, x0,x1,x2);
07313           return;
07314         }
07315 #endif
07316 #if defined(GECODE_HAS_INT_VARS)
07317         if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
07318             isVar<Gecode::IntVar>(vm, spec[1]) &&
07319             isEnum_IntConLevel(spec[2]))
07320         {
07321           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
07322           Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
07323           for (int i=a0.size(); i--;)
07324             x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
07325           Gecode::IntVar x1(vm.var(spec[1]->toVar()));
07326           Gecode::IntConLevel x2 = toEnum_IntConLevel(spec[2]);
07327           Gecode::min(home, x0,x1,x2);
07328           return;
07329         }
07330 #endif
07331         throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::min");
07332       }
07333       break;
07334     case 4:
07335       {
07336 #if defined(GECODE_HAS_INT_VARS)
07337         if (isVar<Gecode::IntVar>(vm, spec[0]) &&
07338             isVar<Gecode::IntVar>(vm, spec[1]) &&
07339             isVar<Gecode::IntVar>(vm, spec[2]) &&
07340             isEnum_IntConLevel(spec[3]))
07341         {
07342           Gecode::IntVar x0(vm.var(spec[0]->toVar()));
07343           Gecode::IntVar x1(vm.var(spec[1]->toVar()));
07344           Gecode::IntVar x2(vm.var(spec[2]->toVar()));
07345           Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
07346           Gecode::min(home, x0,x1,x2,x3);
07347           return;
07348         }
07349 #endif
07350 #if defined(GECODE_HAS_INT_VARS)
07351         if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
07352             isVar<Gecode::IntVar>(vm, spec[1]) &&
07353             isEnum_IntConLevel(spec[2]) &&
07354             isEnum_PropKind(spec[3]))
07355         {
07356           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
07357           Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
07358           for (int i=a0.size(); i--;)
07359             x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
07360           Gecode::IntVar x1(vm.var(spec[1]->toVar()));
07361           Gecode::IntConLevel x2 = toEnum_IntConLevel(spec[2]);
07362           Gecode::PropKind x3 = toEnum_PropKind(spec[3]);
07363           Gecode::min(home, x0,x1,x2,x3);
07364           return;
07365         }
07366 #endif
07367         throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::min");
07368       }
07369       break;
07370     case 5:
07371       {
07372 #if defined(GECODE_HAS_INT_VARS)
07373         if (isVar<Gecode::IntVar>(vm, spec[0]) &&
07374             isVar<Gecode::IntVar>(vm, spec[1]) &&
07375             isVar<Gecode::IntVar>(vm, spec[2]) &&
07376             isEnum_IntConLevel(spec[3]) &&
07377             isEnum_PropKind(spec[4]))
07378         {
07379           Gecode::IntVar x0(vm.var(spec[0]->toVar()));
07380           Gecode::IntVar x1(vm.var(spec[1]->toVar()));
07381           Gecode::IntVar x2(vm.var(spec[2]->toVar()));
07382           Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
07383           Gecode::PropKind x4 = toEnum_PropKind(spec[4]);
07384           Gecode::min(home, x0,x1,x2,x3,x4);
07385           return;
07386         }
07387 #endif
07388         throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::min");
07389       }
07390       break;
07391     default: throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::min");
07392     }
07393   }
07394 };
07395 
07396 class Register_sequentialUnion {
07397 public:
07399   static Gecode::Support::Symbol ati(void) {
07400     return "Gecode::Post::sequentialUnion";
07401   }
07402   
07404   static void post(Gecode::Space* home, Gecode::Reflection::VarMap& vm,
07405                    const Gecode::Reflection::ActorSpec& spec) {
07406     switch(spec.noOfArgs()) {
07407     case 2:
07408       {
07409 #if defined(GECODE_HAS_SET_VARS)
07410         if (isVarArgs<Gecode::SetVar>(vm, spec[0]) &&
07411             isVar<Gecode::SetVar>(vm, spec[1]))
07412         {
07413           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
07414           Gecode::VarArgArray<Gecode::SetVar> x0(a0.size());
07415           for (int i=a0.size(); i--;)
07416             x0[i] = Gecode::SetVar(vm.var(a0[i]->toVar()));
07417           Gecode::SetVar x1(vm.var(spec[1]->toVar()));
07418           Gecode::sequentialUnion(home, x0,x1);
07419           return;
07420         }
07421 #endif
07422         throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::sequentialUnion");
07423       }
07424       break;
07425     default: throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::sequentialUnion");
07426     }
07427   }
07428 };
07429 
07430 class Register_branch {
07431 public:
07433   static Gecode::Support::Symbol ati(void) {
07434     return "Gecode::Post::branch";
07435   }
07436   
07438   static void post(Gecode::Space* home, Gecode::Reflection::VarMap& vm,
07439                    const Gecode::Reflection::ActorSpec& spec) {
07440     switch(spec.noOfArgs()) {
07441     case 3:
07442       {
07443 #if defined(GECODE_HAS_INT_VARS)
07444         if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
07445             isEnum_IntVarBranch(spec[1]) &&
07446             isEnum_IntValBranch(spec[2]))
07447         {
07448           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
07449           Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
07450           for (int i=a0.size(); i--;)
07451             x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
07452           Gecode::IntVarBranch x1 = toEnum_IntVarBranch(spec[1]);
07453           Gecode::IntValBranch x2 = toEnum_IntValBranch(spec[2]);
07454           Gecode::branch(home, x0,x1,x2);
07455           return;
07456         }
07457 #endif
07458 #if defined(GECODE_HAS_INT_VARS)
07459         if (isVarArgs<Gecode::BoolVar>(vm, spec[0]) &&
07460             isEnum_IntVarBranch(spec[1]) &&
07461             isEnum_IntValBranch(spec[2]))
07462         {
07463           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
07464           Gecode::VarArgArray<Gecode::BoolVar> x0(a0.size());
07465           for (int i=a0.size(); i--;)
07466             x0[i] = Gecode::BoolVar(vm.var(a0[i]->toVar()));
07467           Gecode::IntVarBranch x1 = toEnum_IntVarBranch(spec[1]);
07468           Gecode::IntValBranch x2 = toEnum_IntValBranch(spec[2]);
07469           Gecode::branch(home, x0,x1,x2);
07470           return;
07471         }
07472 #endif
07473 #if defined(GECODE_HAS_SET_VARS)
07474         if (isVarArgs<Gecode::SetVar>(vm, spec[0]) &&
07475             isEnum_SetVarBranch(spec[1]) &&
07476             isEnum_SetValBranch(spec[2]))
07477         {
07478           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
07479           Gecode::VarArgArray<Gecode::SetVar> x0(a0.size());
07480           for (int i=a0.size(); i--;)
07481             x0[i] = Gecode::SetVar(vm.var(a0[i]->toVar()));
07482           Gecode::SetVarBranch x1 = toEnum_SetVarBranch(spec[1]);
07483           Gecode::SetValBranch x2 = toEnum_SetValBranch(spec[2]);
07484           Gecode::branch(home, x0,x1,x2);
07485           return;
07486         }
07487 #endif
07488         throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::branch");
07489       }
07490       break;
07491     default: throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::branch");
07492     }
07493   }
07494 };
07495 
07496 class Register_atleast {
07497 public:
07499   static Gecode::Support::Symbol ati(void) {
07500     return "Gecode::Post::atleast";
07501   }
07502   
07504   static void post(Gecode::Space* home, Gecode::Reflection::VarMap& vm,
07505                    const Gecode::Reflection::ActorSpec& spec) {
07506     switch(spec.noOfArgs()) {
07507     case 3:
07508       {
07509 #if defined(GECODE_HAS_INT_VARS)
07510         if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
07511             spec[1]->isInt() &&
07512             spec[2]->isInt())
07513         {
07514           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
07515           Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
07516           for (int i=a0.size(); i--;)
07517             x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
07518           int x1 = static_cast<int>(spec[1]->toInt());
07519           int x2 = static_cast<int>(spec[2]->toInt());
07520           Gecode::atleast(home, x0,x1,x2);
07521           return;
07522         }
07523 #endif
07524 #if defined(GECODE_HAS_INT_VARS)
07525         if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
07526             isVar<Gecode::IntVar>(vm, spec[1]) &&
07527             spec[2]->isInt())
07528         {
07529           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
07530           Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
07531           for (int i=a0.size(); i--;)
07532             x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
07533           Gecode::IntVar x1(vm.var(spec[1]->toVar()));
07534           int x2 = static_cast<int>(spec[2]->toInt());
07535           Gecode::atleast(home, x0,x1,x2);
07536           return;
07537         }
07538 #endif
07539 #if defined(GECODE_HAS_INT_VARS)
07540         if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
07541             spec[1]->isIntArray() &&
07542             spec[2]->isInt())
07543         {
07544           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
07545           Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
07546           for (int i=a0.size(); i--;)
07547             x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
07548           Gecode::Reflection::IntArrayArg& a1 = *spec[1]->toIntArray();
07549           Gecode::IntArgs x1(a1.size());
07550           for (int i=a1.size(); i--;) x1[i] = a1[i];
07551           int x2 = static_cast<int>(spec[2]->toInt());
07552           Gecode::atleast(home, x0,x1,x2);
07553           return;
07554         }
07555 #endif
07556 #if defined(GECODE_HAS_INT_VARS)
07557         if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
07558             spec[1]->isInt() &&
07559             isVar<Gecode::IntVar>(vm, spec[2]))
07560         {
07561           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
07562           Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
07563           for (int i=a0.size(); i--;)
07564             x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
07565           int x1 = static_cast<int>(spec[1]->toInt());
07566           Gecode::IntVar x2(vm.var(spec[2]->toVar()));
07567           Gecode::atleast(home, x0,x1,x2);
07568           return;
07569         }
07570 #endif
07571 #if defined(GECODE_HAS_INT_VARS)
07572         if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
07573             isVar<Gecode::IntVar>(vm, spec[1]) &&
07574             isVar<Gecode::IntVar>(vm, spec[2]))
07575         {
07576           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
07577           Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
07578           for (int i=a0.size(); i--;)
07579             x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
07580           Gecode::IntVar x1(vm.var(spec[1]->toVar()));
07581           Gecode::IntVar x2(vm.var(spec[2]->toVar()));
07582           Gecode::atleast(home, x0,x1,x2);
07583           return;
07584         }
07585 #endif
07586 #if defined(GECODE_HAS_INT_VARS)
07587         if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
07588             spec[1]->isIntArray() &&
07589             isVar<Gecode::IntVar>(vm, spec[2]))
07590         {
07591           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
07592           Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
07593           for (int i=a0.size(); i--;)
07594             x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
07595           Gecode::Reflection::IntArrayArg& a1 = *spec[1]->toIntArray();
07596           Gecode::IntArgs x1(a1.size());
07597           for (int i=a1.size(); i--;) x1[i] = a1[i];
07598           Gecode::IntVar x2(vm.var(spec[2]->toVar()));
07599           Gecode::atleast(home, x0,x1,x2);
07600           return;
07601         }
07602 #endif
07603         throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::atleast");
07604       }
07605       break;
07606     case 4:
07607       {
07608 #if defined(GECODE_HAS_INT_VARS)
07609         if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
07610             spec[1]->isInt() &&
07611             spec[2]->isInt() &&
07612             isEnum_IntConLevel(spec[3]))
07613         {
07614           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
07615           Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
07616           for (int i=a0.size(); i--;)
07617             x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
07618           int x1 = static_cast<int>(spec[1]->toInt());
07619           int x2 = static_cast<int>(spec[2]->toInt());
07620           Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
07621           Gecode::atleast(home, x0,x1,x2,x3);
07622           return;
07623         }
07624 #endif
07625 #if defined(GECODE_HAS_INT_VARS)
07626         if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
07627             isVar<Gecode::IntVar>(vm, spec[1]) &&
07628             spec[2]->isInt() &&
07629             isEnum_IntConLevel(spec[3]))
07630         {
07631           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
07632           Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
07633           for (int i=a0.size(); i--;)
07634             x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
07635           Gecode::IntVar x1(vm.var(spec[1]->toVar()));
07636           int x2 = static_cast<int>(spec[2]->toInt());
07637           Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
07638           Gecode::atleast(home, x0,x1,x2,x3);
07639           return;
07640         }
07641 #endif
07642 #if defined(GECODE_HAS_INT_VARS)
07643         if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
07644             spec[1]->isIntArray() &&
07645             spec[2]->isInt() &&
07646             isEnum_IntConLevel(spec[3]))
07647         {
07648           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
07649           Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
07650           for (int i=a0.size(); i--;)
07651             x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
07652           Gecode::Reflection::IntArrayArg& a1 = *spec[1]->toIntArray();
07653           Gecode::IntArgs x1(a1.size());
07654           for (int i=a1.size(); i--;) x1[i] = a1[i];
07655           int x2 = static_cast<int>(spec[2]->toInt());
07656           Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
07657           Gecode::atleast(home, x0,x1,x2,x3);
07658           return;
07659         }
07660 #endif
07661 #if defined(GECODE_HAS_INT_VARS)
07662         if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
07663             spec[1]->isInt() &&
07664             isVar<Gecode::IntVar>(vm, spec[2]) &&
07665             isEnum_IntConLevel(spec[3]))
07666         {
07667           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
07668           Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
07669           for (int i=a0.size(); i--;)
07670             x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
07671           int x1 = static_cast<int>(spec[1]->toInt());
07672           Gecode::IntVar x2(vm.var(spec[2]->toVar()));
07673           Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
07674           Gecode::atleast(home, x0,x1,x2,x3);
07675           return;
07676         }
07677 #endif
07678 #if defined(GECODE_HAS_INT_VARS)
07679         if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
07680             isVar<Gecode::IntVar>(vm, spec[1]) &&
07681             isVar<Gecode::IntVar>(vm, spec[2]) &&
07682             isEnum_IntConLevel(spec[3]))
07683         {
07684           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
07685           Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
07686           for (int i=a0.size(); i--;)
07687             x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
07688           Gecode::IntVar x1(vm.var(spec[1]->toVar()));
07689           Gecode::IntVar x2(vm.var(spec[2]->toVar()));
07690           Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
07691           Gecode::atleast(home, x0,x1,x2,x3);
07692           return;
07693         }
07694 #endif
07695 #if defined(GECODE_HAS_INT_VARS)
07696         if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
07697             spec[1]->isIntArray() &&
07698             isVar<Gecode::IntVar>(vm, spec[2]) &&
07699             isEnum_IntConLevel(spec[3]))
07700         {
07701           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
07702           Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
07703           for (int i=a0.size(); i--;)
07704             x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
07705           Gecode::Reflection::IntArrayArg& a1 = *spec[1]->toIntArray();
07706           Gecode::IntArgs x1(a1.size());
07707           for (int i=a1.size(); i--;) x1[i] = a1[i];
07708           Gecode::IntVar x2(vm.var(spec[2]->toVar()));
07709           Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
07710           Gecode::atleast(home, x0,x1,x2,x3);
07711           return;
07712         }
07713 #endif
07714         throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::atleast");
07715       }
07716       break;
07717     case 5:
07718       {
07719 #if defined(GECODE_HAS_INT_VARS)
07720         if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
07721             spec[1]->isInt() &&
07722             spec[2]->isInt() &&
07723             isEnum_IntConLevel(spec[3]) &&
07724             isEnum_PropKind(spec[4]))
07725         {
07726           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
07727           Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
07728           for (int i=a0.size(); i--;)
07729             x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
07730           int x1 = static_cast<int>(spec[1]->toInt());
07731           int x2 = static_cast<int>(spec[2]->toInt());
07732           Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
07733           Gecode::PropKind x4 = toEnum_PropKind(spec[4]);
07734           Gecode::atleast(home, x0,x1,x2,x3,x4);
07735           return;
07736         }
07737 #endif
07738 #if defined(GECODE_HAS_INT_VARS)
07739         if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
07740             isVar<Gecode::IntVar>(vm, spec[1]) &&
07741             spec[2]->isInt() &&
07742             isEnum_IntConLevel(spec[3]) &&
07743             isEnum_PropKind(spec[4]))
07744         {
07745           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
07746           Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
07747           for (int i=a0.size(); i--;)
07748             x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
07749           Gecode::IntVar x1(vm.var(spec[1]->toVar()));
07750           int x2 = static_cast<int>(spec[2]->toInt());
07751           Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
07752           Gecode::PropKind x4 = toEnum_PropKind(spec[4]);
07753           Gecode::atleast(home, x0,x1,x2,x3,x4);
07754           return;
07755         }
07756 #endif
07757 #if defined(GECODE_HAS_INT_VARS)
07758         if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
07759             spec[1]->isIntArray() &&
07760             spec[2]->isInt() &&
07761             isEnum_IntConLevel(spec[3]) &&
07762             isEnum_PropKind(spec[4]))
07763         {
07764           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
07765           Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
07766           for (int i=a0.size(); i--;)
07767             x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
07768           Gecode::Reflection::IntArrayArg& a1 = *spec[1]->toIntArray();
07769           Gecode::IntArgs x1(a1.size());
07770           for (int i=a1.size(); i--;) x1[i] = a1[i];
07771           int x2 = static_cast<int>(spec[2]->toInt());
07772           Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
07773           Gecode::PropKind x4 = toEnum_PropKind(spec[4]);
07774           Gecode::atleast(home, x0,x1,x2,x3,x4);
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             isEnum_IntConLevel(spec[3]) &&
07783             isEnum_PropKind(spec[4]))
07784         {
07785           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
07786           Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
07787           for (int i=a0.size(); i--;)
07788             x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
07789           int x1 = static_cast<int>(spec[1]->toInt());
07790           Gecode::IntVar x2(vm.var(spec[2]->toVar()));
07791           Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
07792           Gecode::PropKind x4 = toEnum_PropKind(spec[4]);
07793           Gecode::atleast(home, x0,x1,x2,x3,x4);
07794           return;
07795         }
07796 #endif
07797 #if defined(GECODE_HAS_INT_VARS)
07798         if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
07799             isVar<Gecode::IntVar>(vm, spec[1]) &&
07800             isVar<Gecode::IntVar>(vm, spec[2]) &&
07801             isEnum_IntConLevel(spec[3]) &&
07802             isEnum_PropKind(spec[4]))
07803         {
07804           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
07805           Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
07806           for (int i=a0.size(); i--;)
07807             x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
07808           Gecode::IntVar x1(vm.var(spec[1]->toVar()));
07809           Gecode::IntVar x2(vm.var(spec[2]->toVar()));
07810           Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
07811           Gecode::PropKind x4 = toEnum_PropKind(spec[4]);
07812           Gecode::atleast(home, x0,x1,x2,x3,x4);
07813           return;
07814         }
07815 #endif
07816 #if defined(GECODE_HAS_INT_VARS)
07817         if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
07818             spec[1]->isIntArray() &&
07819             isVar<Gecode::IntVar>(vm, spec[2]) &&
07820             isEnum_IntConLevel(spec[3]) &&
07821             isEnum_PropKind(spec[4]))
07822         {
07823           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
07824           Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
07825           for (int i=a0.size(); i--;)
07826             x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
07827           Gecode::Reflection::IntArrayArg& a1 = *spec[1]->toIntArray();
07828           Gecode::IntArgs x1(a1.size());
07829           for (int i=a1.size(); i--;) x1[i] = a1[i];
07830           Gecode::IntVar x2(vm.var(spec[2]->toVar()));
07831           Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
07832           Gecode::PropKind x4 = toEnum_PropKind(spec[4]);
07833           Gecode::atleast(home, x0,x1,x2,x3,x4);
07834           return;
07835         }
07836 #endif
07837         throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::atleast");
07838       }
07839       break;
07840     default: throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::atleast");
07841     }
07842   }
07843 };
07844 
07845 class Register_convexHull {
07846 public:
07848   static Gecode::Support::Symbol ati(void) {
07849     return "Gecode::Post::convexHull";
07850   }
07851   
07853   static void post(Gecode::Space* home, Gecode::Reflection::VarMap& vm,
07854                    const Gecode::Reflection::ActorSpec& spec) {
07855     switch(spec.noOfArgs()) {
07856     case 2:
07857       {
07858 #if defined(GECODE_HAS_SET_VARS)
07859         if (isVar<Gecode::SetVar>(vm, spec[0]) &&
07860             isVar<Gecode::SetVar>(vm, spec[1]))
07861         {
07862           Gecode::SetVar x0(vm.var(spec[0]->toVar()));
07863           Gecode::SetVar x1(vm.var(spec[1]->toVar()));
07864           Gecode::convexHull(home, x0,x1);
07865           return;
07866         }
07867 #endif
07868         throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::convexHull");
07869       }
07870       break;
07871     default: throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::convexHull");
07872     }
07873   }
07874 };
07875 
07876 class Register_sqr {
07877 public:
07879   static Gecode::Support::Symbol ati(void) {
07880     return "Gecode::Post::sqr";
07881   }
07882   
07884   static void post(Gecode::Space* home, Gecode::Reflection::VarMap& vm,
07885                    const Gecode::Reflection::ActorSpec& spec) {
07886     switch(spec.noOfArgs()) {
07887     case 2:
07888       {
07889 #if defined(GECODE_HAS_INT_VARS)
07890         if (isVar<Gecode::IntVar>(vm, spec[0]) &&
07891             isVar<Gecode::IntVar>(vm, spec[1]))
07892         {
07893           Gecode::IntVar x0(vm.var(spec[0]->toVar()));
07894           Gecode::IntVar x1(vm.var(spec[1]->toVar()));
07895           Gecode::sqr(home, x0,x1);
07896           return;
07897         }
07898 #endif
07899         throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::sqr");
07900       }
07901       break;
07902     case 3:
07903       {
07904 #if defined(GECODE_HAS_INT_VARS)
07905         if (isVar<Gecode::IntVar>(vm, spec[0]) &&
07906             isVar<Gecode::IntVar>(vm, spec[1]) &&
07907             isEnum_IntConLevel(spec[2]))
07908         {
07909           Gecode::IntVar x0(vm.var(spec[0]->toVar()));
07910           Gecode::IntVar x1(vm.var(spec[1]->toVar()));
07911           Gecode::IntConLevel x2 = toEnum_IntConLevel(spec[2]);
07912           Gecode::sqr(home, x0,x1,x2);
07913           return;
07914         }
07915 #endif
07916         throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::sqr");
07917       }
07918       break;
07919     case 4:
07920       {
07921 #if defined(GECODE_HAS_INT_VARS)
07922         if (isVar<Gecode::IntVar>(vm, spec[0]) &&
07923             isVar<Gecode::IntVar>(vm, spec[1]) &&
07924             isEnum_IntConLevel(spec[2]) &&
07925             isEnum_PropKind(spec[3]))
07926         {
07927           Gecode::IntVar x0(vm.var(spec[0]->toVar()));
07928           Gecode::IntVar x1(vm.var(spec[1]->toVar()));
07929           Gecode::IntConLevel x2 = toEnum_IntConLevel(spec[2]);
07930           Gecode::PropKind x3 = toEnum_PropKind(spec[3]);
07931           Gecode::sqr(home, x0,x1,x2,x3);
07932           return;
07933         }
07934 #endif
07935         throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::sqr");
07936       }
07937       break;
07938     default: throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::sqr");
07939     }
07940   }
07941 };
07942 
07943 class Register_lex {
07944 public:
07946   static Gecode::Support::Symbol ati(void) {
07947     return "Gecode::Post::lex";
07948   }
07949   
07951   static void post(Gecode::Space* home, Gecode::Reflection::VarMap& vm,
07952                    const Gecode::Reflection::ActorSpec& spec) {
07953     switch(spec.noOfArgs()) {
07954     case 3:
07955       {
07956 #if defined(GECODE_HAS_INT_VARS)
07957         if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
07958             isEnum_IntRelType(spec[1]) &&
07959             isVarArgs<Gecode::IntVar>(vm, spec[2]))
07960         {
07961           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
07962           Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
07963           for (int i=a0.size(); i--;)
07964             x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
07965           Gecode::IntRelType x1 = toEnum_IntRelType(spec[1]);
07966           Gecode::Reflection::ArrayArg& a2 = *spec[2]->toArray();
07967           Gecode::VarArgArray<Gecode::IntVar> x2(a2.size());
07968           for (int i=a2.size(); i--;)
07969             x2[i] = Gecode::IntVar(vm.var(a2[i]->toVar()));
07970           Gecode::lex(home, x0,x1,x2);
07971           return;
07972         }
07973 #endif
07974 #if defined(GECODE_HAS_INT_VARS)
07975         if (isVarArgs<Gecode::BoolVar>(vm, spec[0]) &&
07976             isEnum_IntRelType(spec[1]) &&
07977             isVarArgs<Gecode::BoolVar>(vm, spec[2]))
07978         {
07979           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
07980           Gecode::VarArgArray<Gecode::BoolVar> x0(a0.size());
07981           for (int i=a0.size(); i--;)
07982             x0[i] = Gecode::BoolVar(vm.var(a0[i]->toVar()));
07983           Gecode::IntRelType x1 = toEnum_IntRelType(spec[1]);
07984           Gecode::Reflection::ArrayArg& a2 = *spec[2]->toArray();
07985           Gecode::VarArgArray<Gecode::BoolVar> x2(a2.size());
07986           for (int i=a2.size(); i--;)
07987             x2[i] = Gecode::BoolVar(vm.var(a2[i]->toVar()));
07988           Gecode::lex(home, x0,x1,x2);
07989           return;
07990         }
07991 #endif
07992         throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::lex");
07993       }
07994       break;
07995     case 4:
07996       {
07997 #if defined(GECODE_HAS_INT_VARS)
07998         if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
07999             isEnum_IntRelType(spec[1]) &&
08000             isVarArgs<Gecode::IntVar>(vm, spec[2]) &&
08001             isEnum_IntConLevel(spec[3]))
08002         {
08003           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
08004           Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
08005           for (int i=a0.size(); i--;)
08006             x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
08007           Gecode::IntRelType x1 = toEnum_IntRelType(spec[1]);
08008           Gecode::Reflection::ArrayArg& a2 = *spec[2]->toArray();
08009           Gecode::VarArgArray<Gecode::IntVar> x2(a2.size());
08010           for (int i=a2.size(); i--;)
08011             x2[i] = Gecode::IntVar(vm.var(a2[i]->toVar()));
08012           Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
08013           Gecode::lex(home, x0,x1,x2,x3);
08014           return;
08015         }
08016 #endif
08017 #if defined(GECODE_HAS_INT_VARS)
08018         if (isVarArgs<Gecode::BoolVar>(vm, spec[0]) &&
08019             isEnum_IntRelType(spec[1]) &&
08020             isVarArgs<Gecode::BoolVar>(vm, spec[2]) &&
08021             isEnum_IntConLevel(spec[3]))
08022         {
08023           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
08024           Gecode::VarArgArray<Gecode::BoolVar> x0(a0.size());
08025           for (int i=a0.size(); i--;)
08026             x0[i] = Gecode::BoolVar(vm.var(a0[i]->toVar()));
08027           Gecode::IntRelType x1 = toEnum_IntRelType(spec[1]);
08028           Gecode::Reflection::ArrayArg& a2 = *spec[2]->toArray();
08029           Gecode::VarArgArray<Gecode::BoolVar> x2(a2.size());
08030           for (int i=a2.size(); i--;)
08031             x2[i] = Gecode::BoolVar(vm.var(a2[i]->toVar()));
08032           Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
08033           Gecode::lex(home, x0,x1,x2,x3);
08034           return;
08035         }
08036 #endif
08037         throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::lex");
08038       }
08039       break;
08040     case 5:
08041       {
08042 #if defined(GECODE_HAS_INT_VARS)
08043         if (isVarArgs<Gecode::IntVar>(vm, spec[0]) &&
08044             isEnum_IntRelType(spec[1]) &&
08045             isVarArgs<Gecode::IntVar>(vm, spec[2]) &&
08046             isEnum_IntConLevel(spec[3]) &&
08047             isEnum_PropKind(spec[4]))
08048         {
08049           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
08050           Gecode::VarArgArray<Gecode::IntVar> x0(a0.size());
08051           for (int i=a0.size(); i--;)
08052             x0[i] = Gecode::IntVar(vm.var(a0[i]->toVar()));
08053           Gecode::IntRelType x1 = toEnum_IntRelType(spec[1]);
08054           Gecode::Reflection::ArrayArg& a2 = *spec[2]->toArray();
08055           Gecode::VarArgArray<Gecode::IntVar> x2(a2.size());
08056           for (int i=a2.size(); i--;)
08057             x2[i] = Gecode::IntVar(vm.var(a2[i]->toVar()));
08058           Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
08059           Gecode::PropKind x4 = toEnum_PropKind(spec[4]);
08060           Gecode::lex(home, x0,x1,x2,x3,x4);
08061           return;
08062         }
08063 #endif
08064 #if defined(GECODE_HAS_INT_VARS)
08065         if (isVarArgs<Gecode::BoolVar>(vm, spec[0]) &&
08066             isEnum_IntRelType(spec[1]) &&
08067             isVarArgs<Gecode::BoolVar>(vm, spec[2]) &&
08068             isEnum_IntConLevel(spec[3]) &&
08069             isEnum_PropKind(spec[4]))
08070         {
08071           Gecode::Reflection::ArrayArg& a0 = *spec[0]->toArray();
08072           Gecode::VarArgArray<Gecode::BoolVar> x0(a0.size());
08073           for (int i=a0.size(); i--;)
08074             x0[i] = Gecode::BoolVar(vm.var(a0[i]->toVar()));
08075           Gecode::IntRelType x1 = toEnum_IntRelType(spec[1]);
08076           Gecode::Reflection::ArrayArg& a2 = *spec[2]->toArray();
08077           Gecode::VarArgArray<Gecode::BoolVar> x2(a2.size());
08078           for (int i=a2.size(); i--;)
08079             x2[i] = Gecode::BoolVar(vm.var(a2[i]->toVar()));
08080           Gecode::IntConLevel x3 = toEnum_IntConLevel(spec[3]);
08081           Gecode::PropKind x4 = toEnum_PropKind(spec[4]);
08082           Gecode::lex(home, x0,x1,x2,x3,x4);
08083           return;
08084         }
08085 #endif
08086         throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::lex");
08087       }
08088       break;
08089     default: throw Gecode::Reflection::ReflectionException("Argument type mismatch for Gecode::Post::lex");
08090     }
08091   }
08092 };
08093 
08094 class PostRegistrar {
08095   GECODE_REGISTER1(Register_rel);
08096   GECODE_REGISTER1(Register_sqrt);
08097   GECODE_REGISTER1(Register_selectInterIn);
08098   GECODE_REGISTER1(Register_sequence);
08099   GECODE_REGISTER1(Register_sorted);
08100   GECODE_REGISTER1(Register_exactly);
08101   GECODE_REGISTER1(Register_max);
08102   GECODE_REGISTER1(Register_distinct);
08103   GECODE_REGISTER1(Register_dom);
08104   GECODE_REGISTER1(Register_count);
08105   GECODE_REGISTER1(Register_match);
08106   GECODE_REGISTER1(Register_selectUnion);
08107   GECODE_REGISTER1(Register_element);
08108   GECODE_REGISTER1(Register_abs);
08109   GECODE_REGISTER1(Register_atmost);
08110   GECODE_REGISTER1(Register_circuit);
08111   GECODE_REGISTER1(Register_assign);
08112   GECODE_REGISTER1(Register_mult);
08113   GECODE_REGISTER1(Register_atmostOne);
08114   GECODE_REGISTER1(Register_convex);
08115   GECODE_REGISTER1(Register_unshare);
08116   GECODE_REGISTER1(Register_weights);
08117   GECODE_REGISTER1(Register_selectInter);
08118   GECODE_REGISTER1(Register_selectDisjoint);
08119   GECODE_REGISTER1(Register_linear);
08120   GECODE_REGISTER1(Register_cumulatives);
08121   GECODE_REGISTER1(Register_channel);
08122   GECODE_REGISTER1(Register_cardinality);
08123   GECODE_REGISTER1(Register_selectSet);
08124   GECODE_REGISTER1(Register_min);
08125   GECODE_REGISTER1(Register_sequentialUnion);
08126   GECODE_REGISTER1(Register_branch);
08127   GECODE_REGISTER1(Register_atleast);
08128   GECODE_REGISTER1(Register_convexHull);
08129   GECODE_REGISTER1(Register_sqr);
08130   GECODE_REGISTER1(Register_lex);
08131 };
08132 
08133 } // end anonymous namespace
08134 namespace Gecode { namespace Serialization {
08135   
08136   void initRegistry(void) {
08137     static PostRegistrar r;
08138     return;
08139   };
08140 
08141   
08142 }}