internal override BoolExpr<DomainConstraint<BoolLiteral, Constant>> FixRange(Set<Constant> range, MemberDomainMap memberDomainMap)
        {
            Debug.Assert(range.Count == 1, "For BoolLiterals, there should be precisely one value - true or false");
            var scalar = (ScalarConstant)range.First();
            var expr = GetDomainBoolExpression(memberDomainMap);

            if ((bool)scalar.Value == false)
            {
                // The range of the variable was "inverted". Return a NOT of
                // the expression
                expr = new NotExpr<DomainConstraint<BoolLiteral, Constant>>(expr);
            }
            return expr;
        }
            public void VisitBooleanNotExpr(bool a, ValueType expected)
            {
                var target = new TypeCheckingVisitor();

                var aExpression = new ConstantExpr(a);
                var expr = new NotExpr(aExpression);

                var actual = target.Visit(expr, scope);

                Assert.AreEqual(expected, actual);
            }
            public void VisitBooleanNotExpr(bool a, string expected)
            {
                var target = new PrintVisitor();

                var aExpression = new ConstantExpr(a);
                var expr = new NotExpr(aExpression);

                var actual = target.Visit(expr, scope);

                Assert.AreEqual(expected, actual);
            }
            public void VisitBooleanNotExpr(bool a, bool expected)
            {
                var target = new EvaluateVisitor();

                var aExpression = new ConstantExpr(a);
                var expr = new NotExpr(aExpression);

                var actual = target.Visit(expr, _scope);

                Assert.AreEqual(expected, actual.ToBoolean());
            }