Пример #1
0
        /// <summary>
        ///   Visits the <paramref name="formula." />
        /// </summary>
        public override void VisitBoundedBinaryFormula(BoundedBinaryFormula formula)
        {
            var referenceFormula = _referenceFormula as BoundedBinaryFormula;

            if (referenceFormula == null)
            {
                IsEqual = false;
            }
            else
            {
                if (formula.Operator != referenceFormula.Operator)
                {
                    IsEqual = false;
                }
                else if (formula.Bound != referenceFormula.Bound)
                {
                    IsEqual = false;
                }
                else
                {
                    _referenceFormula = referenceFormula.LeftOperand;
                    Visit(formula.LeftOperand);
                    if (!IsEqual)
                    {
                        return;
                    }
                    _referenceFormula = referenceFormula.RightOperand;
                    Visit(formula.RightOperand);
                }
            }
        }
        /// <summary>
        ///   Visits the <paramref name="formula." />
        /// </summary>
        public override void VisitBoundedBinaryFormula(BoundedBinaryFormula formula)
        {
            Visit(formula.LeftOperand);
            var left = CurrentFormula;

            Visit(formula.RightOperand);
            var right = CurrentFormula;

            CurrentFormula = new BoundedBinaryFormula(left, formula.Operator, right, formula.Bound);
        }
Пример #3
0
        /// <summary>
        ///   Visits the <paramref name="formula." />
        /// </summary>
        public override void VisitBoundedBinaryFormula(BoundedBinaryFormula formula)
        {
            Visit(formula.LeftOperand);
            var leftMaximalNestedOnceInside = MaximalNestedOnceInside;

            Visit(formula.RightOperand);
            var rightMaximalNestedOnceInside = MaximalNestedOnceInside;

            IsCompilable            = false;
            MaximalNestedOnceInside = Math.Max(leftMaximalNestedOnceInside, rightMaximalNestedOnceInside);
        }
 /// <summary>
 ///   Visits the <paramref name="formula." />
 /// </summary>
 public override void VisitBoundedBinaryFormula(BoundedBinaryFormula formula)
 {
     Visit(formula.LeftOperand);
     if (IsCompilable)
     {
         MaximalCompilableFormulas.Add(formula.LeftOperand);
     }
     Visit(formula.RightOperand);
     if (IsCompilable)
     {
         MaximalCompilableFormulas.Add(formula.RightOperand);
     }
     IsCompilable = false;
 }
        /// <summary>
        ///   Visits the <paramref name="formula." />
        /// </summary>
        public override void VisitBoundedBinaryFormula(BoundedBinaryFormula formula)
        {
            Visit(formula.LeftOperand);
            var leftMaximalNestedOnceInside = MaximalNestedOnceInside;

            if (IsNormalizable)
            {
                MaximalNormalizableFormulas.Add(formula.LeftOperand);
            }
            Visit(formula.RightOperand);
            var rightMaximalNestedOnceInside = MaximalNestedOnceInside;

            if (IsNormalizable)
            {
                MaximalNormalizableFormulas.Add(formula.RightOperand);
            }
            IsNormalizable          = false;
            MaximalNestedOnceInside = Math.Max(leftMaximalNestedOnceInside, rightMaximalNestedOnceInside);
        }
        /// <summary>
        ///   Visits the <paramref name="formula." />
        /// </summary>
        public override void VisitBoundedBinaryFormula(BoundedBinaryFormula formula)
        {
            _builder.Append("(");
            Visit(formula.LeftOperand);

            switch (formula.Operator)
            {
            case BinaryOperator.Until:
                _builder.Append(" U");
                break;

            default:
                Assert.NotReached($"Unknown or unsupported binary operator '{formula.Operator}'.");
                break;
            }
            _builder.Append($"<={formula.Bound} ");

            Visit(formula.RightOperand);
            _builder.Append(")");
        }
Пример #7
0
 /// <summary>
 ///   Visits the <paramref name="formula." />
 /// </summary>
 public override void VisitBoundedBinaryFormula(BoundedBinaryFormula formula)
 {
     throw new InvalidOperationException("Only state formulas can be evaluated.");
 }
 /// <summary>
 ///   Visits the <paramref name="formula." />
 /// </summary>
 public override void VisitBoundedBinaryFormula(BoundedBinaryFormula formula)
 {
     throw new NotImplementedException();
 }
 /// <summary>
 ///   Visits the <paramref name="formula." />
 /// </summary>
 public override void VisitBoundedBinaryFormula(BoundedBinaryFormula formula)
 {
     IsFormulaReturningBoolValue = true;
 }
 /// <summary>
 ///   Visits the <paramref name="formula." />
 /// </summary>
 public override void VisitBoundedBinaryFormula(BoundedBinaryFormula formula)
 {
     Visit(formula.LeftOperand);
     Visit(formula.RightOperand);
 }
 /// <summary>
 ///   Visits the <paramref name="formula." />
 /// </summary>
 public override void VisitBoundedBinaryFormula(BoundedBinaryFormula formula)
 {
     IsReturningRewardResult = false;
 }