Package ai.domain.bool

Examples of ai.domain.bool.Bool


 
  private Pair<Bool, DI> computeInitialValue(Expression exprOrNull, DI input) {
    if (exprOrNull == null)
      return Pair.create(null, input);
    BooleanEvaluationState<DI> x = evaluateCondition(input, exprOrNull);
    Bool resultVal = Bool.BOTTOM;
    DI resultState = x.conditionMet;
    if (!x.conditionMet.isBottom())
      resultVal = resultVal.join(Bool.TRUE);
    if (!x.conditionNotMet.isBottom()) {
      resultVal = resultVal.join(Bool.FALSE);
      resultState = resultState.join(x.conditionNotMet);
    }
    return Pair.create(resultVal, resultState);
  }
View Full Code Here


    Matcher matcher = NAME_VALUE_PATTERN_PREFIX.matcher(description);
    if (!matcher.matches())
      throw new CommentParserException("Invalid domain value '%s'", description);
    String variableName = matcher.group(1);
    String valueString = matcher.group(2);
    Bool value = Utils.parseBool(valueString);
    if (value == null)
      throw new CommentParserException("Invalid boolean value '%s'", valueString);
    description = matcher.group(3).trim();
    return Pair.create(Pair.create(variableName, value), description);
  }
View Full Code Here

    @Override
    public BooleanEvaluationState<ProductDomain<NonRelationalDomain<Bool>, NonRelationalDomain<Interval>>> processBooleanNode(
        ProductDomain<NonRelationalDomain<Bool>, NonRelationalDomain<Interval>> input, FieldAccess node) {
      Boolean aValue = EvaluationUtils.tryGetBooleanValue(node);
      Bool value = (aValue != null) ? Bool.get(aValue) : Bool.TOP;
      return BooleanEvaluator.createOutput(input, value);
    }
View Full Code Here

    }

    @Override
    public BooleanEvaluationState<ProductDomain<NonRelationalDomain<Bool>, NonRelationalDomain<Interval>>> processBooleanNode(
        ProductDomain<NonRelationalDomain<Bool>, NonRelationalDomain<Interval>> input, SimpleName node) {
      Bool value;
      if (EvaluationUtils.isBooleanType(node)) {
        Boolean aValue = EvaluationUtils.tryGetBooleanValue(node);
        if (aValue != null) { // a constant??
          value = Bool.get(aValue);
        } else {// variable??
View Full Code Here

    @Override
    public BooleanEvaluationState<ProductDomain<NonRelationalDomain<Bool>, NonRelationalDomain<Interval>>> processBooleanNode(
        ProductDomain<NonRelationalDomain<Bool>, NonRelationalDomain<Interval>> input, QualifiedName node) {
      Boolean aValue = EvaluationUtils.tryGetBooleanValue(node);
      Bool value = (aValue != null) ? Bool.get(aValue) : Bool.TOP;
      return BooleanEvaluator.createOutput(input, value);
    }
View Full Code Here

    @Override
    public BooleanEvaluationState<ProductDomain<NonRelationalDomain<Bool>, NonRelationalDomain<Interval>>> processBooleanNode(
        ProductDomain<NonRelationalDomain<Bool>, NonRelationalDomain<Interval>> input, SuperFieldAccess node) {
      Boolean aValue = EvaluationUtils.tryGetBooleanValue(node);
      Bool value = (aValue != null) ? Bool.get(aValue) : Bool.TOP;
      return BooleanEvaluator.createOutput(input, value);
    }
View Full Code Here

TOP

Related Classes of ai.domain.bool.Bool

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.