internal override bool VisitTerm(
                TermExpr <DomainConstraint <BoolLiteral, Constant> > expression)
            {
                MemberRestriction boolLiteral = BoolExpression.GetBoolLiteral(expression) as MemberRestriction;

                return(boolLiteral == null || boolLiteral.IsComplete);
            }
            internal override StringBuilder VisitTerm(
                TermExpr <DomainConstraint <BoolLiteral, Constant> > expression)
            {
                BoolLiteral boolLiteral = BoolExpression.GetBoolLiteral(expression);

                if (boolLiteral is ScalarRestriction || boolLiteral is TypeRestriction)
                {
                    return(boolLiteral.AsUserString(this.m_builder, Strings.ViewGen_EntityInstanceToken, this.m_skipIsNotNull));
                }
                return(boolLiteral.AsUserString(this.m_builder, this.m_blockAlias, this.m_skipIsNotNull));
            }
 internal BoolExpression RemapLiterals(Dictionary <BoolLiteral, BoolLiteral> remap)
 {
     return(new BoolExpression(this.m_tree.Accept <BoolExpr <DomainConstraint <BoolLiteral, Constant> > >((Visitor <DomainConstraint <BoolLiteral, Constant>, BoolExpr <DomainConstraint <BoolLiteral, Constant> > >) new BooleanExpressionTermRewriter <DomainConstraint <BoolLiteral, Constant>, DomainConstraint <BoolLiteral, Constant> >((Func <TermExpr <DomainConstraint <BoolLiteral, Constant> >, BoolExpr <DomainConstraint <BoolLiteral, Constant> > >)(term =>
     {
         BoolLiteral boolLiteral;
         if (!remap.TryGetValue(BoolExpression.GetBoolLiteral(term), out boolLiteral))
         {
             return (BoolExpr <DomainConstraint <BoolLiteral, Constant> >)term;
         }
         return boolLiteral.GetDomainBoolExpression(this.m_memberDomainMap);
     }))), this.m_memberDomainMap));
 }
            internal override StringBuilder VisitNot(
                NotExpr <DomainConstraint <BoolLiteral, Constant> > expression)
            {
                this.m_skipIsNotNull = false;
                TermExpr <DomainConstraint <BoolLiteral, Constant> > child = expression.Child as TermExpr <DomainConstraint <BoolLiteral, Constant> >;

                if (child != null)
                {
                    return(BoolExpression.GetBoolLiteral(child).AsNegatedUserString(this.m_builder, this.m_blockAlias, this.m_skipIsNotNull));
                }
                this.m_builder.Append("NOT(");
                expression.Child.Accept <StringBuilder>((Visitor <DomainConstraint <BoolLiteral, Constant>, StringBuilder>) this);
                this.m_builder.Append(")");
                return(this.m_builder);
            }
 internal override StringBuilder VisitTerm(
     TermExpr <DomainConstraint <BoolLiteral, Constant> > expression)
 {
     BoolExpression.GetBoolLiteral(expression).ToCompactString(this.m_builder);
     return(this.m_builder);
 }
 internal override T_Return VisitTerm(
     TermExpr <DomainConstraint <BoolLiteral, Constant> > expression)
 {
     return(this.BooleanLiteralAsCql(BoolExpression.GetBoolLiteral(expression), this.m_skipIsNotNull));
 }
 internal override BoolExpr <DomainConstraint <BoolLiteral, Constant> > VisitTerm(
     TermExpr <DomainConstraint <BoolLiteral, Constant> > expression)
 {
     BoolExpression.GetBoolLiteral(expression).GetRequiredSlots(this.m_projectedSlotMap, this.m_requiredSlots);
     return((BoolExpr <DomainConstraint <BoolLiteral, Constant> >)expression);
 }
 internal override BoolExpr <DomainConstraint <BoolLiteral, Constant> > VisitTerm(
     TermExpr <DomainConstraint <BoolLiteral, Constant> > expression)
 {
     return(BoolExpression.GetBoolLiteral(expression).RemapBool(this.m_remap).GetDomainBoolExpression(this.m_memberDomainMap));
 }
 internal override BoolExpr <DomainConstraint <BoolLiteral, Constant> > VisitTerm(
     TermExpr <DomainConstraint <BoolLiteral, Constant> > expression)
 {
     return(BoolExpression.GetBoolLiteral(expression).FixRange(expression.Identifier.Range, this.m_memberDomainMap));
 }