Package org.mizartools.dli

Examples of org.mizartools.dli.Implies


            hypothesis = ((Not)formula2).getFormula();
            conclusion = formula1;
          }
          if (hypothesis != null && conclusion != null){
            changed.isChanged = true;
            return new Implies(hypothesis, conclusion);
          }
        }
    }
    // $not($and($formula1,...,$not($formula_n)) -> $implies($and($formula1,...),$formula_n)
    if (formula instanceof Not) {
        Not not = (Not)formula;
        Formula formula1 = not.getFormula();
      if (formula1 instanceof And) {
        And and = (And)formula1;
        Formula formula2 = and.getFormulaList().getLast();
        if (formula2 instanceof Not) {
          LinkedList<Formula> formulaList = new LinkedList<Formula>();
          for (Formula formula3 : and.getFormulaList()){
            formulaList.add(formula3);
          }
          formulaList.pollLast();
          Formula hypothesis = null;
          if (formulaList.size() == 1){
            hypothesis = formulaList.getFirst();
          } else {
            hypothesis = new And(formulaList);
          }
          Formula conclusion = ((Not)formula2).getFormula();
            changed.isChanged = true;
            return new Implies(hypothesis, conclusion);
        }
      }       
    }
    return formula;
  }
View Full Code Here


        And and = (And)formula;
        if (and.getFormulaList().size() == 2){
          Formula formula1 = and.getFormulaList().getFirst();
          Formula formula2 = and.getFormulaList().getLast();
          if (formula1 instanceof Implies && formula2 instanceof Implies){
            Implies implies1 = (Implies)formula1;
            Implies implies2 = (Implies)formula2;
            if (implies1.getConclusion().toString().equals(implies2.getHypothesis().toString()) &&
              implies2.getConclusion().toString().equals(implies1.getHypothesis().toString())  ){
              Iff iff = new Iff(implies1.getHypothesis(), implies1.getConclusion());
              return iff;
            }
          }
        }
View Full Code Here

TOP

Related Classes of org.mizartools.dli.Implies

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.