Examples of TruePredicate


Examples of cascading.pattern.model.tree.predicate.TruePredicate

  public void testSurrogate()
    {
    Predicate surrogatePredicate = new SurrogatePredicate(
      new EqualsToPredicate( "var2", 0.0d ),
      new EqualsToPredicate( "var2", 0.0d ),
      new TruePredicate() );

    assertTrue( new PredicateEvaluator( expectedFields, surrogatePredicate ).evaluate( tupleEntry ) );
    }
View Full Code Here

Examples of edu.cmu.cs.fusion.constraint.predicates.TruePredicate

    op = new MethodInvocationOp("methodName", "Foo", new SpecVar[] {utils.getVar(0), utils.getVar(1)}, new String[] {"Foo", "Bar"}, "Bar", false);
    trigger = new RelationshipPredicate(utils.getRelation(0), new SpecVar[] {utils.getVar(0), utils.getVar(1)});
    req = new RelationshipPredicate(utils.getRelation(1), new SpecVar[] {utils.getVar(1), utils.getVar(2)});
    effects.add(RelEffect.createRemoveEffect(utils.getRelation(1), new SpecVar[] {Constraint.RESULT, utils.getVar(1)}));
   
    cons = new Constraint("", op, trigger, new TruePredicate(), req, effects);
   
    op = new MethodInvocationOp("methodName", "Foo", new SpecVar[] {utils.getVar(0), utils.getVar(1)}, new String[] {"Foo", "Bar"}, "Bar", false);
    trigger = new RelationshipPredicate(utils.getRelation(0), new SpecVar[] {utils.getVar(0), utils.getVar(1)});
    req = new RelationshipPredicate(utils.getRelation(2), new SpecVar[] {utils.getVar(1), utils.getVar(2)});
    effects.add(RelEffect.createRemoveEffect(utils.getRelation(1), new SpecVar[] {Constraint.RESULT, utils.getVar(1)}));
   
    possCons = new Constraint("", op, trigger, new TruePredicate(), req, effects);
   
    aliases = new TestAliasContext();
   
    labels = new ObjectLabel[7];
    labels[0] = new AbstractObjectLabel("0", "Foo");
View Full Code Here

Examples of edu.cmu.cs.fusion.constraint.predicates.TruePredicate

    //Foo.m(Foo, Bar) : Bar
    //R0(Foo, Bar) -> R1(Bar, Bar)
    //target.(v0, v2) : result
    //R0(v0, v1) -> R1(v1, v2)
   
    Constraint noEffectCons = new Constraint("", op, trigger, new TruePredicate(), req, effects);

   
    RelationshipDelta startRels = new RelationshipDelta();
    startRels.setRelationship(new Relationship(utils.getRelation(0), new ObjectLabel[]{labels[0], labels[1]}), SevenPointLattice.TRU);
    startRels.setRelationship(new Relationship(utils.getRelation(1), new ObjectLabel[]{labels[1], labels[6]}), SevenPointLattice.TRU);
View Full Code Here

Examples of edu.cmu.cs.fusion.constraint.predicates.TruePredicate

    trigger = new RelationshipPredicate(utils.getRelation(0), new SpecVar[] {utils.getVar(0), utils.getVar(1)});
    req = new RelationshipPredicate(utils.getRelation(1), new SpecVar[] {utils.getVar(1), utils.getVar(2)});
    effects.add(RelEffect.createRemoveEffect(utils.getRelation(1), new SpecVar[] {Constraint.RESULT, utils.getVar(1)}));
    effects.add(RelEffect.createAddEffect(utils.getRelation(1), new SpecVar[] {utils.getVar(1), utils.getVar(1)}));

    Constraint severalEffectCons = new Constraint("", op, trigger, new TruePredicate(), req, effects);
   
    RelationshipDelta startRels = new RelationshipDelta();
    startRels.setRelationship(new Relationship(utils.getRelation(0), new ObjectLabel[]{labels[0], labels[1]}), SevenPointLattice.TRU);
    startRels.setRelationship(new Relationship(utils.getRelation(1), new ObjectLabel[]{labels[1], labels[6]}), SevenPointLattice.TRU);
    RelationshipContext rels = new RelationshipContext(false).applyChangesFromDelta(startRels);
View Full Code Here

Examples of edu.cmu.cs.fusion.constraint.predicates.TruePredicate

    trigger = new RelationshipPredicate(utils.getRelation(0), new SpecVar[] {utils.getVar(0), utils.getVar(1)});
    req = new RelationshipPredicate(utils.getRelation(1), new SpecVar[] {utils.getVar(1), utils.getVar(2)});
    effects.add(RelEffect.createRemoveEffect(utils.getRelation(1), new SpecVar[] {Constraint.RESULT, utils.getVar(1)}));
    effects.add(RelEffect.createAddEffect(utils.getRelation(1), new SpecVar[] {utils.getVar(1), utils.getVar(1)}));

    Constraint severalEffectCons = new Constraint("", op, trigger, new TruePredicate(), req, effects);

    RelationshipDelta startRels = new RelationshipDelta();
    startRels.setRelationship(new Relationship(utils.getRelation(0), new ObjectLabel[]{labels[0], labels[1]}), SevenPointLattice.TRU);
    startRels.setRelationship(new Relationship(utils.getRelation(1), new ObjectLabel[]{labels[1], labels[1]}), SevenPointLattice.TRU);
    RelationshipContext rels = new RelationshipContext(false).applyChangesFromDelta(startRels);
View Full Code Here

