Package edu.cmu.cs.fusion.alias

Examples of edu.cmu.cs.fusion.alias.ObjectLabel


    RelationshipDelta delta = new RelationshipDelta();
    SevenPointLattice effect = SevenPointLattice.TRU;
   
    //determine the effect for the test case. This variable cannot be wildcarded, so safe to acccess here.
    if (test != null) {
      ObjectLabel testLabel = subs.getSub(test);
      effect = SevenPointLattice.convert(env.getBooleanValue(testLabel));
    }

    //now, fill in the wildcards and get the real substitutions.
    List<Substitution> allSubs = env.allValidSubs(subs, getWildCards());
View Full Code Here


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

  public ThreeValue getTruth(FusionEnvironment env, Substitution sub) {
    ObjectLabel obj = sub.getSub(variable);
    if (env.isSubtypeCompatible(obj.getTypeName(), type))
      return isPositive ? ThreeValue.TRUE : ThreeValue.FALSE;
    else if (env.existsPossibleSubtype(obj.getTypeName(), type))
      return ThreeValue.UNKNOWN;
    else
      return isPositive ? ThreeValue.FALSE : ThreeValue.TRUE;
  }
View Full Code Here

  private boolean matches(RelationshipPredicate r1, Substitution s1, RelationshipPredicate r2, Substitution s2) {
    if (!(r1.getRelation().equals(r2.getRelation())))
      return false;
   
    for (int ndx = 0; ndx < r1.getVars().length; ndx++) {
      ObjectLabel o1 = s1.getSub(r1.getVars()[ndx]);
      ObjectLabel o2 = s2.getSub(r2.getVars()[ndx]);
     
      //It's possible that something is null, because it isn't bound to anything in particular
      //In that case, treat it as a match because it could be bound to the thing we have in the
      //other one. Basically, it's a free variable, so continue to treat it like one!
      if (o1 != null && o2 != null && !(o1.equals(o2)))
View Full Code Here

TOP

Related Classes of edu.cmu.cs.fusion.alias.ObjectLabel

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.