protected override ICode VisitBinary(ExprBinary e)
 {
     switch (e.Op)
     {
     case BinaryOp.And:
     case BinaryOp.Or:
         var leftPerms  = VisitorCreatePerms.V(e.Left);
         var rightPerms = VisitorCreatePerms.V(e.Right);
         foreach (var l in leftPerms)
         {
             foreach (var r in rightPerms)
             {
                 foreach (var t in new[] { Tuple.Create(l, r), Tuple.Create(r, l) })
                 {
                     Expr perm;
                     if (t.Item1 == e.Left && t.Item2 == e.Right)
                     {
                         perm = e;
                     }
                     else
                     {
                         perm = new ExprBinary(e.Ctx, e.Op, e.Type, t.Item1, t.Item2);
                     }
                     this.allPerms.Add((Expr)VisitorReplace.V(this.root, e, perm));
                 }
             }
         }
         break;
     }
     return(e);
 }
        public static IEnumerable <Expr> V(Expr e)
        {
            var v = new VisitorCreatePerms(e);

            v.Visit(e);
            return(v.AllPerms);
        }
 public static IEnumerable<Expr> V(Expr e) {
     var v = new VisitorCreatePerms(e);
     v.Visit(e);
     return v.AllPerms;
 }