diff --git a/packages/gecode/6.0.0/gecode-version.txt b/packages/gecode/6.0.0/gecode-version.txt new file mode 100644 index 000000000..09b254e90 --- /dev/null +++ b/packages/gecode/6.0.0/gecode-version.txt @@ -0,0 +1 @@ +6.0.0 diff --git a/packages/gecode/6.0.0/gecode_yap_auto_generated.yap b/packages/gecode/6.0.0/gecode_yap_auto_generated.yap new file mode 100644 index 000000000..435db6a5d --- /dev/null +++ b/packages/gecode/6.0.0/gecode_yap_auto_generated.yap @@ -0,0 +1,3613 @@ +%% -*- prolog -*- +%%============================================================================= +%% Copyright (C) 2011 by Denys Duchier +%% +%% This program is free software: you can redistribute it and/or modify it +%% under the terms of the GNU Lesser General Public License as published by the +%% Free Software Foundation, either version 3 of the License, or (at your +%% option) any later version. +%% +%% This program is distributed in the hope that it will be useful, but WITHOUT +%% ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +%% FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +%% more details. +%% +%% You should have received a copy of the GNU Lesser General Public License +%% along with this program. If not, see . +%%============================================================================= + +is_RestartMode_('RM_NONE'). +is_RestartMode_('RM_CONSTANT'). +is_RestartMode_('RM_LINEAR'). +is_RestartMode_('RM_LUBY'). +is_RestartMode_('RM_GEOMETRIC'). + +is_RestartMode_('RM_NONE','RM_NONE'). +is_RestartMode_('RM_CONSTANT','RM_CONSTANT'). +is_RestartMode_('RM_LINEAR','RM_LINEAR'). +is_RestartMode_('RM_LUBY','RM_LUBY'). +is_RestartMode_('RM_GEOMETRIC','RM_GEOMETRIC'). + +is_RestartMode(X,Y) :- nonvar(X), is_RestartMode_(X,Y). +is_RestartMode(X) :- is_RestartMode_(X,_). + +is_FloatRelType_('FRT_EQ'). +is_FloatRelType_('FRT_NQ'). +is_FloatRelType_('FRT_LQ'). +is_FloatRelType_('FRT_LE'). +is_FloatRelType_('FRT_GQ'). +is_FloatRelType_('FRT_GR'). + +is_FloatRelType_('FRT_EQ','FRT_EQ'). +is_FloatRelType_('FRT_NQ','FRT_NQ'). +is_FloatRelType_('FRT_LQ','FRT_LQ'). +is_FloatRelType_('FRT_LE','FRT_LE'). +is_FloatRelType_('FRT_GQ','FRT_GQ'). +is_FloatRelType_('FRT_GR','FRT_GR'). + +is_FloatRelType(X,Y) :- nonvar(X), is_FloatRelType_(X,Y). +is_FloatRelType(X) :- is_FloatRelType_(X,_). + +is_ReifyMode_('RM_EQV'). +is_ReifyMode_('RM_IMP'). +is_ReifyMode_('RM_PMI'). + +is_ReifyMode_('RM_EQV','RM_EQV'). +is_ReifyMode_('RM_IMP','RM_IMP'). +is_ReifyMode_('RM_PMI','RM_PMI'). + +is_ReifyMode(X,Y) :- nonvar(X), is_ReifyMode_(X,Y). +is_ReifyMode(X) :- is_ReifyMode_(X,_). + +is_IntRelType_('IRT_EQ'). +is_IntRelType_('IRT_NQ'). +is_IntRelType_('IRT_LQ'). +is_IntRelType_('IRT_LE'). +is_IntRelType_('IRT_GQ'). +is_IntRelType_('IRT_GR'). + +is_IntRelType_('IRT_EQ','IRT_EQ'). +is_IntRelType_('IRT_NQ','IRT_NQ'). +is_IntRelType_('IRT_LQ','IRT_LQ'). +is_IntRelType_('IRT_LE','IRT_LE'). +is_IntRelType_('IRT_GQ','IRT_GQ'). +is_IntRelType_('IRT_GR','IRT_GR'). + +is_IntRelType(X,Y) :- nonvar(X), is_IntRelType_(X,Y). +is_IntRelType(X) :- is_IntRelType_(X,_). + +is_BoolOpType_('BOT_AND'). +is_BoolOpType_('BOT_OR'). +is_BoolOpType_('BOT_IMP'). +is_BoolOpType_('BOT_EQV'). +is_BoolOpType_('BOT_XOR'). + +is_BoolOpType_('BOT_AND','BOT_AND'). +is_BoolOpType_('BOT_OR','BOT_OR'). +is_BoolOpType_('BOT_IMP','BOT_IMP'). +is_BoolOpType_('BOT_EQV','BOT_EQV'). +is_BoolOpType_('BOT_XOR','BOT_XOR'). + +is_BoolOpType(X,Y) :- nonvar(X), is_BoolOpType_(X,Y). +is_BoolOpType(X) :- is_BoolOpType_(X,_). + +is_IntPropLevel_('IPL_DEF'). +is_IntPropLevel_('IPL_VAL'). +is_IntPropLevel_('IPL_BND'). +is_IntPropLevel_('IPL_DOM'). +is_IntPropLevel_('IPL_SPEED'). +is_IntPropLevel_('IPL_MEMORY'). +is_IntPropLevel_('IPL_BASIC'). +is_IntPropLevel_('IPL_ADVANCED'). +is_IntPropLevel_('IPL_BASIC_ADVANCED'). + +is_IntPropLevel_('IPL_DEF','IPL_DEF'). +is_IntPropLevel_('IPL_VAL','IPL_VAL'). +is_IntPropLevel_('IPL_BND','IPL_BND'). +is_IntPropLevel_('IPL_DOM','IPL_DOM'). +is_IntPropLevel_('IPL_SPEED','IPL_SPEED'). +is_IntPropLevel_('IPL_MEMORY','IPL_MEMORY'). +is_IntPropLevel_('IPL_BASIC','IPL_BASIC'). +is_IntPropLevel_('IPL_ADVANCED','IPL_ADVANCED'). +is_IntPropLevel_('IPL_BASIC_ADVANCED','IPL_BASIC_ADVANCED'). + +is_IntPropLevel(X,Y) :- nonvar(X), is_IntPropLevel_(X,Y). +is_IntPropLevel(X) :- is_IntPropLevel_(X,_). + +is_TaskType_('TT_FIXP'). +is_TaskType_('TT_FIXS'). +is_TaskType_('TT_FIXE'). + +is_TaskType_('TT_FIXP','TT_FIXP'). +is_TaskType_('TT_FIXS','TT_FIXS'). +is_TaskType_('TT_FIXE','TT_FIXE'). + +is_TaskType(X,Y) :- nonvar(X), is_TaskType_(X,Y). +is_TaskType(X) :- is_TaskType_(X,_). + +is_TraceEvent_('TE_INIT'). +is_TraceEvent_('TE_PRUNE'). +is_TraceEvent_('TE_FIX'). +is_TraceEvent_('TE_FAIL'). +is_TraceEvent_('TE_DONE'). +is_TraceEvent_('TE_PROPAGATE'). +is_TraceEvent_('TE_COMMIT'). + +is_TraceEvent_('TE_INIT','TE_INIT'). +is_TraceEvent_('TE_PRUNE','TE_PRUNE'). +is_TraceEvent_('TE_FIX','TE_FIX'). +is_TraceEvent_('TE_FAIL','TE_FAIL'). +is_TraceEvent_('TE_DONE','TE_DONE'). +is_TraceEvent_('TE_PROPAGATE','TE_PROPAGATE'). +is_TraceEvent_('TE_COMMIT','TE_COMMIT'). + +is_TraceEvent(X,Y) :- nonvar(X), is_TraceEvent_(X,Y). +is_TraceEvent(X) :- is_TraceEvent_(X,_). + +is_SetRelType_('SRT_EQ'). +is_SetRelType_('SRT_NQ'). +is_SetRelType_('SRT_SUB'). +is_SetRelType_('SRT_SUP'). +is_SetRelType_('SRT_DISJ'). +is_SetRelType_('SRT_CMPL'). +is_SetRelType_('SRT_LQ'). +is_SetRelType_('SRT_LE'). +is_SetRelType_('SRT_GQ'). +is_SetRelType_('SRT_GR'). + +is_SetRelType_('SRT_EQ','SRT_EQ'). +is_SetRelType_('SRT_NQ','SRT_NQ'). +is_SetRelType_('SRT_SUB','SRT_SUB'). +is_SetRelType_('SRT_SUP','SRT_SUP'). +is_SetRelType_('SRT_DISJ','SRT_DISJ'). +is_SetRelType_('SRT_CMPL','SRT_CMPL'). +is_SetRelType_('SRT_LQ','SRT_LQ'). +is_SetRelType_('SRT_LE','SRT_LE'). +is_SetRelType_('SRT_GQ','SRT_GQ'). +is_SetRelType_('SRT_GR','SRT_GR'). + +is_SetRelType(X,Y) :- nonvar(X), is_SetRelType_(X,Y). +is_SetRelType(X) :- is_SetRelType_(X,_). + +is_SetOpType_('SOT_UNION'). +is_SetOpType_('SOT_DUNION'). +is_SetOpType_('SOT_INTER'). +is_SetOpType_('SOT_MINUS'). + +is_SetOpType_('SOT_UNION','SOT_UNION'). +is_SetOpType_('SOT_DUNION','SOT_DUNION'). +is_SetOpType_('SOT_INTER','SOT_INTER'). +is_SetOpType_('SOT_MINUS','SOT_MINUS'). + +is_SetOpType(X,Y) :- nonvar(X), is_SetOpType_(X,Y). +is_SetOpType(X) :- is_SetOpType_(X,_). + +branch(X0,X1) :- + (is_Space_or_Clause(X0,Y0) + -> (is_std_function(X1,Y1) + -> gecode_constraint_branch_1(Y0,Y1) + ; throw(error(type_error('std::function'(X1)),gecode_argument_error(branch(X0,X1),arg=2)))) + ; throw(error(type_error('Space'(X0)),gecode_argument_error(branch(X0,X1),arg=1)))). + +convex(X0,X1) :- + (is_Space_or_Clause(X0,Y0) + -> (is_SetVar(X1,Y1) + -> gecode_constraint_convex_2(Y0,Y1) + ; throw(error(type_error('SetVar'(X1)),gecode_argument_error(convex(X0,X1),arg=2)))) + ; throw(error(type_error('Space'(X0)),gecode_argument_error(convex(X0,X1),arg=1)))). + +convex(X0,X1,X2) :- + (is_Space_or_Clause(X0,Y0) + -> (is_SetVar(X1,Y1) + -> (is_SetVar(X2,Y2) + -> gecode_constraint_convex_3(Y0,Y1,Y2) + ; throw(error(type_error('SetVar'(X2)),gecode_argument_error(convex(X0,X1,X2),arg=3)))) + ; throw(error(type_error('SetVar'(X1)),gecode_argument_error(convex(X0,X1,X2),arg=2)))) + ; throw(error(type_error('Space'(X0)),gecode_argument_error(convex(X0,X1,X2),arg=1)))). + +abs(X0,X1,X2) :- + (is_Space_or_Clause(X0,Y0) + -> (is_FloatVar(X1,Y1) + -> (is_FloatVar(X2,Y2) + -> gecode_constraint_abs_4(Y0,Y1,Y2) + ; throw(error(type_error('FloatVar'(X2)),gecode_argument_error(abs(X0,X1,X2),arg=3)))) + ; (is_IntVar(X1,Y1) + -> (is_IntVar(X2,Y2) + -> gecode_constraint_abs_5(Y0,Y1,Y2) + ; throw(error(type_error('IntVar'(X2)),gecode_argument_error(abs(X0,X1,X2),arg=3)))) + ; throw(error(type_error('IntVar'(X1)),gecode_argument_error(abs(X0,X1,X2),arg=2))))) + ; throw(error(type_error('Space'(X0)),gecode_argument_error(abs(X0,X1,X2),arg=1)))). + +abs(X0,X1,X2,X3) :- + (is_Space_or_Clause(X0,Y0) + -> (is_IntVar(X1,Y1) + -> (is_IntVar(X2,Y2) + -> (is_IntPropLevel(X3,Y3) + -> gecode_constraint_abs_6(Y0,Y1,Y2,Y3) + ; throw(error(type_error('IntPropLevel'(X3)),gecode_argument_error(abs(X0,X1,X2,X3),arg=4)))) + ; throw(error(type_error('IntVar'(X2)),gecode_argument_error(abs(X0,X1,X2,X3),arg=3)))) + ; throw(error(type_error('IntVar'(X1)),gecode_argument_error(abs(X0,X1,X2,X3),arg=2)))) + ; throw(error(type_error('Space'(X0)),gecode_argument_error(abs(X0,X1,X2,X3),arg=1)))). + +argmax(X0,X1,X2) :- + (is_Space_or_Clause(X0,Y0) + -> (is_IntVarArgs(X1,Y1) + -> (is_IntVar(X2,Y2) + -> gecode_constraint_argmax_7(Y0,Y1,Y2) + ; throw(error(type_error('IntVar'(X2)),gecode_argument_error(argmax(X0,X1,X2),arg=3)))) + ; throw(error(type_error('IntVarArgs'(X1)),gecode_argument_error(argmax(X0,X1,X2),arg=2)))) + ; throw(error(type_error('Space'(X0)),gecode_argument_error(argmax(X0,X1,X2),arg=1)))). + +argmax(X0,X1,X2,X3) :- + (is_Space_or_Clause(X0,Y0) + -> (is_IntVarArgs(X1,Y1) + -> (is_IntVar(X2,Y2) + -> (is_bool(X3,Y3) + -> gecode_constraint_argmax_8(Y0,Y1,Y2,Y3) + ; throw(error(type_error(bool(X3)),gecode_argument_error(argmax(X0,X1,X2,X3),arg=4)))) + ; (is_int(X2,Y2) + -> (is_IntVar(X3,Y3) + -> gecode_constraint_argmax_10(Y0,Y1,Y2,Y3) + ; throw(error(type_error('IntVar'(X3)),gecode_argument_error(argmax(X0,X1,X2,X3),arg=4)))) + ; throw(error(type_error(int(X2)),gecode_argument_error(argmax(X0,X1,X2,X3),arg=3))))) + ; throw(error(type_error('IntVarArgs'(X1)),gecode_argument_error(argmax(X0,X1,X2,X3),arg=2)))) + ; throw(error(type_error('Space'(X0)),gecode_argument_error(argmax(X0,X1,X2,X3),arg=1)))). + +argmax(X0,X1,X2,X3,X4) :- + (is_Space_or_Clause(X0,Y0) + -> (is_IntVarArgs(X1,Y1) + -> (is_IntVar(X2,Y2) + -> (is_bool(X3,Y3) + -> (is_IntPropLevel(X4,Y4) + -> gecode_constraint_argmax_9(Y0,Y1,Y2,Y3,Y4) + ; throw(error(type_error('IntPropLevel'(X4)),gecode_argument_error(argmax(X0,X1,X2,X3,X4),arg=5)))) + ; throw(error(type_error(bool(X3)),gecode_argument_error(argmax(X0,X1,X2,X3,X4),arg=4)))) + ; (is_int(X2,Y2) + -> (is_IntVar(X3,Y3) + -> (is_bool(X4,Y4) + -> gecode_constraint_argmax_11(Y0,Y1,Y2,Y3,Y4) + ; throw(error(type_error(bool(X4)),gecode_argument_error(argmax(X0,X1,X2,X3,X4),arg=5)))) + ; throw(error(type_error('IntVar'(X3)),gecode_argument_error(argmax(X0,X1,X2,X3,X4),arg=4)))) + ; throw(error(type_error(int(X2)),gecode_argument_error(argmax(X0,X1,X2,X3,X4),arg=3))))) + ; throw(error(type_error('IntVarArgs'(X1)),gecode_argument_error(argmax(X0,X1,X2,X3,X4),arg=2)))) + ; throw(error(type_error('Space'(X0)),gecode_argument_error(argmax(X0,X1,X2,X3,X4),arg=1)))). + +argmax(X0,X1,X2,X3,X4,X5) :- + (is_Space_or_Clause(X0,Y0) + -> (is_IntVarArgs(X1,Y1) + -> (is_int(X2,Y2) + -> (is_IntVar(X3,Y3) + -> (is_bool(X4,Y4) + -> (is_IntPropLevel(X5,Y5) + -> gecode_constraint_argmax_12(Y0,Y1,Y2,Y3,Y4,Y5) + ; throw(error(type_error('IntPropLevel'(X5)),gecode_argument_error(argmax(X0,X1,X2,X3,X4,X5),arg=6)))) + ; throw(error(type_error(bool(X4)),gecode_argument_error(argmax(X0,X1,X2,X3,X4,X5),arg=5)))) + ; throw(error(type_error('IntVar'(X3)),gecode_argument_error(argmax(X0,X1,X2,X3,X4,X5),arg=4)))) + ; throw(error(type_error(int(X2)),gecode_argument_error(argmax(X0,X1,X2,X3,X4,X5),arg=3)))) + ; throw(error(type_error('IntVarArgs'(X1)),gecode_argument_error(argmax(X0,X1,X2,X3,X4,X5),arg=2)))) + ; throw(error(type_error('Space'(X0)),gecode_argument_error(argmax(X0,X1,X2,X3,X4,X5),arg=1)))). + +argmin(X0,X1,X2) :- + (is_Space_or_Clause(X0,Y0) + -> (is_IntVarArgs(X1,Y1) + -> (is_IntVar(X2,Y2) + -> gecode_constraint_argmin_13(Y0,Y1,Y2) + ; throw(error(type_error('IntVar'(X2)),gecode_argument_error(argmin(X0,X1,X2),arg=3)))) + ; throw(error(type_error('IntVarArgs'(X1)),gecode_argument_error(argmin(X0,X1,X2),arg=2)))) + ; throw(error(type_error('Space'(X0)),gecode_argument_error(argmin(X0,X1,X2),arg=1)))). + +argmin(X0,X1,X2,X3) :- + (is_Space_or_Clause(X0,Y0) + -> (is_IntVarArgs(X1,Y1) + -> (is_IntVar(X2,Y2) + -> (is_bool(X3,Y3) + -> gecode_constraint_argmin_14(Y0,Y1,Y2,Y3) + ; throw(error(type_error(bool(X3)),gecode_argument_error(argmin(X0,X1,X2,X3),arg=4)))) + ; (is_int(X2,Y2) + -> (is_IntVar(X3,Y3) + -> gecode_constraint_argmin_16(Y0,Y1,Y2,Y3) + ; throw(error(type_error('IntVar'(X3)),gecode_argument_error(argmin(X0,X1,X2,X3),arg=4)))) + ; throw(error(type_error(int(X2)),gecode_argument_error(argmin(X0,X1,X2,X3),arg=3))))) + ; throw(error(type_error('IntVarArgs'(X1)),gecode_argument_error(argmin(X0,X1,X2,X3),arg=2)))) + ; throw(error(type_error('Space'(X0)),gecode_argument_error(argmin(X0,X1,X2,X3),arg=1)))). + +argmin(X0,X1,X2,X3,X4) :- + (is_Space_or_Clause(X0,Y0) + -> (is_IntVarArgs(X1,Y1) + -> (is_IntVar(X2,Y2) + -> (is_bool(X3,Y3) + -> (is_IntPropLevel(X4,Y4) + -> gecode_constraint_argmin_15(Y0,Y1,Y2,Y3,Y4) + ; throw(error(type_error('IntPropLevel'(X4)),gecode_argument_error(argmin(X0,X1,X2,X3,X4),arg=5)))) + ; throw(error(type_error(bool(X3)),gecode_argument_error(argmin(X0,X1,X2,X3,X4),arg=4)))) + ; (is_int(X2,Y2) + -> (is_IntVar(X3,Y3) + -> (is_bool(X4,Y4) + -> gecode_constraint_argmin_17(Y0,Y1,Y2,Y3,Y4) + ; throw(error(type_error(bool(X4)),gecode_argument_error(argmin(X0,X1,X2,X3,X4),arg=5)))) + ; throw(error(type_error('IntVar'(X3)),gecode_argument_error(argmin(X0,X1,X2,X3,X4),arg=4)))) + ; throw(error(type_error(int(X2)),gecode_argument_error(argmin(X0,X1,X2,X3,X4),arg=3))))) + ; throw(error(type_error('IntVarArgs'(X1)),gecode_argument_error(argmin(X0,X1,X2,X3,X4),arg=2)))) + ; throw(error(type_error('Space'(X0)),gecode_argument_error(argmin(X0,X1,X2,X3,X4),arg=1)))). + +argmin(X0,X1,X2,X3,X4,X5) :- + (is_Space_or_Clause(X0,Y0) + -> (is_IntVarArgs(X1,Y1) + -> (is_int(X2,Y2) + -> (is_IntVar(X3,Y3) + -> (is_bool(X4,Y4) + -> (is_IntPropLevel(X5,Y5) + -> gecode_constraint_argmin_18(Y0,Y1,Y2,Y3,Y4,Y5) + ; throw(error(type_error('IntPropLevel'(X5)),gecode_argument_error(argmin(X0,X1,X2,X3,X4,X5),arg=6)))) + ; throw(error(type_error(bool(X4)),gecode_argument_error(argmin(X0,X1,X2,X3,X4,X5),arg=5)))) + ; throw(error(type_error('IntVar'(X3)),gecode_argument_error(argmin(X0,X1,X2,X3,X4,X5),arg=4)))) + ; throw(error(type_error(int(X2)),gecode_argument_error(argmin(X0,X1,X2,X3,X4,X5),arg=3)))) + ; throw(error(type_error('IntVarArgs'(X1)),gecode_argument_error(argmin(X0,X1,X2,X3,X4,X5),arg=2)))) + ; throw(error(type_error('Space'(X0)),gecode_argument_error(argmin(X0,X1,X2,X3,X4,X5),arg=1)))). + +assign(X0,X1,X2) :- + (is_Space_or_Clause(X0,Y0) + -> (is_BoolVar(X1,Y1) + -> (is_BoolAssign(X2,Y2) + -> gecode_constraint_assign_19(Y0,Y1,Y2) + ; throw(error(type_error('BoolAssign'(X2)),gecode_argument_error(assign(X0,X1,X2),arg=3)))) + ; (is_FloatVar(X1,Y1) + -> (is_FloatAssign(X2,Y2) + -> gecode_constraint_assign_21(Y0,Y1,Y2) + ; throw(error(type_error('FloatAssign'(X2)),gecode_argument_error(assign(X0,X1,X2),arg=3)))) + ; (is_IntVar(X1,Y1) + -> (is_IntAssign(X2,Y2) + -> gecode_constraint_assign_23(Y0,Y1,Y2) + ; throw(error(type_error('IntAssign'(X2)),gecode_argument_error(assign(X0,X1,X2),arg=3)))) + ; (is_SetVar(X1,Y1) + -> (is_SetAssign(X2,Y2) + -> gecode_constraint_assign_25(Y0,Y1,Y2) + ; throw(error(type_error('SetAssign'(X2)),gecode_argument_error(assign(X0,X1,X2),arg=3)))) + ; (is_BoolVarArgs(X1,Y1) + -> (is_BoolAssign(X2,Y2) + -> gecode_constraint_assign_27(Y0,Y1,Y2) + ; throw(error(type_error('BoolAssign'(X2)),gecode_argument_error(assign(X0,X1,X2),arg=3)))) + ; (is_FloatVarArgs(X1,Y1) + -> (is_FloatAssign(X2,Y2) + -> gecode_constraint_assign_30(Y0,Y1,Y2) + ; throw(error(type_error('FloatAssign'(X2)),gecode_argument_error(assign(X0,X1,X2),arg=3)))) + ; (is_IntVarArgs(X1,Y1) + -> (is_IntAssign(X2,Y2) + -> gecode_constraint_assign_33(Y0,Y1,Y2) + ; throw(error(type_error('IntAssign'(X2)),gecode_argument_error(assign(X0,X1,X2),arg=3)))) + ; (is_SetVarArgs(X1,Y1) + -> (is_SetAssign(X2,Y2) + -> gecode_constraint_assign_36(Y0,Y1,Y2) + ; throw(error(type_error('SetAssign'(X2)),gecode_argument_error(assign(X0,X1,X2),arg=3)))) + ; throw(error(type_error('SetVarArgs'(X1)),gecode_argument_error(assign(X0,X1,X2),arg=2))))))))))) + ; throw(error(type_error('Space'(X0)),gecode_argument_error(assign(X0,X1,X2),arg=1)))). + +assign(X0,X1,X2,X3) :- + (is_Space_or_Clause(X0,Y0) + -> (is_BoolVar(X1,Y1) + -> (is_BoolAssign(X2,Y2) + -> (is_BoolVarValPrint(X3,Y3) + -> gecode_constraint_assign_20(Y0,Y1,Y2,Y3) + ; throw(error(type_error('BoolVarValPrint'(X3)),gecode_argument_error(assign(X0,X1,X2,X3),arg=4)))) + ; throw(error(type_error('BoolAssign'(X2)),gecode_argument_error(assign(X0,X1,X2,X3),arg=3)))) + ; (is_FloatVar(X1,Y1) + -> (is_FloatAssign(X2,Y2) + -> (is_FloatVarValPrint(X3,Y3) + -> gecode_constraint_assign_22(Y0,Y1,Y2,Y3) + ; throw(error(type_error('FloatVarValPrint'(X3)),gecode_argument_error(assign(X0,X1,X2,X3),arg=4)))) + ; throw(error(type_error('FloatAssign'(X2)),gecode_argument_error(assign(X0,X1,X2,X3),arg=3)))) + ; (is_IntVar(X1,Y1) + -> (is_IntAssign(X2,Y2) + -> (is_IntVarValPrint(X3,Y3) + -> gecode_constraint_assign_24(Y0,Y1,Y2,Y3) + ; throw(error(type_error('IntVarValPrint'(X3)),gecode_argument_error(assign(X0,X1,X2,X3),arg=4)))) + ; throw(error(type_error('IntAssign'(X2)),gecode_argument_error(assign(X0,X1,X2,X3),arg=3)))) + ; (is_SetVar(X1,Y1) + -> (is_SetAssign(X2,Y2) + -> (is_SetVarValPrint(X3,Y3) + -> gecode_constraint_assign_26(Y0,Y1,Y2,Y3) + ; throw(error(type_error('SetVarValPrint'(X3)),gecode_argument_error(assign(X0,X1,X2,X3),arg=4)))) + ; throw(error(type_error('SetAssign'(X2)),gecode_argument_error(assign(X0,X1,X2,X3),arg=3)))) + ; (is_BoolVarArgs(X1,Y1) + -> (is_BoolAssign(X2,Y2) + -> (is_BoolBranchFilter(X3,Y3) + -> gecode_constraint_assign_28(Y0,Y1,Y2,Y3) + ; throw(error(type_error('BoolBranchFilter'(X3)),gecode_argument_error(assign(X0,X1,X2,X3),arg=4)))) + ; throw(error(type_error('BoolAssign'(X2)),gecode_argument_error(assign(X0,X1,X2,X3),arg=3)))) + ; (is_FloatVarArgs(X1,Y1) + -> (is_FloatAssign(X2,Y2) + -> (is_FloatBranchFilter(X3,Y3) + -> gecode_constraint_assign_31(Y0,Y1,Y2,Y3) + ; throw(error(type_error('FloatBranchFilter'(X3)),gecode_argument_error(assign(X0,X1,X2,X3),arg=4)))) + ; throw(error(type_error('FloatAssign'(X2)),gecode_argument_error(assign(X0,X1,X2,X3),arg=3)))) + ; (is_IntVarArgs(X1,Y1) + -> (is_IntAssign(X2,Y2) + -> (is_IntBranchFilter(X3,Y3) + -> gecode_constraint_assign_34(Y0,Y1,Y2,Y3) + ; throw(error(type_error('IntBranchFilter'(X3)),gecode_argument_error(assign(X0,X1,X2,X3),arg=4)))) + ; throw(error(type_error('IntAssign'(X2)),gecode_argument_error(assign(X0,X1,X2,X3),arg=3)))) + ; (is_SetVarArgs(X1,Y1) + -> (is_SetAssign(X2,Y2) + -> (is_SetBranchFilter(X3,Y3) + -> gecode_constraint_assign_37(Y0,Y1,Y2,Y3) + ; throw(error(type_error('SetBranchFilter'(X3)),gecode_argument_error(assign(X0,X1,X2,X3),arg=4)))) + ; throw(error(type_error('SetAssign'(X2)),gecode_argument_error(assign(X0,X1,X2,X3),arg=3)))) + ; throw(error(type_error('SetVarArgs'(X1)),gecode_argument_error(assign(X0,X1,X2,X3),arg=2))))))))))) + ; throw(error(type_error('Space'(X0)),gecode_argument_error(assign(X0,X1,X2,X3),arg=1)))). + +assign(X0,X1,X2,X3,X4) :- + (is_Space_or_Clause(X0,Y0) + -> (is_BoolVarArgs(X1,Y1) + -> (is_BoolAssign(X2,Y2) + -> (is_BoolBranchFilter(X3,Y3) + -> (is_BoolVarValPrint(X4,Y4) + -> gecode_constraint_assign_29(Y0,Y1,Y2,Y3,Y4) + ; throw(error(type_error('BoolVarValPrint'(X4)),gecode_argument_error(assign(X0,X1,X2,X3,X4),arg=5)))) + ; throw(error(type_error('BoolBranchFilter'(X3)),gecode_argument_error(assign(X0,X1,X2,X3,X4),arg=4)))) + ; throw(error(type_error('BoolAssign'(X2)),gecode_argument_error(assign(X0,X1,X2,X3,X4),arg=3)))) + ; (is_FloatVarArgs(X1,Y1) + -> (is_FloatAssign(X2,Y2) + -> (is_FloatBranchFilter(X3,Y3) + -> (is_FloatVarValPrint(X4,Y4) + -> gecode_constraint_assign_32(Y0,Y1,Y2,Y3,Y4) + ; throw(error(type_error('FloatVarValPrint'(X4)),gecode_argument_error(assign(X0,X1,X2,X3,X4),arg=5)))) + ; throw(error(type_error('FloatBranchFilter'(X3)),gecode_argument_error(assign(X0,X1,X2,X3,X4),arg=4)))) + ; throw(error(type_error('FloatAssign'(X2)),gecode_argument_error(assign(X0,X1,X2,X3,X4),arg=3)))) + ; (is_IntVarArgs(X1,Y1) + -> (is_IntAssign(X2,Y2) + -> (is_IntBranchFilter(X3,Y3) + -> (is_IntVarValPrint(X4,Y4) + -> gecode_constraint_assign_35(Y0,Y1,Y2,Y3,Y4) + ; throw(error(type_error('IntVarValPrint'(X4)),gecode_argument_error(assign(X0,X1,X2,X3,X4),arg=5)))) + ; throw(error(type_error('IntBranchFilter'(X3)),gecode_argument_error(assign(X0,X1,X2,X3,X4),arg=4)))) + ; throw(error(type_error('IntAssign'(X2)),gecode_argument_error(assign(X0,X1,X2,X3,X4),arg=3)))) + ; (is_SetVarArgs(X1,Y1) + -> (is_SetAssign(X2,Y2) + -> (is_SetBranchFilter(X3,Y3) + -> (is_SetVarValPrint(X4,Y4) + -> gecode_constraint_assign_38(Y0,Y1,Y2,Y3,Y4) + ; throw(error(type_error('SetVarValPrint'(X4)),gecode_argument_error(assign(X0,X1,X2,X3,X4),arg=5)))) + ; throw(error(type_error('SetBranchFilter'(X3)),gecode_argument_error(assign(X0,X1,X2,X3,X4),arg=4)))) + ; throw(error(type_error('SetAssign'(X2)),gecode_argument_error(assign(X0,X1,X2,X3,X4),arg=3)))) + ; throw(error(type_error('SetVarArgs'(X1)),gecode_argument_error(assign(X0,X1,X2,X3,X4),arg=2))))))) + ; throw(error(type_error('Space'(X0)),gecode_argument_error(assign(X0,X1,X2,X3,X4),arg=1)))). + +binpacking(X0,X1,X2,X3) :- + (is_Space_or_Clause(X0,Y0) + -> (is_IntVarArgs(X1,Y1) + -> (is_IntVarArgs(X2,Y2) + -> (is_IntArgs(X3,Y3) + -> gecode_constraint_binpacking_39(Y0,Y1,Y2,Y3) + ; throw(error(type_error('IntArgs'(X3)),gecode_argument_error(binpacking(X0,X1,X2,X3),arg=4)))) + ; throw(error(type_error('IntVarArgs'(X2)),gecode_argument_error(binpacking(X0,X1,X2,X3),arg=3)))) + ; throw(error(type_error('IntVarArgs'(X1)),gecode_argument_error(binpacking(X0,X1,X2,X3),arg=2)))) + ; throw(error(type_error('Space'(X0)),gecode_argument_error(binpacking(X0,X1,X2,X3),arg=1)))). + +binpacking(X0,X1,X2,X3,X4) :- + (is_Space_or_Clause(X0,Y0) + -> (is_IntVarArgs(X1,Y1) + -> (is_IntVarArgs(X2,Y2) + -> (is_IntArgs(X3,Y3) + -> (is_IntPropLevel(X4,Y4) + -> gecode_constraint_binpacking_40(Y0,Y1,Y2,Y3,Y4) + ; throw(error(type_error('IntPropLevel'(X4)),gecode_argument_error(binpacking(X0,X1,X2,X3,X4),arg=5)))) + ; throw(error(type_error('IntArgs'(X3)),gecode_argument_error(binpacking(X0,X1,X2,X3,X4),arg=4)))) + ; throw(error(type_error('IntVarArgs'(X2)),gecode_argument_error(binpacking(X0,X1,X2,X3,X4),arg=3)))) + ; throw(error(type_error('IntVarArgs'(X1)),gecode_argument_error(binpacking(X0,X1,X2,X3,X4),arg=2)))) + ; throw(error(type_error('Space'(X0)),gecode_argument_error(binpacking(X0,X1,X2,X3,X4),arg=1)))). + +branch(X0,X1,X2) :- + (is_Space_or_Clause(X0,Y0) + -> (is_BoolVar(X1,Y1) + -> (is_BoolValBranch(X2,Y2) + -> gecode_constraint_branch_41(Y0,Y1,Y2) + ; throw(error(type_error('BoolValBranch'(X2)),gecode_argument_error(branch(X0,X1,X2),arg=3)))) + ; (is_FloatVar(X1,Y1) + -> (is_FloatValBranch(X2,Y2) + -> gecode_constraint_branch_43(Y0,Y1,Y2) + ; throw(error(type_error('FloatValBranch'(X2)),gecode_argument_error(branch(X0,X1,X2),arg=3)))) + ; (is_IntVar(X1,Y1) + -> (is_IntValBranch(X2,Y2) + -> gecode_constraint_branch_45(Y0,Y1,Y2) + ; throw(error(type_error('IntValBranch'(X2)),gecode_argument_error(branch(X0,X1,X2),arg=3)))) + ; (is_SetVar(X1,Y1) + -> (is_SetValBranch(X2,Y2) + -> gecode_constraint_branch_47(Y0,Y1,Y2) + ; throw(error(type_error('SetValBranch'(X2)),gecode_argument_error(branch(X0,X1,X2),arg=3)))) + ; throw(error(type_error('SetVar'(X1)),gecode_argument_error(branch(X0,X1,X2),arg=2))))))) + ; throw(error(type_error('Space'(X0)),gecode_argument_error(branch(X0,X1,X2),arg=1)))). + +branch(X0,X1,X2,X3) :- + (is_Space_or_Clause(X0,Y0) + -> (is_BoolVar(X1,Y1) + -> (is_BoolValBranch(X2,Y2) + -> (is_BoolVarValPrint(X3,Y3) + -> gecode_constraint_branch_42(Y0,Y1,Y2,Y3) + ; throw(error(type_error('BoolVarValPrint'(X3)),gecode_argument_error(branch(X0,X1,X2,X3),arg=4)))) + ; throw(error(type_error('BoolValBranch'(X2)),gecode_argument_error(branch(X0,X1,X2,X3),arg=3)))) + ; (is_FloatVar(X1,Y1) + -> (is_FloatValBranch(X2,Y2) + -> (is_FloatVarValPrint(X3,Y3) + -> gecode_constraint_branch_44(Y0,Y1,Y2,Y3) + ; throw(error(type_error('FloatVarValPrint'(X3)),gecode_argument_error(branch(X0,X1,X2,X3),arg=4)))) + ; throw(error(type_error('FloatValBranch'(X2)),gecode_argument_error(branch(X0,X1,X2,X3),arg=3)))) + ; (is_IntVar(X1,Y1) + -> (is_IntValBranch(X2,Y2) + -> (is_IntVarValPrint(X3,Y3) + -> gecode_constraint_branch_46(Y0,Y1,Y2,Y3) + ; throw(error(type_error('IntVarValPrint'(X3)),gecode_argument_error(branch(X0,X1,X2,X3),arg=4)))) + ; throw(error(type_error('IntValBranch'(X2)),gecode_argument_error(branch(X0,X1,X2,X3),arg=3)))) + ; (is_SetVar(X1,Y1) + -> (is_SetValBranch(X2,Y2) + -> (is_SetVarValPrint(X3,Y3) + -> gecode_constraint_branch_48(Y0,Y1,Y2,Y3) + ; throw(error(type_error('SetVarValPrint'(X3)),gecode_argument_error(branch(X0,X1,X2,X3),arg=4)))) + ; throw(error(type_error('SetValBranch'(X2)),gecode_argument_error(branch(X0,X1,X2,X3),arg=3)))) + ; (is_BoolVarArgs(X1,Y1) + -> (is_BoolVarBranch(X2,Y2) + -> (is_BoolValBranch(X3,Y3) + -> gecode_constraint_branch_49(Y0,Y1,Y2,Y3) + ; throw(error(type_error('BoolValBranch'(X3)),gecode_argument_error(branch(X0,X1,X2,X3),arg=4)))) + ; (is_BoolVarBranch(X2,Y2) + -> (is_BoolValBranch(X3,Y3) + -> gecode_constraint_branch_55(Y0,Y1,Y2,Y3) + ; throw(error(type_error('BoolValBranch'(X3)),gecode_argument_error(branch(X0,X1,X2,X3),arg=4)))) + ; throw(error(type_error('TieBreak'(X2)),gecode_argument_error(branch(X0,X1,X2,X3),arg=3))))) + ; (is_FloatVarArgs(X1,Y1) + -> (is_FloatVarBranch(X2,Y2) + -> (is_FloatValBranch(X3,Y3) + -> gecode_constraint_branch_61(Y0,Y1,Y2,Y3) + ; throw(error(type_error('FloatValBranch'(X3)),gecode_argument_error(branch(X0,X1,X2,X3),arg=4)))) + ; (is_FloatVarBranch(X2,Y2) + -> (is_FloatValBranch(X3,Y3) + -> gecode_constraint_branch_64(Y0,Y1,Y2,Y3) + ; throw(error(type_error('FloatValBranch'(X3)),gecode_argument_error(branch(X0,X1,X2,X3),arg=4)))) + ; throw(error(type_error('TieBreak'(X2)),gecode_argument_error(branch(X0,X1,X2,X3),arg=3))))) + ; (is_IntVarArgs(X1,Y1) + -> (is_IntVarBranch(X2,Y2) + -> (is_IntValBranch(X3,Y3) + -> gecode_constraint_branch_67(Y0,Y1,Y2,Y3) + ; throw(error(type_error('IntValBranch'(X3)),gecode_argument_error(branch(X0,X1,X2,X3),arg=4)))) + ; (is_IntVarBranch(X2,Y2) + -> (is_IntValBranch(X3,Y3) + -> gecode_constraint_branch_73(Y0,Y1,Y2,Y3) + ; throw(error(type_error('IntValBranch'(X3)),gecode_argument_error(branch(X0,X1,X2,X3),arg=4)))) + ; throw(error(type_error('TieBreak'(X2)),gecode_argument_error(branch(X0,X1,X2,X3),arg=3))))) + ; (is_SetVarArgs(X1,Y1) + -> (is_SetVarBranch(X2,Y2) + -> (is_SetValBranch(X3,Y3) + -> gecode_constraint_branch_79(Y0,Y1,Y2,Y3) + ; throw(error(type_error('SetValBranch'(X3)),gecode_argument_error(branch(X0,X1,X2,X3),arg=4)))) + ; (is_SetVarBranch(X2,Y2) + -> (is_SetValBranch(X3,Y3) + -> gecode_constraint_branch_85(Y0,Y1,Y2,Y3) + ; throw(error(type_error('SetValBranch'(X3)),gecode_argument_error(branch(X0,X1,X2,X3),arg=4)))) + ; throw(error(type_error('TieBreak'(X2)),gecode_argument_error(branch(X0,X1,X2,X3),arg=3))))) + ; throw(error(type_error('SetVarArgs'(X1)),gecode_argument_error(branch(X0,X1,X2,X3),arg=2))))))))))) + ; throw(error(type_error('Space'(X0)),gecode_argument_error(branch(X0,X1,X2,X3),arg=1)))). + +branch(X0,X1,X2,X3,X4) :- + (is_Space_or_Clause(X0,Y0) + -> (is_BoolVarArgs(X1,Y1) + -> (is_BoolVarBranch(X2,Y2) + -> (is_BoolValBranch(X3,Y3) + -> (is_BoolBranchFilter(X4,Y4) + -> gecode_constraint_branch_50(Y0,Y1,Y2,Y3,Y4) + ; (is_Symmetries(X4,Y4) + -> gecode_constraint_branch_52(Y0,Y1,Y2,Y3,Y4) + ; throw(error(type_error('Symmetries'(X4)),gecode_argument_error(branch(X0,X1,X2,X3,X4),arg=5))))) + ; throw(error(type_error('BoolValBranch'(X3)),gecode_argument_error(branch(X0,X1,X2,X3,X4),arg=4)))) + ; (is_BoolVarBranch(X2,Y2) + -> (is_BoolValBranch(X3,Y3) + -> (is_BoolBranchFilter(X4,Y4) + -> gecode_constraint_branch_56(Y0,Y1,Y2,Y3,Y4) + ; (is_Symmetries(X4,Y4) + -> gecode_constraint_branch_58(Y0,Y1,Y2,Y3,Y4) + ; throw(error(type_error('Symmetries'(X4)),gecode_argument_error(branch(X0,X1,X2,X3,X4),arg=5))))) + ; throw(error(type_error('BoolValBranch'(X3)),gecode_argument_error(branch(X0,X1,X2,X3,X4),arg=4)))) + ; throw(error(type_error('TieBreak'(X2)),gecode_argument_error(branch(X0,X1,X2,X3,X4),arg=3))))) + ; (is_FloatVarArgs(X1,Y1) + -> (is_FloatVarBranch(X2,Y2) + -> (is_FloatValBranch(X3,Y3) + -> (is_FloatBranchFilter(X4,Y4) + -> gecode_constraint_branch_62(Y0,Y1,Y2,Y3,Y4) + ; throw(error(type_error('FloatBranchFilter'(X4)),gecode_argument_error(branch(X0,X1,X2,X3,X4),arg=5)))) + ; throw(error(type_error('FloatValBranch'(X3)),gecode_argument_error(branch(X0,X1,X2,X3,X4),arg=4)))) + ; (is_FloatVarBranch(X2,Y2) + -> (is_FloatValBranch(X3,Y3) + -> (is_FloatBranchFilter(X4,Y4) + -> gecode_constraint_branch_65(Y0,Y1,Y2,Y3,Y4) + ; throw(error(type_error('FloatBranchFilter'(X4)),gecode_argument_error(branch(X0,X1,X2,X3,X4),arg=5)))) + ; throw(error(type_error('FloatValBranch'(X3)),gecode_argument_error(branch(X0,X1,X2,X3,X4),arg=4)))) + ; throw(error(type_error('TieBreak'(X2)),gecode_argument_error(branch(X0,X1,X2,X3,X4),arg=3))))) + ; (is_IntVarArgs(X1,Y1) + -> (is_IntVarBranch(X2,Y2) + -> (is_IntValBranch(X3,Y3) + -> (is_IntBranchFilter(X4,Y4) + -> gecode_constraint_branch_68(Y0,Y1,Y2,Y3,Y4) + ; (is_Symmetries(X4,Y4) + -> gecode_constraint_branch_70(Y0,Y1,Y2,Y3,Y4) + ; throw(error(type_error('Symmetries'(X4)),gecode_argument_error(branch(X0,X1,X2,X3,X4),arg=5))))) + ; throw(error(type_error('IntValBranch'(X3)),gecode_argument_error(branch(X0,X1,X2,X3,X4),arg=4)))) + ; (is_IntVarBranch(X2,Y2) + -> (is_IntValBranch(X3,Y3) + -> (is_IntBranchFilter(X4,Y4) + -> gecode_constraint_branch_74(Y0,Y1,Y2,Y3,Y4) + ; (is_Symmetries(X4,Y4) + -> gecode_constraint_branch_76(Y0,Y1,Y2,Y3,Y4) + ; throw(error(type_error('Symmetries'(X4)),gecode_argument_error(branch(X0,X1,X2,X3,X4),arg=5))))) + ; throw(error(type_error('IntValBranch'(X3)),gecode_argument_error(branch(X0,X1,X2,X3,X4),arg=4)))) + ; throw(error(type_error('TieBreak'(X2)),gecode_argument_error(branch(X0,X1,X2,X3,X4),arg=3))))) + ; (is_SetVarArgs(X1,Y1) + -> (is_SetVarBranch(X2,Y2) + -> (is_SetValBranch(X3,Y3) + -> (is_SetBranchFilter(X4,Y4) + -> gecode_constraint_branch_80(Y0,Y1,Y2,Y3,Y4) + ; (is_Symmetries(X4,Y4) + -> gecode_constraint_branch_82(Y0,Y1,Y2,Y3,Y4) + ; throw(error(type_error('Symmetries'(X4)),gecode_argument_error(branch(X0,X1,X2,X3,X4),arg=5))))) + ; throw(error(type_error('SetValBranch'(X3)),gecode_argument_error(branch(X0,X1,X2,X3,X4),arg=4)))) + ; (is_SetVarBranch(X2,Y2) + -> (is_SetValBranch(X3,Y3) + -> (is_SetBranchFilter(X4,Y4) + -> gecode_constraint_branch_86(Y0,Y1,Y2,Y3,Y4) + ; (is_Symmetries(X4,Y4) + -> gecode_constraint_branch_88(Y0,Y1,Y2,Y3,Y4) + ; throw(error(type_error('Symmetries'(X4)),gecode_argument_error(branch(X0,X1,X2,X3,X4),arg=5))))) + ; throw(error(type_error('SetValBranch'(X3)),gecode_argument_error(branch(X0,X1,X2,X3,X4),arg=4)))) + ; throw(error(type_error('TieBreak'(X2)),gecode_argument_error(branch(X0,X1,X2,X3,X4),arg=3))))) + ; throw(error(type_error('SetVarArgs'(X1)),gecode_argument_error(branch(X0,X1,X2,X3,X4),arg=2))))))) + ; throw(error(type_error('Space'(X0)),gecode_argument_error(branch(X0,X1,X2,X3,X4),arg=1)))). + +branch(X0,X1,X2,X3,X4,X5) :- + (is_Space_or_Clause(X0,Y0) + -> (is_BoolVarArgs(X1,Y1) + -> (is_BoolVarBranch(X2,Y2) + -> (is_BoolValBranch(X3,Y3) + -> (is_BoolBranchFilter(X4,Y4) + -> (is_BoolVarValPrint(X5,Y5) + -> gecode_constraint_branch_51(Y0,Y1,Y2,Y3,Y4,Y5) + ; throw(error(type_error('BoolVarValPrint'(X5)),gecode_argument_error(branch(X0,X1,X2,X3,X4,X5),arg=6)))) + ; (is_Symmetries(X4,Y4) + -> (is_BoolBranchFilter(X5,Y5) + -> gecode_constraint_branch_53(Y0,Y1,Y2,Y3,Y4,Y5) + ; throw(error(type_error('BoolBranchFilter'(X5)),gecode_argument_error(branch(X0,X1,X2,X3,X4,X5),arg=6)))) + ; throw(error(type_error('Symmetries'(X4)),gecode_argument_error(branch(X0,X1,X2,X3,X4,X5),arg=5))))) + ; throw(error(type_error('BoolValBranch'(X3)),gecode_argument_error(branch(X0,X1,X2,X3,X4,X5),arg=4)))) + ; (is_BoolVarBranch(X2,Y2) + -> (is_BoolValBranch(X3,Y3) + -> (is_BoolBranchFilter(X4,Y4) + -> (is_BoolVarValPrint(X5,Y5) + -> gecode_constraint_branch_57(Y0,Y1,Y2,Y3,Y4,Y5) + ; throw(error(type_error('BoolVarValPrint'(X5)),gecode_argument_error(branch(X0,X1,X2,X3,X4,X5),arg=6)))) + ; (is_Symmetries(X4,Y4) + -> (is_BoolBranchFilter(X5,Y5) + -> gecode_constraint_branch_59(Y0,Y1,Y2,Y3,Y4,Y5) + ; throw(error(type_error('BoolBranchFilter'(X5)),gecode_argument_error(branch(X0,X1,X2,X3,X4,X5),arg=6)))) + ; throw(error(type_error('Symmetries'(X4)),gecode_argument_error(branch(X0,X1,X2,X3,X4,X5),arg=5))))) + ; throw(error(type_error('BoolValBranch'(X3)),gecode_argument_error(branch(X0,X1,X2,X3,X4,X5),arg=4)))) + ; throw(error(type_error('TieBreak'(X2)),gecode_argument_error(branch(X0,X1,X2,X3,X4,X5),arg=3))))) + ; (is_FloatVarArgs(X1,Y1) + -> (is_FloatVarBranch(X2,Y2) + -> (is_FloatValBranch(X3,Y3) + -> (is_FloatBranchFilter(X4,Y4) + -> (is_FloatVarValPrint(X5,Y5) + -> gecode_constraint_branch_63(Y0,Y1,Y2,Y3,Y4,Y5) + ; throw(error(type_error('FloatVarValPrint'(X5)),gecode_argument_error(branch(X0,X1,X2,X3,X4,X5),arg=6)))) + ; throw(error(type_error('FloatBranchFilter'(X4)),gecode_argument_error(branch(X0,X1,X2,X3,X4,X5),arg=5)))) + ; throw(error(type_error('FloatValBranch'(X3)),gecode_argument_error(branch(X0,X1,X2,X3,X4,X5),arg=4)))) + ; (is_FloatVarBranch(X2,Y2) + -> (is_FloatValBranch(X3,Y3) + -> (is_FloatBranchFilter(X4,Y4) + -> (is_FloatVarValPrint(X5,Y5) + -> gecode_constraint_branch_66(Y0,Y1,Y2,Y3,Y4,Y5) + ; throw(error(type_error('FloatVarValPrint'(X5)),gecode_argument_error(branch(X0,X1,X2,X3,X4,X5),arg=6)))) + ; throw(error(type_error('FloatBranchFilter'(X4)),gecode_argument_error(branch(X0,X1,X2,X3,X4,X5),arg=5)))) + ; throw(error(type_error('FloatValBranch'(X3)),gecode_argument_error(branch(X0,X1,X2,X3,X4,X5),arg=4)))) + ; throw(error(type_error('TieBreak'(X2)),gecode_argument_error(branch(X0,X1,X2,X3,X4,X5),arg=3))))) + ; (is_IntVarArgs(X1,Y1) + -> (is_IntVarBranch(X2,Y2) + -> (is_IntValBranch(X3,Y3) + -> (is_IntBranchFilter(X4,Y4) + -> (is_IntVarValPrint(X5,Y5) + -> gecode_constraint_branch_69(Y0,Y1,Y2,Y3,Y4,Y5) + ; throw(error(type_error('IntVarValPrint'(X5)),gecode_argument_error(branch(X0,X1,X2,X3,X4,X5),arg=6)))) + ; (is_Symmetries(X4,Y4) + -> (is_IntBranchFilter(X5,Y5) + -> gecode_constraint_branch_71(Y0,Y1,Y2,Y3,Y4,Y5) + ; throw(error(type_error('IntBranchFilter'(X5)),gecode_argument_error(branch(X0,X1,X2,X3,X4,X5),arg=6)))) + ; throw(error(type_error('Symmetries'(X4)),gecode_argument_error(branch(X0,X1,X2,X3,X4,X5),arg=5))))) + ; throw(error(type_error('IntValBranch'(X3)),gecode_argument_error(branch(X0,X1,X2,X3,X4,X5),arg=4)))) + ; (is_IntVarBranch(X2,Y2) + -> (is_IntValBranch(X3,Y3) + -> (is_IntBranchFilter(X4,Y4) + -> (is_IntVarValPrint(X5,Y5) + -> gecode_constraint_branch_75(Y0,Y1,Y2,Y3,Y4,Y5) + ; throw(error(type_error('IntVarValPrint'(X5)),gecode_argument_error(branch(X0,X1,X2,X3,X4,X5),arg=6)))) + ; (is_Symmetries(X4,Y4) + -> (is_IntBranchFilter(X5,Y5) + -> gecode_constraint_branch_77(Y0,Y1,Y2,Y3,Y4,Y5) + ; throw(error(type_error('IntBranchFilter'(X5)),gecode_argument_error(branch(X0,X1,X2,X3,X4,X5),arg=6)))) + ; throw(error(type_error('Symmetries'(X4)),gecode_argument_error(branch(X0,X1,X2,X3,X4,X5),arg=5))))) + ; throw(error(type_error('IntValBranch'(X3)),gecode_argument_error(branch(X0,X1,X2,X3,X4,X5),arg=4)))) + ; throw(error(type_error('TieBreak'(X2)),gecode_argument_error(branch(X0,X1,X2,X3,X4,X5),arg=3))))) + ; (is_SetVarArgs(X1,Y1) + -> (is_SetVarBranch(X2,Y2) + -> (is_SetValBranch(X3,Y3) + -> (is_SetBranchFilter(X4,Y4) + -> (is_SetVarValPrint(X5,Y5) + -> gecode_constraint_branch_81(Y0,Y1,Y2,Y3,Y4,Y5) + ; throw(error(type_error('SetVarValPrint'(X5)),gecode_argument_error(branch(X0,X1,X2,X3,X4,X5),arg=6)))) + ; (is_Symmetries(X4,Y4) + -> (is_SetBranchFilter(X5,Y5) + -> gecode_constraint_branch_83(Y0,Y1,Y2,Y3,Y4,Y5) + ; throw(error(type_error('SetBranchFilter'(X5)),gecode_argument_error(branch(X0,X1,X2,X3,X4,X5),arg=6)))) + ; throw(error(type_error('Symmetries'(X4)),gecode_argument_error(branch(X0,X1,X2,X3,X4,X5),arg=5))))) + ; throw(error(type_error('SetValBranch'(X3)),gecode_argument_error(branch(X0,X1,X2,X3,X4,X5),arg=4)))) + ; (is_SetVarBranch(X2,Y2) + -> (is_SetValBranch(X3,Y3) + -> (is_SetBranchFilter(X4,Y4) + -> (is_SetVarValPrint(X5,Y5) + -> gecode_constraint_branch_87(Y0,Y1,Y2,Y3,Y4,Y5) + ; throw(error(type_error('SetVarValPrint'(X5)),gecode_argument_error(branch(X0,X1,X2,X3,X4,X5),arg=6)))) + ; (is_Symmetries(X4,Y4) + -> (is_SetBranchFilter(X5,Y5) + -> gecode_constraint_branch_89(Y0,Y1,Y2,Y3,Y4,Y5) + ; throw(error(type_error('SetBranchFilter'(X5)),gecode_argument_error(branch(X0,X1,X2,X3,X4,X5),arg=6)))) + ; throw(error(type_error('Symmetries'(X4)),gecode_argument_error(branch(X0,X1,X2,X3,X4,X5),arg=5))))) + ; throw(error(type_error('SetValBranch'(X3)),gecode_argument_error(branch(X0,X1,X2,X3,X4,X5),arg=4)))) + ; throw(error(type_error('TieBreak'(X2)),gecode_argument_error(branch(X0,X1,X2,X3,X4,X5),arg=3))))) + ; throw(error(type_error('SetVarArgs'(X1)),gecode_argument_error(branch(X0,X1,X2,X3,X4,X5),arg=2))))))) + ; throw(error(type_error('Space'(X0)),gecode_argument_error(branch(X0,X1,X2,X3,X4,X5),arg=1)))). + +branch(X0,X1,X2,X3,X4,X5,X6) :- + (is_Space_or_Clause(X0,Y0) + -> (is_BoolVarArgs(X1,Y1) + -> (is_BoolVarBranch(X2,Y2) + -> (is_BoolValBranch(X3,Y3) + -> (is_Symmetries(X4,Y4) + -> (is_BoolBranchFilter(X5,Y5) + -> (is_BoolVarValPrint(X6,Y6) + -> gecode_constraint_branch_54(Y0,Y1,Y2,Y3,Y4,Y5,Y6) + ; throw(error(type_error('BoolVarValPrint'(X6)),gecode_argument_error(branch(X0,X1,X2,X3,X4,X5,X6),arg=7)))) + ; throw(error(type_error('BoolBranchFilter'(X5)),gecode_argument_error(branch(X0,X1,X2,X3,X4,X5,X6),arg=6)))) + ; throw(error(type_error('Symmetries'(X4)),gecode_argument_error(branch(X0,X1,X2,X3,X4,X5,X6),arg=5)))) + ; throw(error(type_error('BoolValBranch'(X3)),gecode_argument_error(branch(X0,X1,X2,X3,X4,X5,X6),arg=4)))) + ; (is_BoolVarBranch(X2,Y2) + -> (is_BoolValBranch(X3,Y3) + -> (is_Symmetries(X4,Y4) + -> (is_BoolBranchFilter(X5,Y5) + -> (is_BoolVarValPrint(X6,Y6) + -> gecode_constraint_branch_60(Y0,Y1,Y2,Y3,Y4,Y5,Y6) + ; throw(error(type_error('BoolVarValPrint'(X6)),gecode_argument_error(branch(X0,X1,X2,X3,X4,X5,X6),arg=7)))) + ; throw(error(type_error('BoolBranchFilter'(X5)),gecode_argument_error(branch(X0,X1,X2,X3,X4,X5,X6),arg=6)))) + ; throw(error(type_error('Symmetries'(X4)),gecode_argument_error(branch(X0,X1,X2,X3,X4,X5,X6),arg=5)))) + ; throw(error(type_error('BoolValBranch'(X3)),gecode_argument_error(branch(X0,X1,X2,X3,X4,X5,X6),arg=4)))) + ; throw(error(type_error('TieBreak'(X2)),gecode_argument_error(branch(X0,X1,X2,X3,X4,X5,X6),arg=3))))) + ; (is_IntVarArgs(X1,Y1) + -> (is_IntVarBranch(X2,Y2) + -> (is_IntValBranch(X3,Y3) + -> (is_Symmetries(X4,Y4) + -> (is_IntBranchFilter(X5,Y5) + -> (is_IntVarValPrint(X6,Y6) + -> gecode_constraint_branch_72(Y0,Y1,Y2,Y3,Y4,Y5,Y6) + ; throw(error(type_error('IntVarValPrint'(X6)),gecode_argument_error(branch(X0,X1,X2,X3,X4,X5,X6),arg=7)))) + ; throw(error(type_error('IntBranchFilter'(X5)),gecode_argument_error(branch(X0,X1,X2,X3,X4,X5,X6),arg=6)))) + ; throw(error(type_error('Symmetries'(X4)),gecode_argument_error(branch(X0,X1,X2,X3,X4,X5,X6),arg=5)))) + ; throw(error(type_error('IntValBranch'(X3)),gecode_argument_error(branch(X0,X1,X2,X3,X4,X5,X6),arg=4)))) + ; (is_IntVarBranch(X2,Y2) + -> (is_IntValBranch(X3,Y3) + -> (is_Symmetries(X4,Y4) + -> (is_IntBranchFilter(X5,Y5) + -> (is_IntVarValPrint(X6,Y6) + -> gecode_constraint_branch_78(Y0,Y1,Y2,Y3,Y4,Y5,Y6) + ; throw(error(type_error('IntVarValPrint'(X6)),gecode_argument_error(branch(X0,X1,X2,X3,X4,X5,X6),arg=7)))) + ; throw(error(type_error('IntBranchFilter'(X5)),gecode_argument_error(branch(X0,X1,X2,X3,X4,X5,X6),arg=6)))) + ; throw(error(type_error('Symmetries'(X4)),gecode_argument_error(branch(X0,X1,X2,X3,X4,X5,X6),arg=5)))) + ; throw(error(type_error('IntValBranch'(X3)),gecode_argument_error(branch(X0,X1,X2,X3,X4,X5,X6),arg=4)))) + ; throw(error(type_error('TieBreak'(X2)),gecode_argument_error(branch(X0,X1,X2,X3,X4,X5,X6),arg=3))))) + ; (is_SetVarArgs(X1,Y1) + -> (is_SetVarBranch(X2,Y2) + -> (is_SetValBranch(X3,Y3) + -> (is_Symmetries(X4,Y4) + -> (is_SetBranchFilter(X5,Y5) + -> (is_SetVarValPrint(X6,Y6) + -> gecode_constraint_branch_84(Y0,Y1,Y2,Y3,Y4,Y5,Y6) + ; throw(error(type_error('SetVarValPrint'(X6)),gecode_argument_error(branch(X0,X1,X2,X3,X4,X5,X6),arg=7)))) + ; throw(error(type_error('SetBranchFilter'(X5)),gecode_argument_error(branch(X0,X1,X2,X3,X4,X5,X6),arg=6)))) + ; throw(error(type_error('Symmetries'(X4)),gecode_argument_error(branch(X0,X1,X2,X3,X4,X5,X6),arg=5)))) + ; throw(error(type_error('SetValBranch'(X3)),gecode_argument_error(branch(X0,X1,X2,X3,X4,X5,X6),arg=4)))) + ; (is_SetVarBranch(X2,Y2) + -> (is_SetValBranch(X3,Y3) + -> (is_Symmetries(X4,Y4) + -> (is_SetBranchFilter(X5,Y5) + -> (is_SetVarValPrint(X6,Y6) + -> gecode_constraint_branch_90(Y0,Y1,Y2,Y3,Y4,Y5,Y6) + ; throw(error(type_error('SetVarValPrint'(X6)),gecode_argument_error(branch(X0,X1,X2,X3,X4,X5,X6),arg=7)))) + ; throw(error(type_error('SetBranchFilter'(X5)),gecode_argument_error(branch(X0,X1,X2,X3,X4,X5,X6),arg=6)))) + ; throw(error(type_error('Symmetries'(X4)),gecode_argument_error(branch(X0,X1,X2,X3,X4,X5,X6),arg=5)))) + ; throw(error(type_error('SetValBranch'(X3)),gecode_argument_error(branch(X0,X1,X2,X3,X4,X5,X6),arg=4)))) + ; throw(error(type_error('TieBreak'(X2)),gecode_argument_error(branch(X0,X1,X2,X3,X4,X5,X6),arg=3))))) + ; throw(error(type_error('SetVarArgs'(X1)),gecode_argument_error(branch(X0,X1,X2,X3,X4,X5,X6),arg=2)))))) + ; throw(error(type_error('Space'(X0)),gecode_argument_error(branch(X0,X1,X2,X3,X4,X5,X6),arg=1)))). + +cardinality(X0,X1,X2,X3) :- + (is_Space_or_Clause(X0,Y0) + -> (is_SetVar(X1,Y1) + -> (is_int(X2,Y2) + -> (is_int(X3,Y3) + -> gecode_constraint_cardinality_91(Y0,Y1,Y2,Y3) + ; throw(error(type_error(int(X3)),gecode_argument_error(cardinality(X0,X1,X2,X3),arg=4)))) + ; throw(error(type_error(int(X2)),gecode_argument_error(cardinality(X0,X1,X2,X3),arg=3)))) + ; (is_SetVarArgs(X1,Y1) + -> (is_int(X2,Y2) + -> (is_int(X3,Y3) + -> gecode_constraint_cardinality_92(Y0,Y1,Y2,Y3) + ; throw(error(type_error(int(X3)),gecode_argument_error(cardinality(X0,X1,X2,X3),arg=4)))) + ; throw(error(type_error(int(X2)),gecode_argument_error(cardinality(X0,X1,X2,X3),arg=3)))) + ; throw(error(type_error('SetVarArgs'(X1)),gecode_argument_error(cardinality(X0,X1,X2,X3),arg=2))))) + ; throw(error(type_error('Space'(X0)),gecode_argument_error(cardinality(X0,X1,X2,X3),arg=1)))). + +channel(X0,X1,X2) :- + (is_Space_or_Clause(X0,Y0) + -> (is_BoolVar(X1,Y1) + -> (is_IntVar(X2,Y2) + -> gecode_constraint_channel_93(Y0,Y1,Y2) + ; throw(error(type_error('IntVar'(X2)),gecode_argument_error(channel(X0,X1,X2),arg=3)))) + ; (is_FloatVar(X1,Y1) + -> (is_BoolVar(X2,Y2) + -> gecode_constraint_channel_95(Y0,Y1,Y2) + ; (is_IntVar(X2,Y2) + -> gecode_constraint_channel_96(Y0,Y1,Y2) + ; throw(error(type_error('IntVar'(X2)),gecode_argument_error(channel(X0,X1,X2),arg=3))))) + ; (is_BoolVarArgs(X1,Y1) + -> (is_IntVar(X2,Y2) + -> gecode_constraint_channel_97(Y0,Y1,Y2) + ; throw(error(type_error('IntVar'(X2)),gecode_argument_error(channel(X0,X1,X2),arg=3)))) + ; (is_IntVarArgs(X1,Y1) + -> (is_IntVarArgs(X2,Y2) + -> gecode_constraint_channel_100(Y0,Y1,Y2) + ; throw(error(type_error('IntVarArgs'(X2)),gecode_argument_error(channel(X0,X1,X2),arg=3)))) + ; throw(error(type_error('IntVarArgs'(X1)),gecode_argument_error(channel(X0,X1,X2),arg=2))))))) + ; throw(error(type_error('Space'(X0)),gecode_argument_error(channel(X0,X1,X2),arg=1)))). + +channel(X0,X1,X2,X3) :- + (is_Space_or_Clause(X0,Y0) + -> (is_BoolVar(X1,Y1) + -> (is_IntVar(X2,Y2) + -> (is_IntPropLevel(X3,Y3) + -> gecode_constraint_channel_94(Y0,Y1,Y2,Y3) + ; throw(error(type_error('IntPropLevel'(X3)),gecode_argument_error(channel(X0,X1,X2,X3),arg=4)))) + ; throw(error(type_error('IntVar'(X2)),gecode_argument_error(channel(X0,X1,X2,X3),arg=3)))) + ; (is_BoolVarArgs(X1,Y1) + -> (is_IntVar(X2,Y2) + -> (is_int(X3,Y3) + -> gecode_constraint_channel_98(Y0,Y1,Y2,Y3) + ; throw(error(type_error(int(X3)),gecode_argument_error(channel(X0,X1,X2,X3),arg=4)))) + ; throw(error(type_error('IntVar'(X2)),gecode_argument_error(channel(X0,X1,X2,X3),arg=3)))) + ; (is_IntVarArgs(X1,Y1) + -> (is_IntVarArgs(X2,Y2) + -> (is_IntPropLevel(X3,Y3) + -> gecode_constraint_channel_101(Y0,Y1,Y2,Y3) + ; throw(error(type_error('IntPropLevel'(X3)),gecode_argument_error(channel(X0,X1,X2,X3),arg=4)))) + ; throw(error(type_error('IntVarArgs'(X2)),gecode_argument_error(channel(X0,X1,X2,X3),arg=3)))) + ; throw(error(type_error('IntVarArgs'(X1)),gecode_argument_error(channel(X0,X1,X2,X3),arg=2)))))) + ; throw(error(type_error('Space'(X0)),gecode_argument_error(channel(X0,X1,X2,X3),arg=1)))). + +channel(X0,X1,X2,X3,X4) :- + (is_Space_or_Clause(X0,Y0) + -> (is_BoolVarArgs(X1,Y1) + -> (is_IntVar(X2,Y2) + -> (is_int(X3,Y3) + -> (is_IntPropLevel(X4,Y4) + -> gecode_constraint_channel_99(Y0,Y1,Y2,Y3,Y4) + ; throw(error(type_error('IntPropLevel'(X4)),gecode_argument_error(channel(X0,X1,X2,X3,X4),arg=5)))) + ; throw(error(type_error(int(X3)),gecode_argument_error(channel(X0,X1,X2,X3,X4),arg=4)))) + ; throw(error(type_error('IntVar'(X2)),gecode_argument_error(channel(X0,X1,X2,X3,X4),arg=3)))) + ; (is_IntVarArgs(X1,Y1) + -> (is_int(X2,Y2) + -> (is_IntVarArgs(X3,Y3) + -> (is_int(X4,Y4) + -> gecode_constraint_channel_102(Y0,Y1,Y2,Y3,Y4) + ; throw(error(type_error(int(X4)),gecode_argument_error(channel(X0,X1,X2,X3,X4),arg=5)))) + ; throw(error(type_error('IntVarArgs'(X3)),gecode_argument_error(channel(X0,X1,X2,X3,X4),arg=4)))) + ; throw(error(type_error(int(X2)),gecode_argument_error(channel(X0,X1,X2,X3,X4),arg=3)))) + ; throw(error(type_error('IntVarArgs'(X1)),gecode_argument_error(channel(X0,X1,X2,X3,X4),arg=2))))) + ; throw(error(type_error('Space'(X0)),gecode_argument_error(channel(X0,X1,X2,X3,X4),arg=1)))). + +channel(X0,X1,X2,X3,X4,X5) :- + (is_Space_or_Clause(X0,Y0) + -> (is_IntVarArgs(X1,Y1) + -> (is_int(X2,Y2) + -> (is_IntVarArgs(X3,Y3) + -> (is_int(X4,Y4) + -> (is_IntPropLevel(X5,Y5) + -> gecode_constraint_channel_103(Y0,Y1,Y2,Y3,Y4,Y5) + ; throw(error(type_error('IntPropLevel'(X5)),gecode_argument_error(channel(X0,X1,X2,X3,X4,X5),arg=6)))) + ; throw(error(type_error(int(X4)),gecode_argument_error(channel(X0,X1,X2,X3,X4,X5),arg=5)))) + ; throw(error(type_error('IntVarArgs'(X3)),gecode_argument_error(channel(X0,X1,X2,X3,X4,X5),arg=4)))) + ; throw(error(type_error(int(X2)),gecode_argument_error(channel(X0,X1,X2,X3,X4,X5),arg=3)))) + ; throw(error(type_error('IntVarArgs'(X1)),gecode_argument_error(channel(X0,X1,X2,X3,X4,X5),arg=2)))) + ; throw(error(type_error('Space'(X0)),gecode_argument_error(channel(X0,X1,X2,X3,X4,X5),arg=1)))). + +circuit(X0,X1,X2,X3) :- + (is_Space_or_Clause(X0,Y0) + -> (is_IntArgs(X1,Y1) + -> (is_IntVarArgs(X2,Y2) + -> (is_IntVar(X3,Y3) + -> gecode_constraint_circuit_104(Y0,Y1,Y2,Y3) + ; throw(error(type_error('IntVar'(X3)),gecode_argument_error(circuit(X0,X1,X2,X3),arg=4)))) + ; throw(error(type_error('IntVarArgs'(X2)),gecode_argument_error(circuit(X0,X1,X2,X3),arg=3)))) + ; (is_int(X1,Y1) + -> (is_IntVarArgs(X2,Y2) + -> (is_IntPropLevel(X3,Y3) + -> gecode_constraint_circuit_115(Y0,Y1,Y2,Y3) + ; throw(error(type_error('IntPropLevel'(X3)),gecode_argument_error(circuit(X0,X1,X2,X3),arg=4)))) + ; throw(error(type_error('IntVarArgs'(X2)),gecode_argument_error(circuit(X0,X1,X2,X3),arg=3)))) + ; throw(error(type_error(int(X1)),gecode_argument_error(circuit(X0,X1,X2,X3),arg=2))))) + ; throw(error(type_error('Space'(X0)),gecode_argument_error(circuit(X0,X1,X2,X3),arg=1)))). + +circuit(X0,X1,X2,X3,X4) :- + (is_Space_or_Clause(X0,Y0) + -> (is_IntArgs(X1,Y1) + -> (is_IntVarArgs(X2,Y2) + -> (is_IntVar(X3,Y3) + -> (is_IntPropLevel(X4,Y4) + -> gecode_constraint_circuit_105(Y0,Y1,Y2,Y3,Y4) + ; throw(error(type_error('IntPropLevel'(X4)),gecode_argument_error(circuit(X0,X1,X2,X3,X4),arg=5)))) + ; (is_IntVarArgs(X3,Y3) + -> (is_IntVar(X4,Y4) + -> gecode_constraint_circuit_106(Y0,Y1,Y2,Y3,Y4) + ; throw(error(type_error('IntVar'(X4)),gecode_argument_error(circuit(X0,X1,X2,X3,X4),arg=5)))) + ; throw(error(type_error('IntVarArgs'(X3)),gecode_argument_error(circuit(X0,X1,X2,X3,X4),arg=4))))) + ; (is_int(X2,Y2) + -> (is_IntVarArgs(X3,Y3) + -> (is_IntVar(X4,Y4) + -> gecode_constraint_circuit_108(Y0,Y1,Y2,Y3,Y4) + ; throw(error(type_error('IntVar'(X4)),gecode_argument_error(circuit(X0,X1,X2,X3,X4),arg=5)))) + ; throw(error(type_error('IntVarArgs'(X3)),gecode_argument_error(circuit(X0,X1,X2,X3,X4),arg=4)))) + ; throw(error(type_error(int(X2)),gecode_argument_error(circuit(X0,X1,X2,X3,X4),arg=3))))) + ; throw(error(type_error('IntArgs'(X1)),gecode_argument_error(circuit(X0,X1,X2,X3,X4),arg=2)))) + ; throw(error(type_error('Space'(X0)),gecode_argument_error(circuit(X0,X1,X2,X3,X4),arg=1)))). + +circuit(X0,X1,X2,X3,X4,X5) :- + (is_Space_or_Clause(X0,Y0) + -> (is_IntArgs(X1,Y1) + -> (is_IntVarArgs(X2,Y2) + -> (is_IntVarArgs(X3,Y3) + -> (is_IntVar(X4,Y4) + -> (is_IntPropLevel(X5,Y5) + -> gecode_constraint_circuit_107(Y0,Y1,Y2,Y3,Y4,Y5) + ; throw(error(type_error('IntPropLevel'(X5)),gecode_argument_error(circuit(X0,X1,X2,X3,X4,X5),arg=6)))) + ; throw(error(type_error('IntVar'(X4)),gecode_argument_error(circuit(X0,X1,X2,X3,X4,X5),arg=5)))) + ; throw(error(type_error('IntVarArgs'(X3)),gecode_argument_error(circuit(X0,X1,X2,X3,X4,X5),arg=4)))) + ; (is_int(X2,Y2) + -> (is_IntVarArgs(X3,Y3) + -> (is_IntVar(X4,Y4) + -> (is_IntPropLevel(X5,Y5) + -> gecode_constraint_circuit_109(Y0,Y1,Y2,Y3,Y4,Y5) + ; throw(error(type_error('IntPropLevel'(X5)),gecode_argument_error(circuit(X0,X1,X2,X3,X4,X5),arg=6)))) + ; (is_IntVarArgs(X4,Y4) + -> (is_IntVar(X5,Y5) + -> gecode_constraint_circuit_110(Y0,Y1,Y2,Y3,Y4,Y5) + ; throw(error(type_error('IntVar'(X5)),gecode_argument_error(circuit(X0,X1,X2,X3,X4,X5),arg=6)))) + ; throw(error(type_error('IntVarArgs'(X4)),gecode_argument_error(circuit(X0,X1,X2,X3,X4,X5),arg=5))))) + ; throw(error(type_error('IntVarArgs'(X3)),gecode_argument_error(circuit(X0,X1,X2,X3,X4,X5),arg=4)))) + ; throw(error(type_error(int(X2)),gecode_argument_error(circuit(X0,X1,X2,X3,X4,X5),arg=3))))) + ; throw(error(type_error('IntArgs'(X1)),gecode_argument_error(circuit(X0,X1,X2,X3,X4,X5),arg=2)))) + ; throw(error(type_error('Space'(X0)),gecode_argument_error(circuit(X0,X1,X2,X3,X4,X5),arg=1)))). + +circuit(X0,X1,X2,X3,X4,X5,X6) :- + (is_Space_or_Clause(X0,Y0) + -> (is_IntArgs(X1,Y1) + -> (is_int(X2,Y2) + -> (is_IntVarArgs(X3,Y3) + -> (is_IntVarArgs(X4,Y4) + -> (is_IntVar(X5,Y5) + -> (is_IntPropLevel(X6,Y6) + -> gecode_constraint_circuit_111(Y0,Y1,Y2,Y3,Y4,Y5,Y6) + ; throw(error(type_error('IntPropLevel'(X6)),gecode_argument_error(circuit(X0,X1,X2,X3,X4,X5,X6),arg=7)))) + ; throw(error(type_error('IntVar'(X5)),gecode_argument_error(circuit(X0,X1,X2,X3,X4,X5,X6),arg=6)))) + ; throw(error(type_error('IntVarArgs'(X4)),gecode_argument_error(circuit(X0,X1,X2,X3,X4,X5,X6),arg=5)))) + ; throw(error(type_error('IntVarArgs'(X3)),gecode_argument_error(circuit(X0,X1,X2,X3,X4,X5,X6),arg=4)))) + ; throw(error(type_error(int(X2)),gecode_argument_error(circuit(X0,X1,X2,X3,X4,X5,X6),arg=3)))) + ; throw(error(type_error('IntArgs'(X1)),gecode_argument_error(circuit(X0,X1,X2,X3,X4,X5,X6),arg=2)))) + ; throw(error(type_error('Space'(X0)),gecode_argument_error(circuit(X0,X1,X2,X3,X4,X5,X6),arg=1)))). + +circuit(X0,X1) :- + (is_Space_or_Clause(X0,Y0) + -> (is_IntVarArgs(X1,Y1) + -> gecode_constraint_circuit_112(Y0,Y1) + ; throw(error(type_error('IntVarArgs'(X1)),gecode_argument_error(circuit(X0,X1),arg=2)))) + ; throw(error(type_error('Space'(X0)),gecode_argument_error(circuit(X0,X1),arg=1)))). + +circuit(X0,X1,X2) :- + (is_Space_or_Clause(X0,Y0) + -> (is_IntVarArgs(X1,Y1) + -> (is_IntPropLevel(X2,Y2) + -> gecode_constraint_circuit_113(Y0,Y1,Y2) + ; throw(error(type_error('IntPropLevel'(X2)),gecode_argument_error(circuit(X0,X1,X2),arg=3)))) + ; (is_int(X1,Y1) + -> (is_IntVarArgs(X2,Y2) + -> gecode_constraint_circuit_114(Y0,Y1,Y2) + ; throw(error(type_error('IntVarArgs'(X2)),gecode_argument_error(circuit(X0,X1,X2),arg=3)))) + ; throw(error(type_error(int(X1)),gecode_argument_error(circuit(X0,X1,X2),arg=2))))) + ; throw(error(type_error('Space'(X0)),gecode_argument_error(circuit(X0,X1,X2),arg=1)))). + +clause(X0,X1,X2,X3,X4) :- + (is_Space_or_Clause(X0,Y0) + -> (is_BoolOpType(X1,Y1) + -> (is_BoolVarArgs(X2,Y2) + -> (is_BoolVarArgs(X3,Y3) + -> (is_BoolVar(X4,Y4) + -> gecode_constraint_clause_116(Y0,Y1,Y2,Y3,Y4) + ; (is_int(X4,Y4) + -> gecode_constraint_clause_118(Y0,Y1,Y2,Y3,Y4) + ; throw(error(type_error(int(X4)),gecode_argument_error(clause(X0,X1,X2,X3,X4),arg=5))))) + ; throw(error(type_error('BoolVarArgs'(X3)),gecode_argument_error(clause(X0,X1,X2,X3,X4),arg=4)))) + ; throw(error(type_error('BoolVarArgs'(X2)),gecode_argument_error(clause(X0,X1,X2,X3,X4),arg=3)))) + ; throw(error(type_error('BoolOpType'(X1)),gecode_argument_error(clause(X0,X1,X2,X3,X4),arg=2)))) + ; throw(error(type_error('Space'(X0)),gecode_argument_error(clause(X0,X1,X2,X3,X4),arg=1)))). + +clause(X0,X1,X2,X3,X4,X5) :- + (is_Space_or_Clause(X0,Y0) + -> (is_BoolOpType(X1,Y1) + -> (is_BoolVarArgs(X2,Y2) + -> (is_BoolVarArgs(X3,Y3) + -> (is_BoolVar(X4,Y4) + -> (is_IntPropLevel(X5,Y5) + -> gecode_constraint_clause_117(Y0,Y1,Y2,Y3,Y4,Y5) + ; throw(error(type_error('IntPropLevel'(X5)),gecode_argument_error(clause(X0,X1,X2,X3,X4,X5),arg=6)))) + ; (is_int(X4,Y4) + -> (is_IntPropLevel(X5,Y5) + -> gecode_constraint_clause_119(Y0,Y1,Y2,Y3,Y4,Y5) + ; throw(error(type_error('IntPropLevel'(X5)),gecode_argument_error(clause(X0,X1,X2,X3,X4,X5),arg=6)))) + ; throw(error(type_error(int(X4)),gecode_argument_error(clause(X0,X1,X2,X3,X4,X5),arg=5))))) + ; throw(error(type_error('BoolVarArgs'(X3)),gecode_argument_error(clause(X0,X1,X2,X3,X4,X5),arg=4)))) + ; throw(error(type_error('BoolVarArgs'(X2)),gecode_argument_error(clause(X0,X1,X2,X3,X4,X5),arg=3)))) + ; throw(error(type_error('BoolOpType'(X1)),gecode_argument_error(clause(X0,X1,X2,X3,X4,X5),arg=2)))) + ; throw(error(type_error('Space'(X0)),gecode_argument_error(clause(X0,X1,X2,X3,X4,X5),arg=1)))). + +count(X0,X1,X2,X3,X4) :- + (is_Space_or_Clause(X0,Y0) + -> (is_IntVarArgs(X1,Y1) + -> (is_IntVar(X2,Y2) + -> (is_IntRelType(X3,Y3) + -> (is_IntVar(X4,Y4) + -> gecode_constraint_count_120(Y0,Y1,Y2,Y3,Y4) + ; (is_int(X4,Y4) + -> gecode_constraint_count_122(Y0,Y1,Y2,Y3,Y4) + ; throw(error(type_error(int(X4)),gecode_argument_error(count(X0,X1,X2,X3,X4),arg=5))))) + ; throw(error(type_error('IntRelType'(X3)),gecode_argument_error(count(X0,X1,X2,X3,X4),arg=4)))) + ; (is_IntArgs(X2,Y2) + -> (is_IntRelType(X3,Y3) + -> (is_IntVar(X4,Y4) + -> gecode_constraint_count_124(Y0,Y1,Y2,Y3,Y4) + ; (is_int(X4,Y4) + -> gecode_constraint_count_126(Y0,Y1,Y2,Y3,Y4) + ; throw(error(type_error(int(X4)),gecode_argument_error(count(X0,X1,X2,X3,X4),arg=5))))) + ; throw(error(type_error('IntRelType'(X3)),gecode_argument_error(count(X0,X1,X2,X3,X4),arg=4)))) + ; (is_IntSet(X2,Y2) + -> (is_IntRelType(X3,Y3) + -> (is_IntVar(X4,Y4) + -> gecode_constraint_count_128(Y0,Y1,Y2,Y3,Y4) + ; (is_int(X4,Y4) + -> gecode_constraint_count_130(Y0,Y1,Y2,Y3,Y4) + ; throw(error(type_error(int(X4)),gecode_argument_error(count(X0,X1,X2,X3,X4),arg=5))))) + ; (is_IntArgs(X3,Y3) + -> (is_IntPropLevel(X4,Y4) + -> gecode_constraint_count_133(Y0,Y1,Y2,Y3,Y4) + ; throw(error(type_error('IntPropLevel'(X4)),gecode_argument_error(count(X0,X1,X2,X3,X4),arg=5)))) + ; throw(error(type_error('IntArgs'(X3)),gecode_argument_error(count(X0,X1,X2,X3,X4),arg=4))))) + ; (is_IntSetArgs(X2,Y2) + -> (is_IntArgs(X3,Y3) + -> (is_IntPropLevel(X4,Y4) + -> gecode_constraint_count_137(Y0,Y1,Y2,Y3,Y4) + ; throw(error(type_error('IntPropLevel'(X4)),gecode_argument_error(count(X0,X1,X2,X3,X4),arg=5)))) + ; throw(error(type_error('IntArgs'(X3)),gecode_argument_error(count(X0,X1,X2,X3,X4),arg=4)))) + ; (is_IntVarArgs(X2,Y2) + -> (is_IntArgs(X3,Y3) + -> (is_IntPropLevel(X4,Y4) + -> gecode_constraint_count_141(Y0,Y1,Y2,Y3,Y4) + ; throw(error(type_error('IntPropLevel'(X4)),gecode_argument_error(count(X0,X1,X2,X3,X4),arg=5)))) + ; throw(error(type_error('IntArgs'(X3)),gecode_argument_error(count(X0,X1,X2,X3,X4),arg=4)))) + ; (is_int(X2,Y2) + -> (is_IntRelType(X3,Y3) + -> (is_IntVar(X4,Y4) + -> gecode_constraint_count_142(Y0,Y1,Y2,Y3,Y4) + ; (is_int(X4,Y4) + -> gecode_constraint_count_144(Y0,Y1,Y2,Y3,Y4) + ; throw(error(type_error(int(X4)),gecode_argument_error(count(X0,X1,X2,X3,X4),arg=5))))) + ; throw(error(type_error('IntRelType'(X3)),gecode_argument_error(count(X0,X1,X2,X3,X4),arg=4)))) + ; throw(error(type_error(int(X2)),gecode_argument_error(count(X0,X1,X2,X3,X4),arg=3))))))))) + ; throw(error(type_error('IntVarArgs'(X1)),gecode_argument_error(count(X0,X1,X2,X3,X4),arg=2)))) + ; throw(error(type_error('Space'(X0)),gecode_argument_error(count(X0,X1,X2,X3,X4),arg=1)))). + +count(X0,X1,X2,X3,X4,X5) :- + (is_Space_or_Clause(X0,Y0) + -> (is_IntVarArgs(X1,Y1) + -> (is_IntVar(X2,Y2) + -> (is_IntRelType(X3,Y3) + -> (is_IntVar(X4,Y4) + -> (is_IntPropLevel(X5,Y5) + -> gecode_constraint_count_121(Y0,Y1,Y2,Y3,Y4,Y5) + ; throw(error(type_error('IntPropLevel'(X5)),gecode_argument_error(count(X0,X1,X2,X3,X4,X5),arg=6)))) + ; (is_int(X4,Y4) + -> (is_IntPropLevel(X5,Y5) + -> gecode_constraint_count_123(Y0,Y1,Y2,Y3,Y4,Y5) + ; throw(error(type_error('IntPropLevel'(X5)),gecode_argument_error(count(X0,X1,X2,X3,X4,X5),arg=6)))) + ; throw(error(type_error(int(X4)),gecode_argument_error(count(X0,X1,X2,X3,X4,X5),arg=5))))) + ; throw(error(type_error('IntRelType'(X3)),gecode_argument_error(count(X0,X1,X2,X3,X4,X5),arg=4)))) + ; (is_IntArgs(X2,Y2) + -> (is_IntRelType(X3,Y3) + -> (is_IntVar(X4,Y4) + -> (is_IntPropLevel(X5,Y5) + -> gecode_constraint_count_125(Y0,Y1,Y2,Y3,Y4,Y5) + ; throw(error(type_error('IntPropLevel'(X5)),gecode_argument_error(count(X0,X1,X2,X3,X4,X5),arg=6)))) + ; (is_int(X4,Y4) + -> (is_IntPropLevel(X5,Y5) + -> gecode_constraint_count_127(Y0,Y1,Y2,Y3,Y4,Y5) + ; throw(error(type_error('IntPropLevel'(X5)),gecode_argument_error(count(X0,X1,X2,X3,X4,X5),arg=6)))) + ; throw(error(type_error(int(X4)),gecode_argument_error(count(X0,X1,X2,X3,X4,X5),arg=5))))) + ; throw(error(type_error('IntRelType'(X3)),gecode_argument_error(count(X0,X1,X2,X3,X4,X5),arg=4)))) + ; (is_IntSet(X2,Y2) + -> (is_IntRelType(X3,Y3) + -> (is_IntVar(X4,Y4) + -> (is_IntPropLevel(X5,Y5) + -> gecode_constraint_count_129(Y0,Y1,Y2,Y3,Y4,Y5) + ; throw(error(type_error('IntPropLevel'(X5)),gecode_argument_error(count(X0,X1,X2,X3,X4,X5),arg=6)))) + ; (is_int(X4,Y4) + -> (is_IntPropLevel(X5,Y5) + -> gecode_constraint_count_131(Y0,Y1,Y2,Y3,Y4,Y5) + ; throw(error(type_error('IntPropLevel'(X5)),gecode_argument_error(count(X0,X1,X2,X3,X4,X5),arg=6)))) + ; throw(error(type_error(int(X4)),gecode_argument_error(count(X0,X1,X2,X3,X4,X5),arg=5))))) + ; throw(error(type_error('IntRelType'(X3)),gecode_argument_error(count(X0,X1,X2,X3,X4,X5),arg=4)))) + ; (is_int(X2,Y2) + -> (is_IntRelType(X3,Y3) + -> (is_IntVar(X4,Y4) + -> (is_IntPropLevel(X5,Y5) + -> gecode_constraint_count_143(Y0,Y1,Y2,Y3,Y4,Y5) + ; throw(error(type_error('IntPropLevel'(X5)),gecode_argument_error(count(X0,X1,X2,X3,X4,X5),arg=6)))) + ; (is_int(X4,Y4) + -> (is_IntPropLevel(X5,Y5) + -> gecode_constraint_count_145(Y0,Y1,Y2,Y3,Y4,Y5) + ; throw(error(type_error('IntPropLevel'(X5)),gecode_argument_error(count(X0,X1,X2,X3,X4,X5),arg=6)))) + ; throw(error(type_error(int(X4)),gecode_argument_error(count(X0,X1,X2,X3,X4,X5),arg=5))))) + ; throw(error(type_error('IntRelType'(X3)),gecode_argument_error(count(X0,X1,X2,X3,X4,X5),arg=4)))) + ; throw(error(type_error(int(X2)),gecode_argument_error(count(X0,X1,X2,X3,X4,X5),arg=3))))))) + ; throw(error(type_error('IntVarArgs'(X1)),gecode_argument_error(count(X0,X1,X2,X3,X4,X5),arg=2)))) + ; throw(error(type_error('Space'(X0)),gecode_argument_error(count(X0,X1,X2,X3,X4,X5),arg=1)))). + +count(X0,X1,X2,X3) :- + (is_Space_or_Clause(X0,Y0) + -> (is_IntVarArgs(X1,Y1) + -> (is_IntSet(X2,Y2) + -> (is_IntArgs(X3,Y3) + -> gecode_constraint_count_132(Y0,Y1,Y2,Y3) + ; throw(error(type_error('IntArgs'(X3)),gecode_argument_error(count(X0,X1,X2,X3),arg=4)))) + ; (is_IntSetArgs(X2,Y2) + -> (is_IntPropLevel(X3,Y3) + -> gecode_constraint_count_135(Y0,Y1,Y2,Y3) + ; (is_IntArgs(X3,Y3) + -> gecode_constraint_count_136(Y0,Y1,Y2,Y3) + ; throw(error(type_error('IntArgs'(X3)),gecode_argument_error(count(X0,X1,X2,X3),arg=4))))) + ; (is_IntVarArgs(X2,Y2) + -> (is_IntPropLevel(X3,Y3) + -> gecode_constraint_count_139(Y0,Y1,Y2,Y3) + ; (is_IntArgs(X3,Y3) + -> gecode_constraint_count_140(Y0,Y1,Y2,Y3) + ; throw(error(type_error('IntArgs'(X3)),gecode_argument_error(count(X0,X1,X2,X3),arg=4))))) + ; throw(error(type_error('IntVarArgs'(X2)),gecode_argument_error(count(X0,X1,X2,X3),arg=3)))))) + ; throw(error(type_error('IntVarArgs'(X1)),gecode_argument_error(count(X0,X1,X2,X3),arg=2)))) + ; throw(error(type_error('Space'(X0)),gecode_argument_error(count(X0,X1,X2,X3),arg=1)))). + +count(X0,X1,X2) :- + (is_Space_or_Clause(X0,Y0) + -> (is_IntVarArgs(X1,Y1) + -> (is_IntSetArgs(X2,Y2) + -> gecode_constraint_count_134(Y0,Y1,Y2) + ; (is_IntVarArgs(X2,Y2) + -> gecode_constraint_count_138(Y0,Y1,Y2) + ; throw(error(type_error('IntVarArgs'(X2)),gecode_argument_error(count(X0,X1,X2),arg=3))))) + ; throw(error(type_error('IntVarArgs'(X1)),gecode_argument_error(count(X0,X1,X2),arg=2)))) + ; throw(error(type_error('Space'(X0)),gecode_argument_error(count(X0,X1,X2),arg=1)))). + +cumulative(X0,X1,X2,X3,X4) :- + (is_Space_or_Clause(X0,Y0) + -> (is_IntVar(X1,Y1) + -> (is_IntVarArgs(X2,Y2) + -> (is_IntArgs(X3,Y3) + -> (is_IntArgs(X4,Y4) + -> gecode_constraint_cumulative_146(Y0,Y1,Y2,Y3,Y4) + ; throw(error(type_error('IntArgs'(X4)),gecode_argument_error(cumulative(X0,X1,X2,X3,X4),arg=5)))) + ; throw(error(type_error('IntArgs'(X3)),gecode_argument_error(cumulative(X0,X1,X2,X3,X4),arg=4)))) + ; throw(error(type_error('IntVarArgs'(X2)),gecode_argument_error(cumulative(X0,X1,X2,X3,X4),arg=3)))) + ; (is_int(X1,Y1) + -> (is_IntVarArgs(X2,Y2) + -> (is_IntArgs(X3,Y3) + -> (is_IntArgs(X4,Y4) + -> gecode_constraint_cumulative_158(Y0,Y1,Y2,Y3,Y4) + ; throw(error(type_error('IntArgs'(X4)),gecode_argument_error(cumulative(X0,X1,X2,X3,X4),arg=5)))) + ; throw(error(type_error('IntArgs'(X3)),gecode_argument_error(cumulative(X0,X1,X2,X3,X4),arg=4)))) + ; throw(error(type_error('IntVarArgs'(X2)),gecode_argument_error(cumulative(X0,X1,X2,X3,X4),arg=3)))) + ; throw(error(type_error(int(X1)),gecode_argument_error(cumulative(X0,X1,X2,X3,X4),arg=2))))) + ; throw(error(type_error('Space'(X0)),gecode_argument_error(cumulative(X0,X1,X2,X3,X4),arg=1)))). + +cumulative(X0,X1,X2,X3,X4,X5) :- + (is_Space_or_Clause(X0,Y0) + -> (is_IntVar(X1,Y1) + -> (is_IntVarArgs(X2,Y2) + -> (is_IntArgs(X3,Y3) + -> (is_IntArgs(X4,Y4) + -> (is_IntPropLevel(X5,Y5) + -> gecode_constraint_cumulative_147(Y0,Y1,Y2,Y3,Y4,Y5) + ; (is_BoolVarArgs(X5,Y5) + -> gecode_constraint_cumulative_148(Y0,Y1,Y2,Y3,Y4,Y5) + ; throw(error(type_error('BoolVarArgs'(X5)),gecode_argument_error(cumulative(X0,X1,X2,X3,X4,X5),arg=6))))) + ; throw(error(type_error('IntArgs'(X4)),gecode_argument_error(cumulative(X0,X1,X2,X3,X4,X5),arg=5)))) + ; (is_IntVarArgs(X3,Y3) + -> (is_IntVarArgs(X4,Y4) + -> (is_IntArgs(X5,Y5) + -> gecode_constraint_cumulative_150(Y0,Y1,Y2,Y3,Y4,Y5) + ; throw(error(type_error('IntArgs'(X5)),gecode_argument_error(cumulative(X0,X1,X2,X3,X4,X5),arg=6)))) + ; throw(error(type_error('IntVarArgs'(X4)),gecode_argument_error(cumulative(X0,X1,X2,X3,X4,X5),arg=5)))) + ; throw(error(type_error('IntVarArgs'(X3)),gecode_argument_error(cumulative(X0,X1,X2,X3,X4,X5),arg=4))))) + ; (is_TaskTypeArgs(X2,Y2) + -> (is_IntVarArgs(X3,Y3) + -> (is_IntArgs(X4,Y4) + -> (is_IntArgs(X5,Y5) + -> gecode_constraint_cumulative_154(Y0,Y1,Y2,Y3,Y4,Y5) + ; throw(error(type_error('IntArgs'(X5)),gecode_argument_error(cumulative(X0,X1,X2,X3,X4,X5),arg=6)))) + ; throw(error(type_error('IntArgs'(X4)),gecode_argument_error(cumulative(X0,X1,X2,X3,X4,X5),arg=5)))) + ; throw(error(type_error('IntVarArgs'(X3)),gecode_argument_error(cumulative(X0,X1,X2,X3,X4,X5),arg=4)))) + ; throw(error(type_error('TaskTypeArgs'(X2)),gecode_argument_error(cumulative(X0,X1,X2,X3,X4,X5),arg=3))))) + ; (is_int(X1,Y1) + -> (is_IntVarArgs(X2,Y2) + -> (is_IntArgs(X3,Y3) + -> (is_IntArgs(X4,Y4) + -> (is_IntPropLevel(X5,Y5) + -> gecode_constraint_cumulative_159(Y0,Y1,Y2,Y3,Y4,Y5) + ; (is_BoolVarArgs(X5,Y5) + -> gecode_constraint_cumulative_160(Y0,Y1,Y2,Y3,Y4,Y5) + ; throw(error(type_error('BoolVarArgs'(X5)),gecode_argument_error(cumulative(X0,X1,X2,X3,X4,X5),arg=6))))) + ; throw(error(type_error('IntArgs'(X4)),gecode_argument_error(cumulative(X0,X1,X2,X3,X4,X5),arg=5)))) + ; (is_IntVarArgs(X3,Y3) + -> (is_IntVarArgs(X4,Y4) + -> (is_IntArgs(X5,Y5) + -> gecode_constraint_cumulative_162(Y0,Y1,Y2,Y3,Y4,Y5) + ; throw(error(type_error('IntArgs'(X5)),gecode_argument_error(cumulative(X0,X1,X2,X3,X4,X5),arg=6)))) + ; throw(error(type_error('IntVarArgs'(X4)),gecode_argument_error(cumulative(X0,X1,X2,X3,X4,X5),arg=5)))) + ; throw(error(type_error('IntVarArgs'(X3)),gecode_argument_error(cumulative(X0,X1,X2,X3,X4,X5),arg=4))))) + ; (is_TaskTypeArgs(X2,Y2) + -> (is_IntVarArgs(X3,Y3) + -> (is_IntArgs(X4,Y4) + -> (is_IntArgs(X5,Y5) + -> gecode_constraint_cumulative_166(Y0,Y1,Y2,Y3,Y4,Y5) + ; throw(error(type_error('IntArgs'(X5)),gecode_argument_error(cumulative(X0,X1,X2,X3,X4,X5),arg=6)))) + ; throw(error(type_error('IntArgs'(X4)),gecode_argument_error(cumulative(X0,X1,X2,X3,X4,X5),arg=5)))) + ; throw(error(type_error('IntVarArgs'(X3)),gecode_argument_error(cumulative(X0,X1,X2,X3,X4,X5),arg=4)))) + ; throw(error(type_error('TaskTypeArgs'(X2)),gecode_argument_error(cumulative(X0,X1,X2,X3,X4,X5),arg=3))))) + ; throw(error(type_error(int(X1)),gecode_argument_error(cumulative(X0,X1,X2,X3,X4,X5),arg=2))))) + ; throw(error(type_error('Space'(X0)),gecode_argument_error(cumulative(X0,X1,X2,X3,X4,X5),arg=1)))). + +cumulative(X0,X1,X2,X3,X4,X5,X6) :- + (is_Space_or_Clause(X0,Y0) + -> (is_IntVar(X1,Y1) + -> (is_IntVarArgs(X2,Y2) + -> (is_IntArgs(X3,Y3) + -> (is_IntArgs(X4,Y4) + -> (is_BoolVarArgs(X5,Y5) + -> (is_IntPropLevel(X6,Y6) + -> gecode_constraint_cumulative_149(Y0,Y1,Y2,Y3,Y4,Y5,Y6) + ; throw(error(type_error('IntPropLevel'(X6)),gecode_argument_error(cumulative(X0,X1,X2,X3,X4,X5,X6),arg=7)))) + ; throw(error(type_error('BoolVarArgs'(X5)),gecode_argument_error(cumulative(X0,X1,X2,X3,X4,X5,X6),arg=6)))) + ; throw(error(type_error('IntArgs'(X4)),gecode_argument_error(cumulative(X0,X1,X2,X3,X4,X5,X6),arg=5)))) + ; (is_IntVarArgs(X3,Y3) + -> (is_IntVarArgs(X4,Y4) + -> (is_IntArgs(X5,Y5) + -> (is_IntPropLevel(X6,Y6) + -> gecode_constraint_cumulative_151(Y0,Y1,Y2,Y3,Y4,Y5,Y6) + ; (is_BoolVarArgs(X6,Y6) + -> gecode_constraint_cumulative_152(Y0,Y1,Y2,Y3,Y4,Y5,Y6) + ; throw(error(type_error('BoolVarArgs'(X6)),gecode_argument_error(cumulative(X0,X1,X2,X3,X4,X5,X6),arg=7))))) + ; throw(error(type_error('IntArgs'(X5)),gecode_argument_error(cumulative(X0,X1,X2,X3,X4,X5,X6),arg=6)))) + ; throw(error(type_error('IntVarArgs'(X4)),gecode_argument_error(cumulative(X0,X1,X2,X3,X4,X5,X6),arg=5)))) + ; throw(error(type_error('IntVarArgs'(X3)),gecode_argument_error(cumulative(X0,X1,X2,X3,X4,X5,X6),arg=4))))) + ; (is_TaskTypeArgs(X2,Y2) + -> (is_IntVarArgs(X3,Y3) + -> (is_IntArgs(X4,Y4) + -> (is_IntArgs(X5,Y5) + -> (is_IntPropLevel(X6,Y6) + -> gecode_constraint_cumulative_155(Y0,Y1,Y2,Y3,Y4,Y5,Y6) + ; (is_BoolVarArgs(X6,Y6) + -> gecode_constraint_cumulative_156(Y0,Y1,Y2,Y3,Y4,Y5,Y6) + ; throw(error(type_error('BoolVarArgs'(X6)),gecode_argument_error(cumulative(X0,X1,X2,X3,X4,X5,X6),arg=7))))) + ; throw(error(type_error('IntArgs'(X5)),gecode_argument_error(cumulative(X0,X1,X2,X3,X4,X5,X6),arg=6)))) + ; throw(error(type_error('IntArgs'(X4)),gecode_argument_error(cumulative(X0,X1,X2,X3,X4,X5,X6),arg=5)))) + ; throw(error(type_error('IntVarArgs'(X3)),gecode_argument_error(cumulative(X0,X1,X2,X3,X4,X5,X6),arg=4)))) + ; throw(error(type_error('TaskTypeArgs'(X2)),gecode_argument_error(cumulative(X0,X1,X2,X3,X4,X5,X6),arg=3))))) + ; (is_int(X1,Y1) + -> (is_IntVarArgs(X2,Y2) + -> (is_IntArgs(X3,Y3) + -> (is_IntArgs(X4,Y4) + -> (is_BoolVarArgs(X5,Y5) + -> (is_IntPropLevel(X6,Y6) + -> gecode_constraint_cumulative_161(Y0,Y1,Y2,Y3,Y4,Y5,Y6) + ; throw(error(type_error('IntPropLevel'(X6)),gecode_argument_error(cumulative(X0,X1,X2,X3,X4,X5,X6),arg=7)))) + ; throw(error(type_error('BoolVarArgs'(X5)),gecode_argument_error(cumulative(X0,X1,X2,X3,X4,X5,X6),arg=6)))) + ; throw(error(type_error('IntArgs'(X4)),gecode_argument_error(cumulative(X0,X1,X2,X3,X4,X5,X6),arg=5)))) + ; (is_IntVarArgs(X3,Y3) + -> (is_IntVarArgs(X4,Y4) + -> (is_IntArgs(X5,Y5) + -> (is_IntPropLevel(X6,Y6) + -> gecode_constraint_cumulative_163(Y0,Y1,Y2,Y3,Y4,Y5,Y6) + ; (is_BoolVarArgs(X6,Y6) + -> gecode_constraint_cumulative_164(Y0,Y1,Y2,Y3,Y4,Y5,Y6) + ; throw(error(type_error('BoolVarArgs'(X6)),gecode_argument_error(cumulative(X0,X1,X2,X3,X4,X5,X6),arg=7))))) + ; throw(error(type_error('IntArgs'(X5)),gecode_argument_error(cumulative(X0,X1,X2,X3,X4,X5,X6),arg=6)))) + ; throw(error(type_error('IntVarArgs'(X4)),gecode_argument_error(cumulative(X0,X1,X2,X3,X4,X5,X6),arg=5)))) + ; throw(error(type_error('IntVarArgs'(X3)),gecode_argument_error(cumulative(X0,X1,X2,X3,X4,X5,X6),arg=4))))) + ; (is_TaskTypeArgs(X2,Y2) + -> (is_IntVarArgs(X3,Y3) + -> (is_IntArgs(X4,Y4) + -> (is_IntArgs(X5,Y5) + -> (is_IntPropLevel(X6,Y6) + -> gecode_constraint_cumulative_167(Y0,Y1,Y2,Y3,Y4,Y5,Y6) + ; (is_BoolVarArgs(X6,Y6) + -> gecode_constraint_cumulative_168(Y0,Y1,Y2,Y3,Y4,Y5,Y6) + ; throw(error(type_error('BoolVarArgs'(X6)),gecode_argument_error(cumulative(X0,X1,X2,X3,X4,X5,X6),arg=7))))) + ; throw(error(type_error('IntArgs'(X5)),gecode_argument_error(cumulative(X0,X1,X2,X3,X4,X5,X6),arg=6)))) + ; throw(error(type_error('IntArgs'(X4)),gecode_argument_error(cumulative(X0,X1,X2,X3,X4,X5,X6),arg=5)))) + ; throw(error(type_error('IntVarArgs'(X3)),gecode_argument_error(cumulative(X0,X1,X2,X3,X4,X5,X6),arg=4)))) + ; throw(error(type_error('TaskTypeArgs'(X2)),gecode_argument_error(cumulative(X0,X1,X2,X3,X4,X5,X6),arg=3))))) + ; throw(error(type_error(int(X1)),gecode_argument_error(cumulative(X0,X1,X2,X3,X4,X5,X6),arg=2))))) + ; throw(error(type_error('Space'(X0)),gecode_argument_error(cumulative(X0,X1,X2,X3,X4,X5,X6),arg=1)))). + +cumulative(X0,X1,X2,X3,X4,X5,X6,X7) :- + (is_Space_or_Clause(X0,Y0) + -> (is_IntVar(X1,Y1) + -> (is_IntVarArgs(X2,Y2) + -> (is_IntVarArgs(X3,Y3) + -> (is_IntVarArgs(X4,Y4) + -> (is_IntArgs(X5,Y5) + -> (is_BoolVarArgs(X6,Y6) + -> (is_IntPropLevel(X7,Y7) + -> gecode_constraint_cumulative_153(Y0,Y1,Y2,Y3,Y4,Y5,Y6,Y7) + ; throw(error(type_error('IntPropLevel'(X7)),gecode_argument_error(cumulative(X0,X1,X2,X3,X4,X5,X6,X7),arg=8)))) + ; throw(error(type_error('BoolVarArgs'(X6)),gecode_argument_error(cumulative(X0,X1,X2,X3,X4,X5,X6,X7),arg=7)))) + ; throw(error(type_error('IntArgs'(X5)),gecode_argument_error(cumulative(X0,X1,X2,X3,X4,X5,X6,X7),arg=6)))) + ; throw(error(type_error('IntVarArgs'(X4)),gecode_argument_error(cumulative(X0,X1,X2,X3,X4,X5,X6,X7),arg=5)))) + ; throw(error(type_error('IntVarArgs'(X3)),gecode_argument_error(cumulative(X0,X1,X2,X3,X4,X5,X6,X7),arg=4)))) + ; (is_TaskTypeArgs(X2,Y2) + -> (is_IntVarArgs(X3,Y3) + -> (is_IntArgs(X4,Y4) + -> (is_IntArgs(X5,Y5) + -> (is_BoolVarArgs(X6,Y6) + -> (is_IntPropLevel(X7,Y7) + -> gecode_constraint_cumulative_157(Y0,Y1,Y2,Y3,Y4,Y5,Y6,Y7) + ; throw(error(type_error('IntPropLevel'(X7)),gecode_argument_error(cumulative(X0,X1,X2,X3,X4,X5,X6,X7),arg=8)))) + ; throw(error(type_error('BoolVarArgs'(X6)),gecode_argument_error(cumulative(X0,X1,X2,X3,X4,X5,X6,X7),arg=7)))) + ; throw(error(type_error('IntArgs'(X5)),gecode_argument_error(cumulative(X0,X1,X2,X3,X4,X5,X6,X7),arg=6)))) + ; throw(error(type_error('IntArgs'(X4)),gecode_argument_error(cumulative(X0,X1,X2,X3,X4,X5,X6,X7),arg=5)))) + ; throw(error(type_error('IntVarArgs'(X3)),gecode_argument_error(cumulative(X0,X1,X2,X3,X4,X5,X6,X7),arg=4)))) + ; throw(error(type_error('TaskTypeArgs'(X2)),gecode_argument_error(cumulative(X0,X1,X2,X3,X4,X5,X6,X7),arg=3))))) + ; (is_int(X1,Y1) + -> (is_IntVarArgs(X2,Y2) + -> (is_IntVarArgs(X3,Y3) + -> (is_IntVarArgs(X4,Y4) + -> (is_IntArgs(X5,Y5) + -> (is_BoolVarArgs(X6,Y6) + -> (is_IntPropLevel(X7,Y7) + -> gecode_constraint_cumulative_165(Y0,Y1,Y2,Y3,Y4,Y5,Y6,Y7) + ; throw(error(type_error('IntPropLevel'(X7)),gecode_argument_error(cumulative(X0,X1,X2,X3,X4,X5,X6,X7),arg=8)))) + ; throw(error(type_error('BoolVarArgs'(X6)),gecode_argument_error(cumulative(X0,X1,X2,X3,X4,X5,X6,X7),arg=7)))) + ; throw(error(type_error('IntArgs'(X5)),gecode_argument_error(cumulative(X0,X1,X2,X3,X4,X5,X6,X7),arg=6)))) + ; throw(error(type_error('IntVarArgs'(X4)),gecode_argument_error(cumulative(X0,X1,X2,X3,X4,X5,X6,X7),arg=5)))) + ; throw(error(type_error('IntVarArgs'(X3)),gecode_argument_error(cumulative(X0,X1,X2,X3,X4,X5,X6,X7),arg=4)))) + ; (is_TaskTypeArgs(X2,Y2) + -> (is_IntVarArgs(X3,Y3) + -> (is_IntArgs(X4,Y4) + -> (is_IntArgs(X5,Y5) + -> (is_BoolVarArgs(X6,Y6) + -> (is_IntPropLevel(X7,Y7) + -> gecode_constraint_cumulative_169(Y0,Y1,Y2,Y3,Y4,Y5,Y6,Y7) + ; throw(error(type_error('IntPropLevel'(X7)),gecode_argument_error(cumulative(X0,X1,X2,X3,X4,X5,X6,X7),arg=8)))) + ; throw(error(type_error('BoolVarArgs'(X6)),gecode_argument_error(cumulative(X0,X1,X2,X3,X4,X5,X6,X7),arg=7)))) + ; throw(error(type_error('IntArgs'(X5)),gecode_argument_error(cumulative(X0,X1,X2,X3,X4,X5,X6,X7),arg=6)))) + ; throw(error(type_error('IntArgs'(X4)),gecode_argument_error(cumulative(X0,X1,X2,X3,X4,X5,X6,X7),arg=5)))) + ; throw(error(type_error('IntVarArgs'(X3)),gecode_argument_error(cumulative(X0,X1,X2,X3,X4,X5,X6,X7),arg=4)))) + ; throw(error(type_error('TaskTypeArgs'(X2)),gecode_argument_error(cumulative(X0,X1,X2,X3,X4,X5,X6,X7),arg=3))))) + ; throw(error(type_error(int(X1)),gecode_argument_error(cumulative(X0,X1,X2,X3,X4,X5,X6,X7),arg=2))))) + ; throw(error(type_error('Space'(X0)),gecode_argument_error(cumulative(X0,X1,X2,X3,X4,X5,X6,X7),arg=1)))). + +cumulatives(X0,X1,X2,X3,X4,X5,X6,X7) :- + (is_Space_or_Clause(X0,Y0) + -> (is_IntArgs(X1,Y1) + -> (is_IntVarArgs(X2,Y2) + -> (is_IntArgs(X3,Y3) + -> (is_IntVarArgs(X4,Y4) + -> (is_IntArgs(X5,Y5) + -> (is_IntArgs(X6,Y6) + -> (is_bool(X7,Y7) + -> gecode_constraint_cumulatives_170(Y0,Y1,Y2,Y3,Y4,Y5,Y6,Y7) + ; throw(error(type_error(bool(X7)),gecode_argument_error(cumulatives(X0,X1,X2,X3,X4,X5,X6,X7),arg=8)))) + ; throw(error(type_error('IntArgs'(X6)),gecode_argument_error(cumulatives(X0,X1,X2,X3,X4,X5,X6,X7),arg=7)))) + ; (is_IntVarArgs(X5,Y5) + -> (is_IntArgs(X6,Y6) + -> (is_bool(X7,Y7) + -> gecode_constraint_cumulatives_172(Y0,Y1,Y2,Y3,Y4,Y5,Y6,Y7) + ; throw(error(type_error(bool(X7)),gecode_argument_error(cumulatives(X0,X1,X2,X3,X4,X5,X6,X7),arg=8)))) + ; throw(error(type_error('IntArgs'(X6)),gecode_argument_error(cumulatives(X0,X1,X2,X3,X4,X5,X6,X7),arg=7)))) + ; throw(error(type_error('IntVarArgs'(X5)),gecode_argument_error(cumulatives(X0,X1,X2,X3,X4,X5,X6,X7),arg=6))))) + ; throw(error(type_error('IntVarArgs'(X4)),gecode_argument_error(cumulatives(X0,X1,X2,X3,X4,X5,X6,X7),arg=5)))) + ; (is_IntVarArgs(X3,Y3) + -> (is_IntVarArgs(X4,Y4) + -> (is_IntArgs(X5,Y5) + -> (is_IntArgs(X6,Y6) + -> (is_bool(X7,Y7) + -> gecode_constraint_cumulatives_174(Y0,Y1,Y2,Y3,Y4,Y5,Y6,Y7) + ; throw(error(type_error(bool(X7)),gecode_argument_error(cumulatives(X0,X1,X2,X3,X4,X5,X6,X7),arg=8)))) + ; throw(error(type_error('IntArgs'(X6)),gecode_argument_error(cumulatives(X0,X1,X2,X3,X4,X5,X6,X7),arg=7)))) + ; (is_IntVarArgs(X5,Y5) + -> (is_IntArgs(X6,Y6) + -> (is_bool(X7,Y7) + -> gecode_constraint_cumulatives_176(Y0,Y1,Y2,Y3,Y4,Y5,Y6,Y7) + ; throw(error(type_error(bool(X7)),gecode_argument_error(cumulatives(X0,X1,X2,X3,X4,X5,X6,X7),arg=8)))) + ; throw(error(type_error('IntArgs'(X6)),gecode_argument_error(cumulatives(X0,X1,X2,X3,X4,X5,X6,X7),arg=7)))) + ; throw(error(type_error('IntVarArgs'(X5)),gecode_argument_error(cumulatives(X0,X1,X2,X3,X4,X5,X6,X7),arg=6))))) + ; throw(error(type_error('IntVarArgs'(X4)),gecode_argument_error(cumulatives(X0,X1,X2,X3,X4,X5,X6,X7),arg=5)))) + ; throw(error(type_error('IntVarArgs'(X3)),gecode_argument_error(cumulatives(X0,X1,X2,X3,X4,X5,X6,X7),arg=4))))) + ; throw(error(type_error('IntVarArgs'(X2)),gecode_argument_error(cumulatives(X0,X1,X2,X3,X4,X5,X6,X7),arg=3)))) + ; (is_IntVarArgs(X1,Y1) + -> (is_IntVarArgs(X2,Y2) + -> (is_IntArgs(X3,Y3) + -> (is_IntVarArgs(X4,Y4) + -> (is_IntArgs(X5,Y5) + -> (is_IntArgs(X6,Y6) + -> (is_bool(X7,Y7) + -> gecode_constraint_cumulatives_178(Y0,Y1,Y2,Y3,Y4,Y5,Y6,Y7) + ; throw(error(type_error(bool(X7)),gecode_argument_error(cumulatives(X0,X1,X2,X3,X4,X5,X6,X7),arg=8)))) + ; throw(error(type_error('IntArgs'(X6)),gecode_argument_error(cumulatives(X0,X1,X2,X3,X4,X5,X6,X7),arg=7)))) + ; (is_IntVarArgs(X5,Y5) + -> (is_IntArgs(X6,Y6) + -> (is_bool(X7,Y7) + -> gecode_constraint_cumulatives_180(Y0,Y1,Y2,Y3,Y4,Y5,Y6,Y7) + ; throw(error(type_error(bool(X7)),gecode_argument_error(cumulatives(X0,X1,X2,X3,X4,X5,X6,X7),arg=8)))) + ; throw(error(type_error('IntArgs'(X6)),gecode_argument_error(cumulatives(X0,X1,X2,X3,X4,X5,X6,X7),arg=7)))) + ; throw(error(type_error('IntVarArgs'(X5)),gecode_argument_error(cumulatives(X0,X1,X2,X3,X4,X5,X6,X7),arg=6))))) + ; throw(error(type_error('IntVarArgs'(X4)),gecode_argument_error(cumulatives(X0,X1,X2,X3,X4,X5,X6,X7),arg=5)))) + ; (is_IntVarArgs(X3,Y3) + -> (is_IntVarArgs(X4,Y4) + -> (is_IntArgs(X5,Y5) + -> (is_IntArgs(X6,Y6) + -> (is_bool(X7,Y7) + -> gecode_constraint_cumulatives_182(Y0,Y1,Y2,Y3,Y4,Y5,Y6,Y7) + ; throw(error(type_error(bool(X7)),gecode_argument_error(cumulatives(X0,X1,X2,X3,X4,X5,X6,X7),arg=8)))) + ; throw(error(type_error('IntArgs'(X6)),gecode_argument_error(cumulatives(X0,X1,X2,X3,X4,X5,X6,X7),arg=7)))) + ; (is_IntVarArgs(X5,Y5) + -> (is_IntArgs(X6,Y6) + -> (is_bool(X7,Y7) + -> gecode_constraint_cumulatives_184(Y0,Y1,Y2,Y3,Y4,Y5,Y6,Y7) + ; throw(error(type_error(bool(X7)),gecode_argument_error(cumulatives(X0,X1,X2,X3,X4,X5,X6,X7),arg=8)))) + ; throw(error(type_error('IntArgs'(X6)),gecode_argument_error(cumulatives(X0,X1,X2,X3,X4,X5,X6,X7),arg=7)))) + ; throw(error(type_error('IntVarArgs'(X5)),gecode_argument_error(cumulatives(X0,X1,X2,X3,X4,X5,X6,X7),arg=6))))) + ; throw(error(type_error('IntVarArgs'(X4)),gecode_argument_error(cumulatives(X0,X1,X2,X3,X4,X5,X6,X7),arg=5)))) + ; throw(error(type_error('IntVarArgs'(X3)),gecode_argument_error(cumulatives(X0,X1,X2,X3,X4,X5,X6,X7),arg=4))))) + ; throw(error(type_error('IntVarArgs'(X2)),gecode_argument_error(cumulatives(X0,X1,X2,X3,X4,X5,X6,X7),arg=3)))) + ; throw(error(type_error('IntVarArgs'(X1)),gecode_argument_error(cumulatives(X0,X1,X2,X3,X4,X5,X6,X7),arg=2))))) + ; throw(error(type_error('Space'(X0)),gecode_argument_error(cumulatives(X0,X1,X2,X3,X4,X5,X6,X7),arg=1)))). + +cumulatives(X0,X1,X2,X3,X4,X5,X6,X7,X8) :- + (is_Space_or_Clause(X0,Y0) + -> (is_IntArgs(X1,Y1) + -> (is_IntVarArgs(X2,Y2) + -> (is_IntArgs(X3,Y3) + -> (is_IntVarArgs(X4,Y4) + -> (is_IntArgs(X5,Y5) + -> (is_IntArgs(X6,Y6) + -> (is_bool(X7,Y7) + -> (is_IntPropLevel(X8,Y8) + -> gecode_constraint_cumulatives_171(Y0,Y1,Y2,Y3,Y4,Y5,Y6,Y7,Y8) + ; throw(error(type_error('IntPropLevel'(X8)),gecode_argument_error(cumulatives(X0,X1,X2,X3,X4,X5,X6,X7,X8),arg=9)))) + ; throw(error(type_error(bool(X7)),gecode_argument_error(cumulatives(X0,X1,X2,X3,X4,X5,X6,X7,X8),arg=8)))) + ; throw(error(type_error('IntArgs'(X6)),gecode_argument_error(cumulatives(X0,X1,X2,X3,X4,X5,X6,X7,X8),arg=7)))) + ; (is_IntVarArgs(X5,Y5) + -> (is_IntArgs(X6,Y6) + -> (is_bool(X7,Y7) + -> (is_IntPropLevel(X8,Y8) + -> gecode_constraint_cumulatives_173(Y0,Y1,Y2,Y3,Y4,Y5,Y6,Y7,Y8) + ; throw(error(type_error('IntPropLevel'(X8)),gecode_argument_error(cumulatives(X0,X1,X2,X3,X4,X5,X6,X7,X8),arg=9)))) + ; throw(error(type_error(bool(X7)),gecode_argument_error(cumulatives(X0,X1,X2,X3,X4,X5,X6,X7,X8),arg=8)))) + ; throw(error(type_error('IntArgs'(X6)),gecode_argument_error(cumulatives(X0,X1,X2,X3,X4,X5,X6,X7,X8),arg=7)))) + ; throw(error(type_error('IntVarArgs'(X5)),gecode_argument_error(cumulatives(X0,X1,X2,X3,X4,X5,X6,X7,X8),arg=6))))) + ; throw(error(type_error('IntVarArgs'(X4)),gecode_argument_error(cumulatives(X0,X1,X2,X3,X4,X5,X6,X7,X8),arg=5)))) + ; (is_IntVarArgs(X3,Y3) + -> (is_IntVarArgs(X4,Y4) + -> (is_IntArgs(X5,Y5) + -> (is_IntArgs(X6,Y6) + -> (is_bool(X7,Y7) + -> (is_IntPropLevel(X8,Y8) + -> gecode_constraint_cumulatives_175(Y0,Y1,Y2,Y3,Y4,Y5,Y6,Y7,Y8) + ; throw(error(type_error('IntPropLevel'(X8)),gecode_argument_error(cumulatives(X0,X1,X2,X3,X4,X5,X6,X7,X8),arg=9)))) + ; throw(error(type_error(bool(X7)),gecode_argument_error(cumulatives(X0,X1,X2,X3,X4,X5,X6,X7,X8),arg=8)))) + ; throw(error(type_error('IntArgs'(X6)),gecode_argument_error(cumulatives(X0,X1,X2,X3,X4,X5,X6,X7,X8),arg=7)))) + ; (is_IntVarArgs(X5,Y5) + -> (is_IntArgs(X6,Y6) + -> (is_bool(X7,Y7) + -> (is_IntPropLevel(X8,Y8) + -> gecode_constraint_cumulatives_177(Y0,Y1,Y2,Y3,Y4,Y5,Y6,Y7,Y8) + ; throw(error(type_error('IntPropLevel'(X8)),gecode_argument_error(cumulatives(X0,X1,X2,X3,X4,X5,X6,X7,X8),arg=9)))) + ; throw(error(type_error(bool(X7)),gecode_argument_error(cumulatives(X0,X1,X2,X3,X4,X5,X6,X7,X8),arg=8)))) + ; throw(error(type_error('IntArgs'(X6)),gecode_argument_error(cumulatives(X0,X1,X2,X3,X4,X5,X6,X7,X8),arg=7)))) + ; throw(error(type_error('IntVarArgs'(X5)),gecode_argument_error(cumulatives(X0,X1,X2,X3,X4,X5,X6,X7,X8),arg=6))))) + ; throw(error(type_error('IntVarArgs'(X4)),gecode_argument_error(cumulatives(X0,X1,X2,X3,X4,X5,X6,X7,X8),arg=5)))) + ; throw(error(type_error('IntVarArgs'(X3)),gecode_argument_error(cumulatives(X0,X1,X2,X3,X4,X5,X6,X7,X8),arg=4))))) + ; throw(error(type_error('IntVarArgs'(X2)),gecode_argument_error(cumulatives(X0,X1,X2,X3,X4,X5,X6,X7,X8),arg=3)))) + ; (is_IntVarArgs(X1,Y1) + -> (is_IntVarArgs(X2,Y2) + -> (is_IntArgs(X3,Y3) + -> (is_IntVarArgs(X4,Y4) + -> (is_IntArgs(X5,Y5) + -> (is_IntArgs(X6,Y6) + -> (is_bool(X7,Y7) + -> (is_IntPropLevel(X8,Y8) + -> gecode_constraint_cumulatives_179(Y0,Y1,Y2,Y3,Y4,Y5,Y6,Y7,Y8) + ; throw(error(type_error('IntPropLevel'(X8)),gecode_argument_error(cumulatives(X0,X1,X2,X3,X4,X5,X6,X7,X8),arg=9)))) + ; throw(error(type_error(bool(X7)),gecode_argument_error(cumulatives(X0,X1,X2,X3,X4,X5,X6,X7,X8),arg=8)))) + ; throw(error(type_error('IntArgs'(X6)),gecode_argument_error(cumulatives(X0,X1,X2,X3,X4,X5,X6,X7,X8),arg=7)))) + ; (is_IntVarArgs(X5,Y5) + -> (is_IntArgs(X6,Y6) + -> (is_bool(X7,Y7) + -> (is_IntPropLevel(X8,Y8) + -> gecode_constraint_cumulatives_181(Y0,Y1,Y2,Y3,Y4,Y5,Y6,Y7,Y8) + ; throw(error(type_error('IntPropLevel'(X8)),gecode_argument_error(cumulatives(X0,X1,X2,X3,X4,X5,X6,X7,X8),arg=9)))) + ; throw(error(type_error(bool(X7)),gecode_argument_error(cumulatives(X0,X1,X2,X3,X4,X5,X6,X7,X8),arg=8)))) + ; throw(error(type_error('IntArgs'(X6)),gecode_argument_error(cumulatives(X0,X1,X2,X3,X4,X5,X6,X7,X8),arg=7)))) + ; throw(error(type_error('IntVarArgs'(X5)),gecode_argument_error(cumulatives(X0,X1,X2,X3,X4,X5,X6,X7,X8),arg=6))))) + ; throw(error(type_error('IntVarArgs'(X4)),gecode_argument_error(cumulatives(X0,X1,X2,X3,X4,X5,X6,X7,X8),arg=5)))) + ; (is_IntVarArgs(X3,Y3) + -> (is_IntVarArgs(X4,Y4) + -> (is_IntArgs(X5,Y5) + -> (is_IntArgs(X6,Y6) + -> (is_bool(X7,Y7) + -> (is_IntPropLevel(X8,Y8) + -> gecode_constraint_cumulatives_183(Y0,Y1,Y2,Y3,Y4,Y5,Y6,Y7,Y8) + ; throw(error(type_error('IntPropLevel'(X8)),gecode_argument_error(cumulatives(X0,X1,X2,X3,X4,X5,X6,X7,X8),arg=9)))) + ; throw(error(type_error(bool(X7)),gecode_argument_error(cumulatives(X0,X1,X2,X3,X4,X5,X6,X7,X8),arg=8)))) + ; throw(error(type_error('IntArgs'(X6)),gecode_argument_error(cumulatives(X0,X1,X2,X3,X4,X5,X6,X7,X8),arg=7)))) + ; (is_IntVarArgs(X5,Y5) + -> (is_IntArgs(X6,Y6) + -> (is_bool(X7,Y7) + -> (is_IntPropLevel(X8,Y8) + -> gecode_constraint_cumulatives_185(Y0,Y1,Y2,Y3,Y4,Y5,Y6,Y7,Y8) + ; throw(error(type_error('IntPropLevel'(X8)),gecode_argument_error(cumulatives(X0,X1,X2,X3,X4,X5,X6,X7,X8),arg=9)))) + ; throw(error(type_error(bool(X7)),gecode_argument_error(cumulatives(X0,X1,X2,X3,X4,X5,X6,X7,X8),arg=8)))) + ; throw(error(type_error('IntArgs'(X6)),gecode_argument_error(cumulatives(X0,X1,X2,X3,X4,X5,X6,X7,X8),arg=7)))) + ; throw(error(type_error('IntVarArgs'(X5)),gecode_argument_error(cumulatives(X0,X1,X2,X3,X4,X5,X6,X7,X8),arg=6))))) + ; throw(error(type_error('IntVarArgs'(X4)),gecode_argument_error(cumulatives(X0,X1,X2,X3,X4,X5,X6,X7,X8),arg=5)))) + ; throw(error(type_error('IntVarArgs'(X3)),gecode_argument_error(cumulatives(X0,X1,X2,X3,X4,X5,X6,X7,X8),arg=4))))) + ; throw(error(type_error('IntVarArgs'(X2)),gecode_argument_error(cumulatives(X0,X1,X2,X3,X4,X5,X6,X7,X8),arg=3)))) + ; throw(error(type_error('IntVarArgs'(X1)),gecode_argument_error(cumulatives(X0,X1,X2,X3,X4,X5,X6,X7,X8),arg=2))))) + ; throw(error(type_error('Space'(X0)),gecode_argument_error(cumulatives(X0,X1,X2,X3,X4,X5,X6,X7,X8),arg=1)))). + +distinct(X0,X1,X2) :- + (is_Space_or_Clause(X0,Y0) + -> (is_BoolVarArgs(X1,Y1) + -> (is_IntVarArgs(X2,Y2) + -> gecode_constraint_distinct_186(Y0,Y1,Y2) + ; throw(error(type_error('IntVarArgs'(X2)),gecode_argument_error(distinct(X0,X1,X2),arg=3)))) + ; (is_IntArgs(X1,Y1) + -> (is_IntVarArgs(X2,Y2) + -> gecode_constraint_distinct_188(Y0,Y1,Y2) + ; throw(error(type_error('IntVarArgs'(X2)),gecode_argument_error(distinct(X0,X1,X2),arg=3)))) + ; (is_IntVarArgs(X1,Y1) + -> (is_IntPropLevel(X2,Y2) + -> gecode_constraint_distinct_191(Y0,Y1,Y2) + ; (is_int(X2,Y2) + -> gecode_constraint_distinct_192(Y0,Y1,Y2) + ; throw(error(type_error(int(X2)),gecode_argument_error(distinct(X0,X1,X2),arg=3))))) + ; throw(error(type_error('IntVarArgs'(X1)),gecode_argument_error(distinct(X0,X1,X2),arg=2)))))) + ; throw(error(type_error('Space'(X0)),gecode_argument_error(distinct(X0,X1,X2),arg=1)))). + +distinct(X0,X1,X2,X3) :- + (is_Space_or_Clause(X0,Y0) + -> (is_BoolVarArgs(X1,Y1) + -> (is_IntVarArgs(X2,Y2) + -> (is_IntPropLevel(X3,Y3) + -> gecode_constraint_distinct_187(Y0,Y1,Y2,Y3) + ; throw(error(type_error('IntPropLevel'(X3)),gecode_argument_error(distinct(X0,X1,X2,X3),arg=4)))) + ; throw(error(type_error('IntVarArgs'(X2)),gecode_argument_error(distinct(X0,X1,X2,X3),arg=3)))) + ; (is_IntArgs(X1,Y1) + -> (is_IntVarArgs(X2,Y2) + -> (is_IntPropLevel(X3,Y3) + -> gecode_constraint_distinct_189(Y0,Y1,Y2,Y3) + ; throw(error(type_error('IntPropLevel'(X3)),gecode_argument_error(distinct(X0,X1,X2,X3),arg=4)))) + ; throw(error(type_error('IntVarArgs'(X2)),gecode_argument_error(distinct(X0,X1,X2,X3),arg=3)))) + ; (is_IntVarArgs(X1,Y1) + -> (is_int(X2,Y2) + -> (is_IntPropLevel(X3,Y3) + -> gecode_constraint_distinct_193(Y0,Y1,Y2,Y3) + ; throw(error(type_error('IntPropLevel'(X3)),gecode_argument_error(distinct(X0,X1,X2,X3),arg=4)))) + ; throw(error(type_error(int(X2)),gecode_argument_error(distinct(X0,X1,X2,X3),arg=3)))) + ; throw(error(type_error('IntVarArgs'(X1)),gecode_argument_error(distinct(X0,X1,X2,X3),arg=2)))))) + ; throw(error(type_error('Space'(X0)),gecode_argument_error(distinct(X0,X1,X2,X3),arg=1)))). + +distinct(X0,X1) :- + (is_Space_or_Clause(X0,Y0) + -> (is_IntVarArgs(X1,Y1) + -> gecode_constraint_distinct_190(Y0,Y1) + ; throw(error(type_error('IntVarArgs'(X1)),gecode_argument_error(distinct(X0,X1),arg=2)))) + ; throw(error(type_error('Space'(X0)),gecode_argument_error(distinct(X0,X1),arg=1)))). + +div(X0,X1,X2,X3) :- + (is_Space_or_Clause(X0,Y0) + -> (is_FloatVar(X1,Y1) + -> (is_FloatVar(X2,Y2) + -> (is_FloatVar(X3,Y3) + -> gecode_constraint_div_194(Y0,Y1,Y2,Y3) + ; throw(error(type_error('FloatVar'(X3)),gecode_argument_error(div(X0,X1,X2,X3),arg=4)))) + ; throw(error(type_error('FloatVar'(X2)),gecode_argument_error(div(X0,X1,X2,X3),arg=3)))) + ; (is_IntVar(X1,Y1) + -> (is_IntVar(X2,Y2) + -> (is_IntVar(X3,Y3) + -> gecode_constraint_div_195(Y0,Y1,Y2,Y3) + ; throw(error(type_error('IntVar'(X3)),gecode_argument_error(div(X0,X1,X2,X3),arg=4)))) + ; throw(error(type_error('IntVar'(X2)),gecode_argument_error(div(X0,X1,X2,X3),arg=3)))) + ; throw(error(type_error('IntVar'(X1)),gecode_argument_error(div(X0,X1,X2,X3),arg=2))))) + ; throw(error(type_error('Space'(X0)),gecode_argument_error(div(X0,X1,X2,X3),arg=1)))). + +div(X0,X1,X2,X3,X4) :- + (is_Space_or_Clause(X0,Y0) + -> (is_IntVar(X1,Y1) + -> (is_IntVar(X2,Y2) + -> (is_IntVar(X3,Y3) + -> (is_IntPropLevel(X4,Y4) + -> gecode_constraint_div_196(Y0,Y1,Y2,Y3,Y4) + ; throw(error(type_error('IntPropLevel'(X4)),gecode_argument_error(div(X0,X1,X2,X3,X4),arg=5)))) + ; throw(error(type_error('IntVar'(X3)),gecode_argument_error(div(X0,X1,X2,X3,X4),arg=4)))) + ; throw(error(type_error('IntVar'(X2)),gecode_argument_error(div(X0,X1,X2,X3,X4),arg=3)))) + ; throw(error(type_error('IntVar'(X1)),gecode_argument_error(div(X0,X1,X2,X3,X4),arg=2)))) + ; throw(error(type_error('Space'(X0)),gecode_argument_error(div(X0,X1,X2,X3,X4),arg=1)))). + +divmod(X0,X1,X2,X3,X4) :- + (is_Space_or_Clause(X0,Y0) + -> (is_IntVar(X1,Y1) + -> (is_IntVar(X2,Y2) + -> (is_IntVar(X3,Y3) + -> (is_IntVar(X4,Y4) + -> gecode_constraint_divmod_197(Y0,Y1,Y2,Y3,Y4) + ; throw(error(type_error('IntVar'(X4)),gecode_argument_error(divmod(X0,X1,X2,X3,X4),arg=5)))) + ; throw(error(type_error('IntVar'(X3)),gecode_argument_error(divmod(X0,X1,X2,X3,X4),arg=4)))) + ; throw(error(type_error('IntVar'(X2)),gecode_argument_error(divmod(X0,X1,X2,X3,X4),arg=3)))) + ; throw(error(type_error('IntVar'(X1)),gecode_argument_error(divmod(X0,X1,X2,X3,X4),arg=2)))) + ; throw(error(type_error('Space'(X0)),gecode_argument_error(divmod(X0,X1,X2,X3,X4),arg=1)))). + +divmod(X0,X1,X2,X3,X4,X5) :- + (is_Space_or_Clause(X0,Y0) + -> (is_IntVar(X1,Y1) + -> (is_IntVar(X2,Y2) + -> (is_IntVar(X3,Y3) + -> (is_IntVar(X4,Y4) + -> (is_IntPropLevel(X5,Y5) + -> gecode_constraint_divmod_198(Y0,Y1,Y2,Y3,Y4,Y5) + ; throw(error(type_error('IntPropLevel'(X5)),gecode_argument_error(divmod(X0,X1,X2,X3,X4,X5),arg=6)))) + ; throw(error(type_error('IntVar'(X4)),gecode_argument_error(divmod(X0,X1,X2,X3,X4,X5),arg=5)))) + ; throw(error(type_error('IntVar'(X3)),gecode_argument_error(divmod(X0,X1,X2,X3,X4,X5),arg=4)))) + ; throw(error(type_error('IntVar'(X2)),gecode_argument_error(divmod(X0,X1,X2,X3,X4,X5),arg=3)))) + ; throw(error(type_error('IntVar'(X1)),gecode_argument_error(divmod(X0,X1,X2,X3,X4,X5),arg=2)))) + ; throw(error(type_error('Space'(X0)),gecode_argument_error(divmod(X0,X1,X2,X3,X4,X5),arg=1)))). + +dom(X0,X1,X2) :- + (is_Space_or_Clause(X0,Y0) + -> (is_BoolVar(X1,Y1) + -> (is_BoolVar(X2,Y2) + -> gecode_constraint_dom_199(Y0,Y1,Y2) + ; throw(error(type_error('BoolVar'(X2)),gecode_argument_error(dom(X0,X1,X2),arg=3)))) + ; (is_FloatVar(X1,Y1) + -> (is_FloatVal(X2,Y2) + -> gecode_constraint_dom_203(Y0,Y1,Y2) + ; (is_FloatVar(X2,Y2) + -> gecode_constraint_dom_205(Y0,Y1,Y2) + ; throw(error(type_error('FloatVar'(X2)),gecode_argument_error(dom(X0,X1,X2),arg=3))))) + ; (is_IntVar(X1,Y1) + -> (is_IntVar(X2,Y2) + -> gecode_constraint_dom_206(Y0,Y1,Y2) + ; (is_IntSet(X2,Y2) + -> gecode_constraint_dom_208(Y0,Y1,Y2) + ; (is_int(X2,Y2) + -> gecode_constraint_dom_212(Y0,Y1,Y2) + ; throw(error(type_error(int(X2)),gecode_argument_error(dom(X0,X1,X2),arg=3)))))) + ; (is_SetVar(X1,Y1) + -> (is_SetVar(X2,Y2) + -> gecode_constraint_dom_226(Y0,Y1,Y2) + ; throw(error(type_error('SetVar'(X2)),gecode_argument_error(dom(X0,X1,X2),arg=3)))) + ; (is_BoolVarArgs(X1,Y1) + -> (is_BoolVarArgs(X2,Y2) + -> gecode_constraint_dom_227(Y0,Y1,Y2) + ; throw(error(type_error('BoolVarArgs'(X2)),gecode_argument_error(dom(X0,X1,X2),arg=3)))) + ; (is_FloatVarArgs(X1,Y1) + -> (is_FloatVal(X2,Y2) + -> gecode_constraint_dom_230(Y0,Y1,Y2) + ; (is_FloatVarArgs(X2,Y2) + -> gecode_constraint_dom_231(Y0,Y1,Y2) + ; throw(error(type_error('FloatVarArgs'(X2)),gecode_argument_error(dom(X0,X1,X2),arg=3))))) + ; (is_IntVarArgs(X1,Y1) + -> (is_IntSet(X2,Y2) + -> gecode_constraint_dom_232(Y0,Y1,Y2) + ; (is_IntVarArgs(X2,Y2) + -> gecode_constraint_dom_234(Y0,Y1,Y2) + ; (is_int(X2,Y2) + -> gecode_constraint_dom_236(Y0,Y1,Y2) + ; throw(error(type_error(int(X2)),gecode_argument_error(dom(X0,X1,X2),arg=3)))))) + ; (is_SetVarArgs(X1,Y1) + -> (is_SetVarArgs(X2,Y2) + -> gecode_constraint_dom_243(Y0,Y1,Y2) + ; throw(error(type_error('SetVarArgs'(X2)),gecode_argument_error(dom(X0,X1,X2),arg=3)))) + ; throw(error(type_error('SetVarArgs'(X1)),gecode_argument_error(dom(X0,X1,X2),arg=2))))))))))) + ; throw(error(type_error('Space'(X0)),gecode_argument_error(dom(X0,X1,X2),arg=1)))). + +dom(X0,X1,X2,X3) :- + (is_Space_or_Clause(X0,Y0) + -> (is_BoolVar(X1,Y1) + -> (is_BoolVar(X2,Y2) + -> (is_IntPropLevel(X3,Y3) + -> gecode_constraint_dom_200(Y0,Y1,Y2,Y3) + ; throw(error(type_error('IntPropLevel'(X3)),gecode_argument_error(dom(X0,X1,X2,X3),arg=4)))) + ; throw(error(type_error('BoolVar'(X2)),gecode_argument_error(dom(X0,X1,X2,X3),arg=3)))) + ; (is_FloatVar(X1,Y1) + -> (is_FloatNum(X2,Y2) + -> (is_FloatNum(X3,Y3) + -> gecode_constraint_dom_201(Y0,Y1,Y2,Y3) + ; throw(error(type_error('FloatNum'(X3)),gecode_argument_error(dom(X0,X1,X2,X3),arg=4)))) + ; (is_FloatVal(X2,Y2) + -> (is_Reify(X3,Y3) + -> gecode_constraint_dom_204(Y0,Y1,Y2,Y3) + ; throw(error(type_error('Reify'(X3)),gecode_argument_error(dom(X0,X1,X2,X3),arg=4)))) + ; throw(error(type_error('FloatVal'(X2)),gecode_argument_error(dom(X0,X1,X2,X3),arg=3))))) + ; (is_IntVar(X1,Y1) + -> (is_IntVar(X2,Y2) + -> (is_IntPropLevel(X3,Y3) + -> gecode_constraint_dom_207(Y0,Y1,Y2,Y3) + ; throw(error(type_error('IntPropLevel'(X3)),gecode_argument_error(dom(X0,X1,X2,X3),arg=4)))) + ; (is_IntSet(X2,Y2) + -> (is_IntPropLevel(X3,Y3) + -> gecode_constraint_dom_209(Y0,Y1,Y2,Y3) + ; (is_Reify(X3,Y3) + -> gecode_constraint_dom_210(Y0,Y1,Y2,Y3) + ; throw(error(type_error('Reify'(X3)),gecode_argument_error(dom(X0,X1,X2,X3),arg=4))))) + ; (is_int(X2,Y2) + -> (is_IntPropLevel(X3,Y3) + -> gecode_constraint_dom_213(Y0,Y1,Y2,Y3) + ; (is_Reify(X3,Y3) + -> gecode_constraint_dom_214(Y0,Y1,Y2,Y3) + ; (is_int(X3,Y3) + -> gecode_constraint_dom_216(Y0,Y1,Y2,Y3) + ; throw(error(type_error(int(X3)),gecode_argument_error(dom(X0,X1,X2,X3),arg=4)))))) + ; throw(error(type_error(int(X2)),gecode_argument_error(dom(X0,X1,X2,X3),arg=3)))))) + ; (is_SetVar(X1,Y1) + -> (is_SetRelType(X2,Y2) + -> (is_IntSet(X3,Y3) + -> gecode_constraint_dom_220(Y0,Y1,Y2,Y3) + ; (is_int(X3,Y3) + -> gecode_constraint_dom_222(Y0,Y1,Y2,Y3) + ; throw(error(type_error(int(X3)),gecode_argument_error(dom(X0,X1,X2,X3),arg=4))))) + ; throw(error(type_error('SetRelType'(X2)),gecode_argument_error(dom(X0,X1,X2,X3),arg=3)))) + ; (is_BoolVarArgs(X1,Y1) + -> (is_BoolVarArgs(X2,Y2) + -> (is_IntPropLevel(X3,Y3) + -> gecode_constraint_dom_228(Y0,Y1,Y2,Y3) + ; throw(error(type_error('IntPropLevel'(X3)),gecode_argument_error(dom(X0,X1,X2,X3),arg=4)))) + ; throw(error(type_error('BoolVarArgs'(X2)),gecode_argument_error(dom(X0,X1,X2,X3),arg=3)))) + ; (is_FloatVarArgs(X1,Y1) + -> (is_FloatNum(X2,Y2) + -> (is_FloatNum(X3,Y3) + -> gecode_constraint_dom_229(Y0,Y1,Y2,Y3) + ; throw(error(type_error('FloatNum'(X3)),gecode_argument_error(dom(X0,X1,X2,X3),arg=4)))) + ; throw(error(type_error('FloatNum'(X2)),gecode_argument_error(dom(X0,X1,X2,X3),arg=3)))) + ; (is_IntVarArgs(X1,Y1) + -> (is_IntSet(X2,Y2) + -> (is_IntPropLevel(X3,Y3) + -> gecode_constraint_dom_233(Y0,Y1,Y2,Y3) + ; throw(error(type_error('IntPropLevel'(X3)),gecode_argument_error(dom(X0,X1,X2,X3),arg=4)))) + ; (is_IntVarArgs(X2,Y2) + -> (is_IntPropLevel(X3,Y3) + -> gecode_constraint_dom_235(Y0,Y1,Y2,Y3) + ; throw(error(type_error('IntPropLevel'(X3)),gecode_argument_error(dom(X0,X1,X2,X3),arg=4)))) + ; (is_int(X2,Y2) + -> (is_IntPropLevel(X3,Y3) + -> gecode_constraint_dom_237(Y0,Y1,Y2,Y3) + ; (is_int(X3,Y3) + -> gecode_constraint_dom_238(Y0,Y1,Y2,Y3) + ; throw(error(type_error(int(X3)),gecode_argument_error(dom(X0,X1,X2,X3),arg=4))))) + ; throw(error(type_error(int(X2)),gecode_argument_error(dom(X0,X1,X2,X3),arg=3)))))) + ; (is_SetVarArgs(X1,Y1) + -> (is_SetRelType(X2,Y2) + -> (is_IntSet(X3,Y3) + -> gecode_constraint_dom_240(Y0,Y1,Y2,Y3) + ; (is_int(X3,Y3) + -> gecode_constraint_dom_241(Y0,Y1,Y2,Y3) + ; throw(error(type_error(int(X3)),gecode_argument_error(dom(X0,X1,X2,X3),arg=4))))) + ; throw(error(type_error('SetRelType'(X2)),gecode_argument_error(dom(X0,X1,X2,X3),arg=3)))) + ; throw(error(type_error('SetVarArgs'(X1)),gecode_argument_error(dom(X0,X1,X2,X3),arg=2))))))))))) + ; throw(error(type_error('Space'(X0)),gecode_argument_error(dom(X0,X1,X2,X3),arg=1)))). + +dom(X0,X1,X2,X3,X4) :- + (is_Space_or_Clause(X0,Y0) + -> (is_FloatVar(X1,Y1) + -> (is_FloatNum(X2,Y2) + -> (is_FloatNum(X3,Y3) + -> (is_Reify(X4,Y4) + -> gecode_constraint_dom_202(Y0,Y1,Y2,Y3,Y4) + ; throw(error(type_error('Reify'(X4)),gecode_argument_error(dom(X0,X1,X2,X3,X4),arg=5)))) + ; throw(error(type_error('FloatNum'(X3)),gecode_argument_error(dom(X0,X1,X2,X3,X4),arg=4)))) + ; throw(error(type_error('FloatNum'(X2)),gecode_argument_error(dom(X0,X1,X2,X3,X4),arg=3)))) + ; (is_IntVar(X1,Y1) + -> (is_IntSet(X2,Y2) + -> (is_Reify(X3,Y3) + -> (is_IntPropLevel(X4,Y4) + -> gecode_constraint_dom_211(Y0,Y1,Y2,Y3,Y4) + ; throw(error(type_error('IntPropLevel'(X4)),gecode_argument_error(dom(X0,X1,X2,X3,X4),arg=5)))) + ; throw(error(type_error('Reify'(X3)),gecode_argument_error(dom(X0,X1,X2,X3,X4),arg=4)))) + ; (is_int(X2,Y2) + -> (is_Reify(X3,Y3) + -> (is_IntPropLevel(X4,Y4) + -> gecode_constraint_dom_215(Y0,Y1,Y2,Y3,Y4) + ; throw(error(type_error('IntPropLevel'(X4)),gecode_argument_error(dom(X0,X1,X2,X3,X4),arg=5)))) + ; (is_int(X3,Y3) + -> (is_IntPropLevel(X4,Y4) + -> gecode_constraint_dom_217(Y0,Y1,Y2,Y3,Y4) + ; (is_Reify(X4,Y4) + -> gecode_constraint_dom_218(Y0,Y1,Y2,Y3,Y4) + ; throw(error(type_error('Reify'(X4)),gecode_argument_error(dom(X0,X1,X2,X3,X4),arg=5))))) + ; throw(error(type_error(int(X3)),gecode_argument_error(dom(X0,X1,X2,X3,X4),arg=4))))) + ; throw(error(type_error(int(X2)),gecode_argument_error(dom(X0,X1,X2,X3,X4),arg=3))))) + ; (is_SetVar(X1,Y1) + -> (is_SetRelType(X2,Y2) + -> (is_IntSet(X3,Y3) + -> (is_Reify(X4,Y4) + -> gecode_constraint_dom_221(Y0,Y1,Y2,Y3,Y4) + ; throw(error(type_error('Reify'(X4)),gecode_argument_error(dom(X0,X1,X2,X3,X4),arg=5)))) + ; (is_int(X3,Y3) + -> (is_Reify(X4,Y4) + -> gecode_constraint_dom_223(Y0,Y1,Y2,Y3,Y4) + ; (is_int(X4,Y4) + -> gecode_constraint_dom_224(Y0,Y1,Y2,Y3,Y4) + ; throw(error(type_error(int(X4)),gecode_argument_error(dom(X0,X1,X2,X3,X4),arg=5))))) + ; throw(error(type_error(int(X3)),gecode_argument_error(dom(X0,X1,X2,X3,X4),arg=4))))) + ; throw(error(type_error('SetRelType'(X2)),gecode_argument_error(dom(X0,X1,X2,X3,X4),arg=3)))) + ; (is_IntVarArgs(X1,Y1) + -> (is_int(X2,Y2) + -> (is_int(X3,Y3) + -> (is_IntPropLevel(X4,Y4) + -> gecode_constraint_dom_239(Y0,Y1,Y2,Y3,Y4) + ; throw(error(type_error('IntPropLevel'(X4)),gecode_argument_error(dom(X0,X1,X2,X3,X4),arg=5)))) + ; throw(error(type_error(int(X3)),gecode_argument_error(dom(X0,X1,X2,X3,X4),arg=4)))) + ; throw(error(type_error(int(X2)),gecode_argument_error(dom(X0,X1,X2,X3,X4),arg=3)))) + ; (is_SetVarArgs(X1,Y1) + -> (is_SetRelType(X2,Y2) + -> (is_int(X3,Y3) + -> (is_int(X4,Y4) + -> gecode_constraint_dom_242(Y0,Y1,Y2,Y3,Y4) + ; throw(error(type_error(int(X4)),gecode_argument_error(dom(X0,X1,X2,X3,X4),arg=5)))) + ; throw(error(type_error(int(X3)),gecode_argument_error(dom(X0,X1,X2,X3,X4),arg=4)))) + ; throw(error(type_error('SetRelType'(X2)),gecode_argument_error(dom(X0,X1,X2,X3,X4),arg=3)))) + ; throw(error(type_error('SetVarArgs'(X1)),gecode_argument_error(dom(X0,X1,X2,X3,X4),arg=2)))))))) + ; throw(error(type_error('Space'(X0)),gecode_argument_error(dom(X0,X1,X2,X3,X4),arg=1)))). + +dom(X0,X1,X2,X3,X4,X5) :- + (is_Space_or_Clause(X0,Y0) + -> (is_IntVar(X1,Y1) + -> (is_int(X2,Y2) + -> (is_int(X3,Y3) + -> (is_Reify(X4,Y4) + -> (is_IntPropLevel(X5,Y5) + -> gecode_constraint_dom_219(Y0,Y1,Y2,Y3,Y4,Y5) + ; throw(error(type_error('IntPropLevel'(X5)),gecode_argument_error(dom(X0,X1,X2,X3,X4,X5),arg=6)))) + ; throw(error(type_error('Reify'(X4)),gecode_argument_error(dom(X0,X1,X2,X3,X4,X5),arg=5)))) + ; throw(error(type_error(int(X3)),gecode_argument_error(dom(X0,X1,X2,X3,X4,X5),arg=4)))) + ; throw(error(type_error(int(X2)),gecode_argument_error(dom(X0,X1,X2,X3,X4,X5),arg=3)))) + ; (is_SetVar(X1,Y1) + -> (is_SetRelType(X2,Y2) + -> (is_int(X3,Y3) + -> (is_int(X4,Y4) + -> (is_Reify(X5,Y5) + -> gecode_constraint_dom_225(Y0,Y1,Y2,Y3,Y4,Y5) + ; throw(error(type_error('Reify'(X5)),gecode_argument_error(dom(X0,X1,X2,X3,X4,X5),arg=6)))) + ; throw(error(type_error(int(X4)),gecode_argument_error(dom(X0,X1,X2,X3,X4,X5),arg=5)))) + ; throw(error(type_error(int(X3)),gecode_argument_error(dom(X0,X1,X2,X3,X4,X5),arg=4)))) + ; throw(error(type_error('SetRelType'(X2)),gecode_argument_error(dom(X0,X1,X2,X3,X4,X5),arg=3)))) + ; throw(error(type_error('SetVar'(X1)),gecode_argument_error(dom(X0,X1,X2,X3,X4,X5),arg=2))))) + ; throw(error(type_error('Space'(X0)),gecode_argument_error(dom(X0,X1,X2,X3,X4,X5),arg=1)))). + +element(X0,X1,X2,X3) :- + (is_Space_or_Clause(X0,Y0) + -> (is_IntArgs(X1,Y1) + -> (is_IntVar(X2,Y2) + -> (is_BoolVar(X3,Y3) + -> gecode_constraint_element_244(Y0,Y1,Y2,Y3) + ; (is_IntVar(X3,Y3) + -> gecode_constraint_element_246(Y0,Y1,Y2,Y3) + ; (is_int(X3,Y3) + -> gecode_constraint_element_248(Y0,Y1,Y2,Y3) + ; throw(error(type_error(int(X3)),gecode_argument_error(element(X0,X1,X2,X3),arg=4)))))) + ; throw(error(type_error('IntVar'(X2)),gecode_argument_error(element(X0,X1,X2,X3),arg=3)))) + ; (is_BoolVarArgs(X1,Y1) + -> (is_IntVar(X2,Y2) + -> (is_BoolVar(X3,Y3) + -> gecode_constraint_element_254(Y0,Y1,Y2,Y3) + ; (is_int(X3,Y3) + -> gecode_constraint_element_256(Y0,Y1,Y2,Y3) + ; throw(error(type_error(int(X3)),gecode_argument_error(element(X0,X1,X2,X3),arg=4))))) + ; throw(error(type_error('IntVar'(X2)),gecode_argument_error(element(X0,X1,X2,X3),arg=3)))) + ; (is_IntVarArgs(X1,Y1) + -> (is_IntVar(X2,Y2) + -> (is_IntVar(X3,Y3) + -> gecode_constraint_element_260(Y0,Y1,Y2,Y3) + ; (is_int(X3,Y3) + -> gecode_constraint_element_262(Y0,Y1,Y2,Y3) + ; throw(error(type_error(int(X3)),gecode_argument_error(element(X0,X1,X2,X3),arg=4))))) + ; throw(error(type_error('IntVar'(X2)),gecode_argument_error(element(X0,X1,X2,X3),arg=3)))) + ; throw(error(type_error('IntVarArgs'(X1)),gecode_argument_error(element(X0,X1,X2,X3),arg=2)))))) + ; throw(error(type_error('Space'(X0)),gecode_argument_error(element(X0,X1,X2,X3),arg=1)))). + +element(X0,X1,X2,X3,X4) :- + (is_Space_or_Clause(X0,Y0) + -> (is_IntArgs(X1,Y1) + -> (is_IntVar(X2,Y2) + -> (is_BoolVar(X3,Y3) + -> (is_IntPropLevel(X4,Y4) + -> gecode_constraint_element_245(Y0,Y1,Y2,Y3,Y4) + ; throw(error(type_error('IntPropLevel'(X4)),gecode_argument_error(element(X0,X1,X2,X3,X4),arg=5)))) + ; (is_IntVar(X3,Y3) + -> (is_IntPropLevel(X4,Y4) + -> gecode_constraint_element_247(Y0,Y1,Y2,Y3,Y4) + ; throw(error(type_error('IntPropLevel'(X4)),gecode_argument_error(element(X0,X1,X2,X3,X4),arg=5)))) + ; (is_int(X3,Y3) + -> (is_IntPropLevel(X4,Y4) + -> gecode_constraint_element_249(Y0,Y1,Y2,Y3,Y4) + ; throw(error(type_error('IntPropLevel'(X4)),gecode_argument_error(element(X0,X1,X2,X3,X4),arg=5)))) + ; throw(error(type_error(int(X3)),gecode_argument_error(element(X0,X1,X2,X3,X4),arg=4)))))) + ; throw(error(type_error('IntVar'(X2)),gecode_argument_error(element(X0,X1,X2,X3,X4),arg=3)))) + ; (is_BoolVarArgs(X1,Y1) + -> (is_IntVar(X2,Y2) + -> (is_BoolVar(X3,Y3) + -> (is_IntPropLevel(X4,Y4) + -> gecode_constraint_element_255(Y0,Y1,Y2,Y3,Y4) + ; throw(error(type_error('IntPropLevel'(X4)),gecode_argument_error(element(X0,X1,X2,X3,X4),arg=5)))) + ; (is_int(X3,Y3) + -> (is_IntPropLevel(X4,Y4) + -> gecode_constraint_element_257(Y0,Y1,Y2,Y3,Y4) + ; throw(error(type_error('IntPropLevel'(X4)),gecode_argument_error(element(X0,X1,X2,X3,X4),arg=5)))) + ; throw(error(type_error(int(X3)),gecode_argument_error(element(X0,X1,X2,X3,X4),arg=4))))) + ; throw(error(type_error('IntVar'(X2)),gecode_argument_error(element(X0,X1,X2,X3,X4),arg=3)))) + ; (is_IntVarArgs(X1,Y1) + -> (is_IntVar(X2,Y2) + -> (is_IntVar(X3,Y3) + -> (is_IntPropLevel(X4,Y4) + -> gecode_constraint_element_261(Y0,Y1,Y2,Y3,Y4) + ; throw(error(type_error('IntPropLevel'(X4)),gecode_argument_error(element(X0,X1,X2,X3,X4),arg=5)))) + ; (is_int(X3,Y3) + -> (is_IntPropLevel(X4,Y4) + -> gecode_constraint_element_263(Y0,Y1,Y2,Y3,Y4) + ; throw(error(type_error('IntPropLevel'(X4)),gecode_argument_error(element(X0,X1,X2,X3,X4),arg=5)))) + ; throw(error(type_error(int(X3)),gecode_argument_error(element(X0,X1,X2,X3,X4),arg=4))))) + ; throw(error(type_error('IntVar'(X2)),gecode_argument_error(element(X0,X1,X2,X3,X4),arg=3)))) + ; throw(error(type_error('IntVarArgs'(X1)),gecode_argument_error(element(X0,X1,X2,X3,X4),arg=2)))))) + ; throw(error(type_error('Space'(X0)),gecode_argument_error(element(X0,X1,X2,X3,X4),arg=1)))). + +element(X0,X1,X2,X3,X4,X5,X6) :- + (is_Space_or_Clause(X0,Y0) + -> (is_IntArgs(X1,Y1) + -> (is_IntVar(X2,Y2) + -> (is_int(X3,Y3) + -> (is_IntVar(X4,Y4) + -> (is_int(X5,Y5) + -> (is_BoolVar(X6,Y6) + -> gecode_constraint_element_250(Y0,Y1,Y2,Y3,Y4,Y5,Y6) + ; (is_IntVar(X6,Y6) + -> gecode_constraint_element_252(Y0,Y1,Y2,Y3,Y4,Y5,Y6) + ; throw(error(type_error('IntVar'(X6)),gecode_argument_error(element(X0,X1,X2,X3,X4,X5,X6),arg=7))))) + ; throw(error(type_error(int(X5)),gecode_argument_error(element(X0,X1,X2,X3,X4,X5,X6),arg=6)))) + ; throw(error(type_error('IntVar'(X4)),gecode_argument_error(element(X0,X1,X2,X3,X4,X5,X6),arg=5)))) + ; throw(error(type_error(int(X3)),gecode_argument_error(element(X0,X1,X2,X3,X4,X5,X6),arg=4)))) + ; throw(error(type_error('IntVar'(X2)),gecode_argument_error(element(X0,X1,X2,X3,X4,X5,X6),arg=3)))) + ; (is_BoolVarArgs(X1,Y1) + -> (is_IntVar(X2,Y2) + -> (is_int(X3,Y3) + -> (is_IntVar(X4,Y4) + -> (is_int(X5,Y5) + -> (is_BoolVar(X6,Y6) + -> gecode_constraint_element_258(Y0,Y1,Y2,Y3,Y4,Y5,Y6) + ; throw(error(type_error('BoolVar'(X6)),gecode_argument_error(element(X0,X1,X2,X3,X4,X5,X6),arg=7)))) + ; throw(error(type_error(int(X5)),gecode_argument_error(element(X0,X1,X2,X3,X4,X5,X6),arg=6)))) + ; throw(error(type_error('IntVar'(X4)),gecode_argument_error(element(X0,X1,X2,X3,X4,X5,X6),arg=5)))) + ; throw(error(type_error(int(X3)),gecode_argument_error(element(X0,X1,X2,X3,X4,X5,X6),arg=4)))) + ; throw(error(type_error('IntVar'(X2)),gecode_argument_error(element(X0,X1,X2,X3,X4,X5,X6),arg=3)))) + ; (is_IntVarArgs(X1,Y1) + -> (is_IntVar(X2,Y2) + -> (is_int(X3,Y3) + -> (is_IntVar(X4,Y4) + -> (is_int(X5,Y5) + -> (is_IntVar(X6,Y6) + -> gecode_constraint_element_264(Y0,Y1,Y2,Y3,Y4,Y5,Y6) + ; throw(error(type_error('IntVar'(X6)),gecode_argument_error(element(X0,X1,X2,X3,X4,X5,X6),arg=7)))) + ; throw(error(type_error(int(X5)),gecode_argument_error(element(X0,X1,X2,X3,X4,X5,X6),arg=6)))) + ; throw(error(type_error('IntVar'(X4)),gecode_argument_error(element(X0,X1,X2,X3,X4,X5,X6),arg=5)))) + ; throw(error(type_error(int(X3)),gecode_argument_error(element(X0,X1,X2,X3,X4,X5,X6),arg=4)))) + ; throw(error(type_error('IntVar'(X2)),gecode_argument_error(element(X0,X1,X2,X3,X4,X5,X6),arg=3)))) + ; throw(error(type_error('IntVarArgs'(X1)),gecode_argument_error(element(X0,X1,X2,X3,X4,X5,X6),arg=2)))))) + ; throw(error(type_error('Space'(X0)),gecode_argument_error(element(X0,X1,X2,X3,X4,X5,X6),arg=1)))). + +element(X0,X1,X2,X3,X4,X5,X6,X7) :- + (is_Space_or_Clause(X0,Y0) + -> (is_IntArgs(X1,Y1) + -> (is_IntVar(X2,Y2) + -> (is_int(X3,Y3) + -> (is_IntVar(X4,Y4) + -> (is_int(X5,Y5) + -> (is_BoolVar(X6,Y6) + -> (is_IntPropLevel(X7,Y7) + -> gecode_constraint_element_251(Y0,Y1,Y2,Y3,Y4,Y5,Y6,Y7) + ; throw(error(type_error('IntPropLevel'(X7)),gecode_argument_error(element(X0,X1,X2,X3,X4,X5,X6,X7),arg=8)))) + ; (is_IntVar(X6,Y6) + -> (is_IntPropLevel(X7,Y7) + -> gecode_constraint_element_253(Y0,Y1,Y2,Y3,Y4,Y5,Y6,Y7) + ; throw(error(type_error('IntPropLevel'(X7)),gecode_argument_error(element(X0,X1,X2,X3,X4,X5,X6,X7),arg=8)))) + ; throw(error(type_error('IntVar'(X6)),gecode_argument_error(element(X0,X1,X2,X3,X4,X5,X6,X7),arg=7))))) + ; throw(error(type_error(int(X5)),gecode_argument_error(element(X0,X1,X2,X3,X4,X5,X6,X7),arg=6)))) + ; throw(error(type_error('IntVar'(X4)),gecode_argument_error(element(X0,X1,X2,X3,X4,X5,X6,X7),arg=5)))) + ; throw(error(type_error(int(X3)),gecode_argument_error(element(X0,X1,X2,X3,X4,X5,X6,X7),arg=4)))) + ; throw(error(type_error('IntVar'(X2)),gecode_argument_error(element(X0,X1,X2,X3,X4,X5,X6,X7),arg=3)))) + ; (is_BoolVarArgs(X1,Y1) + -> (is_IntVar(X2,Y2) + -> (is_int(X3,Y3) + -> (is_IntVar(X4,Y4) + -> (is_int(X5,Y5) + -> (is_BoolVar(X6,Y6) + -> (is_IntPropLevel(X7,Y7) + -> gecode_constraint_element_259(Y0,Y1,Y2,Y3,Y4,Y5,Y6,Y7) + ; throw(error(type_error('IntPropLevel'(X7)),gecode_argument_error(element(X0,X1,X2,X3,X4,X5,X6,X7),arg=8)))) + ; throw(error(type_error('BoolVar'(X6)),gecode_argument_error(element(X0,X1,X2,X3,X4,X5,X6,X7),arg=7)))) + ; throw(error(type_error(int(X5)),gecode_argument_error(element(X0,X1,X2,X3,X4,X5,X6,X7),arg=6)))) + ; throw(error(type_error('IntVar'(X4)),gecode_argument_error(element(X0,X1,X2,X3,X4,X5,X6,X7),arg=5)))) + ; throw(error(type_error(int(X3)),gecode_argument_error(element(X0,X1,X2,X3,X4,X5,X6,X7),arg=4)))) + ; throw(error(type_error('IntVar'(X2)),gecode_argument_error(element(X0,X1,X2,X3,X4,X5,X6,X7),arg=3)))) + ; (is_IntVarArgs(X1,Y1) + -> (is_IntVar(X2,Y2) + -> (is_int(X3,Y3) + -> (is_IntVar(X4,Y4) + -> (is_int(X5,Y5) + -> (is_IntVar(X6,Y6) + -> (is_IntPropLevel(X7,Y7) + -> gecode_constraint_element_265(Y0,Y1,Y2,Y3,Y4,Y5,Y6,Y7) + ; throw(error(type_error('IntPropLevel'(X7)),gecode_argument_error(element(X0,X1,X2,X3,X4,X5,X6,X7),arg=8)))) + ; throw(error(type_error('IntVar'(X6)),gecode_argument_error(element(X0,X1,X2,X3,X4,X5,X6,X7),arg=7)))) + ; throw(error(type_error(int(X5)),gecode_argument_error(element(X0,X1,X2,X3,X4,X5,X6,X7),arg=6)))) + ; throw(error(type_error('IntVar'(X4)),gecode_argument_error(element(X0,X1,X2,X3,X4,X5,X6,X7),arg=5)))) + ; throw(error(type_error(int(X3)),gecode_argument_error(element(X0,X1,X2,X3,X4,X5,X6,X7),arg=4)))) + ; throw(error(type_error('IntVar'(X2)),gecode_argument_error(element(X0,X1,X2,X3,X4,X5,X6,X7),arg=3)))) + ; throw(error(type_error('IntVarArgs'(X1)),gecode_argument_error(element(X0,X1,X2,X3,X4,X5,X6,X7),arg=2)))))) + ; throw(error(type_error('Space'(X0)),gecode_argument_error(element(X0,X1,X2,X3,X4,X5,X6,X7),arg=1)))). + +extensional(X0,X1,X2) :- + (is_Space_or_Clause(X0,Y0) + -> (is_BoolVarArgs(X1,Y1) + -> (is_DFA(X2,Y2) + -> gecode_constraint_extensional_266(Y0,Y1,Y2) + ; (is_TupleSet(X2,Y2) + -> gecode_constraint_extensional_268(Y0,Y1,Y2) + ; throw(error(type_error('TupleSet'(X2)),gecode_argument_error(extensional(X0,X1,X2),arg=3))))) + ; (is_IntVarArgs(X1,Y1) + -> (is_DFA(X2,Y2) + -> gecode_constraint_extensional_270(Y0,Y1,Y2) + ; (is_TupleSet(X2,Y2) + -> gecode_constraint_extensional_272(Y0,Y1,Y2) + ; throw(error(type_error('TupleSet'(X2)),gecode_argument_error(extensional(X0,X1,X2),arg=3))))) + ; throw(error(type_error('IntVarArgs'(X1)),gecode_argument_error(extensional(X0,X1,X2),arg=2))))) + ; throw(error(type_error('Space'(X0)),gecode_argument_error(extensional(X0,X1,X2),arg=1)))). + +extensional(X0,X1,X2,X3) :- + (is_Space_or_Clause(X0,Y0) + -> (is_BoolVarArgs(X1,Y1) + -> (is_DFA(X2,Y2) + -> (is_IntPropLevel(X3,Y3) + -> gecode_constraint_extensional_267(Y0,Y1,Y2,Y3) + ; throw(error(type_error('IntPropLevel'(X3)),gecode_argument_error(extensional(X0,X1,X2,X3),arg=4)))) + ; (is_TupleSet(X2,Y2) + -> (is_IntPropLevel(X3,Y3) + -> gecode_constraint_extensional_269(Y0,Y1,Y2,Y3) + ; throw(error(type_error('IntPropLevel'(X3)),gecode_argument_error(extensional(X0,X1,X2,X3),arg=4)))) + ; throw(error(type_error('TupleSet'(X2)),gecode_argument_error(extensional(X0,X1,X2,X3),arg=3))))) + ; (is_IntVarArgs(X1,Y1) + -> (is_DFA(X2,Y2) + -> (is_IntPropLevel(X3,Y3) + -> gecode_constraint_extensional_271(Y0,Y1,Y2,Y3) + ; throw(error(type_error('IntPropLevel'(X3)),gecode_argument_error(extensional(X0,X1,X2,X3),arg=4)))) + ; (is_TupleSet(X2,Y2) + -> (is_IntPropLevel(X3,Y3) + -> gecode_constraint_extensional_273(Y0,Y1,Y2,Y3) + ; throw(error(type_error('IntPropLevel'(X3)),gecode_argument_error(extensional(X0,X1,X2,X3),arg=4)))) + ; throw(error(type_error('TupleSet'(X2)),gecode_argument_error(extensional(X0,X1,X2,X3),arg=3))))) + ; throw(error(type_error('IntVarArgs'(X1)),gecode_argument_error(extensional(X0,X1,X2,X3),arg=2))))) + ; throw(error(type_error('Space'(X0)),gecode_argument_error(extensional(X0,X1,X2,X3),arg=1)))). + +ite(X0,X1,X2,X3,X4) :- + (is_Space_or_Clause(X0,Y0) + -> (is_BoolVar(X1,Y1) + -> (is_BoolVar(X2,Y2) + -> (is_BoolVar(X3,Y3) + -> (is_BoolVar(X4,Y4) + -> gecode_constraint_ite_274(Y0,Y1,Y2,Y3,Y4) + ; throw(error(type_error('BoolVar'(X4)),gecode_argument_error(ite(X0,X1,X2,X3,X4),arg=5)))) + ; throw(error(type_error('BoolVar'(X3)),gecode_argument_error(ite(X0,X1,X2,X3,X4),arg=4)))) + ; (is_FloatVar(X2,Y2) + -> (is_FloatVar(X3,Y3) + -> (is_FloatVar(X4,Y4) + -> gecode_constraint_ite_276(Y0,Y1,Y2,Y3,Y4) + ; throw(error(type_error('FloatVar'(X4)),gecode_argument_error(ite(X0,X1,X2,X3,X4),arg=5)))) + ; throw(error(type_error('FloatVar'(X3)),gecode_argument_error(ite(X0,X1,X2,X3,X4),arg=4)))) + ; (is_IntVar(X2,Y2) + -> (is_IntVar(X3,Y3) + -> (is_IntVar(X4,Y4) + -> gecode_constraint_ite_277(Y0,Y1,Y2,Y3,Y4) + ; throw(error(type_error('IntVar'(X4)),gecode_argument_error(ite(X0,X1,X2,X3,X4),arg=5)))) + ; throw(error(type_error('IntVar'(X3)),gecode_argument_error(ite(X0,X1,X2,X3,X4),arg=4)))) + ; (is_SetVar(X2,Y2) + -> (is_SetVar(X3,Y3) + -> (is_SetVar(X4,Y4) + -> gecode_constraint_ite_279(Y0,Y1,Y2,Y3,Y4) + ; throw(error(type_error('SetVar'(X4)),gecode_argument_error(ite(X0,X1,X2,X3,X4),arg=5)))) + ; throw(error(type_error('SetVar'(X3)),gecode_argument_error(ite(X0,X1,X2,X3,X4),arg=4)))) + ; throw(error(type_error('SetVar'(X2)),gecode_argument_error(ite(X0,X1,X2,X3,X4),arg=3))))))) + ; throw(error(type_error('BoolVar'(X1)),gecode_argument_error(ite(X0,X1,X2,X3,X4),arg=2)))) + ; throw(error(type_error('Space'(X0)),gecode_argument_error(ite(X0,X1,X2,X3,X4),arg=1)))). + +ite(X0,X1,X2,X3,X4,X5) :- + (is_Space_or_Clause(X0,Y0) + -> (is_BoolVar(X1,Y1) + -> (is_BoolVar(X2,Y2) + -> (is_BoolVar(X3,Y3) + -> (is_BoolVar(X4,Y4) + -> (is_IntPropLevel(X5,Y5) + -> gecode_constraint_ite_275(Y0,Y1,Y2,Y3,Y4,Y5) + ; throw(error(type_error('IntPropLevel'(X5)),gecode_argument_error(ite(X0,X1,X2,X3,X4,X5),arg=6)))) + ; throw(error(type_error('BoolVar'(X4)),gecode_argument_error(ite(X0,X1,X2,X3,X4,X5),arg=5)))) + ; throw(error(type_error('BoolVar'(X3)),gecode_argument_error(ite(X0,X1,X2,X3,X4,X5),arg=4)))) + ; (is_IntVar(X2,Y2) + -> (is_IntVar(X3,Y3) + -> (is_IntVar(X4,Y4) + -> (is_IntPropLevel(X5,Y5) + -> gecode_constraint_ite_278(Y0,Y1,Y2,Y3,Y4,Y5) + ; throw(error(type_error('IntPropLevel'(X5)),gecode_argument_error(ite(X0,X1,X2,X3,X4,X5),arg=6)))) + ; throw(error(type_error('IntVar'(X4)),gecode_argument_error(ite(X0,X1,X2,X3,X4,X5),arg=5)))) + ; throw(error(type_error('IntVar'(X3)),gecode_argument_error(ite(X0,X1,X2,X3,X4,X5),arg=4)))) + ; throw(error(type_error('IntVar'(X2)),gecode_argument_error(ite(X0,X1,X2,X3,X4,X5),arg=3))))) + ; throw(error(type_error('BoolVar'(X1)),gecode_argument_error(ite(X0,X1,X2,X3,X4,X5),arg=2)))) + ; throw(error(type_error('Space'(X0)),gecode_argument_error(ite(X0,X1,X2,X3,X4,X5),arg=1)))). + +linear(X0,X1,X2,X3) :- + (is_Space_or_Clause(X0,Y0) + -> (is_BoolVarArgs(X1,Y1) + -> (is_IntRelType(X2,Y2) + -> (is_IntVar(X3,Y3) + -> gecode_constraint_linear_280(Y0,Y1,Y2,Y3) + ; (is_int(X3,Y3) + -> gecode_constraint_linear_284(Y0,Y1,Y2,Y3) + ; throw(error(type_error(int(X3)),gecode_argument_error(linear(X0,X1,X2,X3),arg=4))))) + ; throw(error(type_error('IntRelType'(X2)),gecode_argument_error(linear(X0,X1,X2,X3),arg=3)))) + ; (is_FloatVarArgs(X1,Y1) + -> (is_FloatRelType(X2,Y2) + -> (is_FloatVal(X3,Y3) + -> gecode_constraint_linear_292(Y0,Y1,Y2,Y3) + ; (is_FloatVar(X3,Y3) + -> gecode_constraint_linear_294(Y0,Y1,Y2,Y3) + ; throw(error(type_error('FloatVar'(X3)),gecode_argument_error(linear(X0,X1,X2,X3),arg=4))))) + ; throw(error(type_error('FloatRelType'(X2)),gecode_argument_error(linear(X0,X1,X2,X3),arg=3)))) + ; (is_IntVarArgs(X1,Y1) + -> (is_IntRelType(X2,Y2) + -> (is_IntVar(X3,Y3) + -> gecode_constraint_linear_312(Y0,Y1,Y2,Y3) + ; (is_int(X3,Y3) + -> gecode_constraint_linear_316(Y0,Y1,Y2,Y3) + ; throw(error(type_error(int(X3)),gecode_argument_error(linear(X0,X1,X2,X3),arg=4))))) + ; throw(error(type_error('IntRelType'(X2)),gecode_argument_error(linear(X0,X1,X2,X3),arg=3)))) + ; throw(error(type_error('IntVarArgs'(X1)),gecode_argument_error(linear(X0,X1,X2,X3),arg=2)))))) + ; throw(error(type_error('Space'(X0)),gecode_argument_error(linear(X0,X1,X2,X3),arg=1)))). + +linear(X0,X1,X2,X3,X4) :- + (is_Space_or_Clause(X0,Y0) + -> (is_BoolVarArgs(X1,Y1) + -> (is_IntRelType(X2,Y2) + -> (is_IntVar(X3,Y3) + -> (is_IntPropLevel(X4,Y4) + -> gecode_constraint_linear_281(Y0,Y1,Y2,Y3,Y4) + ; (is_Reify(X4,Y4) + -> gecode_constraint_linear_282(Y0,Y1,Y2,Y3,Y4) + ; throw(error(type_error('Reify'(X4)),gecode_argument_error(linear(X0,X1,X2,X3,X4),arg=5))))) + ; (is_int(X3,Y3) + -> (is_IntPropLevel(X4,Y4) + -> gecode_constraint_linear_285(Y0,Y1,Y2,Y3,Y4) + ; (is_Reify(X4,Y4) + -> gecode_constraint_linear_286(Y0,Y1,Y2,Y3,Y4) + ; throw(error(type_error('Reify'(X4)),gecode_argument_error(linear(X0,X1,X2,X3,X4),arg=5))))) + ; throw(error(type_error(int(X3)),gecode_argument_error(linear(X0,X1,X2,X3,X4),arg=4))))) + ; throw(error(type_error('IntRelType'(X2)),gecode_argument_error(linear(X0,X1,X2,X3,X4),arg=3)))) + ; (is_FloatValArgs(X1,Y1) + -> (is_FloatVarArgs(X2,Y2) + -> (is_FloatRelType(X3,Y3) + -> (is_FloatVal(X4,Y4) + -> gecode_constraint_linear_288(Y0,Y1,Y2,Y3,Y4) + ; (is_FloatVar(X4,Y4) + -> gecode_constraint_linear_290(Y0,Y1,Y2,Y3,Y4) + ; throw(error(type_error('FloatVar'(X4)),gecode_argument_error(linear(X0,X1,X2,X3,X4),arg=5))))) + ; throw(error(type_error('FloatRelType'(X3)),gecode_argument_error(linear(X0,X1,X2,X3,X4),arg=4)))) + ; throw(error(type_error('FloatVarArgs'(X2)),gecode_argument_error(linear(X0,X1,X2,X3,X4),arg=3)))) + ; (is_FloatVarArgs(X1,Y1) + -> (is_FloatRelType(X2,Y2) + -> (is_FloatVal(X3,Y3) + -> (is_Reify(X4,Y4) + -> gecode_constraint_linear_293(Y0,Y1,Y2,Y3,Y4) + ; throw(error(type_error('Reify'(X4)),gecode_argument_error(linear(X0,X1,X2,X3,X4),arg=5)))) + ; (is_FloatVar(X3,Y3) + -> (is_Reify(X4,Y4) + -> gecode_constraint_linear_295(Y0,Y1,Y2,Y3,Y4) + ; throw(error(type_error('Reify'(X4)),gecode_argument_error(linear(X0,X1,X2,X3,X4),arg=5)))) + ; throw(error(type_error('FloatVar'(X3)),gecode_argument_error(linear(X0,X1,X2,X3,X4),arg=4))))) + ; throw(error(type_error('FloatRelType'(X2)),gecode_argument_error(linear(X0,X1,X2,X3,X4),arg=3)))) + ; (is_IntArgs(X1,Y1) + -> (is_BoolVarArgs(X2,Y2) + -> (is_IntRelType(X3,Y3) + -> (is_IntVar(X4,Y4) + -> gecode_constraint_linear_296(Y0,Y1,Y2,Y3,Y4) + ; (is_int(X4,Y4) + -> gecode_constraint_linear_300(Y0,Y1,Y2,Y3,Y4) + ; throw(error(type_error(int(X4)),gecode_argument_error(linear(X0,X1,X2,X3,X4),arg=5))))) + ; throw(error(type_error('IntRelType'(X3)),gecode_argument_error(linear(X0,X1,X2,X3,X4),arg=4)))) + ; (is_IntVarArgs(X2,Y2) + -> (is_IntRelType(X3,Y3) + -> (is_IntVar(X4,Y4) + -> gecode_constraint_linear_304(Y0,Y1,Y2,Y3,Y4) + ; (is_int(X4,Y4) + -> gecode_constraint_linear_308(Y0,Y1,Y2,Y3,Y4) + ; throw(error(type_error(int(X4)),gecode_argument_error(linear(X0,X1,X2,X3,X4),arg=5))))) + ; throw(error(type_error('IntRelType'(X3)),gecode_argument_error(linear(X0,X1,X2,X3,X4),arg=4)))) + ; throw(error(type_error('IntVarArgs'(X2)),gecode_argument_error(linear(X0,X1,X2,X3,X4),arg=3))))) + ; (is_IntVarArgs(X1,Y1) + -> (is_IntRelType(X2,Y2) + -> (is_IntVar(X3,Y3) + -> (is_IntPropLevel(X4,Y4) + -> gecode_constraint_linear_313(Y0,Y1,Y2,Y3,Y4) + ; (is_Reify(X4,Y4) + -> gecode_constraint_linear_314(Y0,Y1,Y2,Y3,Y4) + ; throw(error(type_error('Reify'(X4)),gecode_argument_error(linear(X0,X1,X2,X3,X4),arg=5))))) + ; (is_int(X3,Y3) + -> (is_IntPropLevel(X4,Y4) + -> gecode_constraint_linear_317(Y0,Y1,Y2,Y3,Y4) + ; (is_Reify(X4,Y4) + -> gecode_constraint_linear_318(Y0,Y1,Y2,Y3,Y4) + ; throw(error(type_error('Reify'(X4)),gecode_argument_error(linear(X0,X1,X2,X3,X4),arg=5))))) + ; throw(error(type_error(int(X3)),gecode_argument_error(linear(X0,X1,X2,X3,X4),arg=4))))) + ; throw(error(type_error('IntRelType'(X2)),gecode_argument_error(linear(X0,X1,X2,X3,X4),arg=3)))) + ; throw(error(type_error('IntVarArgs'(X1)),gecode_argument_error(linear(X0,X1,X2,X3,X4),arg=2)))))))) + ; throw(error(type_error('Space'(X0)),gecode_argument_error(linear(X0,X1,X2,X3,X4),arg=1)))). + +linear(X0,X1,X2,X3,X4,X5) :- + (is_Space_or_Clause(X0,Y0) + -> (is_BoolVarArgs(X1,Y1) + -> (is_IntRelType(X2,Y2) + -> (is_IntVar(X3,Y3) + -> (is_Reify(X4,Y4) + -> (is_IntPropLevel(X5,Y5) + -> gecode_constraint_linear_283(Y0,Y1,Y2,Y3,Y4,Y5) + ; throw(error(type_error('IntPropLevel'(X5)),gecode_argument_error(linear(X0,X1,X2,X3,X4,X5),arg=6)))) + ; throw(error(type_error('Reify'(X4)),gecode_argument_error(linear(X0,X1,X2,X3,X4,X5),arg=5)))) + ; (is_int(X3,Y3) + -> (is_Reify(X4,Y4) + -> (is_IntPropLevel(X5,Y5) + -> gecode_constraint_linear_287(Y0,Y1,Y2,Y3,Y4,Y5) + ; throw(error(type_error('IntPropLevel'(X5)),gecode_argument_error(linear(X0,X1,X2,X3,X4,X5),arg=6)))) + ; throw(error(type_error('Reify'(X4)),gecode_argument_error(linear(X0,X1,X2,X3,X4,X5),arg=5)))) + ; throw(error(type_error(int(X3)),gecode_argument_error(linear(X0,X1,X2,X3,X4,X5),arg=4))))) + ; throw(error(type_error('IntRelType'(X2)),gecode_argument_error(linear(X0,X1,X2,X3,X4,X5),arg=3)))) + ; (is_FloatValArgs(X1,Y1) + -> (is_FloatVarArgs(X2,Y2) + -> (is_FloatRelType(X3,Y3) + -> (is_FloatVal(X4,Y4) + -> (is_Reify(X5,Y5) + -> gecode_constraint_linear_289(Y0,Y1,Y2,Y3,Y4,Y5) + ; throw(error(type_error('Reify'(X5)),gecode_argument_error(linear(X0,X1,X2,X3,X4,X5),arg=6)))) + ; (is_FloatVar(X4,Y4) + -> (is_Reify(X5,Y5) + -> gecode_constraint_linear_291(Y0,Y1,Y2,Y3,Y4,Y5) + ; throw(error(type_error('Reify'(X5)),gecode_argument_error(linear(X0,X1,X2,X3,X4,X5),arg=6)))) + ; throw(error(type_error('FloatVar'(X4)),gecode_argument_error(linear(X0,X1,X2,X3,X4,X5),arg=5))))) + ; throw(error(type_error('FloatRelType'(X3)),gecode_argument_error(linear(X0,X1,X2,X3,X4,X5),arg=4)))) + ; throw(error(type_error('FloatVarArgs'(X2)),gecode_argument_error(linear(X0,X1,X2,X3,X4,X5),arg=3)))) + ; (is_IntArgs(X1,Y1) + -> (is_BoolVarArgs(X2,Y2) + -> (is_IntRelType(X3,Y3) + -> (is_IntVar(X4,Y4) + -> (is_IntPropLevel(X5,Y5) + -> gecode_constraint_linear_297(Y0,Y1,Y2,Y3,Y4,Y5) + ; (is_Reify(X5,Y5) + -> gecode_constraint_linear_298(Y0,Y1,Y2,Y3,Y4,Y5) + ; throw(error(type_error('Reify'(X5)),gecode_argument_error(linear(X0,X1,X2,X3,X4,X5),arg=6))))) + ; (is_int(X4,Y4) + -> (is_IntPropLevel(X5,Y5) + -> gecode_constraint_linear_301(Y0,Y1,Y2,Y3,Y4,Y5) + ; (is_Reify(X5,Y5) + -> gecode_constraint_linear_302(Y0,Y1,Y2,Y3,Y4,Y5) + ; throw(error(type_error('Reify'(X5)),gecode_argument_error(linear(X0,X1,X2,X3,X4,X5),arg=6))))) + ; throw(error(type_error(int(X4)),gecode_argument_error(linear(X0,X1,X2,X3,X4,X5),arg=5))))) + ; throw(error(type_error('IntRelType'(X3)),gecode_argument_error(linear(X0,X1,X2,X3,X4,X5),arg=4)))) + ; (is_IntVarArgs(X2,Y2) + -> (is_IntRelType(X3,Y3) + -> (is_IntVar(X4,Y4) + -> (is_IntPropLevel(X5,Y5) + -> gecode_constraint_linear_305(Y0,Y1,Y2,Y3,Y4,Y5) + ; (is_Reify(X5,Y5) + -> gecode_constraint_linear_306(Y0,Y1,Y2,Y3,Y4,Y5) + ; throw(error(type_error('Reify'(X5)),gecode_argument_error(linear(X0,X1,X2,X3,X4,X5),arg=6))))) + ; (is_int(X4,Y4) + -> (is_IntPropLevel(X5,Y5) + -> gecode_constraint_linear_309(Y0,Y1,Y2,Y3,Y4,Y5) + ; (is_Reify(X5,Y5) + -> gecode_constraint_linear_310(Y0,Y1,Y2,Y3,Y4,Y5) + ; throw(error(type_error('Reify'(X5)),gecode_argument_error(linear(X0,X1,X2,X3,X4,X5),arg=6))))) + ; throw(error(type_error(int(X4)),gecode_argument_error(linear(X0,X1,X2,X3,X4,X5),arg=5))))) + ; throw(error(type_error('IntRelType'(X3)),gecode_argument_error(linear(X0,X1,X2,X3,X4,X5),arg=4)))) + ; throw(error(type_error('IntVarArgs'(X2)),gecode_argument_error(linear(X0,X1,X2,X3,X4,X5),arg=3))))) + ; (is_IntVarArgs(X1,Y1) + -> (is_IntRelType(X2,Y2) + -> (is_IntVar(X3,Y3) + -> (is_Reify(X4,Y4) + -> (is_IntPropLevel(X5,Y5) + -> gecode_constraint_linear_315(Y0,Y1,Y2,Y3,Y4,Y5) + ; throw(error(type_error('IntPropLevel'(X5)),gecode_argument_error(linear(X0,X1,X2,X3,X4,X5),arg=6)))) + ; throw(error(type_error('Reify'(X4)),gecode_argument_error(linear(X0,X1,X2,X3,X4,X5),arg=5)))) + ; (is_int(X3,Y3) + -> (is_Reify(X4,Y4) + -> (is_IntPropLevel(X5,Y5) + -> gecode_constraint_linear_319(Y0,Y1,Y2,Y3,Y4,Y5) + ; throw(error(type_error('IntPropLevel'(X5)),gecode_argument_error(linear(X0,X1,X2,X3,X4,X5),arg=6)))) + ; throw(error(type_error('Reify'(X4)),gecode_argument_error(linear(X0,X1,X2,X3,X4,X5),arg=5)))) + ; throw(error(type_error(int(X3)),gecode_argument_error(linear(X0,X1,X2,X3,X4,X5),arg=4))))) + ; throw(error(type_error('IntRelType'(X2)),gecode_argument_error(linear(X0,X1,X2,X3,X4,X5),arg=3)))) + ; throw(error(type_error('IntVarArgs'(X1)),gecode_argument_error(linear(X0,X1,X2,X3,X4,X5),arg=2))))))) + ; throw(error(type_error('Space'(X0)),gecode_argument_error(linear(X0,X1,X2,X3,X4,X5),arg=1)))). + +linear(X0,X1,X2,X3,X4,X5,X6) :- + (is_Space_or_Clause(X0,Y0) + -> (is_IntArgs(X1,Y1) + -> (is_BoolVarArgs(X2,Y2) + -> (is_IntRelType(X3,Y3) + -> (is_IntVar(X4,Y4) + -> (is_Reify(X5,Y5) + -> (is_IntPropLevel(X6,Y6) + -> gecode_constraint_linear_299(Y0,Y1,Y2,Y3,Y4,Y5,Y6) + ; throw(error(type_error('IntPropLevel'(X6)),gecode_argument_error(linear(X0,X1,X2,X3,X4,X5,X6),arg=7)))) + ; throw(error(type_error('Reify'(X5)),gecode_argument_error(linear(X0,X1,X2,X3,X4,X5,X6),arg=6)))) + ; (is_int(X4,Y4) + -> (is_Reify(X5,Y5) + -> (is_IntPropLevel(X6,Y6) + -> gecode_constraint_linear_303(Y0,Y1,Y2,Y3,Y4,Y5,Y6) + ; throw(error(type_error('IntPropLevel'(X6)),gecode_argument_error(linear(X0,X1,X2,X3,X4,X5,X6),arg=7)))) + ; throw(error(type_error('Reify'(X5)),gecode_argument_error(linear(X0,X1,X2,X3,X4,X5,X6),arg=6)))) + ; throw(error(type_error(int(X4)),gecode_argument_error(linear(X0,X1,X2,X3,X4,X5,X6),arg=5))))) + ; throw(error(type_error('IntRelType'(X3)),gecode_argument_error(linear(X0,X1,X2,X3,X4,X5,X6),arg=4)))) + ; (is_IntVarArgs(X2,Y2) + -> (is_IntRelType(X3,Y3) + -> (is_IntVar(X4,Y4) + -> (is_Reify(X5,Y5) + -> (is_IntPropLevel(X6,Y6) + -> gecode_constraint_linear_307(Y0,Y1,Y2,Y3,Y4,Y5,Y6) + ; throw(error(type_error('IntPropLevel'(X6)),gecode_argument_error(linear(X0,X1,X2,X3,X4,X5,X6),arg=7)))) + ; throw(error(type_error('Reify'(X5)),gecode_argument_error(linear(X0,X1,X2,X3,X4,X5,X6),arg=6)))) + ; (is_int(X4,Y4) + -> (is_Reify(X5,Y5) + -> (is_IntPropLevel(X6,Y6) + -> gecode_constraint_linear_311(Y0,Y1,Y2,Y3,Y4,Y5,Y6) + ; throw(error(type_error('IntPropLevel'(X6)),gecode_argument_error(linear(X0,X1,X2,X3,X4,X5,X6),arg=7)))) + ; throw(error(type_error('Reify'(X5)),gecode_argument_error(linear(X0,X1,X2,X3,X4,X5,X6),arg=6)))) + ; throw(error(type_error(int(X4)),gecode_argument_error(linear(X0,X1,X2,X3,X4,X5,X6),arg=5))))) + ; throw(error(type_error('IntRelType'(X3)),gecode_argument_error(linear(X0,X1,X2,X3,X4,X5,X6),arg=4)))) + ; throw(error(type_error('IntVarArgs'(X2)),gecode_argument_error(linear(X0,X1,X2,X3,X4,X5,X6),arg=3))))) + ; throw(error(type_error('IntArgs'(X1)),gecode_argument_error(linear(X0,X1,X2,X3,X4,X5,X6),arg=2)))) + ; throw(error(type_error('Space'(X0)),gecode_argument_error(linear(X0,X1,X2,X3,X4,X5,X6),arg=1)))). + +max(X0,X1,X2,X3) :- + (is_Space_or_Clause(X0,Y0) + -> (is_FloatVar(X1,Y1) + -> (is_FloatVar(X2,Y2) + -> (is_FloatVar(X3,Y3) + -> gecode_constraint_max_320(Y0,Y1,Y2,Y3) + ; throw(error(type_error('FloatVar'(X3)),gecode_argument_error(max(X0,X1,X2,X3),arg=4)))) + ; throw(error(type_error('FloatVar'(X2)),gecode_argument_error(max(X0,X1,X2,X3),arg=3)))) + ; (is_IntVar(X1,Y1) + -> (is_IntVar(X2,Y2) + -> (is_IntVar(X3,Y3) + -> gecode_constraint_max_321(Y0,Y1,Y2,Y3) + ; throw(error(type_error('IntVar'(X3)),gecode_argument_error(max(X0,X1,X2,X3),arg=4)))) + ; throw(error(type_error('IntVar'(X2)),gecode_argument_error(max(X0,X1,X2,X3),arg=3)))) + ; (is_IntVarArgs(X1,Y1) + -> (is_IntVar(X2,Y2) + -> (is_IntPropLevel(X3,Y3) + -> gecode_constraint_max_325(Y0,Y1,Y2,Y3) + ; throw(error(type_error('IntPropLevel'(X3)),gecode_argument_error(max(X0,X1,X2,X3),arg=4)))) + ; throw(error(type_error('IntVar'(X2)),gecode_argument_error(max(X0,X1,X2,X3),arg=3)))) + ; throw(error(type_error('IntVarArgs'(X1)),gecode_argument_error(max(X0,X1,X2,X3),arg=2)))))) + ; throw(error(type_error('Space'(X0)),gecode_argument_error(max(X0,X1,X2,X3),arg=1)))). + +max(X0,X1,X2,X3,X4) :- + (is_Space_or_Clause(X0,Y0) + -> (is_IntVar(X1,Y1) + -> (is_IntVar(X2,Y2) + -> (is_IntVar(X3,Y3) + -> (is_IntPropLevel(X4,Y4) + -> gecode_constraint_max_322(Y0,Y1,Y2,Y3,Y4) + ; throw(error(type_error('IntPropLevel'(X4)),gecode_argument_error(max(X0,X1,X2,X3,X4),arg=5)))) + ; throw(error(type_error('IntVar'(X3)),gecode_argument_error(max(X0,X1,X2,X3,X4),arg=4)))) + ; throw(error(type_error('IntVar'(X2)),gecode_argument_error(max(X0,X1,X2,X3,X4),arg=3)))) + ; throw(error(type_error('IntVar'(X1)),gecode_argument_error(max(X0,X1,X2,X3,X4),arg=2)))) + ; throw(error(type_error('Space'(X0)),gecode_argument_error(max(X0,X1,X2,X3,X4),arg=1)))). + +max(X0,X1,X2) :- + (is_Space_or_Clause(X0,Y0) + -> (is_FloatVarArgs(X1,Y1) + -> (is_FloatVar(X2,Y2) + -> gecode_constraint_max_323(Y0,Y1,Y2) + ; throw(error(type_error('FloatVar'(X2)),gecode_argument_error(max(X0,X1,X2),arg=3)))) + ; (is_IntVarArgs(X1,Y1) + -> (is_IntVar(X2,Y2) + -> gecode_constraint_max_324(Y0,Y1,Y2) + ; throw(error(type_error('IntVar'(X2)),gecode_argument_error(max(X0,X1,X2),arg=3)))) + ; throw(error(type_error('IntVarArgs'(X1)),gecode_argument_error(max(X0,X1,X2),arg=2))))) + ; throw(error(type_error('Space'(X0)),gecode_argument_error(max(X0,X1,X2),arg=1)))). + +member(X0,X1,X2) :- + (is_Space_or_Clause(X0,Y0) + -> (is_BoolVarArgs(X1,Y1) + -> (is_BoolVar(X2,Y2) + -> gecode_constraint_member_326(Y0,Y1,Y2) + ; throw(error(type_error('BoolVar'(X2)),gecode_argument_error(member(X0,X1,X2),arg=3)))) + ; (is_IntVarArgs(X1,Y1) + -> (is_IntVar(X2,Y2) + -> gecode_constraint_member_330(Y0,Y1,Y2) + ; throw(error(type_error('IntVar'(X2)),gecode_argument_error(member(X0,X1,X2),arg=3)))) + ; throw(error(type_error('IntVarArgs'(X1)),gecode_argument_error(member(X0,X1,X2),arg=2))))) + ; throw(error(type_error('Space'(X0)),gecode_argument_error(member(X0,X1,X2),arg=1)))). + +member(X0,X1,X2,X3) :- + (is_Space_or_Clause(X0,Y0) + -> (is_BoolVarArgs(X1,Y1) + -> (is_BoolVar(X2,Y2) + -> (is_IntPropLevel(X3,Y3) + -> gecode_constraint_member_327(Y0,Y1,Y2,Y3) + ; (is_Reify(X3,Y3) + -> gecode_constraint_member_328(Y0,Y1,Y2,Y3) + ; throw(error(type_error('Reify'(X3)),gecode_argument_error(member(X0,X1,X2,X3),arg=4))))) + ; throw(error(type_error('BoolVar'(X2)),gecode_argument_error(member(X0,X1,X2,X3),arg=3)))) + ; (is_IntVarArgs(X1,Y1) + -> (is_IntVar(X2,Y2) + -> (is_IntPropLevel(X3,Y3) + -> gecode_constraint_member_331(Y0,Y1,Y2,Y3) + ; (is_Reify(X3,Y3) + -> gecode_constraint_member_332(Y0,Y1,Y2,Y3) + ; throw(error(type_error('Reify'(X3)),gecode_argument_error(member(X0,X1,X2,X3),arg=4))))) + ; throw(error(type_error('IntVar'(X2)),gecode_argument_error(member(X0,X1,X2,X3),arg=3)))) + ; throw(error(type_error('IntVarArgs'(X1)),gecode_argument_error(member(X0,X1,X2,X3),arg=2))))) + ; throw(error(type_error('Space'(X0)),gecode_argument_error(member(X0,X1,X2,X3),arg=1)))). + +member(X0,X1,X2,X3,X4) :- + (is_Space_or_Clause(X0,Y0) + -> (is_BoolVarArgs(X1,Y1) + -> (is_BoolVar(X2,Y2) + -> (is_Reify(X3,Y3) + -> (is_IntPropLevel(X4,Y4) + -> gecode_constraint_member_329(Y0,Y1,Y2,Y3,Y4) + ; throw(error(type_error('IntPropLevel'(X4)),gecode_argument_error(member(X0,X1,X2,X3,X4),arg=5)))) + ; throw(error(type_error('Reify'(X3)),gecode_argument_error(member(X0,X1,X2,X3,X4),arg=4)))) + ; throw(error(type_error('BoolVar'(X2)),gecode_argument_error(member(X0,X1,X2,X3,X4),arg=3)))) + ; (is_IntVarArgs(X1,Y1) + -> (is_IntVar(X2,Y2) + -> (is_Reify(X3,Y3) + -> (is_IntPropLevel(X4,Y4) + -> gecode_constraint_member_333(Y0,Y1,Y2,Y3,Y4) + ; throw(error(type_error('IntPropLevel'(X4)),gecode_argument_error(member(X0,X1,X2,X3,X4),arg=5)))) + ; throw(error(type_error('Reify'(X3)),gecode_argument_error(member(X0,X1,X2,X3,X4),arg=4)))) + ; throw(error(type_error('IntVar'(X2)),gecode_argument_error(member(X0,X1,X2,X3,X4),arg=3)))) + ; throw(error(type_error('IntVarArgs'(X1)),gecode_argument_error(member(X0,X1,X2,X3,X4),arg=2))))) + ; throw(error(type_error('Space'(X0)),gecode_argument_error(member(X0,X1,X2,X3,X4),arg=1)))). + +min(X0,X1,X2,X3) :- + (is_Space_or_Clause(X0,Y0) + -> (is_FloatVar(X1,Y1) + -> (is_FloatVar(X2,Y2) + -> (is_FloatVar(X3,Y3) + -> gecode_constraint_min_334(Y0,Y1,Y2,Y3) + ; throw(error(type_error('FloatVar'(X3)),gecode_argument_error(min(X0,X1,X2,X3),arg=4)))) + ; throw(error(type_error('FloatVar'(X2)),gecode_argument_error(min(X0,X1,X2,X3),arg=3)))) + ; (is_IntVar(X1,Y1) + -> (is_IntVar(X2,Y2) + -> (is_IntVar(X3,Y3) + -> gecode_constraint_min_335(Y0,Y1,Y2,Y3) + ; throw(error(type_error('IntVar'(X3)),gecode_argument_error(min(X0,X1,X2,X3),arg=4)))) + ; throw(error(type_error('IntVar'(X2)),gecode_argument_error(min(X0,X1,X2,X3),arg=3)))) + ; (is_IntVarArgs(X1,Y1) + -> (is_IntVar(X2,Y2) + -> (is_IntPropLevel(X3,Y3) + -> gecode_constraint_min_339(Y0,Y1,Y2,Y3) + ; throw(error(type_error('IntPropLevel'(X3)),gecode_argument_error(min(X0,X1,X2,X3),arg=4)))) + ; throw(error(type_error('IntVar'(X2)),gecode_argument_error(min(X0,X1,X2,X3),arg=3)))) + ; throw(error(type_error('IntVarArgs'(X1)),gecode_argument_error(min(X0,X1,X2,X3),arg=2)))))) + ; throw(error(type_error('Space'(X0)),gecode_argument_error(min(X0,X1,X2,X3),arg=1)))). + +min(X0,X1,X2,X3,X4) :- + (is_Space_or_Clause(X0,Y0) + -> (is_IntVar(X1,Y1) + -> (is_IntVar(X2,Y2) + -> (is_IntVar(X3,Y3) + -> (is_IntPropLevel(X4,Y4) + -> gecode_constraint_min_336(Y0,Y1,Y2,Y3,Y4) + ; throw(error(type_error('IntPropLevel'(X4)),gecode_argument_error(min(X0,X1,X2,X3,X4),arg=5)))) + ; throw(error(type_error('IntVar'(X3)),gecode_argument_error(min(X0,X1,X2,X3,X4),arg=4)))) + ; throw(error(type_error('IntVar'(X2)),gecode_argument_error(min(X0,X1,X2,X3,X4),arg=3)))) + ; throw(error(type_error('IntVar'(X1)),gecode_argument_error(min(X0,X1,X2,X3,X4),arg=2)))) + ; throw(error(type_error('Space'(X0)),gecode_argument_error(min(X0,X1,X2,X3,X4),arg=1)))). + +min(X0,X1,X2) :- + (is_Space_or_Clause(X0,Y0) + -> (is_FloatVarArgs(X1,Y1) + -> (is_FloatVar(X2,Y2) + -> gecode_constraint_min_337(Y0,Y1,Y2) + ; throw(error(type_error('FloatVar'(X2)),gecode_argument_error(min(X0,X1,X2),arg=3)))) + ; (is_IntVarArgs(X1,Y1) + -> (is_IntVar(X2,Y2) + -> gecode_constraint_min_338(Y0,Y1,Y2) + ; throw(error(type_error('IntVar'(X2)),gecode_argument_error(min(X0,X1,X2),arg=3)))) + ; throw(error(type_error('IntVarArgs'(X1)),gecode_argument_error(min(X0,X1,X2),arg=2))))) + ; throw(error(type_error('Space'(X0)),gecode_argument_error(min(X0,X1,X2),arg=1)))). + +mod(X0,X1,X2,X3) :- + (is_Space_or_Clause(X0,Y0) + -> (is_IntVar(X1,Y1) + -> (is_IntVar(X2,Y2) + -> (is_IntVar(X3,Y3) + -> gecode_constraint_mod_340(Y0,Y1,Y2,Y3) + ; throw(error(type_error('IntVar'(X3)),gecode_argument_error(mod(X0,X1,X2,X3),arg=4)))) + ; throw(error(type_error('IntVar'(X2)),gecode_argument_error(mod(X0,X1,X2,X3),arg=3)))) + ; throw(error(type_error('IntVar'(X1)),gecode_argument_error(mod(X0,X1,X2,X3),arg=2)))) + ; throw(error(type_error('Space'(X0)),gecode_argument_error(mod(X0,X1,X2,X3),arg=1)))). + +mod(X0,X1,X2,X3,X4) :- + (is_Space_or_Clause(X0,Y0) + -> (is_IntVar(X1,Y1) + -> (is_IntVar(X2,Y2) + -> (is_IntVar(X3,Y3) + -> (is_IntPropLevel(X4,Y4) + -> gecode_constraint_mod_341(Y0,Y1,Y2,Y3,Y4) + ; throw(error(type_error('IntPropLevel'(X4)),gecode_argument_error(mod(X0,X1,X2,X3,X4),arg=5)))) + ; throw(error(type_error('IntVar'(X3)),gecode_argument_error(mod(X0,X1,X2,X3,X4),arg=4)))) + ; throw(error(type_error('IntVar'(X2)),gecode_argument_error(mod(X0,X1,X2,X3,X4),arg=3)))) + ; throw(error(type_error('IntVar'(X1)),gecode_argument_error(mod(X0,X1,X2,X3,X4),arg=2)))) + ; throw(error(type_error('Space'(X0)),gecode_argument_error(mod(X0,X1,X2,X3,X4),arg=1)))). + +mult(X0,X1,X2,X3) :- + (is_Space_or_Clause(X0,Y0) + -> (is_FloatVar(X1,Y1) + -> (is_FloatVar(X2,Y2) + -> (is_FloatVar(X3,Y3) + -> gecode_constraint_mult_342(Y0,Y1,Y2,Y3) + ; throw(error(type_error('FloatVar'(X3)),gecode_argument_error(mult(X0,X1,X2,X3),arg=4)))) + ; throw(error(type_error('FloatVar'(X2)),gecode_argument_error(mult(X0,X1,X2,X3),arg=3)))) + ; (is_IntVar(X1,Y1) + -> (is_IntVar(X2,Y2) + -> (is_IntVar(X3,Y3) + -> gecode_constraint_mult_343(Y0,Y1,Y2,Y3) + ; throw(error(type_error('IntVar'(X3)),gecode_argument_error(mult(X0,X1,X2,X3),arg=4)))) + ; throw(error(type_error('IntVar'(X2)),gecode_argument_error(mult(X0,X1,X2,X3),arg=3)))) + ; throw(error(type_error('IntVar'(X1)),gecode_argument_error(mult(X0,X1,X2,X3),arg=2))))) + ; throw(error(type_error('Space'(X0)),gecode_argument_error(mult(X0,X1,X2,X3),arg=1)))). + +mult(X0,X1,X2,X3,X4) :- + (is_Space_or_Clause(X0,Y0) + -> (is_IntVar(X1,Y1) + -> (is_IntVar(X2,Y2) + -> (is_IntVar(X3,Y3) + -> (is_IntPropLevel(X4,Y4) + -> gecode_constraint_mult_344(Y0,Y1,Y2,Y3,Y4) + ; throw(error(type_error('IntPropLevel'(X4)),gecode_argument_error(mult(X0,X1,X2,X3,X4),arg=5)))) + ; throw(error(type_error('IntVar'(X3)),gecode_argument_error(mult(X0,X1,X2,X3,X4),arg=4)))) + ; throw(error(type_error('IntVar'(X2)),gecode_argument_error(mult(X0,X1,X2,X3,X4),arg=3)))) + ; throw(error(type_error('IntVar'(X1)),gecode_argument_error(mult(X0,X1,X2,X3,X4),arg=2)))) + ; throw(error(type_error('Space'(X0)),gecode_argument_error(mult(X0,X1,X2,X3,X4),arg=1)))). + +nooverlap(X0,X1,X2,X3,X4) :- + (is_Space_or_Clause(X0,Y0) + -> (is_IntVarArgs(X1,Y1) + -> (is_IntArgs(X2,Y2) + -> (is_IntVarArgs(X3,Y3) + -> (is_IntArgs(X4,Y4) + -> gecode_constraint_nooverlap_345(Y0,Y1,Y2,Y3,Y4) + ; throw(error(type_error('IntArgs'(X4)),gecode_argument_error(nooverlap(X0,X1,X2,X3,X4),arg=5)))) + ; throw(error(type_error('IntVarArgs'(X3)),gecode_argument_error(nooverlap(X0,X1,X2,X3,X4),arg=4)))) + ; throw(error(type_error('IntArgs'(X2)),gecode_argument_error(nooverlap(X0,X1,X2,X3,X4),arg=3)))) + ; throw(error(type_error('IntVarArgs'(X1)),gecode_argument_error(nooverlap(X0,X1,X2,X3,X4),arg=2)))) + ; throw(error(type_error('Space'(X0)),gecode_argument_error(nooverlap(X0,X1,X2,X3,X4),arg=1)))). + +nooverlap(X0,X1,X2,X3,X4,X5) :- + (is_Space_or_Clause(X0,Y0) + -> (is_IntVarArgs(X1,Y1) + -> (is_IntArgs(X2,Y2) + -> (is_IntVarArgs(X3,Y3) + -> (is_IntArgs(X4,Y4) + -> (is_IntPropLevel(X5,Y5) + -> gecode_constraint_nooverlap_346(Y0,Y1,Y2,Y3,Y4,Y5) + ; (is_BoolVarArgs(X5,Y5) + -> gecode_constraint_nooverlap_347(Y0,Y1,Y2,Y3,Y4,Y5) + ; throw(error(type_error('BoolVarArgs'(X5)),gecode_argument_error(nooverlap(X0,X1,X2,X3,X4,X5),arg=6))))) + ; throw(error(type_error('IntArgs'(X4)),gecode_argument_error(nooverlap(X0,X1,X2,X3,X4,X5),arg=5)))) + ; throw(error(type_error('IntVarArgs'(X3)),gecode_argument_error(nooverlap(X0,X1,X2,X3,X4,X5),arg=4)))) + ; throw(error(type_error('IntArgs'(X2)),gecode_argument_error(nooverlap(X0,X1,X2,X3,X4,X5),arg=3)))) + ; throw(error(type_error('IntVarArgs'(X1)),gecode_argument_error(nooverlap(X0,X1,X2,X3,X4,X5),arg=2)))) + ; throw(error(type_error('Space'(X0)),gecode_argument_error(nooverlap(X0,X1,X2,X3,X4,X5),arg=1)))). + +nooverlap(X0,X1,X2,X3,X4,X5,X6) :- + (is_Space_or_Clause(X0,Y0) + -> (is_IntVarArgs(X1,Y1) + -> (is_IntArgs(X2,Y2) + -> (is_IntVarArgs(X3,Y3) + -> (is_IntArgs(X4,Y4) + -> (is_BoolVarArgs(X5,Y5) + -> (is_IntPropLevel(X6,Y6) + -> gecode_constraint_nooverlap_348(Y0,Y1,Y2,Y3,Y4,Y5,Y6) + ; throw(error(type_error('IntPropLevel'(X6)),gecode_argument_error(nooverlap(X0,X1,X2,X3,X4,X5,X6),arg=7)))) + ; throw(error(type_error('BoolVarArgs'(X5)),gecode_argument_error(nooverlap(X0,X1,X2,X3,X4,X5,X6),arg=6)))) + ; throw(error(type_error('IntArgs'(X4)),gecode_argument_error(nooverlap(X0,X1,X2,X3,X4,X5,X6),arg=5)))) + ; throw(error(type_error('IntVarArgs'(X3)),gecode_argument_error(nooverlap(X0,X1,X2,X3,X4,X5,X6),arg=4)))) + ; (is_IntVarArgs(X2,Y2) + -> (is_IntVarArgs(X3,Y3) + -> (is_IntVarArgs(X4,Y4) + -> (is_IntVarArgs(X5,Y5) + -> (is_IntVarArgs(X6,Y6) + -> gecode_constraint_nooverlap_349(Y0,Y1,Y2,Y3,Y4,Y5,Y6) + ; throw(error(type_error('IntVarArgs'(X6)),gecode_argument_error(nooverlap(X0,X1,X2,X3,X4,X5,X6),arg=7)))) + ; throw(error(type_error('IntVarArgs'(X5)),gecode_argument_error(nooverlap(X0,X1,X2,X3,X4,X5,X6),arg=6)))) + ; throw(error(type_error('IntVarArgs'(X4)),gecode_argument_error(nooverlap(X0,X1,X2,X3,X4,X5,X6),arg=5)))) + ; throw(error(type_error('IntVarArgs'(X3)),gecode_argument_error(nooverlap(X0,X1,X2,X3,X4,X5,X6),arg=4)))) + ; throw(error(type_error('IntVarArgs'(X2)),gecode_argument_error(nooverlap(X0,X1,X2,X3,X4,X5,X6),arg=3))))) + ; throw(error(type_error('IntVarArgs'(X1)),gecode_argument_error(nooverlap(X0,X1,X2,X3,X4,X5,X6),arg=2)))) + ; throw(error(type_error('Space'(X0)),gecode_argument_error(nooverlap(X0,X1,X2,X3,X4,X5,X6),arg=1)))). + +nooverlap(X0,X1,X2,X3,X4,X5,X6,X7) :- + (is_Space_or_Clause(X0,Y0) + -> (is_IntVarArgs(X1,Y1) + -> (is_IntVarArgs(X2,Y2) + -> (is_IntVarArgs(X3,Y3) + -> (is_IntVarArgs(X4,Y4) + -> (is_IntVarArgs(X5,Y5) + -> (is_IntVarArgs(X6,Y6) + -> (is_IntPropLevel(X7,Y7) + -> gecode_constraint_nooverlap_350(Y0,Y1,Y2,Y3,Y4,Y5,Y6,Y7) + ; (is_BoolVarArgs(X7,Y7) + -> gecode_constraint_nooverlap_351(Y0,Y1,Y2,Y3,Y4,Y5,Y6,Y7) + ; throw(error(type_error('BoolVarArgs'(X7)),gecode_argument_error(nooverlap(X0,X1,X2,X3,X4,X5,X6,X7),arg=8))))) + ; throw(error(type_error('IntVarArgs'(X6)),gecode_argument_error(nooverlap(X0,X1,X2,X3,X4,X5,X6,X7),arg=7)))) + ; throw(error(type_error('IntVarArgs'(X5)),gecode_argument_error(nooverlap(X0,X1,X2,X3,X4,X5,X6,X7),arg=6)))) + ; throw(error(type_error('IntVarArgs'(X4)),gecode_argument_error(nooverlap(X0,X1,X2,X3,X4,X5,X6,X7),arg=5)))) + ; throw(error(type_error('IntVarArgs'(X3)),gecode_argument_error(nooverlap(X0,X1,X2,X3,X4,X5,X6,X7),arg=4)))) + ; throw(error(type_error('IntVarArgs'(X2)),gecode_argument_error(nooverlap(X0,X1,X2,X3,X4,X5,X6,X7),arg=3)))) + ; throw(error(type_error('IntVarArgs'(X1)),gecode_argument_error(nooverlap(X0,X1,X2,X3,X4,X5,X6,X7),arg=2)))) + ; throw(error(type_error('Space'(X0)),gecode_argument_error(nooverlap(X0,X1,X2,X3,X4,X5,X6,X7),arg=1)))). + +nooverlap(X0,X1,X2,X3,X4,X5,X6,X7,X8) :- + (is_Space_or_Clause(X0,Y0) + -> (is_IntVarArgs(X1,Y1) + -> (is_IntVarArgs(X2,Y2) + -> (is_IntVarArgs(X3,Y3) + -> (is_IntVarArgs(X4,Y4) + -> (is_IntVarArgs(X5,Y5) + -> (is_IntVarArgs(X6,Y6) + -> (is_BoolVarArgs(X7,Y7) + -> (is_IntPropLevel(X8,Y8) + -> gecode_constraint_nooverlap_352(Y0,Y1,Y2,Y3,Y4,Y5,Y6,Y7,Y8) + ; throw(error(type_error('IntPropLevel'(X8)),gecode_argument_error(nooverlap(X0,X1,X2,X3,X4,X5,X6,X7,X8),arg=9)))) + ; throw(error(type_error('BoolVarArgs'(X7)),gecode_argument_error(nooverlap(X0,X1,X2,X3,X4,X5,X6,X7,X8),arg=8)))) + ; throw(error(type_error('IntVarArgs'(X6)),gecode_argument_error(nooverlap(X0,X1,X2,X3,X4,X5,X6,X7,X8),arg=7)))) + ; throw(error(type_error('IntVarArgs'(X5)),gecode_argument_error(nooverlap(X0,X1,X2,X3,X4,X5,X6,X7,X8),arg=6)))) + ; throw(error(type_error('IntVarArgs'(X4)),gecode_argument_error(nooverlap(X0,X1,X2,X3,X4,X5,X6,X7,X8),arg=5)))) + ; throw(error(type_error('IntVarArgs'(X3)),gecode_argument_error(nooverlap(X0,X1,X2,X3,X4,X5,X6,X7,X8),arg=4)))) + ; throw(error(type_error('IntVarArgs'(X2)),gecode_argument_error(nooverlap(X0,X1,X2,X3,X4,X5,X6,X7,X8),arg=3)))) + ; throw(error(type_error('IntVarArgs'(X1)),gecode_argument_error(nooverlap(X0,X1,X2,X3,X4,X5,X6,X7,X8),arg=2)))) + ; throw(error(type_error('Space'(X0)),gecode_argument_error(nooverlap(X0,X1,X2,X3,X4,X5,X6,X7,X8),arg=1)))). + +nroot(X0,X1,X2,X3) :- + (is_Space_or_Clause(X0,Y0) + -> (is_FloatVar(X1,Y1) + -> (is_int(X2,Y2) + -> (is_FloatVar(X3,Y3) + -> gecode_constraint_nroot_353(Y0,Y1,Y2,Y3) + ; throw(error(type_error('FloatVar'(X3)),gecode_argument_error(nroot(X0,X1,X2,X3),arg=4)))) + ; throw(error(type_error(int(X2)),gecode_argument_error(nroot(X0,X1,X2,X3),arg=3)))) + ; (is_IntVar(X1,Y1) + -> (is_int(X2,Y2) + -> (is_IntVar(X3,Y3) + -> gecode_constraint_nroot_354(Y0,Y1,Y2,Y3) + ; throw(error(type_error('IntVar'(X3)),gecode_argument_error(nroot(X0,X1,X2,X3),arg=4)))) + ; throw(error(type_error(int(X2)),gecode_argument_error(nroot(X0,X1,X2,X3),arg=3)))) + ; throw(error(type_error('IntVar'(X1)),gecode_argument_error(nroot(X0,X1,X2,X3),arg=2))))) + ; throw(error(type_error('Space'(X0)),gecode_argument_error(nroot(X0,X1,X2,X3),arg=1)))). + +nroot(X0,X1,X2,X3,X4) :- + (is_Space_or_Clause(X0,Y0) + -> (is_IntVar(X1,Y1) + -> (is_int(X2,Y2) + -> (is_IntVar(X3,Y3) + -> (is_IntPropLevel(X4,Y4) + -> gecode_constraint_nroot_355(Y0,Y1,Y2,Y3,Y4) + ; throw(error(type_error('IntPropLevel'(X4)),gecode_argument_error(nroot(X0,X1,X2,X3,X4),arg=5)))) + ; throw(error(type_error('IntVar'(X3)),gecode_argument_error(nroot(X0,X1,X2,X3,X4),arg=4)))) + ; throw(error(type_error(int(X2)),gecode_argument_error(nroot(X0,X1,X2,X3,X4),arg=3)))) + ; throw(error(type_error('IntVar'(X1)),gecode_argument_error(nroot(X0,X1,X2,X3,X4),arg=2)))) + ; throw(error(type_error('Space'(X0)),gecode_argument_error(nroot(X0,X1,X2,X3,X4),arg=1)))). + +nvalues(X0,X1,X2,X3) :- + (is_Space_or_Clause(X0,Y0) + -> (is_BoolVarArgs(X1,Y1) + -> (is_IntRelType(X2,Y2) + -> (is_IntVar(X3,Y3) + -> gecode_constraint_nvalues_356(Y0,Y1,Y2,Y3) + ; (is_int(X3,Y3) + -> gecode_constraint_nvalues_358(Y0,Y1,Y2,Y3) + ; throw(error(type_error(int(X3)),gecode_argument_error(nvalues(X0,X1,X2,X3),arg=4))))) + ; throw(error(type_error('IntRelType'(X2)),gecode_argument_error(nvalues(X0,X1,X2,X3),arg=3)))) + ; (is_IntVarArgs(X1,Y1) + -> (is_IntRelType(X2,Y2) + -> (is_IntVar(X3,Y3) + -> gecode_constraint_nvalues_360(Y0,Y1,Y2,Y3) + ; (is_int(X3,Y3) + -> gecode_constraint_nvalues_362(Y0,Y1,Y2,Y3) + ; throw(error(type_error(int(X3)),gecode_argument_error(nvalues(X0,X1,X2,X3),arg=4))))) + ; throw(error(type_error('IntRelType'(X2)),gecode_argument_error(nvalues(X0,X1,X2,X3),arg=3)))) + ; throw(error(type_error('IntVarArgs'(X1)),gecode_argument_error(nvalues(X0,X1,X2,X3),arg=2))))) + ; throw(error(type_error('Space'(X0)),gecode_argument_error(nvalues(X0,X1,X2,X3),arg=1)))). + +nvalues(X0,X1,X2,X3,X4) :- + (is_Space_or_Clause(X0,Y0) + -> (is_BoolVarArgs(X1,Y1) + -> (is_IntRelType(X2,Y2) + -> (is_IntVar(X3,Y3) + -> (is_IntPropLevel(X4,Y4) + -> gecode_constraint_nvalues_357(Y0,Y1,Y2,Y3,Y4) + ; throw(error(type_error('IntPropLevel'(X4)),gecode_argument_error(nvalues(X0,X1,X2,X3,X4),arg=5)))) + ; (is_int(X3,Y3) + -> (is_IntPropLevel(X4,Y4) + -> gecode_constraint_nvalues_359(Y0,Y1,Y2,Y3,Y4) + ; throw(error(type_error('IntPropLevel'(X4)),gecode_argument_error(nvalues(X0,X1,X2,X3,X4),arg=5)))) + ; throw(error(type_error(int(X3)),gecode_argument_error(nvalues(X0,X1,X2,X3,X4),arg=4))))) + ; throw(error(type_error('IntRelType'(X2)),gecode_argument_error(nvalues(X0,X1,X2,X3,X4),arg=3)))) + ; (is_IntVarArgs(X1,Y1) + -> (is_IntRelType(X2,Y2) + -> (is_IntVar(X3,Y3) + -> (is_IntPropLevel(X4,Y4) + -> gecode_constraint_nvalues_361(Y0,Y1,Y2,Y3,Y4) + ; throw(error(type_error('IntPropLevel'(X4)),gecode_argument_error(nvalues(X0,X1,X2,X3,X4),arg=5)))) + ; (is_int(X3,Y3) + -> (is_IntPropLevel(X4,Y4) + -> gecode_constraint_nvalues_363(Y0,Y1,Y2,Y3,Y4) + ; throw(error(type_error('IntPropLevel'(X4)),gecode_argument_error(nvalues(X0,X1,X2,X3,X4),arg=5)))) + ; throw(error(type_error(int(X3)),gecode_argument_error(nvalues(X0,X1,X2,X3,X4),arg=4))))) + ; throw(error(type_error('IntRelType'(X2)),gecode_argument_error(nvalues(X0,X1,X2,X3,X4),arg=3)))) + ; throw(error(type_error('IntVarArgs'(X1)),gecode_argument_error(nvalues(X0,X1,X2,X3,X4),arg=2))))) + ; throw(error(type_error('Space'(X0)),gecode_argument_error(nvalues(X0,X1,X2,X3,X4),arg=1)))). + +path(X0,X1,X2,X3,X4,X5) :- + (is_Space_or_Clause(X0,Y0) + -> (is_IntArgs(X1,Y1) + -> (is_IntVarArgs(X2,Y2) + -> (is_IntVar(X3,Y3) + -> (is_IntVar(X4,Y4) + -> (is_IntVar(X5,Y5) + -> gecode_constraint_path_364(Y0,Y1,Y2,Y3,Y4,Y5) + ; throw(error(type_error('IntVar'(X5)),gecode_argument_error(path(X0,X1,X2,X3,X4,X5),arg=6)))) + ; throw(error(type_error('IntVar'(X4)),gecode_argument_error(path(X0,X1,X2,X3,X4,X5),arg=5)))) + ; throw(error(type_error('IntVar'(X3)),gecode_argument_error(path(X0,X1,X2,X3,X4,X5),arg=4)))) + ; throw(error(type_error('IntVarArgs'(X2)),gecode_argument_error(path(X0,X1,X2,X3,X4,X5),arg=3)))) + ; (is_int(X1,Y1) + -> (is_IntVarArgs(X2,Y2) + -> (is_IntVar(X3,Y3) + -> (is_IntVar(X4,Y4) + -> (is_IntPropLevel(X5,Y5) + -> gecode_constraint_path_375(Y0,Y1,Y2,Y3,Y4,Y5) + ; throw(error(type_error('IntPropLevel'(X5)),gecode_argument_error(path(X0,X1,X2,X3,X4,X5),arg=6)))) + ; throw(error(type_error('IntVar'(X4)),gecode_argument_error(path(X0,X1,X2,X3,X4,X5),arg=5)))) + ; throw(error(type_error('IntVar'(X3)),gecode_argument_error(path(X0,X1,X2,X3,X4,X5),arg=4)))) + ; throw(error(type_error('IntVarArgs'(X2)),gecode_argument_error(path(X0,X1,X2,X3,X4,X5),arg=3)))) + ; throw(error(type_error(int(X1)),gecode_argument_error(path(X0,X1,X2,X3,X4,X5),arg=2))))) + ; throw(error(type_error('Space'(X0)),gecode_argument_error(path(X0,X1,X2,X3,X4,X5),arg=1)))). + +path(X0,X1,X2,X3,X4,X5,X6) :- + (is_Space_or_Clause(X0,Y0) + -> (is_IntArgs(X1,Y1) + -> (is_IntVarArgs(X2,Y2) + -> (is_IntVar(X3,Y3) + -> (is_IntVar(X4,Y4) + -> (is_IntVar(X5,Y5) + -> (is_IntPropLevel(X6,Y6) + -> gecode_constraint_path_365(Y0,Y1,Y2,Y3,Y4,Y5,Y6) + ; throw(error(type_error('IntPropLevel'(X6)),gecode_argument_error(path(X0,X1,X2,X3,X4,X5,X6),arg=7)))) + ; (is_IntVarArgs(X5,Y5) + -> (is_IntVar(X6,Y6) + -> gecode_constraint_path_366(Y0,Y1,Y2,Y3,Y4,Y5,Y6) + ; throw(error(type_error('IntVar'(X6)),gecode_argument_error(path(X0,X1,X2,X3,X4,X5,X6),arg=7)))) + ; throw(error(type_error('IntVarArgs'(X5)),gecode_argument_error(path(X0,X1,X2,X3,X4,X5,X6),arg=6))))) + ; throw(error(type_error('IntVar'(X4)),gecode_argument_error(path(X0,X1,X2,X3,X4,X5,X6),arg=5)))) + ; throw(error(type_error('IntVar'(X3)),gecode_argument_error(path(X0,X1,X2,X3,X4,X5,X6),arg=4)))) + ; (is_int(X2,Y2) + -> (is_IntVarArgs(X3,Y3) + -> (is_IntVar(X4,Y4) + -> (is_IntVar(X5,Y5) + -> (is_IntVar(X6,Y6) + -> gecode_constraint_path_368(Y0,Y1,Y2,Y3,Y4,Y5,Y6) + ; throw(error(type_error('IntVar'(X6)),gecode_argument_error(path(X0,X1,X2,X3,X4,X5,X6),arg=7)))) + ; throw(error(type_error('IntVar'(X5)),gecode_argument_error(path(X0,X1,X2,X3,X4,X5,X6),arg=6)))) + ; throw(error(type_error('IntVar'(X4)),gecode_argument_error(path(X0,X1,X2,X3,X4,X5,X6),arg=5)))) + ; throw(error(type_error('IntVarArgs'(X3)),gecode_argument_error(path(X0,X1,X2,X3,X4,X5,X6),arg=4)))) + ; throw(error(type_error(int(X2)),gecode_argument_error(path(X0,X1,X2,X3,X4,X5,X6),arg=3))))) + ; throw(error(type_error('IntArgs'(X1)),gecode_argument_error(path(X0,X1,X2,X3,X4,X5,X6),arg=2)))) + ; throw(error(type_error('Space'(X0)),gecode_argument_error(path(X0,X1,X2,X3,X4,X5,X6),arg=1)))). + +path(X0,X1,X2,X3,X4,X5,X6,X7) :- + (is_Space_or_Clause(X0,Y0) + -> (is_IntArgs(X1,Y1) + -> (is_IntVarArgs(X2,Y2) + -> (is_IntVar(X3,Y3) + -> (is_IntVar(X4,Y4) + -> (is_IntVarArgs(X5,Y5) + -> (is_IntVar(X6,Y6) + -> (is_IntPropLevel(X7,Y7) + -> gecode_constraint_path_367(Y0,Y1,Y2,Y3,Y4,Y5,Y6,Y7) + ; throw(error(type_error('IntPropLevel'(X7)),gecode_argument_error(path(X0,X1,X2,X3,X4,X5,X6,X7),arg=8)))) + ; throw(error(type_error('IntVar'(X6)),gecode_argument_error(path(X0,X1,X2,X3,X4,X5,X6,X7),arg=7)))) + ; throw(error(type_error('IntVarArgs'(X5)),gecode_argument_error(path(X0,X1,X2,X3,X4,X5,X6,X7),arg=6)))) + ; throw(error(type_error('IntVar'(X4)),gecode_argument_error(path(X0,X1,X2,X3,X4,X5,X6,X7),arg=5)))) + ; throw(error(type_error('IntVar'(X3)),gecode_argument_error(path(X0,X1,X2,X3,X4,X5,X6,X7),arg=4)))) + ; (is_int(X2,Y2) + -> (is_IntVarArgs(X3,Y3) + -> (is_IntVar(X4,Y4) + -> (is_IntVar(X5,Y5) + -> (is_IntVar(X6,Y6) + -> (is_IntPropLevel(X7,Y7) + -> gecode_constraint_path_369(Y0,Y1,Y2,Y3,Y4,Y5,Y6,Y7) + ; throw(error(type_error('IntPropLevel'(X7)),gecode_argument_error(path(X0,X1,X2,X3,X4,X5,X6,X7),arg=8)))) + ; (is_IntVarArgs(X6,Y6) + -> (is_IntVar(X7,Y7) + -> gecode_constraint_path_370(Y0,Y1,Y2,Y3,Y4,Y5,Y6,Y7) + ; throw(error(type_error('IntVar'(X7)),gecode_argument_error(path(X0,X1,X2,X3,X4,X5,X6,X7),arg=8)))) + ; throw(error(type_error('IntVarArgs'(X6)),gecode_argument_error(path(X0,X1,X2,X3,X4,X5,X6,X7),arg=7))))) + ; throw(error(type_error('IntVar'(X5)),gecode_argument_error(path(X0,X1,X2,X3,X4,X5,X6,X7),arg=6)))) + ; throw(error(type_error('IntVar'(X4)),gecode_argument_error(path(X0,X1,X2,X3,X4,X5,X6,X7),arg=5)))) + ; throw(error(type_error('IntVarArgs'(X3)),gecode_argument_error(path(X0,X1,X2,X3,X4,X5,X6,X7),arg=4)))) + ; throw(error(type_error(int(X2)),gecode_argument_error(path(X0,X1,X2,X3,X4,X5,X6,X7),arg=3))))) + ; throw(error(type_error('IntArgs'(X1)),gecode_argument_error(path(X0,X1,X2,X3,X4,X5,X6,X7),arg=2)))) + ; throw(error(type_error('Space'(X0)),gecode_argument_error(path(X0,X1,X2,X3,X4,X5,X6,X7),arg=1)))). + +path(X0,X1,X2,X3,X4,X5,X6,X7,X8) :- + (is_Space_or_Clause(X0,Y0) + -> (is_IntArgs(X1,Y1) + -> (is_int(X2,Y2) + -> (is_IntVarArgs(X3,Y3) + -> (is_IntVar(X4,Y4) + -> (is_IntVar(X5,Y5) + -> (is_IntVarArgs(X6,Y6) + -> (is_IntVar(X7,Y7) + -> (is_IntPropLevel(X8,Y8) + -> gecode_constraint_path_371(Y0,Y1,Y2,Y3,Y4,Y5,Y6,Y7,Y8) + ; throw(error(type_error('IntPropLevel'(X8)),gecode_argument_error(path(X0,X1,X2,X3,X4,X5,X6,X7,X8),arg=9)))) + ; throw(error(type_error('IntVar'(X7)),gecode_argument_error(path(X0,X1,X2,X3,X4,X5,X6,X7,X8),arg=8)))) + ; throw(error(type_error('IntVarArgs'(X6)),gecode_argument_error(path(X0,X1,X2,X3,X4,X5,X6,X7,X8),arg=7)))) + ; throw(error(type_error('IntVar'(X5)),gecode_argument_error(path(X0,X1,X2,X3,X4,X5,X6,X7,X8),arg=6)))) + ; throw(error(type_error('IntVar'(X4)),gecode_argument_error(path(X0,X1,X2,X3,X4,X5,X6,X7,X8),arg=5)))) + ; throw(error(type_error('IntVarArgs'(X3)),gecode_argument_error(path(X0,X1,X2,X3,X4,X5,X6,X7,X8),arg=4)))) + ; throw(error(type_error(int(X2)),gecode_argument_error(path(X0,X1,X2,X3,X4,X5,X6,X7,X8),arg=3)))) + ; throw(error(type_error('IntArgs'(X1)),gecode_argument_error(path(X0,X1,X2,X3,X4,X5,X6,X7,X8),arg=2)))) + ; throw(error(type_error('Space'(X0)),gecode_argument_error(path(X0,X1,X2,X3,X4,X5,X6,X7,X8),arg=1)))). + +path(X0,X1,X2,X3) :- + (is_Space_or_Clause(X0,Y0) + -> (is_IntVarArgs(X1,Y1) + -> (is_IntVar(X2,Y2) + -> (is_IntVar(X3,Y3) + -> gecode_constraint_path_372(Y0,Y1,Y2,Y3) + ; throw(error(type_error('IntVar'(X3)),gecode_argument_error(path(X0,X1,X2,X3),arg=4)))) + ; throw(error(type_error('IntVar'(X2)),gecode_argument_error(path(X0,X1,X2,X3),arg=3)))) + ; throw(error(type_error('IntVarArgs'(X1)),gecode_argument_error(path(X0,X1,X2,X3),arg=2)))) + ; throw(error(type_error('Space'(X0)),gecode_argument_error(path(X0,X1,X2,X3),arg=1)))). + +path(X0,X1,X2,X3,X4) :- + (is_Space_or_Clause(X0,Y0) + -> (is_IntVarArgs(X1,Y1) + -> (is_IntVar(X2,Y2) + -> (is_IntVar(X3,Y3) + -> (is_IntPropLevel(X4,Y4) + -> gecode_constraint_path_373(Y0,Y1,Y2,Y3,Y4) + ; throw(error(type_error('IntPropLevel'(X4)),gecode_argument_error(path(X0,X1,X2,X3,X4),arg=5)))) + ; throw(error(type_error('IntVar'(X3)),gecode_argument_error(path(X0,X1,X2,X3,X4),arg=4)))) + ; throw(error(type_error('IntVar'(X2)),gecode_argument_error(path(X0,X1,X2,X3,X4),arg=3)))) + ; (is_int(X1,Y1) + -> (is_IntVarArgs(X2,Y2) + -> (is_IntVar(X3,Y3) + -> (is_IntVar(X4,Y4) + -> gecode_constraint_path_374(Y0,Y1,Y2,Y3,Y4) + ; throw(error(type_error('IntVar'(X4)),gecode_argument_error(path(X0,X1,X2,X3,X4),arg=5)))) + ; throw(error(type_error('IntVar'(X3)),gecode_argument_error(path(X0,X1,X2,X3,X4),arg=4)))) + ; throw(error(type_error('IntVarArgs'(X2)),gecode_argument_error(path(X0,X1,X2,X3,X4),arg=3)))) + ; throw(error(type_error(int(X1)),gecode_argument_error(path(X0,X1,X2,X3,X4),arg=2))))) + ; throw(error(type_error('Space'(X0)),gecode_argument_error(path(X0,X1,X2,X3,X4),arg=1)))). + +pow(X0,X1,X2,X3) :- + (is_Space_or_Clause(X0,Y0) + -> (is_FloatVar(X1,Y1) + -> (is_int(X2,Y2) + -> (is_FloatVar(X3,Y3) + -> gecode_constraint_pow_376(Y0,Y1,Y2,Y3) + ; throw(error(type_error('FloatVar'(X3)),gecode_argument_error(pow(X0,X1,X2,X3),arg=4)))) + ; throw(error(type_error(int(X2)),gecode_argument_error(pow(X0,X1,X2,X3),arg=3)))) + ; (is_IntVar(X1,Y1) + -> (is_int(X2,Y2) + -> (is_IntVar(X3,Y3) + -> gecode_constraint_pow_377(Y0,Y1,Y2,Y3) + ; throw(error(type_error('IntVar'(X3)),gecode_argument_error(pow(X0,X1,X2,X3),arg=4)))) + ; throw(error(type_error(int(X2)),gecode_argument_error(pow(X0,X1,X2,X3),arg=3)))) + ; throw(error(type_error('IntVar'(X1)),gecode_argument_error(pow(X0,X1,X2,X3),arg=2))))) + ; throw(error(type_error('Space'(X0)),gecode_argument_error(pow(X0,X1,X2,X3),arg=1)))). + +pow(X0,X1,X2,X3,X4) :- + (is_Space_or_Clause(X0,Y0) + -> (is_IntVar(X1,Y1) + -> (is_int(X2,Y2) + -> (is_IntVar(X3,Y3) + -> (is_IntPropLevel(X4,Y4) + -> gecode_constraint_pow_378(Y0,Y1,Y2,Y3,Y4) + ; throw(error(type_error('IntPropLevel'(X4)),gecode_argument_error(pow(X0,X1,X2,X3,X4),arg=5)))) + ; throw(error(type_error('IntVar'(X3)),gecode_argument_error(pow(X0,X1,X2,X3,X4),arg=4)))) + ; throw(error(type_error(int(X2)),gecode_argument_error(pow(X0,X1,X2,X3,X4),arg=3)))) + ; throw(error(type_error('IntVar'(X1)),gecode_argument_error(pow(X0,X1,X2,X3,X4),arg=2)))) + ; throw(error(type_error('Space'(X0)),gecode_argument_error(pow(X0,X1,X2,X3,X4),arg=1)))). + +precede(X0,X1,X2) :- + (is_Space_or_Clause(X0,Y0) + -> (is_IntVarArgs(X1,Y1) + -> (is_IntArgs(X2,Y2) + -> gecode_constraint_precede_379(Y0,Y1,Y2) + ; throw(error(type_error('IntArgs'(X2)),gecode_argument_error(precede(X0,X1,X2),arg=3)))) + ; throw(error(type_error('IntVarArgs'(X1)),gecode_argument_error(precede(X0,X1,X2),arg=2)))) + ; throw(error(type_error('Space'(X0)),gecode_argument_error(precede(X0,X1,X2),arg=1)))). + +precede(X0,X1,X2,X3) :- + (is_Space_or_Clause(X0,Y0) + -> (is_IntVarArgs(X1,Y1) + -> (is_IntArgs(X2,Y2) + -> (is_IntPropLevel(X3,Y3) + -> gecode_constraint_precede_380(Y0,Y1,Y2,Y3) + ; throw(error(type_error('IntPropLevel'(X3)),gecode_argument_error(precede(X0,X1,X2,X3),arg=4)))) + ; (is_int(X2,Y2) + -> (is_int(X3,Y3) + -> gecode_constraint_precede_381(Y0,Y1,Y2,Y3) + ; throw(error(type_error(int(X3)),gecode_argument_error(precede(X0,X1,X2,X3),arg=4)))) + ; throw(error(type_error(int(X2)),gecode_argument_error(precede(X0,X1,X2,X3),arg=3))))) + ; throw(error(type_error('IntVarArgs'(X1)),gecode_argument_error(precede(X0,X1,X2,X3),arg=2)))) + ; throw(error(type_error('Space'(X0)),gecode_argument_error(precede(X0,X1,X2,X3),arg=1)))). + +precede(X0,X1,X2,X3,X4) :- + (is_Space_or_Clause(X0,Y0) + -> (is_IntVarArgs(X1,Y1) + -> (is_int(X2,Y2) + -> (is_int(X3,Y3) + -> (is_IntPropLevel(X4,Y4) + -> gecode_constraint_precede_382(Y0,Y1,Y2,Y3,Y4) + ; throw(error(type_error('IntPropLevel'(X4)),gecode_argument_error(precede(X0,X1,X2,X3,X4),arg=5)))) + ; throw(error(type_error(int(X3)),gecode_argument_error(precede(X0,X1,X2,X3,X4),arg=4)))) + ; throw(error(type_error(int(X2)),gecode_argument_error(precede(X0,X1,X2,X3,X4),arg=3)))) + ; throw(error(type_error('IntVarArgs'(X1)),gecode_argument_error(precede(X0,X1,X2,X3,X4),arg=2)))) + ; throw(error(type_error('Space'(X0)),gecode_argument_error(precede(X0,X1,X2,X3,X4),arg=1)))). + +rel(X0,X1,X2,X3) :- + (is_Space_or_Clause(X0,Y0) + -> (is_BoolOpType(X1,Y1) + -> (is_BoolVarArgs(X2,Y2) + -> (is_BoolVar(X3,Y3) + -> gecode_constraint_rel_383(Y0,Y1,Y2,Y3) + ; (is_int(X3,Y3) + -> gecode_constraint_rel_385(Y0,Y1,Y2,Y3) + ; throw(error(type_error(int(X3)),gecode_argument_error(rel(X0,X1,X2,X3),arg=4))))) + ; throw(error(type_error('BoolVarArgs'(X2)),gecode_argument_error(rel(X0,X1,X2,X3),arg=3)))) + ; (is_BoolVar(X1,Y1) + -> (is_IntRelType(X2,Y2) + -> (is_BoolVar(X3,Y3) + -> gecode_constraint_rel_391(Y0,Y1,Y2,Y3) + ; (is_int(X3,Y3) + -> gecode_constraint_rel_395(Y0,Y1,Y2,Y3) + ; throw(error(type_error(int(X3)),gecode_argument_error(rel(X0,X1,X2,X3),arg=4))))) + ; throw(error(type_error('IntRelType'(X2)),gecode_argument_error(rel(X0,X1,X2,X3),arg=3)))) + ; (is_FloatVar(X1,Y1) + -> (is_FloatRelType(X2,Y2) + -> (is_FloatVal(X3,Y3) + -> gecode_constraint_rel_399(Y0,Y1,Y2,Y3) + ; (is_FloatVar(X3,Y3) + -> gecode_constraint_rel_401(Y0,Y1,Y2,Y3) + ; throw(error(type_error('FloatVar'(X3)),gecode_argument_error(rel(X0,X1,X2,X3),arg=4))))) + ; throw(error(type_error('FloatRelType'(X2)),gecode_argument_error(rel(X0,X1,X2,X3),arg=3)))) + ; (is_IntVar(X1,Y1) + -> (is_IntRelType(X2,Y2) + -> (is_IntVar(X3,Y3) + -> gecode_constraint_rel_403(Y0,Y1,Y2,Y3) + ; (is_int(X3,Y3) + -> gecode_constraint_rel_407(Y0,Y1,Y2,Y3) + ; throw(error(type_error(int(X3)),gecode_argument_error(rel(X0,X1,X2,X3),arg=4))))) + ; (is_SetRelType(X2,Y2) + -> (is_SetVar(X3,Y3) + -> gecode_constraint_rel_411(Y0,Y1,Y2,Y3) + ; throw(error(type_error('SetVar'(X3)),gecode_argument_error(rel(X0,X1,X2,X3),arg=4)))) + ; throw(error(type_error('SetRelType'(X2)),gecode_argument_error(rel(X0,X1,X2,X3),arg=3))))) + ; (is_SetVar(X1,Y1) + -> (is_IntRelType(X2,Y2) + -> (is_IntVar(X3,Y3) + -> gecode_constraint_rel_413(Y0,Y1,Y2,Y3) + ; throw(error(type_error('IntVar'(X3)),gecode_argument_error(rel(X0,X1,X2,X3),arg=4)))) + ; (is_SetRelType(X2,Y2) + -> (is_IntVar(X3,Y3) + -> gecode_constraint_rel_415(Y0,Y1,Y2,Y3) + ; (is_SetVar(X3,Y3) + -> gecode_constraint_rel_417(Y0,Y1,Y2,Y3) + ; throw(error(type_error('SetVar'(X3)),gecode_argument_error(rel(X0,X1,X2,X3),arg=4))))) + ; throw(error(type_error('SetRelType'(X2)),gecode_argument_error(rel(X0,X1,X2,X3),arg=3))))) + ; (is_BoolVarArgs(X1,Y1) + -> (is_IntRelType(X2,Y2) + -> (is_BoolVar(X3,Y3) + -> gecode_constraint_rel_419(Y0,Y1,Y2,Y3) + ; (is_IntPropLevel(X3,Y3) + -> gecode_constraint_rel_422(Y0,Y1,Y2,Y3) + ; (is_BoolVarArgs(X3,Y3) + -> gecode_constraint_rel_423(Y0,Y1,Y2,Y3) + ; (is_IntArgs(X3,Y3) + -> gecode_constraint_rel_425(Y0,Y1,Y2,Y3) + ; (is_int(X3,Y3) + -> gecode_constraint_rel_427(Y0,Y1,Y2,Y3) + ; throw(error(type_error(int(X3)),gecode_argument_error(rel(X0,X1,X2,X3),arg=4)))))))) + ; throw(error(type_error('IntRelType'(X2)),gecode_argument_error(rel(X0,X1,X2,X3),arg=3)))) + ; (is_FloatVarArgs(X1,Y1) + -> (is_FloatRelType(X2,Y2) + -> (is_FloatVal(X3,Y3) + -> gecode_constraint_rel_429(Y0,Y1,Y2,Y3) + ; (is_FloatVar(X3,Y3) + -> gecode_constraint_rel_430(Y0,Y1,Y2,Y3) + ; throw(error(type_error('FloatVar'(X3)),gecode_argument_error(rel(X0,X1,X2,X3),arg=4))))) + ; throw(error(type_error('FloatRelType'(X2)),gecode_argument_error(rel(X0,X1,X2,X3),arg=3)))) + ; (is_IntArgs(X1,Y1) + -> (is_IntRelType(X2,Y2) + -> (is_BoolVarArgs(X3,Y3) + -> gecode_constraint_rel_431(Y0,Y1,Y2,Y3) + ; (is_IntVarArgs(X3,Y3) + -> gecode_constraint_rel_433(Y0,Y1,Y2,Y3) + ; throw(error(type_error('IntVarArgs'(X3)),gecode_argument_error(rel(X0,X1,X2,X3),arg=4))))) + ; throw(error(type_error('IntRelType'(X2)),gecode_argument_error(rel(X0,X1,X2,X3),arg=3)))) + ; (is_IntVarArgs(X1,Y1) + -> (is_IntRelType(X2,Y2) + -> (is_IntPropLevel(X3,Y3) + -> gecode_constraint_rel_436(Y0,Y1,Y2,Y3) + ; (is_IntVar(X3,Y3) + -> gecode_constraint_rel_437(Y0,Y1,Y2,Y3) + ; (is_IntArgs(X3,Y3) + -> gecode_constraint_rel_439(Y0,Y1,Y2,Y3) + ; (is_IntVarArgs(X3,Y3) + -> gecode_constraint_rel_441(Y0,Y1,Y2,Y3) + ; (is_int(X3,Y3) + -> gecode_constraint_rel_443(Y0,Y1,Y2,Y3) + ; throw(error(type_error(int(X3)),gecode_argument_error(rel(X0,X1,X2,X3),arg=4)))))))) + ; throw(error(type_error('IntRelType'(X2)),gecode_argument_error(rel(X0,X1,X2,X3),arg=3)))) + ; throw(error(type_error('IntVarArgs'(X1)),gecode_argument_error(rel(X0,X1,X2,X3),arg=2)))))))))))) + ; throw(error(type_error('Space'(X0)),gecode_argument_error(rel(X0,X1,X2,X3),arg=1)))). + +rel(X0,X1,X2,X3,X4) :- + (is_Space_or_Clause(X0,Y0) + -> (is_BoolOpType(X1,Y1) + -> (is_BoolVarArgs(X2,Y2) + -> (is_BoolVar(X3,Y3) + -> (is_IntPropLevel(X4,Y4) + -> gecode_constraint_rel_384(Y0,Y1,Y2,Y3,Y4) + ; throw(error(type_error('IntPropLevel'(X4)),gecode_argument_error(rel(X0,X1,X2,X3,X4),arg=5)))) + ; (is_int(X3,Y3) + -> (is_IntPropLevel(X4,Y4) + -> gecode_constraint_rel_386(Y0,Y1,Y2,Y3,Y4) + ; throw(error(type_error('IntPropLevel'(X4)),gecode_argument_error(rel(X0,X1,X2,X3,X4),arg=5)))) + ; throw(error(type_error(int(X3)),gecode_argument_error(rel(X0,X1,X2,X3,X4),arg=4))))) + ; throw(error(type_error('BoolVarArgs'(X2)),gecode_argument_error(rel(X0,X1,X2,X3,X4),arg=3)))) + ; (is_BoolVar(X1,Y1) + -> (is_BoolOpType(X2,Y2) + -> (is_BoolVar(X3,Y3) + -> (is_BoolVar(X4,Y4) + -> gecode_constraint_rel_387(Y0,Y1,Y2,Y3,Y4) + ; (is_int(X4,Y4) + -> gecode_constraint_rel_389(Y0,Y1,Y2,Y3,Y4) + ; throw(error(type_error(int(X4)),gecode_argument_error(rel(X0,X1,X2,X3,X4),arg=5))))) + ; throw(error(type_error('BoolVar'(X3)),gecode_argument_error(rel(X0,X1,X2,X3,X4),arg=4)))) + ; (is_IntRelType(X2,Y2) + -> (is_BoolVar(X3,Y3) + -> (is_IntPropLevel(X4,Y4) + -> gecode_constraint_rel_392(Y0,Y1,Y2,Y3,Y4) + ; (is_Reify(X4,Y4) + -> gecode_constraint_rel_393(Y0,Y1,Y2,Y3,Y4) + ; throw(error(type_error('Reify'(X4)),gecode_argument_error(rel(X0,X1,X2,X3,X4),arg=5))))) + ; (is_int(X3,Y3) + -> (is_IntPropLevel(X4,Y4) + -> gecode_constraint_rel_396(Y0,Y1,Y2,Y3,Y4) + ; (is_Reify(X4,Y4) + -> gecode_constraint_rel_397(Y0,Y1,Y2,Y3,Y4) + ; throw(error(type_error('Reify'(X4)),gecode_argument_error(rel(X0,X1,X2,X3,X4),arg=5))))) + ; throw(error(type_error(int(X3)),gecode_argument_error(rel(X0,X1,X2,X3,X4),arg=4))))) + ; throw(error(type_error('IntRelType'(X2)),gecode_argument_error(rel(X0,X1,X2,X3,X4),arg=3))))) + ; (is_FloatVar(X1,Y1) + -> (is_FloatRelType(X2,Y2) + -> (is_FloatVal(X3,Y3) + -> (is_Reify(X4,Y4) + -> gecode_constraint_rel_400(Y0,Y1,Y2,Y3,Y4) + ; throw(error(type_error('Reify'(X4)),gecode_argument_error(rel(X0,X1,X2,X3,X4),arg=5)))) + ; (is_FloatVar(X3,Y3) + -> (is_Reify(X4,Y4) + -> gecode_constraint_rel_402(Y0,Y1,Y2,Y3,Y4) + ; throw(error(type_error('Reify'(X4)),gecode_argument_error(rel(X0,X1,X2,X3,X4),arg=5)))) + ; throw(error(type_error('FloatVar'(X3)),gecode_argument_error(rel(X0,X1,X2,X3,X4),arg=4))))) + ; throw(error(type_error('FloatRelType'(X2)),gecode_argument_error(rel(X0,X1,X2,X3,X4),arg=3)))) + ; (is_IntVar(X1,Y1) + -> (is_IntRelType(X2,Y2) + -> (is_IntVar(X3,Y3) + -> (is_IntPropLevel(X4,Y4) + -> gecode_constraint_rel_404(Y0,Y1,Y2,Y3,Y4) + ; (is_Reify(X4,Y4) + -> gecode_constraint_rel_405(Y0,Y1,Y2,Y3,Y4) + ; throw(error(type_error('Reify'(X4)),gecode_argument_error(rel(X0,X1,X2,X3,X4),arg=5))))) + ; (is_int(X3,Y3) + -> (is_IntPropLevel(X4,Y4) + -> gecode_constraint_rel_408(Y0,Y1,Y2,Y3,Y4) + ; (is_Reify(X4,Y4) + -> gecode_constraint_rel_409(Y0,Y1,Y2,Y3,Y4) + ; throw(error(type_error('Reify'(X4)),gecode_argument_error(rel(X0,X1,X2,X3,X4),arg=5))))) + ; throw(error(type_error(int(X3)),gecode_argument_error(rel(X0,X1,X2,X3,X4),arg=4))))) + ; (is_SetRelType(X2,Y2) + -> (is_SetVar(X3,Y3) + -> (is_Reify(X4,Y4) + -> gecode_constraint_rel_412(Y0,Y1,Y2,Y3,Y4) + ; throw(error(type_error('Reify'(X4)),gecode_argument_error(rel(X0,X1,X2,X3,X4),arg=5)))) + ; throw(error(type_error('SetVar'(X3)),gecode_argument_error(rel(X0,X1,X2,X3,X4),arg=4)))) + ; throw(error(type_error('SetRelType'(X2)),gecode_argument_error(rel(X0,X1,X2,X3,X4),arg=3))))) + ; (is_SetVar(X1,Y1) + -> (is_IntRelType(X2,Y2) + -> (is_IntVar(X3,Y3) + -> (is_Reify(X4,Y4) + -> gecode_constraint_rel_414(Y0,Y1,Y2,Y3,Y4) + ; throw(error(type_error('Reify'(X4)),gecode_argument_error(rel(X0,X1,X2,X3,X4),arg=5)))) + ; throw(error(type_error('IntVar'(X3)),gecode_argument_error(rel(X0,X1,X2,X3,X4),arg=4)))) + ; (is_SetRelType(X2,Y2) + -> (is_IntVar(X3,Y3) + -> (is_Reify(X4,Y4) + -> gecode_constraint_rel_416(Y0,Y1,Y2,Y3,Y4) + ; throw(error(type_error('Reify'(X4)),gecode_argument_error(rel(X0,X1,X2,X3,X4),arg=5)))) + ; (is_SetVar(X3,Y3) + -> (is_Reify(X4,Y4) + -> gecode_constraint_rel_418(Y0,Y1,Y2,Y3,Y4) + ; throw(error(type_error('Reify'(X4)),gecode_argument_error(rel(X0,X1,X2,X3,X4),arg=5)))) + ; throw(error(type_error('SetVar'(X3)),gecode_argument_error(rel(X0,X1,X2,X3,X4),arg=4))))) + ; throw(error(type_error('SetRelType'(X2)),gecode_argument_error(rel(X0,X1,X2,X3,X4),arg=3))))) + ; (is_BoolVarArgs(X1,Y1) + -> (is_IntRelType(X2,Y2) + -> (is_BoolVar(X3,Y3) + -> (is_IntPropLevel(X4,Y4) + -> gecode_constraint_rel_420(Y0,Y1,Y2,Y3,Y4) + ; throw(error(type_error('IntPropLevel'(X4)),gecode_argument_error(rel(X0,X1,X2,X3,X4),arg=5)))) + ; (is_BoolVarArgs(X3,Y3) + -> (is_IntPropLevel(X4,Y4) + -> gecode_constraint_rel_424(Y0,Y1,Y2,Y3,Y4) + ; throw(error(type_error('IntPropLevel'(X4)),gecode_argument_error(rel(X0,X1,X2,X3,X4),arg=5)))) + ; (is_IntArgs(X3,Y3) + -> (is_IntPropLevel(X4,Y4) + -> gecode_constraint_rel_426(Y0,Y1,Y2,Y3,Y4) + ; throw(error(type_error('IntPropLevel'(X4)),gecode_argument_error(rel(X0,X1,X2,X3,X4),arg=5)))) + ; (is_int(X3,Y3) + -> (is_IntPropLevel(X4,Y4) + -> gecode_constraint_rel_428(Y0,Y1,Y2,Y3,Y4) + ; throw(error(type_error('IntPropLevel'(X4)),gecode_argument_error(rel(X0,X1,X2,X3,X4),arg=5)))) + ; throw(error(type_error(int(X3)),gecode_argument_error(rel(X0,X1,X2,X3,X4),arg=4))))))) + ; throw(error(type_error('IntRelType'(X2)),gecode_argument_error(rel(X0,X1,X2,X3,X4),arg=3)))) + ; (is_IntArgs(X1,Y1) + -> (is_IntRelType(X2,Y2) + -> (is_BoolVarArgs(X3,Y3) + -> (is_IntPropLevel(X4,Y4) + -> gecode_constraint_rel_432(Y0,Y1,Y2,Y3,Y4) + ; throw(error(type_error('IntPropLevel'(X4)),gecode_argument_error(rel(X0,X1,X2,X3,X4),arg=5)))) + ; (is_IntVarArgs(X3,Y3) + -> (is_IntPropLevel(X4,Y4) + -> gecode_constraint_rel_434(Y0,Y1,Y2,Y3,Y4) + ; throw(error(type_error('IntPropLevel'(X4)),gecode_argument_error(rel(X0,X1,X2,X3,X4),arg=5)))) + ; throw(error(type_error('IntVarArgs'(X3)),gecode_argument_error(rel(X0,X1,X2,X3,X4),arg=4))))) + ; throw(error(type_error('IntRelType'(X2)),gecode_argument_error(rel(X0,X1,X2,X3,X4),arg=3)))) + ; (is_IntVarArgs(X1,Y1) + -> (is_IntRelType(X2,Y2) + -> (is_IntVar(X3,Y3) + -> (is_IntPropLevel(X4,Y4) + -> gecode_constraint_rel_438(Y0,Y1,Y2,Y3,Y4) + ; throw(error(type_error('IntPropLevel'(X4)),gecode_argument_error(rel(X0,X1,X2,X3,X4),arg=5)))) + ; (is_IntArgs(X3,Y3) + -> (is_IntPropLevel(X4,Y4) + -> gecode_constraint_rel_440(Y0,Y1,Y2,Y3,Y4) + ; throw(error(type_error('IntPropLevel'(X4)),gecode_argument_error(rel(X0,X1,X2,X3,X4),arg=5)))) + ; (is_IntVarArgs(X3,Y3) + -> (is_IntPropLevel(X4,Y4) + -> gecode_constraint_rel_442(Y0,Y1,Y2,Y3,Y4) + ; throw(error(type_error('IntPropLevel'(X4)),gecode_argument_error(rel(X0,X1,X2,X3,X4),arg=5)))) + ; (is_int(X3,Y3) + -> (is_IntPropLevel(X4,Y4) + -> gecode_constraint_rel_444(Y0,Y1,Y2,Y3,Y4) + ; throw(error(type_error('IntPropLevel'(X4)),gecode_argument_error(rel(X0,X1,X2,X3,X4),arg=5)))) + ; throw(error(type_error(int(X3)),gecode_argument_error(rel(X0,X1,X2,X3,X4),arg=4))))))) + ; throw(error(type_error('IntRelType'(X2)),gecode_argument_error(rel(X0,X1,X2,X3,X4),arg=3)))) + ; throw(error(type_error('IntVarArgs'(X1)),gecode_argument_error(rel(X0,X1,X2,X3,X4),arg=2))))))))))) + ; throw(error(type_error('Space'(X0)),gecode_argument_error(rel(X0,X1,X2,X3,X4),arg=1)))). + +rel(X0,X1,X2,X3,X4,X5) :- + (is_Space_or_Clause(X0,Y0) + -> (is_BoolVar(X1,Y1) + -> (is_BoolOpType(X2,Y2) + -> (is_BoolVar(X3,Y3) + -> (is_BoolVar(X4,Y4) + -> (is_IntPropLevel(X5,Y5) + -> gecode_constraint_rel_388(Y0,Y1,Y2,Y3,Y4,Y5) + ; throw(error(type_error('IntPropLevel'(X5)),gecode_argument_error(rel(X0,X1,X2,X3,X4,X5),arg=6)))) + ; (is_int(X4,Y4) + -> (is_IntPropLevel(X5,Y5) + -> gecode_constraint_rel_390(Y0,Y1,Y2,Y3,Y4,Y5) + ; throw(error(type_error('IntPropLevel'(X5)),gecode_argument_error(rel(X0,X1,X2,X3,X4,X5),arg=6)))) + ; throw(error(type_error(int(X4)),gecode_argument_error(rel(X0,X1,X2,X3,X4,X5),arg=5))))) + ; throw(error(type_error('BoolVar'(X3)),gecode_argument_error(rel(X0,X1,X2,X3,X4,X5),arg=4)))) + ; (is_IntRelType(X2,Y2) + -> (is_BoolVar(X3,Y3) + -> (is_Reify(X4,Y4) + -> (is_IntPropLevel(X5,Y5) + -> gecode_constraint_rel_394(Y0,Y1,Y2,Y3,Y4,Y5) + ; throw(error(type_error('IntPropLevel'(X5)),gecode_argument_error(rel(X0,X1,X2,X3,X4,X5),arg=6)))) + ; throw(error(type_error('Reify'(X4)),gecode_argument_error(rel(X0,X1,X2,X3,X4,X5),arg=5)))) + ; (is_int(X3,Y3) + -> (is_Reify(X4,Y4) + -> (is_IntPropLevel(X5,Y5) + -> gecode_constraint_rel_398(Y0,Y1,Y2,Y3,Y4,Y5) + ; throw(error(type_error('IntPropLevel'(X5)),gecode_argument_error(rel(X0,X1,X2,X3,X4,X5),arg=6)))) + ; throw(error(type_error('Reify'(X4)),gecode_argument_error(rel(X0,X1,X2,X3,X4,X5),arg=5)))) + ; throw(error(type_error(int(X3)),gecode_argument_error(rel(X0,X1,X2,X3,X4,X5),arg=4))))) + ; throw(error(type_error('IntRelType'(X2)),gecode_argument_error(rel(X0,X1,X2,X3,X4,X5),arg=3))))) + ; (is_IntVar(X1,Y1) + -> (is_IntRelType(X2,Y2) + -> (is_IntVar(X3,Y3) + -> (is_Reify(X4,Y4) + -> (is_IntPropLevel(X5,Y5) + -> gecode_constraint_rel_406(Y0,Y1,Y2,Y3,Y4,Y5) + ; throw(error(type_error('IntPropLevel'(X5)),gecode_argument_error(rel(X0,X1,X2,X3,X4,X5),arg=6)))) + ; throw(error(type_error('Reify'(X4)),gecode_argument_error(rel(X0,X1,X2,X3,X4,X5),arg=5)))) + ; (is_int(X3,Y3) + -> (is_Reify(X4,Y4) + -> (is_IntPropLevel(X5,Y5) + -> gecode_constraint_rel_410(Y0,Y1,Y2,Y3,Y4,Y5) + ; throw(error(type_error('IntPropLevel'(X5)),gecode_argument_error(rel(X0,X1,X2,X3,X4,X5),arg=6)))) + ; throw(error(type_error('Reify'(X4)),gecode_argument_error(rel(X0,X1,X2,X3,X4,X5),arg=5)))) + ; throw(error(type_error(int(X3)),gecode_argument_error(rel(X0,X1,X2,X3,X4,X5),arg=4))))) + ; throw(error(type_error('IntRelType'(X2)),gecode_argument_error(rel(X0,X1,X2,X3,X4,X5),arg=3)))) + ; throw(error(type_error('IntVar'(X1)),gecode_argument_error(rel(X0,X1,X2,X3,X4,X5),arg=2))))) + ; throw(error(type_error('Space'(X0)),gecode_argument_error(rel(X0,X1,X2,X3,X4,X5),arg=1)))). + +rel(X0,X1,X2) :- + (is_Space_or_Clause(X0,Y0) + -> (is_BoolVarArgs(X1,Y1) + -> (is_IntRelType(X2,Y2) + -> gecode_constraint_rel_421(Y0,Y1,Y2) + ; throw(error(type_error('IntRelType'(X2)),gecode_argument_error(rel(X0,X1,X2),arg=3)))) + ; (is_IntVarArgs(X1,Y1) + -> (is_IntRelType(X2,Y2) + -> gecode_constraint_rel_435(Y0,Y1,Y2) + ; throw(error(type_error('IntRelType'(X2)),gecode_argument_error(rel(X0,X1,X2),arg=3)))) + ; throw(error(type_error('IntVarArgs'(X1)),gecode_argument_error(rel(X0,X1,X2),arg=2))))) + ; throw(error(type_error('Space'(X0)),gecode_argument_error(rel(X0,X1,X2),arg=1)))). + +relax(X0,X1,X2,X3,X4) :- + (is_Space_or_Clause(X0,Y0) + -> (is_SetVarArgs(X1,Y1) + -> (is_SetVarArgs(X2,Y2) + -> (is_Rnd(X3,Y3) + -> (is_double(X4,Y4) + -> gecode_constraint_relax_445(Y0,Y1,Y2,Y3,Y4) + ; throw(error(type_error(double(X4)),gecode_argument_error(relax(X0,X1,X2,X3,X4),arg=5)))) + ; throw(error(type_error('Rnd'(X3)),gecode_argument_error(relax(X0,X1,X2,X3,X4),arg=4)))) + ; throw(error(type_error('SetVarArgs'(X2)),gecode_argument_error(relax(X0,X1,X2,X3,X4),arg=3)))) + ; throw(error(type_error('SetVarArgs'(X1)),gecode_argument_error(relax(X0,X1,X2,X3,X4),arg=2)))) + ; throw(error(type_error('Space'(X0)),gecode_argument_error(relax(X0,X1,X2,X3,X4),arg=1)))). + +sequence(X0,X1,X2,X3,X4,X5) :- + (is_Space_or_Clause(X0,Y0) + -> (is_BoolVarArgs(X1,Y1) + -> (is_IntSet(X2,Y2) + -> (is_int(X3,Y3) + -> (is_int(X4,Y4) + -> (is_int(X5,Y5) + -> gecode_constraint_sequence_446(Y0,Y1,Y2,Y3,Y4,Y5) + ; throw(error(type_error(int(X5)),gecode_argument_error(sequence(X0,X1,X2,X3,X4,X5),arg=6)))) + ; throw(error(type_error(int(X4)),gecode_argument_error(sequence(X0,X1,X2,X3,X4,X5),arg=5)))) + ; throw(error(type_error(int(X3)),gecode_argument_error(sequence(X0,X1,X2,X3,X4,X5),arg=4)))) + ; throw(error(type_error('IntSet'(X2)),gecode_argument_error(sequence(X0,X1,X2,X3,X4,X5),arg=3)))) + ; (is_IntVarArgs(X1,Y1) + -> (is_IntSet(X2,Y2) + -> (is_int(X3,Y3) + -> (is_int(X4,Y4) + -> (is_int(X5,Y5) + -> gecode_constraint_sequence_448(Y0,Y1,Y2,Y3,Y4,Y5) + ; throw(error(type_error(int(X5)),gecode_argument_error(sequence(X0,X1,X2,X3,X4,X5),arg=6)))) + ; throw(error(type_error(int(X4)),gecode_argument_error(sequence(X0,X1,X2,X3,X4,X5),arg=5)))) + ; throw(error(type_error(int(X3)),gecode_argument_error(sequence(X0,X1,X2,X3,X4,X5),arg=4)))) + ; throw(error(type_error('IntSet'(X2)),gecode_argument_error(sequence(X0,X1,X2,X3,X4,X5),arg=3)))) + ; throw(error(type_error('IntVarArgs'(X1)),gecode_argument_error(sequence(X0,X1,X2,X3,X4,X5),arg=2))))) + ; throw(error(type_error('Space'(X0)),gecode_argument_error(sequence(X0,X1,X2,X3,X4,X5),arg=1)))). + +sequence(X0,X1,X2,X3,X4,X5,X6) :- + (is_Space_or_Clause(X0,Y0) + -> (is_BoolVarArgs(X1,Y1) + -> (is_IntSet(X2,Y2) + -> (is_int(X3,Y3) + -> (is_int(X4,Y4) + -> (is_int(X5,Y5) + -> (is_IntPropLevel(X6,Y6) + -> gecode_constraint_sequence_447(Y0,Y1,Y2,Y3,Y4,Y5,Y6) + ; throw(error(type_error('IntPropLevel'(X6)),gecode_argument_error(sequence(X0,X1,X2,X3,X4,X5,X6),arg=7)))) + ; throw(error(type_error(int(X5)),gecode_argument_error(sequence(X0,X1,X2,X3,X4,X5,X6),arg=6)))) + ; throw(error(type_error(int(X4)),gecode_argument_error(sequence(X0,X1,X2,X3,X4,X5,X6),arg=5)))) + ; throw(error(type_error(int(X3)),gecode_argument_error(sequence(X0,X1,X2,X3,X4,X5,X6),arg=4)))) + ; throw(error(type_error('IntSet'(X2)),gecode_argument_error(sequence(X0,X1,X2,X3,X4,X5,X6),arg=3)))) + ; (is_IntVarArgs(X1,Y1) + -> (is_IntSet(X2,Y2) + -> (is_int(X3,Y3) + -> (is_int(X4,Y4) + -> (is_int(X5,Y5) + -> (is_IntPropLevel(X6,Y6) + -> gecode_constraint_sequence_449(Y0,Y1,Y2,Y3,Y4,Y5,Y6) + ; throw(error(type_error('IntPropLevel'(X6)),gecode_argument_error(sequence(X0,X1,X2,X3,X4,X5,X6),arg=7)))) + ; throw(error(type_error(int(X5)),gecode_argument_error(sequence(X0,X1,X2,X3,X4,X5,X6),arg=6)))) + ; throw(error(type_error(int(X4)),gecode_argument_error(sequence(X0,X1,X2,X3,X4,X5,X6),arg=5)))) + ; throw(error(type_error(int(X3)),gecode_argument_error(sequence(X0,X1,X2,X3,X4,X5,X6),arg=4)))) + ; throw(error(type_error('IntSet'(X2)),gecode_argument_error(sequence(X0,X1,X2,X3,X4,X5,X6),arg=3)))) + ; throw(error(type_error('IntVarArgs'(X1)),gecode_argument_error(sequence(X0,X1,X2,X3,X4,X5,X6),arg=2))))) + ; throw(error(type_error('Space'(X0)),gecode_argument_error(sequence(X0,X1,X2,X3,X4,X5,X6),arg=1)))). + +sorted(X0,X1,X2) :- + (is_Space_or_Clause(X0,Y0) + -> (is_IntVarArgs(X1,Y1) + -> (is_IntVarArgs(X2,Y2) + -> gecode_constraint_sorted_450(Y0,Y1,Y2) + ; throw(error(type_error('IntVarArgs'(X2)),gecode_argument_error(sorted(X0,X1,X2),arg=3)))) + ; throw(error(type_error('IntVarArgs'(X1)),gecode_argument_error(sorted(X0,X1,X2),arg=2)))) + ; throw(error(type_error('Space'(X0)),gecode_argument_error(sorted(X0,X1,X2),arg=1)))). + +sorted(X0,X1,X2,X3) :- + (is_Space_or_Clause(X0,Y0) + -> (is_IntVarArgs(X1,Y1) + -> (is_IntVarArgs(X2,Y2) + -> (is_IntPropLevel(X3,Y3) + -> gecode_constraint_sorted_451(Y0,Y1,Y2,Y3) + ; (is_IntVarArgs(X3,Y3) + -> gecode_constraint_sorted_452(Y0,Y1,Y2,Y3) + ; throw(error(type_error('IntVarArgs'(X3)),gecode_argument_error(sorted(X0,X1,X2,X3),arg=4))))) + ; throw(error(type_error('IntVarArgs'(X2)),gecode_argument_error(sorted(X0,X1,X2,X3),arg=3)))) + ; throw(error(type_error('IntVarArgs'(X1)),gecode_argument_error(sorted(X0,X1,X2,X3),arg=2)))) + ; throw(error(type_error('Space'(X0)),gecode_argument_error(sorted(X0,X1,X2,X3),arg=1)))). + +sorted(X0,X1,X2,X3,X4) :- + (is_Space_or_Clause(X0,Y0) + -> (is_IntVarArgs(X1,Y1) + -> (is_IntVarArgs(X2,Y2) + -> (is_IntVarArgs(X3,Y3) + -> (is_IntPropLevel(X4,Y4) + -> gecode_constraint_sorted_453(Y0,Y1,Y2,Y3,Y4) + ; throw(error(type_error('IntPropLevel'(X4)),gecode_argument_error(sorted(X0,X1,X2,X3,X4),arg=5)))) + ; throw(error(type_error('IntVarArgs'(X3)),gecode_argument_error(sorted(X0,X1,X2,X3,X4),arg=4)))) + ; throw(error(type_error('IntVarArgs'(X2)),gecode_argument_error(sorted(X0,X1,X2,X3,X4),arg=3)))) + ; throw(error(type_error('IntVarArgs'(X1)),gecode_argument_error(sorted(X0,X1,X2,X3,X4),arg=2)))) + ; throw(error(type_error('Space'(X0)),gecode_argument_error(sorted(X0,X1,X2,X3,X4),arg=1)))). + +sqr(X0,X1,X2) :- + (is_Space_or_Clause(X0,Y0) + -> (is_FloatVar(X1,Y1) + -> (is_FloatVar(X2,Y2) + -> gecode_constraint_sqr_454(Y0,Y1,Y2) + ; throw(error(type_error('FloatVar'(X2)),gecode_argument_error(sqr(X0,X1,X2),arg=3)))) + ; (is_IntVar(X1,Y1) + -> (is_IntVar(X2,Y2) + -> gecode_constraint_sqr_455(Y0,Y1,Y2) + ; throw(error(type_error('IntVar'(X2)),gecode_argument_error(sqr(X0,X1,X2),arg=3)))) + ; throw(error(type_error('IntVar'(X1)),gecode_argument_error(sqr(X0,X1,X2),arg=2))))) + ; throw(error(type_error('Space'(X0)),gecode_argument_error(sqr(X0,X1,X2),arg=1)))). + +sqr(X0,X1,X2,X3) :- + (is_Space_or_Clause(X0,Y0) + -> (is_IntVar(X1,Y1) + -> (is_IntVar(X2,Y2) + -> (is_IntPropLevel(X3,Y3) + -> gecode_constraint_sqr_456(Y0,Y1,Y2,Y3) + ; throw(error(type_error('IntPropLevel'(X3)),gecode_argument_error(sqr(X0,X1,X2,X3),arg=4)))) + ; throw(error(type_error('IntVar'(X2)),gecode_argument_error(sqr(X0,X1,X2,X3),arg=3)))) + ; throw(error(type_error('IntVar'(X1)),gecode_argument_error(sqr(X0,X1,X2,X3),arg=2)))) + ; throw(error(type_error('Space'(X0)),gecode_argument_error(sqr(X0,X1,X2,X3),arg=1)))). + +sqrt(X0,X1,X2) :- + (is_Space_or_Clause(X0,Y0) + -> (is_FloatVar(X1,Y1) + -> (is_FloatVar(X2,Y2) + -> gecode_constraint_sqrt_457(Y0,Y1,Y2) + ; throw(error(type_error('FloatVar'(X2)),gecode_argument_error(sqrt(X0,X1,X2),arg=3)))) + ; (is_IntVar(X1,Y1) + -> (is_IntVar(X2,Y2) + -> gecode_constraint_sqrt_458(Y0,Y1,Y2) + ; throw(error(type_error('IntVar'(X2)),gecode_argument_error(sqrt(X0,X1,X2),arg=3)))) + ; throw(error(type_error('IntVar'(X1)),gecode_argument_error(sqrt(X0,X1,X2),arg=2))))) + ; throw(error(type_error('Space'(X0)),gecode_argument_error(sqrt(X0,X1,X2),arg=1)))). + +sqrt(X0,X1,X2,X3) :- + (is_Space_or_Clause(X0,Y0) + -> (is_IntVar(X1,Y1) + -> (is_IntVar(X2,Y2) + -> (is_IntPropLevel(X3,Y3) + -> gecode_constraint_sqrt_459(Y0,Y1,Y2,Y3) + ; throw(error(type_error('IntPropLevel'(X3)),gecode_argument_error(sqrt(X0,X1,X2,X3),arg=4)))) + ; throw(error(type_error('IntVar'(X2)),gecode_argument_error(sqrt(X0,X1,X2,X3),arg=3)))) + ; throw(error(type_error('IntVar'(X1)),gecode_argument_error(sqrt(X0,X1,X2,X3),arg=2)))) + ; throw(error(type_error('Space'(X0)),gecode_argument_error(sqrt(X0,X1,X2,X3),arg=1)))). + +unary(X0,X1,X2) :- + (is_Space_or_Clause(X0,Y0) + -> (is_IntVarArgs(X1,Y1) + -> (is_IntArgs(X2,Y2) + -> gecode_constraint_unary_460(Y0,Y1,Y2) + ; throw(error(type_error('IntArgs'(X2)),gecode_argument_error(unary(X0,X1,X2),arg=3)))) + ; throw(error(type_error('IntVarArgs'(X1)),gecode_argument_error(unary(X0,X1,X2),arg=2)))) + ; throw(error(type_error('Space'(X0)),gecode_argument_error(unary(X0,X1,X2),arg=1)))). + +unary(X0,X1,X2,X3) :- + (is_Space_or_Clause(X0,Y0) + -> (is_IntVarArgs(X1,Y1) + -> (is_IntArgs(X2,Y2) + -> (is_IntPropLevel(X3,Y3) + -> gecode_constraint_unary_461(Y0,Y1,Y2,Y3) + ; (is_BoolVarArgs(X3,Y3) + -> gecode_constraint_unary_462(Y0,Y1,Y2,Y3) + ; throw(error(type_error('BoolVarArgs'(X3)),gecode_argument_error(unary(X0,X1,X2,X3),arg=4))))) + ; (is_IntVarArgs(X2,Y2) + -> (is_IntVarArgs(X3,Y3) + -> gecode_constraint_unary_464(Y0,Y1,Y2,Y3) + ; throw(error(type_error('IntVarArgs'(X3)),gecode_argument_error(unary(X0,X1,X2,X3),arg=4)))) + ; throw(error(type_error('IntVarArgs'(X2)),gecode_argument_error(unary(X0,X1,X2,X3),arg=3))))) + ; (is_TaskTypeArgs(X1,Y1) + -> (is_IntVarArgs(X2,Y2) + -> (is_IntArgs(X3,Y3) + -> gecode_constraint_unary_468(Y0,Y1,Y2,Y3) + ; throw(error(type_error('IntArgs'(X3)),gecode_argument_error(unary(X0,X1,X2,X3),arg=4)))) + ; throw(error(type_error('IntVarArgs'(X2)),gecode_argument_error(unary(X0,X1,X2,X3),arg=3)))) + ; throw(error(type_error('TaskTypeArgs'(X1)),gecode_argument_error(unary(X0,X1,X2,X3),arg=2))))) + ; throw(error(type_error('Space'(X0)),gecode_argument_error(unary(X0,X1,X2,X3),arg=1)))). + +unary(X0,X1,X2,X3,X4) :- + (is_Space_or_Clause(X0,Y0) + -> (is_IntVarArgs(X1,Y1) + -> (is_IntArgs(X2,Y2) + -> (is_BoolVarArgs(X3,Y3) + -> (is_IntPropLevel(X4,Y4) + -> gecode_constraint_unary_463(Y0,Y1,Y2,Y3,Y4) + ; throw(error(type_error('IntPropLevel'(X4)),gecode_argument_error(unary(X0,X1,X2,X3,X4),arg=5)))) + ; throw(error(type_error('BoolVarArgs'(X3)),gecode_argument_error(unary(X0,X1,X2,X3,X4),arg=4)))) + ; (is_IntVarArgs(X2,Y2) + -> (is_IntVarArgs(X3,Y3) + -> (is_IntPropLevel(X4,Y4) + -> gecode_constraint_unary_465(Y0,Y1,Y2,Y3,Y4) + ; (is_BoolVarArgs(X4,Y4) + -> gecode_constraint_unary_466(Y0,Y1,Y2,Y3,Y4) + ; throw(error(type_error('BoolVarArgs'(X4)),gecode_argument_error(unary(X0,X1,X2,X3,X4),arg=5))))) + ; throw(error(type_error('IntVarArgs'(X3)),gecode_argument_error(unary(X0,X1,X2,X3,X4),arg=4)))) + ; throw(error(type_error('IntVarArgs'(X2)),gecode_argument_error(unary(X0,X1,X2,X3,X4),arg=3))))) + ; (is_TaskTypeArgs(X1,Y1) + -> (is_IntVarArgs(X2,Y2) + -> (is_IntArgs(X3,Y3) + -> (is_IntPropLevel(X4,Y4) + -> gecode_constraint_unary_469(Y0,Y1,Y2,Y3,Y4) + ; (is_BoolVarArgs(X4,Y4) + -> gecode_constraint_unary_470(Y0,Y1,Y2,Y3,Y4) + ; throw(error(type_error('BoolVarArgs'(X4)),gecode_argument_error(unary(X0,X1,X2,X3,X4),arg=5))))) + ; throw(error(type_error('IntArgs'(X3)),gecode_argument_error(unary(X0,X1,X2,X3,X4),arg=4)))) + ; throw(error(type_error('IntVarArgs'(X2)),gecode_argument_error(unary(X0,X1,X2,X3,X4),arg=3)))) + ; throw(error(type_error('TaskTypeArgs'(X1)),gecode_argument_error(unary(X0,X1,X2,X3,X4),arg=2))))) + ; throw(error(type_error('Space'(X0)),gecode_argument_error(unary(X0,X1,X2,X3,X4),arg=1)))). + +unary(X0,X1,X2,X3,X4,X5) :- + (is_Space_or_Clause(X0,Y0) + -> (is_IntVarArgs(X1,Y1) + -> (is_IntVarArgs(X2,Y2) + -> (is_IntVarArgs(X3,Y3) + -> (is_BoolVarArgs(X4,Y4) + -> (is_IntPropLevel(X5,Y5) + -> gecode_constraint_unary_467(Y0,Y1,Y2,Y3,Y4,Y5) + ; throw(error(type_error('IntPropLevel'(X5)),gecode_argument_error(unary(X0,X1,X2,X3,X4,X5),arg=6)))) + ; throw(error(type_error('BoolVarArgs'(X4)),gecode_argument_error(unary(X0,X1,X2,X3,X4,X5),arg=5)))) + ; throw(error(type_error('IntVarArgs'(X3)),gecode_argument_error(unary(X0,X1,X2,X3,X4,X5),arg=4)))) + ; throw(error(type_error('IntVarArgs'(X2)),gecode_argument_error(unary(X0,X1,X2,X3,X4,X5),arg=3)))) + ; (is_TaskTypeArgs(X1,Y1) + -> (is_IntVarArgs(X2,Y2) + -> (is_IntArgs(X3,Y3) + -> (is_BoolVarArgs(X4,Y4) + -> (is_IntPropLevel(X5,Y5) + -> gecode_constraint_unary_471(Y0,Y1,Y2,Y3,Y4,Y5) + ; throw(error(type_error('IntPropLevel'(X5)),gecode_argument_error(unary(X0,X1,X2,X3,X4,X5),arg=6)))) + ; throw(error(type_error('BoolVarArgs'(X4)),gecode_argument_error(unary(X0,X1,X2,X3,X4,X5),arg=5)))) + ; throw(error(type_error('IntArgs'(X3)),gecode_argument_error(unary(X0,X1,X2,X3,X4,X5),arg=4)))) + ; throw(error(type_error('IntVarArgs'(X2)),gecode_argument_error(unary(X0,X1,X2,X3,X4,X5),arg=3)))) + ; throw(error(type_error('TaskTypeArgs'(X1)),gecode_argument_error(unary(X0,X1,X2,X3,X4,X5),arg=2))))) + ; throw(error(type_error('Space'(X0)),gecode_argument_error(unary(X0,X1,X2,X3,X4,X5),arg=1)))). + +unshare(X0,X1) :- + (is_Space_or_Clause(X0,Y0) + -> (is_BoolVarArgs(X1,Y1) + -> gecode_constraint_unshare_472(Y0,Y1) + ; (is_IntVarArgs(X1,Y1) + -> gecode_constraint_unshare_474(Y0,Y1) + ; throw(error(type_error('IntVarArgs'(X1)),gecode_argument_error(unshare(X0,X1),arg=2))))) + ; throw(error(type_error('Space'(X0)),gecode_argument_error(unshare(X0,X1),arg=1)))). + +unshare(X0,X1,X2) :- + (is_Space_or_Clause(X0,Y0) + -> (is_BoolVarArgs(X1,Y1) + -> (is_IntPropLevel(X2,Y2) + -> gecode_constraint_unshare_473(Y0,Y1,Y2) + ; throw(error(type_error('IntPropLevel'(X2)),gecode_argument_error(unshare(X0,X1,X2),arg=3)))) + ; (is_IntVarArgs(X1,Y1) + -> (is_IntPropLevel(X2,Y2) + -> gecode_constraint_unshare_475(Y0,Y1,Y2) + ; throw(error(type_error('IntPropLevel'(X2)),gecode_argument_error(unshare(X0,X1,X2),arg=3)))) + ; throw(error(type_error('IntVarArgs'(X1)),gecode_argument_error(unshare(X0,X1,X2),arg=2))))) + ; throw(error(type_error('Space'(X0)),gecode_argument_error(unshare(X0,X1,X2),arg=1)))). + +when(X0,X1,X2) :- + (is_Space_or_Clause(X0,Y0) + -> (is_BoolVar(X1,Y1) + -> (is_std_function(X2,Y2) + -> gecode_constraint_when_476(Y0,Y1,Y2) + ; throw(error(type_error('std::function'(X2)),gecode_argument_error(when(X0,X1,X2),arg=3)))) + ; throw(error(type_error('BoolVar'(X1)),gecode_argument_error(when(X0,X1,X2),arg=2)))) + ; throw(error(type_error('Space'(X0)),gecode_argument_error(when(X0,X1,X2),arg=1)))). + +when(X0,X1,X2,X3) :- + (is_Space_or_Clause(X0,Y0) + -> (is_BoolVar(X1,Y1) + -> (is_std_function(X2,Y2) + -> (is_IntPropLevel(X3,Y3) + -> gecode_constraint_when_477(Y0,Y1,Y2,Y3) + ; (is_std_function(X3,Y3) + -> gecode_constraint_when_478(Y0,Y1,Y2,Y3) + ; throw(error(type_error('std::function'(X3)),gecode_argument_error(when(X0,X1,X2,X3),arg=4))))) + ; throw(error(type_error('std::function'(X2)),gecode_argument_error(when(X0,X1,X2,X3),arg=3)))) + ; throw(error(type_error('BoolVar'(X1)),gecode_argument_error(when(X0,X1,X2,X3),arg=2)))) + ; throw(error(type_error('Space'(X0)),gecode_argument_error(when(X0,X1,X2,X3),arg=1)))). + +when(X0,X1,X2,X3,X4) :- + (is_Space_or_Clause(X0,Y0) + -> (is_BoolVar(X1,Y1) + -> (is_std_function(X2,Y2) + -> (is_std_function(X3,Y3) + -> (is_IntPropLevel(X4,Y4) + -> gecode_constraint_when_479(Y0,Y1,Y2,Y3,Y4) + ; throw(error(type_error('IntPropLevel'(X4)),gecode_argument_error(when(X0,X1,X2,X3,X4),arg=5)))) + ; throw(error(type_error('std::function'(X3)),gecode_argument_error(when(X0,X1,X2,X3,X4),arg=4)))) + ; throw(error(type_error('std::function'(X2)),gecode_argument_error(when(X0,X1,X2,X3,X4),arg=3)))) + ; throw(error(type_error('BoolVar'(X1)),gecode_argument_error(when(X0,X1,X2,X3,X4),arg=2)))) + ; throw(error(type_error('Space'(X0)),gecode_argument_error(when(X0,X1,X2,X3,X4),arg=1)))). + diff --git a/packages/gecode/6.0.0/gecode_yap_cc_forward_auto_generated.icc b/packages/gecode/6.0.0/gecode_yap_cc_forward_auto_generated.icc new file mode 100644 index 000000000..dd1196994 --- /dev/null +++ b/packages/gecode/6.0.0/gecode_yap_cc_forward_auto_generated.icc @@ -0,0 +1,28 @@ +// -*- c++ -*- +//============================================================================= +// Copyright (C) 2011 by Denys Duchier +// +// This program is free software: you can redistribute it and/or modify it +// under the terms of the GNU Lesser General Public License as published by the +// Free Software Foundation, either version 3 of the License, or (at your +// option) any later version. +// +// This program is distributed in the hope that it will be useful, but WITHOUT +// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +// more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with this program. If not, see . +//============================================================================= + +static RestartMode gecode_RestartMode_from_term(YAP_Term); +static FloatRelType gecode_FloatRelType_from_term(YAP_Term); +static ReifyMode gecode_ReifyMode_from_term(YAP_Term); +static IntRelType gecode_IntRelType_from_term(YAP_Term); +static BoolOpType gecode_BoolOpType_from_term(YAP_Term); +static IntPropLevel gecode_IntPropLevel_from_term(YAP_Term); +static TaskType gecode_TaskType_from_term(YAP_Term); +static TraceEvent gecode_TraceEvent_from_term(YAP_Term); +static SetRelType gecode_SetRelType_from_term(YAP_Term); +static SetOpType gecode_SetOpType_from_term(YAP_Term); diff --git a/packages/gecode/6.0.0/gecode_yap_cc_impl_auto_generated.icc b/packages/gecode/6.0.0/gecode_yap_cc_impl_auto_generated.icc new file mode 100644 index 000000000..c170ac3c2 --- /dev/null +++ b/packages/gecode/6.0.0/gecode_yap_cc_impl_auto_generated.icc @@ -0,0 +1,5412 @@ +// -*- c++ -*- +//============================================================================= +// Copyright (C) 2011 by Denys Duchier +// +// This program is free software: you can redistribute it and/or modify it +// under the terms of the GNU Lesser General Public License as published by the +// Free Software Foundation, either version 3 of the License, or (at your +// option) any later version. +// +// This program is distributed in the hope that it will be useful, but WITHOUT +// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +// more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with this program. If not, see . +//============================================================================= + +static YAP_Term gecode_RM_NONE; +static YAP_Term gecode_RM_CONSTANT; +static YAP_Term gecode_RM_LINEAR; +static YAP_Term gecode_RM_LUBY; +static YAP_Term gecode_RM_GEOMETRIC; + +static RestartMode gecode_RestartMode_from_term(YAP_Term X) +{ + if (X==gecode_RM_NONE) return RM_NONE; + if (X==gecode_RM_CONSTANT) return RM_CONSTANT; + if (X==gecode_RM_LINEAR) return RM_LINEAR; + if (X==gecode_RM_LUBY) return RM_LUBY; + if (X==gecode_RM_GEOMETRIC) return RM_GEOMETRIC; + cerr << "this should never happen" << endl; exit(1); +} + +static YAP_Term gecode_FRT_EQ; +static YAP_Term gecode_FRT_NQ; +static YAP_Term gecode_FRT_LQ; +static YAP_Term gecode_FRT_LE; +static YAP_Term gecode_FRT_GQ; +static YAP_Term gecode_FRT_GR; + +static FloatRelType gecode_FloatRelType_from_term(YAP_Term X) +{ + if (X==gecode_FRT_EQ) return FRT_EQ; + if (X==gecode_FRT_NQ) return FRT_NQ; + if (X==gecode_FRT_LQ) return FRT_LQ; + if (X==gecode_FRT_LE) return FRT_LE; + if (X==gecode_FRT_GQ) return FRT_GQ; + if (X==gecode_FRT_GR) return FRT_GR; + cerr << "this should never happen" << endl; exit(1); +} + +static YAP_Term gecode_RM_EQV; +static YAP_Term gecode_RM_IMP; +static YAP_Term gecode_RM_PMI; + +static ReifyMode gecode_ReifyMode_from_term(YAP_Term X) +{ + if (X==gecode_RM_EQV) return RM_EQV; + if (X==gecode_RM_IMP) return RM_IMP; + if (X==gecode_RM_PMI) return RM_PMI; + cerr << "this should never happen" << endl; exit(1); +} + +static YAP_Term gecode_IRT_EQ; +static YAP_Term gecode_IRT_NQ; +static YAP_Term gecode_IRT_LQ; +static YAP_Term gecode_IRT_LE; +static YAP_Term gecode_IRT_GQ; +static YAP_Term gecode_IRT_GR; + +static IntRelType gecode_IntRelType_from_term(YAP_Term X) +{ + if (X==gecode_IRT_EQ) return IRT_EQ; + if (X==gecode_IRT_NQ) return IRT_NQ; + if (X==gecode_IRT_LQ) return IRT_LQ; + if (X==gecode_IRT_LE) return IRT_LE; + if (X==gecode_IRT_GQ) return IRT_GQ; + if (X==gecode_IRT_GR) return IRT_GR; + cerr << "this should never happen" << endl; exit(1); +} + +static YAP_Term gecode_BOT_AND; +static YAP_Term gecode_BOT_OR; +static YAP_Term gecode_BOT_IMP; +static YAP_Term gecode_BOT_EQV; +static YAP_Term gecode_BOT_XOR; + +static BoolOpType gecode_BoolOpType_from_term(YAP_Term X) +{ + if (X==gecode_BOT_AND) return BOT_AND; + if (X==gecode_BOT_OR) return BOT_OR; + if (X==gecode_BOT_IMP) return BOT_IMP; + if (X==gecode_BOT_EQV) return BOT_EQV; + if (X==gecode_BOT_XOR) return BOT_XOR; + cerr << "this should never happen" << endl; exit(1); +} + +static YAP_Term gecode_IPL_DEF; +static YAP_Term gecode_IPL_VAL; +static YAP_Term gecode_IPL_BND; +static YAP_Term gecode_IPL_DOM; +static YAP_Term gecode_IPL_SPEED; +static YAP_Term gecode_IPL_MEMORY; +static YAP_Term gecode_IPL_BASIC; +static YAP_Term gecode_IPL_ADVANCED; +static YAP_Term gecode_IPL_BASIC_ADVANCED; + +static IntPropLevel gecode_IntPropLevel_from_term(YAP_Term X) +{ + if (X==gecode_IPL_DEF) return IPL_DEF; + if (X==gecode_IPL_VAL) return IPL_VAL; + if (X==gecode_IPL_BND) return IPL_BND; + if (X==gecode_IPL_DOM) return IPL_DOM; + if (X==gecode_IPL_SPEED) return IPL_SPEED; + if (X==gecode_IPL_MEMORY) return IPL_MEMORY; + if (X==gecode_IPL_BASIC) return IPL_BASIC; + if (X==gecode_IPL_ADVANCED) return IPL_ADVANCED; + if (X==gecode_IPL_BASIC_ADVANCED) return IPL_BASIC_ADVANCED; + cerr << "this should never happen" << endl; exit(1); +} + +static YAP_Term gecode_TT_FIXP; +static YAP_Term gecode_TT_FIXS; +static YAP_Term gecode_TT_FIXE; + +static TaskType gecode_TaskType_from_term(YAP_Term X) +{ + if (X==gecode_TT_FIXP) return TT_FIXP; + if (X==gecode_TT_FIXS) return TT_FIXS; + if (X==gecode_TT_FIXE) return TT_FIXE; + cerr << "this should never happen" << endl; exit(1); +} + +static YAP_Term gecode_TE_INIT; +static YAP_Term gecode_TE_PRUNE; +static YAP_Term gecode_TE_FIX; +static YAP_Term gecode_TE_FAIL; +static YAP_Term gecode_TE_DONE; +static YAP_Term gecode_TE_PROPAGATE; +static YAP_Term gecode_TE_COMMIT; + +static TraceEvent gecode_TraceEvent_from_term(YAP_Term X) +{ + if (X==gecode_TE_INIT) return TE_INIT; + if (X==gecode_TE_PRUNE) return TE_PRUNE; + if (X==gecode_TE_FIX) return TE_FIX; + if (X==gecode_TE_FAIL) return TE_FAIL; + if (X==gecode_TE_DONE) return TE_DONE; + if (X==gecode_TE_PROPAGATE) return TE_PROPAGATE; + if (X==gecode_TE_COMMIT) return TE_COMMIT; + cerr << "this should never happen" << endl; exit(1); +} + +static YAP_Term gecode_SRT_EQ; +static YAP_Term gecode_SRT_NQ; +static YAP_Term gecode_SRT_SUB; +static YAP_Term gecode_SRT_SUP; +static YAP_Term gecode_SRT_DISJ; +static YAP_Term gecode_SRT_CMPL; +static YAP_Term gecode_SRT_LQ; +static YAP_Term gecode_SRT_LE; +static YAP_Term gecode_SRT_GQ; +static YAP_Term gecode_SRT_GR; + +static SetRelType gecode_SetRelType_from_term(YAP_Term X) +{ + if (X==gecode_SRT_EQ) return SRT_EQ; + if (X==gecode_SRT_NQ) return SRT_NQ; + if (X==gecode_SRT_SUB) return SRT_SUB; + if (X==gecode_SRT_SUP) return SRT_SUP; + if (X==gecode_SRT_DISJ) return SRT_DISJ; + if (X==gecode_SRT_CMPL) return SRT_CMPL; + if (X==gecode_SRT_LQ) return SRT_LQ; + if (X==gecode_SRT_LE) return SRT_LE; + if (X==gecode_SRT_GQ) return SRT_GQ; + if (X==gecode_SRT_GR) return SRT_GR; + cerr << "this should never happen" << endl; exit(1); +} + +static YAP_Term gecode_SOT_UNION; +static YAP_Term gecode_SOT_DUNION; +static YAP_Term gecode_SOT_INTER; +static YAP_Term gecode_SOT_MINUS; + +static SetOpType gecode_SetOpType_from_term(YAP_Term X) +{ + if (X==gecode_SOT_UNION) return SOT_UNION; + if (X==gecode_SOT_DUNION) return SOT_DUNION; + if (X==gecode_SOT_INTER) return SOT_INTER; + if (X==gecode_SOT_MINUS) return SOT_MINUS; + cerr << "this should never happen" << endl; exit(1); +} + +static YAP_Bool gecode_constraint_branch_1(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + std::function X2 = gecode_std_function_from_term(YAP_ARG2); + branch(*space,X2); + return TRUE; +} + +static YAP_Bool gecode_constraint_convex_2(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + SetVar X2 = gecode_SetVar_from_term(space,YAP_ARG2); + convex(*space,X2); + return TRUE; +} + +static YAP_Bool gecode_constraint_convex_3(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + SetVar X2 = gecode_SetVar_from_term(space,YAP_ARG2); + SetVar X3 = gecode_SetVar_from_term(space,YAP_ARG3); + convex(*space,X2,X3); + return TRUE; +} + +static YAP_Bool gecode_constraint_abs_4(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + FloatVar X2 = gecode_FloatVar_from_term(space,YAP_ARG2); + FloatVar X3 = gecode_FloatVar_from_term(space,YAP_ARG3); + abs(*space,X2,X3); + return TRUE; +} + +static YAP_Bool gecode_constraint_abs_5(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVar X2 = gecode_IntVar_from_term(space,YAP_ARG2); + IntVar X3 = gecode_IntVar_from_term(space,YAP_ARG3); + abs(*space,X2,X3); + return TRUE; +} + +static YAP_Bool gecode_constraint_abs_6(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVar X2 = gecode_IntVar_from_term(space,YAP_ARG2); + IntVar X3 = gecode_IntVar_from_term(space,YAP_ARG3); + IntPropLevel X4 = gecode_IntPropLevel_from_term(YAP_ARG4); + abs(*space,X2,X3,X4); + return TRUE; +} + +static YAP_Bool gecode_constraint_argmax_7(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVarArgs X2 = gecode_IntVarArgs_from_term(space,YAP_ARG2); + IntVar X3 = gecode_IntVar_from_term(space,YAP_ARG3); + argmax(*space,X2,X3); + return TRUE; +} + +static YAP_Bool gecode_constraint_argmax_8(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVarArgs X2 = gecode_IntVarArgs_from_term(space,YAP_ARG2); + IntVar X3 = gecode_IntVar_from_term(space,YAP_ARG3); + bool X4 = gecode_bool_from_term(YAP_ARG4); + argmax(*space,X2,X3,X4); + return TRUE; +} + +static YAP_Bool gecode_constraint_argmax_10(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVarArgs X2 = gecode_IntVarArgs_from_term(space,YAP_ARG2); + int X3 = gecode_int_from_term(YAP_ARG3); + IntVar X4 = gecode_IntVar_from_term(space,YAP_ARG4); + argmax(*space,X2,X3,X4); + return TRUE; +} + +static YAP_Bool gecode_constraint_argmax_9(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVarArgs X2 = gecode_IntVarArgs_from_term(space,YAP_ARG2); + IntVar X3 = gecode_IntVar_from_term(space,YAP_ARG3); + bool X4 = gecode_bool_from_term(YAP_ARG4); + IntPropLevel X5 = gecode_IntPropLevel_from_term(YAP_ARG5); + argmax(*space,X2,X3,X4,X5); + return TRUE; +} + +static YAP_Bool gecode_constraint_argmax_11(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVarArgs X2 = gecode_IntVarArgs_from_term(space,YAP_ARG2); + int X3 = gecode_int_from_term(YAP_ARG3); + IntVar X4 = gecode_IntVar_from_term(space,YAP_ARG4); + bool X5 = gecode_bool_from_term(YAP_ARG5); + argmax(*space,X2,X3,X4,X5); + return TRUE; +} + +static YAP_Bool gecode_constraint_argmax_12(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVarArgs X2 = gecode_IntVarArgs_from_term(space,YAP_ARG2); + int X3 = gecode_int_from_term(YAP_ARG3); + IntVar X4 = gecode_IntVar_from_term(space,YAP_ARG4); + bool X5 = gecode_bool_from_term(YAP_ARG5); + IntPropLevel X6 = gecode_IntPropLevel_from_term(YAP_ARG6); + argmax(*space,X2,X3,X4,X5,X6); + return TRUE; +} + +static YAP_Bool gecode_constraint_argmin_13(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVarArgs X2 = gecode_IntVarArgs_from_term(space,YAP_ARG2); + IntVar X3 = gecode_IntVar_from_term(space,YAP_ARG3); + argmin(*space,X2,X3); + return TRUE; +} + +static YAP_Bool gecode_constraint_argmin_14(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVarArgs X2 = gecode_IntVarArgs_from_term(space,YAP_ARG2); + IntVar X3 = gecode_IntVar_from_term(space,YAP_ARG3); + bool X4 = gecode_bool_from_term(YAP_ARG4); + argmin(*space,X2,X3,X4); + return TRUE; +} + +static YAP_Bool gecode_constraint_argmin_16(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVarArgs X2 = gecode_IntVarArgs_from_term(space,YAP_ARG2); + int X3 = gecode_int_from_term(YAP_ARG3); + IntVar X4 = gecode_IntVar_from_term(space,YAP_ARG4); + argmin(*space,X2,X3,X4); + return TRUE; +} + +static YAP_Bool gecode_constraint_argmin_15(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVarArgs X2 = gecode_IntVarArgs_from_term(space,YAP_ARG2); + IntVar X3 = gecode_IntVar_from_term(space,YAP_ARG3); + bool X4 = gecode_bool_from_term(YAP_ARG4); + IntPropLevel X5 = gecode_IntPropLevel_from_term(YAP_ARG5); + argmin(*space,X2,X3,X4,X5); + return TRUE; +} + +static YAP_Bool gecode_constraint_argmin_17(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVarArgs X2 = gecode_IntVarArgs_from_term(space,YAP_ARG2); + int X3 = gecode_int_from_term(YAP_ARG3); + IntVar X4 = gecode_IntVar_from_term(space,YAP_ARG4); + bool X5 = gecode_bool_from_term(YAP_ARG5); + argmin(*space,X2,X3,X4,X5); + return TRUE; +} + +static YAP_Bool gecode_constraint_argmin_18(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVarArgs X2 = gecode_IntVarArgs_from_term(space,YAP_ARG2); + int X3 = gecode_int_from_term(YAP_ARG3); + IntVar X4 = gecode_IntVar_from_term(space,YAP_ARG4); + bool X5 = gecode_bool_from_term(YAP_ARG5); + IntPropLevel X6 = gecode_IntPropLevel_from_term(YAP_ARG6); + argmin(*space,X2,X3,X4,X5,X6); + return TRUE; +} + +static YAP_Bool gecode_constraint_assign_19(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + BoolVar X2 = gecode_BoolVar_from_term(space,YAP_ARG2); + BoolAssign X3 = gecode_BoolAssign_from_term(YAP_ARG3); + assign(*space,X2,X3); + return TRUE; +} + +static YAP_Bool gecode_constraint_assign_21(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + FloatVar X2 = gecode_FloatVar_from_term(space,YAP_ARG2); + FloatAssign X3 = gecode_FloatAssign_from_term(YAP_ARG3); + assign(*space,X2,X3); + return TRUE; +} + +static YAP_Bool gecode_constraint_assign_23(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVar X2 = gecode_IntVar_from_term(space,YAP_ARG2); + IntAssign X3 = gecode_IntAssign_from_term(YAP_ARG3); + assign(*space,X2,X3); + return TRUE; +} + +static YAP_Bool gecode_constraint_assign_25(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + SetVar X2 = gecode_SetVar_from_term(space,YAP_ARG2); + SetAssign X3 = gecode_SetAssign_from_term(YAP_ARG3); + assign(*space,X2,X3); + return TRUE; +} + +static YAP_Bool gecode_constraint_assign_27(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + BoolVarArgs X2 = gecode_BoolVarArgs_from_term(space,YAP_ARG2); + BoolAssign X3 = gecode_BoolAssign_from_term(YAP_ARG3); + assign(*space,X2,X3); + return TRUE; +} + +static YAP_Bool gecode_constraint_assign_30(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + FloatVarArgs X2 = gecode_FloatVarArgs_from_term(space,YAP_ARG2); + FloatAssign X3 = gecode_FloatAssign_from_term(YAP_ARG3); + assign(*space,X2,X3); + return TRUE; +} + +static YAP_Bool gecode_constraint_assign_33(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVarArgs X2 = gecode_IntVarArgs_from_term(space,YAP_ARG2); + IntAssign X3 = gecode_IntAssign_from_term(YAP_ARG3); + assign(*space,X2,X3); + return TRUE; +} + +static YAP_Bool gecode_constraint_assign_36(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + SetVarArgs X2 = gecode_SetVarArgs_from_term(space,YAP_ARG2); + SetAssign X3 = gecode_SetAssign_from_term(YAP_ARG3); + assign(*space,X2,X3); + return TRUE; +} + +static YAP_Bool gecode_constraint_assign_20(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + BoolVar X2 = gecode_BoolVar_from_term(space,YAP_ARG2); + BoolAssign X3 = gecode_BoolAssign_from_term(YAP_ARG3); + BoolVarValPrint X4 = gecode_BoolVarValPrint_from_term(YAP_ARG4); + assign(*space,X2,X3,X4); + return TRUE; +} + +static YAP_Bool gecode_constraint_assign_22(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + FloatVar X2 = gecode_FloatVar_from_term(space,YAP_ARG2); + FloatAssign X3 = gecode_FloatAssign_from_term(YAP_ARG3); + FloatVarValPrint X4 = gecode_FloatVarValPrint_from_term(YAP_ARG4); + assign(*space,X2,X3,X4); + return TRUE; +} + +static YAP_Bool gecode_constraint_assign_24(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVar X2 = gecode_IntVar_from_term(space,YAP_ARG2); + IntAssign X3 = gecode_IntAssign_from_term(YAP_ARG3); + IntVarValPrint X4 = gecode_IntVarValPrint_from_term(YAP_ARG4); + assign(*space,X2,X3,X4); + return TRUE; +} + +static YAP_Bool gecode_constraint_assign_26(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + SetVar X2 = gecode_SetVar_from_term(space,YAP_ARG2); + SetAssign X3 = gecode_SetAssign_from_term(YAP_ARG3); + SetVarValPrint X4 = gecode_SetVarValPrint_from_term(YAP_ARG4); + assign(*space,X2,X3,X4); + return TRUE; +} + +static YAP_Bool gecode_constraint_assign_28(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + BoolVarArgs X2 = gecode_BoolVarArgs_from_term(space,YAP_ARG2); + BoolAssign X3 = gecode_BoolAssign_from_term(YAP_ARG3); + BoolBranchFilter X4 = gecode_BoolBranchFilter_from_term(YAP_ARG4); + assign(*space,X2,X3,X4); + return TRUE; +} + +static YAP_Bool gecode_constraint_assign_31(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + FloatVarArgs X2 = gecode_FloatVarArgs_from_term(space,YAP_ARG2); + FloatAssign X3 = gecode_FloatAssign_from_term(YAP_ARG3); + FloatBranchFilter X4 = gecode_FloatBranchFilter_from_term(YAP_ARG4); + assign(*space,X2,X3,X4); + return TRUE; +} + +static YAP_Bool gecode_constraint_assign_34(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVarArgs X2 = gecode_IntVarArgs_from_term(space,YAP_ARG2); + IntAssign X3 = gecode_IntAssign_from_term(YAP_ARG3); + IntBranchFilter X4 = gecode_IntBranchFilter_from_term(YAP_ARG4); + assign(*space,X2,X3,X4); + return TRUE; +} + +static YAP_Bool gecode_constraint_assign_37(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + SetVarArgs X2 = gecode_SetVarArgs_from_term(space,YAP_ARG2); + SetAssign X3 = gecode_SetAssign_from_term(YAP_ARG3); + SetBranchFilter X4 = gecode_SetBranchFilter_from_term(YAP_ARG4); + assign(*space,X2,X3,X4); + return TRUE; +} + +static YAP_Bool gecode_constraint_assign_29(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + BoolVarArgs X2 = gecode_BoolVarArgs_from_term(space,YAP_ARG2); + BoolAssign X3 = gecode_BoolAssign_from_term(YAP_ARG3); + BoolBranchFilter X4 = gecode_BoolBranchFilter_from_term(YAP_ARG4); + BoolVarValPrint X5 = gecode_BoolVarValPrint_from_term(YAP_ARG5); + assign(*space,X2,X3,X4,X5); + return TRUE; +} + +static YAP_Bool gecode_constraint_assign_32(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + FloatVarArgs X2 = gecode_FloatVarArgs_from_term(space,YAP_ARG2); + FloatAssign X3 = gecode_FloatAssign_from_term(YAP_ARG3); + FloatBranchFilter X4 = gecode_FloatBranchFilter_from_term(YAP_ARG4); + FloatVarValPrint X5 = gecode_FloatVarValPrint_from_term(YAP_ARG5); + assign(*space,X2,X3,X4,X5); + return TRUE; +} + +static YAP_Bool gecode_constraint_assign_35(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVarArgs X2 = gecode_IntVarArgs_from_term(space,YAP_ARG2); + IntAssign X3 = gecode_IntAssign_from_term(YAP_ARG3); + IntBranchFilter X4 = gecode_IntBranchFilter_from_term(YAP_ARG4); + IntVarValPrint X5 = gecode_IntVarValPrint_from_term(YAP_ARG5); + assign(*space,X2,X3,X4,X5); + return TRUE; +} + +static YAP_Bool gecode_constraint_assign_38(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + SetVarArgs X2 = gecode_SetVarArgs_from_term(space,YAP_ARG2); + SetAssign X3 = gecode_SetAssign_from_term(YAP_ARG3); + SetBranchFilter X4 = gecode_SetBranchFilter_from_term(YAP_ARG4); + SetVarValPrint X5 = gecode_SetVarValPrint_from_term(YAP_ARG5); + assign(*space,X2,X3,X4,X5); + return TRUE; +} + +static YAP_Bool gecode_constraint_binpacking_39(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVarArgs X2 = gecode_IntVarArgs_from_term(space,YAP_ARG2); + IntVarArgs X3 = gecode_IntVarArgs_from_term(space,YAP_ARG3); + IntArgs X4 = gecode_IntArgs_from_term(YAP_ARG4); + binpacking(*space,X2,X3,X4); + return TRUE; +} + +static YAP_Bool gecode_constraint_binpacking_40(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVarArgs X2 = gecode_IntVarArgs_from_term(space,YAP_ARG2); + IntVarArgs X3 = gecode_IntVarArgs_from_term(space,YAP_ARG3); + IntArgs X4 = gecode_IntArgs_from_term(YAP_ARG4); + IntPropLevel X5 = gecode_IntPropLevel_from_term(YAP_ARG5); + binpacking(*space,X2,X3,X4,X5); + return TRUE; +} + +static YAP_Bool gecode_constraint_branch_41(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + BoolVar X2 = gecode_BoolVar_from_term(space,YAP_ARG2); + BoolValBranch X3 = gecode_BoolValBranch_from_term(YAP_ARG3); + branch(*space,X2,X3); + return TRUE; +} + +static YAP_Bool gecode_constraint_branch_43(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + FloatVar X2 = gecode_FloatVar_from_term(space,YAP_ARG2); + FloatValBranch X3 = gecode_FloatValBranch_from_term(YAP_ARG3); + branch(*space,X2,X3); + return TRUE; +} + +static YAP_Bool gecode_constraint_branch_45(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVar X2 = gecode_IntVar_from_term(space,YAP_ARG2); + IntValBranch X3 = gecode_IntValBranch_from_term(YAP_ARG3); + branch(*space,X2,X3); + return TRUE; +} + +static YAP_Bool gecode_constraint_branch_47(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + SetVar X2 = gecode_SetVar_from_term(space,YAP_ARG2); + SetValBranch X3 = gecode_SetValBranch_from_term(YAP_ARG3); + branch(*space,X2,X3); + return TRUE; +} + +static YAP_Bool gecode_constraint_branch_42(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + BoolVar X2 = gecode_BoolVar_from_term(space,YAP_ARG2); + BoolValBranch X3 = gecode_BoolValBranch_from_term(YAP_ARG3); + BoolVarValPrint X4 = gecode_BoolVarValPrint_from_term(YAP_ARG4); + branch(*space,X2,X3,X4); + return TRUE; +} + +static YAP_Bool gecode_constraint_branch_44(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + FloatVar X2 = gecode_FloatVar_from_term(space,YAP_ARG2); + FloatValBranch X3 = gecode_FloatValBranch_from_term(YAP_ARG3); + FloatVarValPrint X4 = gecode_FloatVarValPrint_from_term(YAP_ARG4); + branch(*space,X2,X3,X4); + return TRUE; +} + +static YAP_Bool gecode_constraint_branch_46(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVar X2 = gecode_IntVar_from_term(space,YAP_ARG2); + IntValBranch X3 = gecode_IntValBranch_from_term(YAP_ARG3); + IntVarValPrint X4 = gecode_IntVarValPrint_from_term(YAP_ARG4); + branch(*space,X2,X3,X4); + return TRUE; +} + +static YAP_Bool gecode_constraint_branch_48(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + SetVar X2 = gecode_SetVar_from_term(space,YAP_ARG2); + SetValBranch X3 = gecode_SetValBranch_from_term(YAP_ARG3); + SetVarValPrint X4 = gecode_SetVarValPrint_from_term(YAP_ARG4); + branch(*space,X2,X3,X4); + return TRUE; +} + +static YAP_Bool gecode_constraint_branch_49(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + BoolVarArgs X2 = gecode_BoolVarArgs_from_term(space,YAP_ARG2); + BoolVarBranch X3 = gecode_BoolVarBranch_from_term(YAP_ARG3); + BoolValBranch X4 = gecode_BoolValBranch_from_term(YAP_ARG4); + branch(*space,X2,X3,X4); + return TRUE; +} + +static YAP_Bool gecode_constraint_branch_55(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + BoolVarArgs X2 = gecode_BoolVarArgs_from_term(space,YAP_ARG2); + TieBreak X3 = gecode_BoolVarBranch_from_term(YAP_ARG3); + BoolValBranch X4 = gecode_BoolValBranch_from_term(YAP_ARG4); + branch(*space,X2,X3,X4); + return TRUE; +} + +static YAP_Bool gecode_constraint_branch_61(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + FloatVarArgs X2 = gecode_FloatVarArgs_from_term(space,YAP_ARG2); + FloatVarBranch X3 = gecode_FloatVarBranch_from_term(YAP_ARG3); + FloatValBranch X4 = gecode_FloatValBranch_from_term(YAP_ARG4); + branch(*space,X2,X3,X4); + return TRUE; +} + +static YAP_Bool gecode_constraint_branch_64(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + FloatVarArgs X2 = gecode_FloatVarArgs_from_term(space,YAP_ARG2); + TieBreak X3 = gecode_FloatVarBranch_from_term(YAP_ARG3); + FloatValBranch X4 = gecode_FloatValBranch_from_term(YAP_ARG4); + branch(*space,X2,X3,X4); + return TRUE; +} + +static YAP_Bool gecode_constraint_branch_67(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVarArgs X2 = gecode_IntVarArgs_from_term(space,YAP_ARG2); + IntVarBranch X3 = gecode_IntVarBranch_from_term(YAP_ARG3); + IntValBranch X4 = gecode_IntValBranch_from_term(YAP_ARG4); + branch(*space,X2,X3,X4); + return TRUE; +} + +static YAP_Bool gecode_constraint_branch_73(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVarArgs X2 = gecode_IntVarArgs_from_term(space,YAP_ARG2); + TieBreak X3 = gecode_IntVarBranch_from_term(YAP_ARG3); + IntValBranch X4 = gecode_IntValBranch_from_term(YAP_ARG4); + branch(*space,X2,X3,X4); + return TRUE; +} + +static YAP_Bool gecode_constraint_branch_79(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + SetVarArgs X2 = gecode_SetVarArgs_from_term(space,YAP_ARG2); + SetVarBranch X3 = gecode_SetVarBranch_from_term(YAP_ARG3); + SetValBranch X4 = gecode_SetValBranch_from_term(YAP_ARG4); + branch(*space,X2,X3,X4); + return TRUE; +} + +static YAP_Bool gecode_constraint_branch_85(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + SetVarArgs X2 = gecode_SetVarArgs_from_term(space,YAP_ARG2); + TieBreak X3 = gecode_SetVarBranch_from_term(YAP_ARG3); + SetValBranch X4 = gecode_SetValBranch_from_term(YAP_ARG4); + branch(*space,X2,X3,X4); + return TRUE; +} + +static YAP_Bool gecode_constraint_branch_50(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + BoolVarArgs X2 = gecode_BoolVarArgs_from_term(space,YAP_ARG2); + BoolVarBranch X3 = gecode_BoolVarBranch_from_term(YAP_ARG3); + BoolValBranch X4 = gecode_BoolValBranch_from_term(YAP_ARG4); + BoolBranchFilter X5 = gecode_BoolBranchFilter_from_term(YAP_ARG5); + branch(*space,X2,X3,X4,X5); + return TRUE; +} + +static YAP_Bool gecode_constraint_branch_52(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + BoolVarArgs X2 = gecode_BoolVarArgs_from_term(space,YAP_ARG2); + BoolVarBranch X3 = gecode_BoolVarBranch_from_term(YAP_ARG3); + BoolValBranch X4 = gecode_BoolValBranch_from_term(YAP_ARG4); + Symmetries X5 = gecode_Symmetries_from_term(YAP_ARG5); + branch(*space,X2,X3,X4,X5); + return TRUE; +} + +static YAP_Bool gecode_constraint_branch_56(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + BoolVarArgs X2 = gecode_BoolVarArgs_from_term(space,YAP_ARG2); + TieBreak X3 = gecode_BoolVarBranch_from_term(YAP_ARG3); + BoolValBranch X4 = gecode_BoolValBranch_from_term(YAP_ARG4); + BoolBranchFilter X5 = gecode_BoolBranchFilter_from_term(YAP_ARG5); + branch(*space,X2,X3,X4,X5); + return TRUE; +} + +static YAP_Bool gecode_constraint_branch_58(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + BoolVarArgs X2 = gecode_BoolVarArgs_from_term(space,YAP_ARG2); + TieBreak X3 = gecode_BoolVarBranch_from_term(YAP_ARG3); + BoolValBranch X4 = gecode_BoolValBranch_from_term(YAP_ARG4); + Symmetries X5 = gecode_Symmetries_from_term(YAP_ARG5); + branch(*space,X2,X3,X4,X5); + return TRUE; +} + +static YAP_Bool gecode_constraint_branch_62(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + FloatVarArgs X2 = gecode_FloatVarArgs_from_term(space,YAP_ARG2); + FloatVarBranch X3 = gecode_FloatVarBranch_from_term(YAP_ARG3); + FloatValBranch X4 = gecode_FloatValBranch_from_term(YAP_ARG4); + FloatBranchFilter X5 = gecode_FloatBranchFilter_from_term(YAP_ARG5); + branch(*space,X2,X3,X4,X5); + return TRUE; +} + +static YAP_Bool gecode_constraint_branch_65(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + FloatVarArgs X2 = gecode_FloatVarArgs_from_term(space,YAP_ARG2); + TieBreak X3 = gecode_FloatVarBranch_from_term(YAP_ARG3); + FloatValBranch X4 = gecode_FloatValBranch_from_term(YAP_ARG4); + FloatBranchFilter X5 = gecode_FloatBranchFilter_from_term(YAP_ARG5); + branch(*space,X2,X3,X4,X5); + return TRUE; +} + +static YAP_Bool gecode_constraint_branch_68(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVarArgs X2 = gecode_IntVarArgs_from_term(space,YAP_ARG2); + IntVarBranch X3 = gecode_IntVarBranch_from_term(YAP_ARG3); + IntValBranch X4 = gecode_IntValBranch_from_term(YAP_ARG4); + IntBranchFilter X5 = gecode_IntBranchFilter_from_term(YAP_ARG5); + branch(*space,X2,X3,X4,X5); + return TRUE; +} + +static YAP_Bool gecode_constraint_branch_70(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVarArgs X2 = gecode_IntVarArgs_from_term(space,YAP_ARG2); + IntVarBranch X3 = gecode_IntVarBranch_from_term(YAP_ARG3); + IntValBranch X4 = gecode_IntValBranch_from_term(YAP_ARG4); + Symmetries X5 = gecode_Symmetries_from_term(YAP_ARG5); + branch(*space,X2,X3,X4,X5); + return TRUE; +} + +static YAP_Bool gecode_constraint_branch_74(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVarArgs X2 = gecode_IntVarArgs_from_term(space,YAP_ARG2); + TieBreak X3 = gecode_IntVarBranch_from_term(YAP_ARG3); + IntValBranch X4 = gecode_IntValBranch_from_term(YAP_ARG4); + IntBranchFilter X5 = gecode_IntBranchFilter_from_term(YAP_ARG5); + branch(*space,X2,X3,X4,X5); + return TRUE; +} + +static YAP_Bool gecode_constraint_branch_76(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVarArgs X2 = gecode_IntVarArgs_from_term(space,YAP_ARG2); + TieBreak X3 = gecode_IntVarBranch_from_term(YAP_ARG3); + IntValBranch X4 = gecode_IntValBranch_from_term(YAP_ARG4); + Symmetries X5 = gecode_Symmetries_from_term(YAP_ARG5); + branch(*space,X2,X3,X4,X5); + return TRUE; +} + +static YAP_Bool gecode_constraint_branch_80(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + SetVarArgs X2 = gecode_SetVarArgs_from_term(space,YAP_ARG2); + SetVarBranch X3 = gecode_SetVarBranch_from_term(YAP_ARG3); + SetValBranch X4 = gecode_SetValBranch_from_term(YAP_ARG4); + SetBranchFilter X5 = gecode_SetBranchFilter_from_term(YAP_ARG5); + branch(*space,X2,X3,X4,X5); + return TRUE; +} + +static YAP_Bool gecode_constraint_branch_82(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + SetVarArgs X2 = gecode_SetVarArgs_from_term(space,YAP_ARG2); + SetVarBranch X3 = gecode_SetVarBranch_from_term(YAP_ARG3); + SetValBranch X4 = gecode_SetValBranch_from_term(YAP_ARG4); + Symmetries X5 = gecode_Symmetries_from_term(YAP_ARG5); + branch(*space,X2,X3,X4,X5); + return TRUE; +} + +static YAP_Bool gecode_constraint_branch_86(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + SetVarArgs X2 = gecode_SetVarArgs_from_term(space,YAP_ARG2); + TieBreak X3 = gecode_SetVarBranch_from_term(YAP_ARG3); + SetValBranch X4 = gecode_SetValBranch_from_term(YAP_ARG4); + SetBranchFilter X5 = gecode_SetBranchFilter_from_term(YAP_ARG5); + branch(*space,X2,X3,X4,X5); + return TRUE; +} + +static YAP_Bool gecode_constraint_branch_88(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + SetVarArgs X2 = gecode_SetVarArgs_from_term(space,YAP_ARG2); + TieBreak X3 = gecode_SetVarBranch_from_term(YAP_ARG3); + SetValBranch X4 = gecode_SetValBranch_from_term(YAP_ARG4); + Symmetries X5 = gecode_Symmetries_from_term(YAP_ARG5); + branch(*space,X2,X3,X4,X5); + return TRUE; +} + +static YAP_Bool gecode_constraint_branch_51(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + BoolVarArgs X2 = gecode_BoolVarArgs_from_term(space,YAP_ARG2); + BoolVarBranch X3 = gecode_BoolVarBranch_from_term(YAP_ARG3); + BoolValBranch X4 = gecode_BoolValBranch_from_term(YAP_ARG4); + BoolBranchFilter X5 = gecode_BoolBranchFilter_from_term(YAP_ARG5); + BoolVarValPrint X6 = gecode_BoolVarValPrint_from_term(YAP_ARG6); + branch(*space,X2,X3,X4,X5,X6); + return TRUE; +} + +static YAP_Bool gecode_constraint_branch_53(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + BoolVarArgs X2 = gecode_BoolVarArgs_from_term(space,YAP_ARG2); + BoolVarBranch X3 = gecode_BoolVarBranch_from_term(YAP_ARG3); + BoolValBranch X4 = gecode_BoolValBranch_from_term(YAP_ARG4); + Symmetries X5 = gecode_Symmetries_from_term(YAP_ARG5); + BoolBranchFilter X6 = gecode_BoolBranchFilter_from_term(YAP_ARG6); + branch(*space,X2,X3,X4,X5,X6); + return TRUE; +} + +static YAP_Bool gecode_constraint_branch_57(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + BoolVarArgs X2 = gecode_BoolVarArgs_from_term(space,YAP_ARG2); + TieBreak X3 = gecode_BoolVarBranch_from_term(YAP_ARG3); + BoolValBranch X4 = gecode_BoolValBranch_from_term(YAP_ARG4); + BoolBranchFilter X5 = gecode_BoolBranchFilter_from_term(YAP_ARG5); + BoolVarValPrint X6 = gecode_BoolVarValPrint_from_term(YAP_ARG6); + branch(*space,X2,X3,X4,X5,X6); + return TRUE; +} + +static YAP_Bool gecode_constraint_branch_59(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + BoolVarArgs X2 = gecode_BoolVarArgs_from_term(space,YAP_ARG2); + TieBreak X3 = gecode_BoolVarBranch_from_term(YAP_ARG3); + BoolValBranch X4 = gecode_BoolValBranch_from_term(YAP_ARG4); + Symmetries X5 = gecode_Symmetries_from_term(YAP_ARG5); + BoolBranchFilter X6 = gecode_BoolBranchFilter_from_term(YAP_ARG6); + branch(*space,X2,X3,X4,X5,X6); + return TRUE; +} + +static YAP_Bool gecode_constraint_branch_63(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + FloatVarArgs X2 = gecode_FloatVarArgs_from_term(space,YAP_ARG2); + FloatVarBranch X3 = gecode_FloatVarBranch_from_term(YAP_ARG3); + FloatValBranch X4 = gecode_FloatValBranch_from_term(YAP_ARG4); + FloatBranchFilter X5 = gecode_FloatBranchFilter_from_term(YAP_ARG5); + FloatVarValPrint X6 = gecode_FloatVarValPrint_from_term(YAP_ARG6); + branch(*space,X2,X3,X4,X5,X6); + return TRUE; +} + +static YAP_Bool gecode_constraint_branch_66(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + FloatVarArgs X2 = gecode_FloatVarArgs_from_term(space,YAP_ARG2); + TieBreak X3 = gecode_FloatVarBranch_from_term(YAP_ARG3); + FloatValBranch X4 = gecode_FloatValBranch_from_term(YAP_ARG4); + FloatBranchFilter X5 = gecode_FloatBranchFilter_from_term(YAP_ARG5); + FloatVarValPrint X6 = gecode_FloatVarValPrint_from_term(YAP_ARG6); + branch(*space,X2,X3,X4,X5,X6); + return TRUE; +} + +static YAP_Bool gecode_constraint_branch_69(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVarArgs X2 = gecode_IntVarArgs_from_term(space,YAP_ARG2); + IntVarBranch X3 = gecode_IntVarBranch_from_term(YAP_ARG3); + IntValBranch X4 = gecode_IntValBranch_from_term(YAP_ARG4); + IntBranchFilter X5 = gecode_IntBranchFilter_from_term(YAP_ARG5); + IntVarValPrint X6 = gecode_IntVarValPrint_from_term(YAP_ARG6); + branch(*space,X2,X3,X4,X5,X6); + return TRUE; +} + +static YAP_Bool gecode_constraint_branch_71(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVarArgs X2 = gecode_IntVarArgs_from_term(space,YAP_ARG2); + IntVarBranch X3 = gecode_IntVarBranch_from_term(YAP_ARG3); + IntValBranch X4 = gecode_IntValBranch_from_term(YAP_ARG4); + Symmetries X5 = gecode_Symmetries_from_term(YAP_ARG5); + IntBranchFilter X6 = gecode_IntBranchFilter_from_term(YAP_ARG6); + branch(*space,X2,X3,X4,X5,X6); + return TRUE; +} + +static YAP_Bool gecode_constraint_branch_75(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVarArgs X2 = gecode_IntVarArgs_from_term(space,YAP_ARG2); + TieBreak X3 = gecode_IntVarBranch_from_term(YAP_ARG3); + IntValBranch X4 = gecode_IntValBranch_from_term(YAP_ARG4); + IntBranchFilter X5 = gecode_IntBranchFilter_from_term(YAP_ARG5); + IntVarValPrint X6 = gecode_IntVarValPrint_from_term(YAP_ARG6); + branch(*space,X2,X3,X4,X5,X6); + return TRUE; +} + +static YAP_Bool gecode_constraint_branch_77(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVarArgs X2 = gecode_IntVarArgs_from_term(space,YAP_ARG2); + TieBreak X3 = gecode_IntVarBranch_from_term(YAP_ARG3); + IntValBranch X4 = gecode_IntValBranch_from_term(YAP_ARG4); + Symmetries X5 = gecode_Symmetries_from_term(YAP_ARG5); + IntBranchFilter X6 = gecode_IntBranchFilter_from_term(YAP_ARG6); + branch(*space,X2,X3,X4,X5,X6); + return TRUE; +} + +static YAP_Bool gecode_constraint_branch_81(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + SetVarArgs X2 = gecode_SetVarArgs_from_term(space,YAP_ARG2); + SetVarBranch X3 = gecode_SetVarBranch_from_term(YAP_ARG3); + SetValBranch X4 = gecode_SetValBranch_from_term(YAP_ARG4); + SetBranchFilter X5 = gecode_SetBranchFilter_from_term(YAP_ARG5); + SetVarValPrint X6 = gecode_SetVarValPrint_from_term(YAP_ARG6); + branch(*space,X2,X3,X4,X5,X6); + return TRUE; +} + +static YAP_Bool gecode_constraint_branch_83(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + SetVarArgs X2 = gecode_SetVarArgs_from_term(space,YAP_ARG2); + SetVarBranch X3 = gecode_SetVarBranch_from_term(YAP_ARG3); + SetValBranch X4 = gecode_SetValBranch_from_term(YAP_ARG4); + Symmetries X5 = gecode_Symmetries_from_term(YAP_ARG5); + SetBranchFilter X6 = gecode_SetBranchFilter_from_term(YAP_ARG6); + branch(*space,X2,X3,X4,X5,X6); + return TRUE; +} + +static YAP_Bool gecode_constraint_branch_87(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + SetVarArgs X2 = gecode_SetVarArgs_from_term(space,YAP_ARG2); + TieBreak X3 = gecode_SetVarBranch_from_term(YAP_ARG3); + SetValBranch X4 = gecode_SetValBranch_from_term(YAP_ARG4); + SetBranchFilter X5 = gecode_SetBranchFilter_from_term(YAP_ARG5); + SetVarValPrint X6 = gecode_SetVarValPrint_from_term(YAP_ARG6); + branch(*space,X2,X3,X4,X5,X6); + return TRUE; +} + +static YAP_Bool gecode_constraint_branch_89(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + SetVarArgs X2 = gecode_SetVarArgs_from_term(space,YAP_ARG2); + TieBreak X3 = gecode_SetVarBranch_from_term(YAP_ARG3); + SetValBranch X4 = gecode_SetValBranch_from_term(YAP_ARG4); + Symmetries X5 = gecode_Symmetries_from_term(YAP_ARG5); + SetBranchFilter X6 = gecode_SetBranchFilter_from_term(YAP_ARG6); + branch(*space,X2,X3,X4,X5,X6); + return TRUE; +} + +static YAP_Bool gecode_constraint_branch_54(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + BoolVarArgs X2 = gecode_BoolVarArgs_from_term(space,YAP_ARG2); + BoolVarBranch X3 = gecode_BoolVarBranch_from_term(YAP_ARG3); + BoolValBranch X4 = gecode_BoolValBranch_from_term(YAP_ARG4); + Symmetries X5 = gecode_Symmetries_from_term(YAP_ARG5); + BoolBranchFilter X6 = gecode_BoolBranchFilter_from_term(YAP_ARG6); + BoolVarValPrint X7 = gecode_BoolVarValPrint_from_term(YAP_ARG7); + branch(*space,X2,X3,X4,X5,X6,X7); + return TRUE; +} + +static YAP_Bool gecode_constraint_branch_60(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + BoolVarArgs X2 = gecode_BoolVarArgs_from_term(space,YAP_ARG2); + TieBreak X3 = gecode_BoolVarBranch_from_term(YAP_ARG3); + BoolValBranch X4 = gecode_BoolValBranch_from_term(YAP_ARG4); + Symmetries X5 = gecode_Symmetries_from_term(YAP_ARG5); + BoolBranchFilter X6 = gecode_BoolBranchFilter_from_term(YAP_ARG6); + BoolVarValPrint X7 = gecode_BoolVarValPrint_from_term(YAP_ARG7); + branch(*space,X2,X3,X4,X5,X6,X7); + return TRUE; +} + +static YAP_Bool gecode_constraint_branch_72(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVarArgs X2 = gecode_IntVarArgs_from_term(space,YAP_ARG2); + IntVarBranch X3 = gecode_IntVarBranch_from_term(YAP_ARG3); + IntValBranch X4 = gecode_IntValBranch_from_term(YAP_ARG4); + Symmetries X5 = gecode_Symmetries_from_term(YAP_ARG5); + IntBranchFilter X6 = gecode_IntBranchFilter_from_term(YAP_ARG6); + IntVarValPrint X7 = gecode_IntVarValPrint_from_term(YAP_ARG7); + branch(*space,X2,X3,X4,X5,X6,X7); + return TRUE; +} + +static YAP_Bool gecode_constraint_branch_78(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVarArgs X2 = gecode_IntVarArgs_from_term(space,YAP_ARG2); + TieBreak X3 = gecode_IntVarBranch_from_term(YAP_ARG3); + IntValBranch X4 = gecode_IntValBranch_from_term(YAP_ARG4); + Symmetries X5 = gecode_Symmetries_from_term(YAP_ARG5); + IntBranchFilter X6 = gecode_IntBranchFilter_from_term(YAP_ARG6); + IntVarValPrint X7 = gecode_IntVarValPrint_from_term(YAP_ARG7); + branch(*space,X2,X3,X4,X5,X6,X7); + return TRUE; +} + +static YAP_Bool gecode_constraint_branch_84(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + SetVarArgs X2 = gecode_SetVarArgs_from_term(space,YAP_ARG2); + SetVarBranch X3 = gecode_SetVarBranch_from_term(YAP_ARG3); + SetValBranch X4 = gecode_SetValBranch_from_term(YAP_ARG4); + Symmetries X5 = gecode_Symmetries_from_term(YAP_ARG5); + SetBranchFilter X6 = gecode_SetBranchFilter_from_term(YAP_ARG6); + SetVarValPrint X7 = gecode_SetVarValPrint_from_term(YAP_ARG7); + branch(*space,X2,X3,X4,X5,X6,X7); + return TRUE; +} + +static YAP_Bool gecode_constraint_branch_90(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + SetVarArgs X2 = gecode_SetVarArgs_from_term(space,YAP_ARG2); + TieBreak X3 = gecode_SetVarBranch_from_term(YAP_ARG3); + SetValBranch X4 = gecode_SetValBranch_from_term(YAP_ARG4); + Symmetries X5 = gecode_Symmetries_from_term(YAP_ARG5); + SetBranchFilter X6 = gecode_SetBranchFilter_from_term(YAP_ARG6); + SetVarValPrint X7 = gecode_SetVarValPrint_from_term(YAP_ARG7); + branch(*space,X2,X3,X4,X5,X6,X7); + return TRUE; +} + +static YAP_Bool gecode_constraint_cardinality_91(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + SetVar X2 = gecode_SetVar_from_term(space,YAP_ARG2); + int X3 = gecode_int_from_term(YAP_ARG3); + int X4 = gecode_int_from_term(YAP_ARG4); + cardinality(*space,X2,X3,X4); + return TRUE; +} + +static YAP_Bool gecode_constraint_cardinality_92(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + SetVarArgs X2 = gecode_SetVarArgs_from_term(space,YAP_ARG2); + int X3 = gecode_int_from_term(YAP_ARG3); + int X4 = gecode_int_from_term(YAP_ARG4); + cardinality(*space,X2,X3,X4); + return TRUE; +} + +static YAP_Bool gecode_constraint_channel_93(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + BoolVar X2 = gecode_BoolVar_from_term(space,YAP_ARG2); + IntVar X3 = gecode_IntVar_from_term(space,YAP_ARG3); + channel(*space,X2,X3); + return TRUE; +} + +static YAP_Bool gecode_constraint_channel_95(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + FloatVar X2 = gecode_FloatVar_from_term(space,YAP_ARG2); + BoolVar X3 = gecode_BoolVar_from_term(space,YAP_ARG3); + channel(*space,X2,X3); + return TRUE; +} + +static YAP_Bool gecode_constraint_channel_96(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + FloatVar X2 = gecode_FloatVar_from_term(space,YAP_ARG2); + IntVar X3 = gecode_IntVar_from_term(space,YAP_ARG3); + channel(*space,X2,X3); + return TRUE; +} + +static YAP_Bool gecode_constraint_channel_97(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + BoolVarArgs X2 = gecode_BoolVarArgs_from_term(space,YAP_ARG2); + IntVar X3 = gecode_IntVar_from_term(space,YAP_ARG3); + channel(*space,X2,X3); + return TRUE; +} + +static YAP_Bool gecode_constraint_channel_100(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVarArgs X2 = gecode_IntVarArgs_from_term(space,YAP_ARG2); + IntVarArgs X3 = gecode_IntVarArgs_from_term(space,YAP_ARG3); + channel(*space,X2,X3); + return TRUE; +} + +static YAP_Bool gecode_constraint_channel_94(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + BoolVar X2 = gecode_BoolVar_from_term(space,YAP_ARG2); + IntVar X3 = gecode_IntVar_from_term(space,YAP_ARG3); + IntPropLevel X4 = gecode_IntPropLevel_from_term(YAP_ARG4); + channel(*space,X2,X3,X4); + return TRUE; +} + +static YAP_Bool gecode_constraint_channel_98(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + BoolVarArgs X2 = gecode_BoolVarArgs_from_term(space,YAP_ARG2); + IntVar X3 = gecode_IntVar_from_term(space,YAP_ARG3); + int X4 = gecode_int_from_term(YAP_ARG4); + channel(*space,X2,X3,X4); + return TRUE; +} + +static YAP_Bool gecode_constraint_channel_101(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVarArgs X2 = gecode_IntVarArgs_from_term(space,YAP_ARG2); + IntVarArgs X3 = gecode_IntVarArgs_from_term(space,YAP_ARG3); + IntPropLevel X4 = gecode_IntPropLevel_from_term(YAP_ARG4); + channel(*space,X2,X3,X4); + return TRUE; +} + +static YAP_Bool gecode_constraint_channel_99(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + BoolVarArgs X2 = gecode_BoolVarArgs_from_term(space,YAP_ARG2); + IntVar X3 = gecode_IntVar_from_term(space,YAP_ARG3); + int X4 = gecode_int_from_term(YAP_ARG4); + IntPropLevel X5 = gecode_IntPropLevel_from_term(YAP_ARG5); + channel(*space,X2,X3,X4,X5); + return TRUE; +} + +static YAP_Bool gecode_constraint_channel_102(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVarArgs X2 = gecode_IntVarArgs_from_term(space,YAP_ARG2); + int X3 = gecode_int_from_term(YAP_ARG3); + IntVarArgs X4 = gecode_IntVarArgs_from_term(space,YAP_ARG4); + int X5 = gecode_int_from_term(YAP_ARG5); + channel(*space,X2,X3,X4,X5); + return TRUE; +} + +static YAP_Bool gecode_constraint_channel_103(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVarArgs X2 = gecode_IntVarArgs_from_term(space,YAP_ARG2); + int X3 = gecode_int_from_term(YAP_ARG3); + IntVarArgs X4 = gecode_IntVarArgs_from_term(space,YAP_ARG4); + int X5 = gecode_int_from_term(YAP_ARG5); + IntPropLevel X6 = gecode_IntPropLevel_from_term(YAP_ARG6); + channel(*space,X2,X3,X4,X5,X6); + return TRUE; +} + +static YAP_Bool gecode_constraint_circuit_104(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntArgs X2 = gecode_IntArgs_from_term(YAP_ARG2); + IntVarArgs X3 = gecode_IntVarArgs_from_term(space,YAP_ARG3); + IntVar X4 = gecode_IntVar_from_term(space,YAP_ARG4); + circuit(*space,X2,X3,X4); + return TRUE; +} + +static YAP_Bool gecode_constraint_circuit_115(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + int X2 = gecode_int_from_term(YAP_ARG2); + IntVarArgs X3 = gecode_IntVarArgs_from_term(space,YAP_ARG3); + IntPropLevel X4 = gecode_IntPropLevel_from_term(YAP_ARG4); + circuit(*space,X2,X3,X4); + return TRUE; +} + +static YAP_Bool gecode_constraint_circuit_105(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntArgs X2 = gecode_IntArgs_from_term(YAP_ARG2); + IntVarArgs X3 = gecode_IntVarArgs_from_term(space,YAP_ARG3); + IntVar X4 = gecode_IntVar_from_term(space,YAP_ARG4); + IntPropLevel X5 = gecode_IntPropLevel_from_term(YAP_ARG5); + circuit(*space,X2,X3,X4,X5); + return TRUE; +} + +static YAP_Bool gecode_constraint_circuit_106(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntArgs X2 = gecode_IntArgs_from_term(YAP_ARG2); + IntVarArgs X3 = gecode_IntVarArgs_from_term(space,YAP_ARG3); + IntVarArgs X4 = gecode_IntVarArgs_from_term(space,YAP_ARG4); + IntVar X5 = gecode_IntVar_from_term(space,YAP_ARG5); + circuit(*space,X2,X3,X4,X5); + return TRUE; +} + +static YAP_Bool gecode_constraint_circuit_108(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntArgs X2 = gecode_IntArgs_from_term(YAP_ARG2); + int X3 = gecode_int_from_term(YAP_ARG3); + IntVarArgs X4 = gecode_IntVarArgs_from_term(space,YAP_ARG4); + IntVar X5 = gecode_IntVar_from_term(space,YAP_ARG5); + circuit(*space,X2,X3,X4,X5); + return TRUE; +} + +static YAP_Bool gecode_constraint_circuit_107(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntArgs X2 = gecode_IntArgs_from_term(YAP_ARG2); + IntVarArgs X3 = gecode_IntVarArgs_from_term(space,YAP_ARG3); + IntVarArgs X4 = gecode_IntVarArgs_from_term(space,YAP_ARG4); + IntVar X5 = gecode_IntVar_from_term(space,YAP_ARG5); + IntPropLevel X6 = gecode_IntPropLevel_from_term(YAP_ARG6); + circuit(*space,X2,X3,X4,X5,X6); + return TRUE; +} + +static YAP_Bool gecode_constraint_circuit_109(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntArgs X2 = gecode_IntArgs_from_term(YAP_ARG2); + int X3 = gecode_int_from_term(YAP_ARG3); + IntVarArgs X4 = gecode_IntVarArgs_from_term(space,YAP_ARG4); + IntVar X5 = gecode_IntVar_from_term(space,YAP_ARG5); + IntPropLevel X6 = gecode_IntPropLevel_from_term(YAP_ARG6); + circuit(*space,X2,X3,X4,X5,X6); + return TRUE; +} + +static YAP_Bool gecode_constraint_circuit_110(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntArgs X2 = gecode_IntArgs_from_term(YAP_ARG2); + int X3 = gecode_int_from_term(YAP_ARG3); + IntVarArgs X4 = gecode_IntVarArgs_from_term(space,YAP_ARG4); + IntVarArgs X5 = gecode_IntVarArgs_from_term(space,YAP_ARG5); + IntVar X6 = gecode_IntVar_from_term(space,YAP_ARG6); + circuit(*space,X2,X3,X4,X5,X6); + return TRUE; +} + +static YAP_Bool gecode_constraint_circuit_111(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntArgs X2 = gecode_IntArgs_from_term(YAP_ARG2); + int X3 = gecode_int_from_term(YAP_ARG3); + IntVarArgs X4 = gecode_IntVarArgs_from_term(space,YAP_ARG4); + IntVarArgs X5 = gecode_IntVarArgs_from_term(space,YAP_ARG5); + IntVar X6 = gecode_IntVar_from_term(space,YAP_ARG6); + IntPropLevel X7 = gecode_IntPropLevel_from_term(YAP_ARG7); + circuit(*space,X2,X3,X4,X5,X6,X7); + return TRUE; +} + +static YAP_Bool gecode_constraint_circuit_112(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVarArgs X2 = gecode_IntVarArgs_from_term(space,YAP_ARG2); + circuit(*space,X2); + return TRUE; +} + +static YAP_Bool gecode_constraint_circuit_113(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVarArgs X2 = gecode_IntVarArgs_from_term(space,YAP_ARG2); + IntPropLevel X3 = gecode_IntPropLevel_from_term(YAP_ARG3); + circuit(*space,X2,X3); + return TRUE; +} + +static YAP_Bool gecode_constraint_circuit_114(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + int X2 = gecode_int_from_term(YAP_ARG2); + IntVarArgs X3 = gecode_IntVarArgs_from_term(space,YAP_ARG3); + circuit(*space,X2,X3); + return TRUE; +} + +static YAP_Bool gecode_constraint_clause_116(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + BoolOpType X2 = gecode_BoolOpType_from_term(YAP_ARG2); + BoolVarArgs X3 = gecode_BoolVarArgs_from_term(space,YAP_ARG3); + BoolVarArgs X4 = gecode_BoolVarArgs_from_term(space,YAP_ARG4); + BoolVar X5 = gecode_BoolVar_from_term(space,YAP_ARG5); + clause(*space,X2,X3,X4,X5); + return TRUE; +} + +static YAP_Bool gecode_constraint_clause_118(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + BoolOpType X2 = gecode_BoolOpType_from_term(YAP_ARG2); + BoolVarArgs X3 = gecode_BoolVarArgs_from_term(space,YAP_ARG3); + BoolVarArgs X4 = gecode_BoolVarArgs_from_term(space,YAP_ARG4); + int X5 = gecode_int_from_term(YAP_ARG5); + clause(*space,X2,X3,X4,X5); + return TRUE; +} + +static YAP_Bool gecode_constraint_clause_117(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + BoolOpType X2 = gecode_BoolOpType_from_term(YAP_ARG2); + BoolVarArgs X3 = gecode_BoolVarArgs_from_term(space,YAP_ARG3); + BoolVarArgs X4 = gecode_BoolVarArgs_from_term(space,YAP_ARG4); + BoolVar X5 = gecode_BoolVar_from_term(space,YAP_ARG5); + IntPropLevel X6 = gecode_IntPropLevel_from_term(YAP_ARG6); + clause(*space,X2,X3,X4,X5,X6); + return TRUE; +} + +static YAP_Bool gecode_constraint_clause_119(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + BoolOpType X2 = gecode_BoolOpType_from_term(YAP_ARG2); + BoolVarArgs X3 = gecode_BoolVarArgs_from_term(space,YAP_ARG3); + BoolVarArgs X4 = gecode_BoolVarArgs_from_term(space,YAP_ARG4); + int X5 = gecode_int_from_term(YAP_ARG5); + IntPropLevel X6 = gecode_IntPropLevel_from_term(YAP_ARG6); + clause(*space,X2,X3,X4,X5,X6); + return TRUE; +} + +static YAP_Bool gecode_constraint_count_120(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVarArgs X2 = gecode_IntVarArgs_from_term(space,YAP_ARG2); + IntVar X3 = gecode_IntVar_from_term(space,YAP_ARG3); + IntRelType X4 = gecode_IntRelType_from_term(YAP_ARG4); + IntVar X5 = gecode_IntVar_from_term(space,YAP_ARG5); + count(*space,X2,X3,X4,X5); + return TRUE; +} + +static YAP_Bool gecode_constraint_count_122(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVarArgs X2 = gecode_IntVarArgs_from_term(space,YAP_ARG2); + IntVar X3 = gecode_IntVar_from_term(space,YAP_ARG3); + IntRelType X4 = gecode_IntRelType_from_term(YAP_ARG4); + int X5 = gecode_int_from_term(YAP_ARG5); + count(*space,X2,X3,X4,X5); + return TRUE; +} + +static YAP_Bool gecode_constraint_count_124(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVarArgs X2 = gecode_IntVarArgs_from_term(space,YAP_ARG2); + IntArgs X3 = gecode_IntArgs_from_term(YAP_ARG3); + IntRelType X4 = gecode_IntRelType_from_term(YAP_ARG4); + IntVar X5 = gecode_IntVar_from_term(space,YAP_ARG5); + count(*space,X2,X3,X4,X5); + return TRUE; +} + +static YAP_Bool gecode_constraint_count_126(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVarArgs X2 = gecode_IntVarArgs_from_term(space,YAP_ARG2); + IntArgs X3 = gecode_IntArgs_from_term(YAP_ARG3); + IntRelType X4 = gecode_IntRelType_from_term(YAP_ARG4); + int X5 = gecode_int_from_term(YAP_ARG5); + count(*space,X2,X3,X4,X5); + return TRUE; +} + +static YAP_Bool gecode_constraint_count_128(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVarArgs X2 = gecode_IntVarArgs_from_term(space,YAP_ARG2); + IntSet X3 = gecode_IntSet_from_term(YAP_ARG3); + IntRelType X4 = gecode_IntRelType_from_term(YAP_ARG4); + IntVar X5 = gecode_IntVar_from_term(space,YAP_ARG5); + count(*space,X2,X3,X4,X5); + return TRUE; +} + +static YAP_Bool gecode_constraint_count_130(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVarArgs X2 = gecode_IntVarArgs_from_term(space,YAP_ARG2); + IntSet X3 = gecode_IntSet_from_term(YAP_ARG3); + IntRelType X4 = gecode_IntRelType_from_term(YAP_ARG4); + int X5 = gecode_int_from_term(YAP_ARG5); + count(*space,X2,X3,X4,X5); + return TRUE; +} + +static YAP_Bool gecode_constraint_count_133(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVarArgs X2 = gecode_IntVarArgs_from_term(space,YAP_ARG2); + IntSet X3 = gecode_IntSet_from_term(YAP_ARG3); + IntArgs X4 = gecode_IntArgs_from_term(YAP_ARG4); + IntPropLevel X5 = gecode_IntPropLevel_from_term(YAP_ARG5); + count(*space,X2,X3,X4,X5); + return TRUE; +} + +static YAP_Bool gecode_constraint_count_137(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVarArgs X2 = gecode_IntVarArgs_from_term(space,YAP_ARG2); + IntSetArgs X3 = gecode_IntSetArgs_from_term(YAP_ARG3); + IntArgs X4 = gecode_IntArgs_from_term(YAP_ARG4); + IntPropLevel X5 = gecode_IntPropLevel_from_term(YAP_ARG5); + count(*space,X2,X3,X4,X5); + return TRUE; +} + +static YAP_Bool gecode_constraint_count_141(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVarArgs X2 = gecode_IntVarArgs_from_term(space,YAP_ARG2); + IntVarArgs X3 = gecode_IntVarArgs_from_term(space,YAP_ARG3); + IntArgs X4 = gecode_IntArgs_from_term(YAP_ARG4); + IntPropLevel X5 = gecode_IntPropLevel_from_term(YAP_ARG5); + count(*space,X2,X3,X4,X5); + return TRUE; +} + +static YAP_Bool gecode_constraint_count_142(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVarArgs X2 = gecode_IntVarArgs_from_term(space,YAP_ARG2); + int X3 = gecode_int_from_term(YAP_ARG3); + IntRelType X4 = gecode_IntRelType_from_term(YAP_ARG4); + IntVar X5 = gecode_IntVar_from_term(space,YAP_ARG5); + count(*space,X2,X3,X4,X5); + return TRUE; +} + +static YAP_Bool gecode_constraint_count_144(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVarArgs X2 = gecode_IntVarArgs_from_term(space,YAP_ARG2); + int X3 = gecode_int_from_term(YAP_ARG3); + IntRelType X4 = gecode_IntRelType_from_term(YAP_ARG4); + int X5 = gecode_int_from_term(YAP_ARG5); + count(*space,X2,X3,X4,X5); + return TRUE; +} + +static YAP_Bool gecode_constraint_count_121(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVarArgs X2 = gecode_IntVarArgs_from_term(space,YAP_ARG2); + IntVar X3 = gecode_IntVar_from_term(space,YAP_ARG3); + IntRelType X4 = gecode_IntRelType_from_term(YAP_ARG4); + IntVar X5 = gecode_IntVar_from_term(space,YAP_ARG5); + IntPropLevel X6 = gecode_IntPropLevel_from_term(YAP_ARG6); + count(*space,X2,X3,X4,X5,X6); + return TRUE; +} + +static YAP_Bool gecode_constraint_count_123(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVarArgs X2 = gecode_IntVarArgs_from_term(space,YAP_ARG2); + IntVar X3 = gecode_IntVar_from_term(space,YAP_ARG3); + IntRelType X4 = gecode_IntRelType_from_term(YAP_ARG4); + int X5 = gecode_int_from_term(YAP_ARG5); + IntPropLevel X6 = gecode_IntPropLevel_from_term(YAP_ARG6); + count(*space,X2,X3,X4,X5,X6); + return TRUE; +} + +static YAP_Bool gecode_constraint_count_125(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVarArgs X2 = gecode_IntVarArgs_from_term(space,YAP_ARG2); + IntArgs X3 = gecode_IntArgs_from_term(YAP_ARG3); + IntRelType X4 = gecode_IntRelType_from_term(YAP_ARG4); + IntVar X5 = gecode_IntVar_from_term(space,YAP_ARG5); + IntPropLevel X6 = gecode_IntPropLevel_from_term(YAP_ARG6); + count(*space,X2,X3,X4,X5,X6); + return TRUE; +} + +static YAP_Bool gecode_constraint_count_127(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVarArgs X2 = gecode_IntVarArgs_from_term(space,YAP_ARG2); + IntArgs X3 = gecode_IntArgs_from_term(YAP_ARG3); + IntRelType X4 = gecode_IntRelType_from_term(YAP_ARG4); + int X5 = gecode_int_from_term(YAP_ARG5); + IntPropLevel X6 = gecode_IntPropLevel_from_term(YAP_ARG6); + count(*space,X2,X3,X4,X5,X6); + return TRUE; +} + +static YAP_Bool gecode_constraint_count_129(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVarArgs X2 = gecode_IntVarArgs_from_term(space,YAP_ARG2); + IntSet X3 = gecode_IntSet_from_term(YAP_ARG3); + IntRelType X4 = gecode_IntRelType_from_term(YAP_ARG4); + IntVar X5 = gecode_IntVar_from_term(space,YAP_ARG5); + IntPropLevel X6 = gecode_IntPropLevel_from_term(YAP_ARG6); + count(*space,X2,X3,X4,X5,X6); + return TRUE; +} + +static YAP_Bool gecode_constraint_count_131(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVarArgs X2 = gecode_IntVarArgs_from_term(space,YAP_ARG2); + IntSet X3 = gecode_IntSet_from_term(YAP_ARG3); + IntRelType X4 = gecode_IntRelType_from_term(YAP_ARG4); + int X5 = gecode_int_from_term(YAP_ARG5); + IntPropLevel X6 = gecode_IntPropLevel_from_term(YAP_ARG6); + count(*space,X2,X3,X4,X5,X6); + return TRUE; +} + +static YAP_Bool gecode_constraint_count_143(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVarArgs X2 = gecode_IntVarArgs_from_term(space,YAP_ARG2); + int X3 = gecode_int_from_term(YAP_ARG3); + IntRelType X4 = gecode_IntRelType_from_term(YAP_ARG4); + IntVar X5 = gecode_IntVar_from_term(space,YAP_ARG5); + IntPropLevel X6 = gecode_IntPropLevel_from_term(YAP_ARG6); + count(*space,X2,X3,X4,X5,X6); + return TRUE; +} + +static YAP_Bool gecode_constraint_count_145(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVarArgs X2 = gecode_IntVarArgs_from_term(space,YAP_ARG2); + int X3 = gecode_int_from_term(YAP_ARG3); + IntRelType X4 = gecode_IntRelType_from_term(YAP_ARG4); + int X5 = gecode_int_from_term(YAP_ARG5); + IntPropLevel X6 = gecode_IntPropLevel_from_term(YAP_ARG6); + count(*space,X2,X3,X4,X5,X6); + return TRUE; +} + +static YAP_Bool gecode_constraint_count_132(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVarArgs X2 = gecode_IntVarArgs_from_term(space,YAP_ARG2); + IntSet X3 = gecode_IntSet_from_term(YAP_ARG3); + IntArgs X4 = gecode_IntArgs_from_term(YAP_ARG4); + count(*space,X2,X3,X4); + return TRUE; +} + +static YAP_Bool gecode_constraint_count_135(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVarArgs X2 = gecode_IntVarArgs_from_term(space,YAP_ARG2); + IntSetArgs X3 = gecode_IntSetArgs_from_term(YAP_ARG3); + IntPropLevel X4 = gecode_IntPropLevel_from_term(YAP_ARG4); + count(*space,X2,X3,X4); + return TRUE; +} + +static YAP_Bool gecode_constraint_count_136(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVarArgs X2 = gecode_IntVarArgs_from_term(space,YAP_ARG2); + IntSetArgs X3 = gecode_IntSetArgs_from_term(YAP_ARG3); + IntArgs X4 = gecode_IntArgs_from_term(YAP_ARG4); + count(*space,X2,X3,X4); + return TRUE; +} + +static YAP_Bool gecode_constraint_count_139(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVarArgs X2 = gecode_IntVarArgs_from_term(space,YAP_ARG2); + IntVarArgs X3 = gecode_IntVarArgs_from_term(space,YAP_ARG3); + IntPropLevel X4 = gecode_IntPropLevel_from_term(YAP_ARG4); + count(*space,X2,X3,X4); + return TRUE; +} + +static YAP_Bool gecode_constraint_count_140(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVarArgs X2 = gecode_IntVarArgs_from_term(space,YAP_ARG2); + IntVarArgs X3 = gecode_IntVarArgs_from_term(space,YAP_ARG3); + IntArgs X4 = gecode_IntArgs_from_term(YAP_ARG4); + count(*space,X2,X3,X4); + return TRUE; +} + +static YAP_Bool gecode_constraint_count_134(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVarArgs X2 = gecode_IntVarArgs_from_term(space,YAP_ARG2); + IntSetArgs X3 = gecode_IntSetArgs_from_term(YAP_ARG3); + count(*space,X2,X3); + return TRUE; +} + +static YAP_Bool gecode_constraint_count_138(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVarArgs X2 = gecode_IntVarArgs_from_term(space,YAP_ARG2); + IntVarArgs X3 = gecode_IntVarArgs_from_term(space,YAP_ARG3); + count(*space,X2,X3); + return TRUE; +} + +static YAP_Bool gecode_constraint_cumulative_146(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVar X2 = gecode_IntVar_from_term(space,YAP_ARG2); + IntVarArgs X3 = gecode_IntVarArgs_from_term(space,YAP_ARG3); + IntArgs X4 = gecode_IntArgs_from_term(YAP_ARG4); + IntArgs X5 = gecode_IntArgs_from_term(YAP_ARG5); + cumulative(*space,X2,X3,X4,X5); + return TRUE; +} + +static YAP_Bool gecode_constraint_cumulative_158(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + int X2 = gecode_int_from_term(YAP_ARG2); + IntVarArgs X3 = gecode_IntVarArgs_from_term(space,YAP_ARG3); + IntArgs X4 = gecode_IntArgs_from_term(YAP_ARG4); + IntArgs X5 = gecode_IntArgs_from_term(YAP_ARG5); + cumulative(*space,X2,X3,X4,X5); + return TRUE; +} + +static YAP_Bool gecode_constraint_cumulative_147(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVar X2 = gecode_IntVar_from_term(space,YAP_ARG2); + IntVarArgs X3 = gecode_IntVarArgs_from_term(space,YAP_ARG3); + IntArgs X4 = gecode_IntArgs_from_term(YAP_ARG4); + IntArgs X5 = gecode_IntArgs_from_term(YAP_ARG5); + IntPropLevel X6 = gecode_IntPropLevel_from_term(YAP_ARG6); + cumulative(*space,X2,X3,X4,X5,X6); + return TRUE; +} + +static YAP_Bool gecode_constraint_cumulative_148(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVar X2 = gecode_IntVar_from_term(space,YAP_ARG2); + IntVarArgs X3 = gecode_IntVarArgs_from_term(space,YAP_ARG3); + IntArgs X4 = gecode_IntArgs_from_term(YAP_ARG4); + IntArgs X5 = gecode_IntArgs_from_term(YAP_ARG5); + BoolVarArgs X6 = gecode_BoolVarArgs_from_term(space,YAP_ARG6); + cumulative(*space,X2,X3,X4,X5,X6); + return TRUE; +} + +static YAP_Bool gecode_constraint_cumulative_150(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVar X2 = gecode_IntVar_from_term(space,YAP_ARG2); + IntVarArgs X3 = gecode_IntVarArgs_from_term(space,YAP_ARG3); + IntVarArgs X4 = gecode_IntVarArgs_from_term(space,YAP_ARG4); + IntVarArgs X5 = gecode_IntVarArgs_from_term(space,YAP_ARG5); + IntArgs X6 = gecode_IntArgs_from_term(YAP_ARG6); + cumulative(*space,X2,X3,X4,X5,X6); + return TRUE; +} + +static YAP_Bool gecode_constraint_cumulative_154(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVar X2 = gecode_IntVar_from_term(space,YAP_ARG2); + TaskTypeArgs X3 = gecode_TaskTypeArgs_from_term(YAP_ARG3); + IntVarArgs X4 = gecode_IntVarArgs_from_term(space,YAP_ARG4); + IntArgs X5 = gecode_IntArgs_from_term(YAP_ARG5); + IntArgs X6 = gecode_IntArgs_from_term(YAP_ARG6); + cumulative(*space,X2,X3,X4,X5,X6); + return TRUE; +} + +static YAP_Bool gecode_constraint_cumulative_159(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + int X2 = gecode_int_from_term(YAP_ARG2); + IntVarArgs X3 = gecode_IntVarArgs_from_term(space,YAP_ARG3); + IntArgs X4 = gecode_IntArgs_from_term(YAP_ARG4); + IntArgs X5 = gecode_IntArgs_from_term(YAP_ARG5); + IntPropLevel X6 = gecode_IntPropLevel_from_term(YAP_ARG6); + cumulative(*space,X2,X3,X4,X5,X6); + return TRUE; +} + +static YAP_Bool gecode_constraint_cumulative_160(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + int X2 = gecode_int_from_term(YAP_ARG2); + IntVarArgs X3 = gecode_IntVarArgs_from_term(space,YAP_ARG3); + IntArgs X4 = gecode_IntArgs_from_term(YAP_ARG4); + IntArgs X5 = gecode_IntArgs_from_term(YAP_ARG5); + BoolVarArgs X6 = gecode_BoolVarArgs_from_term(space,YAP_ARG6); + cumulative(*space,X2,X3,X4,X5,X6); + return TRUE; +} + +static YAP_Bool gecode_constraint_cumulative_162(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + int X2 = gecode_int_from_term(YAP_ARG2); + IntVarArgs X3 = gecode_IntVarArgs_from_term(space,YAP_ARG3); + IntVarArgs X4 = gecode_IntVarArgs_from_term(space,YAP_ARG4); + IntVarArgs X5 = gecode_IntVarArgs_from_term(space,YAP_ARG5); + IntArgs X6 = gecode_IntArgs_from_term(YAP_ARG6); + cumulative(*space,X2,X3,X4,X5,X6); + return TRUE; +} + +static YAP_Bool gecode_constraint_cumulative_166(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + int X2 = gecode_int_from_term(YAP_ARG2); + TaskTypeArgs X3 = gecode_TaskTypeArgs_from_term(YAP_ARG3); + IntVarArgs X4 = gecode_IntVarArgs_from_term(space,YAP_ARG4); + IntArgs X5 = gecode_IntArgs_from_term(YAP_ARG5); + IntArgs X6 = gecode_IntArgs_from_term(YAP_ARG6); + cumulative(*space,X2,X3,X4,X5,X6); + return TRUE; +} + +static YAP_Bool gecode_constraint_cumulative_149(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVar X2 = gecode_IntVar_from_term(space,YAP_ARG2); + IntVarArgs X3 = gecode_IntVarArgs_from_term(space,YAP_ARG3); + IntArgs X4 = gecode_IntArgs_from_term(YAP_ARG4); + IntArgs X5 = gecode_IntArgs_from_term(YAP_ARG5); + BoolVarArgs X6 = gecode_BoolVarArgs_from_term(space,YAP_ARG6); + IntPropLevel X7 = gecode_IntPropLevel_from_term(YAP_ARG7); + cumulative(*space,X2,X3,X4,X5,X6,X7); + return TRUE; +} + +static YAP_Bool gecode_constraint_cumulative_151(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVar X2 = gecode_IntVar_from_term(space,YAP_ARG2); + IntVarArgs X3 = gecode_IntVarArgs_from_term(space,YAP_ARG3); + IntVarArgs X4 = gecode_IntVarArgs_from_term(space,YAP_ARG4); + IntVarArgs X5 = gecode_IntVarArgs_from_term(space,YAP_ARG5); + IntArgs X6 = gecode_IntArgs_from_term(YAP_ARG6); + IntPropLevel X7 = gecode_IntPropLevel_from_term(YAP_ARG7); + cumulative(*space,X2,X3,X4,X5,X6,X7); + return TRUE; +} + +static YAP_Bool gecode_constraint_cumulative_152(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVar X2 = gecode_IntVar_from_term(space,YAP_ARG2); + IntVarArgs X3 = gecode_IntVarArgs_from_term(space,YAP_ARG3); + IntVarArgs X4 = gecode_IntVarArgs_from_term(space,YAP_ARG4); + IntVarArgs X5 = gecode_IntVarArgs_from_term(space,YAP_ARG5); + IntArgs X6 = gecode_IntArgs_from_term(YAP_ARG6); + BoolVarArgs X7 = gecode_BoolVarArgs_from_term(space,YAP_ARG7); + cumulative(*space,X2,X3,X4,X5,X6,X7); + return TRUE; +} + +static YAP_Bool gecode_constraint_cumulative_155(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVar X2 = gecode_IntVar_from_term(space,YAP_ARG2); + TaskTypeArgs X3 = gecode_TaskTypeArgs_from_term(YAP_ARG3); + IntVarArgs X4 = gecode_IntVarArgs_from_term(space,YAP_ARG4); + IntArgs X5 = gecode_IntArgs_from_term(YAP_ARG5); + IntArgs X6 = gecode_IntArgs_from_term(YAP_ARG6); + IntPropLevel X7 = gecode_IntPropLevel_from_term(YAP_ARG7); + cumulative(*space,X2,X3,X4,X5,X6,X7); + return TRUE; +} + +static YAP_Bool gecode_constraint_cumulative_156(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVar X2 = gecode_IntVar_from_term(space,YAP_ARG2); + TaskTypeArgs X3 = gecode_TaskTypeArgs_from_term(YAP_ARG3); + IntVarArgs X4 = gecode_IntVarArgs_from_term(space,YAP_ARG4); + IntArgs X5 = gecode_IntArgs_from_term(YAP_ARG5); + IntArgs X6 = gecode_IntArgs_from_term(YAP_ARG6); + BoolVarArgs X7 = gecode_BoolVarArgs_from_term(space,YAP_ARG7); + cumulative(*space,X2,X3,X4,X5,X6,X7); + return TRUE; +} + +static YAP_Bool gecode_constraint_cumulative_161(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + int X2 = gecode_int_from_term(YAP_ARG2); + IntVarArgs X3 = gecode_IntVarArgs_from_term(space,YAP_ARG3); + IntArgs X4 = gecode_IntArgs_from_term(YAP_ARG4); + IntArgs X5 = gecode_IntArgs_from_term(YAP_ARG5); + BoolVarArgs X6 = gecode_BoolVarArgs_from_term(space,YAP_ARG6); + IntPropLevel X7 = gecode_IntPropLevel_from_term(YAP_ARG7); + cumulative(*space,X2,X3,X4,X5,X6,X7); + return TRUE; +} + +static YAP_Bool gecode_constraint_cumulative_163(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + int X2 = gecode_int_from_term(YAP_ARG2); + IntVarArgs X3 = gecode_IntVarArgs_from_term(space,YAP_ARG3); + IntVarArgs X4 = gecode_IntVarArgs_from_term(space,YAP_ARG4); + IntVarArgs X5 = gecode_IntVarArgs_from_term(space,YAP_ARG5); + IntArgs X6 = gecode_IntArgs_from_term(YAP_ARG6); + IntPropLevel X7 = gecode_IntPropLevel_from_term(YAP_ARG7); + cumulative(*space,X2,X3,X4,X5,X6,X7); + return TRUE; +} + +static YAP_Bool gecode_constraint_cumulative_164(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + int X2 = gecode_int_from_term(YAP_ARG2); + IntVarArgs X3 = gecode_IntVarArgs_from_term(space,YAP_ARG3); + IntVarArgs X4 = gecode_IntVarArgs_from_term(space,YAP_ARG4); + IntVarArgs X5 = gecode_IntVarArgs_from_term(space,YAP_ARG5); + IntArgs X6 = gecode_IntArgs_from_term(YAP_ARG6); + BoolVarArgs X7 = gecode_BoolVarArgs_from_term(space,YAP_ARG7); + cumulative(*space,X2,X3,X4,X5,X6,X7); + return TRUE; +} + +static YAP_Bool gecode_constraint_cumulative_167(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + int X2 = gecode_int_from_term(YAP_ARG2); + TaskTypeArgs X3 = gecode_TaskTypeArgs_from_term(YAP_ARG3); + IntVarArgs X4 = gecode_IntVarArgs_from_term(space,YAP_ARG4); + IntArgs X5 = gecode_IntArgs_from_term(YAP_ARG5); + IntArgs X6 = gecode_IntArgs_from_term(YAP_ARG6); + IntPropLevel X7 = gecode_IntPropLevel_from_term(YAP_ARG7); + cumulative(*space,X2,X3,X4,X5,X6,X7); + return TRUE; +} + +static YAP_Bool gecode_constraint_cumulative_168(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + int X2 = gecode_int_from_term(YAP_ARG2); + TaskTypeArgs X3 = gecode_TaskTypeArgs_from_term(YAP_ARG3); + IntVarArgs X4 = gecode_IntVarArgs_from_term(space,YAP_ARG4); + IntArgs X5 = gecode_IntArgs_from_term(YAP_ARG5); + IntArgs X6 = gecode_IntArgs_from_term(YAP_ARG6); + BoolVarArgs X7 = gecode_BoolVarArgs_from_term(space,YAP_ARG7); + cumulative(*space,X2,X3,X4,X5,X6,X7); + return TRUE; +} + +static YAP_Bool gecode_constraint_cumulative_153(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVar X2 = gecode_IntVar_from_term(space,YAP_ARG2); + IntVarArgs X3 = gecode_IntVarArgs_from_term(space,YAP_ARG3); + IntVarArgs X4 = gecode_IntVarArgs_from_term(space,YAP_ARG4); + IntVarArgs X5 = gecode_IntVarArgs_from_term(space,YAP_ARG5); + IntArgs X6 = gecode_IntArgs_from_term(YAP_ARG6); + BoolVarArgs X7 = gecode_BoolVarArgs_from_term(space,YAP_ARG7); + IntPropLevel X8 = gecode_IntPropLevel_from_term(YAP_ARG8); + cumulative(*space,X2,X3,X4,X5,X6,X7,X8); + return TRUE; +} + +static YAP_Bool gecode_constraint_cumulative_157(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVar X2 = gecode_IntVar_from_term(space,YAP_ARG2); + TaskTypeArgs X3 = gecode_TaskTypeArgs_from_term(YAP_ARG3); + IntVarArgs X4 = gecode_IntVarArgs_from_term(space,YAP_ARG4); + IntArgs X5 = gecode_IntArgs_from_term(YAP_ARG5); + IntArgs X6 = gecode_IntArgs_from_term(YAP_ARG6); + BoolVarArgs X7 = gecode_BoolVarArgs_from_term(space,YAP_ARG7); + IntPropLevel X8 = gecode_IntPropLevel_from_term(YAP_ARG8); + cumulative(*space,X2,X3,X4,X5,X6,X7,X8); + return TRUE; +} + +static YAP_Bool gecode_constraint_cumulative_165(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + int X2 = gecode_int_from_term(YAP_ARG2); + IntVarArgs X3 = gecode_IntVarArgs_from_term(space,YAP_ARG3); + IntVarArgs X4 = gecode_IntVarArgs_from_term(space,YAP_ARG4); + IntVarArgs X5 = gecode_IntVarArgs_from_term(space,YAP_ARG5); + IntArgs X6 = gecode_IntArgs_from_term(YAP_ARG6); + BoolVarArgs X7 = gecode_BoolVarArgs_from_term(space,YAP_ARG7); + IntPropLevel X8 = gecode_IntPropLevel_from_term(YAP_ARG8); + cumulative(*space,X2,X3,X4,X5,X6,X7,X8); + return TRUE; +} + +static YAP_Bool gecode_constraint_cumulative_169(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + int X2 = gecode_int_from_term(YAP_ARG2); + TaskTypeArgs X3 = gecode_TaskTypeArgs_from_term(YAP_ARG3); + IntVarArgs X4 = gecode_IntVarArgs_from_term(space,YAP_ARG4); + IntArgs X5 = gecode_IntArgs_from_term(YAP_ARG5); + IntArgs X6 = gecode_IntArgs_from_term(YAP_ARG6); + BoolVarArgs X7 = gecode_BoolVarArgs_from_term(space,YAP_ARG7); + IntPropLevel X8 = gecode_IntPropLevel_from_term(YAP_ARG8); + cumulative(*space,X2,X3,X4,X5,X6,X7,X8); + return TRUE; +} + +static YAP_Bool gecode_constraint_cumulatives_170(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntArgs X2 = gecode_IntArgs_from_term(YAP_ARG2); + IntVarArgs X3 = gecode_IntVarArgs_from_term(space,YAP_ARG3); + IntArgs X4 = gecode_IntArgs_from_term(YAP_ARG4); + IntVarArgs X5 = gecode_IntVarArgs_from_term(space,YAP_ARG5); + IntArgs X6 = gecode_IntArgs_from_term(YAP_ARG6); + IntArgs X7 = gecode_IntArgs_from_term(YAP_ARG7); + bool X8 = gecode_bool_from_term(YAP_ARG8); + cumulatives(*space,X2,X3,X4,X5,X6,X7,X8); + return TRUE; +} + +static YAP_Bool gecode_constraint_cumulatives_172(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntArgs X2 = gecode_IntArgs_from_term(YAP_ARG2); + IntVarArgs X3 = gecode_IntVarArgs_from_term(space,YAP_ARG3); + IntArgs X4 = gecode_IntArgs_from_term(YAP_ARG4); + IntVarArgs X5 = gecode_IntVarArgs_from_term(space,YAP_ARG5); + IntVarArgs X6 = gecode_IntVarArgs_from_term(space,YAP_ARG6); + IntArgs X7 = gecode_IntArgs_from_term(YAP_ARG7); + bool X8 = gecode_bool_from_term(YAP_ARG8); + cumulatives(*space,X2,X3,X4,X5,X6,X7,X8); + return TRUE; +} + +static YAP_Bool gecode_constraint_cumulatives_174(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntArgs X2 = gecode_IntArgs_from_term(YAP_ARG2); + IntVarArgs X3 = gecode_IntVarArgs_from_term(space,YAP_ARG3); + IntVarArgs X4 = gecode_IntVarArgs_from_term(space,YAP_ARG4); + IntVarArgs X5 = gecode_IntVarArgs_from_term(space,YAP_ARG5); + IntArgs X6 = gecode_IntArgs_from_term(YAP_ARG6); + IntArgs X7 = gecode_IntArgs_from_term(YAP_ARG7); + bool X8 = gecode_bool_from_term(YAP_ARG8); + cumulatives(*space,X2,X3,X4,X5,X6,X7,X8); + return TRUE; +} + +static YAP_Bool gecode_constraint_cumulatives_176(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntArgs X2 = gecode_IntArgs_from_term(YAP_ARG2); + IntVarArgs X3 = gecode_IntVarArgs_from_term(space,YAP_ARG3); + IntVarArgs X4 = gecode_IntVarArgs_from_term(space,YAP_ARG4); + IntVarArgs X5 = gecode_IntVarArgs_from_term(space,YAP_ARG5); + IntVarArgs X6 = gecode_IntVarArgs_from_term(space,YAP_ARG6); + IntArgs X7 = gecode_IntArgs_from_term(YAP_ARG7); + bool X8 = gecode_bool_from_term(YAP_ARG8); + cumulatives(*space,X2,X3,X4,X5,X6,X7,X8); + return TRUE; +} + +static YAP_Bool gecode_constraint_cumulatives_178(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVarArgs X2 = gecode_IntVarArgs_from_term(space,YAP_ARG2); + IntVarArgs X3 = gecode_IntVarArgs_from_term(space,YAP_ARG3); + IntArgs X4 = gecode_IntArgs_from_term(YAP_ARG4); + IntVarArgs X5 = gecode_IntVarArgs_from_term(space,YAP_ARG5); + IntArgs X6 = gecode_IntArgs_from_term(YAP_ARG6); + IntArgs X7 = gecode_IntArgs_from_term(YAP_ARG7); + bool X8 = gecode_bool_from_term(YAP_ARG8); + cumulatives(*space,X2,X3,X4,X5,X6,X7,X8); + return TRUE; +} + +static YAP_Bool gecode_constraint_cumulatives_180(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVarArgs X2 = gecode_IntVarArgs_from_term(space,YAP_ARG2); + IntVarArgs X3 = gecode_IntVarArgs_from_term(space,YAP_ARG3); + IntArgs X4 = gecode_IntArgs_from_term(YAP_ARG4); + IntVarArgs X5 = gecode_IntVarArgs_from_term(space,YAP_ARG5); + IntVarArgs X6 = gecode_IntVarArgs_from_term(space,YAP_ARG6); + IntArgs X7 = gecode_IntArgs_from_term(YAP_ARG7); + bool X8 = gecode_bool_from_term(YAP_ARG8); + cumulatives(*space,X2,X3,X4,X5,X6,X7,X8); + return TRUE; +} + +static YAP_Bool gecode_constraint_cumulatives_182(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVarArgs X2 = gecode_IntVarArgs_from_term(space,YAP_ARG2); + IntVarArgs X3 = gecode_IntVarArgs_from_term(space,YAP_ARG3); + IntVarArgs X4 = gecode_IntVarArgs_from_term(space,YAP_ARG4); + IntVarArgs X5 = gecode_IntVarArgs_from_term(space,YAP_ARG5); + IntArgs X6 = gecode_IntArgs_from_term(YAP_ARG6); + IntArgs X7 = gecode_IntArgs_from_term(YAP_ARG7); + bool X8 = gecode_bool_from_term(YAP_ARG8); + cumulatives(*space,X2,X3,X4,X5,X6,X7,X8); + return TRUE; +} + +static YAP_Bool gecode_constraint_cumulatives_184(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVarArgs X2 = gecode_IntVarArgs_from_term(space,YAP_ARG2); + IntVarArgs X3 = gecode_IntVarArgs_from_term(space,YAP_ARG3); + IntVarArgs X4 = gecode_IntVarArgs_from_term(space,YAP_ARG4); + IntVarArgs X5 = gecode_IntVarArgs_from_term(space,YAP_ARG5); + IntVarArgs X6 = gecode_IntVarArgs_from_term(space,YAP_ARG6); + IntArgs X7 = gecode_IntArgs_from_term(YAP_ARG7); + bool X8 = gecode_bool_from_term(YAP_ARG8); + cumulatives(*space,X2,X3,X4,X5,X6,X7,X8); + return TRUE; +} + +static YAP_Bool gecode_constraint_cumulatives_171(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntArgs X2 = gecode_IntArgs_from_term(YAP_ARG2); + IntVarArgs X3 = gecode_IntVarArgs_from_term(space,YAP_ARG3); + IntArgs X4 = gecode_IntArgs_from_term(YAP_ARG4); + IntVarArgs X5 = gecode_IntVarArgs_from_term(space,YAP_ARG5); + IntArgs X6 = gecode_IntArgs_from_term(YAP_ARG6); + IntArgs X7 = gecode_IntArgs_from_term(YAP_ARG7); + bool X8 = gecode_bool_from_term(YAP_ARG8); + IntPropLevel X9 = gecode_IntPropLevel_from_term(YAP_ARG9); + cumulatives(*space,X2,X3,X4,X5,X6,X7,X8,X9); + return TRUE; +} + +static YAP_Bool gecode_constraint_cumulatives_173(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntArgs X2 = gecode_IntArgs_from_term(YAP_ARG2); + IntVarArgs X3 = gecode_IntVarArgs_from_term(space,YAP_ARG3); + IntArgs X4 = gecode_IntArgs_from_term(YAP_ARG4); + IntVarArgs X5 = gecode_IntVarArgs_from_term(space,YAP_ARG5); + IntVarArgs X6 = gecode_IntVarArgs_from_term(space,YAP_ARG6); + IntArgs X7 = gecode_IntArgs_from_term(YAP_ARG7); + bool X8 = gecode_bool_from_term(YAP_ARG8); + IntPropLevel X9 = gecode_IntPropLevel_from_term(YAP_ARG9); + cumulatives(*space,X2,X3,X4,X5,X6,X7,X8,X9); + return TRUE; +} + +static YAP_Bool gecode_constraint_cumulatives_175(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntArgs X2 = gecode_IntArgs_from_term(YAP_ARG2); + IntVarArgs X3 = gecode_IntVarArgs_from_term(space,YAP_ARG3); + IntVarArgs X4 = gecode_IntVarArgs_from_term(space,YAP_ARG4); + IntVarArgs X5 = gecode_IntVarArgs_from_term(space,YAP_ARG5); + IntArgs X6 = gecode_IntArgs_from_term(YAP_ARG6); + IntArgs X7 = gecode_IntArgs_from_term(YAP_ARG7); + bool X8 = gecode_bool_from_term(YAP_ARG8); + IntPropLevel X9 = gecode_IntPropLevel_from_term(YAP_ARG9); + cumulatives(*space,X2,X3,X4,X5,X6,X7,X8,X9); + return TRUE; +} + +static YAP_Bool gecode_constraint_cumulatives_177(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntArgs X2 = gecode_IntArgs_from_term(YAP_ARG2); + IntVarArgs X3 = gecode_IntVarArgs_from_term(space,YAP_ARG3); + IntVarArgs X4 = gecode_IntVarArgs_from_term(space,YAP_ARG4); + IntVarArgs X5 = gecode_IntVarArgs_from_term(space,YAP_ARG5); + IntVarArgs X6 = gecode_IntVarArgs_from_term(space,YAP_ARG6); + IntArgs X7 = gecode_IntArgs_from_term(YAP_ARG7); + bool X8 = gecode_bool_from_term(YAP_ARG8); + IntPropLevel X9 = gecode_IntPropLevel_from_term(YAP_ARG9); + cumulatives(*space,X2,X3,X4,X5,X6,X7,X8,X9); + return TRUE; +} + +static YAP_Bool gecode_constraint_cumulatives_179(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVarArgs X2 = gecode_IntVarArgs_from_term(space,YAP_ARG2); + IntVarArgs X3 = gecode_IntVarArgs_from_term(space,YAP_ARG3); + IntArgs X4 = gecode_IntArgs_from_term(YAP_ARG4); + IntVarArgs X5 = gecode_IntVarArgs_from_term(space,YAP_ARG5); + IntArgs X6 = gecode_IntArgs_from_term(YAP_ARG6); + IntArgs X7 = gecode_IntArgs_from_term(YAP_ARG7); + bool X8 = gecode_bool_from_term(YAP_ARG8); + IntPropLevel X9 = gecode_IntPropLevel_from_term(YAP_ARG9); + cumulatives(*space,X2,X3,X4,X5,X6,X7,X8,X9); + return TRUE; +} + +static YAP_Bool gecode_constraint_cumulatives_181(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVarArgs X2 = gecode_IntVarArgs_from_term(space,YAP_ARG2); + IntVarArgs X3 = gecode_IntVarArgs_from_term(space,YAP_ARG3); + IntArgs X4 = gecode_IntArgs_from_term(YAP_ARG4); + IntVarArgs X5 = gecode_IntVarArgs_from_term(space,YAP_ARG5); + IntVarArgs X6 = gecode_IntVarArgs_from_term(space,YAP_ARG6); + IntArgs X7 = gecode_IntArgs_from_term(YAP_ARG7); + bool X8 = gecode_bool_from_term(YAP_ARG8); + IntPropLevel X9 = gecode_IntPropLevel_from_term(YAP_ARG9); + cumulatives(*space,X2,X3,X4,X5,X6,X7,X8,X9); + return TRUE; +} + +static YAP_Bool gecode_constraint_cumulatives_183(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVarArgs X2 = gecode_IntVarArgs_from_term(space,YAP_ARG2); + IntVarArgs X3 = gecode_IntVarArgs_from_term(space,YAP_ARG3); + IntVarArgs X4 = gecode_IntVarArgs_from_term(space,YAP_ARG4); + IntVarArgs X5 = gecode_IntVarArgs_from_term(space,YAP_ARG5); + IntArgs X6 = gecode_IntArgs_from_term(YAP_ARG6); + IntArgs X7 = gecode_IntArgs_from_term(YAP_ARG7); + bool X8 = gecode_bool_from_term(YAP_ARG8); + IntPropLevel X9 = gecode_IntPropLevel_from_term(YAP_ARG9); + cumulatives(*space,X2,X3,X4,X5,X6,X7,X8,X9); + return TRUE; +} + +static YAP_Bool gecode_constraint_cumulatives_185(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVarArgs X2 = gecode_IntVarArgs_from_term(space,YAP_ARG2); + IntVarArgs X3 = gecode_IntVarArgs_from_term(space,YAP_ARG3); + IntVarArgs X4 = gecode_IntVarArgs_from_term(space,YAP_ARG4); + IntVarArgs X5 = gecode_IntVarArgs_from_term(space,YAP_ARG5); + IntVarArgs X6 = gecode_IntVarArgs_from_term(space,YAP_ARG6); + IntArgs X7 = gecode_IntArgs_from_term(YAP_ARG7); + bool X8 = gecode_bool_from_term(YAP_ARG8); + IntPropLevel X9 = gecode_IntPropLevel_from_term(YAP_ARG9); + cumulatives(*space,X2,X3,X4,X5,X6,X7,X8,X9); + return TRUE; +} + +static YAP_Bool gecode_constraint_distinct_186(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + BoolVarArgs X2 = gecode_BoolVarArgs_from_term(space,YAP_ARG2); + IntVarArgs X3 = gecode_IntVarArgs_from_term(space,YAP_ARG3); + distinct(*space,X2,X3); + return TRUE; +} + +static YAP_Bool gecode_constraint_distinct_188(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntArgs X2 = gecode_IntArgs_from_term(YAP_ARG2); + IntVarArgs X3 = gecode_IntVarArgs_from_term(space,YAP_ARG3); + distinct(*space,X2,X3); + return TRUE; +} + +static YAP_Bool gecode_constraint_distinct_191(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVarArgs X2 = gecode_IntVarArgs_from_term(space,YAP_ARG2); + IntPropLevel X3 = gecode_IntPropLevel_from_term(YAP_ARG3); + distinct(*space,X2,X3); + return TRUE; +} + +static YAP_Bool gecode_constraint_distinct_192(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVarArgs X2 = gecode_IntVarArgs_from_term(space,YAP_ARG2); + int X3 = gecode_int_from_term(YAP_ARG3); + distinct(*space,X2,X3); + return TRUE; +} + +static YAP_Bool gecode_constraint_distinct_187(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + BoolVarArgs X2 = gecode_BoolVarArgs_from_term(space,YAP_ARG2); + IntVarArgs X3 = gecode_IntVarArgs_from_term(space,YAP_ARG3); + IntPropLevel X4 = gecode_IntPropLevel_from_term(YAP_ARG4); + distinct(*space,X2,X3,X4); + return TRUE; +} + +static YAP_Bool gecode_constraint_distinct_189(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntArgs X2 = gecode_IntArgs_from_term(YAP_ARG2); + IntVarArgs X3 = gecode_IntVarArgs_from_term(space,YAP_ARG3); + IntPropLevel X4 = gecode_IntPropLevel_from_term(YAP_ARG4); + distinct(*space,X2,X3,X4); + return TRUE; +} + +static YAP_Bool gecode_constraint_distinct_193(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVarArgs X2 = gecode_IntVarArgs_from_term(space,YAP_ARG2); + int X3 = gecode_int_from_term(YAP_ARG3); + IntPropLevel X4 = gecode_IntPropLevel_from_term(YAP_ARG4); + distinct(*space,X2,X3,X4); + return TRUE; +} + +static YAP_Bool gecode_constraint_distinct_190(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVarArgs X2 = gecode_IntVarArgs_from_term(space,YAP_ARG2); + distinct(*space,X2); + return TRUE; +} + +static YAP_Bool gecode_constraint_div_194(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + FloatVar X2 = gecode_FloatVar_from_term(space,YAP_ARG2); + FloatVar X3 = gecode_FloatVar_from_term(space,YAP_ARG3); + FloatVar X4 = gecode_FloatVar_from_term(space,YAP_ARG4); + div(*space,X2,X3,X4); + return TRUE; +} + +static YAP_Bool gecode_constraint_div_195(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVar X2 = gecode_IntVar_from_term(space,YAP_ARG2); + IntVar X3 = gecode_IntVar_from_term(space,YAP_ARG3); + IntVar X4 = gecode_IntVar_from_term(space,YAP_ARG4); + div(*space,X2,X3,X4); + return TRUE; +} + +static YAP_Bool gecode_constraint_div_196(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVar X2 = gecode_IntVar_from_term(space,YAP_ARG2); + IntVar X3 = gecode_IntVar_from_term(space,YAP_ARG3); + IntVar X4 = gecode_IntVar_from_term(space,YAP_ARG4); + IntPropLevel X5 = gecode_IntPropLevel_from_term(YAP_ARG5); + div(*space,X2,X3,X4,X5); + return TRUE; +} + +static YAP_Bool gecode_constraint_divmod_197(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVar X2 = gecode_IntVar_from_term(space,YAP_ARG2); + IntVar X3 = gecode_IntVar_from_term(space,YAP_ARG3); + IntVar X4 = gecode_IntVar_from_term(space,YAP_ARG4); + IntVar X5 = gecode_IntVar_from_term(space,YAP_ARG5); + divmod(*space,X2,X3,X4,X5); + return TRUE; +} + +static YAP_Bool gecode_constraint_divmod_198(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVar X2 = gecode_IntVar_from_term(space,YAP_ARG2); + IntVar X3 = gecode_IntVar_from_term(space,YAP_ARG3); + IntVar X4 = gecode_IntVar_from_term(space,YAP_ARG4); + IntVar X5 = gecode_IntVar_from_term(space,YAP_ARG5); + IntPropLevel X6 = gecode_IntPropLevel_from_term(YAP_ARG6); + divmod(*space,X2,X3,X4,X5,X6); + return TRUE; +} + +static YAP_Bool gecode_constraint_dom_199(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + BoolVar X2 = gecode_BoolVar_from_term(space,YAP_ARG2); + BoolVar X3 = gecode_BoolVar_from_term(space,YAP_ARG3); + dom(*space,X2,X3); + return TRUE; +} + +static YAP_Bool gecode_constraint_dom_203(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + FloatVar X2 = gecode_FloatVar_from_term(space,YAP_ARG2); + FloatVal X3 = gecode_FloatVal_from_term(YAP_ARG3); + dom(*space,X2,X3); + return TRUE; +} + +static YAP_Bool gecode_constraint_dom_205(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + FloatVar X2 = gecode_FloatVar_from_term(space,YAP_ARG2); + FloatVar X3 = gecode_FloatVar_from_term(space,YAP_ARG3); + dom(*space,X2,X3); + return TRUE; +} + +static YAP_Bool gecode_constraint_dom_206(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVar X2 = gecode_IntVar_from_term(space,YAP_ARG2); + IntVar X3 = gecode_IntVar_from_term(space,YAP_ARG3); + dom(*space,X2,X3); + return TRUE; +} + +static YAP_Bool gecode_constraint_dom_208(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVar X2 = gecode_IntVar_from_term(space,YAP_ARG2); + IntSet X3 = gecode_IntSet_from_term(YAP_ARG3); + dom(*space,X2,X3); + return TRUE; +} + +static YAP_Bool gecode_constraint_dom_212(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVar X2 = gecode_IntVar_from_term(space,YAP_ARG2); + int X3 = gecode_int_from_term(YAP_ARG3); + dom(*space,X2,X3); + return TRUE; +} + +static YAP_Bool gecode_constraint_dom_226(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + SetVar X2 = gecode_SetVar_from_term(space,YAP_ARG2); + SetVar X3 = gecode_SetVar_from_term(space,YAP_ARG3); + dom(*space,X2,X3); + return TRUE; +} + +static YAP_Bool gecode_constraint_dom_227(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + BoolVarArgs X2 = gecode_BoolVarArgs_from_term(space,YAP_ARG2); + BoolVarArgs X3 = gecode_BoolVarArgs_from_term(space,YAP_ARG3); + dom(*space,X2,X3); + return TRUE; +} + +static YAP_Bool gecode_constraint_dom_230(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + FloatVarArgs X2 = gecode_FloatVarArgs_from_term(space,YAP_ARG2); + FloatVal X3 = gecode_FloatVal_from_term(YAP_ARG3); + dom(*space,X2,X3); + return TRUE; +} + +static YAP_Bool gecode_constraint_dom_231(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + FloatVarArgs X2 = gecode_FloatVarArgs_from_term(space,YAP_ARG2); + FloatVarArgs X3 = gecode_FloatVarArgs_from_term(space,YAP_ARG3); + dom(*space,X2,X3); + return TRUE; +} + +static YAP_Bool gecode_constraint_dom_232(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVarArgs X2 = gecode_IntVarArgs_from_term(space,YAP_ARG2); + IntSet X3 = gecode_IntSet_from_term(YAP_ARG3); + dom(*space,X2,X3); + return TRUE; +} + +static YAP_Bool gecode_constraint_dom_234(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVarArgs X2 = gecode_IntVarArgs_from_term(space,YAP_ARG2); + IntVarArgs X3 = gecode_IntVarArgs_from_term(space,YAP_ARG3); + dom(*space,X2,X3); + return TRUE; +} + +static YAP_Bool gecode_constraint_dom_236(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVarArgs X2 = gecode_IntVarArgs_from_term(space,YAP_ARG2); + int X3 = gecode_int_from_term(YAP_ARG3); + dom(*space,X2,X3); + return TRUE; +} + +static YAP_Bool gecode_constraint_dom_243(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + SetVarArgs X2 = gecode_SetVarArgs_from_term(space,YAP_ARG2); + SetVarArgs X3 = gecode_SetVarArgs_from_term(space,YAP_ARG3); + dom(*space,X2,X3); + return TRUE; +} + +static YAP_Bool gecode_constraint_dom_200(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + BoolVar X2 = gecode_BoolVar_from_term(space,YAP_ARG2); + BoolVar X3 = gecode_BoolVar_from_term(space,YAP_ARG3); + IntPropLevel X4 = gecode_IntPropLevel_from_term(YAP_ARG4); + dom(*space,X2,X3,X4); + return TRUE; +} + +static YAP_Bool gecode_constraint_dom_201(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + FloatVar X2 = gecode_FloatVar_from_term(space,YAP_ARG2); + FloatNum X3 = gecode_FloatNum_from_term(YAP_ARG3); + FloatNum X4 = gecode_FloatNum_from_term(YAP_ARG4); + dom(*space,X2,X3,X4); + return TRUE; +} + +static YAP_Bool gecode_constraint_dom_204(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + FloatVar X2 = gecode_FloatVar_from_term(space,YAP_ARG2); + FloatVal X3 = gecode_FloatVal_from_term(YAP_ARG3); + Reify X4 = gecode_Reify_from_term(YAP_ARG4); + dom(*space,X2,X3,X4); + return TRUE; +} + +static YAP_Bool gecode_constraint_dom_207(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVar X2 = gecode_IntVar_from_term(space,YAP_ARG2); + IntVar X3 = gecode_IntVar_from_term(space,YAP_ARG3); + IntPropLevel X4 = gecode_IntPropLevel_from_term(YAP_ARG4); + dom(*space,X2,X3,X4); + return TRUE; +} + +static YAP_Bool gecode_constraint_dom_209(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVar X2 = gecode_IntVar_from_term(space,YAP_ARG2); + IntSet X3 = gecode_IntSet_from_term(YAP_ARG3); + IntPropLevel X4 = gecode_IntPropLevel_from_term(YAP_ARG4); + dom(*space,X2,X3,X4); + return TRUE; +} + +static YAP_Bool gecode_constraint_dom_210(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVar X2 = gecode_IntVar_from_term(space,YAP_ARG2); + IntSet X3 = gecode_IntSet_from_term(YAP_ARG3); + Reify X4 = gecode_Reify_from_term(YAP_ARG4); + dom(*space,X2,X3,X4); + return TRUE; +} + +static YAP_Bool gecode_constraint_dom_213(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVar X2 = gecode_IntVar_from_term(space,YAP_ARG2); + int X3 = gecode_int_from_term(YAP_ARG3); + IntPropLevel X4 = gecode_IntPropLevel_from_term(YAP_ARG4); + dom(*space,X2,X3,X4); + return TRUE; +} + +static YAP_Bool gecode_constraint_dom_214(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVar X2 = gecode_IntVar_from_term(space,YAP_ARG2); + int X3 = gecode_int_from_term(YAP_ARG3); + Reify X4 = gecode_Reify_from_term(YAP_ARG4); + dom(*space,X2,X3,X4); + return TRUE; +} + +static YAP_Bool gecode_constraint_dom_216(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVar X2 = gecode_IntVar_from_term(space,YAP_ARG2); + int X3 = gecode_int_from_term(YAP_ARG3); + int X4 = gecode_int_from_term(YAP_ARG4); + dom(*space,X2,X3,X4); + return TRUE; +} + +static YAP_Bool gecode_constraint_dom_220(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + SetVar X2 = gecode_SetVar_from_term(space,YAP_ARG2); + SetRelType X3 = gecode_SetRelType_from_term(YAP_ARG3); + IntSet X4 = gecode_IntSet_from_term(YAP_ARG4); + dom(*space,X2,X3,X4); + return TRUE; +} + +static YAP_Bool gecode_constraint_dom_222(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + SetVar X2 = gecode_SetVar_from_term(space,YAP_ARG2); + SetRelType X3 = gecode_SetRelType_from_term(YAP_ARG3); + int X4 = gecode_int_from_term(YAP_ARG4); + dom(*space,X2,X3,X4); + return TRUE; +} + +static YAP_Bool gecode_constraint_dom_228(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + BoolVarArgs X2 = gecode_BoolVarArgs_from_term(space,YAP_ARG2); + BoolVarArgs X3 = gecode_BoolVarArgs_from_term(space,YAP_ARG3); + IntPropLevel X4 = gecode_IntPropLevel_from_term(YAP_ARG4); + dom(*space,X2,X3,X4); + return TRUE; +} + +static YAP_Bool gecode_constraint_dom_229(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + FloatVarArgs X2 = gecode_FloatVarArgs_from_term(space,YAP_ARG2); + FloatNum X3 = gecode_FloatNum_from_term(YAP_ARG3); + FloatNum X4 = gecode_FloatNum_from_term(YAP_ARG4); + dom(*space,X2,X3,X4); + return TRUE; +} + +static YAP_Bool gecode_constraint_dom_233(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVarArgs X2 = gecode_IntVarArgs_from_term(space,YAP_ARG2); + IntSet X3 = gecode_IntSet_from_term(YAP_ARG3); + IntPropLevel X4 = gecode_IntPropLevel_from_term(YAP_ARG4); + dom(*space,X2,X3,X4); + return TRUE; +} + +static YAP_Bool gecode_constraint_dom_235(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVarArgs X2 = gecode_IntVarArgs_from_term(space,YAP_ARG2); + IntVarArgs X3 = gecode_IntVarArgs_from_term(space,YAP_ARG3); + IntPropLevel X4 = gecode_IntPropLevel_from_term(YAP_ARG4); + dom(*space,X2,X3,X4); + return TRUE; +} + +static YAP_Bool gecode_constraint_dom_237(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVarArgs X2 = gecode_IntVarArgs_from_term(space,YAP_ARG2); + int X3 = gecode_int_from_term(YAP_ARG3); + IntPropLevel X4 = gecode_IntPropLevel_from_term(YAP_ARG4); + dom(*space,X2,X3,X4); + return TRUE; +} + +static YAP_Bool gecode_constraint_dom_238(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVarArgs X2 = gecode_IntVarArgs_from_term(space,YAP_ARG2); + int X3 = gecode_int_from_term(YAP_ARG3); + int X4 = gecode_int_from_term(YAP_ARG4); + dom(*space,X2,X3,X4); + return TRUE; +} + +static YAP_Bool gecode_constraint_dom_240(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + SetVarArgs X2 = gecode_SetVarArgs_from_term(space,YAP_ARG2); + SetRelType X3 = gecode_SetRelType_from_term(YAP_ARG3); + IntSet X4 = gecode_IntSet_from_term(YAP_ARG4); + dom(*space,X2,X3,X4); + return TRUE; +} + +static YAP_Bool gecode_constraint_dom_241(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + SetVarArgs X2 = gecode_SetVarArgs_from_term(space,YAP_ARG2); + SetRelType X3 = gecode_SetRelType_from_term(YAP_ARG3); + int X4 = gecode_int_from_term(YAP_ARG4); + dom(*space,X2,X3,X4); + return TRUE; +} + +static YAP_Bool gecode_constraint_dom_202(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + FloatVar X2 = gecode_FloatVar_from_term(space,YAP_ARG2); + FloatNum X3 = gecode_FloatNum_from_term(YAP_ARG3); + FloatNum X4 = gecode_FloatNum_from_term(YAP_ARG4); + Reify X5 = gecode_Reify_from_term(YAP_ARG5); + dom(*space,X2,X3,X4,X5); + return TRUE; +} + +static YAP_Bool gecode_constraint_dom_211(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVar X2 = gecode_IntVar_from_term(space,YAP_ARG2); + IntSet X3 = gecode_IntSet_from_term(YAP_ARG3); + Reify X4 = gecode_Reify_from_term(YAP_ARG4); + IntPropLevel X5 = gecode_IntPropLevel_from_term(YAP_ARG5); + dom(*space,X2,X3,X4,X5); + return TRUE; +} + +static YAP_Bool gecode_constraint_dom_215(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVar X2 = gecode_IntVar_from_term(space,YAP_ARG2); + int X3 = gecode_int_from_term(YAP_ARG3); + Reify X4 = gecode_Reify_from_term(YAP_ARG4); + IntPropLevel X5 = gecode_IntPropLevel_from_term(YAP_ARG5); + dom(*space,X2,X3,X4,X5); + return TRUE; +} + +static YAP_Bool gecode_constraint_dom_217(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVar X2 = gecode_IntVar_from_term(space,YAP_ARG2); + int X3 = gecode_int_from_term(YAP_ARG3); + int X4 = gecode_int_from_term(YAP_ARG4); + IntPropLevel X5 = gecode_IntPropLevel_from_term(YAP_ARG5); + dom(*space,X2,X3,X4,X5); + return TRUE; +} + +static YAP_Bool gecode_constraint_dom_218(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVar X2 = gecode_IntVar_from_term(space,YAP_ARG2); + int X3 = gecode_int_from_term(YAP_ARG3); + int X4 = gecode_int_from_term(YAP_ARG4); + Reify X5 = gecode_Reify_from_term(YAP_ARG5); + dom(*space,X2,X3,X4,X5); + return TRUE; +} + +static YAP_Bool gecode_constraint_dom_221(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + SetVar X2 = gecode_SetVar_from_term(space,YAP_ARG2); + SetRelType X3 = gecode_SetRelType_from_term(YAP_ARG3); + IntSet X4 = gecode_IntSet_from_term(YAP_ARG4); + Reify X5 = gecode_Reify_from_term(YAP_ARG5); + dom(*space,X2,X3,X4,X5); + return TRUE; +} + +static YAP_Bool gecode_constraint_dom_223(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + SetVar X2 = gecode_SetVar_from_term(space,YAP_ARG2); + SetRelType X3 = gecode_SetRelType_from_term(YAP_ARG3); + int X4 = gecode_int_from_term(YAP_ARG4); + Reify X5 = gecode_Reify_from_term(YAP_ARG5); + dom(*space,X2,X3,X4,X5); + return TRUE; +} + +static YAP_Bool gecode_constraint_dom_224(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + SetVar X2 = gecode_SetVar_from_term(space,YAP_ARG2); + SetRelType X3 = gecode_SetRelType_from_term(YAP_ARG3); + int X4 = gecode_int_from_term(YAP_ARG4); + int X5 = gecode_int_from_term(YAP_ARG5); + dom(*space,X2,X3,X4,X5); + return TRUE; +} + +static YAP_Bool gecode_constraint_dom_239(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVarArgs X2 = gecode_IntVarArgs_from_term(space,YAP_ARG2); + int X3 = gecode_int_from_term(YAP_ARG3); + int X4 = gecode_int_from_term(YAP_ARG4); + IntPropLevel X5 = gecode_IntPropLevel_from_term(YAP_ARG5); + dom(*space,X2,X3,X4,X5); + return TRUE; +} + +static YAP_Bool gecode_constraint_dom_242(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + SetVarArgs X2 = gecode_SetVarArgs_from_term(space,YAP_ARG2); + SetRelType X3 = gecode_SetRelType_from_term(YAP_ARG3); + int X4 = gecode_int_from_term(YAP_ARG4); + int X5 = gecode_int_from_term(YAP_ARG5); + dom(*space,X2,X3,X4,X5); + return TRUE; +} + +static YAP_Bool gecode_constraint_dom_219(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVar X2 = gecode_IntVar_from_term(space,YAP_ARG2); + int X3 = gecode_int_from_term(YAP_ARG3); + int X4 = gecode_int_from_term(YAP_ARG4); + Reify X5 = gecode_Reify_from_term(YAP_ARG5); + IntPropLevel X6 = gecode_IntPropLevel_from_term(YAP_ARG6); + dom(*space,X2,X3,X4,X5,X6); + return TRUE; +} + +static YAP_Bool gecode_constraint_dom_225(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + SetVar X2 = gecode_SetVar_from_term(space,YAP_ARG2); + SetRelType X3 = gecode_SetRelType_from_term(YAP_ARG3); + int X4 = gecode_int_from_term(YAP_ARG4); + int X5 = gecode_int_from_term(YAP_ARG5); + Reify X6 = gecode_Reify_from_term(YAP_ARG6); + dom(*space,X2,X3,X4,X5,X6); + return TRUE; +} + +static YAP_Bool gecode_constraint_element_244(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntArgs X2 = gecode_IntArgs_from_term(YAP_ARG2); + IntVar X3 = gecode_IntVar_from_term(space,YAP_ARG3); + BoolVar X4 = gecode_BoolVar_from_term(space,YAP_ARG4); + element(*space,X2,X3,X4); + return TRUE; +} + +static YAP_Bool gecode_constraint_element_246(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntArgs X2 = gecode_IntArgs_from_term(YAP_ARG2); + IntVar X3 = gecode_IntVar_from_term(space,YAP_ARG3); + IntVar X4 = gecode_IntVar_from_term(space,YAP_ARG4); + element(*space,X2,X3,X4); + return TRUE; +} + +static YAP_Bool gecode_constraint_element_248(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntArgs X2 = gecode_IntArgs_from_term(YAP_ARG2); + IntVar X3 = gecode_IntVar_from_term(space,YAP_ARG3); + int X4 = gecode_int_from_term(YAP_ARG4); + element(*space,X2,X3,X4); + return TRUE; +} + +static YAP_Bool gecode_constraint_element_254(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + BoolVarArgs X2 = gecode_BoolVarArgs_from_term(space,YAP_ARG2); + IntVar X3 = gecode_IntVar_from_term(space,YAP_ARG3); + BoolVar X4 = gecode_BoolVar_from_term(space,YAP_ARG4); + element(*space,X2,X3,X4); + return TRUE; +} + +static YAP_Bool gecode_constraint_element_256(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + BoolVarArgs X2 = gecode_BoolVarArgs_from_term(space,YAP_ARG2); + IntVar X3 = gecode_IntVar_from_term(space,YAP_ARG3); + int X4 = gecode_int_from_term(YAP_ARG4); + element(*space,X2,X3,X4); + return TRUE; +} + +static YAP_Bool gecode_constraint_element_260(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVarArgs X2 = gecode_IntVarArgs_from_term(space,YAP_ARG2); + IntVar X3 = gecode_IntVar_from_term(space,YAP_ARG3); + IntVar X4 = gecode_IntVar_from_term(space,YAP_ARG4); + element(*space,X2,X3,X4); + return TRUE; +} + +static YAP_Bool gecode_constraint_element_262(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVarArgs X2 = gecode_IntVarArgs_from_term(space,YAP_ARG2); + IntVar X3 = gecode_IntVar_from_term(space,YAP_ARG3); + int X4 = gecode_int_from_term(YAP_ARG4); + element(*space,X2,X3,X4); + return TRUE; +} + +static YAP_Bool gecode_constraint_element_245(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntArgs X2 = gecode_IntArgs_from_term(YAP_ARG2); + IntVar X3 = gecode_IntVar_from_term(space,YAP_ARG3); + BoolVar X4 = gecode_BoolVar_from_term(space,YAP_ARG4); + IntPropLevel X5 = gecode_IntPropLevel_from_term(YAP_ARG5); + element(*space,X2,X3,X4,X5); + return TRUE; +} + +static YAP_Bool gecode_constraint_element_247(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntArgs X2 = gecode_IntArgs_from_term(YAP_ARG2); + IntVar X3 = gecode_IntVar_from_term(space,YAP_ARG3); + IntVar X4 = gecode_IntVar_from_term(space,YAP_ARG4); + IntPropLevel X5 = gecode_IntPropLevel_from_term(YAP_ARG5); + element(*space,X2,X3,X4,X5); + return TRUE; +} + +static YAP_Bool gecode_constraint_element_249(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntArgs X2 = gecode_IntArgs_from_term(YAP_ARG2); + IntVar X3 = gecode_IntVar_from_term(space,YAP_ARG3); + int X4 = gecode_int_from_term(YAP_ARG4); + IntPropLevel X5 = gecode_IntPropLevel_from_term(YAP_ARG5); + element(*space,X2,X3,X4,X5); + return TRUE; +} + +static YAP_Bool gecode_constraint_element_255(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + BoolVarArgs X2 = gecode_BoolVarArgs_from_term(space,YAP_ARG2); + IntVar X3 = gecode_IntVar_from_term(space,YAP_ARG3); + BoolVar X4 = gecode_BoolVar_from_term(space,YAP_ARG4); + IntPropLevel X5 = gecode_IntPropLevel_from_term(YAP_ARG5); + element(*space,X2,X3,X4,X5); + return TRUE; +} + +static YAP_Bool gecode_constraint_element_257(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + BoolVarArgs X2 = gecode_BoolVarArgs_from_term(space,YAP_ARG2); + IntVar X3 = gecode_IntVar_from_term(space,YAP_ARG3); + int X4 = gecode_int_from_term(YAP_ARG4); + IntPropLevel X5 = gecode_IntPropLevel_from_term(YAP_ARG5); + element(*space,X2,X3,X4,X5); + return TRUE; +} + +static YAP_Bool gecode_constraint_element_261(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVarArgs X2 = gecode_IntVarArgs_from_term(space,YAP_ARG2); + IntVar X3 = gecode_IntVar_from_term(space,YAP_ARG3); + IntVar X4 = gecode_IntVar_from_term(space,YAP_ARG4); + IntPropLevel X5 = gecode_IntPropLevel_from_term(YAP_ARG5); + element(*space,X2,X3,X4,X5); + return TRUE; +} + +static YAP_Bool gecode_constraint_element_263(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVarArgs X2 = gecode_IntVarArgs_from_term(space,YAP_ARG2); + IntVar X3 = gecode_IntVar_from_term(space,YAP_ARG3); + int X4 = gecode_int_from_term(YAP_ARG4); + IntPropLevel X5 = gecode_IntPropLevel_from_term(YAP_ARG5); + element(*space,X2,X3,X4,X5); + return TRUE; +} + +static YAP_Bool gecode_constraint_element_250(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntArgs X2 = gecode_IntArgs_from_term(YAP_ARG2); + IntVar X3 = gecode_IntVar_from_term(space,YAP_ARG3); + int X4 = gecode_int_from_term(YAP_ARG4); + IntVar X5 = gecode_IntVar_from_term(space,YAP_ARG5); + int X6 = gecode_int_from_term(YAP_ARG6); + BoolVar X7 = gecode_BoolVar_from_term(space,YAP_ARG7); + element(*space,X2,X3,X4,X5,X6,X7); + return TRUE; +} + +static YAP_Bool gecode_constraint_element_252(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntArgs X2 = gecode_IntArgs_from_term(YAP_ARG2); + IntVar X3 = gecode_IntVar_from_term(space,YAP_ARG3); + int X4 = gecode_int_from_term(YAP_ARG4); + IntVar X5 = gecode_IntVar_from_term(space,YAP_ARG5); + int X6 = gecode_int_from_term(YAP_ARG6); + IntVar X7 = gecode_IntVar_from_term(space,YAP_ARG7); + element(*space,X2,X3,X4,X5,X6,X7); + return TRUE; +} + +static YAP_Bool gecode_constraint_element_258(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + BoolVarArgs X2 = gecode_BoolVarArgs_from_term(space,YAP_ARG2); + IntVar X3 = gecode_IntVar_from_term(space,YAP_ARG3); + int X4 = gecode_int_from_term(YAP_ARG4); + IntVar X5 = gecode_IntVar_from_term(space,YAP_ARG5); + int X6 = gecode_int_from_term(YAP_ARG6); + BoolVar X7 = gecode_BoolVar_from_term(space,YAP_ARG7); + element(*space,X2,X3,X4,X5,X6,X7); + return TRUE; +} + +static YAP_Bool gecode_constraint_element_264(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVarArgs X2 = gecode_IntVarArgs_from_term(space,YAP_ARG2); + IntVar X3 = gecode_IntVar_from_term(space,YAP_ARG3); + int X4 = gecode_int_from_term(YAP_ARG4); + IntVar X5 = gecode_IntVar_from_term(space,YAP_ARG5); + int X6 = gecode_int_from_term(YAP_ARG6); + IntVar X7 = gecode_IntVar_from_term(space,YAP_ARG7); + element(*space,X2,X3,X4,X5,X6,X7); + return TRUE; +} + +static YAP_Bool gecode_constraint_element_251(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntArgs X2 = gecode_IntArgs_from_term(YAP_ARG2); + IntVar X3 = gecode_IntVar_from_term(space,YAP_ARG3); + int X4 = gecode_int_from_term(YAP_ARG4); + IntVar X5 = gecode_IntVar_from_term(space,YAP_ARG5); + int X6 = gecode_int_from_term(YAP_ARG6); + BoolVar X7 = gecode_BoolVar_from_term(space,YAP_ARG7); + IntPropLevel X8 = gecode_IntPropLevel_from_term(YAP_ARG8); + element(*space,X2,X3,X4,X5,X6,X7,X8); + return TRUE; +} + +static YAP_Bool gecode_constraint_element_253(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntArgs X2 = gecode_IntArgs_from_term(YAP_ARG2); + IntVar X3 = gecode_IntVar_from_term(space,YAP_ARG3); + int X4 = gecode_int_from_term(YAP_ARG4); + IntVar X5 = gecode_IntVar_from_term(space,YAP_ARG5); + int X6 = gecode_int_from_term(YAP_ARG6); + IntVar X7 = gecode_IntVar_from_term(space,YAP_ARG7); + IntPropLevel X8 = gecode_IntPropLevel_from_term(YAP_ARG8); + element(*space,X2,X3,X4,X5,X6,X7,X8); + return TRUE; +} + +static YAP_Bool gecode_constraint_element_259(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + BoolVarArgs X2 = gecode_BoolVarArgs_from_term(space,YAP_ARG2); + IntVar X3 = gecode_IntVar_from_term(space,YAP_ARG3); + int X4 = gecode_int_from_term(YAP_ARG4); + IntVar X5 = gecode_IntVar_from_term(space,YAP_ARG5); + int X6 = gecode_int_from_term(YAP_ARG6); + BoolVar X7 = gecode_BoolVar_from_term(space,YAP_ARG7); + IntPropLevel X8 = gecode_IntPropLevel_from_term(YAP_ARG8); + element(*space,X2,X3,X4,X5,X6,X7,X8); + return TRUE; +} + +static YAP_Bool gecode_constraint_element_265(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVarArgs X2 = gecode_IntVarArgs_from_term(space,YAP_ARG2); + IntVar X3 = gecode_IntVar_from_term(space,YAP_ARG3); + int X4 = gecode_int_from_term(YAP_ARG4); + IntVar X5 = gecode_IntVar_from_term(space,YAP_ARG5); + int X6 = gecode_int_from_term(YAP_ARG6); + IntVar X7 = gecode_IntVar_from_term(space,YAP_ARG7); + IntPropLevel X8 = gecode_IntPropLevel_from_term(YAP_ARG8); + element(*space,X2,X3,X4,X5,X6,X7,X8); + return TRUE; +} + +static YAP_Bool gecode_constraint_extensional_266(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + BoolVarArgs X2 = gecode_BoolVarArgs_from_term(space,YAP_ARG2); + DFA X3 = gecode_DFA_from_term(YAP_ARG3); + extensional(*space,X2,X3); + return TRUE; +} + +static YAP_Bool gecode_constraint_extensional_268(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + BoolVarArgs X2 = gecode_BoolVarArgs_from_term(space,YAP_ARG2); + TupleSet X3 = gecode_TupleSet_from_term(YAP_ARG3); + extensional(*space,X2,X3); + return TRUE; +} + +static YAP_Bool gecode_constraint_extensional_270(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVarArgs X2 = gecode_IntVarArgs_from_term(space,YAP_ARG2); + DFA X3 = gecode_DFA_from_term(YAP_ARG3); + extensional(*space,X2,X3); + return TRUE; +} + +static YAP_Bool gecode_constraint_extensional_272(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVarArgs X2 = gecode_IntVarArgs_from_term(space,YAP_ARG2); + TupleSet X3 = gecode_TupleSet_from_term(YAP_ARG3); + extensional(*space,X2,X3); + return TRUE; +} + +static YAP_Bool gecode_constraint_extensional_267(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + BoolVarArgs X2 = gecode_BoolVarArgs_from_term(space,YAP_ARG2); + DFA X3 = gecode_DFA_from_term(YAP_ARG3); + IntPropLevel X4 = gecode_IntPropLevel_from_term(YAP_ARG4); + extensional(*space,X2,X3,X4); + return TRUE; +} + +static YAP_Bool gecode_constraint_extensional_269(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + BoolVarArgs X2 = gecode_BoolVarArgs_from_term(space,YAP_ARG2); + TupleSet X3 = gecode_TupleSet_from_term(YAP_ARG3); + IntPropLevel X4 = gecode_IntPropLevel_from_term(YAP_ARG4); + extensional(*space,X2,X3,X4); + return TRUE; +} + +static YAP_Bool gecode_constraint_extensional_271(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVarArgs X2 = gecode_IntVarArgs_from_term(space,YAP_ARG2); + DFA X3 = gecode_DFA_from_term(YAP_ARG3); + IntPropLevel X4 = gecode_IntPropLevel_from_term(YAP_ARG4); + extensional(*space,X2,X3,X4); + return TRUE; +} + +static YAP_Bool gecode_constraint_extensional_273(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVarArgs X2 = gecode_IntVarArgs_from_term(space,YAP_ARG2); + TupleSet X3 = gecode_TupleSet_from_term(YAP_ARG3); + IntPropLevel X4 = gecode_IntPropLevel_from_term(YAP_ARG4); + extensional(*space,X2,X3,X4); + return TRUE; +} + +static YAP_Bool gecode_constraint_ite_274(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + BoolVar X2 = gecode_BoolVar_from_term(space,YAP_ARG2); + BoolVar X3 = gecode_BoolVar_from_term(space,YAP_ARG3); + BoolVar X4 = gecode_BoolVar_from_term(space,YAP_ARG4); + BoolVar X5 = gecode_BoolVar_from_term(space,YAP_ARG5); + ite(*space,X2,X3,X4,X5); + return TRUE; +} + +static YAP_Bool gecode_constraint_ite_276(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + BoolVar X2 = gecode_BoolVar_from_term(space,YAP_ARG2); + FloatVar X3 = gecode_FloatVar_from_term(space,YAP_ARG3); + FloatVar X4 = gecode_FloatVar_from_term(space,YAP_ARG4); + FloatVar X5 = gecode_FloatVar_from_term(space,YAP_ARG5); + ite(*space,X2,X3,X4,X5); + return TRUE; +} + +static YAP_Bool gecode_constraint_ite_277(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + BoolVar X2 = gecode_BoolVar_from_term(space,YAP_ARG2); + IntVar X3 = gecode_IntVar_from_term(space,YAP_ARG3); + IntVar X4 = gecode_IntVar_from_term(space,YAP_ARG4); + IntVar X5 = gecode_IntVar_from_term(space,YAP_ARG5); + ite(*space,X2,X3,X4,X5); + return TRUE; +} + +static YAP_Bool gecode_constraint_ite_279(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + BoolVar X2 = gecode_BoolVar_from_term(space,YAP_ARG2); + SetVar X3 = gecode_SetVar_from_term(space,YAP_ARG3); + SetVar X4 = gecode_SetVar_from_term(space,YAP_ARG4); + SetVar X5 = gecode_SetVar_from_term(space,YAP_ARG5); + ite(*space,X2,X3,X4,X5); + return TRUE; +} + +static YAP_Bool gecode_constraint_ite_275(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + BoolVar X2 = gecode_BoolVar_from_term(space,YAP_ARG2); + BoolVar X3 = gecode_BoolVar_from_term(space,YAP_ARG3); + BoolVar X4 = gecode_BoolVar_from_term(space,YAP_ARG4); + BoolVar X5 = gecode_BoolVar_from_term(space,YAP_ARG5); + IntPropLevel X6 = gecode_IntPropLevel_from_term(YAP_ARG6); + ite(*space,X2,X3,X4,X5,X6); + return TRUE; +} + +static YAP_Bool gecode_constraint_ite_278(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + BoolVar X2 = gecode_BoolVar_from_term(space,YAP_ARG2); + IntVar X3 = gecode_IntVar_from_term(space,YAP_ARG3); + IntVar X4 = gecode_IntVar_from_term(space,YAP_ARG4); + IntVar X5 = gecode_IntVar_from_term(space,YAP_ARG5); + IntPropLevel X6 = gecode_IntPropLevel_from_term(YAP_ARG6); + ite(*space,X2,X3,X4,X5,X6); + return TRUE; +} + +static YAP_Bool gecode_constraint_linear_280(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + BoolVarArgs X2 = gecode_BoolVarArgs_from_term(space,YAP_ARG2); + IntRelType X3 = gecode_IntRelType_from_term(YAP_ARG3); + IntVar X4 = gecode_IntVar_from_term(space,YAP_ARG4); + linear(*space,X2,X3,X4); + return TRUE; +} + +static YAP_Bool gecode_constraint_linear_284(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + BoolVarArgs X2 = gecode_BoolVarArgs_from_term(space,YAP_ARG2); + IntRelType X3 = gecode_IntRelType_from_term(YAP_ARG3); + int X4 = gecode_int_from_term(YAP_ARG4); + linear(*space,X2,X3,X4); + return TRUE; +} + +static YAP_Bool gecode_constraint_linear_292(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + FloatVarArgs X2 = gecode_FloatVarArgs_from_term(space,YAP_ARG2); + FloatRelType X3 = gecode_FloatRelType_from_term(YAP_ARG3); + FloatVal X4 = gecode_FloatVal_from_term(YAP_ARG4); + linear(*space,X2,X3,X4); + return TRUE; +} + +static YAP_Bool gecode_constraint_linear_294(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + FloatVarArgs X2 = gecode_FloatVarArgs_from_term(space,YAP_ARG2); + FloatRelType X3 = gecode_FloatRelType_from_term(YAP_ARG3); + FloatVar X4 = gecode_FloatVar_from_term(space,YAP_ARG4); + linear(*space,X2,X3,X4); + return TRUE; +} + +static YAP_Bool gecode_constraint_linear_312(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVarArgs X2 = gecode_IntVarArgs_from_term(space,YAP_ARG2); + IntRelType X3 = gecode_IntRelType_from_term(YAP_ARG3); + IntVar X4 = gecode_IntVar_from_term(space,YAP_ARG4); + linear(*space,X2,X3,X4); + return TRUE; +} + +static YAP_Bool gecode_constraint_linear_316(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVarArgs X2 = gecode_IntVarArgs_from_term(space,YAP_ARG2); + IntRelType X3 = gecode_IntRelType_from_term(YAP_ARG3); + int X4 = gecode_int_from_term(YAP_ARG4); + linear(*space,X2,X3,X4); + return TRUE; +} + +static YAP_Bool gecode_constraint_linear_281(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + BoolVarArgs X2 = gecode_BoolVarArgs_from_term(space,YAP_ARG2); + IntRelType X3 = gecode_IntRelType_from_term(YAP_ARG3); + IntVar X4 = gecode_IntVar_from_term(space,YAP_ARG4); + IntPropLevel X5 = gecode_IntPropLevel_from_term(YAP_ARG5); + linear(*space,X2,X3,X4,X5); + return TRUE; +} + +static YAP_Bool gecode_constraint_linear_282(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + BoolVarArgs X2 = gecode_BoolVarArgs_from_term(space,YAP_ARG2); + IntRelType X3 = gecode_IntRelType_from_term(YAP_ARG3); + IntVar X4 = gecode_IntVar_from_term(space,YAP_ARG4); + Reify X5 = gecode_Reify_from_term(YAP_ARG5); + linear(*space,X2,X3,X4,X5); + return TRUE; +} + +static YAP_Bool gecode_constraint_linear_285(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + BoolVarArgs X2 = gecode_BoolVarArgs_from_term(space,YAP_ARG2); + IntRelType X3 = gecode_IntRelType_from_term(YAP_ARG3); + int X4 = gecode_int_from_term(YAP_ARG4); + IntPropLevel X5 = gecode_IntPropLevel_from_term(YAP_ARG5); + linear(*space,X2,X3,X4,X5); + return TRUE; +} + +static YAP_Bool gecode_constraint_linear_286(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + BoolVarArgs X2 = gecode_BoolVarArgs_from_term(space,YAP_ARG2); + IntRelType X3 = gecode_IntRelType_from_term(YAP_ARG3); + int X4 = gecode_int_from_term(YAP_ARG4); + Reify X5 = gecode_Reify_from_term(YAP_ARG5); + linear(*space,X2,X3,X4,X5); + return TRUE; +} + +static YAP_Bool gecode_constraint_linear_288(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + FloatValArgs X2 = gecode_FloatValArgs_from_term(YAP_ARG2); + FloatVarArgs X3 = gecode_FloatVarArgs_from_term(space,YAP_ARG3); + FloatRelType X4 = gecode_FloatRelType_from_term(YAP_ARG4); + FloatVal X5 = gecode_FloatVal_from_term(YAP_ARG5); + linear(*space,X2,X3,X4,X5); + return TRUE; +} + +static YAP_Bool gecode_constraint_linear_290(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + FloatValArgs X2 = gecode_FloatValArgs_from_term(YAP_ARG2); + FloatVarArgs X3 = gecode_FloatVarArgs_from_term(space,YAP_ARG3); + FloatRelType X4 = gecode_FloatRelType_from_term(YAP_ARG4); + FloatVar X5 = gecode_FloatVar_from_term(space,YAP_ARG5); + linear(*space,X2,X3,X4,X5); + return TRUE; +} + +static YAP_Bool gecode_constraint_linear_293(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + FloatVarArgs X2 = gecode_FloatVarArgs_from_term(space,YAP_ARG2); + FloatRelType X3 = gecode_FloatRelType_from_term(YAP_ARG3); + FloatVal X4 = gecode_FloatVal_from_term(YAP_ARG4); + Reify X5 = gecode_Reify_from_term(YAP_ARG5); + linear(*space,X2,X3,X4,X5); + return TRUE; +} + +static YAP_Bool gecode_constraint_linear_295(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + FloatVarArgs X2 = gecode_FloatVarArgs_from_term(space,YAP_ARG2); + FloatRelType X3 = gecode_FloatRelType_from_term(YAP_ARG3); + FloatVar X4 = gecode_FloatVar_from_term(space,YAP_ARG4); + Reify X5 = gecode_Reify_from_term(YAP_ARG5); + linear(*space,X2,X3,X4,X5); + return TRUE; +} + +static YAP_Bool gecode_constraint_linear_296(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntArgs X2 = gecode_IntArgs_from_term(YAP_ARG2); + BoolVarArgs X3 = gecode_BoolVarArgs_from_term(space,YAP_ARG3); + IntRelType X4 = gecode_IntRelType_from_term(YAP_ARG4); + IntVar X5 = gecode_IntVar_from_term(space,YAP_ARG5); + linear(*space,X2,X3,X4,X5); + return TRUE; +} + +static YAP_Bool gecode_constraint_linear_300(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntArgs X2 = gecode_IntArgs_from_term(YAP_ARG2); + BoolVarArgs X3 = gecode_BoolVarArgs_from_term(space,YAP_ARG3); + IntRelType X4 = gecode_IntRelType_from_term(YAP_ARG4); + int X5 = gecode_int_from_term(YAP_ARG5); + linear(*space,X2,X3,X4,X5); + return TRUE; +} + +static YAP_Bool gecode_constraint_linear_304(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntArgs X2 = gecode_IntArgs_from_term(YAP_ARG2); + IntVarArgs X3 = gecode_IntVarArgs_from_term(space,YAP_ARG3); + IntRelType X4 = gecode_IntRelType_from_term(YAP_ARG4); + IntVar X5 = gecode_IntVar_from_term(space,YAP_ARG5); + linear(*space,X2,X3,X4,X5); + return TRUE; +} + +static YAP_Bool gecode_constraint_linear_308(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntArgs X2 = gecode_IntArgs_from_term(YAP_ARG2); + IntVarArgs X3 = gecode_IntVarArgs_from_term(space,YAP_ARG3); + IntRelType X4 = gecode_IntRelType_from_term(YAP_ARG4); + int X5 = gecode_int_from_term(YAP_ARG5); + linear(*space,X2,X3,X4,X5); + return TRUE; +} + +static YAP_Bool gecode_constraint_linear_313(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVarArgs X2 = gecode_IntVarArgs_from_term(space,YAP_ARG2); + IntRelType X3 = gecode_IntRelType_from_term(YAP_ARG3); + IntVar X4 = gecode_IntVar_from_term(space,YAP_ARG4); + IntPropLevel X5 = gecode_IntPropLevel_from_term(YAP_ARG5); + linear(*space,X2,X3,X4,X5); + return TRUE; +} + +static YAP_Bool gecode_constraint_linear_314(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVarArgs X2 = gecode_IntVarArgs_from_term(space,YAP_ARG2); + IntRelType X3 = gecode_IntRelType_from_term(YAP_ARG3); + IntVar X4 = gecode_IntVar_from_term(space,YAP_ARG4); + Reify X5 = gecode_Reify_from_term(YAP_ARG5); + linear(*space,X2,X3,X4,X5); + return TRUE; +} + +static YAP_Bool gecode_constraint_linear_317(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVarArgs X2 = gecode_IntVarArgs_from_term(space,YAP_ARG2); + IntRelType X3 = gecode_IntRelType_from_term(YAP_ARG3); + int X4 = gecode_int_from_term(YAP_ARG4); + IntPropLevel X5 = gecode_IntPropLevel_from_term(YAP_ARG5); + linear(*space,X2,X3,X4,X5); + return TRUE; +} + +static YAP_Bool gecode_constraint_linear_318(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVarArgs X2 = gecode_IntVarArgs_from_term(space,YAP_ARG2); + IntRelType X3 = gecode_IntRelType_from_term(YAP_ARG3); + int X4 = gecode_int_from_term(YAP_ARG4); + Reify X5 = gecode_Reify_from_term(YAP_ARG5); + linear(*space,X2,X3,X4,X5); + return TRUE; +} + +static YAP_Bool gecode_constraint_linear_283(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + BoolVarArgs X2 = gecode_BoolVarArgs_from_term(space,YAP_ARG2); + IntRelType X3 = gecode_IntRelType_from_term(YAP_ARG3); + IntVar X4 = gecode_IntVar_from_term(space,YAP_ARG4); + Reify X5 = gecode_Reify_from_term(YAP_ARG5); + IntPropLevel X6 = gecode_IntPropLevel_from_term(YAP_ARG6); + linear(*space,X2,X3,X4,X5,X6); + return TRUE; +} + +static YAP_Bool gecode_constraint_linear_287(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + BoolVarArgs X2 = gecode_BoolVarArgs_from_term(space,YAP_ARG2); + IntRelType X3 = gecode_IntRelType_from_term(YAP_ARG3); + int X4 = gecode_int_from_term(YAP_ARG4); + Reify X5 = gecode_Reify_from_term(YAP_ARG5); + IntPropLevel X6 = gecode_IntPropLevel_from_term(YAP_ARG6); + linear(*space,X2,X3,X4,X5,X6); + return TRUE; +} + +static YAP_Bool gecode_constraint_linear_289(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + FloatValArgs X2 = gecode_FloatValArgs_from_term(YAP_ARG2); + FloatVarArgs X3 = gecode_FloatVarArgs_from_term(space,YAP_ARG3); + FloatRelType X4 = gecode_FloatRelType_from_term(YAP_ARG4); + FloatVal X5 = gecode_FloatVal_from_term(YAP_ARG5); + Reify X6 = gecode_Reify_from_term(YAP_ARG6); + linear(*space,X2,X3,X4,X5,X6); + return TRUE; +} + +static YAP_Bool gecode_constraint_linear_291(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + FloatValArgs X2 = gecode_FloatValArgs_from_term(YAP_ARG2); + FloatVarArgs X3 = gecode_FloatVarArgs_from_term(space,YAP_ARG3); + FloatRelType X4 = gecode_FloatRelType_from_term(YAP_ARG4); + FloatVar X5 = gecode_FloatVar_from_term(space,YAP_ARG5); + Reify X6 = gecode_Reify_from_term(YAP_ARG6); + linear(*space,X2,X3,X4,X5,X6); + return TRUE; +} + +static YAP_Bool gecode_constraint_linear_297(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntArgs X2 = gecode_IntArgs_from_term(YAP_ARG2); + BoolVarArgs X3 = gecode_BoolVarArgs_from_term(space,YAP_ARG3); + IntRelType X4 = gecode_IntRelType_from_term(YAP_ARG4); + IntVar X5 = gecode_IntVar_from_term(space,YAP_ARG5); + IntPropLevel X6 = gecode_IntPropLevel_from_term(YAP_ARG6); + linear(*space,X2,X3,X4,X5,X6); + return TRUE; +} + +static YAP_Bool gecode_constraint_linear_298(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntArgs X2 = gecode_IntArgs_from_term(YAP_ARG2); + BoolVarArgs X3 = gecode_BoolVarArgs_from_term(space,YAP_ARG3); + IntRelType X4 = gecode_IntRelType_from_term(YAP_ARG4); + IntVar X5 = gecode_IntVar_from_term(space,YAP_ARG5); + Reify X6 = gecode_Reify_from_term(YAP_ARG6); + linear(*space,X2,X3,X4,X5,X6); + return TRUE; +} + +static YAP_Bool gecode_constraint_linear_301(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntArgs X2 = gecode_IntArgs_from_term(YAP_ARG2); + BoolVarArgs X3 = gecode_BoolVarArgs_from_term(space,YAP_ARG3); + IntRelType X4 = gecode_IntRelType_from_term(YAP_ARG4); + int X5 = gecode_int_from_term(YAP_ARG5); + IntPropLevel X6 = gecode_IntPropLevel_from_term(YAP_ARG6); + linear(*space,X2,X3,X4,X5,X6); + return TRUE; +} + +static YAP_Bool gecode_constraint_linear_302(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntArgs X2 = gecode_IntArgs_from_term(YAP_ARG2); + BoolVarArgs X3 = gecode_BoolVarArgs_from_term(space,YAP_ARG3); + IntRelType X4 = gecode_IntRelType_from_term(YAP_ARG4); + int X5 = gecode_int_from_term(YAP_ARG5); + Reify X6 = gecode_Reify_from_term(YAP_ARG6); + linear(*space,X2,X3,X4,X5,X6); + return TRUE; +} + +static YAP_Bool gecode_constraint_linear_305(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntArgs X2 = gecode_IntArgs_from_term(YAP_ARG2); + IntVarArgs X3 = gecode_IntVarArgs_from_term(space,YAP_ARG3); + IntRelType X4 = gecode_IntRelType_from_term(YAP_ARG4); + IntVar X5 = gecode_IntVar_from_term(space,YAP_ARG5); + IntPropLevel X6 = gecode_IntPropLevel_from_term(YAP_ARG6); + linear(*space,X2,X3,X4,X5,X6); + return TRUE; +} + +static YAP_Bool gecode_constraint_linear_306(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntArgs X2 = gecode_IntArgs_from_term(YAP_ARG2); + IntVarArgs X3 = gecode_IntVarArgs_from_term(space,YAP_ARG3); + IntRelType X4 = gecode_IntRelType_from_term(YAP_ARG4); + IntVar X5 = gecode_IntVar_from_term(space,YAP_ARG5); + Reify X6 = gecode_Reify_from_term(YAP_ARG6); + linear(*space,X2,X3,X4,X5,X6); + return TRUE; +} + +static YAP_Bool gecode_constraint_linear_309(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntArgs X2 = gecode_IntArgs_from_term(YAP_ARG2); + IntVarArgs X3 = gecode_IntVarArgs_from_term(space,YAP_ARG3); + IntRelType X4 = gecode_IntRelType_from_term(YAP_ARG4); + int X5 = gecode_int_from_term(YAP_ARG5); + IntPropLevel X6 = gecode_IntPropLevel_from_term(YAP_ARG6); + linear(*space,X2,X3,X4,X5,X6); + return TRUE; +} + +static YAP_Bool gecode_constraint_linear_310(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntArgs X2 = gecode_IntArgs_from_term(YAP_ARG2); + IntVarArgs X3 = gecode_IntVarArgs_from_term(space,YAP_ARG3); + IntRelType X4 = gecode_IntRelType_from_term(YAP_ARG4); + int X5 = gecode_int_from_term(YAP_ARG5); + Reify X6 = gecode_Reify_from_term(YAP_ARG6); + linear(*space,X2,X3,X4,X5,X6); + return TRUE; +} + +static YAP_Bool gecode_constraint_linear_315(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVarArgs X2 = gecode_IntVarArgs_from_term(space,YAP_ARG2); + IntRelType X3 = gecode_IntRelType_from_term(YAP_ARG3); + IntVar X4 = gecode_IntVar_from_term(space,YAP_ARG4); + Reify X5 = gecode_Reify_from_term(YAP_ARG5); + IntPropLevel X6 = gecode_IntPropLevel_from_term(YAP_ARG6); + linear(*space,X2,X3,X4,X5,X6); + return TRUE; +} + +static YAP_Bool gecode_constraint_linear_319(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVarArgs X2 = gecode_IntVarArgs_from_term(space,YAP_ARG2); + IntRelType X3 = gecode_IntRelType_from_term(YAP_ARG3); + int X4 = gecode_int_from_term(YAP_ARG4); + Reify X5 = gecode_Reify_from_term(YAP_ARG5); + IntPropLevel X6 = gecode_IntPropLevel_from_term(YAP_ARG6); + linear(*space,X2,X3,X4,X5,X6); + return TRUE; +} + +static YAP_Bool gecode_constraint_linear_299(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntArgs X2 = gecode_IntArgs_from_term(YAP_ARG2); + BoolVarArgs X3 = gecode_BoolVarArgs_from_term(space,YAP_ARG3); + IntRelType X4 = gecode_IntRelType_from_term(YAP_ARG4); + IntVar X5 = gecode_IntVar_from_term(space,YAP_ARG5); + Reify X6 = gecode_Reify_from_term(YAP_ARG6); + IntPropLevel X7 = gecode_IntPropLevel_from_term(YAP_ARG7); + linear(*space,X2,X3,X4,X5,X6,X7); + return TRUE; +} + +static YAP_Bool gecode_constraint_linear_303(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntArgs X2 = gecode_IntArgs_from_term(YAP_ARG2); + BoolVarArgs X3 = gecode_BoolVarArgs_from_term(space,YAP_ARG3); + IntRelType X4 = gecode_IntRelType_from_term(YAP_ARG4); + int X5 = gecode_int_from_term(YAP_ARG5); + Reify X6 = gecode_Reify_from_term(YAP_ARG6); + IntPropLevel X7 = gecode_IntPropLevel_from_term(YAP_ARG7); + linear(*space,X2,X3,X4,X5,X6,X7); + return TRUE; +} + +static YAP_Bool gecode_constraint_linear_307(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntArgs X2 = gecode_IntArgs_from_term(YAP_ARG2); + IntVarArgs X3 = gecode_IntVarArgs_from_term(space,YAP_ARG3); + IntRelType X4 = gecode_IntRelType_from_term(YAP_ARG4); + IntVar X5 = gecode_IntVar_from_term(space,YAP_ARG5); + Reify X6 = gecode_Reify_from_term(YAP_ARG6); + IntPropLevel X7 = gecode_IntPropLevel_from_term(YAP_ARG7); + linear(*space,X2,X3,X4,X5,X6,X7); + return TRUE; +} + +static YAP_Bool gecode_constraint_linear_311(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntArgs X2 = gecode_IntArgs_from_term(YAP_ARG2); + IntVarArgs X3 = gecode_IntVarArgs_from_term(space,YAP_ARG3); + IntRelType X4 = gecode_IntRelType_from_term(YAP_ARG4); + int X5 = gecode_int_from_term(YAP_ARG5); + Reify X6 = gecode_Reify_from_term(YAP_ARG6); + IntPropLevel X7 = gecode_IntPropLevel_from_term(YAP_ARG7); + linear(*space,X2,X3,X4,X5,X6,X7); + return TRUE; +} + +static YAP_Bool gecode_constraint_max_320(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + FloatVar X2 = gecode_FloatVar_from_term(space,YAP_ARG2); + FloatVar X3 = gecode_FloatVar_from_term(space,YAP_ARG3); + FloatVar X4 = gecode_FloatVar_from_term(space,YAP_ARG4); + max(*space,X2,X3,X4); + return TRUE; +} + +static YAP_Bool gecode_constraint_max_321(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVar X2 = gecode_IntVar_from_term(space,YAP_ARG2); + IntVar X3 = gecode_IntVar_from_term(space,YAP_ARG3); + IntVar X4 = gecode_IntVar_from_term(space,YAP_ARG4); + max(*space,X2,X3,X4); + return TRUE; +} + +static YAP_Bool gecode_constraint_max_325(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVarArgs X2 = gecode_IntVarArgs_from_term(space,YAP_ARG2); + IntVar X3 = gecode_IntVar_from_term(space,YAP_ARG3); + IntPropLevel X4 = gecode_IntPropLevel_from_term(YAP_ARG4); + max(*space,X2,X3,X4); + return TRUE; +} + +static YAP_Bool gecode_constraint_max_322(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVar X2 = gecode_IntVar_from_term(space,YAP_ARG2); + IntVar X3 = gecode_IntVar_from_term(space,YAP_ARG3); + IntVar X4 = gecode_IntVar_from_term(space,YAP_ARG4); + IntPropLevel X5 = gecode_IntPropLevel_from_term(YAP_ARG5); + max(*space,X2,X3,X4,X5); + return TRUE; +} + +static YAP_Bool gecode_constraint_max_323(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + FloatVarArgs X2 = gecode_FloatVarArgs_from_term(space,YAP_ARG2); + FloatVar X3 = gecode_FloatVar_from_term(space,YAP_ARG3); + max(*space,X2,X3); + return TRUE; +} + +static YAP_Bool gecode_constraint_max_324(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVarArgs X2 = gecode_IntVarArgs_from_term(space,YAP_ARG2); + IntVar X3 = gecode_IntVar_from_term(space,YAP_ARG3); + max(*space,X2,X3); + return TRUE; +} + +static YAP_Bool gecode_constraint_member_326(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + BoolVarArgs X2 = gecode_BoolVarArgs_from_term(space,YAP_ARG2); + BoolVar X3 = gecode_BoolVar_from_term(space,YAP_ARG3); + member(*space,X2,X3); + return TRUE; +} + +static YAP_Bool gecode_constraint_member_330(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVarArgs X2 = gecode_IntVarArgs_from_term(space,YAP_ARG2); + IntVar X3 = gecode_IntVar_from_term(space,YAP_ARG3); + member(*space,X2,X3); + return TRUE; +} + +static YAP_Bool gecode_constraint_member_327(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + BoolVarArgs X2 = gecode_BoolVarArgs_from_term(space,YAP_ARG2); + BoolVar X3 = gecode_BoolVar_from_term(space,YAP_ARG3); + IntPropLevel X4 = gecode_IntPropLevel_from_term(YAP_ARG4); + member(*space,X2,X3,X4); + return TRUE; +} + +static YAP_Bool gecode_constraint_member_328(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + BoolVarArgs X2 = gecode_BoolVarArgs_from_term(space,YAP_ARG2); + BoolVar X3 = gecode_BoolVar_from_term(space,YAP_ARG3); + Reify X4 = gecode_Reify_from_term(YAP_ARG4); + member(*space,X2,X3,X4); + return TRUE; +} + +static YAP_Bool gecode_constraint_member_331(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVarArgs X2 = gecode_IntVarArgs_from_term(space,YAP_ARG2); + IntVar X3 = gecode_IntVar_from_term(space,YAP_ARG3); + IntPropLevel X4 = gecode_IntPropLevel_from_term(YAP_ARG4); + member(*space,X2,X3,X4); + return TRUE; +} + +static YAP_Bool gecode_constraint_member_332(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVarArgs X2 = gecode_IntVarArgs_from_term(space,YAP_ARG2); + IntVar X3 = gecode_IntVar_from_term(space,YAP_ARG3); + Reify X4 = gecode_Reify_from_term(YAP_ARG4); + member(*space,X2,X3,X4); + return TRUE; +} + +static YAP_Bool gecode_constraint_member_329(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + BoolVarArgs X2 = gecode_BoolVarArgs_from_term(space,YAP_ARG2); + BoolVar X3 = gecode_BoolVar_from_term(space,YAP_ARG3); + Reify X4 = gecode_Reify_from_term(YAP_ARG4); + IntPropLevel X5 = gecode_IntPropLevel_from_term(YAP_ARG5); + member(*space,X2,X3,X4,X5); + return TRUE; +} + +static YAP_Bool gecode_constraint_member_333(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVarArgs X2 = gecode_IntVarArgs_from_term(space,YAP_ARG2); + IntVar X3 = gecode_IntVar_from_term(space,YAP_ARG3); + Reify X4 = gecode_Reify_from_term(YAP_ARG4); + IntPropLevel X5 = gecode_IntPropLevel_from_term(YAP_ARG5); + member(*space,X2,X3,X4,X5); + return TRUE; +} + +static YAP_Bool gecode_constraint_min_334(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + FloatVar X2 = gecode_FloatVar_from_term(space,YAP_ARG2); + FloatVar X3 = gecode_FloatVar_from_term(space,YAP_ARG3); + FloatVar X4 = gecode_FloatVar_from_term(space,YAP_ARG4); + min(*space,X2,X3,X4); + return TRUE; +} + +static YAP_Bool gecode_constraint_min_335(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVar X2 = gecode_IntVar_from_term(space,YAP_ARG2); + IntVar X3 = gecode_IntVar_from_term(space,YAP_ARG3); + IntVar X4 = gecode_IntVar_from_term(space,YAP_ARG4); + min(*space,X2,X3,X4); + return TRUE; +} + +static YAP_Bool gecode_constraint_min_339(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVarArgs X2 = gecode_IntVarArgs_from_term(space,YAP_ARG2); + IntVar X3 = gecode_IntVar_from_term(space,YAP_ARG3); + IntPropLevel X4 = gecode_IntPropLevel_from_term(YAP_ARG4); + min(*space,X2,X3,X4); + return TRUE; +} + +static YAP_Bool gecode_constraint_min_336(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVar X2 = gecode_IntVar_from_term(space,YAP_ARG2); + IntVar X3 = gecode_IntVar_from_term(space,YAP_ARG3); + IntVar X4 = gecode_IntVar_from_term(space,YAP_ARG4); + IntPropLevel X5 = gecode_IntPropLevel_from_term(YAP_ARG5); + min(*space,X2,X3,X4,X5); + return TRUE; +} + +static YAP_Bool gecode_constraint_min_337(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + FloatVarArgs X2 = gecode_FloatVarArgs_from_term(space,YAP_ARG2); + FloatVar X3 = gecode_FloatVar_from_term(space,YAP_ARG3); + min(*space,X2,X3); + return TRUE; +} + +static YAP_Bool gecode_constraint_min_338(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVarArgs X2 = gecode_IntVarArgs_from_term(space,YAP_ARG2); + IntVar X3 = gecode_IntVar_from_term(space,YAP_ARG3); + min(*space,X2,X3); + return TRUE; +} + +static YAP_Bool gecode_constraint_mod_340(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVar X2 = gecode_IntVar_from_term(space,YAP_ARG2); + IntVar X3 = gecode_IntVar_from_term(space,YAP_ARG3); + IntVar X4 = gecode_IntVar_from_term(space,YAP_ARG4); + mod(*space,X2,X3,X4); + return TRUE; +} + +static YAP_Bool gecode_constraint_mod_341(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVar X2 = gecode_IntVar_from_term(space,YAP_ARG2); + IntVar X3 = gecode_IntVar_from_term(space,YAP_ARG3); + IntVar X4 = gecode_IntVar_from_term(space,YAP_ARG4); + IntPropLevel X5 = gecode_IntPropLevel_from_term(YAP_ARG5); + mod(*space,X2,X3,X4,X5); + return TRUE; +} + +static YAP_Bool gecode_constraint_mult_342(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + FloatVar X2 = gecode_FloatVar_from_term(space,YAP_ARG2); + FloatVar X3 = gecode_FloatVar_from_term(space,YAP_ARG3); + FloatVar X4 = gecode_FloatVar_from_term(space,YAP_ARG4); + mult(*space,X2,X3,X4); + return TRUE; +} + +static YAP_Bool gecode_constraint_mult_343(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVar X2 = gecode_IntVar_from_term(space,YAP_ARG2); + IntVar X3 = gecode_IntVar_from_term(space,YAP_ARG3); + IntVar X4 = gecode_IntVar_from_term(space,YAP_ARG4); + mult(*space,X2,X3,X4); + return TRUE; +} + +static YAP_Bool gecode_constraint_mult_344(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVar X2 = gecode_IntVar_from_term(space,YAP_ARG2); + IntVar X3 = gecode_IntVar_from_term(space,YAP_ARG3); + IntVar X4 = gecode_IntVar_from_term(space,YAP_ARG4); + IntPropLevel X5 = gecode_IntPropLevel_from_term(YAP_ARG5); + mult(*space,X2,X3,X4,X5); + return TRUE; +} + +static YAP_Bool gecode_constraint_nooverlap_345(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVarArgs X2 = gecode_IntVarArgs_from_term(space,YAP_ARG2); + IntArgs X3 = gecode_IntArgs_from_term(YAP_ARG3); + IntVarArgs X4 = gecode_IntVarArgs_from_term(space,YAP_ARG4); + IntArgs X5 = gecode_IntArgs_from_term(YAP_ARG5); + nooverlap(*space,X2,X3,X4,X5); + return TRUE; +} + +static YAP_Bool gecode_constraint_nooverlap_346(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVarArgs X2 = gecode_IntVarArgs_from_term(space,YAP_ARG2); + IntArgs X3 = gecode_IntArgs_from_term(YAP_ARG3); + IntVarArgs X4 = gecode_IntVarArgs_from_term(space,YAP_ARG4); + IntArgs X5 = gecode_IntArgs_from_term(YAP_ARG5); + IntPropLevel X6 = gecode_IntPropLevel_from_term(YAP_ARG6); + nooverlap(*space,X2,X3,X4,X5,X6); + return TRUE; +} + +static YAP_Bool gecode_constraint_nooverlap_347(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVarArgs X2 = gecode_IntVarArgs_from_term(space,YAP_ARG2); + IntArgs X3 = gecode_IntArgs_from_term(YAP_ARG3); + IntVarArgs X4 = gecode_IntVarArgs_from_term(space,YAP_ARG4); + IntArgs X5 = gecode_IntArgs_from_term(YAP_ARG5); + BoolVarArgs X6 = gecode_BoolVarArgs_from_term(space,YAP_ARG6); + nooverlap(*space,X2,X3,X4,X5,X6); + return TRUE; +} + +static YAP_Bool gecode_constraint_nooverlap_348(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVarArgs X2 = gecode_IntVarArgs_from_term(space,YAP_ARG2); + IntArgs X3 = gecode_IntArgs_from_term(YAP_ARG3); + IntVarArgs X4 = gecode_IntVarArgs_from_term(space,YAP_ARG4); + IntArgs X5 = gecode_IntArgs_from_term(YAP_ARG5); + BoolVarArgs X6 = gecode_BoolVarArgs_from_term(space,YAP_ARG6); + IntPropLevel X7 = gecode_IntPropLevel_from_term(YAP_ARG7); + nooverlap(*space,X2,X3,X4,X5,X6,X7); + return TRUE; +} + +static YAP_Bool gecode_constraint_nooverlap_349(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVarArgs X2 = gecode_IntVarArgs_from_term(space,YAP_ARG2); + IntVarArgs X3 = gecode_IntVarArgs_from_term(space,YAP_ARG3); + IntVarArgs X4 = gecode_IntVarArgs_from_term(space,YAP_ARG4); + IntVarArgs X5 = gecode_IntVarArgs_from_term(space,YAP_ARG5); + IntVarArgs X6 = gecode_IntVarArgs_from_term(space,YAP_ARG6); + IntVarArgs X7 = gecode_IntVarArgs_from_term(space,YAP_ARG7); + nooverlap(*space,X2,X3,X4,X5,X6,X7); + return TRUE; +} + +static YAP_Bool gecode_constraint_nooverlap_350(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVarArgs X2 = gecode_IntVarArgs_from_term(space,YAP_ARG2); + IntVarArgs X3 = gecode_IntVarArgs_from_term(space,YAP_ARG3); + IntVarArgs X4 = gecode_IntVarArgs_from_term(space,YAP_ARG4); + IntVarArgs X5 = gecode_IntVarArgs_from_term(space,YAP_ARG5); + IntVarArgs X6 = gecode_IntVarArgs_from_term(space,YAP_ARG6); + IntVarArgs X7 = gecode_IntVarArgs_from_term(space,YAP_ARG7); + IntPropLevel X8 = gecode_IntPropLevel_from_term(YAP_ARG8); + nooverlap(*space,X2,X3,X4,X5,X6,X7,X8); + return TRUE; +} + +static YAP_Bool gecode_constraint_nooverlap_351(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVarArgs X2 = gecode_IntVarArgs_from_term(space,YAP_ARG2); + IntVarArgs X3 = gecode_IntVarArgs_from_term(space,YAP_ARG3); + IntVarArgs X4 = gecode_IntVarArgs_from_term(space,YAP_ARG4); + IntVarArgs X5 = gecode_IntVarArgs_from_term(space,YAP_ARG5); + IntVarArgs X6 = gecode_IntVarArgs_from_term(space,YAP_ARG6); + IntVarArgs X7 = gecode_IntVarArgs_from_term(space,YAP_ARG7); + BoolVarArgs X8 = gecode_BoolVarArgs_from_term(space,YAP_ARG8); + nooverlap(*space,X2,X3,X4,X5,X6,X7,X8); + return TRUE; +} + +static YAP_Bool gecode_constraint_nooverlap_352(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVarArgs X2 = gecode_IntVarArgs_from_term(space,YAP_ARG2); + IntVarArgs X3 = gecode_IntVarArgs_from_term(space,YAP_ARG3); + IntVarArgs X4 = gecode_IntVarArgs_from_term(space,YAP_ARG4); + IntVarArgs X5 = gecode_IntVarArgs_from_term(space,YAP_ARG5); + IntVarArgs X6 = gecode_IntVarArgs_from_term(space,YAP_ARG6); + IntVarArgs X7 = gecode_IntVarArgs_from_term(space,YAP_ARG7); + BoolVarArgs X8 = gecode_BoolVarArgs_from_term(space,YAP_ARG8); + IntPropLevel X9 = gecode_IntPropLevel_from_term(YAP_ARG9); + nooverlap(*space,X2,X3,X4,X5,X6,X7,X8,X9); + return TRUE; +} + +static YAP_Bool gecode_constraint_nroot_353(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + FloatVar X2 = gecode_FloatVar_from_term(space,YAP_ARG2); + int X3 = gecode_int_from_term(YAP_ARG3); + FloatVar X4 = gecode_FloatVar_from_term(space,YAP_ARG4); + nroot(*space,X2,X3,X4); + return TRUE; +} + +static YAP_Bool gecode_constraint_nroot_354(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVar X2 = gecode_IntVar_from_term(space,YAP_ARG2); + int X3 = gecode_int_from_term(YAP_ARG3); + IntVar X4 = gecode_IntVar_from_term(space,YAP_ARG4); + nroot(*space,X2,X3,X4); + return TRUE; +} + +static YAP_Bool gecode_constraint_nroot_355(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVar X2 = gecode_IntVar_from_term(space,YAP_ARG2); + int X3 = gecode_int_from_term(YAP_ARG3); + IntVar X4 = gecode_IntVar_from_term(space,YAP_ARG4); + IntPropLevel X5 = gecode_IntPropLevel_from_term(YAP_ARG5); + nroot(*space,X2,X3,X4,X5); + return TRUE; +} + +static YAP_Bool gecode_constraint_nvalues_356(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + BoolVarArgs X2 = gecode_BoolVarArgs_from_term(space,YAP_ARG2); + IntRelType X3 = gecode_IntRelType_from_term(YAP_ARG3); + IntVar X4 = gecode_IntVar_from_term(space,YAP_ARG4); + nvalues(*space,X2,X3,X4); + return TRUE; +} + +static YAP_Bool gecode_constraint_nvalues_358(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + BoolVarArgs X2 = gecode_BoolVarArgs_from_term(space,YAP_ARG2); + IntRelType X3 = gecode_IntRelType_from_term(YAP_ARG3); + int X4 = gecode_int_from_term(YAP_ARG4); + nvalues(*space,X2,X3,X4); + return TRUE; +} + +static YAP_Bool gecode_constraint_nvalues_360(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVarArgs X2 = gecode_IntVarArgs_from_term(space,YAP_ARG2); + IntRelType X3 = gecode_IntRelType_from_term(YAP_ARG3); + IntVar X4 = gecode_IntVar_from_term(space,YAP_ARG4); + nvalues(*space,X2,X3,X4); + return TRUE; +} + +static YAP_Bool gecode_constraint_nvalues_362(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVarArgs X2 = gecode_IntVarArgs_from_term(space,YAP_ARG2); + IntRelType X3 = gecode_IntRelType_from_term(YAP_ARG3); + int X4 = gecode_int_from_term(YAP_ARG4); + nvalues(*space,X2,X3,X4); + return TRUE; +} + +static YAP_Bool gecode_constraint_nvalues_357(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + BoolVarArgs X2 = gecode_BoolVarArgs_from_term(space,YAP_ARG2); + IntRelType X3 = gecode_IntRelType_from_term(YAP_ARG3); + IntVar X4 = gecode_IntVar_from_term(space,YAP_ARG4); + IntPropLevel X5 = gecode_IntPropLevel_from_term(YAP_ARG5); + nvalues(*space,X2,X3,X4,X5); + return TRUE; +} + +static YAP_Bool gecode_constraint_nvalues_359(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + BoolVarArgs X2 = gecode_BoolVarArgs_from_term(space,YAP_ARG2); + IntRelType X3 = gecode_IntRelType_from_term(YAP_ARG3); + int X4 = gecode_int_from_term(YAP_ARG4); + IntPropLevel X5 = gecode_IntPropLevel_from_term(YAP_ARG5); + nvalues(*space,X2,X3,X4,X5); + return TRUE; +} + +static YAP_Bool gecode_constraint_nvalues_361(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVarArgs X2 = gecode_IntVarArgs_from_term(space,YAP_ARG2); + IntRelType X3 = gecode_IntRelType_from_term(YAP_ARG3); + IntVar X4 = gecode_IntVar_from_term(space,YAP_ARG4); + IntPropLevel X5 = gecode_IntPropLevel_from_term(YAP_ARG5); + nvalues(*space,X2,X3,X4,X5); + return TRUE; +} + +static YAP_Bool gecode_constraint_nvalues_363(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVarArgs X2 = gecode_IntVarArgs_from_term(space,YAP_ARG2); + IntRelType X3 = gecode_IntRelType_from_term(YAP_ARG3); + int X4 = gecode_int_from_term(YAP_ARG4); + IntPropLevel X5 = gecode_IntPropLevel_from_term(YAP_ARG5); + nvalues(*space,X2,X3,X4,X5); + return TRUE; +} + +static YAP_Bool gecode_constraint_path_364(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntArgs X2 = gecode_IntArgs_from_term(YAP_ARG2); + IntVarArgs X3 = gecode_IntVarArgs_from_term(space,YAP_ARG3); + IntVar X4 = gecode_IntVar_from_term(space,YAP_ARG4); + IntVar X5 = gecode_IntVar_from_term(space,YAP_ARG5); + IntVar X6 = gecode_IntVar_from_term(space,YAP_ARG6); + path(*space,X2,X3,X4,X5,X6); + return TRUE; +} + +static YAP_Bool gecode_constraint_path_375(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + int X2 = gecode_int_from_term(YAP_ARG2); + IntVarArgs X3 = gecode_IntVarArgs_from_term(space,YAP_ARG3); + IntVar X4 = gecode_IntVar_from_term(space,YAP_ARG4); + IntVar X5 = gecode_IntVar_from_term(space,YAP_ARG5); + IntPropLevel X6 = gecode_IntPropLevel_from_term(YAP_ARG6); + path(*space,X2,X3,X4,X5,X6); + return TRUE; +} + +static YAP_Bool gecode_constraint_path_365(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntArgs X2 = gecode_IntArgs_from_term(YAP_ARG2); + IntVarArgs X3 = gecode_IntVarArgs_from_term(space,YAP_ARG3); + IntVar X4 = gecode_IntVar_from_term(space,YAP_ARG4); + IntVar X5 = gecode_IntVar_from_term(space,YAP_ARG5); + IntVar X6 = gecode_IntVar_from_term(space,YAP_ARG6); + IntPropLevel X7 = gecode_IntPropLevel_from_term(YAP_ARG7); + path(*space,X2,X3,X4,X5,X6,X7); + return TRUE; +} + +static YAP_Bool gecode_constraint_path_366(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntArgs X2 = gecode_IntArgs_from_term(YAP_ARG2); + IntVarArgs X3 = gecode_IntVarArgs_from_term(space,YAP_ARG3); + IntVar X4 = gecode_IntVar_from_term(space,YAP_ARG4); + IntVar X5 = gecode_IntVar_from_term(space,YAP_ARG5); + IntVarArgs X6 = gecode_IntVarArgs_from_term(space,YAP_ARG6); + IntVar X7 = gecode_IntVar_from_term(space,YAP_ARG7); + path(*space,X2,X3,X4,X5,X6,X7); + return TRUE; +} + +static YAP_Bool gecode_constraint_path_368(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntArgs X2 = gecode_IntArgs_from_term(YAP_ARG2); + int X3 = gecode_int_from_term(YAP_ARG3); + IntVarArgs X4 = gecode_IntVarArgs_from_term(space,YAP_ARG4); + IntVar X5 = gecode_IntVar_from_term(space,YAP_ARG5); + IntVar X6 = gecode_IntVar_from_term(space,YAP_ARG6); + IntVar X7 = gecode_IntVar_from_term(space,YAP_ARG7); + path(*space,X2,X3,X4,X5,X6,X7); + return TRUE; +} + +static YAP_Bool gecode_constraint_path_367(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntArgs X2 = gecode_IntArgs_from_term(YAP_ARG2); + IntVarArgs X3 = gecode_IntVarArgs_from_term(space,YAP_ARG3); + IntVar X4 = gecode_IntVar_from_term(space,YAP_ARG4); + IntVar X5 = gecode_IntVar_from_term(space,YAP_ARG5); + IntVarArgs X6 = gecode_IntVarArgs_from_term(space,YAP_ARG6); + IntVar X7 = gecode_IntVar_from_term(space,YAP_ARG7); + IntPropLevel X8 = gecode_IntPropLevel_from_term(YAP_ARG8); + path(*space,X2,X3,X4,X5,X6,X7,X8); + return TRUE; +} + +static YAP_Bool gecode_constraint_path_369(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntArgs X2 = gecode_IntArgs_from_term(YAP_ARG2); + int X3 = gecode_int_from_term(YAP_ARG3); + IntVarArgs X4 = gecode_IntVarArgs_from_term(space,YAP_ARG4); + IntVar X5 = gecode_IntVar_from_term(space,YAP_ARG5); + IntVar X6 = gecode_IntVar_from_term(space,YAP_ARG6); + IntVar X7 = gecode_IntVar_from_term(space,YAP_ARG7); + IntPropLevel X8 = gecode_IntPropLevel_from_term(YAP_ARG8); + path(*space,X2,X3,X4,X5,X6,X7,X8); + return TRUE; +} + +static YAP_Bool gecode_constraint_path_370(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntArgs X2 = gecode_IntArgs_from_term(YAP_ARG2); + int X3 = gecode_int_from_term(YAP_ARG3); + IntVarArgs X4 = gecode_IntVarArgs_from_term(space,YAP_ARG4); + IntVar X5 = gecode_IntVar_from_term(space,YAP_ARG5); + IntVar X6 = gecode_IntVar_from_term(space,YAP_ARG6); + IntVarArgs X7 = gecode_IntVarArgs_from_term(space,YAP_ARG7); + IntVar X8 = gecode_IntVar_from_term(space,YAP_ARG8); + path(*space,X2,X3,X4,X5,X6,X7,X8); + return TRUE; +} + +static YAP_Bool gecode_constraint_path_371(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntArgs X2 = gecode_IntArgs_from_term(YAP_ARG2); + int X3 = gecode_int_from_term(YAP_ARG3); + IntVarArgs X4 = gecode_IntVarArgs_from_term(space,YAP_ARG4); + IntVar X5 = gecode_IntVar_from_term(space,YAP_ARG5); + IntVar X6 = gecode_IntVar_from_term(space,YAP_ARG6); + IntVarArgs X7 = gecode_IntVarArgs_from_term(space,YAP_ARG7); + IntVar X8 = gecode_IntVar_from_term(space,YAP_ARG8); + IntPropLevel X9 = gecode_IntPropLevel_from_term(YAP_ARG9); + path(*space,X2,X3,X4,X5,X6,X7,X8,X9); + return TRUE; +} + +static YAP_Bool gecode_constraint_path_372(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVarArgs X2 = gecode_IntVarArgs_from_term(space,YAP_ARG2); + IntVar X3 = gecode_IntVar_from_term(space,YAP_ARG3); + IntVar X4 = gecode_IntVar_from_term(space,YAP_ARG4); + path(*space,X2,X3,X4); + return TRUE; +} + +static YAP_Bool gecode_constraint_path_373(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVarArgs X2 = gecode_IntVarArgs_from_term(space,YAP_ARG2); + IntVar X3 = gecode_IntVar_from_term(space,YAP_ARG3); + IntVar X4 = gecode_IntVar_from_term(space,YAP_ARG4); + IntPropLevel X5 = gecode_IntPropLevel_from_term(YAP_ARG5); + path(*space,X2,X3,X4,X5); + return TRUE; +} + +static YAP_Bool gecode_constraint_path_374(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + int X2 = gecode_int_from_term(YAP_ARG2); + IntVarArgs X3 = gecode_IntVarArgs_from_term(space,YAP_ARG3); + IntVar X4 = gecode_IntVar_from_term(space,YAP_ARG4); + IntVar X5 = gecode_IntVar_from_term(space,YAP_ARG5); + path(*space,X2,X3,X4,X5); + return TRUE; +} + +static YAP_Bool gecode_constraint_pow_376(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + FloatVar X2 = gecode_FloatVar_from_term(space,YAP_ARG2); + int X3 = gecode_int_from_term(YAP_ARG3); + FloatVar X4 = gecode_FloatVar_from_term(space,YAP_ARG4); + pow(*space,X2,X3,X4); + return TRUE; +} + +static YAP_Bool gecode_constraint_pow_377(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVar X2 = gecode_IntVar_from_term(space,YAP_ARG2); + int X3 = gecode_int_from_term(YAP_ARG3); + IntVar X4 = gecode_IntVar_from_term(space,YAP_ARG4); + pow(*space,X2,X3,X4); + return TRUE; +} + +static YAP_Bool gecode_constraint_pow_378(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVar X2 = gecode_IntVar_from_term(space,YAP_ARG2); + int X3 = gecode_int_from_term(YAP_ARG3); + IntVar X4 = gecode_IntVar_from_term(space,YAP_ARG4); + IntPropLevel X5 = gecode_IntPropLevel_from_term(YAP_ARG5); + pow(*space,X2,X3,X4,X5); + return TRUE; +} + +static YAP_Bool gecode_constraint_precede_379(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVarArgs X2 = gecode_IntVarArgs_from_term(space,YAP_ARG2); + IntArgs X3 = gecode_IntArgs_from_term(YAP_ARG3); + precede(*space,X2,X3); + return TRUE; +} + +static YAP_Bool gecode_constraint_precede_380(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVarArgs X2 = gecode_IntVarArgs_from_term(space,YAP_ARG2); + IntArgs X3 = gecode_IntArgs_from_term(YAP_ARG3); + IntPropLevel X4 = gecode_IntPropLevel_from_term(YAP_ARG4); + precede(*space,X2,X3,X4); + return TRUE; +} + +static YAP_Bool gecode_constraint_precede_381(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVarArgs X2 = gecode_IntVarArgs_from_term(space,YAP_ARG2); + int X3 = gecode_int_from_term(YAP_ARG3); + int X4 = gecode_int_from_term(YAP_ARG4); + precede(*space,X2,X3,X4); + return TRUE; +} + +static YAP_Bool gecode_constraint_precede_382(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVarArgs X2 = gecode_IntVarArgs_from_term(space,YAP_ARG2); + int X3 = gecode_int_from_term(YAP_ARG3); + int X4 = gecode_int_from_term(YAP_ARG4); + IntPropLevel X5 = gecode_IntPropLevel_from_term(YAP_ARG5); + precede(*space,X2,X3,X4,X5); + return TRUE; +} + +static YAP_Bool gecode_constraint_rel_383(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + BoolOpType X2 = gecode_BoolOpType_from_term(YAP_ARG2); + BoolVarArgs X3 = gecode_BoolVarArgs_from_term(space,YAP_ARG3); + BoolVar X4 = gecode_BoolVar_from_term(space,YAP_ARG4); + rel(*space,X2,X3,X4); + return TRUE; +} + +static YAP_Bool gecode_constraint_rel_385(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + BoolOpType X2 = gecode_BoolOpType_from_term(YAP_ARG2); + BoolVarArgs X3 = gecode_BoolVarArgs_from_term(space,YAP_ARG3); + int X4 = gecode_int_from_term(YAP_ARG4); + rel(*space,X2,X3,X4); + return TRUE; +} + +static YAP_Bool gecode_constraint_rel_391(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + BoolVar X2 = gecode_BoolVar_from_term(space,YAP_ARG2); + IntRelType X3 = gecode_IntRelType_from_term(YAP_ARG3); + BoolVar X4 = gecode_BoolVar_from_term(space,YAP_ARG4); + rel(*space,X2,X3,X4); + return TRUE; +} + +static YAP_Bool gecode_constraint_rel_395(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + BoolVar X2 = gecode_BoolVar_from_term(space,YAP_ARG2); + IntRelType X3 = gecode_IntRelType_from_term(YAP_ARG3); + int X4 = gecode_int_from_term(YAP_ARG4); + rel(*space,X2,X3,X4); + return TRUE; +} + +static YAP_Bool gecode_constraint_rel_399(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + FloatVar X2 = gecode_FloatVar_from_term(space,YAP_ARG2); + FloatRelType X3 = gecode_FloatRelType_from_term(YAP_ARG3); + FloatVal X4 = gecode_FloatVal_from_term(YAP_ARG4); + rel(*space,X2,X3,X4); + return TRUE; +} + +static YAP_Bool gecode_constraint_rel_401(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + FloatVar X2 = gecode_FloatVar_from_term(space,YAP_ARG2); + FloatRelType X3 = gecode_FloatRelType_from_term(YAP_ARG3); + FloatVar X4 = gecode_FloatVar_from_term(space,YAP_ARG4); + rel(*space,X2,X3,X4); + return TRUE; +} + +static YAP_Bool gecode_constraint_rel_403(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVar X2 = gecode_IntVar_from_term(space,YAP_ARG2); + IntRelType X3 = gecode_IntRelType_from_term(YAP_ARG3); + IntVar X4 = gecode_IntVar_from_term(space,YAP_ARG4); + rel(*space,X2,X3,X4); + return TRUE; +} + +static YAP_Bool gecode_constraint_rel_407(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVar X2 = gecode_IntVar_from_term(space,YAP_ARG2); + IntRelType X3 = gecode_IntRelType_from_term(YAP_ARG3); + int X4 = gecode_int_from_term(YAP_ARG4); + rel(*space,X2,X3,X4); + return TRUE; +} + +static YAP_Bool gecode_constraint_rel_411(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVar X2 = gecode_IntVar_from_term(space,YAP_ARG2); + SetRelType X3 = gecode_SetRelType_from_term(YAP_ARG3); + SetVar X4 = gecode_SetVar_from_term(space,YAP_ARG4); + rel(*space,X2,X3,X4); + return TRUE; +} + +static YAP_Bool gecode_constraint_rel_413(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + SetVar X2 = gecode_SetVar_from_term(space,YAP_ARG2); + IntRelType X3 = gecode_IntRelType_from_term(YAP_ARG3); + IntVar X4 = gecode_IntVar_from_term(space,YAP_ARG4); + rel(*space,X2,X3,X4); + return TRUE; +} + +static YAP_Bool gecode_constraint_rel_415(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + SetVar X2 = gecode_SetVar_from_term(space,YAP_ARG2); + SetRelType X3 = gecode_SetRelType_from_term(YAP_ARG3); + IntVar X4 = gecode_IntVar_from_term(space,YAP_ARG4); + rel(*space,X2,X3,X4); + return TRUE; +} + +static YAP_Bool gecode_constraint_rel_417(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + SetVar X2 = gecode_SetVar_from_term(space,YAP_ARG2); + SetRelType X3 = gecode_SetRelType_from_term(YAP_ARG3); + SetVar X4 = gecode_SetVar_from_term(space,YAP_ARG4); + rel(*space,X2,X3,X4); + return TRUE; +} + +static YAP_Bool gecode_constraint_rel_419(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + BoolVarArgs X2 = gecode_BoolVarArgs_from_term(space,YAP_ARG2); + IntRelType X3 = gecode_IntRelType_from_term(YAP_ARG3); + BoolVar X4 = gecode_BoolVar_from_term(space,YAP_ARG4); + rel(*space,X2,X3,X4); + return TRUE; +} + +static YAP_Bool gecode_constraint_rel_422(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + BoolVarArgs X2 = gecode_BoolVarArgs_from_term(space,YAP_ARG2); + IntRelType X3 = gecode_IntRelType_from_term(YAP_ARG3); + IntPropLevel X4 = gecode_IntPropLevel_from_term(YAP_ARG4); + rel(*space,X2,X3,X4); + return TRUE; +} + +static YAP_Bool gecode_constraint_rel_423(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + BoolVarArgs X2 = gecode_BoolVarArgs_from_term(space,YAP_ARG2); + IntRelType X3 = gecode_IntRelType_from_term(YAP_ARG3); + BoolVarArgs X4 = gecode_BoolVarArgs_from_term(space,YAP_ARG4); + rel(*space,X2,X3,X4); + return TRUE; +} + +static YAP_Bool gecode_constraint_rel_425(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + BoolVarArgs X2 = gecode_BoolVarArgs_from_term(space,YAP_ARG2); + IntRelType X3 = gecode_IntRelType_from_term(YAP_ARG3); + IntArgs X4 = gecode_IntArgs_from_term(YAP_ARG4); + rel(*space,X2,X3,X4); + return TRUE; +} + +static YAP_Bool gecode_constraint_rel_427(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + BoolVarArgs X2 = gecode_BoolVarArgs_from_term(space,YAP_ARG2); + IntRelType X3 = gecode_IntRelType_from_term(YAP_ARG3); + int X4 = gecode_int_from_term(YAP_ARG4); + rel(*space,X2,X3,X4); + return TRUE; +} + +static YAP_Bool gecode_constraint_rel_429(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + FloatVarArgs X2 = gecode_FloatVarArgs_from_term(space,YAP_ARG2); + FloatRelType X3 = gecode_FloatRelType_from_term(YAP_ARG3); + FloatVal X4 = gecode_FloatVal_from_term(YAP_ARG4); + rel(*space,X2,X3,X4); + return TRUE; +} + +static YAP_Bool gecode_constraint_rel_430(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + FloatVarArgs X2 = gecode_FloatVarArgs_from_term(space,YAP_ARG2); + FloatRelType X3 = gecode_FloatRelType_from_term(YAP_ARG3); + FloatVar X4 = gecode_FloatVar_from_term(space,YAP_ARG4); + rel(*space,X2,X3,X4); + return TRUE; +} + +static YAP_Bool gecode_constraint_rel_431(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntArgs X2 = gecode_IntArgs_from_term(YAP_ARG2); + IntRelType X3 = gecode_IntRelType_from_term(YAP_ARG3); + BoolVarArgs X4 = gecode_BoolVarArgs_from_term(space,YAP_ARG4); + rel(*space,X2,X3,X4); + return TRUE; +} + +static YAP_Bool gecode_constraint_rel_433(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntArgs X2 = gecode_IntArgs_from_term(YAP_ARG2); + IntRelType X3 = gecode_IntRelType_from_term(YAP_ARG3); + IntVarArgs X4 = gecode_IntVarArgs_from_term(space,YAP_ARG4); + rel(*space,X2,X3,X4); + return TRUE; +} + +static YAP_Bool gecode_constraint_rel_436(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVarArgs X2 = gecode_IntVarArgs_from_term(space,YAP_ARG2); + IntRelType X3 = gecode_IntRelType_from_term(YAP_ARG3); + IntPropLevel X4 = gecode_IntPropLevel_from_term(YAP_ARG4); + rel(*space,X2,X3,X4); + return TRUE; +} + +static YAP_Bool gecode_constraint_rel_437(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVarArgs X2 = gecode_IntVarArgs_from_term(space,YAP_ARG2); + IntRelType X3 = gecode_IntRelType_from_term(YAP_ARG3); + IntVar X4 = gecode_IntVar_from_term(space,YAP_ARG4); + rel(*space,X2,X3,X4); + return TRUE; +} + +static YAP_Bool gecode_constraint_rel_439(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVarArgs X2 = gecode_IntVarArgs_from_term(space,YAP_ARG2); + IntRelType X3 = gecode_IntRelType_from_term(YAP_ARG3); + IntArgs X4 = gecode_IntArgs_from_term(YAP_ARG4); + rel(*space,X2,X3,X4); + return TRUE; +} + +static YAP_Bool gecode_constraint_rel_441(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVarArgs X2 = gecode_IntVarArgs_from_term(space,YAP_ARG2); + IntRelType X3 = gecode_IntRelType_from_term(YAP_ARG3); + IntVarArgs X4 = gecode_IntVarArgs_from_term(space,YAP_ARG4); + rel(*space,X2,X3,X4); + return TRUE; +} + +static YAP_Bool gecode_constraint_rel_443(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVarArgs X2 = gecode_IntVarArgs_from_term(space,YAP_ARG2); + IntRelType X3 = gecode_IntRelType_from_term(YAP_ARG3); + int X4 = gecode_int_from_term(YAP_ARG4); + rel(*space,X2,X3,X4); + return TRUE; +} + +static YAP_Bool gecode_constraint_rel_384(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + BoolOpType X2 = gecode_BoolOpType_from_term(YAP_ARG2); + BoolVarArgs X3 = gecode_BoolVarArgs_from_term(space,YAP_ARG3); + BoolVar X4 = gecode_BoolVar_from_term(space,YAP_ARG4); + IntPropLevel X5 = gecode_IntPropLevel_from_term(YAP_ARG5); + rel(*space,X2,X3,X4,X5); + return TRUE; +} + +static YAP_Bool gecode_constraint_rel_386(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + BoolOpType X2 = gecode_BoolOpType_from_term(YAP_ARG2); + BoolVarArgs X3 = gecode_BoolVarArgs_from_term(space,YAP_ARG3); + int X4 = gecode_int_from_term(YAP_ARG4); + IntPropLevel X5 = gecode_IntPropLevel_from_term(YAP_ARG5); + rel(*space,X2,X3,X4,X5); + return TRUE; +} + +static YAP_Bool gecode_constraint_rel_387(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + BoolVar X2 = gecode_BoolVar_from_term(space,YAP_ARG2); + BoolOpType X3 = gecode_BoolOpType_from_term(YAP_ARG3); + BoolVar X4 = gecode_BoolVar_from_term(space,YAP_ARG4); + BoolVar X5 = gecode_BoolVar_from_term(space,YAP_ARG5); + rel(*space,X2,X3,X4,X5); + return TRUE; +} + +static YAP_Bool gecode_constraint_rel_389(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + BoolVar X2 = gecode_BoolVar_from_term(space,YAP_ARG2); + BoolOpType X3 = gecode_BoolOpType_from_term(YAP_ARG3); + BoolVar X4 = gecode_BoolVar_from_term(space,YAP_ARG4); + int X5 = gecode_int_from_term(YAP_ARG5); + rel(*space,X2,X3,X4,X5); + return TRUE; +} + +static YAP_Bool gecode_constraint_rel_392(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + BoolVar X2 = gecode_BoolVar_from_term(space,YAP_ARG2); + IntRelType X3 = gecode_IntRelType_from_term(YAP_ARG3); + BoolVar X4 = gecode_BoolVar_from_term(space,YAP_ARG4); + IntPropLevel X5 = gecode_IntPropLevel_from_term(YAP_ARG5); + rel(*space,X2,X3,X4,X5); + return TRUE; +} + +static YAP_Bool gecode_constraint_rel_393(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + BoolVar X2 = gecode_BoolVar_from_term(space,YAP_ARG2); + IntRelType X3 = gecode_IntRelType_from_term(YAP_ARG3); + BoolVar X4 = gecode_BoolVar_from_term(space,YAP_ARG4); + Reify X5 = gecode_Reify_from_term(YAP_ARG5); + rel(*space,X2,X3,X4,X5); + return TRUE; +} + +static YAP_Bool gecode_constraint_rel_396(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + BoolVar X2 = gecode_BoolVar_from_term(space,YAP_ARG2); + IntRelType X3 = gecode_IntRelType_from_term(YAP_ARG3); + int X4 = gecode_int_from_term(YAP_ARG4); + IntPropLevel X5 = gecode_IntPropLevel_from_term(YAP_ARG5); + rel(*space,X2,X3,X4,X5); + return TRUE; +} + +static YAP_Bool gecode_constraint_rel_397(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + BoolVar X2 = gecode_BoolVar_from_term(space,YAP_ARG2); + IntRelType X3 = gecode_IntRelType_from_term(YAP_ARG3); + int X4 = gecode_int_from_term(YAP_ARG4); + Reify X5 = gecode_Reify_from_term(YAP_ARG5); + rel(*space,X2,X3,X4,X5); + return TRUE; +} + +static YAP_Bool gecode_constraint_rel_400(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + FloatVar X2 = gecode_FloatVar_from_term(space,YAP_ARG2); + FloatRelType X3 = gecode_FloatRelType_from_term(YAP_ARG3); + FloatVal X4 = gecode_FloatVal_from_term(YAP_ARG4); + Reify X5 = gecode_Reify_from_term(YAP_ARG5); + rel(*space,X2,X3,X4,X5); + return TRUE; +} + +static YAP_Bool gecode_constraint_rel_402(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + FloatVar X2 = gecode_FloatVar_from_term(space,YAP_ARG2); + FloatRelType X3 = gecode_FloatRelType_from_term(YAP_ARG3); + FloatVar X4 = gecode_FloatVar_from_term(space,YAP_ARG4); + Reify X5 = gecode_Reify_from_term(YAP_ARG5); + rel(*space,X2,X3,X4,X5); + return TRUE; +} + +static YAP_Bool gecode_constraint_rel_404(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVar X2 = gecode_IntVar_from_term(space,YAP_ARG2); + IntRelType X3 = gecode_IntRelType_from_term(YAP_ARG3); + IntVar X4 = gecode_IntVar_from_term(space,YAP_ARG4); + IntPropLevel X5 = gecode_IntPropLevel_from_term(YAP_ARG5); + rel(*space,X2,X3,X4,X5); + return TRUE; +} + +static YAP_Bool gecode_constraint_rel_405(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVar X2 = gecode_IntVar_from_term(space,YAP_ARG2); + IntRelType X3 = gecode_IntRelType_from_term(YAP_ARG3); + IntVar X4 = gecode_IntVar_from_term(space,YAP_ARG4); + Reify X5 = gecode_Reify_from_term(YAP_ARG5); + rel(*space,X2,X3,X4,X5); + return TRUE; +} + +static YAP_Bool gecode_constraint_rel_408(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVar X2 = gecode_IntVar_from_term(space,YAP_ARG2); + IntRelType X3 = gecode_IntRelType_from_term(YAP_ARG3); + int X4 = gecode_int_from_term(YAP_ARG4); + IntPropLevel X5 = gecode_IntPropLevel_from_term(YAP_ARG5); + rel(*space,X2,X3,X4,X5); + return TRUE; +} + +static YAP_Bool gecode_constraint_rel_409(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVar X2 = gecode_IntVar_from_term(space,YAP_ARG2); + IntRelType X3 = gecode_IntRelType_from_term(YAP_ARG3); + int X4 = gecode_int_from_term(YAP_ARG4); + Reify X5 = gecode_Reify_from_term(YAP_ARG5); + rel(*space,X2,X3,X4,X5); + return TRUE; +} + +static YAP_Bool gecode_constraint_rel_412(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVar X2 = gecode_IntVar_from_term(space,YAP_ARG2); + SetRelType X3 = gecode_SetRelType_from_term(YAP_ARG3); + SetVar X4 = gecode_SetVar_from_term(space,YAP_ARG4); + Reify X5 = gecode_Reify_from_term(YAP_ARG5); + rel(*space,X2,X3,X4,X5); + return TRUE; +} + +static YAP_Bool gecode_constraint_rel_414(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + SetVar X2 = gecode_SetVar_from_term(space,YAP_ARG2); + IntRelType X3 = gecode_IntRelType_from_term(YAP_ARG3); + IntVar X4 = gecode_IntVar_from_term(space,YAP_ARG4); + Reify X5 = gecode_Reify_from_term(YAP_ARG5); + rel(*space,X2,X3,X4,X5); + return TRUE; +} + +static YAP_Bool gecode_constraint_rel_416(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + SetVar X2 = gecode_SetVar_from_term(space,YAP_ARG2); + SetRelType X3 = gecode_SetRelType_from_term(YAP_ARG3); + IntVar X4 = gecode_IntVar_from_term(space,YAP_ARG4); + Reify X5 = gecode_Reify_from_term(YAP_ARG5); + rel(*space,X2,X3,X4,X5); + return TRUE; +} + +static YAP_Bool gecode_constraint_rel_418(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + SetVar X2 = gecode_SetVar_from_term(space,YAP_ARG2); + SetRelType X3 = gecode_SetRelType_from_term(YAP_ARG3); + SetVar X4 = gecode_SetVar_from_term(space,YAP_ARG4); + Reify X5 = gecode_Reify_from_term(YAP_ARG5); + rel(*space,X2,X3,X4,X5); + return TRUE; +} + +static YAP_Bool gecode_constraint_rel_420(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + BoolVarArgs X2 = gecode_BoolVarArgs_from_term(space,YAP_ARG2); + IntRelType X3 = gecode_IntRelType_from_term(YAP_ARG3); + BoolVar X4 = gecode_BoolVar_from_term(space,YAP_ARG4); + IntPropLevel X5 = gecode_IntPropLevel_from_term(YAP_ARG5); + rel(*space,X2,X3,X4,X5); + return TRUE; +} + +static YAP_Bool gecode_constraint_rel_424(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + BoolVarArgs X2 = gecode_BoolVarArgs_from_term(space,YAP_ARG2); + IntRelType X3 = gecode_IntRelType_from_term(YAP_ARG3); + BoolVarArgs X4 = gecode_BoolVarArgs_from_term(space,YAP_ARG4); + IntPropLevel X5 = gecode_IntPropLevel_from_term(YAP_ARG5); + rel(*space,X2,X3,X4,X5); + return TRUE; +} + +static YAP_Bool gecode_constraint_rel_426(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + BoolVarArgs X2 = gecode_BoolVarArgs_from_term(space,YAP_ARG2); + IntRelType X3 = gecode_IntRelType_from_term(YAP_ARG3); + IntArgs X4 = gecode_IntArgs_from_term(YAP_ARG4); + IntPropLevel X5 = gecode_IntPropLevel_from_term(YAP_ARG5); + rel(*space,X2,X3,X4,X5); + return TRUE; +} + +static YAP_Bool gecode_constraint_rel_428(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + BoolVarArgs X2 = gecode_BoolVarArgs_from_term(space,YAP_ARG2); + IntRelType X3 = gecode_IntRelType_from_term(YAP_ARG3); + int X4 = gecode_int_from_term(YAP_ARG4); + IntPropLevel X5 = gecode_IntPropLevel_from_term(YAP_ARG5); + rel(*space,X2,X3,X4,X5); + return TRUE; +} + +static YAP_Bool gecode_constraint_rel_432(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntArgs X2 = gecode_IntArgs_from_term(YAP_ARG2); + IntRelType X3 = gecode_IntRelType_from_term(YAP_ARG3); + BoolVarArgs X4 = gecode_BoolVarArgs_from_term(space,YAP_ARG4); + IntPropLevel X5 = gecode_IntPropLevel_from_term(YAP_ARG5); + rel(*space,X2,X3,X4,X5); + return TRUE; +} + +static YAP_Bool gecode_constraint_rel_434(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntArgs X2 = gecode_IntArgs_from_term(YAP_ARG2); + IntRelType X3 = gecode_IntRelType_from_term(YAP_ARG3); + IntVarArgs X4 = gecode_IntVarArgs_from_term(space,YAP_ARG4); + IntPropLevel X5 = gecode_IntPropLevel_from_term(YAP_ARG5); + rel(*space,X2,X3,X4,X5); + return TRUE; +} + +static YAP_Bool gecode_constraint_rel_438(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVarArgs X2 = gecode_IntVarArgs_from_term(space,YAP_ARG2); + IntRelType X3 = gecode_IntRelType_from_term(YAP_ARG3); + IntVar X4 = gecode_IntVar_from_term(space,YAP_ARG4); + IntPropLevel X5 = gecode_IntPropLevel_from_term(YAP_ARG5); + rel(*space,X2,X3,X4,X5); + return TRUE; +} + +static YAP_Bool gecode_constraint_rel_440(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVarArgs X2 = gecode_IntVarArgs_from_term(space,YAP_ARG2); + IntRelType X3 = gecode_IntRelType_from_term(YAP_ARG3); + IntArgs X4 = gecode_IntArgs_from_term(YAP_ARG4); + IntPropLevel X5 = gecode_IntPropLevel_from_term(YAP_ARG5); + rel(*space,X2,X3,X4,X5); + return TRUE; +} + +static YAP_Bool gecode_constraint_rel_442(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVarArgs X2 = gecode_IntVarArgs_from_term(space,YAP_ARG2); + IntRelType X3 = gecode_IntRelType_from_term(YAP_ARG3); + IntVarArgs X4 = gecode_IntVarArgs_from_term(space,YAP_ARG4); + IntPropLevel X5 = gecode_IntPropLevel_from_term(YAP_ARG5); + rel(*space,X2,X3,X4,X5); + return TRUE; +} + +static YAP_Bool gecode_constraint_rel_444(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVarArgs X2 = gecode_IntVarArgs_from_term(space,YAP_ARG2); + IntRelType X3 = gecode_IntRelType_from_term(YAP_ARG3); + int X4 = gecode_int_from_term(YAP_ARG4); + IntPropLevel X5 = gecode_IntPropLevel_from_term(YAP_ARG5); + rel(*space,X2,X3,X4,X5); + return TRUE; +} + +static YAP_Bool gecode_constraint_rel_388(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + BoolVar X2 = gecode_BoolVar_from_term(space,YAP_ARG2); + BoolOpType X3 = gecode_BoolOpType_from_term(YAP_ARG3); + BoolVar X4 = gecode_BoolVar_from_term(space,YAP_ARG4); + BoolVar X5 = gecode_BoolVar_from_term(space,YAP_ARG5); + IntPropLevel X6 = gecode_IntPropLevel_from_term(YAP_ARG6); + rel(*space,X2,X3,X4,X5,X6); + return TRUE; +} + +static YAP_Bool gecode_constraint_rel_390(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + BoolVar X2 = gecode_BoolVar_from_term(space,YAP_ARG2); + BoolOpType X3 = gecode_BoolOpType_from_term(YAP_ARG3); + BoolVar X4 = gecode_BoolVar_from_term(space,YAP_ARG4); + int X5 = gecode_int_from_term(YAP_ARG5); + IntPropLevel X6 = gecode_IntPropLevel_from_term(YAP_ARG6); + rel(*space,X2,X3,X4,X5,X6); + return TRUE; +} + +static YAP_Bool gecode_constraint_rel_394(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + BoolVar X2 = gecode_BoolVar_from_term(space,YAP_ARG2); + IntRelType X3 = gecode_IntRelType_from_term(YAP_ARG3); + BoolVar X4 = gecode_BoolVar_from_term(space,YAP_ARG4); + Reify X5 = gecode_Reify_from_term(YAP_ARG5); + IntPropLevel X6 = gecode_IntPropLevel_from_term(YAP_ARG6); + rel(*space,X2,X3,X4,X5,X6); + return TRUE; +} + +static YAP_Bool gecode_constraint_rel_398(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + BoolVar X2 = gecode_BoolVar_from_term(space,YAP_ARG2); + IntRelType X3 = gecode_IntRelType_from_term(YAP_ARG3); + int X4 = gecode_int_from_term(YAP_ARG4); + Reify X5 = gecode_Reify_from_term(YAP_ARG5); + IntPropLevel X6 = gecode_IntPropLevel_from_term(YAP_ARG6); + rel(*space,X2,X3,X4,X5,X6); + return TRUE; +} + +static YAP_Bool gecode_constraint_rel_406(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVar X2 = gecode_IntVar_from_term(space,YAP_ARG2); + IntRelType X3 = gecode_IntRelType_from_term(YAP_ARG3); + IntVar X4 = gecode_IntVar_from_term(space,YAP_ARG4); + Reify X5 = gecode_Reify_from_term(YAP_ARG5); + IntPropLevel X6 = gecode_IntPropLevel_from_term(YAP_ARG6); + rel(*space,X2,X3,X4,X5,X6); + return TRUE; +} + +static YAP_Bool gecode_constraint_rel_410(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVar X2 = gecode_IntVar_from_term(space,YAP_ARG2); + IntRelType X3 = gecode_IntRelType_from_term(YAP_ARG3); + int X4 = gecode_int_from_term(YAP_ARG4); + Reify X5 = gecode_Reify_from_term(YAP_ARG5); + IntPropLevel X6 = gecode_IntPropLevel_from_term(YAP_ARG6); + rel(*space,X2,X3,X4,X5,X6); + return TRUE; +} + +static YAP_Bool gecode_constraint_rel_421(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + BoolVarArgs X2 = gecode_BoolVarArgs_from_term(space,YAP_ARG2); + IntRelType X3 = gecode_IntRelType_from_term(YAP_ARG3); + rel(*space,X2,X3); + return TRUE; +} + +static YAP_Bool gecode_constraint_rel_435(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVarArgs X2 = gecode_IntVarArgs_from_term(space,YAP_ARG2); + IntRelType X3 = gecode_IntRelType_from_term(YAP_ARG3); + rel(*space,X2,X3); + return TRUE; +} + +static YAP_Bool gecode_constraint_relax_445(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + SetVarArgs X2 = gecode_SetVarArgs_from_term(space,YAP_ARG2); + SetVarArgs X3 = gecode_SetVarArgs_from_term(space,YAP_ARG3); + Rnd X4 = gecode_Rnd_from_term(YAP_ARG4); + double X5 = gecode_double_from_term(YAP_ARG5); + relax(*space,X2,X3,X4,X5); + return TRUE; +} + +static YAP_Bool gecode_constraint_sequence_446(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + BoolVarArgs X2 = gecode_BoolVarArgs_from_term(space,YAP_ARG2); + IntSet X3 = gecode_IntSet_from_term(YAP_ARG3); + int X4 = gecode_int_from_term(YAP_ARG4); + int X5 = gecode_int_from_term(YAP_ARG5); + int X6 = gecode_int_from_term(YAP_ARG6); + sequence(*space,X2,X3,X4,X5,X6); + return TRUE; +} + +static YAP_Bool gecode_constraint_sequence_448(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVarArgs X2 = gecode_IntVarArgs_from_term(space,YAP_ARG2); + IntSet X3 = gecode_IntSet_from_term(YAP_ARG3); + int X4 = gecode_int_from_term(YAP_ARG4); + int X5 = gecode_int_from_term(YAP_ARG5); + int X6 = gecode_int_from_term(YAP_ARG6); + sequence(*space,X2,X3,X4,X5,X6); + return TRUE; +} + +static YAP_Bool gecode_constraint_sequence_447(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + BoolVarArgs X2 = gecode_BoolVarArgs_from_term(space,YAP_ARG2); + IntSet X3 = gecode_IntSet_from_term(YAP_ARG3); + int X4 = gecode_int_from_term(YAP_ARG4); + int X5 = gecode_int_from_term(YAP_ARG5); + int X6 = gecode_int_from_term(YAP_ARG6); + IntPropLevel X7 = gecode_IntPropLevel_from_term(YAP_ARG7); + sequence(*space,X2,X3,X4,X5,X6,X7); + return TRUE; +} + +static YAP_Bool gecode_constraint_sequence_449(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVarArgs X2 = gecode_IntVarArgs_from_term(space,YAP_ARG2); + IntSet X3 = gecode_IntSet_from_term(YAP_ARG3); + int X4 = gecode_int_from_term(YAP_ARG4); + int X5 = gecode_int_from_term(YAP_ARG5); + int X6 = gecode_int_from_term(YAP_ARG6); + IntPropLevel X7 = gecode_IntPropLevel_from_term(YAP_ARG7); + sequence(*space,X2,X3,X4,X5,X6,X7); + return TRUE; +} + +static YAP_Bool gecode_constraint_sorted_450(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVarArgs X2 = gecode_IntVarArgs_from_term(space,YAP_ARG2); + IntVarArgs X3 = gecode_IntVarArgs_from_term(space,YAP_ARG3); + sorted(*space,X2,X3); + return TRUE; +} + +static YAP_Bool gecode_constraint_sorted_451(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVarArgs X2 = gecode_IntVarArgs_from_term(space,YAP_ARG2); + IntVarArgs X3 = gecode_IntVarArgs_from_term(space,YAP_ARG3); + IntPropLevel X4 = gecode_IntPropLevel_from_term(YAP_ARG4); + sorted(*space,X2,X3,X4); + return TRUE; +} + +static YAP_Bool gecode_constraint_sorted_452(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVarArgs X2 = gecode_IntVarArgs_from_term(space,YAP_ARG2); + IntVarArgs X3 = gecode_IntVarArgs_from_term(space,YAP_ARG3); + IntVarArgs X4 = gecode_IntVarArgs_from_term(space,YAP_ARG4); + sorted(*space,X2,X3,X4); + return TRUE; +} + +static YAP_Bool gecode_constraint_sorted_453(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVarArgs X2 = gecode_IntVarArgs_from_term(space,YAP_ARG2); + IntVarArgs X3 = gecode_IntVarArgs_from_term(space,YAP_ARG3); + IntVarArgs X4 = gecode_IntVarArgs_from_term(space,YAP_ARG4); + IntPropLevel X5 = gecode_IntPropLevel_from_term(YAP_ARG5); + sorted(*space,X2,X3,X4,X5); + return TRUE; +} + +static YAP_Bool gecode_constraint_sqr_454(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + FloatVar X2 = gecode_FloatVar_from_term(space,YAP_ARG2); + FloatVar X3 = gecode_FloatVar_from_term(space,YAP_ARG3); + sqr(*space,X2,X3); + return TRUE; +} + +static YAP_Bool gecode_constraint_sqr_455(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVar X2 = gecode_IntVar_from_term(space,YAP_ARG2); + IntVar X3 = gecode_IntVar_from_term(space,YAP_ARG3); + sqr(*space,X2,X3); + return TRUE; +} + +static YAP_Bool gecode_constraint_sqr_456(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVar X2 = gecode_IntVar_from_term(space,YAP_ARG2); + IntVar X3 = gecode_IntVar_from_term(space,YAP_ARG3); + IntPropLevel X4 = gecode_IntPropLevel_from_term(YAP_ARG4); + sqr(*space,X2,X3,X4); + return TRUE; +} + +static YAP_Bool gecode_constraint_sqrt_457(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + FloatVar X2 = gecode_FloatVar_from_term(space,YAP_ARG2); + FloatVar X3 = gecode_FloatVar_from_term(space,YAP_ARG3); + sqrt(*space,X2,X3); + return TRUE; +} + +static YAP_Bool gecode_constraint_sqrt_458(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVar X2 = gecode_IntVar_from_term(space,YAP_ARG2); + IntVar X3 = gecode_IntVar_from_term(space,YAP_ARG3); + sqrt(*space,X2,X3); + return TRUE; +} + +static YAP_Bool gecode_constraint_sqrt_459(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVar X2 = gecode_IntVar_from_term(space,YAP_ARG2); + IntVar X3 = gecode_IntVar_from_term(space,YAP_ARG3); + IntPropLevel X4 = gecode_IntPropLevel_from_term(YAP_ARG4); + sqrt(*space,X2,X3,X4); + return TRUE; +} + +static YAP_Bool gecode_constraint_unary_460(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVarArgs X2 = gecode_IntVarArgs_from_term(space,YAP_ARG2); + IntArgs X3 = gecode_IntArgs_from_term(YAP_ARG3); + unary(*space,X2,X3); + return TRUE; +} + +static YAP_Bool gecode_constraint_unary_461(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVarArgs X2 = gecode_IntVarArgs_from_term(space,YAP_ARG2); + IntArgs X3 = gecode_IntArgs_from_term(YAP_ARG3); + IntPropLevel X4 = gecode_IntPropLevel_from_term(YAP_ARG4); + unary(*space,X2,X3,X4); + return TRUE; +} + +static YAP_Bool gecode_constraint_unary_462(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVarArgs X2 = gecode_IntVarArgs_from_term(space,YAP_ARG2); + IntArgs X3 = gecode_IntArgs_from_term(YAP_ARG3); + BoolVarArgs X4 = gecode_BoolVarArgs_from_term(space,YAP_ARG4); + unary(*space,X2,X3,X4); + return TRUE; +} + +static YAP_Bool gecode_constraint_unary_464(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVarArgs X2 = gecode_IntVarArgs_from_term(space,YAP_ARG2); + IntVarArgs X3 = gecode_IntVarArgs_from_term(space,YAP_ARG3); + IntVarArgs X4 = gecode_IntVarArgs_from_term(space,YAP_ARG4); + unary(*space,X2,X3,X4); + return TRUE; +} + +static YAP_Bool gecode_constraint_unary_468(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + TaskTypeArgs X2 = gecode_TaskTypeArgs_from_term(YAP_ARG2); + IntVarArgs X3 = gecode_IntVarArgs_from_term(space,YAP_ARG3); + IntArgs X4 = gecode_IntArgs_from_term(YAP_ARG4); + unary(*space,X2,X3,X4); + return TRUE; +} + +static YAP_Bool gecode_constraint_unary_463(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVarArgs X2 = gecode_IntVarArgs_from_term(space,YAP_ARG2); + IntArgs X3 = gecode_IntArgs_from_term(YAP_ARG3); + BoolVarArgs X4 = gecode_BoolVarArgs_from_term(space,YAP_ARG4); + IntPropLevel X5 = gecode_IntPropLevel_from_term(YAP_ARG5); + unary(*space,X2,X3,X4,X5); + return TRUE; +} + +static YAP_Bool gecode_constraint_unary_465(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVarArgs X2 = gecode_IntVarArgs_from_term(space,YAP_ARG2); + IntVarArgs X3 = gecode_IntVarArgs_from_term(space,YAP_ARG3); + IntVarArgs X4 = gecode_IntVarArgs_from_term(space,YAP_ARG4); + IntPropLevel X5 = gecode_IntPropLevel_from_term(YAP_ARG5); + unary(*space,X2,X3,X4,X5); + return TRUE; +} + +static YAP_Bool gecode_constraint_unary_466(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVarArgs X2 = gecode_IntVarArgs_from_term(space,YAP_ARG2); + IntVarArgs X3 = gecode_IntVarArgs_from_term(space,YAP_ARG3); + IntVarArgs X4 = gecode_IntVarArgs_from_term(space,YAP_ARG4); + BoolVarArgs X5 = gecode_BoolVarArgs_from_term(space,YAP_ARG5); + unary(*space,X2,X3,X4,X5); + return TRUE; +} + +static YAP_Bool gecode_constraint_unary_469(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + TaskTypeArgs X2 = gecode_TaskTypeArgs_from_term(YAP_ARG2); + IntVarArgs X3 = gecode_IntVarArgs_from_term(space,YAP_ARG3); + IntArgs X4 = gecode_IntArgs_from_term(YAP_ARG4); + IntPropLevel X5 = gecode_IntPropLevel_from_term(YAP_ARG5); + unary(*space,X2,X3,X4,X5); + return TRUE; +} + +static YAP_Bool gecode_constraint_unary_470(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + TaskTypeArgs X2 = gecode_TaskTypeArgs_from_term(YAP_ARG2); + IntVarArgs X3 = gecode_IntVarArgs_from_term(space,YAP_ARG3); + IntArgs X4 = gecode_IntArgs_from_term(YAP_ARG4); + BoolVarArgs X5 = gecode_BoolVarArgs_from_term(space,YAP_ARG5); + unary(*space,X2,X3,X4,X5); + return TRUE; +} + +static YAP_Bool gecode_constraint_unary_467(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVarArgs X2 = gecode_IntVarArgs_from_term(space,YAP_ARG2); + IntVarArgs X3 = gecode_IntVarArgs_from_term(space,YAP_ARG3); + IntVarArgs X4 = gecode_IntVarArgs_from_term(space,YAP_ARG4); + BoolVarArgs X5 = gecode_BoolVarArgs_from_term(space,YAP_ARG5); + IntPropLevel X6 = gecode_IntPropLevel_from_term(YAP_ARG6); + unary(*space,X2,X3,X4,X5,X6); + return TRUE; +} + +static YAP_Bool gecode_constraint_unary_471(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + TaskTypeArgs X2 = gecode_TaskTypeArgs_from_term(YAP_ARG2); + IntVarArgs X3 = gecode_IntVarArgs_from_term(space,YAP_ARG3); + IntArgs X4 = gecode_IntArgs_from_term(YAP_ARG4); + BoolVarArgs X5 = gecode_BoolVarArgs_from_term(space,YAP_ARG5); + IntPropLevel X6 = gecode_IntPropLevel_from_term(YAP_ARG6); + unary(*space,X2,X3,X4,X5,X6); + return TRUE; +} + +static YAP_Bool gecode_constraint_unshare_472(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + BoolVarArgs X2 = gecode_BoolVarArgs_from_term(space,YAP_ARG2); + unshare(*space,X2); + return TRUE; +} + +static YAP_Bool gecode_constraint_unshare_474(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVarArgs X2 = gecode_IntVarArgs_from_term(space,YAP_ARG2); + unshare(*space,X2); + return TRUE; +} + +static YAP_Bool gecode_constraint_unshare_473(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + BoolVarArgs X2 = gecode_BoolVarArgs_from_term(space,YAP_ARG2); + IntPropLevel X3 = gecode_IntPropLevel_from_term(YAP_ARG3); + unshare(*space,X2,X3); + return TRUE; +} + +static YAP_Bool gecode_constraint_unshare_475(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVarArgs X2 = gecode_IntVarArgs_from_term(space,YAP_ARG2); + IntPropLevel X3 = gecode_IntPropLevel_from_term(YAP_ARG3); + unshare(*space,X2,X3); + return TRUE; +} + +static YAP_Bool gecode_constraint_when_476(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + BoolVar X2 = gecode_BoolVar_from_term(space,YAP_ARG2); + std::function X3 = gecode_std_function_from_term(YAP_ARG3); + when(*space,X2,X3); + return TRUE; +} + +static YAP_Bool gecode_constraint_when_477(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + BoolVar X2 = gecode_BoolVar_from_term(space,YAP_ARG2); + std::function X3 = gecode_std_function_from_term(YAP_ARG3); + IntPropLevel X4 = gecode_IntPropLevel_from_term(YAP_ARG4); + when(*space,X2,X3,X4); + return TRUE; +} + +static YAP_Bool gecode_constraint_when_478(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + BoolVar X2 = gecode_BoolVar_from_term(space,YAP_ARG2); + std::function X3 = gecode_std_function_from_term(YAP_ARG3); + std::function X4 = gecode_std_function_from_term(YAP_ARG4); + when(*space,X2,X3,X4); + return TRUE; +} + +static YAP_Bool gecode_constraint_when_479(void) +{ + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + BoolVar X2 = gecode_BoolVar_from_term(space,YAP_ARG2); + std::function X3 = gecode_std_function_from_term(YAP_ARG3); + std::function X4 = gecode_std_function_from_term(YAP_ARG4); + IntPropLevel X5 = gecode_IntPropLevel_from_term(YAP_ARG5); + when(*space,X2,X3,X4,X5); + return TRUE; +} + diff --git a/packages/gecode/6.0.0/gecode_yap_cc_init_auto_generated.icc b/packages/gecode/6.0.0/gecode_yap_cc_init_auto_generated.icc new file mode 100644 index 000000000..d3bb3a66e --- /dev/null +++ b/packages/gecode/6.0.0/gecode_yap_cc_init_auto_generated.icc @@ -0,0 +1,681 @@ +// -*- c++ -*- +//============================================================================= +// Copyright (C) 2011 by Denys Duchier +// +// This program is free software: you can redistribute it and/or modify it +// under the terms of the GNU Lesser General Public License as published by the +// Free Software Foundation, either version 3 of the License, or (at your +// option) any later version. +// +// This program is distributed in the hope that it will be useful, but WITHOUT +// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +// more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with this program. If not, see . +//============================================================================= + +{ YAP_Atom X= YAP_LookupAtom("RM_NONE"); + gecode_RM_NONE = YAP_MkAtomTerm(X); + YAP_AtomGetHold(X); } +{ YAP_Atom X= YAP_LookupAtom("RM_CONSTANT"); + gecode_RM_CONSTANT = YAP_MkAtomTerm(X); + YAP_AtomGetHold(X); } +{ YAP_Atom X= YAP_LookupAtom("RM_LINEAR"); + gecode_RM_LINEAR = YAP_MkAtomTerm(X); + YAP_AtomGetHold(X); } +{ YAP_Atom X= YAP_LookupAtom("RM_LUBY"); + gecode_RM_LUBY = YAP_MkAtomTerm(X); + YAP_AtomGetHold(X); } +{ YAP_Atom X= YAP_LookupAtom("RM_GEOMETRIC"); + gecode_RM_GEOMETRIC = YAP_MkAtomTerm(X); + YAP_AtomGetHold(X); } + +{ YAP_Atom X= YAP_LookupAtom("FRT_EQ"); + gecode_FRT_EQ = YAP_MkAtomTerm(X); + YAP_AtomGetHold(X); } +{ YAP_Atom X= YAP_LookupAtom("FRT_NQ"); + gecode_FRT_NQ = YAP_MkAtomTerm(X); + YAP_AtomGetHold(X); } +{ YAP_Atom X= YAP_LookupAtom("FRT_LQ"); + gecode_FRT_LQ = YAP_MkAtomTerm(X); + YAP_AtomGetHold(X); } +{ YAP_Atom X= YAP_LookupAtom("FRT_LE"); + gecode_FRT_LE = YAP_MkAtomTerm(X); + YAP_AtomGetHold(X); } +{ YAP_Atom X= YAP_LookupAtom("FRT_GQ"); + gecode_FRT_GQ = YAP_MkAtomTerm(X); + YAP_AtomGetHold(X); } +{ YAP_Atom X= YAP_LookupAtom("FRT_GR"); + gecode_FRT_GR = YAP_MkAtomTerm(X); + YAP_AtomGetHold(X); } + +{ YAP_Atom X= YAP_LookupAtom("RM_EQV"); + gecode_RM_EQV = YAP_MkAtomTerm(X); + YAP_AtomGetHold(X); } +{ YAP_Atom X= YAP_LookupAtom("RM_IMP"); + gecode_RM_IMP = YAP_MkAtomTerm(X); + YAP_AtomGetHold(X); } +{ YAP_Atom X= YAP_LookupAtom("RM_PMI"); + gecode_RM_PMI = YAP_MkAtomTerm(X); + YAP_AtomGetHold(X); } + +{ YAP_Atom X= YAP_LookupAtom("IRT_EQ"); + gecode_IRT_EQ = YAP_MkAtomTerm(X); + YAP_AtomGetHold(X); } +{ YAP_Atom X= YAP_LookupAtom("IRT_NQ"); + gecode_IRT_NQ = YAP_MkAtomTerm(X); + YAP_AtomGetHold(X); } +{ YAP_Atom X= YAP_LookupAtom("IRT_LQ"); + gecode_IRT_LQ = YAP_MkAtomTerm(X); + YAP_AtomGetHold(X); } +{ YAP_Atom X= YAP_LookupAtom("IRT_LE"); + gecode_IRT_LE = YAP_MkAtomTerm(X); + YAP_AtomGetHold(X); } +{ YAP_Atom X= YAP_LookupAtom("IRT_GQ"); + gecode_IRT_GQ = YAP_MkAtomTerm(X); + YAP_AtomGetHold(X); } +{ YAP_Atom X= YAP_LookupAtom("IRT_GR"); + gecode_IRT_GR = YAP_MkAtomTerm(X); + YAP_AtomGetHold(X); } + +{ YAP_Atom X= YAP_LookupAtom("BOT_AND"); + gecode_BOT_AND = YAP_MkAtomTerm(X); + YAP_AtomGetHold(X); } +{ YAP_Atom X= YAP_LookupAtom("BOT_OR"); + gecode_BOT_OR = YAP_MkAtomTerm(X); + YAP_AtomGetHold(X); } +{ YAP_Atom X= YAP_LookupAtom("BOT_IMP"); + gecode_BOT_IMP = YAP_MkAtomTerm(X); + YAP_AtomGetHold(X); } +{ YAP_Atom X= YAP_LookupAtom("BOT_EQV"); + gecode_BOT_EQV = YAP_MkAtomTerm(X); + YAP_AtomGetHold(X); } +{ YAP_Atom X= YAP_LookupAtom("BOT_XOR"); + gecode_BOT_XOR = YAP_MkAtomTerm(X); + YAP_AtomGetHold(X); } + +{ YAP_Atom X= YAP_LookupAtom("IPL_DEF"); + gecode_IPL_DEF = YAP_MkAtomTerm(X); + YAP_AtomGetHold(X); } +{ YAP_Atom X= YAP_LookupAtom("IPL_VAL"); + gecode_IPL_VAL = YAP_MkAtomTerm(X); + YAP_AtomGetHold(X); } +{ YAP_Atom X= YAP_LookupAtom("IPL_BND"); + gecode_IPL_BND = YAP_MkAtomTerm(X); + YAP_AtomGetHold(X); } +{ YAP_Atom X= YAP_LookupAtom("IPL_DOM"); + gecode_IPL_DOM = YAP_MkAtomTerm(X); + YAP_AtomGetHold(X); } +{ YAP_Atom X= YAP_LookupAtom("IPL_SPEED"); + gecode_IPL_SPEED = YAP_MkAtomTerm(X); + YAP_AtomGetHold(X); } +{ YAP_Atom X= YAP_LookupAtom("IPL_MEMORY"); + gecode_IPL_MEMORY = YAP_MkAtomTerm(X); + YAP_AtomGetHold(X); } +{ YAP_Atom X= YAP_LookupAtom("IPL_BASIC"); + gecode_IPL_BASIC = YAP_MkAtomTerm(X); + YAP_AtomGetHold(X); } +{ YAP_Atom X= YAP_LookupAtom("IPL_ADVANCED"); + gecode_IPL_ADVANCED = YAP_MkAtomTerm(X); + YAP_AtomGetHold(X); } +{ YAP_Atom X= YAP_LookupAtom("IPL_BASIC_ADVANCED"); + gecode_IPL_BASIC_ADVANCED = YAP_MkAtomTerm(X); + YAP_AtomGetHold(X); } + +{ YAP_Atom X= YAP_LookupAtom("TT_FIXP"); + gecode_TT_FIXP = YAP_MkAtomTerm(X); + YAP_AtomGetHold(X); } +{ YAP_Atom X= YAP_LookupAtom("TT_FIXS"); + gecode_TT_FIXS = YAP_MkAtomTerm(X); + YAP_AtomGetHold(X); } +{ YAP_Atom X= YAP_LookupAtom("TT_FIXE"); + gecode_TT_FIXE = YAP_MkAtomTerm(X); + YAP_AtomGetHold(X); } + +{ YAP_Atom X= YAP_LookupAtom("TE_INIT"); + gecode_TE_INIT = YAP_MkAtomTerm(X); + YAP_AtomGetHold(X); } +{ YAP_Atom X= YAP_LookupAtom("TE_PRUNE"); + gecode_TE_PRUNE = YAP_MkAtomTerm(X); + YAP_AtomGetHold(X); } +{ YAP_Atom X= YAP_LookupAtom("TE_FIX"); + gecode_TE_FIX = YAP_MkAtomTerm(X); + YAP_AtomGetHold(X); } +{ YAP_Atom X= YAP_LookupAtom("TE_FAIL"); + gecode_TE_FAIL = YAP_MkAtomTerm(X); + YAP_AtomGetHold(X); } +{ YAP_Atom X= YAP_LookupAtom("TE_DONE"); + gecode_TE_DONE = YAP_MkAtomTerm(X); + YAP_AtomGetHold(X); } +{ YAP_Atom X= YAP_LookupAtom("TE_PROPAGATE"); + gecode_TE_PROPAGATE = YAP_MkAtomTerm(X); + YAP_AtomGetHold(X); } +{ YAP_Atom X= YAP_LookupAtom("TE_COMMIT"); + gecode_TE_COMMIT = YAP_MkAtomTerm(X); + YAP_AtomGetHold(X); } + +{ YAP_Atom X= YAP_LookupAtom("SRT_EQ"); + gecode_SRT_EQ = YAP_MkAtomTerm(X); + YAP_AtomGetHold(X); } +{ YAP_Atom X= YAP_LookupAtom("SRT_NQ"); + gecode_SRT_NQ = YAP_MkAtomTerm(X); + YAP_AtomGetHold(X); } +{ YAP_Atom X= YAP_LookupAtom("SRT_SUB"); + gecode_SRT_SUB = YAP_MkAtomTerm(X); + YAP_AtomGetHold(X); } +{ YAP_Atom X= YAP_LookupAtom("SRT_SUP"); + gecode_SRT_SUP = YAP_MkAtomTerm(X); + YAP_AtomGetHold(X); } +{ YAP_Atom X= YAP_LookupAtom("SRT_DISJ"); + gecode_SRT_DISJ = YAP_MkAtomTerm(X); + YAP_AtomGetHold(X); } +{ YAP_Atom X= YAP_LookupAtom("SRT_CMPL"); + gecode_SRT_CMPL = YAP_MkAtomTerm(X); + YAP_AtomGetHold(X); } +{ YAP_Atom X= YAP_LookupAtom("SRT_LQ"); + gecode_SRT_LQ = YAP_MkAtomTerm(X); + YAP_AtomGetHold(X); } +{ YAP_Atom X= YAP_LookupAtom("SRT_LE"); + gecode_SRT_LE = YAP_MkAtomTerm(X); + YAP_AtomGetHold(X); } +{ YAP_Atom X= YAP_LookupAtom("SRT_GQ"); + gecode_SRT_GQ = YAP_MkAtomTerm(X); + YAP_AtomGetHold(X); } +{ YAP_Atom X= YAP_LookupAtom("SRT_GR"); + gecode_SRT_GR = YAP_MkAtomTerm(X); + YAP_AtomGetHold(X); } + +{ YAP_Atom X= YAP_LookupAtom("SOT_UNION"); + gecode_SOT_UNION = YAP_MkAtomTerm(X); + YAP_AtomGetHold(X); } +{ YAP_Atom X= YAP_LookupAtom("SOT_DUNION"); + gecode_SOT_DUNION = YAP_MkAtomTerm(X); + YAP_AtomGetHold(X); } +{ YAP_Atom X= YAP_LookupAtom("SOT_INTER"); + gecode_SOT_INTER = YAP_MkAtomTerm(X); + YAP_AtomGetHold(X); } +{ YAP_Atom X= YAP_LookupAtom("SOT_MINUS"); + gecode_SOT_MINUS = YAP_MkAtomTerm(X); + YAP_AtomGetHold(X); } + +YAP_UserCPredicate("gecode_constraint_branch_1", gecode_constraint_branch_1, 2); +YAP_UserCPredicate("gecode_constraint_convex_2", gecode_constraint_convex_2, 2); +YAP_UserCPredicate("gecode_constraint_convex_3", gecode_constraint_convex_3, 3); +YAP_UserCPredicate("gecode_constraint_abs_4", gecode_constraint_abs_4, 3); +YAP_UserCPredicate("gecode_constraint_abs_5", gecode_constraint_abs_5, 3); +YAP_UserCPredicate("gecode_constraint_abs_6", gecode_constraint_abs_6, 4); +YAP_UserCPredicate("gecode_constraint_argmax_7", gecode_constraint_argmax_7, 3); +YAP_UserCPredicate("gecode_constraint_argmax_8", gecode_constraint_argmax_8, 4); +YAP_UserCPredicate("gecode_constraint_argmax_10", gecode_constraint_argmax_10, 4); +YAP_UserCPredicate("gecode_constraint_argmax_9", gecode_constraint_argmax_9, 5); +YAP_UserCPredicate("gecode_constraint_argmax_11", gecode_constraint_argmax_11, 5); +YAP_UserCPredicate("gecode_constraint_argmax_12", gecode_constraint_argmax_12, 6); +YAP_UserCPredicate("gecode_constraint_argmin_13", gecode_constraint_argmin_13, 3); +YAP_UserCPredicate("gecode_constraint_argmin_14", gecode_constraint_argmin_14, 4); +YAP_UserCPredicate("gecode_constraint_argmin_16", gecode_constraint_argmin_16, 4); +YAP_UserCPredicate("gecode_constraint_argmin_15", gecode_constraint_argmin_15, 5); +YAP_UserCPredicate("gecode_constraint_argmin_17", gecode_constraint_argmin_17, 5); +YAP_UserCPredicate("gecode_constraint_argmin_18", gecode_constraint_argmin_18, 6); +YAP_UserCPredicate("gecode_constraint_assign_19", gecode_constraint_assign_19, 3); +YAP_UserCPredicate("gecode_constraint_assign_21", gecode_constraint_assign_21, 3); +YAP_UserCPredicate("gecode_constraint_assign_23", gecode_constraint_assign_23, 3); +YAP_UserCPredicate("gecode_constraint_assign_25", gecode_constraint_assign_25, 3); +YAP_UserCPredicate("gecode_constraint_assign_27", gecode_constraint_assign_27, 3); +YAP_UserCPredicate("gecode_constraint_assign_30", gecode_constraint_assign_30, 3); +YAP_UserCPredicate("gecode_constraint_assign_33", gecode_constraint_assign_33, 3); +YAP_UserCPredicate("gecode_constraint_assign_36", gecode_constraint_assign_36, 3); +YAP_UserCPredicate("gecode_constraint_assign_20", gecode_constraint_assign_20, 4); +YAP_UserCPredicate("gecode_constraint_assign_22", gecode_constraint_assign_22, 4); +YAP_UserCPredicate("gecode_constraint_assign_24", gecode_constraint_assign_24, 4); +YAP_UserCPredicate("gecode_constraint_assign_26", gecode_constraint_assign_26, 4); +YAP_UserCPredicate("gecode_constraint_assign_28", gecode_constraint_assign_28, 4); +YAP_UserCPredicate("gecode_constraint_assign_31", gecode_constraint_assign_31, 4); +YAP_UserCPredicate("gecode_constraint_assign_34", gecode_constraint_assign_34, 4); +YAP_UserCPredicate("gecode_constraint_assign_37", gecode_constraint_assign_37, 4); +YAP_UserCPredicate("gecode_constraint_assign_29", gecode_constraint_assign_29, 5); +YAP_UserCPredicate("gecode_constraint_assign_32", gecode_constraint_assign_32, 5); +YAP_UserCPredicate("gecode_constraint_assign_35", gecode_constraint_assign_35, 5); +YAP_UserCPredicate("gecode_constraint_assign_38", gecode_constraint_assign_38, 5); +YAP_UserCPredicate("gecode_constraint_binpacking_39", gecode_constraint_binpacking_39, 4); +YAP_UserCPredicate("gecode_constraint_binpacking_40", gecode_constraint_binpacking_40, 5); +YAP_UserCPredicate("gecode_constraint_branch_41", gecode_constraint_branch_41, 3); +YAP_UserCPredicate("gecode_constraint_branch_43", gecode_constraint_branch_43, 3); +YAP_UserCPredicate("gecode_constraint_branch_45", gecode_constraint_branch_45, 3); +YAP_UserCPredicate("gecode_constraint_branch_47", gecode_constraint_branch_47, 3); +YAP_UserCPredicate("gecode_constraint_branch_42", gecode_constraint_branch_42, 4); +YAP_UserCPredicate("gecode_constraint_branch_44", gecode_constraint_branch_44, 4); +YAP_UserCPredicate("gecode_constraint_branch_46", gecode_constraint_branch_46, 4); +YAP_UserCPredicate("gecode_constraint_branch_48", gecode_constraint_branch_48, 4); +YAP_UserCPredicate("gecode_constraint_branch_49", gecode_constraint_branch_49, 4); +YAP_UserCPredicate("gecode_constraint_branch_55", gecode_constraint_branch_55, 4); +YAP_UserCPredicate("gecode_constraint_branch_61", gecode_constraint_branch_61, 4); +YAP_UserCPredicate("gecode_constraint_branch_64", gecode_constraint_branch_64, 4); +YAP_UserCPredicate("gecode_constraint_branch_67", gecode_constraint_branch_67, 4); +YAP_UserCPredicate("gecode_constraint_branch_73", gecode_constraint_branch_73, 4); +YAP_UserCPredicate("gecode_constraint_branch_79", gecode_constraint_branch_79, 4); +YAP_UserCPredicate("gecode_constraint_branch_85", gecode_constraint_branch_85, 4); +YAP_UserCPredicate("gecode_constraint_branch_50", gecode_constraint_branch_50, 5); +YAP_UserCPredicate("gecode_constraint_branch_52", gecode_constraint_branch_52, 5); +YAP_UserCPredicate("gecode_constraint_branch_56", gecode_constraint_branch_56, 5); +YAP_UserCPredicate("gecode_constraint_branch_58", gecode_constraint_branch_58, 5); +YAP_UserCPredicate("gecode_constraint_branch_62", gecode_constraint_branch_62, 5); +YAP_UserCPredicate("gecode_constraint_branch_65", gecode_constraint_branch_65, 5); +YAP_UserCPredicate("gecode_constraint_branch_68", gecode_constraint_branch_68, 5); +YAP_UserCPredicate("gecode_constraint_branch_70", gecode_constraint_branch_70, 5); +YAP_UserCPredicate("gecode_constraint_branch_74", gecode_constraint_branch_74, 5); +YAP_UserCPredicate("gecode_constraint_branch_76", gecode_constraint_branch_76, 5); +YAP_UserCPredicate("gecode_constraint_branch_80", gecode_constraint_branch_80, 5); +YAP_UserCPredicate("gecode_constraint_branch_82", gecode_constraint_branch_82, 5); +YAP_UserCPredicate("gecode_constraint_branch_86", gecode_constraint_branch_86, 5); +YAP_UserCPredicate("gecode_constraint_branch_88", gecode_constraint_branch_88, 5); +YAP_UserCPredicate("gecode_constraint_branch_51", gecode_constraint_branch_51, 6); +YAP_UserCPredicate("gecode_constraint_branch_53", gecode_constraint_branch_53, 6); +YAP_UserCPredicate("gecode_constraint_branch_57", gecode_constraint_branch_57, 6); +YAP_UserCPredicate("gecode_constraint_branch_59", gecode_constraint_branch_59, 6); +YAP_UserCPredicate("gecode_constraint_branch_63", gecode_constraint_branch_63, 6); +YAP_UserCPredicate("gecode_constraint_branch_66", gecode_constraint_branch_66, 6); +YAP_UserCPredicate("gecode_constraint_branch_69", gecode_constraint_branch_69, 6); +YAP_UserCPredicate("gecode_constraint_branch_71", gecode_constraint_branch_71, 6); +YAP_UserCPredicate("gecode_constraint_branch_75", gecode_constraint_branch_75, 6); +YAP_UserCPredicate("gecode_constraint_branch_77", gecode_constraint_branch_77, 6); +YAP_UserCPredicate("gecode_constraint_branch_81", gecode_constraint_branch_81, 6); +YAP_UserCPredicate("gecode_constraint_branch_83", gecode_constraint_branch_83, 6); +YAP_UserCPredicate("gecode_constraint_branch_87", gecode_constraint_branch_87, 6); +YAP_UserCPredicate("gecode_constraint_branch_89", gecode_constraint_branch_89, 6); +YAP_UserCPredicate("gecode_constraint_branch_54", gecode_constraint_branch_54, 7); +YAP_UserCPredicate("gecode_constraint_branch_60", gecode_constraint_branch_60, 7); +YAP_UserCPredicate("gecode_constraint_branch_72", gecode_constraint_branch_72, 7); +YAP_UserCPredicate("gecode_constraint_branch_78", gecode_constraint_branch_78, 7); +YAP_UserCPredicate("gecode_constraint_branch_84", gecode_constraint_branch_84, 7); +YAP_UserCPredicate("gecode_constraint_branch_90", gecode_constraint_branch_90, 7); +YAP_UserCPredicate("gecode_constraint_cardinality_91", gecode_constraint_cardinality_91, 4); +YAP_UserCPredicate("gecode_constraint_cardinality_92", gecode_constraint_cardinality_92, 4); +YAP_UserCPredicate("gecode_constraint_channel_93", gecode_constraint_channel_93, 3); +YAP_UserCPredicate("gecode_constraint_channel_95", gecode_constraint_channel_95, 3); +YAP_UserCPredicate("gecode_constraint_channel_96", gecode_constraint_channel_96, 3); +YAP_UserCPredicate("gecode_constraint_channel_97", gecode_constraint_channel_97, 3); +YAP_UserCPredicate("gecode_constraint_channel_100", gecode_constraint_channel_100, 3); +YAP_UserCPredicate("gecode_constraint_channel_94", gecode_constraint_channel_94, 4); +YAP_UserCPredicate("gecode_constraint_channel_98", gecode_constraint_channel_98, 4); +YAP_UserCPredicate("gecode_constraint_channel_101", gecode_constraint_channel_101, 4); +YAP_UserCPredicate("gecode_constraint_channel_99", gecode_constraint_channel_99, 5); +YAP_UserCPredicate("gecode_constraint_channel_102", gecode_constraint_channel_102, 5); +YAP_UserCPredicate("gecode_constraint_channel_103", gecode_constraint_channel_103, 6); +YAP_UserCPredicate("gecode_constraint_circuit_104", gecode_constraint_circuit_104, 4); +YAP_UserCPredicate("gecode_constraint_circuit_115", gecode_constraint_circuit_115, 4); +YAP_UserCPredicate("gecode_constraint_circuit_105", gecode_constraint_circuit_105, 5); +YAP_UserCPredicate("gecode_constraint_circuit_106", gecode_constraint_circuit_106, 5); +YAP_UserCPredicate("gecode_constraint_circuit_108", gecode_constraint_circuit_108, 5); +YAP_UserCPredicate("gecode_constraint_circuit_107", gecode_constraint_circuit_107, 6); +YAP_UserCPredicate("gecode_constraint_circuit_109", gecode_constraint_circuit_109, 6); +YAP_UserCPredicate("gecode_constraint_circuit_110", gecode_constraint_circuit_110, 6); +YAP_UserCPredicate("gecode_constraint_circuit_111", gecode_constraint_circuit_111, 7); +YAP_UserCPredicate("gecode_constraint_circuit_112", gecode_constraint_circuit_112, 2); +YAP_UserCPredicate("gecode_constraint_circuit_113", gecode_constraint_circuit_113, 3); +YAP_UserCPredicate("gecode_constraint_circuit_114", gecode_constraint_circuit_114, 3); +YAP_UserCPredicate("gecode_constraint_clause_116", gecode_constraint_clause_116, 5); +YAP_UserCPredicate("gecode_constraint_clause_118", gecode_constraint_clause_118, 5); +YAP_UserCPredicate("gecode_constraint_clause_117", gecode_constraint_clause_117, 6); +YAP_UserCPredicate("gecode_constraint_clause_119", gecode_constraint_clause_119, 6); +YAP_UserCPredicate("gecode_constraint_count_120", gecode_constraint_count_120, 5); +YAP_UserCPredicate("gecode_constraint_count_122", gecode_constraint_count_122, 5); +YAP_UserCPredicate("gecode_constraint_count_124", gecode_constraint_count_124, 5); +YAP_UserCPredicate("gecode_constraint_count_126", gecode_constraint_count_126, 5); +YAP_UserCPredicate("gecode_constraint_count_128", gecode_constraint_count_128, 5); +YAP_UserCPredicate("gecode_constraint_count_130", gecode_constraint_count_130, 5); +YAP_UserCPredicate("gecode_constraint_count_133", gecode_constraint_count_133, 5); +YAP_UserCPredicate("gecode_constraint_count_137", gecode_constraint_count_137, 5); +YAP_UserCPredicate("gecode_constraint_count_141", gecode_constraint_count_141, 5); +YAP_UserCPredicate("gecode_constraint_count_142", gecode_constraint_count_142, 5); +YAP_UserCPredicate("gecode_constraint_count_144", gecode_constraint_count_144, 5); +YAP_UserCPredicate("gecode_constraint_count_121", gecode_constraint_count_121, 6); +YAP_UserCPredicate("gecode_constraint_count_123", gecode_constraint_count_123, 6); +YAP_UserCPredicate("gecode_constraint_count_125", gecode_constraint_count_125, 6); +YAP_UserCPredicate("gecode_constraint_count_127", gecode_constraint_count_127, 6); +YAP_UserCPredicate("gecode_constraint_count_129", gecode_constraint_count_129, 6); +YAP_UserCPredicate("gecode_constraint_count_131", gecode_constraint_count_131, 6); +YAP_UserCPredicate("gecode_constraint_count_143", gecode_constraint_count_143, 6); +YAP_UserCPredicate("gecode_constraint_count_145", gecode_constraint_count_145, 6); +YAP_UserCPredicate("gecode_constraint_count_132", gecode_constraint_count_132, 4); +YAP_UserCPredicate("gecode_constraint_count_135", gecode_constraint_count_135, 4); +YAP_UserCPredicate("gecode_constraint_count_136", gecode_constraint_count_136, 4); +YAP_UserCPredicate("gecode_constraint_count_139", gecode_constraint_count_139, 4); +YAP_UserCPredicate("gecode_constraint_count_140", gecode_constraint_count_140, 4); +YAP_UserCPredicate("gecode_constraint_count_134", gecode_constraint_count_134, 3); +YAP_UserCPredicate("gecode_constraint_count_138", gecode_constraint_count_138, 3); +YAP_UserCPredicate("gecode_constraint_cumulative_146", gecode_constraint_cumulative_146, 5); +YAP_UserCPredicate("gecode_constraint_cumulative_158", gecode_constraint_cumulative_158, 5); +YAP_UserCPredicate("gecode_constraint_cumulative_147", gecode_constraint_cumulative_147, 6); +YAP_UserCPredicate("gecode_constraint_cumulative_148", gecode_constraint_cumulative_148, 6); +YAP_UserCPredicate("gecode_constraint_cumulative_150", gecode_constraint_cumulative_150, 6); +YAP_UserCPredicate("gecode_constraint_cumulative_154", gecode_constraint_cumulative_154, 6); +YAP_UserCPredicate("gecode_constraint_cumulative_159", gecode_constraint_cumulative_159, 6); +YAP_UserCPredicate("gecode_constraint_cumulative_160", gecode_constraint_cumulative_160, 6); +YAP_UserCPredicate("gecode_constraint_cumulative_162", gecode_constraint_cumulative_162, 6); +YAP_UserCPredicate("gecode_constraint_cumulative_166", gecode_constraint_cumulative_166, 6); +YAP_UserCPredicate("gecode_constraint_cumulative_149", gecode_constraint_cumulative_149, 7); +YAP_UserCPredicate("gecode_constraint_cumulative_151", gecode_constraint_cumulative_151, 7); +YAP_UserCPredicate("gecode_constraint_cumulative_152", gecode_constraint_cumulative_152, 7); +YAP_UserCPredicate("gecode_constraint_cumulative_155", gecode_constraint_cumulative_155, 7); +YAP_UserCPredicate("gecode_constraint_cumulative_156", gecode_constraint_cumulative_156, 7); +YAP_UserCPredicate("gecode_constraint_cumulative_161", gecode_constraint_cumulative_161, 7); +YAP_UserCPredicate("gecode_constraint_cumulative_163", gecode_constraint_cumulative_163, 7); +YAP_UserCPredicate("gecode_constraint_cumulative_164", gecode_constraint_cumulative_164, 7); +YAP_UserCPredicate("gecode_constraint_cumulative_167", gecode_constraint_cumulative_167, 7); +YAP_UserCPredicate("gecode_constraint_cumulative_168", gecode_constraint_cumulative_168, 7); +YAP_UserCPredicate("gecode_constraint_cumulative_153", gecode_constraint_cumulative_153, 8); +YAP_UserCPredicate("gecode_constraint_cumulative_157", gecode_constraint_cumulative_157, 8); +YAP_UserCPredicate("gecode_constraint_cumulative_165", gecode_constraint_cumulative_165, 8); +YAP_UserCPredicate("gecode_constraint_cumulative_169", gecode_constraint_cumulative_169, 8); +YAP_UserCPredicate("gecode_constraint_cumulatives_170", gecode_constraint_cumulatives_170, 8); +YAP_UserCPredicate("gecode_constraint_cumulatives_172", gecode_constraint_cumulatives_172, 8); +YAP_UserCPredicate("gecode_constraint_cumulatives_174", gecode_constraint_cumulatives_174, 8); +YAP_UserCPredicate("gecode_constraint_cumulatives_176", gecode_constraint_cumulatives_176, 8); +YAP_UserCPredicate("gecode_constraint_cumulatives_178", gecode_constraint_cumulatives_178, 8); +YAP_UserCPredicate("gecode_constraint_cumulatives_180", gecode_constraint_cumulatives_180, 8); +YAP_UserCPredicate("gecode_constraint_cumulatives_182", gecode_constraint_cumulatives_182, 8); +YAP_UserCPredicate("gecode_constraint_cumulatives_184", gecode_constraint_cumulatives_184, 8); +YAP_UserCPredicate("gecode_constraint_cumulatives_171", gecode_constraint_cumulatives_171, 9); +YAP_UserCPredicate("gecode_constraint_cumulatives_173", gecode_constraint_cumulatives_173, 9); +YAP_UserCPredicate("gecode_constraint_cumulatives_175", gecode_constraint_cumulatives_175, 9); +YAP_UserCPredicate("gecode_constraint_cumulatives_177", gecode_constraint_cumulatives_177, 9); +YAP_UserCPredicate("gecode_constraint_cumulatives_179", gecode_constraint_cumulatives_179, 9); +YAP_UserCPredicate("gecode_constraint_cumulatives_181", gecode_constraint_cumulatives_181, 9); +YAP_UserCPredicate("gecode_constraint_cumulatives_183", gecode_constraint_cumulatives_183, 9); +YAP_UserCPredicate("gecode_constraint_cumulatives_185", gecode_constraint_cumulatives_185, 9); +YAP_UserCPredicate("gecode_constraint_distinct_186", gecode_constraint_distinct_186, 3); +YAP_UserCPredicate("gecode_constraint_distinct_188", gecode_constraint_distinct_188, 3); +YAP_UserCPredicate("gecode_constraint_distinct_191", gecode_constraint_distinct_191, 3); +YAP_UserCPredicate("gecode_constraint_distinct_192", gecode_constraint_distinct_192, 3); +YAP_UserCPredicate("gecode_constraint_distinct_187", gecode_constraint_distinct_187, 4); +YAP_UserCPredicate("gecode_constraint_distinct_189", gecode_constraint_distinct_189, 4); +YAP_UserCPredicate("gecode_constraint_distinct_193", gecode_constraint_distinct_193, 4); +YAP_UserCPredicate("gecode_constraint_distinct_190", gecode_constraint_distinct_190, 2); +YAP_UserCPredicate("gecode_constraint_div_194", gecode_constraint_div_194, 4); +YAP_UserCPredicate("gecode_constraint_div_195", gecode_constraint_div_195, 4); +YAP_UserCPredicate("gecode_constraint_div_196", gecode_constraint_div_196, 5); +YAP_UserCPredicate("gecode_constraint_divmod_197", gecode_constraint_divmod_197, 5); +YAP_UserCPredicate("gecode_constraint_divmod_198", gecode_constraint_divmod_198, 6); +YAP_UserCPredicate("gecode_constraint_dom_199", gecode_constraint_dom_199, 3); +YAP_UserCPredicate("gecode_constraint_dom_203", gecode_constraint_dom_203, 3); +YAP_UserCPredicate("gecode_constraint_dom_205", gecode_constraint_dom_205, 3); +YAP_UserCPredicate("gecode_constraint_dom_206", gecode_constraint_dom_206, 3); +YAP_UserCPredicate("gecode_constraint_dom_208", gecode_constraint_dom_208, 3); +YAP_UserCPredicate("gecode_constraint_dom_212", gecode_constraint_dom_212, 3); +YAP_UserCPredicate("gecode_constraint_dom_226", gecode_constraint_dom_226, 3); +YAP_UserCPredicate("gecode_constraint_dom_227", gecode_constraint_dom_227, 3); +YAP_UserCPredicate("gecode_constraint_dom_230", gecode_constraint_dom_230, 3); +YAP_UserCPredicate("gecode_constraint_dom_231", gecode_constraint_dom_231, 3); +YAP_UserCPredicate("gecode_constraint_dom_232", gecode_constraint_dom_232, 3); +YAP_UserCPredicate("gecode_constraint_dom_234", gecode_constraint_dom_234, 3); +YAP_UserCPredicate("gecode_constraint_dom_236", gecode_constraint_dom_236, 3); +YAP_UserCPredicate("gecode_constraint_dom_243", gecode_constraint_dom_243, 3); +YAP_UserCPredicate("gecode_constraint_dom_200", gecode_constraint_dom_200, 4); +YAP_UserCPredicate("gecode_constraint_dom_201", gecode_constraint_dom_201, 4); +YAP_UserCPredicate("gecode_constraint_dom_204", gecode_constraint_dom_204, 4); +YAP_UserCPredicate("gecode_constraint_dom_207", gecode_constraint_dom_207, 4); +YAP_UserCPredicate("gecode_constraint_dom_209", gecode_constraint_dom_209, 4); +YAP_UserCPredicate("gecode_constraint_dom_210", gecode_constraint_dom_210, 4); +YAP_UserCPredicate("gecode_constraint_dom_213", gecode_constraint_dom_213, 4); +YAP_UserCPredicate("gecode_constraint_dom_214", gecode_constraint_dom_214, 4); +YAP_UserCPredicate("gecode_constraint_dom_216", gecode_constraint_dom_216, 4); +YAP_UserCPredicate("gecode_constraint_dom_220", gecode_constraint_dom_220, 4); +YAP_UserCPredicate("gecode_constraint_dom_222", gecode_constraint_dom_222, 4); +YAP_UserCPredicate("gecode_constraint_dom_228", gecode_constraint_dom_228, 4); +YAP_UserCPredicate("gecode_constraint_dom_229", gecode_constraint_dom_229, 4); +YAP_UserCPredicate("gecode_constraint_dom_233", gecode_constraint_dom_233, 4); +YAP_UserCPredicate("gecode_constraint_dom_235", gecode_constraint_dom_235, 4); +YAP_UserCPredicate("gecode_constraint_dom_237", gecode_constraint_dom_237, 4); +YAP_UserCPredicate("gecode_constraint_dom_238", gecode_constraint_dom_238, 4); +YAP_UserCPredicate("gecode_constraint_dom_240", gecode_constraint_dom_240, 4); +YAP_UserCPredicate("gecode_constraint_dom_241", gecode_constraint_dom_241, 4); +YAP_UserCPredicate("gecode_constraint_dom_202", gecode_constraint_dom_202, 5); +YAP_UserCPredicate("gecode_constraint_dom_211", gecode_constraint_dom_211, 5); +YAP_UserCPredicate("gecode_constraint_dom_215", gecode_constraint_dom_215, 5); +YAP_UserCPredicate("gecode_constraint_dom_217", gecode_constraint_dom_217, 5); +YAP_UserCPredicate("gecode_constraint_dom_218", gecode_constraint_dom_218, 5); +YAP_UserCPredicate("gecode_constraint_dom_221", gecode_constraint_dom_221, 5); +YAP_UserCPredicate("gecode_constraint_dom_223", gecode_constraint_dom_223, 5); +YAP_UserCPredicate("gecode_constraint_dom_224", gecode_constraint_dom_224, 5); +YAP_UserCPredicate("gecode_constraint_dom_239", gecode_constraint_dom_239, 5); +YAP_UserCPredicate("gecode_constraint_dom_242", gecode_constraint_dom_242, 5); +YAP_UserCPredicate("gecode_constraint_dom_219", gecode_constraint_dom_219, 6); +YAP_UserCPredicate("gecode_constraint_dom_225", gecode_constraint_dom_225, 6); +YAP_UserCPredicate("gecode_constraint_element_244", gecode_constraint_element_244, 4); +YAP_UserCPredicate("gecode_constraint_element_246", gecode_constraint_element_246, 4); +YAP_UserCPredicate("gecode_constraint_element_248", gecode_constraint_element_248, 4); +YAP_UserCPredicate("gecode_constraint_element_254", gecode_constraint_element_254, 4); +YAP_UserCPredicate("gecode_constraint_element_256", gecode_constraint_element_256, 4); +YAP_UserCPredicate("gecode_constraint_element_260", gecode_constraint_element_260, 4); +YAP_UserCPredicate("gecode_constraint_element_262", gecode_constraint_element_262, 4); +YAP_UserCPredicate("gecode_constraint_element_245", gecode_constraint_element_245, 5); +YAP_UserCPredicate("gecode_constraint_element_247", gecode_constraint_element_247, 5); +YAP_UserCPredicate("gecode_constraint_element_249", gecode_constraint_element_249, 5); +YAP_UserCPredicate("gecode_constraint_element_255", gecode_constraint_element_255, 5); +YAP_UserCPredicate("gecode_constraint_element_257", gecode_constraint_element_257, 5); +YAP_UserCPredicate("gecode_constraint_element_261", gecode_constraint_element_261, 5); +YAP_UserCPredicate("gecode_constraint_element_263", gecode_constraint_element_263, 5); +YAP_UserCPredicate("gecode_constraint_element_250", gecode_constraint_element_250, 7); +YAP_UserCPredicate("gecode_constraint_element_252", gecode_constraint_element_252, 7); +YAP_UserCPredicate("gecode_constraint_element_258", gecode_constraint_element_258, 7); +YAP_UserCPredicate("gecode_constraint_element_264", gecode_constraint_element_264, 7); +YAP_UserCPredicate("gecode_constraint_element_251", gecode_constraint_element_251, 8); +YAP_UserCPredicate("gecode_constraint_element_253", gecode_constraint_element_253, 8); +YAP_UserCPredicate("gecode_constraint_element_259", gecode_constraint_element_259, 8); +YAP_UserCPredicate("gecode_constraint_element_265", gecode_constraint_element_265, 8); +YAP_UserCPredicate("gecode_constraint_extensional_266", gecode_constraint_extensional_266, 3); +YAP_UserCPredicate("gecode_constraint_extensional_268", gecode_constraint_extensional_268, 3); +YAP_UserCPredicate("gecode_constraint_extensional_270", gecode_constraint_extensional_270, 3); +YAP_UserCPredicate("gecode_constraint_extensional_272", gecode_constraint_extensional_272, 3); +YAP_UserCPredicate("gecode_constraint_extensional_267", gecode_constraint_extensional_267, 4); +YAP_UserCPredicate("gecode_constraint_extensional_269", gecode_constraint_extensional_269, 4); +YAP_UserCPredicate("gecode_constraint_extensional_271", gecode_constraint_extensional_271, 4); +YAP_UserCPredicate("gecode_constraint_extensional_273", gecode_constraint_extensional_273, 4); +YAP_UserCPredicate("gecode_constraint_ite_274", gecode_constraint_ite_274, 5); +YAP_UserCPredicate("gecode_constraint_ite_276", gecode_constraint_ite_276, 5); +YAP_UserCPredicate("gecode_constraint_ite_277", gecode_constraint_ite_277, 5); +YAP_UserCPredicate("gecode_constraint_ite_279", gecode_constraint_ite_279, 5); +YAP_UserCPredicate("gecode_constraint_ite_275", gecode_constraint_ite_275, 6); +YAP_UserCPredicate("gecode_constraint_ite_278", gecode_constraint_ite_278, 6); +YAP_UserCPredicate("gecode_constraint_linear_280", gecode_constraint_linear_280, 4); +YAP_UserCPredicate("gecode_constraint_linear_284", gecode_constraint_linear_284, 4); +YAP_UserCPredicate("gecode_constraint_linear_292", gecode_constraint_linear_292, 4); +YAP_UserCPredicate("gecode_constraint_linear_294", gecode_constraint_linear_294, 4); +YAP_UserCPredicate("gecode_constraint_linear_312", gecode_constraint_linear_312, 4); +YAP_UserCPredicate("gecode_constraint_linear_316", gecode_constraint_linear_316, 4); +YAP_UserCPredicate("gecode_constraint_linear_281", gecode_constraint_linear_281, 5); +YAP_UserCPredicate("gecode_constraint_linear_282", gecode_constraint_linear_282, 5); +YAP_UserCPredicate("gecode_constraint_linear_285", gecode_constraint_linear_285, 5); +YAP_UserCPredicate("gecode_constraint_linear_286", gecode_constraint_linear_286, 5); +YAP_UserCPredicate("gecode_constraint_linear_288", gecode_constraint_linear_288, 5); +YAP_UserCPredicate("gecode_constraint_linear_290", gecode_constraint_linear_290, 5); +YAP_UserCPredicate("gecode_constraint_linear_293", gecode_constraint_linear_293, 5); +YAP_UserCPredicate("gecode_constraint_linear_295", gecode_constraint_linear_295, 5); +YAP_UserCPredicate("gecode_constraint_linear_296", gecode_constraint_linear_296, 5); +YAP_UserCPredicate("gecode_constraint_linear_300", gecode_constraint_linear_300, 5); +YAP_UserCPredicate("gecode_constraint_linear_304", gecode_constraint_linear_304, 5); +YAP_UserCPredicate("gecode_constraint_linear_308", gecode_constraint_linear_308, 5); +YAP_UserCPredicate("gecode_constraint_linear_313", gecode_constraint_linear_313, 5); +YAP_UserCPredicate("gecode_constraint_linear_314", gecode_constraint_linear_314, 5); +YAP_UserCPredicate("gecode_constraint_linear_317", gecode_constraint_linear_317, 5); +YAP_UserCPredicate("gecode_constraint_linear_318", gecode_constraint_linear_318, 5); +YAP_UserCPredicate("gecode_constraint_linear_283", gecode_constraint_linear_283, 6); +YAP_UserCPredicate("gecode_constraint_linear_287", gecode_constraint_linear_287, 6); +YAP_UserCPredicate("gecode_constraint_linear_289", gecode_constraint_linear_289, 6); +YAP_UserCPredicate("gecode_constraint_linear_291", gecode_constraint_linear_291, 6); +YAP_UserCPredicate("gecode_constraint_linear_297", gecode_constraint_linear_297, 6); +YAP_UserCPredicate("gecode_constraint_linear_298", gecode_constraint_linear_298, 6); +YAP_UserCPredicate("gecode_constraint_linear_301", gecode_constraint_linear_301, 6); +YAP_UserCPredicate("gecode_constraint_linear_302", gecode_constraint_linear_302, 6); +YAP_UserCPredicate("gecode_constraint_linear_305", gecode_constraint_linear_305, 6); +YAP_UserCPredicate("gecode_constraint_linear_306", gecode_constraint_linear_306, 6); +YAP_UserCPredicate("gecode_constraint_linear_309", gecode_constraint_linear_309, 6); +YAP_UserCPredicate("gecode_constraint_linear_310", gecode_constraint_linear_310, 6); +YAP_UserCPredicate("gecode_constraint_linear_315", gecode_constraint_linear_315, 6); +YAP_UserCPredicate("gecode_constraint_linear_319", gecode_constraint_linear_319, 6); +YAP_UserCPredicate("gecode_constraint_linear_299", gecode_constraint_linear_299, 7); +YAP_UserCPredicate("gecode_constraint_linear_303", gecode_constraint_linear_303, 7); +YAP_UserCPredicate("gecode_constraint_linear_307", gecode_constraint_linear_307, 7); +YAP_UserCPredicate("gecode_constraint_linear_311", gecode_constraint_linear_311, 7); +YAP_UserCPredicate("gecode_constraint_max_320", gecode_constraint_max_320, 4); +YAP_UserCPredicate("gecode_constraint_max_321", gecode_constraint_max_321, 4); +YAP_UserCPredicate("gecode_constraint_max_325", gecode_constraint_max_325, 4); +YAP_UserCPredicate("gecode_constraint_max_322", gecode_constraint_max_322, 5); +YAP_UserCPredicate("gecode_constraint_max_323", gecode_constraint_max_323, 3); +YAP_UserCPredicate("gecode_constraint_max_324", gecode_constraint_max_324, 3); +YAP_UserCPredicate("gecode_constraint_member_326", gecode_constraint_member_326, 3); +YAP_UserCPredicate("gecode_constraint_member_330", gecode_constraint_member_330, 3); +YAP_UserCPredicate("gecode_constraint_member_327", gecode_constraint_member_327, 4); +YAP_UserCPredicate("gecode_constraint_member_328", gecode_constraint_member_328, 4); +YAP_UserCPredicate("gecode_constraint_member_331", gecode_constraint_member_331, 4); +YAP_UserCPredicate("gecode_constraint_member_332", gecode_constraint_member_332, 4); +YAP_UserCPredicate("gecode_constraint_member_329", gecode_constraint_member_329, 5); +YAP_UserCPredicate("gecode_constraint_member_333", gecode_constraint_member_333, 5); +YAP_UserCPredicate("gecode_constraint_min_334", gecode_constraint_min_334, 4); +YAP_UserCPredicate("gecode_constraint_min_335", gecode_constraint_min_335, 4); +YAP_UserCPredicate("gecode_constraint_min_339", gecode_constraint_min_339, 4); +YAP_UserCPredicate("gecode_constraint_min_336", gecode_constraint_min_336, 5); +YAP_UserCPredicate("gecode_constraint_min_337", gecode_constraint_min_337, 3); +YAP_UserCPredicate("gecode_constraint_min_338", gecode_constraint_min_338, 3); +YAP_UserCPredicate("gecode_constraint_mod_340", gecode_constraint_mod_340, 4); +YAP_UserCPredicate("gecode_constraint_mod_341", gecode_constraint_mod_341, 5); +YAP_UserCPredicate("gecode_constraint_mult_342", gecode_constraint_mult_342, 4); +YAP_UserCPredicate("gecode_constraint_mult_343", gecode_constraint_mult_343, 4); +YAP_UserCPredicate("gecode_constraint_mult_344", gecode_constraint_mult_344, 5); +YAP_UserCPredicate("gecode_constraint_nooverlap_345", gecode_constraint_nooverlap_345, 5); +YAP_UserCPredicate("gecode_constraint_nooverlap_346", gecode_constraint_nooverlap_346, 6); +YAP_UserCPredicate("gecode_constraint_nooverlap_347", gecode_constraint_nooverlap_347, 6); +YAP_UserCPredicate("gecode_constraint_nooverlap_348", gecode_constraint_nooverlap_348, 7); +YAP_UserCPredicate("gecode_constraint_nooverlap_349", gecode_constraint_nooverlap_349, 7); +YAP_UserCPredicate("gecode_constraint_nooverlap_350", gecode_constraint_nooverlap_350, 8); +YAP_UserCPredicate("gecode_constraint_nooverlap_351", gecode_constraint_nooverlap_351, 8); +YAP_UserCPredicate("gecode_constraint_nooverlap_352", gecode_constraint_nooverlap_352, 9); +YAP_UserCPredicate("gecode_constraint_nroot_353", gecode_constraint_nroot_353, 4); +YAP_UserCPredicate("gecode_constraint_nroot_354", gecode_constraint_nroot_354, 4); +YAP_UserCPredicate("gecode_constraint_nroot_355", gecode_constraint_nroot_355, 5); +YAP_UserCPredicate("gecode_constraint_nvalues_356", gecode_constraint_nvalues_356, 4); +YAP_UserCPredicate("gecode_constraint_nvalues_358", gecode_constraint_nvalues_358, 4); +YAP_UserCPredicate("gecode_constraint_nvalues_360", gecode_constraint_nvalues_360, 4); +YAP_UserCPredicate("gecode_constraint_nvalues_362", gecode_constraint_nvalues_362, 4); +YAP_UserCPredicate("gecode_constraint_nvalues_357", gecode_constraint_nvalues_357, 5); +YAP_UserCPredicate("gecode_constraint_nvalues_359", gecode_constraint_nvalues_359, 5); +YAP_UserCPredicate("gecode_constraint_nvalues_361", gecode_constraint_nvalues_361, 5); +YAP_UserCPredicate("gecode_constraint_nvalues_363", gecode_constraint_nvalues_363, 5); +YAP_UserCPredicate("gecode_constraint_path_364", gecode_constraint_path_364, 6); +YAP_UserCPredicate("gecode_constraint_path_375", gecode_constraint_path_375, 6); +YAP_UserCPredicate("gecode_constraint_path_365", gecode_constraint_path_365, 7); +YAP_UserCPredicate("gecode_constraint_path_366", gecode_constraint_path_366, 7); +YAP_UserCPredicate("gecode_constraint_path_368", gecode_constraint_path_368, 7); +YAP_UserCPredicate("gecode_constraint_path_367", gecode_constraint_path_367, 8); +YAP_UserCPredicate("gecode_constraint_path_369", gecode_constraint_path_369, 8); +YAP_UserCPredicate("gecode_constraint_path_370", gecode_constraint_path_370, 8); +YAP_UserCPredicate("gecode_constraint_path_371", gecode_constraint_path_371, 9); +YAP_UserCPredicate("gecode_constraint_path_372", gecode_constraint_path_372, 4); +YAP_UserCPredicate("gecode_constraint_path_373", gecode_constraint_path_373, 5); +YAP_UserCPredicate("gecode_constraint_path_374", gecode_constraint_path_374, 5); +YAP_UserCPredicate("gecode_constraint_pow_376", gecode_constraint_pow_376, 4); +YAP_UserCPredicate("gecode_constraint_pow_377", gecode_constraint_pow_377, 4); +YAP_UserCPredicate("gecode_constraint_pow_378", gecode_constraint_pow_378, 5); +YAP_UserCPredicate("gecode_constraint_precede_379", gecode_constraint_precede_379, 3); +YAP_UserCPredicate("gecode_constraint_precede_380", gecode_constraint_precede_380, 4); +YAP_UserCPredicate("gecode_constraint_precede_381", gecode_constraint_precede_381, 4); +YAP_UserCPredicate("gecode_constraint_precede_382", gecode_constraint_precede_382, 5); +YAP_UserCPredicate("gecode_constraint_rel_383", gecode_constraint_rel_383, 4); +YAP_UserCPredicate("gecode_constraint_rel_385", gecode_constraint_rel_385, 4); +YAP_UserCPredicate("gecode_constraint_rel_391", gecode_constraint_rel_391, 4); +YAP_UserCPredicate("gecode_constraint_rel_395", gecode_constraint_rel_395, 4); +YAP_UserCPredicate("gecode_constraint_rel_399", gecode_constraint_rel_399, 4); +YAP_UserCPredicate("gecode_constraint_rel_401", gecode_constraint_rel_401, 4); +YAP_UserCPredicate("gecode_constraint_rel_403", gecode_constraint_rel_403, 4); +YAP_UserCPredicate("gecode_constraint_rel_407", gecode_constraint_rel_407, 4); +YAP_UserCPredicate("gecode_constraint_rel_411", gecode_constraint_rel_411, 4); +YAP_UserCPredicate("gecode_constraint_rel_413", gecode_constraint_rel_413, 4); +YAP_UserCPredicate("gecode_constraint_rel_415", gecode_constraint_rel_415, 4); +YAP_UserCPredicate("gecode_constraint_rel_417", gecode_constraint_rel_417, 4); +YAP_UserCPredicate("gecode_constraint_rel_419", gecode_constraint_rel_419, 4); +YAP_UserCPredicate("gecode_constraint_rel_422", gecode_constraint_rel_422, 4); +YAP_UserCPredicate("gecode_constraint_rel_423", gecode_constraint_rel_423, 4); +YAP_UserCPredicate("gecode_constraint_rel_425", gecode_constraint_rel_425, 4); +YAP_UserCPredicate("gecode_constraint_rel_427", gecode_constraint_rel_427, 4); +YAP_UserCPredicate("gecode_constraint_rel_429", gecode_constraint_rel_429, 4); +YAP_UserCPredicate("gecode_constraint_rel_430", gecode_constraint_rel_430, 4); +YAP_UserCPredicate("gecode_constraint_rel_431", gecode_constraint_rel_431, 4); +YAP_UserCPredicate("gecode_constraint_rel_433", gecode_constraint_rel_433, 4); +YAP_UserCPredicate("gecode_constraint_rel_436", gecode_constraint_rel_436, 4); +YAP_UserCPredicate("gecode_constraint_rel_437", gecode_constraint_rel_437, 4); +YAP_UserCPredicate("gecode_constraint_rel_439", gecode_constraint_rel_439, 4); +YAP_UserCPredicate("gecode_constraint_rel_441", gecode_constraint_rel_441, 4); +YAP_UserCPredicate("gecode_constraint_rel_443", gecode_constraint_rel_443, 4); +YAP_UserCPredicate("gecode_constraint_rel_384", gecode_constraint_rel_384, 5); +YAP_UserCPredicate("gecode_constraint_rel_386", gecode_constraint_rel_386, 5); +YAP_UserCPredicate("gecode_constraint_rel_387", gecode_constraint_rel_387, 5); +YAP_UserCPredicate("gecode_constraint_rel_389", gecode_constraint_rel_389, 5); +YAP_UserCPredicate("gecode_constraint_rel_392", gecode_constraint_rel_392, 5); +YAP_UserCPredicate("gecode_constraint_rel_393", gecode_constraint_rel_393, 5); +YAP_UserCPredicate("gecode_constraint_rel_396", gecode_constraint_rel_396, 5); +YAP_UserCPredicate("gecode_constraint_rel_397", gecode_constraint_rel_397, 5); +YAP_UserCPredicate("gecode_constraint_rel_400", gecode_constraint_rel_400, 5); +YAP_UserCPredicate("gecode_constraint_rel_402", gecode_constraint_rel_402, 5); +YAP_UserCPredicate("gecode_constraint_rel_404", gecode_constraint_rel_404, 5); +YAP_UserCPredicate("gecode_constraint_rel_405", gecode_constraint_rel_405, 5); +YAP_UserCPredicate("gecode_constraint_rel_408", gecode_constraint_rel_408, 5); +YAP_UserCPredicate("gecode_constraint_rel_409", gecode_constraint_rel_409, 5); +YAP_UserCPredicate("gecode_constraint_rel_412", gecode_constraint_rel_412, 5); +YAP_UserCPredicate("gecode_constraint_rel_414", gecode_constraint_rel_414, 5); +YAP_UserCPredicate("gecode_constraint_rel_416", gecode_constraint_rel_416, 5); +YAP_UserCPredicate("gecode_constraint_rel_418", gecode_constraint_rel_418, 5); +YAP_UserCPredicate("gecode_constraint_rel_420", gecode_constraint_rel_420, 5); +YAP_UserCPredicate("gecode_constraint_rel_424", gecode_constraint_rel_424, 5); +YAP_UserCPredicate("gecode_constraint_rel_426", gecode_constraint_rel_426, 5); +YAP_UserCPredicate("gecode_constraint_rel_428", gecode_constraint_rel_428, 5); +YAP_UserCPredicate("gecode_constraint_rel_432", gecode_constraint_rel_432, 5); +YAP_UserCPredicate("gecode_constraint_rel_434", gecode_constraint_rel_434, 5); +YAP_UserCPredicate("gecode_constraint_rel_438", gecode_constraint_rel_438, 5); +YAP_UserCPredicate("gecode_constraint_rel_440", gecode_constraint_rel_440, 5); +YAP_UserCPredicate("gecode_constraint_rel_442", gecode_constraint_rel_442, 5); +YAP_UserCPredicate("gecode_constraint_rel_444", gecode_constraint_rel_444, 5); +YAP_UserCPredicate("gecode_constraint_rel_388", gecode_constraint_rel_388, 6); +YAP_UserCPredicate("gecode_constraint_rel_390", gecode_constraint_rel_390, 6); +YAP_UserCPredicate("gecode_constraint_rel_394", gecode_constraint_rel_394, 6); +YAP_UserCPredicate("gecode_constraint_rel_398", gecode_constraint_rel_398, 6); +YAP_UserCPredicate("gecode_constraint_rel_406", gecode_constraint_rel_406, 6); +YAP_UserCPredicate("gecode_constraint_rel_410", gecode_constraint_rel_410, 6); +YAP_UserCPredicate("gecode_constraint_rel_421", gecode_constraint_rel_421, 3); +YAP_UserCPredicate("gecode_constraint_rel_435", gecode_constraint_rel_435, 3); +YAP_UserCPredicate("gecode_constraint_relax_445", gecode_constraint_relax_445, 5); +YAP_UserCPredicate("gecode_constraint_sequence_446", gecode_constraint_sequence_446, 6); +YAP_UserCPredicate("gecode_constraint_sequence_448", gecode_constraint_sequence_448, 6); +YAP_UserCPredicate("gecode_constraint_sequence_447", gecode_constraint_sequence_447, 7); +YAP_UserCPredicate("gecode_constraint_sequence_449", gecode_constraint_sequence_449, 7); +YAP_UserCPredicate("gecode_constraint_sorted_450", gecode_constraint_sorted_450, 3); +YAP_UserCPredicate("gecode_constraint_sorted_451", gecode_constraint_sorted_451, 4); +YAP_UserCPredicate("gecode_constraint_sorted_452", gecode_constraint_sorted_452, 4); +YAP_UserCPredicate("gecode_constraint_sorted_453", gecode_constraint_sorted_453, 5); +YAP_UserCPredicate("gecode_constraint_sqr_454", gecode_constraint_sqr_454, 3); +YAP_UserCPredicate("gecode_constraint_sqr_455", gecode_constraint_sqr_455, 3); +YAP_UserCPredicate("gecode_constraint_sqr_456", gecode_constraint_sqr_456, 4); +YAP_UserCPredicate("gecode_constraint_sqrt_457", gecode_constraint_sqrt_457, 3); +YAP_UserCPredicate("gecode_constraint_sqrt_458", gecode_constraint_sqrt_458, 3); +YAP_UserCPredicate("gecode_constraint_sqrt_459", gecode_constraint_sqrt_459, 4); +YAP_UserCPredicate("gecode_constraint_unary_460", gecode_constraint_unary_460, 3); +YAP_UserCPredicate("gecode_constraint_unary_461", gecode_constraint_unary_461, 4); +YAP_UserCPredicate("gecode_constraint_unary_462", gecode_constraint_unary_462, 4); +YAP_UserCPredicate("gecode_constraint_unary_464", gecode_constraint_unary_464, 4); +YAP_UserCPredicate("gecode_constraint_unary_468", gecode_constraint_unary_468, 4); +YAP_UserCPredicate("gecode_constraint_unary_463", gecode_constraint_unary_463, 5); +YAP_UserCPredicate("gecode_constraint_unary_465", gecode_constraint_unary_465, 5); +YAP_UserCPredicate("gecode_constraint_unary_466", gecode_constraint_unary_466, 5); +YAP_UserCPredicate("gecode_constraint_unary_469", gecode_constraint_unary_469, 5); +YAP_UserCPredicate("gecode_constraint_unary_470", gecode_constraint_unary_470, 5); +YAP_UserCPredicate("gecode_constraint_unary_467", gecode_constraint_unary_467, 6); +YAP_UserCPredicate("gecode_constraint_unary_471", gecode_constraint_unary_471, 6); +YAP_UserCPredicate("gecode_constraint_unshare_472", gecode_constraint_unshare_472, 2); +YAP_UserCPredicate("gecode_constraint_unshare_474", gecode_constraint_unshare_474, 2); +YAP_UserCPredicate("gecode_constraint_unshare_473", gecode_constraint_unshare_473, 3); +YAP_UserCPredicate("gecode_constraint_unshare_475", gecode_constraint_unshare_475, 3); +YAP_UserCPredicate("gecode_constraint_when_476", gecode_constraint_when_476, 3); +YAP_UserCPredicate("gecode_constraint_when_477", gecode_constraint_when_477, 4); +YAP_UserCPredicate("gecode_constraint_when_478", gecode_constraint_when_478, 4); +YAP_UserCPredicate("gecode_constraint_when_479", gecode_constraint_when_479, 5); diff --git a/packages/gecode/gecode6-common.icc b/packages/gecode/gecode6-common.icc new file mode 100644 index 000000000..a912c5d1d --- /dev/null +++ b/packages/gecode/gecode6-common.icc @@ -0,0 +1,436 @@ +// -*- c++ -*- +//============================================================================= +// Copyright (C) 2011 by Denys Duchier +// +// This program is free software: you can redistribute it and/or modify it +// under the terms of the GNU Lesser General Public License as published by the +// Free Software Foundation, either version 3 of the License, or (at your +// option) any later version. +// +// This program is distributed in the hope that it will be useful, but WITHOUT +// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +// more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with this program. If not, see . +//============================================================================= + +#ifndef GECODE_COMMON +#define GECODE_COMMON + +#if defined(_MSC_VER) || defined(__MINGW32__) +#define __i386__ 1 +#if __x86_64__ +#define _WIN64 1 +#define _AMD64_ 1 +#endif +#include +#endif + + +#include "gecode/driver.hh" +#include "gecode/int.hh" +#include "gecode/set.hh" +#include "gecode/search.hh" +#include + +namespace generic_gecode +{ + using namespace std; + using namespace Gecode; + + // description of the optimization criterion + struct Optimizing + { + enum What { OPT_NONE, OPT_INT, OPT_RATIO }; + enum How { OPT_MIN, OPT_MAX }; + int num; + int den; + What what; + How how; + Optimizing(): num(-1), den(-1), what(OPT_NONE), how(OPT_MAX) {} + Optimizing(Optimizing& o) + : num(o.num), den(o.den), what(o.what), how(o.how) {} + void check_ok() const + { if (what!=OPT_NONE) + throw Exception("gecode-python","too many optimization criteria"); } + void maximize(int i) + { check_ok(); what = OPT_INT; how = OPT_MAX; num = i; }; + void maximize(int i,int j) + { check_ok(); what = OPT_RATIO; how = OPT_MAX; num = i; den = j; }; + void minimize(int i) + { check_ok(); what = OPT_INT; how = OPT_MIN; num = i; }; + void minimize(int i,int j) + { check_ok(); what = OPT_RATIO; how = OPT_MIN; num = i; den = j; }; + }; + + class GenericSpace; + + + struct GenericEngine + { + GenericSpace* next(void); + // virtual ~GenericEngine() {}; + }; + + struct GenericDFS: GenericEngine + { + DFS engine; + GenericDFS(GenericSpace* s,Search::Options& opt) : engine(s,opt) {} + GenericSpace* next(void) { return engine.next(); } + }; + + struct GenericRestartDFS: GenericEngine + { + RBS engine; + GenericRestartDFS(GenericSpace* s,Search::Options& opt) : engine(s,opt) {} + GenericSpace* next(void) { return engine.next(); } + }; + + + + struct GenericBAB: GenericEngine + { + BAB engine; + GenericBAB(GenericSpace* s,Search::Options& opt) : engine(s,opt) {} + GenericSpace* next(void) { return engine.next(); } + }; + + struct GenericRestartBAB: GenericEngine + { + RBS engine; + GenericRestartBAB(GenericSpace* s,Search::Options& opt) : engine(s,opt) {} + GenericSpace* next(void) { return engine.next(); } + }; + +#ifdef OLD + struct GenericRestart: GenericEngine + { + Restart engine; + GenericRestart(GenericSpace* s,Search::Options& opt): engine(s,opt) {} + virtual GenericSpace* next(void) { return engine.next(); } + }; +#endif + + struct LoadingDock + { + vector ivars; + vector bvars; + vector fvars; + vector svars; + vector ikeep; + vector bkeep; + vector fkeep; + vector skeep; + + bool keeping_some() const + { + return (ikeep.size() != 0) + || (bkeep.size() != 0) + || (fkeep.size() != 0) + || (skeep.size() != 0); + } + + IntVar get_ivar(int i) const { return ivars[i]; } + BoolVar get_bvar(int i) const { return bvars[i]; } + FloatVar get_fvar(int i) const { return fvars[i]; } + SetVar get_svar(int i) const { return svars[i]; } + + int enter_ivar(const IntVar& v) + { ivars.push_back(v); return static_cast(ivars.size()-1); } + + int enter_bvar(const BoolVar& v) + { bvars.push_back(v); return static_cast(bvars.size()-1); } + + int enter_fvar(const FloatVar& v) + { fvars.push_back(v); return static_cast(fvars.size()-1); } + + int enter_svar(const SetVar& v) + { svars.push_back(v); return static_cast(svars.size()-1); } + + int keep_ivar(int i) { ikeep.push_back(i); return static_cast(ikeep.size()-1); } + int keep_bvar(int i) { bkeep.push_back(i); return static_cast(bkeep.size()-1); } + int keep_fvar(int i) { fkeep.push_back(i); return static_cast(fkeep.size()-1); } + int keep_svar(int i) { skeep.push_back(i); return static_cast(skeep.size()-1); } + + void freeze(Space& home, + IntVarArray& iarr, BoolVarArray& barr, SetVarArray& sarr, FloatVarArray& farr, + int& num, int& den) + { + if (keeping_some()) + { + // make sure that optimization vars (if any) are kept + if (num != -1) + { + const int _num(num); + const int _den(den); + int n = static_cast(ikeep.size()); + bool num_found(false); + bool den_found(false); + for (;n--;) + { + const int idx(ikeep[n]); + if (idx==_num) + { num_found=true; if (den_found) break; } + if (idx==_den) + { den_found=true; if (num_found) break; } + } + if (!num_found) + { ikeep.push_back(_num); + num=static_cast(ikeep.size()-1); } + if (_den != -1 && !den_found) + { ikeep.push_back(_den); + den=static_cast(ikeep.size()-1); } + } + { int n = static_cast(ikeep.size()); + iarr = IntVarArray(home, n); + for (;n--;) iarr[n]=ivars[ikeep[n]]; } + { int n = static_cast(bkeep.size()); + barr = BoolVarArray(home, n); + for (;n--;) barr[n]=bvars[bkeep[n]]; } + { int n = static_cast(skeep.size()); + sarr = SetVarArray(home, n); + for (;n--;) sarr[n]=svars[skeep[n]]; } + { int n = static_cast(fkeep.size()); + farr = FloatVarArray(home, n); + for (;n--;) farr[n]=fvars[skeep[n]]; } + } + else + { + { int n = static_cast(ivars.size()); + iarr = IntVarArray(home, n); + for (;n--;) iarr[n]=ivars[n]; } + { int n = static_cast(bvars.size()); + barr = BoolVarArray(home, n); + for (;n--;) barr[n]=bvars[n]; } + { int n = static_cast(svars.size()); + sarr = SetVarArray(home, n); + for (;n--;) sarr[n]=svars[n]; } + { int n = static_cast(fvars.size()); + farr = FloatVarArray(home, n); + for (;n--;) farr[n]=fvars[n]; } + } + } + }; + + class GenericSpace: public Space + { + Optimizing optim; + IntVarArray ivars; + BoolVarArray bvars; + FloatVarArray fvars; + SetVarArray svars; + LoadingDock* dock; + bool keeping_some; // iff only SOME of the vars are kept + public: + Space* space() { return this; } + + GenericSpace copy(bool share) + { freeze(); return *new GenericSpace(share, *this); } + + + GenericSpace(bool share, GenericSpace& s) + : Space( s), optim(s.optim), dock(NULL), keeping_some(s.keeping_some) + { + ivars.update(*this, s.ivars); + bvars.update(*this, s.bvars); + svars.update(*this, s.svars); + fvars.update(*this, s.fvars); + } + + + GenericSpace() : dock(new LoadingDock()), keeping_some(false) {} + ~GenericSpace() { delete dock; } + + // throw some C++ exception on behalf of glue code + void kaboom(const char* s) + { throw Exception("gecode-python", s); } + int ikaboom(const char* s) + { kaboom(s); return 0; } + + // freeze the space before handing it off to a search engine + void freeze() + { + if (dock) + { + keeping_some = dock->keeping_some(); + dock->freeze(*this, ivars, bvars, svars, fvars, optim.num, optim.den); + delete dock; + dock = NULL; + } + } + + IntVar get_ivar(int i) const { return (dock)?dock->get_ivar(i):ivars[i]; } + BoolVar get_bvar(int i) const { return (dock)?dock->get_bvar(i):bvars[i]; } + SetVar get_svar(int i) const { return (dock)?dock->get_svar(i):svars[i]; } + FloatVar get_fvar(int i) const { return (dock)?dock->get_fvar(i):fvars[i]; } + + int keep_ivar(int i) + { + if (dock) return dock->keep_ivar(i); + else return ikaboom("too late to keep"); + } + + int keep_bvar(int i) + { + if (dock) return dock->keep_bvar(i); + else return ikaboom("too late to keep"); + } + + int keep_svar(int i) + { + if (dock) return dock->keep_svar(i); + else return ikaboom("too late to keep"); + } + + int keep_fvar(int i) + { + if (dock) return dock->keep_fvar(i); + else return ikaboom("too late to keep"); + } + + bool frozen() const { return dock==NULL; } + bool has_keepers() const { return keeping_some; } + // when frozen and has_keepers: which is just has_keepers actually + bool use_keep_index() const { return has_keepers(); } + + GenericEngine* new_engine(bool restart, Search::Options& opt) + { + freeze(); + return (optim.what == Optimizing::OPT_NONE) + ? ( restart + ? static_cast(new GenericRestartDFS(this,opt)) + : static_cast(new GenericDFS(this,opt)) ) + : (restart + ? static_cast(new GenericRestartBAB(this,opt)) + : + static_cast(new GenericBAB(this,opt)) ); + } + + int _new_ivar(IntVar& v) + { + if (dock) return dock->enter_ivar(v); + else return ikaboom("too late to create vars"); + } + + int new_ivar(int lo, int hi) + { + IntVar v(*this, lo, hi); + return _new_ivar(v); + } + + int new_ivar(IntSet& s) + { + IntVar v(*this, s); + return _new_ivar(v); + } + + int _new_fvar(FloatVar& v) + { + if (dock) return dock->enter_fvar(v); + else return ikaboom("too late to create vars"); + } + + int new_fvar(double lo, double hi) + { + FloatVar v(*this, lo, hi); + return _new_fvar(v); + } + + int _new_bvar(BoolVar& v) + { + if (dock) return dock->enter_bvar(v); + else return ikaboom("too late to create vars"); + } + + int new_bvar() + { + BoolVar v(*this, 0, 1); + return _new_bvar(v); + } + + int _new_svar(SetVar& v) + { + if (dock) return dock->enter_svar(v); + else return ikaboom("too late to create vars"); + } + + int new_svar(int glbMin, int glbMax, int lubMin, int lubMax, + unsigned int cardMin=0, + unsigned int cardMax=Set::Limits::card) + { + SetVar v(*this, glbMin, glbMax, lubMin, lubMax, cardMin, cardMax); + return _new_svar(v); + } + + int new_ssvar(int glbMin, int glbMax, IntSet lubMin, IntSet lubMax, + unsigned int cardMin=0, + unsigned int cardMax=Set::Limits::card) + { + SetVar v(*this, glbMin, glbMax, lubMin, lubMax, cardMin, cardMax); + return _new_svar(v); + } + + int new_ssvar(IntSet glb, int lubMin, int lubMax, + unsigned int cardMin=0, + unsigned int cardMax=Set::Limits::card) + { + SetVar v(*this, glb, lubMin, lubMax, cardMin, cardMax); + return _new_svar(v); + } + + int new_svar(int glbMin, int glbMax, IntSet lub, + unsigned int cardMin=0, + unsigned int cardMax=Set::Limits::card) + { + SetVar v(*this, glbMin, glbMax, lub, cardMin, cardMax); + return _new_svar(v); + } + + int new_sssvar(IntSet glb, IntSet lub, + unsigned int cardMin=0, + unsigned int cardMax=Set::Limits::card) + { + SetVar v(*this, glb, lub, cardMin, cardMax); + return _new_svar(v); + } + + void minimize(int i) { optim.minimize(i); } + void minimize(int i, int j) { optim.minimize(i,j); } + void maximize(int i) { optim.maximize(i); } + void maximize(int i, int j) { optim.maximize(i,j); } + + void constrain(const Space& s) + { + const GenericSpace& sol = static_cast(s); + switch (optim.what) + { + case Optimizing::OPT_NONE: + break; + case Optimizing::OPT_INT: + rel(*this, ivars[optim.num], + ((optim.how==Optimizing::OPT_MIN) ? IRT_LE : IRT_GR), + sol.ivars[optim.num].val()); + break; + case Optimizing::OPT_RATIO: + { + IntArgs c(2, sol.ivars[optim.den].val(), + - sol.ivars[optim.num].val()); + IntVarArgs v(2); + v[0] = ivars[optim.num]; + v[1] = ivars[optim.den]; + linear(*this, c, v, + ((optim.how==Optimizing::OPT_MIN) ? IRT_LE : IRT_GR), 0); + break; + } + } + } + }; +} + +#ifdef DISJUNCTOR +#include "disjunctor.icc" +#endif + +#endif diff --git a/packages/gecode/gecode6.yap b/packages/gecode/gecode6.yap new file mode 100644 index 000000000..9fbd857bf --- /dev/null +++ b/packages/gecode/gecode6.yap @@ -0,0 +1,7 @@ + +/* just for program analysis */ + + + +:- include(gecode6_yap_hand_written). +:- include('6.0.0/gecode_yap_auto_generated'). diff --git a/packages/gecode/gecode6_yap.cc b/packages/gecode/gecode6_yap.cc new file mode 100644 index 000000000..a58ddfd3e --- /dev/null +++ b/packages/gecode/gecode6_yap.cc @@ -0,0 +1,2111 @@ +// -*- c++ -*- +//============================================================================= +// Copyright (C) 2011 by Denys Duchier +// +// This program is free software: you can redistribute it and/or modify it +// under the terms of the GNU Lesser General Public License as published by the +// Free Software Foundation, either version 3 of the License, or (at your +// option) any later version. +// +// This program is distributed in the hope that it will be useful, but WITHOUT +// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +// more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with this program. If not, see . +//============================================================================= + +#include "gecode6-common.icc" +#include +using namespace std; +using namespace generic_gecode; +using namespace Gecode; + +extern "C" +{ +void gecode_init(void); + +#include "config.h" +} + +namespace generic_gecode +{ +#ifndef HAVE_DYNARRAY + template struct DynArray + { + T* _array; + DynArray(int n): _array(new T[n]) {} + ~DynArray() { delete[] _array; } + T& operator[](int i) { return _array[i]; } + }; +#define DYNARRAY(T,A,N) DynArray A(N) +#else +#define DYNARRAY(T,A,N) T A[N] +#endif + +#ifndef HAVE_DYNARRAY + struct SpecArray + { + int (*_array)[2]; + SpecArray(int n): _array((int (*)[2]) new int[n*2]) {} + ~SpecArray() { delete[] _array; } + int& operator()(int i,int j) { return _array[i][j]; } + }; +#define SPECARRAY(A,N) SpecArray A(N) +#define SPECARRAYELEM(A,I,J) A(I,J) +#define SPECARRAYDEREF(A) A._array +#else +#define SPECARRAY(A,N) int A[N][2] +#define SPECARRAYELEM(A,I,J) A[I][J] +#define SPECARRAYDEREF(A) A +#endif +} + +extern "C" +{ +#include "YapInterface.h" + + static YAP_opaque_tag_t gecode_space_tag; + static YAP_opaque_handler_t gecode_space_handler; + + static YAP_Bool gecode_space_fail_handler(YAP_Term t) + { + delete *(GenericSpace **)YAP_OpaqueObjectFromTerm(YAP_HeadOfTerm(t)); + return TRUE; + } + + static YAP_Bool + gecode_space_write_handler + (FILE *stream, YAP_opaque_tag_t type, void *p, int flags) + { + fprintf(stream,"", p); + return TRUE; + } + + static YAP_Term gecode_term_from_space(GenericSpace* s) + { + YAP_Term term = + YAP_NewOpaqueObject(gecode_space_tag, sizeof(GenericSpace*)); + GenericSpace** ptr = + (GenericSpace**) YAP_OpaqueObjectFromTerm(term); + *ptr = s; + return term; + } + + static YAP_Bool gecode_new_space(void) + { + YAP_Term term = gecode_term_from_space(new GenericSpace); + return YAP_Unify(YAP_ARG1, term); + } + + +#ifndef DISJUNCTOR + static inline GenericSpace* + gecode_Space_from_term(YAP_Term t) + { + return * (GenericSpace**) YAP_OpaqueObjectFromTerm(t); + } +#else + struct YapDisjunctor + { + GenericSpace* home; + Disjunctor disj; + YapDisjunctor(GenericSpace* home_) + : home(home_), disj(*home_) {} + }; + + static YAP_opaque_tag_t gecode_disjunctor_tag; + static YAP_opaque_handler_t gecode_disjunctor_handler; + static YAP_opaque_tag_t gecode_disjunctor_clause_tag; + static YAP_opaque_handler_t gecode_disjunctor_clause_handler; + + static inline Disjunctor& + gecode_Disjunctor_from_term(YAP_Term t) + { + return ((YapDisjunctor*) YAP_OpaqueObjectFromTerm(t))->disj; + } + + static inline YapDisjunctor& + gecode_YapDisjunctor_from_term(YAP_Term t) + { + return * (YapDisjunctor*) YAP_OpaqueObjectFromTerm(t); + } + + static inline Clause& + gecode_Clause_from_term(YAP_Term t) + { + return * (Clause*) YAP_OpaqueObjectFromTerm(t); + } + + static inline GenericSpace* + gecode_Space_from_term(YAP_Term t) + { + if (YAP_IsOpaqueObjectTerm(t, gecode_disjunctor_clause_tag)) + { + Clause& c = gecode_Clause_from_term(t); + return & (GenericSpace&) c; + } + return * (GenericSpace**) YAP_OpaqueObjectFromTerm(t); + } +#endif + + static inline FloatAssign& + gecode_FloatAssign_from_term(YAP_Term t) + { + return * (FloatAssign*) YAP_OpaqueObjectFromTerm(t); + } + +static inline BoolAssign& + gecode_BoolAssign_from_term(YAP_Term t) + { + return * (BoolAssign*) YAP_OpaqueObjectFromTerm(t); + } + + static inline IntAssign& + gecode_IntAssign_from_term(YAP_Term t) + { + return * (IntAssign*) YAP_OpaqueObjectFromTerm(t); + } + + static inline SetAssign& + gecode_SetAssign_from_term(YAP_Term t) + { + return * (SetAssign*) YAP_OpaqueObjectFromTerm(t); + } + + static inline TupleSet& + gecode_TupleSet_from_term(YAP_Term t) + { + return *(TupleSet *) YAP_OpaqueObjectFromTerm(t); + } + + static inline DFA& + gecode_DFA_from_term(YAP_Term t) + { + return *(DFA *) YAP_OpaqueObjectFromTerm(t); + } + + static inline Rnd& + gecode_Rnd_from_term(YAP_Term t) + { + return *(Rnd *) YAP_OpaqueObjectFromTerm(t); + } + + static inline std::function& + gecode_std_function_from_term(YAP_Term t) + { + return *(std::function *) YAP_OpaqueObjectFromTerm(t); + } + + static inline FloatNum + gecode_FloatNum_from_term(YAP_Term t) + { + return (FloatNum) YAP_FloatOfTerm(t); + } + + static YAP_Term gecode_SET_VAR_NONE; + static YAP_Term gecode_SET_VAR_DEGREE_MIN; + static YAP_Term gecode_SET_VAR_DEGREE_MAX; + static YAP_Term gecode_SET_VAR_MIN_MIN; + static YAP_Term gecode_SET_VAR_MIN_MAX; + static YAP_Term gecode_SET_VAR_MAX_MIN; + static YAP_Term gecode_SET_VAR_MAX_MAX; + static YAP_Term gecode_SET_VAR_SIZE_MIN; + static YAP_Term gecode_SET_VAR_SIZE_MAX; + static YAP_Term gecode_SET_VAR_DEGREE_SIZE_MIN; + static YAP_Term gecode_SET_VAR_DEGREE_SIZE_MAX; + + static inline SetVarBranch + gecode_SetVarBranch_from_term(YAP_Term t) + { + + if (YAP_IsAtomTerm(t)) { + if ( t == gecode_SET_VAR_SIZE_MIN) + return SET_VAR_SIZE_MIN(); + if ( t == gecode_SET_VAR_SIZE_MAX) + return SET_VAR_SIZE_MAX(); + if ( t == gecode_SET_VAR_NONE) + return SET_VAR_NONE(); + if ( t == gecode_SET_VAR_DEGREE_MIN) + return SET_VAR_DEGREE_MIN(); + if ( t == gecode_SET_VAR_DEGREE_MAX) + return SET_VAR_DEGREE_MAX(); + if ( t == gecode_SET_VAR_MIN_MIN) + return SET_VAR_MIN_MIN(); + if ( t == gecode_SET_VAR_MIN_MAX) + return SET_VAR_MIN_MAX(); + if ( t == gecode_SET_VAR_MAX_MIN) + return SET_VAR_MAX_MIN(); + if ( t == gecode_SET_VAR_MAX_MAX) + return SET_VAR_MAX_MAX(); + if ( t == gecode_SET_VAR_DEGREE_SIZE_MIN) + return SET_VAR_DEGREE_SIZE_MIN(); + if ( t == gecode_SET_VAR_DEGREE_SIZE_MAX) + return SET_VAR_DEGREE_SIZE_MAX(); + } + cerr << "unsupported SET VAR" << endl; exit(1); + } + + static YAP_Term gecode_SET_VAL_MIN_INC; + static YAP_Term gecode_SET_VAL_MIN_EXC; + static YAP_Term gecode_SET_VAL_MED_INC; + static YAP_Term gecode_SET_VAL_MED_EXC; + static YAP_Term gecode_SET_VAL_MAX_INC; + static YAP_Term gecode_SET_VAL_MAX_EXC; + + static inline SetValBranch + gecode_SetValBranch_from_term(YAP_Term t) + { + if (YAP_IsAtomTerm(t)) { + if ( t == gecode_SET_VAL_MIN_INC) + return SET_VAL_MIN_INC(); + if ( t == gecode_SET_VAL_MIN_EXC) + return SET_VAL_MIN_EXC(); + if ( t == gecode_SET_VAL_MED_INC) + return SET_VAL_MED_INC(); + if ( t == gecode_SET_VAL_MED_EXC) + return SET_VAL_MED_EXC(); + if ( t == gecode_SET_VAL_MAX_INC) + return SET_VAL_MAX_INC(); + if ( t == gecode_SET_VAL_MAX_EXC) + return SET_VAL_MAX_EXC(); + } + cerr << "unsupported INT VAL" << endl; exit(1); + } + + static inline SetBranchFilter& + gecode_SetBranchFilter_from_term(YAP_Term t) + { + return * (SetBranchFilter*) YAP_OpaqueObjectFromTerm(t); + } + + static YAP_Term gecode_INT_VAR_NONE; + static YAP_Term gecode_INT_VAR_DEGREE_MIN; + static YAP_Term gecode_INT_VAR_DEGREE_MAX; + static YAP_Term gecode_INT_VAR_MIN_MIN; + static YAP_Term gecode_INT_VAR_MIN_MAX; + static YAP_Term gecode_INT_VAR_MAX_MIN; + static YAP_Term gecode_INT_VAR_MAX_MAX; + static YAP_Term gecode_INT_VAR_SIZE_MIN; + static YAP_Term gecode_INT_VAR_SIZE_MAX; + static YAP_Term gecode_INT_VAR_DEGREE_SIZE_MIN; + static YAP_Term gecode_INT_VAR_DEGREE_SIZE_MAX; + static YAP_Term gecode_INT_VAR_REGRET_MIN_MIN; + static YAP_Term gecode_INT_VAR_REGRET_MIN_MAX; + static YAP_Term gecode_INT_VAR_REGRET_MAX_MIN; + static YAP_Term gecode_INT_VAR_REGRET_MAX_MAX; + + static inline IntVarBranch + gecode_IntVarBranch_from_term(YAP_Term t) + { + if (YAP_IsAtomTerm(t)) { + if ( t == gecode_INT_VAR_SIZE_MIN) + return INT_VAR_SIZE_MIN(); + if ( t == gecode_INT_VAR_SIZE_MAX) + return INT_VAR_SIZE_MAX(); + if ( t == gecode_INT_VAR_NONE) + return INT_VAR_NONE(); + if ( t == gecode_INT_VAR_DEGREE_MIN) + return INT_VAR_DEGREE_MIN(); + if ( t == gecode_INT_VAR_DEGREE_MAX) + return INT_VAR_DEGREE_MAX(); + if ( t == gecode_INT_VAR_MIN_MIN) + return INT_VAR_MIN_MIN(); + if ( t == gecode_INT_VAR_MIN_MAX) + return INT_VAR_MIN_MAX(); + if ( t == gecode_INT_VAR_MAX_MIN) + return INT_VAR_MAX_MIN(); + if ( t == gecode_INT_VAR_MAX_MAX) + return INT_VAR_MAX_MAX(); + if ( t == gecode_INT_VAR_DEGREE_SIZE_MIN) + return INT_VAR_DEGREE_SIZE_MIN(); + if ( t == gecode_INT_VAR_DEGREE_SIZE_MAX) + return INT_VAR_DEGREE_SIZE_MAX(); + if ( t == gecode_INT_VAR_REGRET_MIN_MIN) + return INT_VAR_REGRET_MIN_MIN(); + if ( t == gecode_INT_VAR_REGRET_MIN_MAX) + return INT_VAR_REGRET_MIN_MAX(); + if ( t == gecode_INT_VAR_REGRET_MAX_MIN) + return INT_VAR_REGRET_MAX_MIN(); + if ( t == gecode_INT_VAR_REGRET_MAX_MAX) + return INT_VAR_REGRET_MAX_MAX(); + } + cerr << "unsupported INT VAR" << endl; exit(1); + } + +static YAP_Term gecode_BOOL_VAR_NONE; +static YAP_Term gecode_BOOL_VAR_RND; + // static YAP_Term gecode_BOOL_VAR_MERIT_MIN; + // static YAP_Term gecode_BOOL_VAR_MERIT_MAX; + static YAP_Term gecode_BOOL_VAR_DEGREE_MIN; + static YAP_Term gecode_BOOL_VAR_DEGREE_MAX; + static YAP_Term gecode_BOOL_VAR_MAX_MIN; + static YAP_Term gecode_BOOL_VAR_MAX_MAX; + static YAP_Term gecode_BOOL_VAR_AFC_MIN; + static YAP_Term gecode_BOOL_VAR_AFC_MAX; + static YAP_Term gecode_BOOL_VAR_ACTION_MIN; + static YAP_Term gecode_BOOL_VAR_ACTION_MAX; + static YAP_Term gecode_BOOL_VAR_CHB_MIN; + static YAP_Term gecode_BOOL_VAR_CHB_MAX; + + static inline BoolVarBranch + gecode_BoolVarBranch_from_term(YAP_Term t) + { + if (YAP_IsAtomTerm(t)) { + if ( t == gecode_BOOL_VAR_NONE) + return BOOL_VAR_NONE(); + if ( t == gecode_BOOL_VAR_RND) + return BOOL_VAR_RND(Rnd()); + // if ( t == gecode_BOOL_VAR_MERIT_MIN) + // return BOOL_VAR_MERIT_MIN(); + // if ( t == gecode_BOOL_VAR_MERIT_MAX) + // return BOOL_VAR_MERIT_MAX(); + if ( t == gecode_BOOL_VAR_DEGREE_MIN) + return BOOL_VAR_DEGREE_MIN(); + if ( t == gecode_BOOL_VAR_DEGREE_MAX) + return BOOL_VAR_DEGREE_MAX(); + if ( t == gecode_BOOL_VAR_AFC_MIN) + return BOOL_VAR_AFC_MIN(); + if ( t == gecode_BOOL_VAR_AFC_MAX) + return BOOL_VAR_AFC_MAX(); + if ( t == gecode_BOOL_VAR_ACTION_MIN) + return BOOL_VAR_ACTION_MIN(); + if ( t == gecode_BOOL_VAR_ACTION_MAX) + return BOOL_VAR_ACTION_MAX(); + if ( t == gecode_BOOL_VAR_CHB_MIN) + return BOOL_VAR_CHB_MIN(); + if ( t == gecode_BOOL_VAR_CHB_MAX) + return BOOL_VAR_CHB_MAX(); + } + cerr << "unsupported INT VAR" << endl; exit(1); + } + + static YAP_Term gecode_FLOAT_VAR_NONE; + static YAP_Term gecode_FLOAT_VAR_DEGREE_MIN; + static YAP_Term gecode_FLOAT_VAR_DEGREE_MAX; + static YAP_Term gecode_FLOAT_VAR_MIN_MIN; + static YAP_Term gecode_FLOAT_VAR_MIN_MAX; + static YAP_Term gecode_FLOAT_VAR_MAX_MIN; + static YAP_Term gecode_FLOAT_VAR_MAX_MAX; + static YAP_Term gecode_FLOAT_VAR_SIZE_MIN; + static YAP_Term gecode_FLOAT_VAR_SIZE_MAX; + static YAP_Term gecode_FLOAT_VAR_DEGREE_SIZE_MAX; + static YAP_Term gecode_FLOAT_VAR_DEGREE_SIZE_MIN; + + static inline FloatVarBranch + gecode_FloatVarBranch_from_term(YAP_Term t) + { + if (YAP_IsAtomTerm(t)) { + if ( t == gecode_FLOAT_VAR_SIZE_MIN) + return FLOAT_VAR_SIZE_MIN(); + if ( t == gecode_FLOAT_VAR_SIZE_MAX) + return FLOAT_VAR_SIZE_MAX(); + if ( t == gecode_FLOAT_VAR_NONE) + return FLOAT_VAR_NONE(); + if ( t == gecode_FLOAT_VAR_DEGREE_MIN) + return FLOAT_VAR_DEGREE_MIN(); + if ( t == gecode_FLOAT_VAR_DEGREE_MAX) + return FLOAT_VAR_DEGREE_MAX(); + if ( t == gecode_FLOAT_VAR_MIN_MIN) + return FLOAT_VAR_MIN_MIN(); + if ( t == gecode_FLOAT_VAR_MIN_MAX) + return FLOAT_VAR_MIN_MAX(); + if ( t == gecode_FLOAT_VAR_MAX_MIN) + return FLOAT_VAR_MAX_MIN(); + if ( t == gecode_FLOAT_VAR_MAX_MAX) + return FLOAT_VAR_MAX_MAX(); + if ( t == gecode_FLOAT_VAR_DEGREE_SIZE_MIN) + return FLOAT_VAR_DEGREE_SIZE_MIN(); + if ( t == gecode_FLOAT_VAR_DEGREE_SIZE_MAX) + return FLOAT_VAR_DEGREE_SIZE_MAX(); + } + cerr << "unsupported FLOAT VAR" << endl; exit(1); + } + + static YAP_Term gecode_INT_VAL_MIN; + static YAP_Term gecode_INT_VAL_MED; + static YAP_Term gecode_INT_VAL_MAX; + static YAP_Term gecode_INT_VAL_SPLIT_MIN; + static YAP_Term gecode_INT_VAL_SPLIT_MAX; + static YAP_Term gecode_INT_VAL_RANGE_MIN; + static YAP_Term gecode_INT_VAL_RANGE_MAX; + static YAP_Term gecode_INT_VALUES_MIN; + static YAP_Term gecode_INT_VALUES_MAX; + + static inline IntValBranch + gecode_IntValBranch_from_term(YAP_Term t) + { + if (YAP_IsAtomTerm(t)) { + if ( t == gecode_INT_VAL_MIN) + return INT_VAL_MIN(); + if ( t == gecode_INT_VAL_MED) + return INT_VAL_MED(); + if ( t == gecode_INT_VAL_MAX) + return INT_VAL_MAX(); + if ( t == gecode_INT_VAL_SPLIT_MIN) + return INT_VAL_SPLIT_MIN(); + if ( t == gecode_INT_VAL_SPLIT_MAX) + return INT_VAL_SPLIT_MAX(); + if ( t == gecode_INT_VAL_RANGE_MIN) + return INT_VAL_RANGE_MIN(); + if ( t == gecode_INT_VAL_RANGE_MAX) + return INT_VAL_RANGE_MAX(); + if ( t == gecode_INT_VALUES_MIN) + return INT_VALUES_MIN(); + if ( t == gecode_INT_VALUES_MAX) + return INT_VALUES_MAX(); + } + cerr << "unsupported INT VAL" << endl; exit(1); + } + + static YAP_Term gecode_BOOL_VAL_MIN; + static YAP_Term gecode_BOOL_VAL_MAX; + static YAP_Term gecode_BOOL_VAL_RND; + + static inline BoolValBranch + gecode_BoolValBranch_from_term(YAP_Term t) + { + if (YAP_IsAtomTerm(t)) { + if ( t == gecode_BOOL_VAL_MIN) + return BOOL_VAL_MIN(); + if ( t == gecode_BOOL_VAL_MAX) + return BOOL_VAL_MAX(); + if ( t == gecode_BOOL_VAL_RND) +return BOOL_VAL_RND(Rnd()); + } + cerr << "unsupported BOOL VAL" << endl; exit(1); + } + // + // static inline BoolVal& + // gecode_BoolVal_from_term(YAP_Term t) + // { + // return * (BoolVal*) YAP_OpaqueObjectFromTerm(t); + // } + // + + static YAP_Term gecode_FLOAT_VAL_SPLIT_MIN; + static YAP_Term gecode_FLOAT_VAL_SPLIT_MAX; + + static inline FloatValBranch + gecode_FloatValBranch_from_term(YAP_Term t) + { + if (YAP_IsAtomTerm(t)) { + if ( t == gecode_FLOAT_VAL_SPLIT_MIN) + return FLOAT_VAL_SPLIT_MIN(); + if ( t == gecode_FLOAT_VAL_SPLIT_MAX) + return FLOAT_VAL_SPLIT_MAX(); + } + cerr << "unsupported FLOAT VAL" << endl; exit(1); + } + + static inline FloatVal& + gecode_FloatVal_from_term(YAP_Term t) + { + return * (FloatVal*) YAP_OpaqueObjectFromTerm(t); + } + + static inline Symmetries& + gecode_Symmetries_from_term(YAP_Term t) + { + return * (Symmetries*) YAP_OpaqueObjectFromTerm(t); + } + + static inline IntBranchFilter& + gecode_IntBranchFilter_from_term(YAP_Term t) + { + return * (IntBranchFilter*) YAP_OpaqueObjectFromTerm(t); + } + + static inline BoolBranchFilter& + gecode_BoolBranchFilter_from_term(YAP_Term t) + { + return * (BoolBranchFilter*) YAP_OpaqueObjectFromTerm(t); + } + + static inline FloatBranchFilter& + gecode_FloatBranchFilter_from_term(YAP_Term t) + { + return * (FloatBranchFilter*) YAP_OpaqueObjectFromTerm(t); + } + + static inline SetVarValPrint& + gecode_SetVarValPrint_from_term(YAP_Term t) + { + return * (SetVarValPrint*) YAP_OpaqueObjectFromTerm(t); + } + + static inline IntVarValPrint& + gecode_IntVarValPrint_from_term(YAP_Term t) + { + return * (IntVarValPrint*) YAP_OpaqueObjectFromTerm(t); + } + + static inline BoolVarValPrint& + gecode_BoolVarValPrint_from_term(YAP_Term t) + { + return * (BoolVarValPrint*) YAP_OpaqueObjectFromTerm(t); + } + + static inline FloatVarValPrint& + gecode_FloatVarValPrint_from_term(YAP_Term t) + { + return * (FloatVarValPrint*) YAP_OpaqueObjectFromTerm(t); + } + + static YAP_opaque_tag_t gecode_engine_tag; + static YAP_opaque_handler_t gecode_engine_handler; + + static RestartMode gecode_RestartMode_from_term(YAP_Term t); + + static YAP_Bool gecode_new_engine(void) + { + YAP_Term arg1 = YAP_ARG1; + YAP_Term arg2 = YAP_ARG2; + YAP_Term arg3 = YAP_ARG3; + bool restart = YAP_IntOfTerm(YAP_ArgOfTerm(1, arg3)); + double threads = YAP_FloatOfTerm(YAP_ArgOfTerm(2, arg3)); + unsigned int c_d = YAP_IntOfTerm(YAP_ArgOfTerm(3, arg3)); + unsigned int a_d = YAP_IntOfTerm(YAP_ArgOfTerm(4, arg3)); + unsigned int nogoods_limit = YAP_IntOfTerm(YAP_ArgOfTerm(6, arg3)); + bool clone = ( YAP_IntOfTerm(YAP_ArgOfTerm(7, arg3)) == 0 ? FALSE : TRUE ); + RestartMode md; + YAP_Term t = YAP_ArgOfTerm(5, arg3); + if (YAP_IsAtomTerm(t)) { + md = gecode_RestartMode_from_term(t); + } else if (YAP_IsApplTerm(t)) { + md = gecode_RestartMode_from_term(YAP_MkAtomTerm(YAP_NameOfFunctor(YAP_FunctorOfTerm(t)))); + } else { + cerr << "bad engine cutoff option" << endl; exit(1); + } + Search::Cutoff* cutoff; + YAP_Term t_s, t_b; + switch (md) { + case RM_CONSTANT: + YAP_Term t_a; + if (YAP_ArityOfFunctor(YAP_FunctorOfTerm(t)) == 1 && + YAP_IsIntTerm(t_a = YAP_ArgOfTerm(1,t))) { + unsigned long int a = YAP_IntOfTerm(t_a); + cutoff = Search::Cutoff::constant(a); + } else { + cerr << "bad parameter for constant" << endl; exit(1); + } + break; + case RM_GEOMETRIC: + if (YAP_ArityOfFunctor(YAP_FunctorOfTerm(t)) == 2 && + YAP_IsIntTerm(t_s = YAP_ArgOfTerm(1,t)) && + YAP_IsIntTerm(t_b = YAP_ArgOfTerm(2,t))) { + unsigned long int s = YAP_IntOfTerm(t_s); + unsigned long int b = YAP_IntOfTerm(t_b); + cutoff = Search::Cutoff::geometric(s,b); + } else { + cerr << "bad parameter for geometric" << endl; exit(1); + } + break; + case RM_LUBY: + if (YAP_ArityOfFunctor(YAP_FunctorOfTerm(t)) == 1 && + YAP_IsIntTerm(t_s = YAP_ArgOfTerm(1,t))) { + unsigned long int s = YAP_IntOfTerm(t_s); + cutoff = Search::Cutoff::luby(s); + } else { + cerr << "bad parameter for luby" << endl; exit(1); + } + break; + case RM_LINEAR: + if (YAP_ArityOfFunctor(YAP_FunctorOfTerm(t)) == 1 && + YAP_IsIntTerm(t_s = YAP_ArgOfTerm(1,t))) { + unsigned long int s = YAP_IntOfTerm(t_s); + cutoff = Search::Cutoff::linear(s); + } else { + cerr << "bad parameter for linear" << endl; exit(1); + } + break; + default: + cutoff = NULL; + } + Search::Options opt; + opt.threads = threads; + opt.c_d = c_d; + opt.a_d = a_d; + opt.cutoff = cutoff; + opt.nogoods_limit = nogoods_limit; + opt.clone = clone; + opt.stop = NULL; + GenericSpace* space = gecode_Space_from_term(arg1); + GenericEngine* engine = space->new_engine(restart,opt); + YAP_Term y_engine = + YAP_NewOpaqueObject(gecode_engine_tag, sizeof(GenericEngine*)); + GenericEngine** ptr = + (GenericEngine**) YAP_OpaqueObjectFromTerm(y_engine); + *ptr = engine; + return YAP_Unify(arg2, y_engine); + } + + static inline GenericEngine* + gecode_engine_from_term(YAP_Term t) + { + return * (GenericEngine**) YAP_OpaqueObjectFromTerm(t); + } + + static YAP_Bool gecode_engine_fail_handler(YAP_Term t) + { + delete *(GenericEngine**)YAP_OpaqueObjectFromTerm(YAP_HeadOfTerm(t)); + return TRUE; + } + + static YAP_Bool + gecode_engine_write_handler + (FILE *stream, YAP_opaque_tag_t type, void *p, int flags) + { + fprintf(stream,"", p); + return TRUE; + } + + static YAP_Bool gecode_engine_search(void) + { + GenericEngine* engine = gecode_engine_from_term(YAP_ARG1); + GenericSpace* space = engine->next(); + if (space) + { + YAP_Term term = gecode_term_from_space(space); + return YAP_Unify(YAP_ARG2, term); + } + else YAP_cut_fail(); + } + +#ifdef DISJUNCTOR + static YAP_Bool gecode_new_disjunctor(void) + { + YAP_Term result = YAP_ARG1; + GenericSpace* space = gecode_Space_from_term(YAP_ARG2); + YAP_Term term = + YAP_NewOpaqueObject(gecode_disjunctor_tag, sizeof(YapDisjunctor)); + new (YAP_OpaqueObjectFromTerm(term)) YapDisjunctor(space); + return YAP_Unify(result, term); + } + + static YAP_Bool + gecode_disjunctor_write_handler + (FILE *stream, YAP_opaque_tag_t type, void *p, int flags) + { + fprintf(stream,"", p); + return TRUE; + } + + static YAP_Bool gecode_new_clause(void) + { + YAP_Term result = YAP_ARG1; + YapDisjunctor& disj = gecode_YapDisjunctor_from_term(YAP_ARG2); + YAP_Term term = + YAP_NewOpaqueObject(gecode_disjunctor_clause_tag, sizeof(Clause)); + new (YAP_OpaqueObjectFromTerm(term)) Clause(*disj.home,disj.disj); + return YAP_Unify(result, term); + } + + static YAP_Bool + gecode_clause_write_handler + (FILE *stream_, YAP_opaque_tag_t type, void *p, int flags) + { + fprintf(stream,"", p); + return TRUE; + } + + static IntVar gecode_IntVar_from_term(GenericSpace*,YAP_Term); + static BoolVar gecode_BoolVar_from_term(GenericSpace*,YAP_Term); + static FloatVar gecode_FloatVar_from_term(GenericSpace*,YAP_Term); + static SetVar gecode_SetVar_from_term(GenericSpace*,YAP_Term); + + static YAP_Bool gecode_clause_intvar_forward(void) + { + Clause& clause = gecode_Clause_from_term(YAP_ARG1); + GenericSpace* outer = clause.generic_parent(); + GenericSpace* inner = clause.generic_space(); + IntVar outer_var = gecode_IntVar_from_term(outer, YAP_ARG2); + IntVar inner_var = gecode_IntVar_from_term(inner, YAP_ARG3); + clause.forward(outer_var,inner_var); + return TRUE; + } + + static YAP_Bool gecode_clause_boolvar_forward(void) + { + Clause& clause = gecode_Clause_from_term(YAP_ARG1); + GenericSpace* outer = clause.generic_parent(); + GenericSpace* inner = clause.generic_space(); + BoolVar outer_var = gecode_BoolVar_from_term(outer, YAP_ARG2); + BoolVar inner_var = gecode_BoolVar_from_term(inner, YAP_ARG3); + clause.forward(outer_var,inner_var); + return TRUE; + } + + static YAP_Bool gecode_clause_setvar_forward(void) + { + Clause& clause = gecode_Clause_from_term(YAP_ARG1); + GenericSpace* outer = clause.generic_parent(); + GenericSpace* inner = clause.generic_space(); + SetVar outer_var = gecode_SetVar_from_term(outer, YAP_ARG2); + SetVar inner_var = gecode_SetVar_from_term(inner, YAP_ARG3); + clause.forward(outer_var,inner_var); + return TRUE; + } +#endif + + static YAP_Bool gecode_new_intvar_from_bounds(void) + { + YAP_Term ivar = YAP_ARG1; + GenericSpace* space = gecode_Space_from_term(YAP_ARG2); + int lo = YAP_IntOfTerm(YAP_ARG3); + int hi = YAP_IntOfTerm(YAP_ARG4); + int i = space->new_ivar(lo, hi); + YAP_Term y_i = YAP_MkIntTerm(i); + return YAP_Unify(ivar, y_i); + } + + static YAP_Bool gecode_new_floatvar_from_bounds(void) + { + YAP_Term ivar = YAP_ARG1; + GenericSpace* space = gecode_Space_from_term(YAP_ARG2); + double lo = YAP_FloatOfTerm(YAP_ARG3); + double hi = YAP_FloatOfTerm(YAP_ARG4); + int i = space->new_fvar(lo, hi); + YAP_Term y_i = YAP_MkIntTerm(i); + return YAP_Unify(ivar, y_i); + } + + static int + gecode_list_length(YAP_Term l) + { + int n = 0; + while (YAP_IsPairTerm(l)) + { + n += 1; + l = YAP_TailOfTerm(l); + } + return n; + } + + static IntSet + gecode_IntSet_from_term(YAP_Term specs) + { + int n = gecode_list_length(specs); + SPECARRAY(r,n); + int i = 0; + while (YAP_IsPairTerm(specs)) + { + YAP_Term head = YAP_HeadOfTerm(specs); + specs = YAP_TailOfTerm(specs); + SPECARRAYELEM(r,i,0) = YAP_IntOfTerm(YAP_ArgOfTerm(1, head)); + SPECARRAYELEM(r,i,1) = YAP_IntOfTerm(YAP_ArgOfTerm(2, head)); + i += 1; + } + return IntSet(SPECARRAYDEREF(r), n); + } + + static YAP_Bool gecode_new_intvar_from_intset(void) + { + YAP_Term ivar = YAP_ARG1; + GenericSpace* space = gecode_Space_from_term(YAP_ARG2); + YAP_Term specs = YAP_ARG3; + IntSet iset = gecode_IntSet_from_term(specs); + int i = space->new_ivar(iset); + return YAP_Unify(ivar, YAP_MkIntTerm(i)); + } + + static YAP_Bool gecode_new_boolvar(void) + { + YAP_Term bvar = YAP_ARG1; + GenericSpace* space = gecode_Space_from_term(YAP_ARG2); + int i = space->new_bvar(); + return YAP_Unify(bvar, YAP_MkIntTerm(i)); + } + + static YAP_Bool gecode_new_setvar_1(void) + { + YAP_Term result = YAP_ARG1; + GenericSpace* space = gecode_Space_from_term(YAP_ARG2); + int GlbMin = YAP_IntOfTerm(YAP_ARG3); + int GlbMax = YAP_IntOfTerm(YAP_ARG4); + int LubMin = YAP_IntOfTerm(YAP_ARG5); + int LubMax = YAP_IntOfTerm(YAP_ARG6); + int CardMin= YAP_IntOfTerm(YAP_ARG7); + int CardMax= YAP_IntOfTerm(YAP_ARG8); + int idx = space->new_svar(GlbMin,GlbMax,LubMin,LubMax,CardMin,CardMax); + return YAP_Unify(result, YAP_MkIntTerm(idx)); + } + + static YAP_Bool gecode_new_setvar_2(void) + { + YAP_Term result = YAP_ARG1; + GenericSpace* space = gecode_Space_from_term(YAP_ARG2); + int GlbMin = YAP_IntOfTerm(YAP_ARG3); + int GlbMax = YAP_IntOfTerm(YAP_ARG4); + int LubMin = YAP_IntOfTerm(YAP_ARG5); + int LubMax = YAP_IntOfTerm(YAP_ARG6); + int CardMin= YAP_IntOfTerm(YAP_ARG7); + int idx = space->new_svar(GlbMin,GlbMax,LubMin,LubMax,CardMin); + return YAP_Unify(result, YAP_MkIntTerm(idx)); + } + + static YAP_Bool gecode_new_setvar_3(void) + { + YAP_Term result = YAP_ARG1; + GenericSpace* space = gecode_Space_from_term(YAP_ARG2); + int GlbMin = YAP_IntOfTerm(YAP_ARG3); + int GlbMax = YAP_IntOfTerm(YAP_ARG4); + int LubMin = YAP_IntOfTerm(YAP_ARG5); + int LubMax = YAP_IntOfTerm(YAP_ARG6); + int idx = space->new_svar(GlbMin,GlbMax,LubMin,LubMax); + return YAP_Unify(result, YAP_MkIntTerm(idx)); + } + + static YAP_Bool gecode_new_setvar_4(void) + { + YAP_Term result = YAP_ARG1; + GenericSpace* space = gecode_Space_from_term(YAP_ARG2); + IntSet Glb = gecode_IntSet_from_term(YAP_ARG3); + int LubMin = YAP_IntOfTerm(YAP_ARG4); + int LubMax = YAP_IntOfTerm(YAP_ARG5); + int CardMin = YAP_IntOfTerm(YAP_ARG6); + int CardMax = YAP_IntOfTerm(YAP_ARG7); + int idx = space->new_ssvar(Glb,LubMin,LubMax,CardMin,CardMax); + return YAP_Unify(result, YAP_MkIntTerm(idx)); + } + + static YAP_Bool gecode_new_setvar_5(void) + { + YAP_Term result = YAP_ARG1; + GenericSpace* space = gecode_Space_from_term(YAP_ARG2); + IntSet Glb = gecode_IntSet_from_term(YAP_ARG3); + int LubMin = YAP_IntOfTerm(YAP_ARG4); + int LubMax = YAP_IntOfTerm(YAP_ARG5); + int CardMin = YAP_IntOfTerm(YAP_ARG6); + int idx; + idx = space->new_ssvar(Glb, LubMin, LubMax, CardMin); + return YAP_Unify(result, YAP_MkIntTerm(idx)); + } + + static YAP_Bool gecode_new_setvar_6(void) + { + YAP_Term result = YAP_ARG1; + GenericSpace* space = gecode_Space_from_term(YAP_ARG2); + IntSet Glb = gecode_IntSet_from_term(YAP_ARG3); + int LubMin = YAP_IntOfTerm(YAP_ARG4); + int LubMax = YAP_IntOfTerm(YAP_ARG5); + int idx = space->new_ssvar(Glb,LubMin,LubMax); + return YAP_Unify(result, YAP_MkIntTerm(idx)); + } + + static YAP_Bool gecode_new_setvar_7(void) + { + YAP_Term result = YAP_ARG1; + GenericSpace* space = gecode_Space_from_term(YAP_ARG2); + int GlbMin = YAP_IntOfTerm(YAP_ARG3); + int GlbMax = YAP_IntOfTerm(YAP_ARG4); + IntSet Lub = gecode_IntSet_from_term(YAP_ARG5); + int CardMin = YAP_IntOfTerm(YAP_ARG6); + int CardMax = YAP_IntOfTerm(YAP_ARG7); + int idx = space->new_ssvar(GlbMin,GlbMax,Lub,Lub,CardMin,CardMax); + return YAP_Unify(result, YAP_MkIntTerm(idx)); + } + + static YAP_Bool gecode_new_setvar_8(void) + { + YAP_Term result = YAP_ARG1; + GenericSpace* space = gecode_Space_from_term(YAP_ARG2); + int GlbMin = YAP_IntOfTerm(YAP_ARG3); + int GlbMax = YAP_IntOfTerm(YAP_ARG4); + IntSet Lub = gecode_IntSet_from_term(YAP_ARG5); + int CardMin = YAP_IntOfTerm(YAP_ARG6); + int idx = space->new_ssvar(GlbMin,GlbMax,Lub,Lub,CardMin); + return YAP_Unify(result, YAP_MkIntTerm(idx)); + } + + static YAP_Bool gecode_new_setvar_9(void) + { + YAP_Term result = YAP_ARG1; + GenericSpace* space = gecode_Space_from_term(YAP_ARG2); + int GlbMin = YAP_IntOfTerm(YAP_ARG3); + int GlbMax = YAP_IntOfTerm(YAP_ARG4); + IntSet Lub = gecode_IntSet_from_term(YAP_ARG5); + int idx = space->new_svar(GlbMin,GlbMax,Lub); + return YAP_Unify(result, YAP_MkIntTerm(idx)); + } + + static YAP_Bool gecode_new_setvar_10(void) + { + YAP_Term result = YAP_ARG1; + GenericSpace* space = gecode_Space_from_term(YAP_ARG2); + IntSet Glb = gecode_IntSet_from_term(YAP_ARG3); + IntSet Lub = gecode_IntSet_from_term(YAP_ARG4); + int CardMin = YAP_IntOfTerm(YAP_ARG5); + int CardMax = YAP_IntOfTerm(YAP_ARG6); + int idx = space->new_sssvar(Glb,Lub,CardMin,CardMax); + return YAP_Unify(result, YAP_MkIntTerm(idx)); + } + + static YAP_Bool gecode_new_setvar_11(void) + { + YAP_Term result = YAP_ARG1; + GenericSpace* space = gecode_Space_from_term(YAP_ARG2); + IntSet Glb = gecode_IntSet_from_term(YAP_ARG3); + IntSet Lub = gecode_IntSet_from_term(YAP_ARG4); + int CardMin = YAP_IntOfTerm(YAP_ARG5); + int idx = space->new_sssvar(Glb,Lub,CardMin); + return YAP_Unify(result, YAP_MkIntTerm(idx)); + } + + static YAP_Bool gecode_new_setvar_12(void) + { + YAP_Term result = YAP_ARG1; + GenericSpace* space = gecode_Space_from_term(YAP_ARG2); + IntSet Glb = gecode_IntSet_from_term(YAP_ARG3); + IntSet Lub = gecode_IntSet_from_term(YAP_ARG4); + int idx = space->new_sssvar(Glb,Lub); + return YAP_Unify(result, YAP_MkIntTerm(idx)); + } + + static YAP_Bool gecode_space_minimize(void) + { + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + int i = YAP_IntOfTerm(YAP_ARG2); + space->minimize(i); + return TRUE; + } + + static YAP_Bool gecode_space_maximize(void) + { + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + int i = YAP_IntOfTerm(YAP_ARG2); + space->maximize(i); + return TRUE; + } + + static YAP_Bool gecode_space_minimize_ratio(void) + { + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + int i = YAP_IntOfTerm(YAP_ARG2); + int j = YAP_IntOfTerm(YAP_ARG3); + space->minimize(i,j); + return TRUE; + } + + static YAP_Bool gecode_space_maximize_ratio(void) + { + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + int i = YAP_IntOfTerm(YAP_ARG2); + int j = YAP_IntOfTerm(YAP_ARG3); + space->maximize(i,j); + return TRUE; + } + + static IntVar + gecode_IntVar_from_term(GenericSpace* space, YAP_Term x) + { + int i = YAP_IntOfTerm(x); + return space->get_ivar(i); + } + + static BoolVar + gecode_BoolVar_from_term(GenericSpace* space, YAP_Term x) + { + int i = YAP_IntOfTerm(x); + return space->get_bvar(i); + } + + static SetVar + gecode_SetVar_from_term(GenericSpace* space, YAP_Term x) + { + int i = YAP_IntOfTerm(x); + return space->get_svar(i); + } + + static IntVarArgs + gecode_IntVarArgs_from_term(GenericSpace* space, YAP_Term l) + { + int n = gecode_list_length(l); + IntVarArgs v(n); + int i = 0; + while (YAP_IsPairTerm(l)) + { + int idx = YAP_IntOfTerm(YAP_HeadOfTerm(l)); + v[i] = space->get_ivar(idx); + l = YAP_TailOfTerm(l); + i += 1; + } + return v; + } + + static BoolVarArgs + gecode_BoolVarArgs_from_term(GenericSpace* space, YAP_Term l) + { + int n = gecode_list_length(l); + BoolVarArgs v(n); + int i = 0; + while (YAP_IsPairTerm(l)) + { + int idx = YAP_IntOfTerm(YAP_HeadOfTerm(l)); + v[i] = space->get_bvar(idx); + l = YAP_TailOfTerm(l); + i += 1; + } + return v; + } + + static FloatVar + gecode_FloatVar_from_term(GenericSpace* space, YAP_Term x) + { + int i = YAP_IntOfTerm(x); + return space->get_fvar(i); + } + + static FloatVarArgs + gecode_FloatVarArgs_from_term(GenericSpace* space, YAP_Term l) + { + int n = gecode_list_length(l); + FloatVarArgs v(n); + int i = 0; + while (YAP_IsPairTerm(l)) + { + int idx = YAP_IntOfTerm(YAP_HeadOfTerm(l)); + v[i] = space->get_fvar(idx); + l = YAP_TailOfTerm(l); + i += 1; + } + return v; + } + + static FloatValArgs + gecode_FloatValArgs_from_term(YAP_Term l) + { + int n = gecode_list_length(l); + FloatValArgs v(n); + int i = 0; + while (YAP_IsPairTerm(l)) + { + YAP_Term t = YAP_HeadOfTerm(l); + v[i] = * (FloatVal*) YAP_OpaqueObjectFromTerm(t); + l = YAP_TailOfTerm(l); + i += 1; + } + return v; + } + + static SetVarArgs + gecode_SetVarArgs_from_term(GenericSpace* space, YAP_Term l) + { + int n = gecode_list_length(l); + SetVarArgs v(n); + int i = 0; + while (YAP_IsPairTerm(l)) + { + int idx = YAP_IntOfTerm(YAP_HeadOfTerm(l)); + v[i] = space->get_svar(idx); + l = YAP_TailOfTerm(l); + i += 1; + } + return v; + } + + static IntArgs + gecode_IntArgs_from_term(YAP_Term l) + { + int n = gecode_list_length(l); + IntArgs v(n); + int i = 0; + while (YAP_IsPairTerm(l)) + { + int idx = YAP_IntOfTerm(YAP_HeadOfTerm(l)); + v[i] = idx; + l = YAP_TailOfTerm(l); + i += 1; + } + return v; + } + + static IntSetArgs + gecode_IntSetArgs_from_term(YAP_Term l) + { + int n = gecode_list_length(l); + IntSetArgs v(n); + int i = 0; + while (YAP_IsPairTerm(l)) + { + IntSet s = gecode_IntSet_from_term(YAP_HeadOfTerm(l)); + v[i] = s; + l = YAP_TailOfTerm(l); + i += 1; + } + return v; + } + + static TaskType gecode_TaskType_from_term(YAP_Term); + + static TaskTypeArgs + gecode_TaskTypeArgs_from_term(YAP_Term l) + { + int n = gecode_list_length(l); + TaskTypeArgs v(n); + int i = 0; + while (YAP_IsPairTerm(l)) + { + TaskType tt = gecode_TaskType_from_term(YAP_HeadOfTerm(l)); + v[i] = tt; + l = YAP_TailOfTerm(l); + i += 1; + } + return v; + } + + static YAP_Term gecode_TRUE; + static YAP_Term gecode_FALSE; + + static bool + gecode_bool_from_term(YAP_Term X) + { + if (X==gecode_TRUE || YAP_MkIntTerm(1)) return true; + if (X==gecode_FALSE || YAP_MkIntTerm(0)) return false; + cerr << "this should never happen" << endl; exit(1); + } + + static YAP_Bool gecode_space_use_keep_index(void) + { + YAP_Term arg1 = YAP_ARG1; + YAP_Term arg2 = YAP_ARG2; + GenericSpace* space = gecode_Space_from_term(arg1); + return YAP_Unify(arg2,(space->use_keep_index() + ?gecode_TRUE:gecode_FALSE)); + } + + static YAP_Bool gecode_intvar_keep(void) + { + YAP_Term arg1 = YAP_ARG1; + YAP_Term arg2 = YAP_ARG2; + YAP_Term arg3 = YAP_ARG3; + GenericSpace* space = gecode_Space_from_term(arg1); + int idx = YAP_IntOfTerm(arg2); + int kidx = space->keep_ivar(idx); + return YAP_Unify(arg3,YAP_MkIntTerm(kidx)); + } + + static YAP_Bool gecode_boolvar_keep(void) + { + YAP_Term arg1 = YAP_ARG1; + YAP_Term arg2 = YAP_ARG2; + YAP_Term arg3 = YAP_ARG3; + GenericSpace* space = gecode_Space_from_term(arg1); + int idx = YAP_IntOfTerm(arg2); + int kidx = space->keep_bvar(idx); + return YAP_Unify(arg3,YAP_MkIntTerm(kidx)); + } + + static YAP_Bool gecode_setvar_keep(void) + { + YAP_Term arg1 = YAP_ARG1; + YAP_Term arg2 = YAP_ARG2; + YAP_Term arg3 = YAP_ARG3; + GenericSpace* space = gecode_Space_from_term(arg1); + int idx = YAP_IntOfTerm(arg2); + int kidx = space->keep_svar(idx); + return YAP_Unify(arg3,YAP_MkIntTerm(kidx)); + } + + // INFO ON INTVARS + static YAP_Bool gecode_intvar_assigned(void) + { + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + IntVar x = gecode_IntVar_from_term(space, YAP_ARG2); + return (x.assigned()) ? TRUE : FALSE; + } + + static YAP_Bool gecode_intvar_min(void) + { + YAP_Term result = YAP_ARG1; + GenericSpace* space = gecode_Space_from_term(YAP_ARG2); + IntVar x = gecode_IntVar_from_term(space, YAP_ARG3); + return YAP_Unify(result, YAP_MkIntTerm(x.min())); + } + + static YAP_Bool gecode_intvar_max(void) + { + YAP_Term result = YAP_ARG1; + GenericSpace* space = gecode_Space_from_term(YAP_ARG2); + IntVar x = gecode_IntVar_from_term(space, YAP_ARG3); + return YAP_Unify(result, YAP_MkIntTerm(x.max())); + } + + static YAP_Bool gecode_intvar_med(void) + { + YAP_Term result = YAP_ARG1; + GenericSpace* space = gecode_Space_from_term(YAP_ARG2); + IntVar x = gecode_IntVar_from_term(space, YAP_ARG3); + return YAP_Unify(result, YAP_MkIntTerm(x.med())); + } + + static YAP_Bool gecode_intvar_val(void) + { + YAP_Term result = YAP_ARG1; + GenericSpace* space = gecode_Space_from_term(YAP_ARG2); + IntVar x = gecode_IntVar_from_term(space, YAP_ARG3); + return YAP_Unify(result, YAP_MkIntTerm(x.val())); + } + + static YAP_Bool gecode_intvar_size(void) + { + YAP_Term result = YAP_ARG1; + GenericSpace* space = gecode_Space_from_term(YAP_ARG2); + IntVar x = gecode_IntVar_from_term(space, YAP_ARG3); + return YAP_Unify(result, YAP_MkIntTerm(x.size())); + } + + static YAP_Bool gecode_intvar_width(void) + { + YAP_Term result = YAP_ARG1; + GenericSpace* space = gecode_Space_from_term(YAP_ARG2); + IntVar x = gecode_IntVar_from_term(space, YAP_ARG3); + return YAP_Unify(result, YAP_MkIntTerm(x.width())); + } + + static YAP_Bool gecode_intvar_regret_min(void) + { + YAP_Term result = YAP_ARG1; + GenericSpace* space = gecode_Space_from_term(YAP_ARG2); + IntVar x = gecode_IntVar_from_term(space, YAP_ARG3); + return YAP_Unify(result, YAP_MkIntTerm(x.regret_min())); + } + + static YAP_Bool gecode_intvar_regret_max(void) + { + YAP_Term result = YAP_ARG1; + GenericSpace* space = gecode_Space_from_term(YAP_ARG2); + IntVar x = gecode_IntVar_from_term(space, YAP_ARG3); + return YAP_Unify(result, YAP_MkIntTerm(x.regret_max())); + } + + static YAP_Functor gecode_COMMA2; + + static YAP_Bool gecode_intvar_ranges(void) + { + YAP_Term result = YAP_ARG1; + GenericSpace* space = gecode_Space_from_term(YAP_ARG2); + IntVar x = gecode_IntVar_from_term(space, YAP_ARG3); + int n = 0; + { IntVarRanges it(x); while (it()) { ++n; ++it; } } + DYNARRAY(int,min,n); + DYNARRAY(int,max,n); + { IntVarRanges it(x); int i=0; + while (it()) { min[i]=it.min(); max[i]=it.max(); ++it; ++i; } } + YAP_Term lst = YAP_TermNil(); + for (;n--;) + { + YAP_Term args[2]; + args[0] = YAP_MkIntTerm(min[n]); + args[1] = YAP_MkIntTerm(max[n]); + YAP_Term range = YAP_MkApplTerm(gecode_COMMA2,2,args); + lst = YAP_MkPairTerm(range,lst); + } + return YAP_Unify(result,lst); + } + + static YAP_Bool gecode_intvar_values(void) + { + YAP_Term result = YAP_ARG1; + GenericSpace* space = gecode_Space_from_term(YAP_ARG2); + IntVar x = gecode_IntVar_from_term(space, YAP_ARG3); + int n = x.size(); + DYNARRAY(int,a,n); + { IntVarValues it(x); int i=0; + while (it()) { a[i]=it.val(); ++it; ++i; } } + YAP_Term lst = YAP_TermNil(); + for (;n--;) + { + lst = YAP_MkPairTerm(YAP_MkIntTerm(a[n]),lst); + } + return YAP_Unify(result,lst); + } + + // INFO ON BOOLVARS + static YAP_Bool gecode_boolvar_assigned(void) + { + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + BoolVar x = gecode_BoolVar_from_term(space, YAP_ARG2); + return (x.assigned()) ? TRUE : FALSE; + } + + static YAP_Bool gecode_boolvar_min(void) + { + YAP_Term result = YAP_ARG1; + GenericSpace* space = gecode_Space_from_term(YAP_ARG2); + BoolVar x = gecode_BoolVar_from_term(space, YAP_ARG3); + return YAP_Unify(result, YAP_MkIntTerm(x.min())); + } + + static YAP_Bool gecode_boolvar_max(void) + { + YAP_Term result = YAP_ARG1; + GenericSpace* space = gecode_Space_from_term(YAP_ARG2); + BoolVar x = gecode_BoolVar_from_term(space, YAP_ARG3); + return YAP_Unify(result, YAP_MkIntTerm(x.max())); + } + + static YAP_Bool gecode_boolvar_med(void) + { + YAP_Term result = YAP_ARG1; + GenericSpace* space = gecode_Space_from_term(YAP_ARG2); + BoolVar x = gecode_BoolVar_from_term(space, YAP_ARG3); + return YAP_Unify(result, YAP_MkIntTerm(x.med())); + } + + static YAP_Bool gecode_boolvar_val(void) + { + YAP_Term result = YAP_ARG1; + GenericSpace* space = gecode_Space_from_term(YAP_ARG2); + BoolVar x = gecode_BoolVar_from_term(space, YAP_ARG3); + return YAP_Unify(result, YAP_MkIntTerm(x.val())); + } + + static YAP_Bool gecode_boolvar_size(void) + { + YAP_Term result = YAP_ARG1; + GenericSpace* space = gecode_Space_from_term(YAP_ARG2); + BoolVar x = gecode_BoolVar_from_term(space, YAP_ARG3); + return YAP_Unify(result, YAP_MkIntTerm(x.size())); + } + + static YAP_Bool gecode_boolvar_width(void) + { + YAP_Term result = YAP_ARG1; + GenericSpace* space = gecode_Space_from_term(YAP_ARG2); + BoolVar x = gecode_BoolVar_from_term(space, YAP_ARG3); + return YAP_Unify(result, YAP_MkIntTerm(x.width())); + } + + static YAP_Bool gecode_boolvar_regret_min(void) + { + YAP_Term result = YAP_ARG1; + GenericSpace* space = gecode_Space_from_term(YAP_ARG2); + BoolVar x = gecode_BoolVar_from_term(space, YAP_ARG3); + return YAP_Unify(result, YAP_MkIntTerm(x.regret_min())); + } + + static YAP_Bool gecode_boolvar_regret_max(void) + { + YAP_Term result = YAP_ARG1; + GenericSpace* space = gecode_Space_from_term(YAP_ARG2); + BoolVar x = gecode_BoolVar_from_term(space, YAP_ARG3); + return YAP_Unify(result, YAP_MkIntTerm(x.regret_max())); + } + + // INFO ON SETVARS + static YAP_Bool gecode_setvar_assigned(void) + { + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + SetVar x = gecode_SetVar_from_term(space, YAP_ARG2); + return (x.assigned()) ? TRUE : FALSE; + } + + static YAP_Bool gecode_setvar_glbSize(void) + { + YAP_Term result = YAP_ARG1; + GenericSpace* space = gecode_Space_from_term(YAP_ARG2); + SetVar x = gecode_SetVar_from_term(space, YAP_ARG3); + return YAP_Unify(result, YAP_MkIntTerm(x.glbSize())); + } + + static YAP_Bool gecode_setvar_lubSize(void) + { + YAP_Term result = YAP_ARG1; + GenericSpace* space = gecode_Space_from_term(YAP_ARG2); + SetVar x = gecode_SetVar_from_term(space, YAP_ARG3); + return YAP_Unify(result, YAP_MkIntTerm(x.lubSize())); + } + + static YAP_Bool gecode_setvar_unknownSize(void) + { + YAP_Term result = YAP_ARG1; + GenericSpace* space = gecode_Space_from_term(YAP_ARG2); + SetVar x = gecode_SetVar_from_term(space, YAP_ARG3); + return YAP_Unify(result, YAP_MkIntTerm(x.unknownSize())); + } + + static YAP_Bool gecode_setvar_cardMin(void) + { + YAP_Term result = YAP_ARG1; + GenericSpace* space = gecode_Space_from_term(YAP_ARG2); + SetVar x = gecode_SetVar_from_term(space, YAP_ARG3); + return YAP_Unify(result, YAP_MkIntTerm(x.cardMin())); + } + + static YAP_Bool gecode_setvar_cardMax(void) + { + YAP_Term result = YAP_ARG1; + GenericSpace* space = gecode_Space_from_term(YAP_ARG2); + SetVar x = gecode_SetVar_from_term(space, YAP_ARG3); + return YAP_Unify(result, YAP_MkIntTerm(x.cardMax())); + } + + static YAP_Bool gecode_setvar_lubMin(void) + { + YAP_Term result = YAP_ARG1; + GenericSpace* space = gecode_Space_from_term(YAP_ARG2); + SetVar x = gecode_SetVar_from_term(space, YAP_ARG3); + return YAP_Unify(result, YAP_MkIntTerm(x.lubMin())); + } + + static YAP_Bool gecode_setvar_lubMax(void) + { + YAP_Term result = YAP_ARG1; + GenericSpace* space = gecode_Space_from_term(YAP_ARG2); + SetVar x = gecode_SetVar_from_term(space, YAP_ARG3); + return YAP_Unify(result, YAP_MkIntTerm(x.lubMax())); + } + + static YAP_Bool gecode_setvar_glbMin(void) + { + YAP_Term result = YAP_ARG1; + GenericSpace* space = gecode_Space_from_term(YAP_ARG2); + SetVar x = gecode_SetVar_from_term(space, YAP_ARG3); + return YAP_Unify(result, YAP_MkIntTerm(x.glbMin())); + } + + static YAP_Bool gecode_setvar_glbMax(void) + { + YAP_Term result = YAP_ARG1; + GenericSpace* space = gecode_Space_from_term(YAP_ARG2); + SetVar x = gecode_SetVar_from_term(space, YAP_ARG3); + return YAP_Unify(result, YAP_MkIntTerm(x.glbMax())); + } + + static YAP_Bool gecode_setvar_glb_ranges(void) + { + YAP_Term result = YAP_ARG1; + GenericSpace* space = gecode_Space_from_term(YAP_ARG2); + SetVar x = gecode_SetVar_from_term(space, YAP_ARG3); + int n = 0; + { SetVarGlbRanges it(x); while (it()) { ++n; ++it; } } + DYNARRAY(int,min,n); + DYNARRAY(int,max,n); + { SetVarGlbRanges it(x); int i=0; + while (it()) { min[i]=it.min(); max[i]=it.max(); ++it; ++i; } } + YAP_Term lst = YAP_TermNil(); + for (;n--;) + { + YAP_Term args[2]; + args[0] = YAP_MkIntTerm(min[n]); + args[1] = YAP_MkIntTerm(max[n]); + YAP_Term range = YAP_MkApplTerm(gecode_COMMA2,2,args); + lst = YAP_MkPairTerm(range,lst); + } + return YAP_Unify(result,lst); + } + + static YAP_Bool gecode_setvar_lub_ranges(void) + { + YAP_Term result = YAP_ARG1; + GenericSpace* space = gecode_Space_from_term(YAP_ARG2); + SetVar x = gecode_SetVar_from_term(space, YAP_ARG3); + int n = 0; + { SetVarLubRanges it(x); while (it()) { ++n; ++it; } } + DYNARRAY(int,min,n); + DYNARRAY(int,max,n); + { SetVarLubRanges it(x); int i=0; + while (it()) { min[i]=it.min(); max[i]=it.max(); ++it; ++i; } } + YAP_Term lst = YAP_TermNil(); + for (;n--;) + { + YAP_Term args[2]; + args[0] = YAP_MkIntTerm(min[n]); + args[1] = YAP_MkIntTerm(max[n]); + YAP_Term range = YAP_MkApplTerm(gecode_COMMA2,2,args); + lst = YAP_MkPairTerm(range,lst); + } + return YAP_Unify(result,lst); + } + + static YAP_Bool gecode_setvar_unknown_ranges(void) + { + YAP_Term result = YAP_ARG1; + GenericSpace* space = gecode_Space_from_term(YAP_ARG2); + SetVar x = gecode_SetVar_from_term(space, YAP_ARG3); + int n = 0; + { SetVarUnknownRanges it(x); while (it()) { ++n; ++it; } } + DYNARRAY(int,min,n); + DYNARRAY(int,max,n); + { SetVarUnknownRanges it(x); int i=0; + while (it()) { min[i]=it.min(); max[i]=it.max(); ++it; ++i; } } + YAP_Term lst = YAP_TermNil(); + for (;n--;) + { + YAP_Term args[2]; + args[0] = YAP_MkIntTerm(min[n]); + args[1] = YAP_MkIntTerm(max[n]); + YAP_Term range = YAP_MkApplTerm(gecode_COMMA2,2,args); + lst = YAP_MkPairTerm(range,lst); + } + return YAP_Unify(result,lst); + } + + static YAP_Bool gecode_setvar_glb_values(void) + { + YAP_Term result = YAP_ARG1; + GenericSpace* space = gecode_Space_from_term(YAP_ARG2); + SetVar x = gecode_SetVar_from_term(space, YAP_ARG3); + DYNARRAY(YAP_Term,elems,x.glbSize()); + SetVarGlbValues it(x); + int n = 0; + while (it()) { elems[n] = YAP_MkIntTerm(it.val()); ++it; ++n; } + YAP_Term lst = YAP_TermNil(); + for (;n--;) lst = YAP_MkPairTerm(elems[n],lst); + return YAP_Unify(result,lst); + } + + static YAP_Bool gecode_setvar_lub_values(void) + { + YAP_Term result = YAP_ARG1; + GenericSpace* space = gecode_Space_from_term(YAP_ARG2); + SetVar x = gecode_SetVar_from_term(space, YAP_ARG3); + DYNARRAY(YAP_Term,elems,x.lubSize()); + SetVarLubValues it(x); + int n = 0; + while (it()) { elems[n] = YAP_MkIntTerm(it.val()); ++it; ++n; } + YAP_Term lst = YAP_TermNil(); + for (;n--;) lst = YAP_MkPairTerm(elems[n],lst); + return YAP_Unify(result,lst); + } + + static YAP_Bool gecode_setvar_unknown_values(void) + { + YAP_Term result = YAP_ARG1; + GenericSpace* space = gecode_Space_from_term(YAP_ARG2); + SetVar x = gecode_SetVar_from_term(space, YAP_ARG3); + DYNARRAY(YAP_Term,elems,x.unknownSize()); + SetVarUnknownValues it(x); + int n = 0; + while (it()) { elems[n] = YAP_MkIntTerm(it.val()); ++it; ++n; } + YAP_Term lst = YAP_TermNil(); + for (;n--;) lst = YAP_MkPairTerm(elems[n],lst); + return YAP_Unify(result,lst); + } + + // INFO ON FLOATVARS + static YAP_Bool gecode_floatvar_assigned(void) + { + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + FloatVar x = gecode_FloatVar_from_term(space, YAP_ARG2); + return (x.assigned()) ? TRUE : FALSE; + } + + static YAP_Bool gecode_floatvar_min(void) + { + YAP_Term result = YAP_ARG1; + GenericSpace* space = gecode_Space_from_term(YAP_ARG2); + FloatVar x = gecode_FloatVar_from_term(space, YAP_ARG3); + return YAP_Unify(result, YAP_MkFloatTerm(x.min())); + } + + static YAP_Bool gecode_floatvar_max(void) + { + YAP_Term result = YAP_ARG1; + GenericSpace* space = gecode_Space_from_term(YAP_ARG2); + FloatVar x = gecode_FloatVar_from_term(space, YAP_ARG3); + return YAP_Unify(result, YAP_MkFloatTerm(x.max())); + } + + static YAP_Bool gecode_floatvar_med(void) + { + YAP_Term result = YAP_ARG1; + GenericSpace* space = gecode_Space_from_term(YAP_ARG2); + FloatVar x = gecode_FloatVar_from_term(space, YAP_ARG3); + return YAP_Unify(result, YAP_MkFloatTerm(x.med())); + } + + static YAP_Bool gecode_floatvar_size(void) + { + YAP_Term result = YAP_ARG1; + GenericSpace* space = gecode_Space_from_term(YAP_ARG2); + FloatVar x = gecode_FloatVar_from_term(space, YAP_ARG3); + return YAP_Unify(result, YAP_MkFloatTerm(x.size())); + } + + static inline Reify + gecode_Reify_from_term(YAP_Term t) + { + return * (Reify*) YAP_OpaqueObjectFromTerm(t); + } + + #define gecode_int_from_term YAP_IntOfTerm + + #define gecode_double_from_term YAP_FloatOfTerm + +#include "gecode_yap_cc_forward_auto_generated.icc" +#include "gecode_yap_cc_impl_auto_generated.icc" + + static YAP_opaque_tag_t gecode_reify_tag; + static YAP_opaque_handler_t gecode_reify_handler; + + static YAP_Bool + gecode_reify_write_handler + (FILE *stream, YAP_opaque_tag_t type, void *p, int flags) + { + fprintf(stream,"", p); + return TRUE; + } + + static YAP_Term gecode_term_from_reify(Reify r) + { + YAP_Term term = + YAP_NewOpaqueObject(gecode_reify_tag, sizeof(Reify)); + Reify *ptr = + (Reify*) YAP_OpaqueObjectFromTerm(term); + *ptr = r; + return term; + } + + static YAP_Bool gecode_new_reify(void) + { + GenericSpace* space = gecode_Space_from_term(YAP_ARG1); + BoolVar b = gecode_BoolVar_from_term(space, YAP_ARG2); + ReifyMode flag = gecode_ReifyMode_from_term(YAP_ARG3); + Reify r = Reify(b,flag); + + YAP_Term term = gecode_term_from_reify(r); + return YAP_Unify(YAP_ARG4, term); + } + + static YAP_opaque_tag_t gecode_tupleset_tag; + static YAP_opaque_handler_t gecode_tupleset_handler; + + static YAP_Bool gecode_tupleset_fail_handler(YAP_Term p) + { + return TRUE; + } + + static YAP_Bool + gecode_tupleset_write_handler + (FILE *stream, YAP_opaque_tag_t type, void *p, int flags) + { + fprintf(stream,"", p); + return TRUE; + } + + static YAP_Bool gecode_new_tupleset(void) + { + YAP_Term term = + YAP_NewOpaqueObject(gecode_tupleset_tag, sizeof(TupleSet)); + TupleSet *ts = new (YAP_OpaqueObjectFromTerm(term)) TupleSet; + YAP_Term t = YAP_ARG1; + while (YAP_IsPairTerm( t ) ) { + YAP_Term l = YAP_HeadOfTerm(t); + int n = gecode_list_length(l); + int i = 0; + IntArgs is(n); + while (YAP_IsPairTerm( l ) ) { + YAP_Term ll = YAP_HeadOfTerm(l); + if (!YAP_IsIntTerm(ll)) { + cerr << "non-integer on tuple set" << endl; exit(1); + } + is[i++] = YAP_IntOfTerm(ll); + l = YAP_TailOfTerm(l); + } + ts->add(is); + if (l != YAP_TermNil()) { + cerr << "non-list on tuple set" << endl; exit(1); + } + t = YAP_TailOfTerm(t); + } + if (t != YAP_TermNil()) { + cerr << "non-list on tuple set" << endl; exit(1); + } + ts->finalize(); + return YAP_Unify(YAP_ARG2, term); + } + + static YAP_opaque_tag_t gecode_dfa_tag; + static YAP_opaque_handler_t gecode_dfa_handler; + + static YAP_Bool gecode_dfa_fail_handler(YAP_Term p) + { + return TRUE; + } + + static YAP_Bool + gecode_dfa_write_handler + (FILE *stream, YAP_opaque_tag_t type, void *p, int flags) + { + fprintf(stream,"", p); + return TRUE; + } + + static YAP_Bool gecode_new_dfa(void) + { + YAP_Term term = + YAP_NewOpaqueObject(gecode_dfa_tag, sizeof(DFA)); + // DFA ts = new (YAP_OpaqueObjectFromTerm(term)) DFA; + YAP_Term t2 = YAP_ARG2; + int s0 = YAP_IntOfTerm(t2); + YAP_Term t3 = YAP_ARG3; + int n = gecode_list_length(t3), i=0; + DFA::Transition t[1024]; + if (n > 1024) cerr<< "DFA too long" << endl; + while (YAP_IsPairTerm( t3 ) ) { + YAP_Term tt = YAP_HeadOfTerm(t3); + int is, sy, os; + is = YAP_IntOfTerm(YAP_ArgOfTerm(1,tt)); + sy = YAP_IntOfTerm(YAP_ArgOfTerm(2,tt)); + os = YAP_IntOfTerm(YAP_ArgOfTerm(3,tt)); + t[i++] = DFA::Transition(is, sy, os); + t3 = YAP_TailOfTerm(t3); + } + if (t3 != YAP_TermNil()) { + cerr << "non-list on DFA" << endl; exit(1); + } + YAP_Term t4 = YAP_ARG4; + n = gecode_list_length(t4)+1; + i=0; + int s[n]; + s[n-1] = -1; + while (YAP_IsPairTerm( t4 ) ) { + YAP_Term tt = YAP_HeadOfTerm(t4); + s[i++] = YAP_IntOfTerm(tt); + t4 = YAP_TailOfTerm(t4); + } + if (t4 != YAP_TermNil()) { + cerr << "non-list on DFA" << endl; exit(1); + } + new (YAP_OpaqueObjectFromTerm(term)) DFA(s0, t, s); + return YAP_Unify(YAP_ARG1, term); + } + + void gecode_init(void) + { + { YAP_Atom X= YAP_LookupAtom("true"); + gecode_TRUE = YAP_MkAtomTerm(X); + YAP_AtomGetHold(X); } + { YAP_Atom X= YAP_LookupAtom("false"); + gecode_FALSE = YAP_MkAtomTerm(X); + YAP_AtomGetHold(X); } + { YAP_Atom X= YAP_LookupAtom(","); + YAP_AtomGetHold(X); + gecode_COMMA2 = YAP_MkFunctor(X,2); } + { YAP_Atom X= YAP_LookupAtom("INT_VAR_NONE"); + gecode_INT_VAR_NONE = YAP_MkAtomTerm(X); + YAP_AtomGetHold(X); } + { YAP_Atom X= YAP_LookupAtom("INT_VAR_DEGREE_MIN"); + gecode_INT_VAR_DEGREE_MIN = YAP_MkAtomTerm(X); + YAP_AtomGetHold(X); } + { YAP_Atom X= YAP_LookupAtom("INT_VAR_DEGREE_MAX"); + gecode_INT_VAR_DEGREE_MAX = YAP_MkAtomTerm(X); + YAP_AtomGetHold(X); } + { YAP_Atom X= YAP_LookupAtom("INT_VAR_MIN_MIN"); + gecode_INT_VAR_MIN_MIN = YAP_MkAtomTerm(X); + YAP_AtomGetHold(X); } + { YAP_Atom X= YAP_LookupAtom("INT_VAR_MIN_MAX"); + gecode_INT_VAR_MIN_MAX = YAP_MkAtomTerm(X); + YAP_AtomGetHold(X); } + { YAP_Atom X= YAP_LookupAtom("INT_VAR_MAX_MIN"); + gecode_INT_VAR_MAX_MIN = YAP_MkAtomTerm(X); + YAP_AtomGetHold(X); } + { YAP_Atom X= YAP_LookupAtom("INT_VAR_MAX_MAX"); + gecode_INT_VAR_MAX_MAX = YAP_MkAtomTerm(X); + YAP_AtomGetHold(X); } + { YAP_Atom X= YAP_LookupAtom("INT_VAR_SIZE_MIN"); + gecode_INT_VAR_SIZE_MIN = YAP_MkAtomTerm(X); + YAP_AtomGetHold(X); } + { YAP_Atom X= YAP_LookupAtom("INT_VAR_SIZE_MAX"); + gecode_INT_VAR_SIZE_MAX = YAP_MkAtomTerm(X); + YAP_AtomGetHold(X); } + { YAP_Atom X= YAP_LookupAtom("INT_VAR_DEGREE_SIZE_MIN"); + gecode_INT_VAR_DEGREE_SIZE_MIN = YAP_MkAtomTerm(X); + YAP_AtomGetHold(X); } + { YAP_Atom X= YAP_LookupAtom("INT_VAR_DEGREE_SIZE_MAX"); + gecode_INT_VAR_DEGREE_SIZE_MAX = YAP_MkAtomTerm(X); + YAP_AtomGetHold(X); } + { YAP_Atom X= YAP_LookupAtom("INT_VAR_REGRET_MIN_MIN"); + gecode_INT_VAR_REGRET_MIN_MIN = YAP_MkAtomTerm(X); + YAP_AtomGetHold(X); } + { YAP_Atom X= YAP_LookupAtom("INT_VAR_REGRET_MIN_MAX"); + gecode_INT_VAR_REGRET_MIN_MAX = YAP_MkAtomTerm(X); + YAP_AtomGetHold(X); } + { YAP_Atom X= YAP_LookupAtom("INT_VAR_REGRET_MAX_MIN"); + gecode_INT_VAR_REGRET_MAX_MIN = YAP_MkAtomTerm(X); + YAP_AtomGetHold(X); } + { YAP_Atom X= YAP_LookupAtom("INT_VAR_REGRET_MAX_MAX"); + gecode_INT_VAR_REGRET_MAX_MAX = YAP_MkAtomTerm(X); + YAP_AtomGetHold(X); } + { YAP_Atom X= YAP_LookupAtom("INT_VAL_MIN"); + gecode_INT_VAL_MIN = YAP_MkAtomTerm(X); + YAP_AtomGetHold(X); } + { YAP_Atom X= YAP_LookupAtom("INT_VAL_MED"); + gecode_INT_VAL_MED = YAP_MkAtomTerm(X); + YAP_AtomGetHold(X); } + { YAP_Atom X= YAP_LookupAtom("INT_VAL_MAX"); + gecode_INT_VAL_MAX = YAP_MkAtomTerm(X); + YAP_AtomGetHold(X); } + { YAP_Atom X= YAP_LookupAtom("INT_VAL_SPLIT_MIN"); + gecode_INT_VAL_SPLIT_MIN = YAP_MkAtomTerm(X); + YAP_AtomGetHold(X); } + { YAP_Atom X= YAP_LookupAtom("INT_VAL_SPLIT_MAX"); + gecode_INT_VAL_SPLIT_MAX = YAP_MkAtomTerm(X); + YAP_AtomGetHold(X); } + { YAP_Atom X= YAP_LookupAtom("INT_VAL_RANGE_MIN"); + gecode_INT_VAL_RANGE_MIN = YAP_MkAtomTerm(X); + YAP_AtomGetHold(X); } + { YAP_Atom X= YAP_LookupAtom("INT_VAL_RANGE_MAX"); + gecode_INT_VAL_RANGE_MAX = YAP_MkAtomTerm(X); + YAP_AtomGetHold(X); } + { YAP_Atom X= YAP_LookupAtom("INT_VALUES_MIN"); + gecode_INT_VALUES_MIN = YAP_MkAtomTerm(X); + YAP_AtomGetHold(X); } + { YAP_Atom X= YAP_LookupAtom("INT_VALUES_MAX"); + gecode_INT_VALUES_MAX = YAP_MkAtomTerm(X); + YAP_AtomGetHold(X); } + { YAP_Atom X= YAP_LookupAtom("BOOL_VAL_MIN"); + gecode_BOOL_VAL_MIN = YAP_MkAtomTerm(X); + YAP_AtomGetHold(X); } + { YAP_Atom X= YAP_LookupAtom("BOOL_VAL_RND"); + gecode_BOOL_VAL_RND = YAP_MkAtomTerm(X); + YAP_AtomGetHold(X); } + { YAP_Atom X= YAP_LookupAtom("SET_VAR_NONE"); + gecode_SET_VAR_NONE = YAP_MkAtomTerm(X); + YAP_AtomGetHold(X); } + { YAP_Atom X= YAP_LookupAtom("SET_VAR_DEGREE_MIN"); + gecode_SET_VAR_DEGREE_MIN = YAP_MkAtomTerm(X); + YAP_AtomGetHold(X); } + { YAP_Atom X= YAP_LookupAtom("SET_VAR_DEGREE_MAX"); + gecode_SET_VAR_DEGREE_MAX = YAP_MkAtomTerm(X); + YAP_AtomGetHold(X); } + { YAP_Atom X= YAP_LookupAtom("SET_VAR_MIN_MIN"); + gecode_SET_VAR_MIN_MIN = YAP_MkAtomTerm(X); + YAP_AtomGetHold(X); } + { YAP_Atom X= YAP_LookupAtom("SET_VAR_MIN_MAX"); + gecode_SET_VAR_MIN_MAX = YAP_MkAtomTerm(X); + YAP_AtomGetHold(X); } + { YAP_Atom X= YAP_LookupAtom("SET_VAR_MAX_MIN"); + gecode_SET_VAR_MAX_MIN = YAP_MkAtomTerm(X); + YAP_AtomGetHold(X); } + { YAP_Atom X= YAP_LookupAtom("SET_VAR_MAX_MAX"); + gecode_SET_VAR_MAX_MAX = YAP_MkAtomTerm(X); + YAP_AtomGetHold(X); } + { YAP_Atom X= YAP_LookupAtom("SET_VAR_SIZE_MIN"); + gecode_SET_VAR_SIZE_MIN = YAP_MkAtomTerm(X); + YAP_AtomGetHold(X); } + { YAP_Atom X= YAP_LookupAtom("SET_VAR_SIZE_MAX"); + gecode_SET_VAR_SIZE_MAX = YAP_MkAtomTerm(X); + YAP_AtomGetHold(X); } + { YAP_Atom X= YAP_LookupAtom("SET_VAR_DEGREE_SIZE_MIN"); + gecode_SET_VAR_DEGREE_SIZE_MIN = YAP_MkAtomTerm(X); + YAP_AtomGetHold(X); } + { YAP_Atom X= YAP_LookupAtom("SET_VAR_DEGREE_SIZE_MAX"); + gecode_SET_VAR_DEGREE_SIZE_MAX = YAP_MkAtomTerm(X); + YAP_AtomGetHold(X); } + { YAP_Atom X= YAP_LookupAtom("SET_VAL_MIN_INC"); + gecode_SET_VAL_MIN_INC = YAP_MkAtomTerm(X); + YAP_AtomGetHold(X); } + { YAP_Atom X= YAP_LookupAtom("SET_VAL_MED_INC"); + gecode_SET_VAL_MED_INC = YAP_MkAtomTerm(X); + YAP_AtomGetHold(X); } + { YAP_Atom X= YAP_LookupAtom("SET_VAL_MAX_INC"); + gecode_SET_VAL_MAX_INC = YAP_MkAtomTerm(X); + YAP_AtomGetHold(X); } + { YAP_Atom X= YAP_LookupAtom("SET_VAL_MIN_EXC"); + gecode_SET_VAL_MIN_EXC = YAP_MkAtomTerm(X); + YAP_AtomGetHold(X); } + { YAP_Atom X= YAP_LookupAtom("SET_VAL_MED_EXC"); + gecode_SET_VAL_MED_EXC = YAP_MkAtomTerm(X); + YAP_AtomGetHold(X); } + { YAP_Atom X= YAP_LookupAtom("SET_VAL_MAX_EXC"); + gecode_SET_VAL_MAX_EXC = YAP_MkAtomTerm(X); + YAP_AtomGetHold(X); } + { YAP_Atom X= YAP_LookupAtom("BOOL_VAR_NONE"); + gecode_BOOL_VAR_NONE = YAP_MkAtomTerm(X); + YAP_AtomGetHold(X); } + { YAP_Atom X= YAP_LookupAtom("BOOL_VAR_RND"); + gecode_BOOL_VAR_RND = YAP_MkAtomTerm(X); + YAP_AtomGetHold(X); } + // { YAP_Atom X= YAP_LookupAtom("BOOL_VAR_MERIT_MIN"); + // gecode_BOOL_VAR_MERIT_MIN = YAP_MkAtomTerm(X); + // YAP_AtomGetHold(X); } + // { YAP_Atom X= YAP_LookupAtom("BOOL_VAR_MERIT_MAX"); + // gecode_BOOL_VAR_MERIT_MAX = YAP_MkAtomTerm(X); + // YAP_AtomGetHold(X); } + { YAP_Atom X= YAP_LookupAtom("BOOL_VAR_DEGREE_MIN"); + gecode_BOOL_VAR_DEGREE_MIN = YAP_MkAtomTerm(X); + YAP_AtomGetHold(X); } + { YAP_Atom X= YAP_LookupAtom("BOOL_VAR_DEGREE_MAX"); + gecode_BOOL_VAR_DEGREE_MAX = YAP_MkAtomTerm(X); + YAP_AtomGetHold(X); } + { YAP_Atom X= YAP_LookupAtom("BOOL_VAR_AFC_MIN"); + gecode_BOOL_VAR_AFC_MIN = YAP_MkAtomTerm(X); + YAP_AtomGetHold(X); } + { YAP_Atom X= YAP_LookupAtom("BOOL_VAR_AFC_MAX"); + gecode_BOOL_VAR_AFC_MAX = YAP_MkAtomTerm(X); + YAP_AtomGetHold(X); } + { YAP_Atom X= YAP_LookupAtom("BOOL_VAR_ACTION_MIN"); + gecode_BOOL_VAR_ACTION_MIN = YAP_MkAtomTerm(X); + YAP_AtomGetHold(X); } + { YAP_Atom X= YAP_LookupAtom("BOOL_VAR_ACTION_MAX"); + gecode_BOOL_VAR_MAX_MAX = YAP_MkAtomTerm(X); + YAP_AtomGetHold(X); } + { YAP_Atom X= YAP_LookupAtom("BOOL_VAR_CHB_MIN"); + gecode_BOOL_VAR_CHB_MIN = YAP_MkAtomTerm(X); + YAP_AtomGetHold(X); } + { YAP_Atom X= YAP_LookupAtom("BOOL_VAR_CHB_MAX"); + gecode_BOOL_VAR_CHB_MAX = YAP_MkAtomTerm(X); + YAP_AtomGetHold(X); } + + + { YAP_Atom X= YAP_LookupAtom("FLOAT_VAR_NONE"); + gecode_FLOAT_VAR_NONE = YAP_MkAtomTerm(X); + YAP_AtomGetHold(X); } + { YAP_Atom X= YAP_LookupAtom("FLOAT_VAR_DEGREE_MIN"); + gecode_FLOAT_VAR_DEGREE_MIN = YAP_MkAtomTerm(X); + YAP_AtomGetHold(X); } + { YAP_Atom X= YAP_LookupAtom("FLOAT_VAR_DEGREE_MAX"); + gecode_FLOAT_VAR_DEGREE_MAX = YAP_MkAtomTerm(X); + YAP_AtomGetHold(X); } + { YAP_Atom X= YAP_LookupAtom("FLOAT_VAR_MIN_MIN"); + gecode_FLOAT_VAR_MIN_MIN = YAP_MkAtomTerm(X); + YAP_AtomGetHold(X); } + { YAP_Atom X= YAP_LookupAtom("FLOAT_VAR_MIN_MAX"); + gecode_FLOAT_VAR_MIN_MAX = YAP_MkAtomTerm(X); + YAP_AtomGetHold(X); } + { YAP_Atom X= YAP_LookupAtom("FLOAT_VAR_MAX_MIN"); + gecode_FLOAT_VAR_MAX_MIN = YAP_MkAtomTerm(X); + YAP_AtomGetHold(X); } + { YAP_Atom X= YAP_LookupAtom("FLOAT_VAR_MAX_MAX"); + gecode_FLOAT_VAR_MAX_MAX = YAP_MkAtomTerm(X); + YAP_AtomGetHold(X); } + { YAP_Atom X= YAP_LookupAtom("FLOAT_VAR_SIZE_MIN"); + gecode_FLOAT_VAR_SIZE_MIN = YAP_MkAtomTerm(X); + YAP_AtomGetHold(X); } + { YAP_Atom X= YAP_LookupAtom("FLOAT_VAR_SIZE_MAX"); + gecode_FLOAT_VAR_SIZE_MAX = YAP_MkAtomTerm(X); + YAP_AtomGetHold(X); } + { YAP_Atom X= YAP_LookupAtom("FLOAT_VAR_DEGREE_SIZE_MIN"); + gecode_FLOAT_VAR_DEGREE_SIZE_MIN = YAP_MkAtomTerm(X); + YAP_AtomGetHold(X); } + { YAP_Atom X= YAP_LookupAtom("FLOAT_VAR_DEGREE_SIZE_MAX"); + gecode_FLOAT_VAR_DEGREE_SIZE_MAX = YAP_MkAtomTerm(X); + YAP_AtomGetHold(X); } + { YAP_Atom X= YAP_LookupAtom("FLOAT_VAL_SPLIT_MIN"); + gecode_FLOAT_VAL_SPLIT_MIN = YAP_MkAtomTerm(X); + YAP_AtomGetHold(X); } + { YAP_Atom X= YAP_LookupAtom("FLOAT_VAL_SPLIT_MAX"); + gecode_FLOAT_VAL_SPLIT_MAX = YAP_MkAtomTerm(X); + YAP_AtomGetHold(X); } +#include "gecode_yap_cc_init_auto_generated.icc" + // opaque spaces + gecode_space_handler.fail_handler = gecode_space_fail_handler; + gecode_space_handler.write_handler = gecode_space_write_handler; + gecode_space_tag = YAP_NewOpaqueType(&gecode_space_handler); + YAP_UserCPredicate("gecode_new_space", gecode_new_space, 1); + // opaque engines + gecode_engine_handler.fail_handler = gecode_engine_fail_handler; + gecode_engine_handler.write_handler = gecode_engine_write_handler; + gecode_engine_tag = YAP_NewOpaqueType(&gecode_engine_handler); + YAP_UserCPredicate("gecode_new_engine", gecode_new_engine, 3); + // opaque reifications + gecode_reify_handler.fail_handler = NULL; + gecode_reify_handler.write_handler = gecode_reify_write_handler; + gecode_reify_tag = YAP_NewOpaqueType(&gecode_reify_handler); + YAP_UserCPredicate("gecode_new_reify", gecode_new_reify, 4); + // Opaque TupleSet + gecode_tupleset_handler.fail_handler = gecode_tupleset_fail_handler; + gecode_tupleset_handler.write_handler = gecode_tupleset_write_handler; + gecode_tupleset_tag = YAP_NewOpaqueType(&gecode_tupleset_handler); + YAP_UserCPredicate("gecode_new_tupleset", gecode_new_tupleset, 2); + // Opaque DFA + gecode_dfa_handler.fail_handler = gecode_dfa_fail_handler; + gecode_dfa_handler.write_handler = gecode_dfa_write_handler; + gecode_dfa_tag = YAP_NewOpaqueType(&gecode_dfa_handler); + YAP_UserCPredicate("gecode_new_dfa", gecode_new_dfa, 4); +#ifdef DISJUNCTOR + // opaque disjunctors and clauses + gecode_disjunctor_handler.write_handler = gecode_disjunctor_write_handler; + gecode_disjunctor_tag = YAP_NewOpaqueType(&gecode_disjunctor_handler); + gecode_disjunctor_clause_handler.write_handler = gecode_clause_write_handler; + gecode_disjunctor_clause_tag = + YAP_NewOpaqueType(&gecode_disjunctor_clause_handler); + YAP_UserCPredicate("gecode_new_disjunctor", gecode_new_disjunctor, 2); + YAP_UserCPredicate("gecode_new_clause", gecode_new_clause, 2); + YAP_UserCPredicate("gecode_clause_intvar_forward", gecode_clause_intvar_forward, 3); + YAP_UserCPredicate("gecode_clause_boolvar_forward", gecode_clause_boolvar_forward, 3); + YAP_UserCPredicate("gecode_clause_setvar_forward", gecode_clause_setvar_forward, 3); +#endif + // backtracking search using an engine + YAP_UserBackCutCPredicate("gecode_engine_search", + gecode_engine_search, gecode_engine_search, + NULL, 2, 0); + // creating variables + YAP_UserCPredicate("gecode_new_intvar_from_bounds", + gecode_new_intvar_from_bounds, 4); + YAP_UserCPredicate("gecode_new_intvar_from_intset", + gecode_new_intvar_from_intset, 3); + YAP_UserCPredicate("gecode_new_floatvar_from_bounds", + gecode_new_floatvar_from_bounds, 4); + YAP_UserCPredicate("gecode_new_boolvar", gecode_new_boolvar, 2); + YAP_UserCPredicate("gecode_new_setvar_1", gecode_new_setvar_1, 8); + YAP_UserCPredicate("gecode_new_setvar_2", gecode_new_setvar_2, 7); + YAP_UserCPredicate("gecode_new_setvar_3", gecode_new_setvar_3, 6); + YAP_UserCPredicate("gecode_new_setvar_4", gecode_new_setvar_4, 7); + YAP_UserCPredicate("gecode_new_setvar_5", gecode_new_setvar_5, 6); + YAP_UserCPredicate("gecode_new_setvar_6", gecode_new_setvar_6, 5); + YAP_UserCPredicate("gecode_new_setvar_7", gecode_new_setvar_7, 7); + YAP_UserCPredicate("gecode_new_setvar_8", gecode_new_setvar_8, 6); + YAP_UserCPredicate("gecode_new_setvar_9", gecode_new_setvar_9, 5); + YAP_UserCPredicate("gecode_new_setvar_10", gecode_new_setvar_10, 6); + YAP_UserCPredicate("gecode_new_setvar_11", gecode_new_setvar_11, 5); + YAP_UserCPredicate("gecode_new_setvar_12", gecode_new_setvar_12, 4); + YAP_UserCPredicate("gecode_space_minimize", gecode_space_minimize, 2); + YAP_UserCPredicate("gecode_space_maximize", gecode_space_maximize, 2); + YAP_UserCPredicate("gecode_space_minimize_ratio", gecode_space_minimize_ratio, 3); + YAP_UserCPredicate("gecode_space_maximize_ratio", gecode_space_maximize_ratio, 3); + // INFO ON INTVARS + YAP_UserCPredicate("gecode_intvar_assigned", gecode_intvar_assigned, 2); + YAP_UserCPredicate("gecode_intvar_min", gecode_intvar_min, 3); + YAP_UserCPredicate("gecode_intvar_max", gecode_intvar_max, 3); + YAP_UserCPredicate("gecode_intvar_med", gecode_intvar_med, 3); + YAP_UserCPredicate("gecode_intvar_val", gecode_intvar_val, 3); + YAP_UserCPredicate("gecode_intvar_size", gecode_intvar_size, 3); + YAP_UserCPredicate("gecode_intvar_width", gecode_intvar_width, 3); + YAP_UserCPredicate("gecode_intvar_regret_min", gecode_intvar_regret_min, 3); + YAP_UserCPredicate("gecode_intvar_regret_max", gecode_intvar_regret_max, 3); + YAP_UserCPredicate("gecode_intvar_ranges", gecode_intvar_ranges, 3); + YAP_UserCPredicate("gecode_intvar_values", gecode_intvar_values, 3); + // INFO ON BOOLVARS + YAP_UserCPredicate("gecode_boolvar_assigned", gecode_boolvar_assigned, 2); + YAP_UserCPredicate("gecode_boolvar_min", gecode_boolvar_min, 3); + YAP_UserCPredicate("gecode_boolvar_max", gecode_boolvar_max, 3); + YAP_UserCPredicate("gecode_boolvar_med", gecode_boolvar_med, 3); + YAP_UserCPredicate("gecode_boolvar_val", gecode_boolvar_val, 3); + YAP_UserCPredicate("gecode_boolvar_size", gecode_boolvar_size, 3); + YAP_UserCPredicate("gecode_boolvar_width", gecode_boolvar_width, 3); + YAP_UserCPredicate("gecode_boolvar_regret_min", gecode_boolvar_regret_min, 3); + YAP_UserCPredicate("gecode_boolvar_regret_max", gecode_boolvar_regret_max, 3); + // INFO ON SETVARS + YAP_UserCPredicate("gecode_setvar_assigned", gecode_setvar_assigned, 2); + YAP_UserCPredicate("gecode_setvar_glbSize", gecode_setvar_glbSize, 3); + YAP_UserCPredicate("gecode_setvar_lubSize", gecode_setvar_lubSize, 3); + YAP_UserCPredicate("gecode_setvar_unknownSize", gecode_setvar_unknownSize, 3); + YAP_UserCPredicate("gecode_setvar_cardMin", gecode_setvar_cardMin, 3); + YAP_UserCPredicate("gecode_setvar_cardMax", gecode_setvar_cardMax, 3); + YAP_UserCPredicate("gecode_setvar_lubMin", gecode_setvar_lubMin, 3); + YAP_UserCPredicate("gecode_setvar_lubMax", gecode_setvar_lubMax, 3); + YAP_UserCPredicate("gecode_setvar_glbMin", gecode_setvar_glbMin, 3); + YAP_UserCPredicate("gecode_setvar_glbMax", gecode_setvar_glbMax, 3); + YAP_UserCPredicate("gecode_setvar_glb_ranges", gecode_setvar_glb_ranges, 3); + YAP_UserCPredicate("gecode_setvar_lub_ranges", gecode_setvar_lub_ranges, 3); + YAP_UserCPredicate("gecode_setvar_unknown_ranges", gecode_setvar_unknown_ranges, 3); + YAP_UserCPredicate("gecode_setvar_glb_values", gecode_setvar_glb_values, 3); + YAP_UserCPredicate("gecode_setvar_lub_values", gecode_setvar_lub_values, 3); + YAP_UserCPredicate("gecode_setvar_unknown_values", gecode_setvar_unknown_values, 3); + YAP_UserCPredicate("gecode_space_use_keep_index", gecode_space_use_keep_index, 2); + YAP_UserCPredicate("gecode_intvar_keep", gecode_intvar_keep, 3); + YAP_UserCPredicate("gecode_boolvar_keep", gecode_boolvar_keep, 3); + YAP_UserCPredicate("gecode_setvar_keep", gecode_setvar_keep, 3); + // INFO ON FLOATVARS + YAP_UserCPredicate("gecode_floatvar_assigned", gecode_floatvar_assigned, 2); + YAP_UserCPredicate("gecode_floatvar_min", gecode_floatvar_min, 3); + YAP_UserCPredicate("gecode_floatvar_max", gecode_floatvar_max, 3); + YAP_UserCPredicate("gecode_floatvar_med", gecode_floatvar_med, 3); + YAP_UserCPredicate("gecode_floatvar_size", gecode_floatvar_size, 3); + } +} diff --git a/packages/gecode/gecode6_yap_hand_written.yap b/packages/gecode/gecode6_yap_hand_written.yap new file mode 100644 index 000000000..e3e32b8ad --- /dev/null +++ b/packages/gecode/gecode6_yap_hand_written.yap @@ -0,0 +1,1343 @@ +%% -*- prolog -*- +%%============================================================================= +%% Copyright (C) 2011 by Denys Duchier +%% +%% This program is free software: you can redistribute it and/or modify it +%% under the terms of the GNU Lesser General Public License as published by the +%% Free Software Foundation, either version 3 of the License, or (at your +%% option) any later version. +%% +%% This program is distributed in the hope that it will be useful, but WITHOUT +%% ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +%% FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +%% more details. +%% +%% You should have received a copy of the GNU Lesser General Public License +%% along with this program. If not, see . +%%============================================================================= + +:- module(gecode, [(:=)/2, op(500, xfx, ':='), + (+=)/2, op(500, xfx, '+=')]). + + +/** @defgroup Gecode Gecode Interface + +@ingroup packages +@{ + + +The gecode library intreface was designed and implemented by Denis +Duchier, with recent work by VĂ­tor Santos Costa to port it to version 4 +of gecode and to have an higher level interface, + + + @addtogroup The_Gecode_Interface The Gecode Interface +@ingroup Gecode +@{ + +This text is due to Denys Duchier. The gecode interface requires + +~~~~~{.prolog} +:- use_module(library(gecode)). +~~~~~ +Several example programs are available with the distribution. + ++ CREATING A SPACE + +A space is gecodes data representation for a store of constraints: + +~~~~~{.prolog} + Space := space +~~~~~ + ++ CREATING VARIABLES + +Unlike in Gecode, variable objects are not bound to a specific Space. Each one +actually contains an index with which it is possible to access a Space-bound +Gecode variable. Variables can be created using the following expressions: + +~~~~~{.prolog} + IVar := intvar(Space,SPEC...) + BVar := boolvar(Space) + SVar := setvar(Space,SPEC...) +~~~~~ + +where SPEC... is the same as in Gecode. For creating lists of variables use +the following variants: + +~~~~~{.prolog} + IVars := intvars(Space,N,SPEC...) + BVars := boolvars(Space,N,SPEC...) + SVars := setvars(Space,N,SPEC...) +~~~~~ + +where N is the number of variables to create (just like for XXXVarArray in +Gecode). Sometimes an IntSet is necessary: + +~~~~~{.prolog} + ISet := intset([SPEC...]) +~~~~~ + +where each SPEC is either an integer or a pair (I,J) of integers. An IntSet +describes a set of ints by providing either intervals, or integers (which stand +for an interval of themselves). It might be tempting to simply represent an +IntSet as a list of specs, but this would be ambiguous with IntArgs which, +here, are represented as lists of ints. + +~~~~~{.prolog} + Space += keep(Var) + Space += keep(Vars) +~~~~~ + +Variables can be marked as "kept". In this case, only such variables will be +explicitly copied during search. This could bring substantial benefits in +memory usage. Of course, in a solution, you can then only look at variables +that have been "kept". If no variable is marked as "kept", then they are all +kept. Thus marking variables as "kept" is purely an optimization. + ++ CONSTRAINTS AND BRANCHINGS + +all constraint and branching posting functions are available just like in +Gecode. Wherever a XXXArgs or YYYSharedArray is expected, simply use a list. +At present, there is no support for minimodel-like constraint posting. +Constraints and branchings are added to a space using: + +~~~~~{.prolog} + Space += CONSTRAINT + Space += BRANCHING +~~~~~ + +For example: + +~~~~~{.prolog} + Space += rel(X,'IRT_EQ',Y) +~~~~~ + +arrays of variables are represented by lists of variables, and constants are +represented by atoms with the same name as the Gecode constant +(e.g. 'INT_VAR_SIZE_MIN'). + ++ SEARCHING FOR SOLUTIONS + +~~~~~{.prolog} + SolSpace := search(Space) +~~~~~ + +This is a backtrackable predicate that enumerates all solution spaces +(SolSpace). It may also take options: + +~~~~~{.prolog} + SolSpace := search(Space,Options) +~~~~~ + +Options is a list whose elements maybe: + ++ restart +to select the Restart search engine ++ threads=N +to activate the parallel search engine and control the number of +workers (see Gecode doc) ++ c_d=N +to set the commit distance for recomputation ++ a_d=N +to set the adaptive distance for recomputation + + + ++ EXTRACTING INFO FROM A SOLUTION + +An advantage of non Space-bound variables, is that you can use them both to +post constraints in the original space AND to consult their values in +solutions. Below are methods for looking up information about variables. Each +of these methods can either take a variable as argument, or a list of +variables, and returns resp. either a value, or a list of values: + +~~~~~{.prolog} + Val := assigned(Space,X) + + Val := min(Space,X) + Val := max(Space,X) + Val := med(Space,X) + Val := val(Space,X) + Val := size(Space,X) + Val := width(Space,X) + Val := regret_min(Space,X) + Val := regret_max(Space,X) + + Val := glbSize(Space,V) + Val := lubSize(Space,V) + Val := unknownSize(Space,V) + Val := cardMin(Space,V) + Val := cardMax(Space,V) + Val := lubMin(Space,V) + Val := lubMax(Space,V) + Val := glbMin(Space,V) + Val := glbMax(Space,V) + Val := glb_ranges(Space,V) + Val := lub_ranges(Space,V) + Val := unknown_ranges(Space,V) + Val := glb_values(Space,V) + Val := lub_values(Space,V) + Val := unknown_values(Space,V) +~~~~~ + ++ DISJUNCTORS + +Disjunctors provide support for disjunctions of clauses, where each clause is a +conjunction of constraints: + +~~~~~{.prolog} + C1 or C2 or ... or Cn +~~~~~ + +Each clause is executed "speculatively": this means it does not affect the main +space. When a clause becomes failed, it is discarded. When only one clause +remains, it is committed: this means that it now affects the main space. + +Example: + +Consider the problem where either X=Y=0 or X=Y+(1 or 2) for variable X and Y +that take values in 0..3. + +~~~~~{.prolog} + Space := space, + [X,Y] := intvars(Space,2,0,3), +~~~~~ + +First, we must create a disjunctor as a manager for our 2 clauses: + +~~~~~{.prolog} + Disj := disjunctor(Space), +~~~~~ + +We can now create our first clause: + +~~~~~{.prolog} + C1 := clause(Disj), +~~~~~ + +This clause wants to constrain X and Y to 0. However, since it must be +executed "speculatively", it must operate on new variables X1 and Y1 that +shadow X and Y: + +~~~~~{.prolog} + [X1,Y1] := intvars(C1,2,0,3), + C1 += forward([X,Y],[X1,Y1]), +~~~~~ + +The forward(...) stipulation indicates which global variable is shadowed by +which clause-local variable. Now we can post the speculative clause-local +constraints for X=Y=0: + +~~~~~{.prolog} + C1 += rel(X1,'IRT_EQ',0), + C1 += rel(Y1,'IRT_EQ',0), +~~~~~ + +We now create the second clause which uses X2 and Y2 to shadow X and Y: + +~~~~~{.prolog} + C2 := clause(Disj), + [X2,Y2] := intvars(C2,2,0,3), + C2 += forward([X,Y],[X2,Y2]), +~~~~~ + +However, this clause also needs a clause-local variable Z2 taking values 1 or +2 in order to post the clause-local constraint X2=Y2+Z2: + +~~~~~{.prolog} + Z2 := intvar(C2,1,2), + C2 += linear([-1,1,1],[X2,Y2,Z2],'IRT_EQ',0), +~~~~~ + +Finally, we can branch and search: + +~~~~~{.prolog} + Space += branch([X,Y],'INT_VAR_SIZE_MIN','INT_VAL_MIN'), + SolSpace := search(Space), +~~~~~ + +and lookup values of variables in each solution: + +~~~~~{.prolog} + [X_,Y_] := val(SolSpace,[X,Y]). +~~~~~ + + + + +*/ + +:- use_module(library(debug)). + +:- op(500, xfx, user:':='). +:- op(500, xfx, user:'+='). +:- load_foreign_files([gecode_yap],[],gecode_init). + +is_int(X,Y) :- integer(X), Y=X. +is_int(X) :- integer(X). + +is_bool_(true,true). +is_bool_(false,false). +is_bool(X,Y) :- nonvar(X), Y=X. +is_bool(X) :- is_bool(X,_). + +is_IntVar_('IntVar'(I,K),N) :- + integer(I), + integer(K), + nb_getval(gecode_space_use_keep_index,B), + (B=true -> N=K ; N=I). +is_FloatVar_('FloatVar'(I,K),N) :- + integer(I), + integer(K), + nb_getval(gecode_space_use_keep_index,B), + (B=true -> N=K ; N=I). +is_BoolVar_('BoolVar'(I,K),N) :- + integer(I), + integer(K), + nb_getval(gecode_space_use_keep_index,B), + (B=true -> N=K ; N=I). +is_SetVar_('SetVar'(I,K),N) :- + integer(I), + integer(K), + nb_getval(gecode_space_use_keep_index,B), + (B=true -> N=K ; N=I). + +is_IntVar(X,I) :- nonvar(X), is_IntVar_(X,I). +is_BoolVar(X,I) :- nonvar(X), is_BoolVar_(X,I). +is_FloatVar(X,I) :- nonvar(X), is_FloatVar_(X,I). +is_SetVar(X,I) :- nonvar(X), is_SetVar_(X,I). + +is_IntVar(X) :- is_IntVar(X,_). +is_BoolVar(X) :- is_BoolVar(X,_). +is_FloatVar(X) :- is_FloatVar(X,_). +is_SetVar(X) :- is_SetVar(X,_). + +is_IntVarArgs_([],[]). +is_IntVarArgs_([H|T],[H2|T2]) :- is_IntVar(H,H2), is_IntVarArgs(T,T2). +is_IntVarArgs(X,Y) :- nonvar(X), is_IntVarArgs_(X,Y). +is_IntVarArgs(X) :- \+ \+ is_IntVarArgs(X,_). + +is_BoolVarArgs_([],[]). +is_BoolVarArgs_([H|T],[H2|T2]) :- is_BoolVar(H,H2), is_BoolVarArgs(T,T2). +is_BoolVarArgs(X,Y) :- nonvar(X), is_BoolVarArgs_(X,Y). +is_BoolVarArgs(X) :- \+ \+ is_BoolVarArgs(X,_). + +is_FloatVarArgs_([],[]). +is_FloatVarArgs_([H|T],[H2|T2]) :- is_FloatVar(H,H2), is_FloatVarArgs(T,T2). +is_FloatVarArgs(X,Y) :- nonvar(X), is_FloatVarArgs_(X,Y). +is_FloatVarArgs(X) :- \+ \+ is_FloatVarArgs(X,_). + +is_FloatValArgs_([],[]). +is_FloatValArgs_([H|T],[H2|T2]) :- is_FloatVar(H,H2), is_FloatValArgs(T,T2). +is_FloatValArgs(X,Y) :- nonvar(X), is_FloatValArgs_(X,Y). +is_FloatValArgs(X) :- \+ \+ is_FloatValArgs(X,_). + +is_SetVarArgs_([],[]). +is_SetVarArgs_([H|T],[H2|T2]) :- is_SetVar(H,H2), is_SetVarArgs(T,T2). +is_SetVarArgs(X,Y) :- nonvar(X), is_SetVarArgs_(X,Y). +is_SetVarArgs(X) :- \+ \+ is_SetVarArgs(X,_). + +is_IntArgs_([],[]). +is_IntArgs_([H|T],[H|T2]) :- integer(H), is_IntArgs(T,T2). +is_IntArgs(X,Y) :- nonvar(X), is_IntArgs_(X,Y). +is_IntArgs(X) :- \+ \+ is_IntArgs(X,_). + +is_IntSharedArray(X) :- is_IntArgs(X). +is_IntSharedArray(X,Y) :- is_IntArgs(X,Y). + +is_TaskTypeArgs_([],[]). +is_TaskTypeArgs_([H|T],[H2|T2]) :- is_TaskType(H,H2), is_TaskTypeArgs(T,T2). +is_TaskTypeArgs(X,Y) :- nonvar(X), is_TaskTypeArgs_(X,Y). +is_TaskTypeArgs(X) :- \+ \+ is_TaskTypeArgs(X,_). + +is_IntSet_('IntSet'(L),L). +is_IntSet(X,Y) :- nonvar(X), is_IntSet_(X,Y). +is_IntSet(X) :- is_IntSet(X,_). + +is_IntSetArgs_([],[]). +is_IntSetArgs_([H|T],[H2|T2]) :- is_IntSet(H,H2), is_IntSetArgs(T,T2). +is_IntSetArgs(X,Y) :- nonvar(X), is_IntSetArgs_(X,Y). +is_IntSetArgs(X) :- \+ \+ is_IntSetArgs(X,_). + +is_TupleSet_('TupleSet'(TS),TS). +is_TupleSet(X,Y) :- nonvar(X), is_TupleSet_(X,Y). +is_TupleSet(X) :- is_TupleSet(X,_). + +is_DFA_('DFA'(TS),TS). +is_DFA(X,Y) :- nonvar(X), is_DFA_(X,Y). +is_DFA(X) :- is_DFA(X,_). + +new_intset(X,I,J) :- intset(X,I,J). +new_intset(X,L) :- intset(X,L). + +intset(X, I, J) :- + integer(I), + integer(J), + X='IntSet'([(I,J)]). +intset(X, L) :- + is_list_of_intset_specs(L,L2), + X='IntSet'(L2). + +is_list_of_intset_specs(X,Y) :- + nonvar(X), is_list_of_intset_specs_(X,Y). +is_list_of_intset_specs_([],[]). +is_list_of_intset_specs_([H|T],[H2|T2]) :- + is_intset_spec(H,H2), + is_list_of_intset_specs(T,T2). + +is_intset_spec(X,Y) :- nonvar(X), is_intset_spec_(X,Y). +is_intset_spec_((I,J),(I,J)) :- !, integer(I), integer(J). +is_intset_spec_(I,(I,I)) :- integer(I). + +assert_var(X,Y) :- + var(X) -> X=Y; throw(gecode_error(expected(var))). +assert_is_int(X,Y) :- + integer(X) -> X=Y ; throw(gecode_error(expected(int))). +assert_is_float(X,Y) :- + float(X) -> X=Y ; throw(gecode_error(expected(int))). +assert_is_Space(X,Y) :- + is_Space(X,Y) -> true ; throw(gecode_error(expected(space))). +assert_is_IntSet(X,Y) :- + is_IntSet(X,Y) -> true ; throw(gecode_error(expected(intset))). +assert_is_TupleSet(X,Y) :- + is_TupleSet(X,Y) -> true ; throw(gecode_error(expected(tupleset))). +assert_is_DFA(X,Y) :- + is_DFA(X,Y) -> true ; throw(gecode_error(expected(dfa))). +assert_is_IntVar(X,Y) :- + is_IntVar(X,Y) -> true ; throw(gecode_error(expected(intvar))). +assert_is_BoolVar(X,Y) :- + is_BoolVar(X,Y) -> true ; throw(gecode_error(expected(boolvar))). +assert_is_FloatVar(X,Y) :- + is_FloatVar(X,Y) -> true ; throw(gecode_error(expected(floatvar))). +assert_is_SetVar(X,Y) :- + is_SetVar(X,Y) -> true ; throw(gecode_error(expected(setvar))). +assert_is_IntArgs(X,Y) :- + is_IntArgs(X,Y) -> true ; throw(gecode_error(expected(intargs))). +assert_is_IntVarArgs(X,Y) :- + is_IntVarArgs(X,Y) -> true ; throw(gecode_error(expected(intvarargs))). +assert_is_BoolVarArgs(X,Y) :- + is_BoolVarArgs(X,Y) -> true ; throw(gecode_error(expected(boolvarargs))). +assert_is_FloatVarArgs(X,Y) :- + is_FloatVarArgs(X,Y) -> true ; throw(gecode_error(expected(floatvarargs))). +assert_is_FloatValArgs(X,Y) :- + is_FloatValArgs(X,Y) -> true ; throw(gecode_error(expected(floatvarargs))). +assert_is_SetVarArgs(X,Y) :- + is_SetVarArgs(X,Y) -> true ; throw(gecode_error(expected(setvarargs))). +assert_is_ReifyMode(X,Y) :- + is_ReifyMode(X,Y) -> true ; throw(gecode_error(expected(reifymode))). + +assert_var(X) :- assert_var(X,_). +assert_is_int(X) :- assert_is_int(X,_). +assert_is_float(X) :- assert_is_float(X,_). +assert_is_Space(X) :- assert_is_Space(X,_). +assert_is_IntSet(X) :- assert_is_IntSet(X,_). +assert_is_IntVar(X) :- assert_is_IntVar(X,_). +assert_is_BoolVar(X) :- assert_is_BoolVar(X,_). +assert_is_FloatVar(X) :- assert_is_FloatVar(X,_). +assert_is_SetVar(X) :- assert_is_SetVar(X,_). +assert_is_IntArgs(X) :- assert_is_IntArgs(X,_). +assert_is_IntVarArgs(X) :- assert_is_IntVarArgs(X,_). +assert_is_BoolVarArgs(X) :- assert_is_BoolVarArgs(X,_). +assert_is_FloatVarArgs(X) :- assert_is_FloatVarArgs(X,_). +assert_is_FloatValArgs(X) :- assert_is_FloatValArgs(X,_). +assert_is_SetVarArgs(X) :- assert_is_SetVarArgs(X,_). + +%% Var and Val Branching changed in Gecode 4 to be done as a set of functions, +%% not as an enum. + +is_IntVarBranch_('INT_VAR_NONE'). +is_IntVarBranch_('INT_VAR_RND'(_)). +is_IntVarBranch_('INT_VAR_MERIT_MIN'(_)). +is_IntVarBranch_('INT_VAR_MERIT_MAX'(_)). +is_IntVarBranch_('INT_VAR_DEGREE_MIN'). +is_IntVarBranch_('INT_VAR_DEGREE_MAX'). +is_IntVarBranch_('INT_VAR_AFC_MIN'(_)). +is_IntVarBranch_('INT_VAR_AFC_MAX'(_)). +is_IntVarBranch_('INT_VAR_ACTIVITY_MIN'(_)). +is_IntVarBranch_('INT_VAR_ACTIVITY_MAX'(_)). +is_IntVarBranch_('INT_VAR_MIN_MIN'). +is_IntVarBranch_('INT_VAR_MIN_MAX'). +is_IntVarBranch_('INT_VAR_MAX_MIN'). +is_IntVarBranch_('INT_VAR_MAX_MAX'). +is_IntVarBranch_('INT_VAR_SIZE_MIN'). +is_IntVarBranch_('INT_VAR_SIZE_MAX'). +is_IntVarBranch_('INT_VAR_DEGREE_SIZE_MIN'). +is_IntVarBranch_('INT_VAR_DEGREE_SIZE_MAX'). +is_IntVarBranch_('INT_VAR_AFC_SIZE_MIN'(_)). +is_IntVarBranch_('INT_VAR_AFC_SIZE_MAX'(_)). +is_IntVarBranch_('INT_VAR_ACTIVITY_SIZE_MIN'(_)). +is_IntVarBranch_('INT_VAR_ACTIVITY_SIZE_MAX'(_)). +is_IntVarBranch_('INT_VAR_REGRET_MIN_MIN'). +is_IntVarBranch_('INT_VAR_REGRET_MIN_MAX'). +is_IntVarBranch_('INT_VAR_REGRET_MAX_MIN'). +is_IntVarBranch_('INT_VAR_REGRET_MAX_MAX'). + +is_IntVarBranch_(X, X) :- + is_IntVarBranch_(X). + +is_IntVarBranch(X,Y) :- nonvar(X), is_IntVarBranch_(X,Y). +is_IntVarBranch(X) :- is_IntVarBranch(X,_). + +is_SetVarBranch_('SET_VAR_NONE'). +is_SetVarBranch_('SET_VAR_RND'(_)). +is_SetVarBranch_('SET_VAR_MERIT_MIN'(_)). +is_SetVarBranch_('SET_VAR_MERIT_MAX'(_)). +is_SetVarBranch_('SET_VAR_DEGREE_MIN'). +is_SetVarBranch_('SET_VAR_DEGREE_MAX'). +is_SetVarBranch_('SET_VAR_AFC_MIN'(_)). +is_SetVarBranch_('SET_VAR_AFC_MAX'(_)). +is_SetVarBranch_('SET_VAR_ACTIVITY_MIN'(_)). +is_SetVarBranch_('SET_VAR_ACTIVITY_MAX'(_)). +is_SetVarBranch_('SET_VAR_MIN_MIN'). +is_SetVarBranch_('SET_VAR_MIN_MAX'). +is_SetVarBranch_('SET_VAR_MAX_MIN'). +is_SetVarBranch_('SET_VAR_MAX_MAX'). +is_SetVarBranch_('SET_VAR_SIZE_MIN'). +is_SetVarBranch_('SET_VAR_SIZE_MAX'). +is_SetVarBranch_('SET_VAR_DEGREE_SIZE_MIN'). +is_SetVarBranch_('SET_VAR_DEGREE_SIZE_MAX'). +is_SetVarBranch_('SET_VAR_AFC_SIZE_MIN'(_)). +is_SetVarBranch_('SET_VAR_AFC_SIZE_MAX'(_)). +is_SetVarBranch_('SET_VAR_ACTIVITY_SIZE_MIN'(_)). +is_SetVarBranch_('SET_VAR_ACTIVITY_SIZE_MAX'(_)). + +is_SetVarBranch_(X, X) :- + is_SetVarBranch_(X). + +is_SetVarBranch(X,Y) :- nonvar(X), is_SetVarBranch_(X,Y). +is_SetVarBranch(X) :- is_SetVarBranch(X,_). + +is_FloatVarBranch_('FLOAT_VAR_NONE'). +is_FloatVarBranch_('FLOAT_VAR_RND'(_)). +is_FloatVarBranch_('FLOAT_VAR_MERIT_MIN'(_)). +is_FloatVarBranch_('FLOAT_VAR_MERIT_MAX'(_)). +is_FloatVarBranch_('FLOAT_VAR_DEGREE_MIN'). +is_FloatVarBranch_('FLOAT_VAR_DEGREE_MAX'). +is_FloatVarBranch_('FLOAT_VAR_AFC_MIN'(_)). +is_FloatVarBranch_('FLOAT_VAR_AFC_MAX'(_)). +is_FloatVarBranch_('FLOAT_VAR_ACTIVITY_MIN'(_)). +is_FloatVarBranch_('FLOAT_VAR_ACTIVITY_MAX'(_)). +is_FloatVarBranch_('FLOAT_VAR_MIN_MIN'). +is_FloatVarBranch_('FLOAT_VAR_MIN_MAX'). +is_FloatVarBranch_('FLOAT_VAR_MAX_MIN'). +is_FloatVarBranch_('FLOAT_VAR_MAX_MAX'). +is_FloatVarBranch_('FLOAT_VAR_SIZE_MIN'). +is_FloatVarBranch_('FLOAT_VAR_SIZE_MAX'). +is_FloatVarBranch_('FLOAT_VAR_DEGREE_SIZE_MIN'). +is_FloatVarBranch_('FLOAT_VAR_DEGREE_SIZE_MAX'). +is_FloatVarBranch_('FLOAT_VAR_AFC_SIZE_MIN'(_)). +is_FloatVarBranch_('FLOAT_VAR_AFC_SIZE_MAX'(_)). +is_FloatVarBranch_('FLOAT_VAR_ACTIVITY_SIZE_MIN'(_)). +is_FloatVarBranch_('FLOAT_VAR_ACTIVITY_SIZE_MAX'(_)). + +is_FloatVarBranch_(X, X) :- + is_FloatVarBranch_(X). + +is_FloatVarBranch(X,Y) :- nonvar(X), is_FloatVarBranch_(X,Y). +is_FloatVarBranch(X) :- is_FloatVarBranch(X,_). + +is_IntValBranch_('INT_VAL_RND'(_)). +is_IntValBranch_('INT_VAL'(_,_)). +is_IntValBranch_('INT_VAL_MIN'). +is_IntValBranch_('INT_VAL_MED'). +is_IntValBranch_('INT_VAL_MAX'). +is_IntValBranch_('INT_VAL_SPLIT_MIN'). +is_IntValBranch_('INT_VAL_SPLIT_MAX'). +is_IntValBranch_('INT_VAL_RANGE_MIN'). +is_IntValBranch_('INT_VAL_RANGE_MAX'). +is_IntValBranch_('INT_VALUES_MIN'). +is_IntValBranch_('INT_NEAR_MIN'(_)). +is_IntValBranch_('INT_NEAR_MAX'(_)). +is_IntValBranch_('INT_NEAR_INC'(_)). +is_IntValBranch_('INT_NEAR_DEC'(_)). + +is_IntValBranch_(X,X) :- is_IntValBranch_(X). + +is_IntValBranch(X,Y) :- nonvar(X), is_IntValBranch_(X,Y). +is_IntValBranch(X) :- is_IntValBranch(X,_). + +is_SetValBranch_('SET_VAL_RND_INC'(_)). +is_SetValBranch_('SET_VAL_RND_EXC'(_)). +is_SetValBranch_('SET_VAL'(_,_)). +is_SetValBranch_('SET_VAL_MIN_INC'). +is_SetValBranch_('SET_VAL_MIN_EXC'). +is_SetValBranch_('SET_VAL_MED_INC'). +is_SetValBranch_('SET_VAL_MED_EXC'). +is_SetValBranch_('SET_VAL_MAX_INC'). +is_SetValBranch_('SET_VAL_MAX_EXC'). + +is_SetValBranch_(X,X) :- is_SetValBranch_(X). + +is_SetValBranch(X,Y) :- nonvar(X), is_SetValBranch_(X,Y). +is_SetValBranch(X) :- is_SetValBranch(X,_). + +is_FloatValBranch_('FLOAT_VAL'(_,_)). +is_FloatValBranch_('FLOAT_VAL_SPLIT_RND'(_)). +is_FloatValBranch_('FLOAT_VAL_SPLIT_MIN'). +is_FloatValBranch_('FLOAT_VAL_SLIT_MAX'). + +is_FloatValBranch_(X,X) :- is_FloatValBranch_(X). + +is_FloatValBranch(X,Y) :- nonvar(X), is_FloatValBranch_(X,Y). +is_FloatValBranch(X) :- is_FloatValBranch(X,_). + + +new_space(Space) :- + assert_var(Space), + gecode_new_space(Space_), + Space='Space'(Space_). + +%% checking that an argument is a space sets a global variable +%% indicating whether variables need to be translated to their +%% original index or to their "keep" index. +%% +%% these bindings are going to take advantage of the fact that, +%% when a space is involved, it is checked first, thus setting +%% this global variable. subsequent accesses to variables are +%% then correctly translated. + +is_Space_('Space'(X),X) :- + gecode_space_use_keep_index(X,B), + nb_setval(gecode_space_use_keep_index,B). +is_Space(X,Y) :- nonvar(X), is_Space_(X,Y). +is_Space(X) :- is_Space(X,_). + +is_Reify_('Reify'(X),X). +is_Reify(X,Y) :- nonvar(X), is_Reify_(X,Y). +is_Reify(X) :- is_Reify(X,_). + +%% AUTOGENERATE ALL VARIANTS LATER! + +new_intvars([], _Space, _Lo, _Hi). +new_intvars([IVar|IVars], Space, Lo, Hi) :- + new_intvar(IVar, Space, Lo, Hi), + new_intvars(IVars, Space, Lo, Hi). + +new_intvars([], _Space, _IntSet). +new_intvars([IVar|IVars], Space, IntSet) :- + new_intvar(IVar, Space, IntSet), + new_intvars(IVars, Space, IntSet). + +new_boolvars([], _Space). +new_boolvars([BVar|BVars], Space) :- + new_boolvar(BVar, Space), + new_boolvars(BVars, Space). + +new_setvars([], _Space, _X1, _X2, _X3, _X4, _X5, _X6). +new_setvars([SVar|SVars], Space, X1, X2, X3, X4, X5, X6) :- + new_setvar(SVar, Space, X1, X2, X3, X4, X5, X6), + new_setvars(SVars, Space, X1, X2, X3, X4, X5, X6). + +new_setvars([], _Space, _X1, _X2, _X3, _X4, _X5). +new_setvars([SVar|SVars], Space, X1, X2, X3, X4, X5) :- + new_setvar(SVar, Space, X1, X2, X3, X4, X5), + new_setvars(SVars, Space, X1, X2, X3, X4, X5). + +new_setvars([], _Space, _X1, _X2, _X3, _X4). +new_setvars([SVar|SVars], Space, X1, X2, X3, X4) :- + new_setvar(SVar, Space, X1, X2, X3, X4), + new_setvars(SVars, Space, X1, X2, X3, X4). + +new_setvars([], _Space, _X1, _X2, _X3). +new_setvars([SVar|SVars], Space, X1, X2, X3) :- + new_setvar(SVar, Space, X1, X2, X3), + new_setvars(SVars, Space, X1, X2, X3). + +new_setvars([], _Space, _X1, _X2). +new_setvars([SVar|SVars], Space, X1, X2) :- + new_setvar(SVar, Space, X1, X2), + new_setvars(SVars, Space, X1, X2). + +%% AUTOGENERATE LATER + +assert_integer(X) :- assert_is_int(X). + +new_intvar(IVar, Space, Lo, Hi) :- !, + assert_var(IVar), + assert_is_Space_or_Clause(Space,Space_), + assert_integer(Lo), + assert_integer(Hi), + gecode_new_intvar_from_bounds(Idx,Space_,Lo,Hi), + IVar='IntVar'(Idx,-1). +new_intvar(IVar, Space, IntSet) :- !, + assert_var(IVar), + assert_is_Space_or_Clause(Space,Space_), + assert_is_IntSet(IntSet, L), + gecode_new_intvar_from_intset(Idx,Space_,L), + IVar='IntVar'(Idx,-1). + +new_floatvar(FVar, Space, Lo, Hi) :- !, + assert_var(FVar), + assert_is_Space_or_Clause(Space,Space_), + assert_float(Lo), + assert_float(Hi), + gecode_new_floatvar_from_bounds(Idx,Space_,Lo,Hi), + FVar='FloatVar'(Idx,-1). + +new_boolvar(BVar, Space) :- !, + assert_var(BVar), + assert_is_Space_or_Clause(Space,Space_), + gecode_new_boolvar(Idx,Space_), + BVar='BoolVar'(Idx,-1). + +%% (GlbMin,GlbMax,LubMin,LubMax,CardMin,CardMax) 6 new_setvar_1 +%% (GlbMin,GlbMax,LubMin,LubMax,CardMin) 5 new_setvar_2 +%% (GlbMin,GlbMax,LubMin,LubMax) 4 new_setvar_3 +%% (Glb,LubMin,LubMax,CardMin,CardMax) 5 new_setvar_4 +%% (Glb,LubMin,LubMax,CardMin) 4 new_setvar_5 +%% (Glb,LubMin,LubMax) 3 new_setvar_6 +%% (GlbMin,GlbMax,Lub,CardMin,CardMax) 5 new_setvar_7 +%% (GlbMin,GlbMax,Lub,CardMin) 4 new_setvar_8 +%% (GlbMin,GlbMax,Lub) 3 new_setvar_9 +%% (Glb,Lub,CardMin,CardMax) 4 new_setvar_10 +%% (Glb,Lub,CardMin) 3 new_setvar_11 +%% (Glb,Lub) 2 new_setvar_12 + +%% 6 arguments +%% (GlbMin,GlbMax,LubMin,LubMax,CardMin,CardMax) 6 new_setvar_1 +new_setvar(SVar, Space, GlbMin, GlbMax, LubMin, LubMax, CardMin, CardMax) :- + assert_var(SVar), + assert_is_Space_or_Clause(Space,Space_), + assert_integer(GlbMin), + assert_integer(GlbMax), + assert_integer(LubMin), + assert_integer(LubMax), + assert_integer(CardMin), + assert_integer(CardMax), + gecode_new_setvar(Idx, Space_, GlbMin, GlbMax, LubMin, LubMax, CardMin, CardMax), + SVar='SetVar'(Idx,-1). + +%% 5 arguments +%% (GlbMin,GlbMax,LubMin,LubMax,CardMin) 5 new_setvar_2 +%% (Glb,LubMin,LubMax,CardMin,CardMax) 5 new_setvar_4 +%% (GlbMin,GlbMax,Lub,CardMin,CardMax) 5 new_setvar_7 +new_setvar(SVar, Space, X1, X2, X3, X4, X5) :- + assert_var(SVar), + assert_is_Space_or_Clause(Space,Space_), + (integer(X1) + -> + assert_integer(X2), + assert_integer(X4), + assert_integer(X5), + (is_IntSet(X3,X3_) + -> gecode_new_setvar_7(Idx,Space_,X1,X2,X3_,X4,X5) + ; gecode_new_setvar_2(Idx,Space_,X1,X2,X3,X4,X5)) + ; + assert_is_IntSet(X1,X1_), + assert_integer(X2), + assert_integer(X3), + assert_integer(X4), + assert_integer(X5), + gecode_new_setvar_4(Idx,Space_,X1_,X2,X3,X4,X5)), + SVar='SetVar'(Idx,-1). + +%% 4 arguments +%% (GlbMin,GlbMax,LubMin,LubMax) 4 new_setvar_3 +%% (Glb,LubMin,LubMax,CardMin) 4 new_setvar_5 +%% (GlbMin,GlbMax,Lub,CardMin) 4 new_setvar_8 +%% (Glb,Lub,CardMin,CardMax) 4 new_setvar_10 +new_setvar(SVar,Space,X1,X2,X3,X4) :- + assert_var(SVar), + assert_is_Space_or_Clause(Space,Space_), + assert_integer(X4), + (is_IntSet(X1,X1_) + -> (is_IntSet(X2,X2_) + -> + assert_integer(X3), + gecode_new_setvar_10(Idx,Space_,X1_,X2_,X3,X4) + ; + assert_integer(X2), + assert_integer(X3), + gecode_new_setvar_5(Idx,Space_,X1_,X2,X3,X4)) + ; + assert_integer(X1), + assert_integer(X2), + (is_IntSet(X3,X3_) + -> + gecode_new_setvar_8(Idx,Space_,X1,X2,X3_,X4) + ; + assert_integer(X3), + gecode_new_setvar_3(Idx,Space_,X1,X2,X3,X4))), + SVar='SetVar'(Idx,-1). + +%% 3 arguments +%% (Glb,LubMin,LubMax) 3 new_setvar_6 +%% (GlbMin,GlbMax,Lub) 3 new_setvar_9 +%% (Glb,Lub,CardMin) 3 new_setvar_11 +new_setvar(SVar,Space,X1,X2,X3) :- + assert_var(SVar), + assert_is_Space_or_Clause(Space,Space_), + (is_IntSet(X1,X1_) + -> (is_IntSet(X2,X2_) + -> + assert_integer(X3), + gecode_new_setvar_11(Idx,Space_,X1_,X2_,X3) + ; + assert_integer(X2), + assert_integer(X3), + gecode_new_setvar_6(Idx,Space_,X1_,X2,X3)) + ; + assert_integer(X1), + assert_integer(X2), + assert_is_IntSet(X3,X3_), + gecode_new_setvar_9(Idx,Space_,X1,X2,X3_)), + SVar='SetVar'(Idx,-1). + +%% 2 arguments +%% (Glb,Lub) 2 new_setvar_12 +new_setvar(SVar,Space,X1,X2) :- + assert_var(SVar), + assert_is_Space_or_Clause(Space,Space_), + assert_is_IntSet(X1,X1_), + assert_is_IntSet(X2,X2_), + gecode_new_setvar_12(Idx,Space_,X1_,X2_), + SVar='SetVar'(Idx,-1). + +new_tupleset( TupleSet, List ) :- + gecode_new_tupleset(List, TupleSet_), + TupleSet = 'TupleSet'(TupleSet_). + +new_dfa( DFA, S0, List, Finals ) :- + gecode_new_dfa(DFA_, S0, List, Finals), + DFA = 'DFA'(DFA_). + + +minimize(Space,IVar) :- + assert_is_Space(Space,Space_), + assert_is_IntVar(IVar,IVar_), + gecode_space_minimize(Space_,IVar_). +maximize(Space,IVar) :- + assert_is_Space(Space,Space_), + assert_is_IntVar(IVar,IVar_), + gecode_space_maximize(Space_,IVar_). +minimize(Space,IVar1,IVar2) :- + assert_is_Space(Space,Space_), + assert_is_IntVar(IVar1,IVar1_), + assert_is_IntVar(IVar2,IVar2_), + gecode_space_minimize_ratio(Space_,IVar1_,IVar2_). +maximize(Space,IVar1,IVar2) :- + assert_is_Space(Space,Space_), + assert_is_IntVar(IVar1,IVar1_), + assert_is_IntVar(IVar2,IVar2_), + gecode_space_maximize_ratio(Space_,IVar1_,IVar2_). + +reify(Space,BVar,Mode,R) :- + assert_is_Space(Space,Space_), + assert_is_BoolVar(BVar,BVar_), + assert_is_ReifyMode(Mode,Mode_), + assert_var(R), + gecode_new_reify(Space_,BVar_,Mode_,R_), + R = 'Reify'(R_). + +gecode_search_options_init(search_options(0,1.0,8,2,'RM_NONE',0,1,0)). +gecode_search_options_offset(restart,1). +gecode_search_options_offset(threads,2). +gecode_search_options_offset(c_d ,3). +gecode_search_options_offset(a_d ,4). +gecode_search_options_offset(cutoff, 5). +gecode_search_options_offset(nogoods_limit, 6). +gecode_search_options_offset(clone, 7). +gecode_search_options_offset(stop, 8). % unimplemented + +gecode_search_option_set(O,V,R) :- + gecode_search_options_offset(O,I), + setarg(I,R,V). + +gecode_search_options_from_alist(L,R) :- + gecode_search_options_init(R), + gecode_search_options_process_alist(L,R). + +gecode_search_options_process_alist([], _R). +gecode_search_options_process_alist([H|T], R) :- !, + gecode_search_options_process1(H, R), + gecode_search_options_process_alist(T, R). + +gecode_search_options_process1(restart,R) :- !, + gecode_search_option_set(restart,1,R). +gecode_search_options_process1(threads=N,R) :- !, + (integer(N) -> V is float(N) + ; (float(N) -> V=N + ; throw(bad_search_option_value(threads=N)))), + gecode_search_option_set(threads,V,R). +gecode_search_options_process1(c_d=N,R) :- !, + (integer(N) -> V=N + ; throw(bad_search_option_value(c_d=N))), + gecode_search_option_set(c_d,V,R). +gecode_search_options_process1(a_d=N,R) :- !, + (integer(N) -> V=N + ; throw(bad_search_option_value(a_d=N))), + gecode_search_option_set(a_d,V,R). +gecode_search_options_process1(cutoff=C,R) :- !, + (is_RestartMode(C,C_) -> V=C_ + ; throw(bad_search_option_value(cutoff=C))), + gecode_search_option_set(cutoff,V,R). +gecode_search_options_process1(nogoods_limit=N,R) :- !, + (integer(N), N >= 0 -> V=N + ; throw(bad_search_option_value(nogoods_limit=N))), + gecode_search_option_set(nogoods_limit,V,R). +gecode_search_options_process1(clone=N,R) :- !, + ((N == 0 ; N == 1)-> V=N + ; throw(bad_search_option_value(clone=N))), + gecode_search_option_set(clone,V,R). +gecode_search_options_process1(O,_) :- + throw(gecode_error(unrecognized_search_option(O))). + +search(Space, Solution) :- + search(Space, Solution, []). + +search(Space, Solution, Alist) :- + assert_is_Space(Space,Space_), + assert_var(Solution), + gecode_search_options_from_alist(Alist,O), + gecode_new_engine(Space_,Engine_,O), + gecode_engine_search(Engine_,Solution_), + Solution='Space'(Solution_). + + +%% INSPECTING VARIABLES + +get_for_vars([],_Space,[],_F). +get_for_vars([V|Vs],Space,[V2|V2s],F) :- + call_with_args(F,V,Space,V2), + get_for_vars(Vs,Space,V2s,F). + +get_assigned(Space, Var) :- + assert_is_Space(Space,Space_), + (is_IntVar(Var,Var_) + -> gecode_intvar_assigned(Space_,Var_) + ; is_BoolVar(Var,Var_) + -> gecode_boolvar_assigned(Space_,Var_) + ; is_FloatVar(Var,Var_) + -> gecode_floatvar_assigned(Space_,Var_) + ; is_SetVar(Var,Var_) + -> gecode_setvar_assigned(Space_,Var_) + ; throw(gecode_error(expected(variable)))). + +get_min(X, Space, Var) :- + assert_is_Space(Space,Space_), + (is_IntVar(Var,Var_) + -> gecode_intvar_min(X, Space_, Var_) + ; is_BoolVar(Var,Var_) + -> gecode_boolvar_min(X, Space_, Var_) + ; is_FloatVar(Var,Var_) + -> gecode_floatvar_min(X, Space_, Var_) + ; get_for_vars(X, Space, Var, gecode:get_min)). + +get_max(X, Space, Var) :- + assert_is_Space(Space,Space_), + (is_IntVar(Var,Var_) + -> gecode_intvar_max(X, Space_, Var_) + ; is_BoolVar(Var,Var_) + -> gecode_boolvar_max(X, Space_, Var_) + ; is_FloatVar(Var,Var_) + -> gecode_floatvar_max(X, Space_, Var_) + ; get_for_vars(X, Space, Var, gecode:get_max)). + +get_med(X, Space, Var) :- + assert_is_Space(Space,Space_), + (is_IntVar(Var,Var_) + -> gecode_intvar_med(X, Space_, Var_) + ; is_BoolVar(Var,Var_) + -> gecode_boolvar_med(X, Space_, Var_) + ; is_FloatVar(Var,Var_) + -> gecode_floatvar_med(X, Space_, Var_) + ; get_for_vars(X, Space, Var, gecode:get_med)). + +get_val(X, Space, Var) :- + assert_is_Space(Space,Space_), + (is_IntVar(Var,Var_) + -> gecode_intvar_val(X, Space_, Var_) + ; is_BoolVar(Var,Var_) + -> gecode_boolvar_val(X, Space_, Var_) + ; is_FloatVar(Var,Var_) + -> gecode_floatvar_val(X, Space_, Var_) + ; get_for_vars(X, Space, Var, gecode:get_val)). + +get_size(X, Space, Var) :- + assert_is_Space(Space,Space_), + (is_IntVar(Var,Var_) + -> gecode_intvar_size(X, Space_, Var_) + ; is_BoolVar(Var,Var_) + -> gecode_boolvar_size(X, Space_, Var_) + ; get_for_vars(X, Space, Var, gecode:get_size)). + +get_width(X, Space, Var) :- + assert_is_Space(Space,Space_), + (is_IntVar(Var,Var_) + -> gecode_intvar_width(X, Space_, Var_) + ; is_BoolVar(Var,Var_) + -> gecode_boolvar_width(X, Space_, Var_) + ; get_for_vars(X, Space, Var, gecode:get_width)). + +get_regret_min(X, Space, Var) :- + assert_is_Space(Space,Space_), + (is_IntVar(Var,Var_) + -> gecode_intvar_regret_min(X, Space_, Var_) + ; is_BoolVar(Var,Var_) + -> gecode_boolvar_regret_min(X, Space_, Var_) + ; get_for_vars(X, Space, Var, gecode:get_regret_min)). + +get_regret_max(X, Space, Var) :- + assert_is_Space(Space,Space_), + (is_IntVar(Var,Var_) + -> gecode_intvar_regret_max(X, Space_, Var_) + ; is_BoolVar(Var,Var_) + -> gecode_boolvar_regret_max(X, Space_, Var_) + ; get_for_vars(X, Space, Var, gecode:get_regret_max)). + +get_glbSize(X, Space, Var) :- + assert_is_Space(Space,Space_), + (is_SetVar(Var,Var_) + -> gecode_setvar_glbSize(X,Space_,Var_) + ; get_for_vars(X, Space, Var, gecode:get_glbSize)). + +get_lubSize(X, Space, Var) :- + assert_is_Space(Space,Space_), + (is_SetVar(Var,Var_) + -> gecode_setvar_lubSize(X,Space_,Var_) + ; get_for_vars(X, Space, Var, gecode:get_lubSize)). + +get_unknownSize(X, Space, Var) :- + assert_is_Space(Space,Space_), + (is_SetVar(Var,Var_) + -> gecode_setvar_unknownSize(X,Space_,Var_) + ; get_for_vars(X, Space, Var, gecode:get_unknownSize)). + +get_cardMin(X, Space, Var) :- + assert_is_Space(Space,Space_), + (is_SetVar(Var,Var_) + -> gecode_setvar_cardMin(X,Space_,Var_) + ; get_for_vars(X, Space, Var, gecode:get_cardMin)). + +get_cardMax(X, Space, Var) :- + assert_is_Space(Space,Space_), + (is_SetVar(Var,Var_) + -> gecode_setvar_cardMax(X,Space_,Var_) + ; get_for_vars(X, Space, Var, gecode:get_cardMax)). + +get_lubMin(X, Space, Var) :- + assert_is_Space(Space,Space_), + (is_SetVar(Var,Var_) + -> gecode_setvar_lubMin(X,Space_,Var_) + ; get_for_vars(X, Space, Var, gecode:get_lubMin)). + +get_lubMax(X, Space, Var) :- + assert_is_Space(Space,Space_), + (is_SetVar(Var,Var_) + -> gecode_setvar_lubMax(X,Space_,Var_) + ; get_for_vars(X, Space, Var, gecode:get_lubMax)). + +get_glbMin(X, Space, Var) :- + assert_is_Space(Space,Space_), + (is_SetVar(Var,Var_) + -> gecode_setvar_glbMin(X,Space_,Var_) + ; get_for_vars(X, Space, Var, gecode:get_glbMin)). + +get_glbMax(X, Space, Var) :- + assert_is_Space(Space,Space_), + (is_SetVar(Var,Var_) + -> gecode_setvar_glbMax(X,Space_,Var_) + ; get_for_vars(X, Space, Var, gecode:get_glbMax)). + +get_glb_ranges(X, Space, Var) :- + assert_is_Space(Space,Space_), + (is_SetVar(Var,Var_) + -> gecode_setvar_glb_ranges(X,Space_,Var_) + ; get_for_vars(X,Space,Var,gecode:get_glb_ranges)). + +get_lub_ranges(X, Space, Var) :- + assert_is_Space(Space,Space_), + (is_SetVar(Var,Var_) + -> gecode_setvar_lub_ranges(X,Space_,Var_) + ; get_for_vars(X,Space,Var,gecode:get_lub_ranges)). + +get_unknown_ranges(X, Space, Var) :- + assert_is_Space(Space,Space_), + (is_SetVar(Var,Var_) + -> gecode_setvar_unknown_ranges(X,Space_,Var_) + ; get_for_vars(X,Space,Var,gecode:get_unknown_ranges)). + +get_glb_values(X, Space, Var) :- + assert_is_Space(Space,Space_), + (is_SetVar(Var,Var_) + -> gecode_setvar_glb_values(X,Space_,Var_) + ; get_for_vars(X,Space,Var,gecode:get_glb_values)). + +get_lub_values(X, Space, Var) :- + assert_is_Space(Space,Space_), + (is_SetVar(Var,Var_) + -> gecode_setvar_lub_values(X,Space_,Var_) + ; get_for_vars(X,Space,Var,gecode:get_lub_values)). + +get_unknown_values(X, Space, Var) :- + assert_is_Space(Space,Space_), + (is_SetVar(Var,Var_) + -> gecode_setvar_unknown_values(X,Space_,Var_) + ; get_for_vars(X,Space,Var,gecode:get_unknown_values)). + +get_ranges(X, Space, Var) :- + assert_is_Space(Space,Space_), + (is_IntVar(Var,Var_) + -> gecode_intvar_ranges(X,Space_,Var_) + ; get_for_vars(X,Space,Var,gecode:get_ranges)). + +get_values(X, Space, Var) :- + assert_is_Space(Space,Space_), + (is_IntVar(Var,Var_) + -> gecode_intvar_values(X,Space_,Var_) + ; get_for_vars(X,Space,Var,gecode:get_values)). + +new_disjunctor(X, Space) :- + assert_is_Space(Space,Space_), + gecode_new_disjunctor(D,Space_), + X='Disjunctor'(D). + +is_Disjunctor_('Disjunctor'(D),D). +is_Disjunctor(X,Y) :- nonvar(X), is_Disjunctor_(X,Y). +is_Disjunctor(X) :- is_Disjunctor(X,_). + +assert_is_Disjunctor(X,Y) :- + is_Disjunctor(X,Y) -> true ; throw(gecode_error(expected(disjunctor))). + +new_clause(X, Disj) :- + assert_is_Disjunctor(Disj,Disj_), + gecode_new_clause(C, Disj_), + X='Clause'(C). + +is_Clause_('Clause'(C),C) :- + gecode_space_use_keep_index(C,B), + nb_setval(gecode_space_use_keep_index,B). +is_Clause(X,Y) :- nonvar(X), is_Clause_(X,Y). +is_Clause(X) :- is_Clause(X,_). + +assert_is_Clause(X,Y) :- + is_Clause(X,Y) -> true ; throw(gecode_error(expected(clause))). + +is_Space_or_Clause(X,Y) :- + (is_Space(X,Y);is_Clause(X,Y)), !. +assert_is_Space_or_Clause(X,Y) :- + is_Space_or_Clause(X,Y) -> true + ; throw(gecode_error(expected(space,clause))). + +new_forward(Clause, X, Y) :- + assert_is_Clause(Clause, Clause_), + (is_IntVar(X,X_) + -> (is_IntVar(Y,Y_) + -> gecode_clause_intvar_forward(Clause_,X_,Y_) + ; throw(gecode_error(forward))) + ; (is_BoolVar(X,X_) + -> (is_BoolVar(Y,Y_) + -> gecode_clause_boolvar_forward(Clause_,X_,Y_) + ; throw(gecode_error(forward))) + ; (is_SetVar(X,X_) + -> (is_SetVar(Y,Y_) + -> gecode_clause_setvar_forward(Clause_,X_,Y_) + ; throw(gecode_error(forward))) + ; (X=[] + -> Y=[] + ;(X=[H1|T1],Y=[H2|T2]) + -> (new_forward(Clause,H1,H2), + new_forward(Clause,T1,T2)) + ; throw(gecode_error(forward)))))). + +new_intvars_(L,Space,N,I,J) :- length(L,N), new_intvars(L,Space,I,J). +new_intvars_(L,Space,N,IntSet) :- length(L,N), new_intvars(L,Space,IntSet). +new_boolvars_(L,Space,N) :- length(L,N), new_boolvars(L,Space). +new_setvars_(L,Space,N,X1,X2,X3,X4,X5,X6) :- length(L,N), new_setvars(L,Space,X1,X2,X3,X4,X5,X6). +new_setvars_(L,Space,N,X1,X2,X3,X4,X5) :- length(L,N), new_setvars(L,Space,X1,X2,X3,X4,X5). +new_setvars_(L,Space,N,X1,X2,X3,X4) :- length(L,N), new_setvars(L,Space,X1,X2,X3,X4). +new_setvars_(L,Space,N,X1,X2,X3) :- length(L,N), new_setvars(L,Space,X1,X2,X3). +new_setvars_(L,Space,N,X1,X2) :- length(L,N), new_setvars(L,Space,X1,X2). + +keep_(Space, Var) :- + (Var = 'IntVar'(I,J) + -> (J = -1 -> (gecode_intvar_keep(Space,I,K),setarg(2,Var,K)) + ; throw(gecode_error(variable_already_kept(Var)))) + ; (Var = 'BoolVar'(I,J) + -> (J = -1 -> (gecode_boolvar_keep(Space,I,K),setarg(2,Var,K)) + ; throw(gecode_error(variable_already_kept(Var)))) + ; (Var = 'SetVar'(I,J) + -> (J = -1 -> (gecode_setvar_keep(Space,I,K),setarg(2,Var,K)) + ; throw(gecode_error(variable_already_kept(Var)))) + ; keep_list_(Space,Var)))). + +keep_list_(_Space, []) :- !. +keep_list_(Space, [H|T]) :- !, + keep_(Space,H), keep_list_(Space,T). +keep_list_(_, X) :- + throw(gecode_error(not_a_variable(X))). + +%% more concise interface: +(X := Y) :- var(Y), !, throw(gecode_error((X := Y))). +(X := intset(I,J)) :- !, new_intset(X,I,J). +(X := intset(L)) :- !, new_intset(X,L). +(X := space) :- !, new_space(X). +(X := intvar(Space,I,J)) :- !, new_intvar(X,Space,I,J). +(X := intvar(Space,IntSet)) :- !, new_intvar(X,Space,IntSet). +(X := boolvar(Space)) :- !, new_boolvar(X,Space). +(X := setvar(Space,X1,X2,X3,X4,X5,X6)) :- !, new_setvar(X,Space,X1,X2,X3,X4,X5,X6). +(X := setvar(Space,X1,X2,X3,X4,X5)) :- !, new_setvar(X,Space,X1,X2,X3,X4,X5). +(X := setvar(Space,X1,X2,X3,X4)) :- !, new_setvar(X,Space,X1,X2,X3,X4). +(X := setvar(Space,X1,X2,X3)) :- !, new_setvar(X,Space,X1,X2,X3). +(X := setvar(Space,X1,X2)) :- !, new_setvar(X,Space,X1,X2). +(X := intvars(Space,N,I,J)) :- !, new_intvars_(X,Space,N,I,J). +(X := intvars(Space,N,IntSet)) :- !, new_intvars_(X,Space,N,IntSet). +(X := boolvars(Space,N)) :- !, new_boolvars_(X,Space,N). +(X := setvars(Space,N,X1,X2,X3,X4,X5,X6)) :- !, new_setvars_(X,Space,N,X1,X2,X3,X4,X5,X6). +(X := setvars(Space,N,X1,X2,X3,X4,X5)) :- !, new_setvars_(X,Space,N,X1,X2,X3,X4,X5). +(X := setvars(Space,N,X1,X2,X3,X4)) :- !, new_setvars_(X,Space,N,X1,X2,X3,X4). +(X := setvars(Space,N,X1,X2,X3)) :- !, new_setvars_(X,Space,N,X1,X2,X3). +(X := setvars(Space,N,X1,X2)) :- !, new_setvars_(X,Space,N,X1,X2). +(X := tupleset(Set)) :- !, new_tupleset(X, Set). +(X := dfa(S0, Transitions, Finals)) :- !, new_dfa(X, S0, Transitions, Finals). + +(X := min(Space,Var)) :- !, get_min(X,Space,Var). +(X := max(Space,Var)) :- !, get_max(X,Space,Var). +(X := med(Space,Var)) :- !, get_med(X,Space,Var). +(X := val(Space,Var)) :- !, get_val(X,Space,Var). +(X := size(Space,Var)) :- !, get_size(X,Space,Var). +(X := width(Space,Var)) :- !, get_width(X,Space,Var). +(X := regret_min(Space,Var)) :- !, get_regret_min(X,Space,Var). +(X := regret_max(Space,Var)) :- !, get_regret_max(X,Space,Var). +(X := ranges(Space,Var)) :- !, get_ranges(X,Space,Var). +(X := values(Space,Var)) :- !, get_values(X,Space,Var). + +(X := glbSize(Space,Var)) :- !, get_glbSize(X,Space,Var). +(X := lubSize(Space,Var)) :- !, get_lubSize(X,Space,Var). +(X := unknownSize(Space,Var)) :- !, get_unknownSize(X,Space,Var). +(X := cardMin(Space,Var)) :- !, get_cardMin(X,Space,Var). +(X := cardMax(Space,Var)) :- !, get_cardMax(X,Space,Var). +(X := lubMin(Space,Var)) :- !, get_lubMin(X,Space,Var). +(X := lubMax(Space,Var)) :- !, get_lubMax(X,Space,Var). +(X := glbMin(Space,Var)) :- !, get_glbMin(X,Space,Var). +(X := glbMax(Space,Var)) :- !, get_glbMax(X,Space,Var). +(X := glb_ranges(Space,Var)) :- !, get_glb_ranges(X,Space,Var). +(X := lub_ranges(Space,Var)) :- !, get_lub_ranges(X,Space,Var). +(X := unknown_ranges(Space,Var)) :- !, get_unknown_ranges(X,Space,Var). +(X := glb_values(Space,Var)) :- !, get_glb_values(X,Space,Var). +(X := lub_values(Space,Var)) :- !, get_lub_values(X,Space,Var). +(X := unknown_values(Space,Var)) :- !, get_unknown_values(X,Space,Var). + +(X := disjunctor(Space)) :- !, new_disjunctor(X,Space). +(X := clause(Disj)) :- !, new_clause(X,Disj). + +(X := search(Y)) :- !, search(Y,X). +(X := search(Y,L)) :- !, search(Y,X,L). + +% these should be autogenerated: +(C += forward(X,Y)) :- !, new_forward(C,X,Y). +(Space += abs(X1,X2)) :- !, abs(Space,X1,X2). +(Space += abs(X1,X2,X3)) :- !, abs(Space,X1,X2,X3). +(Space += assign(X1,X2)) :- !, assign(Space,X1,X2). +(Space += atmostOne(X1,X2)) :- !, atmostOne(Space,X1,X2). +(Space += binpacking(X1,X2,X3)) :- !, binpacking(Space,X1,X2,X3). +(Space += binpacking(X1,X2,X3,X4)) :- !, binpacking(Space,X1,X2,X3,X4). +(Space += branch(X1,X2)) :- !, branch(Space,X1,X2). +(Space += branch(X1,X2,X3)) :- !, branch(Space,X1,X2,X3). +(Space += cardinality(X1,X2)) :- !, cardinality(Space,X1,X2). +(Space += cardinality(X1,X2,X3)) :- !, cardinality(Space,X1,X2,X3). +(Space += channel(X1,X2)) :- !, channel(Space,X1,X2). +(Space += channel(X1,X2,X3)) :- !, channel(Space,X1,X2,X3). +(Space += channel(X1,X2,X3,X4)) :- !, channel(Space,X1,X2,X3,X4). +(Space += channel(X1,X2,X3,X4,X5)) :- !, channel(Space,X1,X2,X3,X4,X5). +(Space += channelSorted(X1,X2)) :- !, channelSorted(Space,X1,X2). +(Space += circuit(X1)) :- !, circuit(Space,X1). +(Space += circuit(X1,X2)) :- !, circuit(Space,X1,X2). +(Space += circuit(X1,X2,X3)) :- !, circuit(Space,X1,X2,X3). +(Space += circuit(X1,X2,X3,X4)) :- !, circuit(Space,X1,X2,X3,X4). +(Space += circuit(X1,X2,X3,X4,X5)) :- !, circuit(Space,X1,X2,X3,X4,X5). +(Space += circuit(X1,X2,X3,X4,X5,X6)) :- !, circuit(Space,X1,X2,X3,X4,X5,X6). +(Space += clause(X1,X2,X3,X4)) :- !, clause(Space,X1,X2,X3,X4). +(Space += clause(X1,X2,X3,X4,X5)) :- !, clause(Space,X1,X2,X3,X4,X5). +(Space += convex(X1)) :- !, convex(Space,X1). +(Space += convex(X1,X2)) :- !, convex(Space,X1,X2). +(Space += count(X1,X2)) :- !, count(Space,X1,X2). +(Space += count(X1,X2,X3)) :- !, count(Space,X1,X2,X3). +(Space += count(X1,X2,X3,X4)) :- !, count(Space,X1,X2,X3,X4). +(Space += count(X1,X2,X3,X4,X5)) :- !, count(Space,X1,X2,X3,X4,X5). +(Space += cumulative(X1,X2,X3,X4)) :- !, cumulative(Space,X1,X2,X3,X4). +(Space += cumulative(X1,X2,X3,X4,X5)) :- !, cumulative(Space,X1,X2,X3,X4,X5). +(Space += cumulative(X1,X2,X3,X4,X5,X6)) :- !, cumulative(Space,X1,X2,X3,X4,X5,X6). +(Space += cumulative(X1,X2,X3,X4,X5,X6,X7)) :- !, cumulative(Space,X1,X2,X3,X4,X5,X6,X7). +(Space += cumulatives(X1,X2,X3,X4,X5,X6,X7)) :- !, cumulatives(Space,X1,X2,X3,X4,X5,X6,X7). +(Space += cumulatives(X1,X2,X3,X4,X5,X6,X7,X8)) :- !, cumulatives(Space,X1,X2,X3,X4,X5,X6,X7,X8). +(Space += distinct(X1)) :- !, distinct(Space,X1). +(Space += distinct(X1,X2)) :- !, distinct(Space,X1,X2). +(Space += distinct(X1,X2,X3)) :- !, distinct(Space,X1,X2,X3). +(Space += div(X1,X2,X3)) :- !, div(Space,X1,X2,X3). +(Space += div(X1,X2,X3,X4)) :- !, div(Space,X1,X2,X3,X4). +(Space += divmod(X1,X2,X3,X4)) :- !, divmod(Space,X1,X2,X3,X4). +(Space += divmod(X1,X2,X3,X4,X5)) :- !, divmod(Space,X1,X2,X3,X4,X5). +(Space += dom(X1,X2)) :- !, dom(Space,X1,X2). +(Space += dom(X1,X2,X3)) :- !, dom(Space,X1,X2,X3). +(Space += dom(X1,X2,X3,X4)) :- !, dom(Space,X1,X2,X3,X4). +(Space += dom(X1,X2,X3,X4,X5)) :- !, dom(Space,X1,X2,X3,X4,X5). +(Space += element(X1,X2,X3)) :- !, element(Space,X1,X2,X3). +(Space += element(X1,X2,X3,X4)) :- !, element(Space,X1,X2,X3,X4). +(Space += element(X1,X2,X3,X4,X5)) :- !, element(Space,X1,X2,X3,X4,X5). +(Space += element(X1,X2,X3,X4,X5,X6)) :- !, element(Space,X1,X2,X3,X4,X5,X6). +(Space += element(X1,X2,X3,X4,X5,X6,X7)) :- !, element(Space,X1,X2,X3,X4,X5,X6,X7). +(Space += extensional(X1,X2)) :- !, extensional(Space,X1,X2). +(Space += extensional(X1,X2,X3)) :- !, extensional(Space,X1,X2,X3). +(Space += linear(X1,X2,X3)) :- !, linear(Space,X1,X2,X3). +(Space += linear(X1,X2,X3,X4)) :- !, linear(Space,X1,X2,X3,X4). +(Space += linear(X1,X2,X3,X4,X5)) :- !, linear(Space,X1,X2,X3,X4,X5). +(Space += linear(X1,X2,X3,X4,X5,X6)) :- !, linear(Space,X1,X2,X3,X4,X5,X6). +(Space += max(X1,X2)) :- !, max(Space,X1,X2). +(Space += max(X1,X2,X3)) :- !, max(Space,X1,X2,X3). +(Space += max(X1,X2,X3,X4)) :- !, max(Space,X1,X2,X3,X4). +(Space += min(X1,X2)) :- !, min(Space,X1,X2). +(Space += min(X1,X2,X3)) :- !, min(Space,X1,X2,X3). +(Space += min(X1,X2,X3,X4)) :- !, min(Space,X1,X2,X3,X4). +(Space += mod(X1,X2,X3)) :- !, mod(Space,X1,X2,X3). +(Space += mod(X1,X2,X3,X4)) :- !, mod(Space,X1,X2,X3,X4). +(Space += mult(X1,X2,X3)) :- !, mult(Space,X1,X2,X3). +(Space += mult(X1,X2,X3,X4)) :- !, mult(Space,X1,X2,X3,X4). +(Space += nooverlap(X1,X2,X3,X4)) :- !, nooverlap(Space,X1,X2,X3,X4). +(Space += nooverlap(X1,X2,X3,X4,X5)) :- !, nooverlap(Space,X1,X2,X3,X4,X5). +(Space += nooverlap(X1,X2,X3,X4,X5,X6)) :- !, nooverlap(Space,X1,X2,X3,X4,X5,X6). +(Space += nooverlap(X1,X2,X3,X4,X5,X6,X7)) :- !, nooverlap(Space,X1,X2,X3,X4,X5,X6,X7). +(Space += nooverlap(X1,X2,X3,X4,X5,X6,X7,X8)) :- !, nooverlap(Space,X1,X2,X3,X4,X5,X6,X7,X8). +(Space += notMax(X1,X2)) :- !, notMax(Space,X1,X2). +(Space += notMin(X1,X2)) :- !, notMin(Space,X1,X2). +(Space += path(X1,X2,X3)) :- !, path(Space,X1,X2,X3). +(Space += path(X1,X2,X3,X4)) :- !, path(Space,X1,X2,X3,X4). +(Space += path(X1,X2,X3,X4,X5)) :- !, path(Space,X1,X2,X3,X4,X5). +(Space += path(X1,X2,X3,X4,X5,X6)) :- !, path(Space,X1,X2,X3,X4,X5,X6). +(Space += path(X1,X2,X3,X4,X5,X6,X7)) :- !, path(Space,X1,X2,X3,X4,X5,X6,X7). +(Space += path(X1,X2,X3,X4,X5,X6,X7,X8)) :- !, path(Space,X1,X2,X3,X4,X5,X6,X7,X8). +(Space += precede(X1,X2)) :- !, precede(Space,X1,X2). +(Space += precede(X1,X2,X3)) :- !, precede(Space,X1,X2,X3). +(Space += precede(X1,X2,X3,X4)) :- !, precede(Space,X1,X2,X3,X4). +(Space += reify(X1,X2,X3)) :- !, reify(Space,X1,X2,X3). +(Space += rel(X1,X2)) :- !, rel(Space,X1,X2). +(Space += rel(X1,X2,X3)) :- !, rel(Space,X1,X2,X3). +(Space += rel(X1,X2,X3,X4)) :- !, rel(Space,X1,X2,X3,X4). +(Space += rel(X1,X2,X3,X4,X5)) :- !, rel(Space,X1,X2,X3,X4,X5). +(Space += rel(X1,X2,X3,X4,X5,X6)) :- !, rel(Space,X1,X2,X3,X4,X5,X6). +(Space += sequence(X1)) :- !, sequence(Space,X1). +(Space += sequence(X1,X2)) :- !, sequence(Space,X1,X2). +(Space += sequence(X1,X2,X3,X4,X5)) :- !, sequence(Space,X1,X2,X3,X4,X5). +(Space += sequence(X1,X2,X3,X4,X5,X6)) :- !, sequence(Space,X1,X2,X3,X4,X5,X6). +(Space += sorted(X1,X2)) :- !, sorted(Space,X1,X2). +(Space += sorted(X1,X2,X3)) :- !, sorted(Space,X1,X2,X3). +(Space += sorted(X1,X2,X3,X4)) :- !, sorted(Space,X1,X2,X3,X4). +(Space += sqr(X0,X1,X2,X3)) :- !, sqr(Space,X0,X1,X2,X3). +(Space += sqr(X1,X2)) :- !, sqr(Space,X1,X2). +(Space += sqrt(X1,X2)) :- !, sqrt(Space,X1,X2). +(Space += sqrt(X1,X2,X3)) :- !, sqrt(Space,X1,X2,X3). +(Space += unary(X1,X2)) :- !, unary(Space,X1,X2). +(Space += unary(X1,X2,X3)) :- !, unary(Space,X1,X2,X3). +(Space += unary(X1,X2,X3,X4)) :- !, unary(Space,X1,X2,X3,X4). +(Space += unary(X1,X2,X3,X4,X5)) :- !, unary(Space,X1,X2,X3,X4,X5). +(Space += unshare(X1)) :- !, unshare(Space,X1). +(Space += unshare(X1,X2)) :- !, unshare(Space,X1,X2). +(Space += weights(X1,X2,X3,X4)) :- !; weights(Space,X1,X2,X3,X4). + +(Space += minimize(X)) :- !, minimize(Space,X). +(Space += maximize(X)) :- !, maximize(Space,X). +(Space += minimize(X,Y)) :- !, minimize(Space,X,Y). +(Space += maximize(X,Y)) :- !, maximize(Space,X,Y). + +(Space += keep(X)) :- !, keep_(Space,X).