Package edu.cmu.cs.fusion

Examples of edu.cmu.cs.fusion.ThreeValue


   
    return inner.getFreeVariables().union(fv);
  }

  public ThreeValue getTruth(FusionEnvironment env, Substitution sub) {
    ThreeValue testVal = env.getBooleanValue(sub.getSub(test));
    ThreeValue val;
   
    testVal = isPositive ? testVal : testVal.negate();
   
    if (testVal == ThreeValue.UNKNOWN)
      val = ThreeValue.UNKNOWN;
    else {
      ThreeValue relVal = inner.getTruth(env, sub);
      if (relVal == ThreeValue.UNKNOWN)
        val = ThreeValue.UNKNOWN;
      else if (relVal == testVal)
        val = ThreeValue.TRUE;
      else
View Full Code Here


  public boolean isStrictlyMorePrecise(RelationshipContext context) {
    boolean strictlyMore = false;
    if (rels.isEmpty())
      return false;
    for (Entry<Relationship, SevenPointLattice> entry : rels.entrySet()) {
      ThreeValue contextVal = context.getRelationship(entry.getKey());
      //all most be more precise or equal to
      if (!entry.getValue().isAtLeastAsPrecise(contextVal))
        return false;
      //and one must be more precise
      if (contextVal == ThreeValue.UNKNOWN && (entry.getValue() == SevenPointLattice.TRU || entry.getValue() == SevenPointLattice.FAL))
View Full Code Here

  public AndPredicate(Predicate left, Predicate right) {
    super(left, right);
  }

  public ThreeValue getTruth(FusionEnvironment env, Substitution sub) {
    ThreeValue lTV = lhs.getTruth(env, sub);
   
    if (lTV == ThreeValue.FALSE)
      return ThreeValue.FALSE;
    else if (lTV == ThreeValue.UNKNOWN)
      return rhs.getTruth(env, sub) == ThreeValue.FALSE ? ThreeValue.FALSE : ThreeValue.UNKNOWN;
View Full Code Here

  public OrPredicate(Predicate left, Predicate right) {
    super(left, right);
  }

  public ThreeValue getTruth(FusionEnvironment env, Substitution sub) {
    ThreeValue lTV = lhs.getTruth(env, sub);
   
    if (lTV == ThreeValue.TRUE)
      return ThreeValue.TRUE;
    else if (lTV == ThreeValue.UNKNOWN)
      return rhs.getTruth(env, sub) == ThreeValue.TRUE ? ThreeValue.TRUE : ThreeValue.UNKNOWN;
View Full Code Here

TOP

Related Classes of edu.cmu.cs.fusion.ThreeValue

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.