Exemple #1
0
        /// <summary>
        /// Reduce produces a constraint from the operator and
        /// any arguments. It takes the arguments from the constraint
        /// stack and pushes the resulting constraint on it.
        /// </summary>
        /// <param name="stack"></param>
        public override void Reduce(ConstraintBuilder.ConstraintStack stack)
        {
            Constraint right = stack.Pop();
            Constraint left  = stack.Pop();

            stack.Push(ApplyOperator(left, right));
        }
Exemple #2
0
 /// <summary>
 /// Reduce produces a constraint from the operator and
 /// any arguments. It takes the arguments from the constraint
 /// stack and pushes the resulting constraint on it.
 /// </summary>
 public override void Reduce(ConstraintBuilder.ConstraintStack stack)
 {
     if (RightContext == null || RightContext is BinaryOperator)
     {
         stack.Push(new ThrowsConstraint(null));
     }
     else
     {
         stack.Push(new ThrowsConstraint(stack.Pop()));
     }
 }
Exemple #3
0
 /// <summary>
 /// Reduce produces a constraint from the operator and
 /// any arguments. It takes the arguments from the constraint
 /// stack and pushes the resulting constraint on it.
 /// </summary>
 public override void Reduce(ConstraintBuilder.ConstraintStack stack)
 {
     if (RightContext == null || RightContext is BinaryOperator)
     {
         stack.Push(new AttributeExistsConstraint(type));
     }
     else
     {
         stack.Push(new AttributeConstraint(type, stack.Pop()));
     }
 }
Exemple #4
0
 /// <summary>
 /// Reduce produces a constraint from the operator and
 /// any arguments. It takes the arguments from the constraint
 /// stack and pushes the resulting constraint on it.
 /// </summary>
 /// <param name="stack"></param>
 public override void Reduce(ConstraintBuilder.ConstraintStack stack)
 {
     if (RightContext == null || RightContext is BinaryOperator)
     {
         stack.Push(new PropertyExistsConstraint(name));
     }
     else
     {
         stack.Push(new PropertyConstraint(name, stack.Pop()));
     }
 }
Exemple #5
0
 /// <summary>
 /// Reduce produces a constraint from the operator and
 /// any arguments. It takes the arguments from the constraint
 /// stack and pushes the resulting constraint on it.
 /// </summary>
 /// <param name="stack"></param>
 public abstract void Reduce(ConstraintBuilder.ConstraintStack stack);
Exemple #6
0
 /// <summary>
 /// Reduce produces a constraint from the operator and
 /// any arguments. It takes the arguments from the constraint
 /// stack and pushes the resulting constraint on it.
 /// </summary>
 /// <param name="stack"></param>
 public override void Reduce(ConstraintBuilder.ConstraintStack stack)
 {
     stack.Push(ApplyPrefix(stack.Pop()));
 }