Exemple #1
0
        internal static TermExpr <DomainConstraint <BoolLiteral, Constant> > MakeTermExpression(
            BoolLiteral literal,
            IEnumerable <Constant> domain,
            IEnumerable <Constant> range)
        {
            Set <Constant> domain1 = new Set <Constant>(domain, Constant.EqualityComparer);
            Set <Constant> range1  = new Set <Constant>(range, Constant.EqualityComparer);

            return(BoolLiteral.MakeTermExpression(literal, domain1, range1));
        }
Exemple #2
0
        internal override BoolExpr <DomainConstraint <BoolLiteral, Constant> > GetDomainBoolExpression(
            MemberDomainMap domainMap)
        {
            IEnumerable <Constant> elements = (IEnumerable <Constant>) new Constant[1]
            {
                (Constant) new ScalarConstant((object)true)
            };

            return((BoolExpr <DomainConstraint <BoolLiteral, Constant> >)BoolLiteral.MakeTermExpression((BoolLiteral)this, new Set <Constant>((IEnumerable <Constant>) new Constant[2]
            {
                (Constant) new ScalarConstant((object)true),
                (Constant) new ScalarConstant((object)false)
            }, Constant.EqualityComparer).MakeReadOnly(), new Set <Constant>(elements, Constant.EqualityComparer).MakeReadOnly()));
        }
 internal override BoolExpr <DomainConstraint <BoolLiteral, Constant> > GetDomainBoolExpression(
     MemberDomainMap domainMap)
 {
     return(domainMap == null ? (BoolExpr <DomainConstraint <BoolLiteral, Constant> >)BoolLiteral.MakeTermExpression((BoolLiteral)this, this.m_domain.AllPossibleValues, this.m_domain.Values) : (BoolExpr <DomainConstraint <BoolLiteral, Constant> >)BoolLiteral.MakeTermExpression((BoolLiteral)this, domainMap.GetDomain(this.m_restrictedMemberSlot.MemberPath), this.m_domain.Values));
 }