Esempio n. 1
0
 // ***** VDMTOOLS START Name=inv_BoardLine KEEP=NO
 public Boolean inv_BoardLine() {
   Boolean rexpr_2 = null;
   Set var2_5 = new HashSet();
   var2_5 = new HashSet();
   for (int count_8 = 1; count_8 <= 9; count_8++) var2_5.add(new Integer(count_8));
   if ((rexpr_2 = Boolean.valueOf(UTIL.Contains(var2_5, y))).booleanValue()) {
     Boolean var2_11 = null;
     Boolean var1_12 = null;
     if ((var1_12 = Boolean.valueOf(new HashSet(line.keySet()).size() == 9)).booleanValue()) {
       Set var2_21 = new HashSet();
       var2_21 = new HashSet();
       for (int count_24 = 1; count_24 <= 9; count_24++) var2_21.add(new Integer(count_24));
       var1_12 = Boolean.valueOf(UTIL.equals(new HashSet(line.keySet()), var2_21));
     }
     if ((var2_11 = var1_12).booleanValue()) {
       Boolean var2_27 = null;
       boolean tmpQuant_29 = true;
       {
         Set e1_set_32 = new HashSet(line.values());
         Cell c = null;
         Set tmpSet_40 = new HashSet(e1_set_32);
         for (Iterator enm_39 = tmpSet_40.iterator(); enm_39.hasNext() && tmpQuant_29; ) {
           Cell elem_38 = (Cell) enm_39.next();
           /* c */
           c = elem_38;
           if (!((c.y).intValue() == y.intValue())) tmpQuant_29 = false;
         }
       }
       if ((var2_27 = Boolean.valueOf(tmpQuant_29)).booleanValue()) {
         boolean tmpQuant_43 = false;
         {
           Set e1_set_46 = new HashSet(line.values());
           Cell c1 = null;
           Cell c2 = null;
           Set e_set_60 = e1_set_46;
           Set tmpSet_63 = new HashSet(e_set_60);
           for (Iterator enm_62 = tmpSet_63.iterator(); enm_62.hasNext() && !tmpQuant_43; ) {
             Cell elem_61 = (Cell) enm_62.next();
             /* c2 */
             c2 = elem_61;
             Set tmpSet_59 = new HashSet(e1_set_46);
             for (Iterator enm_58 = tmpSet_59.iterator(); enm_58.hasNext() && !tmpQuant_43; ) {
               Cell elem_57 = (Cell) enm_58.next();
               /* c1 */
               c1 = elem_57;
               Boolean pred_47 = null;
               if ((pred_47 = Boolean.valueOf(!UTIL.equals(c1, c2))).booleanValue())
                 pred_47 = Boolean.valueOf((c1.x).intValue() == (c2.x).intValue());
               if (pred_47.booleanValue()) tmpQuant_43 = true;
             }
           }
         }
         var2_27 = Boolean.valueOf(!tmpQuant_43);
       }
       var2_11 = var2_27;
     }
     rexpr_2 = var2_11;
   }
   return rexpr_2;
 }
Esempio n. 2
0
 // ***** VDMTOOLS START Name=pre_getSeqCellsAux#1|Number KEEP=NO
 private Boolean pre_getSeqCellsAux(final Number x) throws CGException {
   Set var2_4 = new HashSet();
   var2_4 = new HashSet();
   for (int count_7 = 1; count_7 <= 9; count_7++) var2_4.add(new Integer(count_7));
   return Boolean.valueOf(UTIL.Contains(var2_4, x));
 }