Examples of DistributiveLawApplyer


Examples of de.fuberlin.wiwiss.d2rq.engine.TransformFilterCNF.DistributiveLawApplyer

    assertEquals("( ( ?a && ?b ) && ?c )", apply.result().toString());
  }
 
  public void testExprDistributiveUsingFunctions() {
    Expr expr = ExprUtils.parse("( ( ( ?n = 1 ) && bound(?pref) ) && bound(?n) )");
    DistributiveLawApplyer apply = new DistributiveLawApplyer();
    expr.visit(apply);
    assertEquals("( ( ( ?n = 1 ) && bound(?pref) ) && bound(?n) )", apply.result().toString());
  }
View Full Code Here

Examples of de.fuberlin.wiwiss.d2rq.engine.TransformFilterCNF.DistributiveLawApplyer

    assertEquals("( ! ( ?a && ?b ) )", apply.result().toString());
  }
 
  public void testExprDistributiveABOrC() {
    Expr expr = ExprUtils.parse("(( ?a && ?b ) || ?c )");
    DistributiveLawApplyer apply = new DistributiveLawApplyer();
    expr.visit(apply);
    assertNotNull(apply.result());
    assertEquals("( ( ?a || ?c ) && ( ?b || ?c ) )", apply.result().toString());
  }
View Full Code Here

Examples of de.fuberlin.wiwiss.d2rq.engine.TransformFilterCNF.DistributiveLawApplyer

    assertEquals("( ( ?a || ?c ) && ( ?b || ?c ) )", apply.result().toString());
  }

  public void testExprDistributiveCOrAB() {
    Expr expr = ExprUtils.parse("?c || ( ?a && ?b )");
    DistributiveLawApplyer apply = new DistributiveLawApplyer();
    expr.visit(apply);
    assertNotNull(apply.result());
    assertEquals("( ( ?c || ?a ) && ( ?c || ?b ) )", apply.result().toString());
  }
View Full Code Here

Examples of de.fuberlin.wiwiss.d2rq.engine.TransformFilterCNF.DistributiveLawApplyer

    assertEquals("( ( ?c || ?a ) && ( ?c || ?b ) )", apply.result().toString());
  }

  public void testExprDistributiveAndDontChange() {
    Expr expr = ExprUtils.parse("!(?a || ?b) && ?c");
    DistributiveLawApplyer apply = new DistributiveLawApplyer();
    expr.visit(apply);
    assertNotNull(apply.result());
    assertEquals("( ( ! ( ?a || ?b ) ) && ?c )", apply.result().toString());
  }
View Full Code Here

Examples of de.fuberlin.wiwiss.d2rq.engine.TransformFilterCNF.DistributiveLawApplyer

    assertEquals("( ( ! ( ?a || ?b ) ) && ?c )", apply.result().toString());
  }
 
  public void testExprDistributiveOrComplex() {
    Expr expr = ExprUtils.parse("(?c || ( ?a && ?b )) || (?d && ?e)");
    DistributiveLawApplyer apply = new DistributiveLawApplyer();
    expr.visit(apply);
    assertNotNull(apply.result());
    assertEquals("( ( ( ( ?c || ?a ) || ?d ) && ( ( ?c || ?b ) || ?d ) ) && ( ( ( ?c || ?a ) || ?e ) && ( ( ?c || ?b ) || ?e ) ) )", apply.result().toString()); // correct
  }
View Full Code Here

Examples of de.fuberlin.wiwiss.d2rq.engine.TransformFilterCNF.DistributiveLawApplyer

    assertEquals("( ( ( ( ?c || ?a ) || ?d ) && ( ( ?c || ?b ) || ?d ) ) && ( ( ( ?c || ?a ) || ?e ) && ( ( ?c || ?b ) || ?e ) ) )", apply.result().toString()); // correct
  }
 
  public void testExprDistributiveABC() {
    Expr expr = ExprUtils.parse("(( ?a && ?b ) && ?c )");
    DistributiveLawApplyer apply = new DistributiveLawApplyer();
    expr.visit(apply);
    assertEquals("( ( ?a && ?b ) && ?c )", apply.result().toString());
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.