Package edu.cmu.cs.fusion.constraint

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


  public RelationshipPredicate getRelationship() {
    return inner;
  }

  public FreeVars getFreeVariables() {
    FreeVars fv = new FreeVars();
    fv = fv.addVar(test, "boolean");
   
    return inner.getFreeVariables().union(fv);
  }
View Full Code Here


    type = fullyQualifiedType;
    this.isPositive = isPositive;
  }

  public FreeVars getFreeVariables() {
    return new FreeVars().addVar(variable, isPositive ? type : FreeVars.OBJECT_TYPE);
  }
View Full Code Here

    this.right = right;
    this.isPositive = isPositive;
  }

  public FreeVars getFreeVariables() {
    return new FreeVars().addVar(left, FreeVars.OBJECT_TYPE).addVar(right, FreeVars.OBJECT_TYPE);
  }
View Full Code Here

public class NoOp implements Operation {
  public NoOp() {
  }

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

      this.paramTypes = paramTypes;
      this.type = type;
    }

  public FreeVars getFreeVariables() {
    return new FreeVars(params, paramTypes).addVar(ret, type);
  }
View Full Code Here

    this.paramNames = paramNames;
    this.isStatic = isStatic;
  }

  public FreeVars getFreeVariables() {
    FreeVars fv = new FreeVars();
    if (!isStatic) {
      if (thisType == null)
        fv = fv.addVar(Constraint.RECEIVER, FreeVars.OBJECT_TYPE);
      else
        fv = fv.addVar(Constraint.RECEIVER, thisType);
    }
   
    if (paramNames != null) {
      fv = fv.addVars(paramNames, paramTypes);
    }
    return fv;
  }
View Full Code Here

      };
       


  public List<Substitution> allValidSubs(Substitution existing, FreeVars fv) {
    FreeVars actualFreeVars = new FreeVars();
   
    for (SpecVar spec : fv) {
      if (existing.getSub(spec) == null) {
        actualFreeVars = actualFreeVars.addVar(spec, fv.getType(spec));
      }
    }
   
    ConsList<Pair<SpecVar, String>> freeVarList = actualFreeVars.convertToConsList();
   
    List<Substitution> subs = new LinkedList<Substitution>();
    subs.add(existing);
   
    return freeVarList.foldl(validSubsLambda, subs);
View Full Code Here

    this.resType = resType;
    this.isStatic = isStatic;
  }

  public FreeVars getFreeVariables() {
    FreeVars fv = new FreeVars();
 
    if (!isStatic)
      fv = fv.addVar(Constraint.RECEIVER, thisType != null ? thisType : FreeVars.OBJECT_TYPE);
   
    if (resType != null)
      fv = fv.addVar(Constraint.RESULT, resType);
   
    if (paramTypes != null)
      fv = fv.addVars(paramNames, paramTypes);
   
    return fv;
  }
View Full Code Here

      name = methodName;
      this.isStatic = isStatic;
    }

  public FreeVars getFreeVariables() {
    FreeVars vars = new FreeVars(params, paramTypes).addVar(retVar, retType);
    if (!isStatic)
      vars = vars.addVar(thisVar, thisType);
    return vars;
  }
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.