/// <summary>
		/// Initializes a symbolic constraint and its associated context.
		/// </summary>
		/// <param name="constraint">symbolic constraint.</param>
		/// <param name="matrix">context.</param>
		public SymbolicConstraint(Expression constraint, Matrix matrix)
		{
			if ((object)constraint == null)
			{
				throw new ArgumentNullException("constraint");
			}

			if (matrix == null)
			{
				throw new ArgumentNullException("matrix");
			}

			_constraint = constraint;
			_matrix = matrix;

			_requiredDimensions = new List<QualifiedDimension>();
			_dimensions = new Dictionary<string, Dimension>();

			foreach (ExpressionIdentifier identifier in _constraint.Identifiers())
			{
				bool foundDimension = false;

				foreach (Dimension dimension in _matrix.Dimensions)
				{
					if (identifier.Name == dimension.Name)
					{
						_dimensions.Add(identifier.Name, dimension);
						_requiredDimensions.Add(dimension);
						foundDimension = true;
						break;
					}
				}

				if (!foundDimension)
				{
					throw new InvalidOperationException(string.Format(CultureInfo.CurrentCulture, "{0} not a dimension name in the matrix", identifier.Name));
				}
			}
		}
		/// <summary>
		/// Initializes an "IF predicate THEN trueValue ELSE falseValue" expression.
		/// </summary>
		/// <param name="predicate">boolean expression.</param>
		/// <param name="trueValue">expression when predicate is true.</param>
		/// <param name="falseValue">expression when predicate is false.</param>
		/// <returns>expression value</returns>
		public static Expression Conditional(Expression predicate, Expression trueValue, Expression falseValue)
		{
			return new ExpressionOperation(OperationCode.Conditional, predicate, trueValue, falseValue);
		}