Ejemplo n.º 1
0
 /**
  * add the conjunctive expressions to specified list, has recursive step.
  *
  * @param expr the expr, in the best case in CNF
  * @param conjExpr the list to which expressions will be added
  */
 protected void getConjunctiveExpressions(ValueExpr expr, List<ValueExpr> conjExpr) {
   if (expr instanceof And) {
     And and = (And) expr;
     getConjunctiveExpressions(and.getLeftArg(), conjExpr);
     getConjunctiveExpressions(and.getRightArg(), conjExpr);
   } else conjExpr.add(expr);
 }
Ejemplo n.º 2
0
 @Override
 public void meet(And node) throws RuntimeException {
   builder.append("(");
   node.getLeftArg().visit(this);
   builder.append(" AND ");
   node.getRightArg().visit(this);
   builder.append(")");
 }