Package kodkod.instance

Examples of kodkod.instance.TupleSet.arity()


              PrimSig sub = (PrimSig)b1;
              Field f1 = s.getFields().get(0), f2 = s.getFields().get(1);
              if (sub.isEnum==null || !list.args.get(0).isSame(sub) || !list.args.get(1).isSame(s.join(f1)) || !list.args.get(2).isSame(s.join(f2))) break;
              // Now, we've confirmed it is a total ordering on an enum. Let's pre-bind the relations
              TupleSet me = sol.query(true, sol.a2k(s), false), firstTS = factory.noneOf(2), lastTS = null, nextTS = factory.noneOf(3);
              if (me.size()!=1 || me.arity()!=1) break;
              int n = sub.children().size();
              for(PrimSig c: sub.children()) {
                 TupleSet TS = sol.query(true, sol.a2k(c), false);
                 if (TS.size()!=1 || TS.arity()!=1) { firstTS=factory.noneOf(2); nextTS=factory.noneOf(3); break; }
                 if (lastTS==null) { firstTS=me.product(TS); lastTS=TS; continue; }
View Full Code Here


              TupleSet me = sol.query(true, sol.a2k(s), false), firstTS = factory.noneOf(2), lastTS = null, nextTS = factory.noneOf(3);
              if (me.size()!=1 || me.arity()!=1) break;
              int n = sub.children().size();
              for(PrimSig c: sub.children()) {
                 TupleSet TS = sol.query(true, sol.a2k(c), false);
                 if (TS.size()!=1 || TS.arity()!=1) { firstTS=factory.noneOf(2); nextTS=factory.noneOf(3); break; }
                 if (lastTS==null) { firstTS=me.product(TS); lastTS=TS; continue; }
                 nextTS.addAll(me.product(lastTS).product(TS));
                 lastTS=TS;
              }
              if (firstTS.size()!=(n>0 ? 1 : 0) || nextTS.size() != n-1) break;
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.