Exemplo n.º 1
0
 /// <summary>
 /// Accepts a conjunctive-normal-form expression evaluator.
 /// </summary>
 /// <param name="visitor">CNF expression visitor.</param>
 /// <returns>True if the expression is logically true, false otherwise.</returns>
 public bool Accept(IConditionsCNFEvalVisitor visitor)
 {
     foreach (var conjunct in this)
     {
         if (!conjunct.Accept(visitor))
         {
             return(false);
         }
     }
     return(true);
 }
Exemplo n.º 2
0
 /// <summary>
 /// Accepts a conjunctive-normal-form expression evaluator.
 /// </summary>
 /// <param name="visitor">CNF expression visitor.</param>
 /// <returns>True if the expression is logically true, false otherwise.</returns>
 public bool Accept(IConditionsCNFEvalVisitor visitor)
 {
     foreach (var literal in this)
     {
         if (literal.Accept(visitor))
         {
             return(true);
         }
     }
     return(false);
 }
Exemplo n.º 3
0
 /// <summary>
 /// Accepts a conjunctive-normal-form expression evaluator.
 /// </summary>
 /// <param name="visitor">CNF expression visitor.</param>
 /// <returns>True if the expression is logically true, false otherwise.</returns>
 public override bool Accept(IConditionsCNFEvalVisitor visitor)
 {
     return(visitor.Visit(this));
 }
Exemplo n.º 4
0
 /// <summary>
 /// Accepts a conjunctive-normal-form expression evaluator.
 /// </summary>
 /// <param name="visitor">CNF expression visitor.</param>
 /// <returns>True if the expression is logically true, false otherwise.</returns>
 public abstract bool Accept(IConditionsCNFEvalVisitor visitor);