private Sort getPredicateSort(Sort s) { if (cfg.getMultiplicity(s) == Multiplicity.STAR) { scala.collection.Set<Sort> sorts = cfg.cfg.getCellBagSortsOfCell(s); if (sorts.size() != 1) { throw KEMException.compilerError("Expected exactly one cell collection sort for the sort " + s + "; found " + sorts); } return stream(sorts).findFirst().get(); } return s; }