Example #1
0
        public PolyhedraEnvironment <Expression> Meet(PolyhedraEnvironment <Expression> right)
        {
            PolyhedraEnvironment <Expression> result;

            if (AbstractDomainsHelper.TryTrivialMeet(this, right, out result))
            {
                return(result);
            }
            else
            {
                return(Factory(UnderlyingPolyhedra.Meet(embedded, right.embedded), intv.Meet(right.intv)));
            }
        }
Example #2
0
        public bool LessEqual(PolyhedraEnvironment <Expression> right)
        {
            bool result;

            if (AbstractDomainsHelper.TryTrivialLessEqual(this, right, out result))
            {
                return(result);
            }
            else
            {
                return(UnderlyingPolyhedra.LowerThan(embedded, right.embedded) && intv.LessEqual(right.intv));
            }
        }
Example #3
0
        public PolyhedraEnvironment <Expression> Widening(PolyhedraEnvironment <Expression> prev)
        {
            PolyhedraEnvironment <Expression> result;

            if (AbstractDomainsHelper.TryTrivialJoin(this, prev, out result))
            {
                return(result);
            }
            else
            {
                // Boogie's polyhedra has it in the other order
                return(Factory(UnderlyingPolyhedra.Widen(prev.embedded, embedded), intv.Widening(prev.intv)));
            }
        }
Example #4
0
 public override PolyhedraEnvironment <Expression> VisitVariable(Expression exp, object variable, PolyhedraEnvironment <Expression> data)
 {
     return(data);
 }
Example #5
0
            public override PolyhedraEnvironment <Expression> VisitNotEqual(Expression left, Expression right, PolyhedraEnvironment <Expression> data)
            {
                // left != right
                AI.IExpr notEq = linearfactory.Neq(Converter.Box(left, this.Decoder), Converter.Box(right, this.Decoder));

                return(data.Factory(UnderlyingPolyhedra.Constrain(data.embedded, notEq), data.intv));
            }
Example #6
0
 public override PolyhedraEnvironment <Expression> VisitLessThan(Expression left, Expression right, PolyhedraEnvironment <Expression> data)
 {
     return((PolyhedraEnvironment <Expression>)data.TestTrueLessThan(left, right));
 }
Example #7
0
 private PolyhedraEnvironment(PolyhedraEnvironment <Expression> pe, AI.PolyhedraLattice.Element value, IntervalEnvironment <Variable, Expression> intv)
     : this(pe.decoder, pe.encoder, value, intv)
 {
     testTrueVisitor  = pe.testTrueVisitor;
     testFalseVisitor = pe.testFalseVisitor;
 }