4 types derived from BoolExpr
System.Data.Entity (4)
System\Data\Common\Utils\Boolean\BoolExpr.cs (4)
167internal sealed class TrueExpr<T_Identifier> : BoolExpr<T_Identifier> 204internal sealed class FalseExpr<T_Identifier> : BoolExpr<T_Identifier> 241internal sealed class TermExpr<T_Identifier> : BoolExpr<T_Identifier>, IEquatable<TermExpr<T_Identifier>> 324internal abstract class TreeExpr<T_Identifier> : BoolExpr<T_Identifier>
185 references to BoolExpr
System.Data.Entity (185)
System\Data\Common\Utils\Boolean\BoolExpr.cs (34)
33internal abstract partial class BoolExpr<T_Identifier> : IEquatable<BoolExpr<T_Identifier>> 54internal BoolExpr<T_Identifier> Simplify() 63internal BoolExpr<T_Identifier> ExpensiveSimplify(out Converter<T_Identifier> converter) 82private static BoolExpr<T_Identifier> ChooseCandidate(params BoolExpr<T_Identifier>[] candidates) 88BoolExpr<T_Identifier> result = null; 90foreach (var candidate in candidates) 93var simplifiedCandidate = candidate.Simplify(); 136public static implicit operator BoolExpr<T_Identifier>(T_Identifier value) 144internal virtual BoolExpr<T_Identifier> MakeNegated() 154public bool Equals(BoolExpr<T_Identifier> other) 160protected abstract bool EquivalentTypeEquals(BoolExpr<T_Identifier> other); 189internal override BoolExpr<T_Identifier> MakeNegated() 194protected override bool EquivalentTypeEquals(BoolExpr<T_Identifier> other) 226internal override BoolExpr<T_Identifier> MakeNegated() 231protected override bool EquivalentTypeEquals(BoolExpr<T_Identifier> other) 281protected override bool EquivalentTypeEquals(BoolExpr<T_Identifier> other) 301internal override BoolExpr<T_Identifier> MakeNegated() 326private readonly Set<BoolExpr<T_Identifier>> _children; 333protected TreeExpr(IEnumerable<BoolExpr<T_Identifier>> children) 337_children = new Set<BoolExpr<T_Identifier>>(children); 345internal Set<BoolExpr<T_Identifier>> Children { get { return _children; } } 350return base.Equals(obj as BoolExpr<T_Identifier>); 363protected override bool EquivalentTypeEquals(BoolExpr<T_Identifier> other) 387internal AndExpr(params BoolExpr<T_Identifier>[] children) 388: this((IEnumerable<BoolExpr<T_Identifier>>)children) 396internal AndExpr(IEnumerable<BoolExpr<T_Identifier>> children) 427internal OrExpr(params BoolExpr<T_Identifier>[] children) 428: this((IEnumerable<BoolExpr<T_Identifier>>)children) 436internal OrExpr(IEnumerable<BoolExpr<T_Identifier>> children) 459internal NotExpr(BoolExpr<T_Identifier> child) 460: base(new BoolExpr<T_Identifier>[] { child }) 466internal BoolExpr<T_Identifier> Child { get { return Children.First(); } } 478internal override BoolExpr<T_Identifier> MakeNegated()
System\Data\Common\Utils\Boolean\Clause.cs (4)
50private static BoolExpr<T_Identifier> ConvertLiteralsToExpr(Set<Literal<T_Identifier>> literals, ExprType treeType) 55IEnumerable<BoolExpr<T_Identifier>> literalExpressions = literals.Select( 56new Func<Literal<T_Identifier>, BoolExpr<T_Identifier>>(ConvertLiteralToExpression)); 69private static BoolExpr<T_Identifier> ConvertLiteralToExpression(Literal<T_Identifier> literal)
System\Data\Common\Utils\Boolean\Converter.cs (1)
31internal Converter(BoolExpr<T_Identifier> expr, ConversionContext<T_Identifier> context)
System\Data\Common\Utils\Boolean\IdentifierService.cs (6)
71internal abstract BoolExpr<T_Identifier> LocalSimplify(BoolExpr<T_Identifier> expression); 87internal override BoolExpr<T_Identifier> LocalSimplify(BoolExpr<T_Identifier> expression) 109internal override BoolExpr<DomainConstraint<T_Variable, T_Element>> LocalSimplify(BoolExpr<DomainConstraint<T_Variable, T_Element>> expression)
System\Data\Common\Utils\Boolean\KnowledgeBase.cs (17)
37private readonly List<BoolExpr<T_Identifier>> _facts; 46_facts = new List<BoolExpr<T_Identifier>>(); 57foreach (BoolExpr<T_Identifier> fact in kb._facts) 67internal virtual void AddFact(BoolExpr<T_Identifier> fact) 82internal void AddImplication(BoolExpr<T_Identifier> condition, BoolExpr<T_Identifier> implies) 94internal void AddEquivalence(BoolExpr<T_Identifier> left, BoolExpr<T_Identifier> right) 103foreach (BoolExpr<T_Identifier> fact in _facts) 114BoolExpr<T_Identifier> _condition; 115BoolExpr<T_Identifier> _implies; 118internal Implication(BoolExpr<T_Identifier> condition, BoolExpr<T_Identifier> implies) 135BoolExpr<T_Identifier> _left; 136BoolExpr<T_Identifier> _right; 139internal Equivalence(BoolExpr<T_Identifier> left, BoolExpr<T_Identifier> right)
System\Data\Common\Utils\Boolean\Literal.cs (2)
41: base(isTermPositive ? (BoolExpr<T_Identifier>)term : (BoolExpr<T_Identifier>)new NotExpr<T_Identifier>(term))
System\Data\Common\Utils\Boolean\NegationPusher.cs (13)
27internal static BoolExpr<DomainConstraint<T_Variable, T_Element>> EliminateNot<T_Variable, T_Element>(BoolExpr<DomainConstraint<T_Variable, T_Element>> expression) 40internal override BoolExpr<T_Identifier> VisitNot(NotExpr<T_Identifier> expression) 46private class NegatedTreeVisitor<T_Identifier> : Visitor<T_Identifier, BoolExpr<T_Identifier>> 54internal override BoolExpr<T_Identifier> VisitTrue(TrueExpr<T_Identifier> expression) 59internal override BoolExpr<T_Identifier> VisitFalse(FalseExpr<T_Identifier> expression) 64internal override BoolExpr<T_Identifier> VisitTerm(TermExpr<T_Identifier> expression) 69internal override BoolExpr<T_Identifier> VisitNot(NotExpr<T_Identifier> expression) 74internal override BoolExpr<T_Identifier> VisitAnd(AndExpr<T_Identifier> expression) 79internal override BoolExpr<T_Identifier> VisitOr(OrExpr<T_Identifier> expression) 93internal override BoolExpr<DomainConstraint<T_Variable, T_Element>> VisitNot(NotExpr<DomainConstraint<T_Variable, T_Element>> expression) 107internal override BoolExpr<DomainConstraint<T_Variable, T_Element>> VisitNot(NotExpr<DomainConstraint<T_Variable, T_Element>> expression) 112internal override BoolExpr<DomainConstraint<T_Variable, T_Element>> VisitTerm(TermExpr<DomainConstraint<T_Variable, T_Element>> expression)
System\Data\Common\Utils\Boolean\Sentence.cs (7)
27private readonly BoolExpr<T_Identifier> _expr; 34protected NormalFormNode(BoolExpr<T_Identifier> expr) { _expr = expr.Simplify(); } 39internal BoolExpr<T_Identifier> Expr { get { return _expr; } } 48protected static BoolExpr<T_Identifier> ExprSelector<T_NormalFormNode>(T_NormalFormNode node) 80private static BoolExpr<T_Identifier> ConvertClausesToExpr(Set<T_Clause> clauses, ExprType treeType) 85IEnumerable<BoolExpr<T_Identifier>> clauseExpressions = 86clauses.Select(new Func<T_Clause, BoolExpr<T_Identifier>>(ExprSelector));
System\Data\Common\Utils\Boolean\Simplifier.cs (18)
33internal override BoolExpr<T_Identifier> VisitNot(NotExpr<T_Identifier> expression) 35BoolExpr<T_Identifier> child = expression.Child.Accept(this); 46internal override BoolExpr<T_Identifier> VisitAnd(AndExpr<T_Identifier> expression) 51internal override BoolExpr<T_Identifier> VisitOr(OrExpr<T_Identifier> expression) 56private BoolExpr<T_Identifier> SimplifyTree(TreeExpr<T_Identifier> tree) 62List<BoolExpr<T_Identifier>> simplifiedChildren = new List<BoolExpr<T_Identifier>>(tree.Children.Count); 63foreach (BoolExpr<T_Identifier> child in tree.Children) 65BoolExpr<T_Identifier> simplifiedChild = child.Accept(this); 79Dictionary<BoolExpr<T_Identifier>, bool> negatedChildren = new Dictionary<BoolExpr<T_Identifier>, bool>(tree.Children.Count); 80List<BoolExpr<T_Identifier>> otherChildren = new List<BoolExpr<T_Identifier>>(tree.Children.Count); 81foreach (BoolExpr<T_Identifier> simplifiedChild in simplifiedChildren) 103List<BoolExpr<T_Identifier>> children = new List<BoolExpr<T_Identifier>>(); 104foreach (BoolExpr<T_Identifier> child in otherChildren) 114foreach (BoolExpr<T_Identifier> child in negatedChildren.Keys)
System\Data\Common\Utils\Boolean\Visitor.cs (27)
41internal abstract class BasicVisitor<T_Identifier> : Visitor<T_Identifier, BoolExpr<T_Identifier>> 43internal override BoolExpr<T_Identifier> VisitFalse(FalseExpr<T_Identifier> expression) { return expression; } 44internal override BoolExpr<T_Identifier> VisitTrue(TrueExpr<T_Identifier> expression) { return expression; } 45internal override BoolExpr<T_Identifier> VisitTerm(TermExpr<T_Identifier> expression) { return expression; } 46internal override BoolExpr<T_Identifier> VisitNot(NotExpr<T_Identifier> expression) 50internal override BoolExpr<T_Identifier> VisitAnd(AndExpr<T_Identifier> expression) 54internal override BoolExpr<T_Identifier> VisitOr(OrExpr<T_Identifier> expression) 58private IEnumerable<BoolExpr<T_Identifier>> AcceptChildren(IEnumerable<BoolExpr<T_Identifier>> children) 60foreach (BoolExpr<T_Identifier> child in children) { yield return child.Accept(this); } 68internal static int CountTerms(BoolExpr<T_Identifier> expression) 107foreach (var child in expression.Children) 128internal static List<TermExpr<T_Identifier>> GetTerms(BoolExpr<T_Identifier> expression) 136internal static IEnumerable<T_Identifier> GetLeaves(BoolExpr<T_Identifier> expression) 174foreach (BoolExpr<T_Identifier> child in expression.Children) 187internal class BooleanExpressionTermRewriter<T_From, T_To> : Visitor<T_From, BoolExpr<T_To>> 189private readonly Func<TermExpr<T_From>, BoolExpr<T_To>> _translator; 195internal BooleanExpressionTermRewriter(Func<TermExpr<T_From>, BoolExpr<T_To>> translator) 201internal override BoolExpr<T_To> VisitFalse(FalseExpr<T_From> expression) 206internal override BoolExpr<T_To> VisitTrue(TrueExpr<T_From> expression) 211internal override BoolExpr<T_To> VisitNot(NotExpr<T_From> expression) 216internal override BoolExpr<T_To> VisitTerm(TermExpr<T_From> expression) 221internal override BoolExpr<T_To> VisitAnd(AndExpr<T_From> expression) 226internal override BoolExpr<T_To> VisitOr(OrExpr<T_From> expression) 231private IEnumerable<BoolExpr<T_To>> VisitChildren(TreeExpr<T_From> expression) 233foreach (BoolExpr<T_From> child in expression.Children) 253internal static Vertex TranslateToRobdd(BoolExpr<T_Identifier> expr, ConversionContext<T_Identifier> context)
System\Data\Mapping\ViewGeneration\QueryRewriting\FragmentQueryKB.cs (3)
24private BoolExpr<DomainConstraint<BoolLiteral, Constant>> _kbExpression = TrueExpr<DomainConstraint<BoolLiteral, Constant>>.Value; 26internal override void AddFact(BoolExpr<DomainConstraint<BoolLiteral, Constant>> fact) 31internal BoolExpr<DomainConstraint<BoolLiteral, Constant>> KbExpression
System\Data\Mapping\ViewGeneration\QueryRewriting\RewritingValidator.cs (2)
471private IEnumerable<CellTreeNode> AcceptChildren(IEnumerable<BoolExpr<DomainConstraint<BoolLiteral, Constant>>> children) 473foreach (BoolExpr<DomainConstraint<BoolLiteral, Constant>> child in children) { yield return child.Accept(this); }
System\Data\Mapping\ViewGeneration\Structures\BoolExpression.cs (9)
23using DomainBoolExpr = BoolExpr<DomainConstraint<BoolLiteral, Constant>>; 39DomainBoolExpr expr = literal.GetDomainBoolExpression(memberDomainMap); 46DomainBoolExpr expr = literal.GetDomainBoolExpression(m_memberDomainMap); 76internal BoolExpression Create(DomainBoolExpr expression) 130internal BoolExpression(DomainBoolExpr expr, MemberDomainMap memberDomainMap) 138private DomainBoolExpr m_tree; // The actual tree that has the expression 245internal DomainBoolExpr Tree 281private IEnumerable<DomainBoolExpr> ToBoolExprList(IEnumerable<BoolExpression> nodes) 363DomainBoolExpr expr = RemapBoolVisitor.RemapExtentTreeNodes(m_tree, m_memberDomainMap, remap);
System\Data\Mapping\ViewGeneration\Structures\BoolExpressionVisitors.cs (27)
23using DomainBoolExpr = BoolExpr<DomainConstraint<BoolLiteral, Constant>>; 52internal static DomainBoolExpr FixRange(DomainBoolExpr expression, MemberDomainMap memberDomainMap) 55DomainBoolExpr result = expression.Accept<DomainBoolExpr>(visitor); 62internal override DomainBoolExpr VisitTerm(DomainTermExpr expression) 65DomainBoolExpr result = literal.FixRange(expression.Identifier.Range, m_memberDomainMap); 77internal static bool IsFinal(DomainBoolExpr expression) 124foreach (DomainBoolExpr child in expression.Children) 162internal static DomainBoolExpr RemapExtentTreeNodes(DomainBoolExpr expression, MemberDomainMap memberDomainMap, 166DomainBoolExpr result = expression.Accept<DomainBoolExpr>(visitor); 173internal override DomainBoolExpr VisitTerm(DomainTermExpr expression) 199internal static void GetRequiredSlots(DomainBoolExpr expression, MemberProjectionIndex projectedSlotMap, 203expression.Accept<DomainBoolExpr>(visitor); 209internal override DomainBoolExpr VisitTerm(DomainTermExpr expression) 224internal static StringBuilder AsEsql(DomainBoolExpr expression, StringBuilder builder, string blockAlias) 283foreach (DomainBoolExpr child in expression.Children) 310internal static DbExpression AsCqt(DomainBoolExpr expression, DbExpression row) 364foreach (var child in expression.Children) 442internal static StringBuilder AsUserString(DomainBoolExpr expression, StringBuilder builder, string blockAlias) 513foreach (DomainBoolExpr child in expression.Children) 552internal static IEnumerable<DomainTermExpr> GetTerms(DomainBoolExpr expression, bool allowAllOperators) 587foreach (DomainBoolExpr child in expression.Children) 625internal static StringBuilder ToBuilder(DomainBoolExpr expression, StringBuilder builder) 675foreach (DomainBoolExpr child in expression.Children)
System\Data\Mapping\ViewGeneration\Structures\BoolLiteral.cs (6)
21using DomainBoolExpr = System.Data.Common.Utils.Boolean.BoolExpr<System.Data.Common.Utils.Boolean.DomainConstraint<BoolLiteral, Constant>>; 67internal abstract DomainBoolExpr FixRange(Set<Constant> range, MemberDomainMap memberDomainMap); 69internal abstract DomainBoolExpr GetDomainBoolExpression(MemberDomainMap domainMap); 179internal override DomainBoolExpr GetDomainBoolExpression(MemberDomainMap domainMap) 191internal override DomainBoolExpr FixRange(Set<Constant> range, MemberDomainMap memberDomainMap) 195DomainBoolExpr expr = GetDomainBoolExpression(memberDomainMap);
System\Data\Mapping\ViewGeneration\Structures\CellTreeNodeVisitors.cs (1)
19using WrapperBoolExpr = BoolExpr<LeftCellWrapper>;
System\Data\Mapping\ViewGeneration\Structures\MemberRestriction.cs (2)
20using DomainBoolExpr = System.Data.Common.Utils.Boolean.BoolExpr<System.Data.Common.Utils.Boolean.DomainConstraint<BoolLiteral, Constant>>; 107internal override DomainBoolExpr GetDomainBoolExpression(MemberDomainMap domainMap)
System\Data\Mapping\ViewGeneration\Structures\ScalarRestriction.cs (2)
21using DomainBoolExpr = System.Data.Common.Utils.Boolean.BoolExpr<System.Data.Common.Utils.Boolean.DomainConstraint<BoolLiteral, Constant>>; 60internal override DomainBoolExpr FixRange(Set<Constant> range, MemberDomainMap memberDomainMap)
System\Data\Mapping\ViewGeneration\Structures\TypeRestriction.cs (2)
22using DomainBoolExpr = System.Data.Common.Utils.Boolean.BoolExpr<System.Data.Common.Utils.Boolean.DomainConstraint<BoolLiteral, Constant>>; 59internal override DomainBoolExpr FixRange(Set<Constant> range, MemberDomainMap memberDomainMap)
System\Data\Mapping\ViewGeneration\Validation\ConstraintBase.cs (1)
20using WrapperBoolExpr = BoolExpr<LeftCellWrapper>;
System\Data\Mapping\ViewGeneration\ViewGenerator.cs (1)
27using WrapperBoolExpr = BoolExpr<LeftCellWrapper>;