protected GenericValueAnalysis(string methodName, IMethodDriver <TExpr, TVar> methodDriver) { ThresholdDB.Reset(); BoxedVariable <TVar> .ResetFreshVariableCounter(); // method_name = methodName; method_driver = methodDriver; EvaluatorOfConstants = new ConstantEvaluator(ContextProvider, MetaDataProvider); }
public BoxedVariable <TVar> UnderlyingVariable(BoxedExpression expr) { var uv = expr.UnderlyingVariable; if (uv is TVar) { return(new BoxedVariable <TVar> ((TVar)expr.UnderlyingVariable)); } var boxed = uv as BoxedVariable <TVar>; return(boxed ?? BoxedVariable <TVar> .SlackVariable()); }
public bool Equals(BoxedVariable <TVar> that) { if (ReferenceEquals(this, that)) { return(true); } if (ReferenceEquals(that, null)) { return(false); } if (inner_variable != null) { return(inner_variable.Equals(that.inner_variable)); } return(variable != null && variable.Equals(that.variable)); }
public BoxedExpression VariableFor(BoxedVariable <TVar> var) { return(BoxedExpression.Var(var)); }
public BoxedVariable <TVar> FreshVariable() { return(BoxedVariable <TVar> .SlackVariable()); }
public void ResetFreshVariableCounter() { BoxedVariable <TVar> .ResetFreshVariableCounter(); }
public string NameOf(BoxedVariable <TVar> variable) { return(variable.ToString()); }