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