Package edu.cmu.cs.fusion.constraint

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


  }
 
  @Test
  public void testFreeVarsStaticReturn() {
    EndOfMethodOp construct = new EndOfMethodOp(null, null, null, null, "Bar", true);
    FreeVars fv = construct.getFreeVariables();
   
    assertEquals(1, fv.size());
  }
View Full Code Here


  @Test
  public void testFreeVars() {
    SpecVar[] vars = new SpecVar[] {utils.getVar(1)};
    ConstructorOp construct = new ConstructorOp("Foo", vars, new String[] {"Bar"});
    FreeVars fv = construct.getFreeVariables();
   
    assertEquals("Foo", fv.getType(Constraint.RESULT));
    assertEquals("Bar", fv.getType(utils.getVar(1)));
   
    assertEquals(2, fv.size());
  }
View Full Code Here

  }

  @Test
  public void testFreeVarsWild() {
    BeginOfMethodOp begin = new BeginOfMethodOp(null, null, null, null, false);
    FreeVars fv = begin.getFreeVariables();
   
    assertEquals("java.lang.Object", fv.getType(Constraint.RECEIVER));   
    assertEquals(1, fv.size());
  }
View Full Code Here

  }
 
  @Test
  public void testFreeVarsBoundedReceiver() {
    BeginOfMethodOp begin = new BeginOfMethodOp("Foo", null, null, null, false);
    FreeVars fv = begin.getFreeVariables();
   
    assertEquals("Foo", fv.getType(Constraint.RECEIVER));   
    assertEquals(1, fv.size());
  }
View Full Code Here

 
  @Test
  public void testFreeVarsBoundedParams() {
    SpecVar[] vars = new SpecVar[] {utils.getVar(0), utils.getVar(1)};
    BeginOfMethodOp begin = new BeginOfMethodOp(null, null, vars, new String[] {"Bar", "Baz"}, false);
    FreeVars fv = begin.getFreeVariables();
   
    assertEquals("java.lang.Object", fv.getType(Constraint.RECEIVER));   
    assertEquals("Bar", fv.getType(utils.getVar(0)));   
    assertEquals("Baz", fv.getType(utils.getVar(1)));   
    assertEquals(3, fv.size());
  }
View Full Code Here

  @Test
  public void testFreeVars() {
    SpecVar[] vars = new SpecVar[] {utils.getVar(0), utils.getVar(1)};
    MethodInvocationOp invoke = new MethodInvocationOp("mName", "Foo", vars, new String[] {"Foo", "Bar"}, "Bar", false);
    FreeVars fv = invoke.getFreeVariables();
   
    assertEquals("Foo", fv.getType(Constraint.RECEIVER));
    assertEquals("Bar", fv.getType(Constraint.RESULT));
    assertEquals("Foo", fv.getType(utils.getVar(0)));
    assertEquals("Bar", fv.getType(utils.getVar(1)));
   
    assertEquals(4, fv.size());
  }
View Full Code Here

    value = var;
    isPositive = isPos;
  }

  public FreeVars getFreeVariables() {
    return new FreeVars().addVar(value, FreeVars.BOOL_TYPE);
  }
View Full Code Here

import edu.cmu.cs.fusion.constraint.Substitution;

public class FalsePredicate implements Predicate {

  public FreeVars getFreeVariables() {
    return new FreeVars();
  }
View Full Code Here

    this.isPositive = isPositive;
   
  }

  public FreeVars getFreeVariables() {
    return new FreeVars(vars, type.getFullyQualifiedTypes());
  }
View Full Code Here

import edu.cmu.cs.fusion.constraint.Substitution;

public class TruePredicate implements Predicate {

  public FreeVars getFreeVariables() {
    return new FreeVars();
  }
View Full Code Here

TOP

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

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.