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))); } }
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)); } }
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))); } }
public override PolyhedraEnvironment <Expression> VisitVariable(Expression exp, object variable, PolyhedraEnvironment <Expression> data) { return(data); }
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)); }
public override PolyhedraEnvironment <Expression> VisitLessThan(Expression left, Expression right, PolyhedraEnvironment <Expression> data) { return((PolyhedraEnvironment <Expression>)data.TestTrueLessThan(left, right)); }
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; }