Пример #1
0
 public static Term defaultTerm(Term v, org.kframework.kil.loader.Context context) {
   String sort = v.getSort();
   KSort ksort = KSort.getKSort(sort).mainSort();
   if (ksort.isDefaultable()) return new Empty(ksort.toString());
   GlobalSettings.kem.register(
       new KException(
           ExceptionType.WARNING,
           KExceptionGroup.COMPILER,
           "Don't know the default value for term " + v.toString() + ". Assuming .K",
           v.getFilename(),
           v.getLocation()));
   return KSequence.EMPTY;
 }
Пример #2
0
 public static boolean isKSort(String sort) {
   try {
     KSort.valueOf(sort);
   } catch (IllegalArgumentException e) {
     return sort.equals(KSorts.KLIST);
   }
   return true;
 }
Пример #3
0
  @Test
  public void SortIncrease() {

    KSort.SortIncreaseInsertion(numbers, 3);
    System.out.println(Arrays.toString(numbers));
  }