/// <summary> /// Initializes a new instance of the <see cref="ZincAsExIdTiasBoxBase"/> class /// with a given initial <see cref="IZincAnnotations"/>, <see cref="IZincExp"/>, <see cref="IZincIdent"/> /// instances. /// </summary> /// <param name='anns'> /// The given initial <see cref="IZincAnnotations"/> instance. /// </param> /// <param name='expr'> /// The given initial <see cref="IZincExp"/> instance. /// </param> /// <param name='id'> /// The given initial <see cref="IZincIdent"/> instance. /// </param> protected ZincAsExIdTiasBoxBase(IZincAnnotations anns, IZincExp expr, IZincIdent id) : base(id,expr) { this.Annotations = anns; }
/// <summary> /// Initializes a new instance of the <see cref="ZincAssignItem"/> class with a given identifier and expression. /// </summary> /// <param name="ident">The identifier of the variable to which the assignment is made.</param> /// <param name="expression">The expression that describes how the value to assign must be calculated.</param> public ZincAssignItem(ZincIdent ident, IZincExp expression) : base(ident,expression) { }
/// <summary> /// Initializes a new instance of the <see cref="ZincAsExIdTiasBoxBase"/> class /// with a given initial <see cref="IZincAnnotations"/>, <see cref="IZincExp"/>, <see cref="IZincIdent"/> and /// <see cref="IZincTypeInstExprAndIdent"/> instances. /// </summary> /// <param name='anns'> /// The given initial <see cref="IZincAnnotations"/> instance. /// </param> /// <param name='expr'> /// The given initial <see cref="IZincExp"/> instance. /// </param> /// <param name='id'> /// The given initial <see cref="IZincIdent"/> instance. /// </param> /// <param name='tias'> /// The given initial <see cref="IZincTypeInstExprAndIdent"/> instances. /// </param> protected ZincAsExIdTiasBoxBase(IZincAnnotations anns, IZincExp expr, IZincIdent id, params IZincTypeInstExprAndIdent[] tias) : this(anns,expr,id,(IList<IZincTypeInstExprAndIdent>)tias) { }
public ZincTypeInstWhereExpression(ZincTypeInstWhereExpression header, ZincIdent ident, IZincExp expression) : base(ident, expression) { }
/// <summary> /// Initializes a new instance of the <see cref="ZincVarDeclItem"/> class with a given <see cref="ZincTypeInstExprAndIdent"/> /// that describes the variable and type to initialize, a <see cref="ZincAnnotation"/> instance that annotates the declaration /// and optionally an <see cref="IZincExp"/> instance that describes the value that must be assigned. /// </summary> /// <param name="tia">A type-identifier tuple that describes the name and the type of the variable.</param> /// <param name="anns">The annotations of the variable declaration.</param> /// <param name="exp">Optionally, an expression that assigns a value to the variable.</param> public ZincVarDeclItem(ZincTypeInstExprAndIdent tia, ZincAnnotations anns = null, IZincExp exp = null) : base(anns,exp,tia) { this.TypeInstExprAndIdent.Ident.Usage = ZincIdentUsage.GlobalVariable; }
/// <summary> /// Replaces all the instances stored in the given <see cref="T:IDictionary`2"/> /// stored as keys to the corresponding values and returns this instance. /// </summary> /// <param name='identMap'> /// A <see cref="T:IDictionary`2"/> that contains pairs if /// <see cref="IZincIdent"/> instances. The keys should be replaced by the values of the dictionary. /// </param> /// <returns> /// This instance, for cascading purposes. /// </returns> public override IZincIdentReplaceContainer Replace(IDictionary<IZincIdent, IZincIdent> identMap) { this.expression = this.expression.Replace (identMap) as IZincExp; return this; }
/// <summary> /// Initializes a new instance of the <see cref="ZincExIdBoxBase"/> class with a given initial /// <see cref="IZincExp"/> instance. /// </summary> /// <param name='expression'> /// The initial <see cref="IZincExp"/> instance to store. /// </param> protected ZincExIdBoxBase(IZincExp expression) : base() { this.Expression = expression; }
/// <summary> /// Initializes a new instance of the <see cref="ZincAsExIdTiasBoxBase"/> class /// with a given initial <see cref="IZincAnnotations"/>, <see cref="IZincExp"/>, <see cref="IZincIdent"/> and /// <see cref="IZincTypeInstExprAndIdent"/> instances. /// </summary> /// <param name='anns'> /// The given initial <see cref="IZincAnnotations"/> instance. /// </param> /// <param name='expr'> /// The given initial <see cref="IZincExp"/> instance. /// </param> /// <param name='id'> /// The given initial <see cref="IZincIdent"/> instance. /// </param> /// <param name='tias'> /// The given initial <see cref="IZincTypeInstExprAndIdent"/> instances. /// </param> protected ZincAsExIdTiasBoxBase(IZincAnnotations anns, IZincExp expr, IZincIdent id, IEnumerable <IZincTypeInstExprAndIdent> tias) : this(anns, expr, id, (IList <IZincTypeInstExprAndIdent>)tias.ToArray()) { }
/// <summary> /// Initializes a new instance of the <see cref="ZincAsExIdTiasBoxBase"/> class /// with a given initial <see cref="IZincAnnotations"/>, <see cref="IZincExp"/>, <see cref="IZincIdent"/> /// instances. /// </summary> /// <param name='anns'> /// The given initial <see cref="IZincAnnotations"/> instance. /// </param> /// <param name='expr'> /// The given initial <see cref="IZincExp"/> instance. /// </param> /// <param name='id'> /// The given initial <see cref="IZincIdent"/> instance. /// </param> protected ZincAsExIdTiasBoxBase(IZincAnnotations anns, IZincExp expr, IZincIdent id) : base(id, expr) { this.Annotations = anns; }
/// <summary> /// Initializes a new instance of the <see cref="ZincAsExIdTiasBoxBase"/> class /// with a given initial <see cref="IZincAnnotations"/>, <see cref="IZincExp"/>, <see cref="IZincIdent"/> and /// <see cref="IZincTypeInstExprAndIdent"/> instances. /// </summary> /// <param name='anns'> /// The given initial <see cref="IZincAnnotations"/> instance. /// </param> /// <param name='expr'> /// The given initial <see cref="IZincExp"/> instance. /// </param> /// <param name='id'> /// The given initial <see cref="IZincIdent"/> instance. /// </param> /// <param name='tias'> /// The given initial <see cref="IZincTypeInstExprAndIdent"/> instances. /// </param> protected ZincAsExIdTiasBoxBase(IZincAnnotations anns, IZincExp expr, IZincIdent id, IList <IZincTypeInstExprAndIdent> tias) : base(id, expr) { this.Annotations = anns; this.typeInstExpressions = tias; }
/// <summary> /// Initializes a new instance of the <see cref="ZincAsExIdTiasBoxBase"/> class /// with a given initial <see cref="IZincAnnotations"/>, <see cref="IZincExp"/>, <see cref="IZincIdent"/> and /// <see cref="IZincTypeInstExprAndIdent"/> instances. /// </summary> /// <param name='anns'> /// The given initial <see cref="IZincAnnotations"/> instance. /// </param> /// <param name='expr'> /// The given initial <see cref="IZincExp"/> instance. /// </param> /// <param name='id'> /// The given initial <see cref="IZincIdent"/> instance. /// </param> /// <param name='tias'> /// The given initial <see cref="IZincTypeInstExprAndIdent"/> instances. /// </param> protected ZincAsExIdTiasBoxBase(IZincAnnotations anns, IZincExp expr, IZincIdent id, params IZincTypeInstExprAndIdent[] tias) : this(anns, expr, id, (IList <IZincTypeInstExprAndIdent>)tias) { }
/// <summary> /// Initializes a new instance of the <see cref="ZincVarDeclItem"/> class with a given <see cref="ZincTypeInstExprAndIdent"/> /// that describes the name and the type of the variable and optionally a <see cref="IZincExp"/> instance that describes /// the value that must be assigned to the variable. /// </summary> /// <param name="tia">A <see cref="ZincTypeInstExprAndIdent"/> instance that describes the name and type of the variable.</param> /// <param name="exp">An <see cref="IZincExp"/> instance that describes the value assigned to the variable.</param> public ZincVarDeclItem(ZincTypeInstExprAndIdent tia, IZincExp exp) : this(tia, null, exp) { }
/// <summary> /// Initializes a new instance of the <see cref="ZincVarDeclItem"/> class with a given <see cref="ZincTypeInstExprAndIdent"/> /// that describes the variable and type to initialize, a <see cref="ZincAnnotation"/> instance that annotates the declaration /// and optionally an <see cref="IZincExp"/> instance that describes the value that must be assigned. /// </summary> /// <param name="tia">A type-identifier tuple that describes the name and the type of the variable.</param> /// <param name="anns">The annotations of the variable declaration.</param> /// <param name="exp">Optionally, an expression that assigns a value to the variable.</param> public ZincVarDeclItem(ZincTypeInstExprAndIdent tia, ZincAnnotations anns = null, IZincExp exp = null) : base(anns, exp, tia) { this.TypeInstExprAndIdent.Ident.Usage = ZincIdentUsage.GlobalVariable; }
public ZincFunctionItem(IZincTypeInstExpression typeInst, ZincIdent ident, IList <ZincTypeInstExprAndIdent> parameters, ZincAnnotations annotations, IZincExp body = null) : base(annotations, body, ident, typeInst, parameters) { ident.Usage = ZincIdentUsage.Function; }
public ZincPredicateItem(ZincIdent ident, IList<ZincTypeInstExprAndIdent> parameters, ZincAnnotations annotations, IZincExp body = null) : base(annotations,body,ident,parameters) { ident.Usage = ZincIdentUsage.Function; }
/// <summary> /// Initializes a new instance of the <see cref="ZincAssignItem"/> class with a given identifier and expression. /// </summary> /// <param name="ident">The identifier of the variable to which the assignment is made.</param> /// <param name="expression">The expression that describes how the value to assign must be calculated.</param> public ZincAssignItem(ZincIdent ident, IZincExp expression) : base(ident, expression) { }
/// <summary> /// Replaces all the instances stored in the given <see cref="T:IDictionary`2"/> /// stored as keys to the corresponding values and returns this instance. /// </summary> /// <param name='identMap'> /// A <see cref="T:IDictionary`2"/> that contains pairs if /// <see cref="IZincIdent"/> instances. The keys should be replaced by the values of the dictionary. /// </param> /// <returns> /// This instance, for cascading purposes. /// </returns> public override IZincIdentReplaceContainer Replace(IDictionary <IZincIdent, IZincIdent> identMap) { this.expression = this.expression.Replace(identMap) as IZincExp; return(this); }
/// <summary> /// Initializes a new instance of the <see cref="ZincSolveItem"/> class with a given <see cref="ZincSolveType"/>, /// an <see cref="IZincExp"/> that must be minimized/maximized and some <see cref="ZincAnnotations"/>. /// </summary> /// <param name="annotations">The annotations provided for the task.</param> /// <param name="solveType">The task that must be carried out.</param> /// <param name="expression">The <see cref="IZincExp"/> that must be minized/maximized.</param> public ZincSolveItem(ZincAnnotations annotations, ZincSolveType solveType, IZincExp expression) : base(annotations,expression) { this.SolveType = solveType; }
/// <summary> /// Initializes a new instance of the <see cref="ZincConstraintItem"/> class with a given <see cref="IZincExp"/> /// that contains an expression that must always be satisfied. /// </summary> /// <param name="expr">The given expression that must be satisfied by any solution.</param> public ZincConstraintItem(IZincExp expr) : base(expr) { }
/// <summary> /// Initializes a new instance of the <see cref="ZincAsExIdTieTiasBoxBase"/> class /// with a given initial <see cref="IZincAnnotations"/>, <see cref="IZincExp"/>, <see cref="IZincIdent"/>, /// <see cref="IZincTypeInstExpression"/> and <see cref="IZincTypeInstExprAndIdent"/> instances. /// </summary> /// <param name='anns'> /// The given initial <see cref="IZincAnnotations"/> instance. /// </param> /// <param name='expr'> /// The given initial <see cref="IZincExp"/> instance. /// </param> /// <param name='id'> /// The given initial <see cref="IZincIdent"/> instance. /// </param> /// <param name='tie'> /// The given initial <see cref="IZincTypeInstExpression"/> instance. /// </param> /// <param name='tias'> /// The given initial <see cref="IZincTypeInstExprAndIdent"/> instances. /// </param> protected ZincAsExIdTieTiasBoxBase(ZincAnnotations anns, IZincExp expr, ZincIdent id, IZincTypeInstExpression tie, params ZincTypeInstExprAndIdent[] tias) : base(anns,expr,id,tias) { this.typeInstExpression = tie; }
/// <summary> /// Initializes a new instance of the <see cref="ZincExIdBoxBase"/> class with given initial /// <see cref="IZincIdent"/> and <see cref="IZincExp"/> instances. /// </summary> /// <param name='ident'> /// The initial <see cref="IZincIdent"/> instance to store. /// </param> /// <param name='expression'> /// The initial <see cref="IZincExp"/> instance to store. /// </param> protected ZincExIdBoxBase(IZincIdent ident, IZincExp expression) : base(ident) { this.expression = expression; }
/// <summary> /// Initializes a new instance of the <see cref="ZincOxide.MiniZinc.Boxes.ZincAsExBoxBase"/> class /// with a given initial <see cref="IZincAnnotations"/> and <see cref="IZincExp"/> instance. /// </summary> /// <param name='anns'> /// The given initial <see cref="IZincAnnotations"/> instance. /// </param> /// <param name='expr'> /// The given initial <see cref="IZincExp"/> instance. /// </param> protected ZincAsExBoxBase(IZincAnnotations anns, IZincExp expr) : base(expr) { this.Annotations = anns; }
/// <summary> /// Initializes a new instance of the <see cref="ZincSolveItem"/> class with a given <see cref="ZincSolveType"/>, /// an <see cref="IZincExp"/> that must be minimized/maximized and some <see cref="ZincAnnotations"/>. /// </summary> /// <param name="annotations">The annotations provided for the task.</param> /// <param name="solveType">The task that must be carried out.</param> /// <param name="expression">The <see cref="IZincExp"/> that must be minized/maximized.</param> public ZincSolveItem(ZincAnnotations annotations, ZincSolveType solveType, IZincExp expression) : base(annotations, expression) { this.SolveType = solveType; }
/// <summary> /// Initializes a new instance of the <see cref="ZincVarDeclItem"/> class with a given <see cref="ZincTypeInstExprAndIdent"/> /// that describes the name and the type of the variable and optionally a <see cref="IZincExp"/> instance that describes /// the value that must be assigned to the variable. /// </summary> /// <param name="tia">A <see cref="ZincTypeInstExprAndIdent"/> instance that describes the name and type of the variable.</param> /// <param name="exp">An <see cref="IZincExp"/> instance that describes the value assigned to the variable.</param> public ZincVarDeclItem(ZincTypeInstExprAndIdent tia, IZincExp exp) : this(tia,null,exp) { }
/// <summary> /// Initializes a new instance of the <see cref="ZincAsExTiaBoxBase"/> class /// with a given initial <see cref="IZincAnnotations"/>, <see cref="IZincExp"/> and /// <see cref="IZincTypeInstExprAndIdent"/> instances. /// </summary> /// <param name='anns'> /// The given initial <see cref="IZincAnnotations"/> instance. /// </param> /// <param name='expr'> /// The given initial <see cref="IZincExp"/> instance. /// </param> /// <param name='tia'> /// The given initial <see cref="IZincTypeInstExprAndIdent"/> instances. /// </param> protected ZincAsExTiaBoxBase(ZincAnnotations anns, IZincExp expr, IZincTypeInstExprAndIdent tia) : base(anns, expr) { this.TypeInstExprAndIdent = tia; }
/// <summary> /// Initializes a new instance of the <see cref="ZincOutputItem"/> class with a given expression that /// describes how the solution of the given instance by formatted. /// </summary> /// <param name="expression">An expression that describes the expected output format.</param> public ZincOutputItem(IZincExp expression) : base(expression) { }
public ZincPredicateItem(ZincIdent ident, IEnumerable <ZincTypeInstExprAndIdent> parameters, ZincAnnotations annotations, IZincExp body = null) : base(annotations, body, ident, parameters) { ident.Usage = ZincIdentUsage.Function; }
/// <summary> /// Initializes a new instance of the <see cref="ZincAsExIdTiasBoxBase"/> class /// with a given initial <see cref="IZincAnnotations"/>, <see cref="IZincExp"/>, <see cref="IZincIdent"/> and /// <see cref="IZincTypeInstExprAndIdent"/> instances. /// </summary> /// <param name='anns'> /// The given initial <see cref="IZincAnnotations"/> instance. /// </param> /// <param name='expr'> /// The given initial <see cref="IZincExp"/> instance. /// </param> /// <param name='id'> /// The given initial <see cref="IZincIdent"/> instance. /// </param> /// <param name='tias'> /// The given initial <see cref="IZincTypeInstExprAndIdent"/> instances. /// </param> protected ZincAsExIdTiasBoxBase(IZincAnnotations anns, IZincExp expr, IZincIdent id, IEnumerable<IZincTypeInstExprAndIdent> tias) : this(anns,expr,id,(IList<IZincTypeInstExprAndIdent>)tias.ToArray()) { }
/// <summary> /// Initializes a new instance of the <see cref="ZincAsExIdTiasBoxBase"/> class /// with a given initial <see cref="IZincAnnotations"/>, <see cref="IZincExp"/>, <see cref="IZincIdent"/> and /// <see cref="IZincTypeInstExprAndIdent"/> instances. /// </summary> /// <param name='anns'> /// The given initial <see cref="IZincAnnotations"/> instance. /// </param> /// <param name='expr'> /// The given initial <see cref="IZincExp"/> instance. /// </param> /// <param name='id'> /// The given initial <see cref="IZincIdent"/> instance. /// </param> /// <param name='tias'> /// The given initial <see cref="IZincTypeInstExprAndIdent"/> instances. /// </param> protected ZincAsExIdTiasBoxBase(IZincAnnotations anns, IZincExp expr, IZincIdent id, IList<IZincTypeInstExprAndIdent> tias) : base(id,expr) { this.Annotations = anns; this.typeInstExpressions = tias; }
/// <summary> /// Initializes a new instance of the <see cref="ZincExBoxBase"/> class with a given initial /// <see cref="IZincExp"/> instance. /// </summary> /// <param name='expression'> /// The initial <see cref="IZincExp"/> instance to store. /// </param> protected ZincExBoxBase(IZincExp expression) { this.Expression = expression; }
/// <summary> /// Initializes a new instance of the <see cref="ZincAsExIdTieTiasBoxBase"/> class /// with a given initial <see cref="IZincAnnotations"/>, <see cref="IZincExp"/>, <see cref="IZincIdent"/>, /// <see cref="IZincTypeInstExpression"/> and <see cref="IZincTypeInstExprAndIdent"/> instances. /// </summary> /// <param name='anns'> /// The given initial <see cref="IZincAnnotations"/> instance. /// </param> /// <param name='expr'> /// The given initial <see cref="IZincExp"/> instance. /// </param> /// <param name='id'> /// The given initial <see cref="IZincIdent"/> instance. /// </param> /// <param name='tie'> /// The given initial <see cref="IZincTypeInstExpression"/> instance. /// </param> /// <param name='tias'> /// The given initial <see cref="IZincTypeInstExprAndIdent"/> instances. /// </param> protected ZincAsExIdTieTiasBoxBase (ZincAnnotations anns, IZincExp expr, ZincIdent id, IZincTypeInstExpression tie, params ZincTypeInstExprAndIdent[] tias) : base(anns,expr,id,tias) { this.typeInstExpression = tie; }
public ZincFunctionItem(IZincTypeInstExpression typeInst, ZincIdent ident, IEnumerable<ZincTypeInstExprAndIdent> parameters, ZincAnnotations annotations, IZincExp body = null) : base(annotations,body,ident,typeInst,parameters) { ident.Usage = ZincIdentUsage.Function; }
/// <summary> /// Initializes a new instance of the <see cref="ZincAsExTiaBoxBase"/> class /// with a given initial <see cref="IZincAnnotations"/>, <see cref="IZincExp"/> and /// <see cref="IZincTypeInstExprAndIdent"/> instances. /// </summary> /// <param name='anns'> /// The given initial <see cref="IZincAnnotations"/> instance. /// </param> /// <param name='expr'> /// The given initial <see cref="IZincExp"/> instance. /// </param> /// <param name='tia'> /// The given initial <see cref="IZincTypeInstExprAndIdent"/> instances. /// </param> protected ZincAsExTiaBoxBase(ZincAnnotations anns, IZincExp expr, IZincTypeInstExprAndIdent tia) : base(anns,expr) { this.TypeInstExprAndIdent = tia; }