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; }
public static boolean isKSort(String sort) { try { KSort.valueOf(sort); } catch (IllegalArgumentException e) { return sort.equals(KSorts.KLIST); } return true; }
@Test public void SortIncrease() { KSort.SortIncreaseInsertion(numbers, 3); System.out.println(Arrays.toString(numbers)); }