Examples of DeMorganLawApplyer


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

*/
public class ExprTransformTest extends TestCase {

  public void testExprDeMorganDoubleNotA() {
    Expr expr = ExprUtils.parse("!(!(?a))");
    DeMorganLawApplyer apply = new DeMorganLawApplyer();
    expr.visit(apply);
    assertNotNull(apply.result());
    assertEquals("?a", apply.result().toString());
  }
View Full Code Here

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

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

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

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

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

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

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

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

    assertEquals("( ( ( ?n = 1 ) && bound(?pref) ) && bound(?n) )", apply.result().toString());
  }

  public void testDeMorganNotEqual() {
    Expr expr = ExprUtils.parse("?x != ?z");
    DeMorganLawApplyer apply = new DeMorganLawApplyer();
    expr.visit(apply);
    assertNotNull(apply.result());
    assertEquals("( ?x != ?z )", 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.