/// <summary> /// Replaces the implementation of this existential function with the one given by the procided decision tree (without categorical split nodes) /// and returns whether the implmentation has changed. /// </summary> /// <param name="node">The root of a decision tree</param> /// <param name="attr2Expr">The mapping of attribute names to expressions</param> /// <returns>true if the implmentation has changed and false otherwise</returns> private bool constructModel(TreeNode node, Dictionary <string, Expr> attr2Expr) { // Remember old implementation Expr oldmodel = model; // Get new implementation if (node == null) { model = Expr.False; } else { model = node.constructBoogieExpr(attr2Expr); } return(!ExtendsExpr.EqualityComparer(model, oldmodel)); }
/// <summary> /// Returns the implementation of the model where the formal parameters (the variables) are substituted with newvars. /// </summary> /// <param name="newvars">The variables used to replace the old variables with</param> /// <returns></returns> public Expr Gamma(List <Expr> newvars) { return(ExtendsExpr.replace(model, vars, newvars)); }