Package org.mizartools.dli

Examples of org.mizartools.dli.Or


      if (compress) {
        formula1 = new And(formulaList);
        changed1.isChanged = true
      }
    } else if (formula instanceof Or) {
      Or or = (Or)formula;
      Changed changed2 = new Changed();
      boolean compress = false;
      LinkedList<Formula> formulaList = new LinkedList<Formula>();
      for (Formula formula2 : or.getFormulaList()){
        formulaList.add(compress(formula2, changed2));
        if (changed2.isChanged) compress = true;
      }
      if (compress) {
        formula1 = new Or(formulaList);
        changed1.isChanged = true
      }
    } else if (formula instanceof For){
      For for1 = (For)formula;
      Changed changed2 = new Changed();
View Full Code Here


  }
 
  private static Formula insertImplies(Formula formula, Changed changed) throws DliException {
    // $or($not($formula1),$formula2) -> $implies($formula1,$formula2)
    if (formula instanceof Or) {
        Or or = (Or)formula;
        if (or.getFormulaList().size() == 2){
          Formula formula1 = or.getFormulaList().getFirst();
          Formula formula2 = or.getFormulaList().getLast();
          Formula hypothesis = null;
          Formula conclusion = null;
          if (formula1 instanceof Not && !(formula2 instanceof Not)){
            hypothesis = ((Not)formula1).getFormula();
            conclusion = formula2;
View Full Code Here

            nrNot--;
            formulaList.add(new Not(formula2));
          }
        }
        if (nrNot > 0) {
            Or or = new Or(formulaList);
            changed.isChanged = true;
            return or;
        }
        }
    }
View Full Code Here

TOP

Related Classes of org.mizartools.dli.Or

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.