Examples of edu.cmu.cs.fusion.constraint.predicates.TruePredicate

    op = new MethodInvocationOp("methodName", "Foo", new SpecVar[] {utils.getVar(0), utils.getVar(1)}, new String[] {"Foo", "Bar"}, "Bar", false);
    trigger = new RelationshipPredicate(utils.getRelation(0), new SpecVar[] {utils.getVar(0), utils.getVar(1)});
    req = new RelationshipPredicate(utils.getRelation(1), new SpecVar[] {utils.getVar(1), utils.getVar(2)});
    effects.add(RelEffect.createRemoveEffect(utils.getRelation(1), new SpecVar[] {Constraint.RESULT, utils.getVar(1)}));
   
    cons = new Constraint("", op, trigger, new TruePredicate(), req, effects);
   
    op = new MethodInvocationOp("methodName", "Foo", new SpecVar[] {utils.getVar(0), utils.getVar(1)}, new String[] {"Foo", "Bar"}, "Bar", false);
    trigger = new RelationshipPredicate(utils.getRelation(0), new SpecVar[] {utils.getVar(0), utils.getVar(1)});
    req = new RelationshipPredicate(utils.getRelation(2), new SpecVar[] {utils.getVar(1), utils.getVar(2)});
    effects.add(RelEffect.createRemoveEffect(utils.getRelation(1), new SpecVar[] {Constraint.RESULT, utils.getVar(1)}));
   
    possCons = new Constraint("", op, trigger, new TruePredicate(), req, effects);
   
    aliases = new TestAliasContext();
   
    labels = new ObjectLabel[7];
    labels[0] = new AbstractObjectLabel("0", "Foo");
View Full Code Here

Examples of edu.cmu.cs.fusion.constraint.predicates.TruePredicate

    op = new MethodInvocationOp("methodName", "Foo", new SpecVar[] {utils.getVar(0), utils.getVar(1)}, new String[] {"Foo", "Bar"}, "Bar", false);
    trigger = new RelationshipPredicate(utils.getRelation(0), new SpecVar[] {utils.getVar(0), utils.getVar(1)});
    req = new RelationshipPredicate(utils.getRelation(1), new SpecVar[] {utils.getVar(1), utils.getVar(2)});
    effects.add(RelEffect.createRemoveEffect(utils.getRelation(1), new SpecVar[] {Constraint.RESULT, utils.getVar(1)}));
   
    cons = new Constraint("", op, trigger, new TruePredicate(), req, effects);
   
    op = new MethodInvocationOp("methodName", "Foo", new SpecVar[] {utils.getVar(0), utils.getVar(1)}, new String[] {"Foo", "Bar"}, "Bar", false);
    trigger = new RelationshipPredicate(utils.getRelation(0), new SpecVar[] {utils.getVar(0), utils.getVar(1)});
    req = new RelationshipPredicate(utils.getRelation(2), new SpecVar[] {utils.getVar(1), utils.getVar(2)});
    effects.add(RelEffect.createRemoveEffect(utils.getRelation(1), new SpecVar[] {Constraint.RESULT, utils.getVar(1)}));
   
    possCons = new Constraint("", op, trigger, new TruePredicate(), req, effects);
   
    aliases = new TestAliasContext();
   
    labels = new ObjectLabel[7];
    labels[0] = new AbstractObjectLabel("0", "Foo");
View Full Code Here

Examples of edu.cmu.cs.fusion.constraint.predicates.TruePredicate

    op = new MethodInvocationOp("methodName", "Foo", new SpecVar[] {utils.getVar(0), utils.getVar(1)}, new String[] {"Foo", "Bar"}, "Bar", false);
    trigger = new RelationshipPredicate(utils.getRelation(0), new SpecVar[] {utils.getVar(0), utils.getVar(1)});
    req = new RelationshipPredicate(utils.getRelation(1), new SpecVar[] {utils.getVar(1), utils.getVar(2)});
    effects.add(RelEffect.createRemoveEffect(utils.getRelation(1), new SpecVar[] {Constraint.RESULT, utils.getVar(1)}));
   
    cons = new Constraint("", op, trigger, new TruePredicate(), req, effects);
   
    op = new MethodInvocationOp("methodName", "Foo", new SpecVar[] {utils.getVar(0), utils.getVar(1)}, new String[] {"Foo", "Bar"}, "Bar", false);
    trigger = new RelationshipPredicate(utils.getRelation(0), new SpecVar[] {utils.getVar(0), utils.getVar(1)});
    req = new RelationshipPredicate(utils.getRelation(2), new SpecVar[] {utils.getVar(1), utils.getVar(2)});
    effects.add(RelEffect.createRemoveEffect(utils.getRelation(1), new SpecVar[] {Constraint.RESULT, utils.getVar(1)}));
   
    possCons = new Constraint("", op, trigger, new TruePredicate(), req, effects);
   
    aliases = new TestAliasContext();
   
    labels = new ObjectLabel[7];
    labels[0] = new AbstractObjectLabel("0", "Foo");
View Full Code Here

Examples of edu.cmu.cs.fusion.constraint.predicates.TruePredicate

    utils = new TestUtils();
  }
 
  @Test
  public void testFreeVars() {
    Predicate tPred = new TruePredicate();
    Predicate fPred = new FalsePredicate();
   
    assertTrue(tPred.getFreeVariables().isEmpty());
    assertTrue(fPred.getFreeVariables().isEmpty());
  }
View Full Code Here

Examples of edu.cmu.cs.fusion.constraint.predicates.TruePredicate

    assertEquals(fPred.getTruth(env, utils.getSub(0)), ThreeValue.FALSE);
  }

  @Test
  public void testTruthTrue() {
    Predicate tPred = new TruePredicate();
    FusionEnvironment env = new TestEnvironment(utils.getContext(0), Variant.SOUND_VARIANT);
   
    assertEquals(tPred.getTruth(env, utils.getSub(0)), ThreeValue.TRUE);
  }
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.