Package ai.domain

Examples of ai.domain.Variable


    if (!this.variableValues.keySet().equals(other.variableValues.keySet()))
      throw new DomainException("Join only allowed with the same variables!!, mine: "+this +", other:"+other);

    Map<Variable, DI> result = new HashMap<Variable, DI>();
    for(Map.Entry<Variable, DI> entry: variableValues.entrySet()) {
      Variable var = entry.getKey();
      DI value = entry.getValue();     
      DI resultValue = value.widen(other.variableValues.get(var));
      result.put(var, resultValue);
    }
//   
View Full Code Here


    if (this.isBottom())
      return true;
    if (other.isBottom())
      return false;
    for(Map.Entry<Variable, DI> entry: variableValues.entrySet()){
      Variable variable = entry.getKey();
      if (!other.variableValues.containsKey(variable))
        return false;
      DI value = entry.getValue();
      if (!value.leq(other.variableValues.get(variable)))
        return false;
View Full Code Here

  }

  @Override
  public NonRelationalDomain<Interval> processEmptyEdge(NonRelationalDomain<Interval> input, List<SimpleName> variablesToRemove) {
    for(SimpleName name: variablesToRemove){
      Variable var = EvaluationUtils.tryGetVariable(name);
      if (var == null)
        continue;
      input = input.removeVariable(var);
    }
    return input;
View Full Code Here

    if (input.isBottom())
      return input;
    NonRelationalDomain<Bool> bools = input.getLeft();
    List<Variable> boxVariablesToRemove = new LinkedList<Variable>();
    for(SimpleName name: variablesToRemove){
      Variable var = EvaluationUtils.tryGetVariable(name);
      if (var == null)
        continue;
      if (bools.containsValue(var))
        bools = bools.removeVariable(var);
      else
View Full Code Here

    public MyThresholds join(MyThresholds otherOrNull) {
      if (otherOrNull == null)
        return this;
      Map<Variable, Set<Double>> result = new HashMap<Variable, Set<Double>>();
      for(Map.Entry<Variable, Set<Double>> entry: thresholds.entrySet()){
        Variable var = entry.getKey();
        Set<Double> thres = new HashSet(entry.getValue());
        thres.addAll(otherOrNull.thresholds.get(var));
        result.put(var, thres);
      }
      return new MyThresholds(result);
View Full Code Here

      if (EvaluationUtils.isIntegerType(node)){
        IntervalValue aValue = EvaluationUtils.tryGetIntervalValue(node);
        if (aValue != null) { // a constant??
          value = new Interval(aValue);
        } else {// variable??
          Variable var = EvaluationUtils.tryGetVariable(node);
          if (var == null) { // not a variable, we know nothing :(
            value = Interval.TOP;
          } else
            value = input.right.getValueFor(var);
        }
View Full Code Here

    } else {//variable is defined in initializer
      if (enclosingDeclarationBlock.getNodeType() != ASTNode.INITIALIZER)
        return null; // we are some method
      //hopefully we are ok :/
    }
    return new Variable(varBinding);
  }
View Full Code Here

TOP

Related Classes of ai.domain.Variable

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.