private boolean isCellFragmentTest(KApply app) { if (app.klist().size() != 1) return false; K argument = app.klist().items().get(0); if (!(argument instanceof KVariable)) return false; VarInfo info = variables.get((KVariable)argument); if (info == null) return false; KLabel expectedPredicate = KLabel("is"+cfg.getCellSort(info.parentCell).toString()+"Fragment"); return app.klabel().equals(expectedPredicate); }
if(children.size() == 1 && children.get(0) == item) { final KLabel label = ((KApply) item).klabel(); Sort s = cfg.getCellSort(label); if (s == null) { s = cfg.getCellCollectionCell(label);
BiFunction<List<K>, Set<Sort>, Boolean> useCells = (cells, used) -> { for (K k : cells) { Sort sort = cfg.getCellSort(k); if (cfg.getMultiplicity(sort) != ConfigurationInfo.Multiplicity.STAR) { if (used.contains(sort)) { Sort label = cfg.getCellSort(children.get(0)); if (cfg.getMultiplicity(label) == ConfigurationInfo.Multiplicity.STAR) { forcedSeparate = false; } else { for (K child : children) { Sort sort = cfg.getCellSort(child); if (!sort.equals(label)) { forcedSeparate = false; if (!(streamSideCells(rew.left()).anyMatch(l -> cfg.getCellSort(l).equals(label)) || streamSideCells(rew.left()).anyMatch(l -> cfg.getCellSort(l).equals(label)))) { forcedSeparate = false; break;
KApply kapp = (KApply) item; if (cfg.cfg.isCellLabel(kapp.klabel())) { Sort sort = cfg.getCellSort(kapp.klabel()); if (!subcellSorts.contains(sort)) { throw new IllegalArgumentException("No such sub-cell " + sort + " in the cell " + cellLabel);
if (item instanceof KApply) { KApply kApply = (KApply) item; Sort s = cfg.getCellSort(kApply.klabel()); if (s != null && cfg.getMultiplicity(s) != Multiplicity.STAR) { remainingCells.remove(s);