internal static bool IsFinal(DomainBoolExpr expression) { IsFinalVisitor visitor = new IsFinalVisitor(); return(expression.Accept <bool>(visitor)); }
// effects: Creates a boolean expression based on expr internal BoolExpression(DomainBoolExpr expr, MemberDomainMap memberDomainMap) { m_tree = expr; m_memberDomainMap = memberDomainMap; }
// effectS: Returns all the terms in expression. If // allowAllOperators is true, ensures that there are no NOTs or ORs internal static IEnumerable <DomainTermExpr> GetTerms(DomainBoolExpr expression, bool allowAllOperators) { TermVisitor visitor = new TermVisitor(allowAllOperators); return(expression.Accept <IEnumerable <DomainTermExpr> >(visitor)); }
internal static StringBuilder ToBuilder(DomainBoolExpr expression, StringBuilder builder) { CompactStringVisitor visitor = new CompactStringVisitor(builder); return(expression.Accept <StringBuilder>(visitor)); }
internal static DbExpression AsCqt(DomainBoolExpr expression, DbExpression row) { AsCqtVisitor visitor = new AsCqtVisitor(row); return(expression.Accept <DbExpression>(visitor)); }
internal static StringBuilder AsUserString(DomainBoolExpr expression, StringBuilder builder, string blockAlias) { AsUserStringVisitor visitor = new AsUserStringVisitor(builder, blockAlias); return(expression.Accept <StringBuilder>(visitor)); }
// effects: Creates a new boolean expression using the memberDomainMap of this expression internal BoolExpression Create(DomainBoolExpr expression) { return(new BoolExpression(expression, m_memberDomainMap)); }
internal void FixDomainMap(MemberDomainMap domainMap) { Debug.Assert(domainMap != null, "Member domain map is not set"); m_tree = FixRangeVisitor.FixRange(m_tree, domainMap); }
// effects: Creates a new boolean expression using the memberDomainMap of this expression internal BoolExpression Create(BoolLiteral literal) { DomainBoolExpr expr = literal.GetDomainBoolExpression(m_memberDomainMap); return(new BoolExpression(expr, m_memberDomainMap)); }
// effects: Given a mapping from old jointree nodes to new ones, // creates a boolean expression from "this" in which the references // to old join tree nodes are replaced by references to new nodes // from remap (boolean expressions other than constants can contain // references to jointree nodes, e.g., "var in values" -- var is a // reference to a JoinTreeNode internal BoolExpression RemapBool(Dictionary <MemberPath, MemberPath> remap) { DomainBoolExpr expr = RemapBoolVisitor.RemapExtentTreeNodes(m_tree, m_memberDomainMap, remap); return(new BoolExpression(expr, m_memberDomainMap)); }
// effects: Create a boolean expression from a literal value internal static BoolExpression CreateLiteral(BoolLiteral literal, MemberDomainMap memberDomainMap) { DomainBoolExpr expr = literal.GetDomainBoolExpression(memberDomainMap); return(new BoolExpression(expr, memberDomainMap)); }