Examples of relEffect()


Examples of edu.cmu.cs.fusion.parsers.predicate.FPLParser.relEffect()

    String string = "Foo(a, b)";
    RelationsEnvironment env = new RelationsEnvironment();
    env.addRelation(new Relation("Foo", new String[] {"Bar", "Baz"}));
   
    FPLParser parser = new FPLParser(string, env, new StubIType());
    RelEffect effect = parser.relEffect();
   
    Assert.assertEquals("Effect type is wrong", RelEffect.EffectType.ADD, effect.getType());
    Assert.assertEquals("Effect relation is wrong", "Foo", effect.getRelation().getName());
   
    FreeVars vars = effect.getFreeVariables();
View Full Code Here

Examples of edu.cmu.cs.fusion.parsers.predicate.FPLParser.relEffect()

    String string = "!Foo(a, b)";
    RelationsEnvironment env = new RelationsEnvironment();
    env.addRelation(new Relation("Foo", new String[] {"Bar", "Baz"}));
   
    FPLParser parser = new FPLParser(string, env, new StubIType());
    RelEffect effect = parser.relEffect();
   
    Assert.assertEquals("Effect type is wrong", RelEffect.EffectType.REMOVE, effect.getType());
    Assert.assertEquals("Effect relation is wrong", "Foo", effect.getRelation().getName());
   
    FreeVars vars = effect.getFreeVariables();
View Full Code Here

Examples of edu.cmu.cs.fusion.parsers.predicate.FPLParser.relEffect()

    String string = "!Foo(*, b)";
    RelationsEnvironment env = new RelationsEnvironment();
    env.addRelation(new Relation("Foo", new String[] {"Bar", "Baz"}));
   
    FPLParser parser = new FPLParser(string, env, new StubIType());
    RelEffect effect = parser.relEffect();
   
    Assert.assertEquals("Effect type is wrong", RelEffect.EffectType.REMOVE, effect.getType());
    Assert.assertEquals("Effect relation is wrong", "Foo", effect.getRelation().getName());
   
    FreeVars vars = effect.getFreeVariables();
View Full Code Here

Examples of edu.cmu.cs.fusion.parsers.predicate.FPLParser.relEffect()

    String string = "?Foo(a, b):c";
    RelationsEnvironment env = new RelationsEnvironment();
    env.addRelation(new Relation("Foo", new String[] {"Bar", "Baz"}));
   
    FPLParser parser = new FPLParser(string, env, new StubIType());
    RelEffect effect = parser.relEffect();
   
    Assert.assertEquals("Effect type is wrong", RelEffect.EffectType.TEST, effect.getType());
    Assert.assertEquals("Effect relation is wrong", "Foo", effect.getRelation().getName());
   
    FreeVars vars = effect.getFreeVariables();
View Full Code Here

Examples of edu.cmu.cs.fusion.parsers.predicate.FPLParser.relEffect()

    String string = "?!Foo(a, b):c";
    RelationsEnvironment env = new RelationsEnvironment();
    env.addRelation(new Relation("Foo", new String[] {"Bar", "Baz"}));
   
    FPLParser parser = new FPLParser(string, env, new StubIType());
    RelEffect effect = parser.relEffect();
   
    Assert.assertEquals("Effect type is wrong", RelEffect.EffectType.NEG_TEST, effect.getType());
    Assert.assertEquals("Effect relation is wrong", "Foo", effect.getRelation().getName());
   
    FreeVars vars = effect.getFreeVariables();
View Full Code Here

Examples of edu.cmu.cs.fusion.parsers.predicate.FPLParser.relEffect()

      trigger = parser.expression();
      assert(trigger != null);
     
      for (String eString : effStrings) {
        parser.reset(eString);
        effects.add(parser.relEffect());
      }
     
      inferRules.add(new InferredRel(trigger, effects));
    } catch (ParseException e) {
      ReportingUtility.reportParseError(infer.getResource(), infer.getNameRange(), e.getMessage());
View Full Code Here

Examples of edu.cmu.cs.fusion.parsers.predicate.FPLParser.relEffect()

          parser.reset(node.getTextContent());
          trigger = parser.expression();
        }
        else if (name.equals("eff")) {
          parser.reset(node.getTextContent());
          effects.add(parser.relEffect());
        }
      }
      assert (trigger != null);
      assert (!effects.isEmpty());
      inferRules.add(new InferredRel(trigger, effects));
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.