public bool TransformLiteralReference(LiteralReference expr)
        {
            foreach (Rule rule in _rules)
            {
                bool flag = rule.pred(expr.ReferencedObject);
                switch (rule.mode)
                {
                case ERuleMode.ContinueIfFalse:
                    if (flag)
                    {
                        return(true);
                    }
                    break;

                case ERuleMode.ContinueIfTrue:
                    if (!flag)
                    {
                        return(false);
                    }
                    break;

                default:
                    return(flag);
                }
            }
            throw new InvalidOperationException("No rule to determine whether " + expr.ToString() + " is const");
        }