Package edu.cmu.cs.fusion.constraint

Examples of edu.cmu.cs.fusion.constraint.SpecVar


    FreeVars vars = val.getFreeVariables();
    Assert.assertEquals("Should only contain three free variables", 3, vars.size());

    vars = val.getLeft().getFreeVariables();
    Assert.assertEquals("Should only contain two free variables", 2, vars.size());
    Assert.assertEquals("a should have a boolean type", "boolean", vars.getType(new SpecVar("a")));   
    Assert.assertEquals("b should have a boolean type", "boolean", vars.getType(new SpecVar("b")));   

    vars = val.getRight().getFreeVariables();
    Assert.assertEquals("Should only contain one free variables", 1, vars.size());
    Assert.assertEquals("c should have a boolean type", "boolean", vars.getType(new SpecVar("c")));   
  }
View Full Code Here


    FreeVars vars = val.getFreeVariables();
    Assert.assertEquals("Should only contain three free variables", 3, vars.size());

    vars = val.getLeft().getFreeVariables();
    Assert.assertEquals("Should only contain one free variables", 1, vars.size());
    Assert.assertEquals("c should have a boolean type", "boolean", vars.getType(new SpecVar("c")));   

    vars = val.getRight().getFreeVariables();
    Assert.assertEquals("Should only contain two free variables", 2, vars.size());
    Assert.assertEquals("a should have a boolean type", "boolean", vars.getType(new SpecVar("a")));   
    Assert.assertEquals("b should have a boolean type", "boolean", vars.getType(new SpecVar("b")));   

  }
View Full Code Here

    RelationshipPredicate val = (RelationshipPredicate)pred;
    Assert.assertTrue("Parsed predicate should be positive", val.isPositive());
   
    FreeVars vars = val.getFreeVariables();
    Assert.assertEquals("Should only contain two free variables", 2, vars.size());
    Assert.assertEquals("a should have a Bar type", "Bar", vars.getType(new SpecVar("a")));   
    Assert.assertEquals("b should have a Baz type", "Baz", vars.getType(new SpecVar("b")));   
  }
View Full Code Here

    RelationshipPredicate val = (RelationshipPredicate)pred;
    Assert.assertTrue("Parsed predicate should be negative", !val.isPositive());
   
    FreeVars vars = val.getFreeVariables();
    Assert.assertEquals("Should only contain two free variables", 2, vars.size());
    Assert.assertEquals("a should have a Bar type", "Bar", vars.getType(new SpecVar("a")));   
    Assert.assertEquals("b should have a Baz type", "Baz", vars.getType(new SpecVar("b")));   
  }
View Full Code Here

    BeginOfMethodOp invoke = (BeginOfMethodOp)op;
       
    FreeVars vars = invoke.getFreeVariables();
    Assert.assertEquals("Wrong number of free vars", 3, vars.size());
    Assert.assertEquals("Wrong type", "java.lang.Object", vars.getType(Constraint.RECEIVER));   
    Assert.assertEquals("Wrong type", "Baz", vars.getType(new SpecVar("baz")));   
    Assert.assertEquals("Wrong type", "Bar", vars.getType(new SpecVar("bar")));   
  }
View Full Code Here

   
    BeginOfMethodOp invoke = (BeginOfMethodOp)op;
       
    FreeVars vars = invoke.getFreeVariables();
    Assert.assertEquals("Wrong number of free vars", 2, vars.size());   
    Assert.assertEquals("Wrong type", "Baz", vars.getType(new SpecVar("baz")));   
    Assert.assertEquals("Wrong type", "Bar", vars.getType(new SpecVar("bar")));   
  }
View Full Code Here

       
    FreeVars vars = invoke.getFreeVariables();
    Assert.assertEquals("Wrong number of free vars", 3, vars.size());
    Assert.assertEquals("Wrong type", "Foo", vars.getType(Constraint.RECEIVER));   
    Assert.assertEquals("Wrong type", "Baz", vars.getType(Constraint.RESULT));   
    Assert.assertEquals("Wrong type", "Bar", vars.getType(new SpecVar("bar")));   
  }
View Full Code Here

       
    FreeVars vars = invoke.getFreeVariables();
    Assert.assertEquals("Wrong number of free vars", 4, vars.size());
    Assert.assertEquals("Wrong type", "Foo", vars.getType(Constraint.RECEIVER));   
    Assert.assertEquals("Wrong type", "Baz", vars.getType(Constraint.RESULT));   
    Assert.assertEquals("Wrong type", "Bar", vars.getType(new SpecVar("bar")));   
    Assert.assertEquals("Wrong type", "Baz", vars.getType(new SpecVar("baz")));   
  }
View Full Code Here

    ConstructorOp construct = (ConstructorOp)op;
       
    FreeVars vars = construct.getFreeVariables();
    Assert.assertEquals("Wrong number of free vars", 2, vars.size());
    Assert.assertEquals("Wrong type", "Foo", vars.getType(Constraint.RESULT));       
    Assert.assertEquals("Wrong type", "Bar", vars.getType(new SpecVar("bar")));       
  }
View Full Code Here

    ConstructorOp construct = (ConstructorOp)op;
       
    FreeVars vars = construct.getFreeVariables();
    Assert.assertEquals("Wrong number of free vars", 3, vars.size());
    Assert.assertEquals("Wrong type", "Foo", vars.getType(Constraint.RESULT));       
    Assert.assertEquals("Wrong type", "Bar", vars.getType(new SpecVar("bar")));       
    Assert.assertEquals("Wrong type", "Baz", vars.getType(new SpecVar("baz")));       
  }
View Full Code Here

TOP

Related Classes of edu.cmu.cs.fusion.constraint.SpecVar

Copyright © 2018 www.massapicom. 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.