Package kodkod.instance

Examples of kodkod.instance.TupleFactory.tuple()


        removePartition(domain.min());
       
        final TupleFactory f = bounds.universe().factory();
       
        if (aggressive) {
          bounds.boundExactly(first, f.setOf(f.tuple(1, domain.min())));
          bounds.boundExactly(last, f.setOf(f.tuple(1, domain.max())));
          bounds.boundExactly(ordered, bounds.upperBound(total.ordered()));
          bounds.boundExactly(relation, f.setOf(2, ordering));
         
          return Formula.TRUE;
View Full Code Here


       
        final TupleFactory f = bounds.universe().factory();
       
        if (aggressive) {
          bounds.boundExactly(first, f.setOf(f.tuple(1, domain.min())));
          bounds.boundExactly(last, f.setOf(f.tuple(1, domain.max())));
          bounds.boundExactly(ordered, bounds.upperBound(total.ordered()));
          bounds.boundExactly(relation, f.setOf(2, ordering));
         
          return Formula.TRUE;
         
View Full Code Here

        } else {
          final Relation firstConst = Relation.unary("SYM_BREAK_CONST_"+first.name());
          final Relation lastConst = Relation.unary("SYM_BREAK_CONST_"+last.name());
          final Relation ordConst = Relation.unary("SYM_BREAK_CONST_"+ordered.name());
          final Relation relConst = Relation.binary("SYM_BREAK_CONST_"+relation.name());
          bounds.boundExactly(firstConst, f.setOf(f.tuple(1, domain.min())));
          bounds.boundExactly(lastConst, f.setOf(f.tuple(1, domain.max())));
          bounds.boundExactly(ordConst, bounds.upperBound(total.ordered()));
          bounds.boundExactly(relConst, f.setOf(2, ordering));
         
          return Formula.and(first.eq(firstConst), last.eq(lastConst), ordered.eq(ordConst), relation.eq(relConst));
View Full Code Here

          final Relation firstConst = Relation.unary("SYM_BREAK_CONST_"+first.name());
          final Relation lastConst = Relation.unary("SYM_BREAK_CONST_"+last.name());
          final Relation ordConst = Relation.unary("SYM_BREAK_CONST_"+ordered.name());
          final Relation relConst = Relation.binary("SYM_BREAK_CONST_"+relation.name());
          bounds.boundExactly(firstConst, f.setOf(f.tuple(1, domain.min())));
          bounds.boundExactly(lastConst, f.setOf(f.tuple(1, domain.max())));
          bounds.boundExactly(ordConst, bounds.upperBound(total.ordered()));
          bounds.boundExactly(relConst, f.setOf(2, ordering));
         
          return Formula.and(first.eq(firstConst), last.eq(lastConst), ordered.eq(ordConst), relation.eq(relConst));
//          return first.eq(firstConst).and(last.eq(lastConst)).and( ordered.eq(ordConst)).and( relation.eq(relConst));
View Full Code Here

       // Form the list
       list.add(head);
       while(true) {
          // Find head.next
          Tuple headnext = null;
          for(Tuple x: b) if (x.atom(0)==head.atom(0)) { headnext = f.tuple(x.atom(1)); break; }
          // If we've reached the end of the chain, and indeed we've formed exactly n elements (and all are in u), we're done
          if (headnext==null) return list.size()==n ? list : null;
          // If we've accumulated more than n elements, or if we reached an element not in u, then we declare failure
          if (list.size()==n || !u.contains(headnext)) return null;
          // Move on to the next step
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.