Inheritance: BoolExpr
コード例 #1
0
 public static QuantifiedExpression Make(Quantifier q, IEnumerable<VariableType> vars, BooleanExpression b)
 {
     var freeVars = b.GetVariables();
     foreach (var v in vars)
         if (!freeVars.Contains(v))
             throw new ArgumentException();
     return new QuantifiedExpression(q, vars, b);
 }
コード例 #2
0
 private QuantifiedExpression(Quantifier q, IEnumerable<VariableType> v, BooleanExpression oper1)
 {
     quantified_variables = new HashSet<VariableType>();
     quantified_variables.UnionWith(v);
     boolean_expression_type = OperatorType.Quantifier;
     boolean_operation_arity = OperatorArity.One;
     switch (q)
     {
         case Quantifier.Exists:
         case Quantifier.Forall:
             quantifier = q;
             break;
         default:
             throw new ArgumentOutOfRangeException();
     }
     operand1 = inner = oper1;
 }