Exemple #1
0
 public override bool FormulaValue(BooleanFormulaInput input)
 {
     switch (type)
     {
         case BooleanOperations.AND: return argument1.FormulaValue(input) && argument2.FormulaValue(input);
         case BooleanOperations.OR: return argument1.FormulaValue(input) || argument2.FormulaValue(input);
         case BooleanOperations.IMPLICATION: return !argument1.FormulaValue(input) || argument2.FormulaValue(input);
         case BooleanOperations.XOR: return argument1.FormulaValue(input) != argument2.FormulaValue(input);
         case BooleanOperations.EQUIVALENCE: return argument1.FormulaValue(input) == argument2.FormulaValue(input);
         case BooleanOperations.SHEFFER_STROKE: return !(argument1.FormulaValue(input) && argument2.FormulaValue(input));
         case BooleanOperations.PIERCE_ARROW: return !(argument1.FormulaValue(input) || argument2.FormulaValue(input));
     }
     return false;
 }
Exemple #2
0
        public override bool FormulaValue(BooleanFormulaInput input)
        {
            switch (type)
            {
            case BooleanOperations.AND: return(argument1.FormulaValue(input) && argument2.FormulaValue(input));

            case BooleanOperations.OR: return(argument1.FormulaValue(input) || argument2.FormulaValue(input));

            case BooleanOperations.IMPLICATION: return(!argument1.FormulaValue(input) || argument2.FormulaValue(input));

            case BooleanOperations.XOR: return(argument1.FormulaValue(input) != argument2.FormulaValue(input));

            case BooleanOperations.EQUIVALENCE: return(argument1.FormulaValue(input) == argument2.FormulaValue(input));

            case BooleanOperations.SHEFFER_STROKE: return(!(argument1.FormulaValue(input) && argument2.FormulaValue(input)));

            case BooleanOperations.PIERCE_ARROW: return(!(argument1.FormulaValue(input) || argument2.FormulaValue(input)));
            }
            return(false);
        }
Exemple #3
0
 public abstract bool FormulaValue(BooleanFormulaInput input);
Exemple #4
0
 public override bool FormulaValue(BooleanFormulaInput input)
 {
     return !argument.FormulaValue(input);
 }
Exemple #5
0
 public override bool FormulaValue(BooleanFormulaInput input)
 {
     return value;
 }
 public override bool FormulaValue(BooleanFormulaInput input)
 {
     return input.ValueOf(this);
 }
Exemple #7
0
 public override bool FormulaValue(BooleanFormulaInput input)
 {
     return(!argument.FormulaValue(input));
 }
 public abstract bool FormulaValue(BooleanFormulaInput input);
Exemple #9
0
 public override bool FormulaValue(BooleanFormulaInput input)
 {
     return(value);
 }
Exemple #10
0
 public override bool FormulaValue(BooleanFormulaInput input)
 {
     return(input.ValueOf(this));
 }