Map<Sort, K> getSplit(KVariable var) { if(split != null) { return split; } if (remainingCells.size() == 0) { split = Collections.emptyMap(); } else if (remainingCells.size() == 1) { Sort s = Iterables.getOnlyElement(remainingCells); if (cfg.getMultiplicity(s) == Multiplicity.STAR) { split = ImmutableMap.of(s, KVariable( var.name(), var.att().add(Sort.class, getPredicateSort(s)))); } else { split = ImmutableMap.of(s, KVariable(var.name(), var.att().add(Sort.class, s).add("cellSort"))); } } else { split = new HashMap<>(); for (Sort cell : remainingCells) { split.put(cell, newDotVariable(var.att().add(Sort.class, cell).add("cellSort"))); } } return split; } }