Esempio n. 1
0
 /** Builds a new {@code CellCollection} by removing all the given cell labels. */
 public Term removeAll(Set<CellLabel> removeLabels) {
   Builder builder = builder();
   cells
       .keySet()
       .stream()
       .filter(label -> !removeLabels.contains(label))
       .forEach(label -> builder.addAll(cells.get(label)));
   builder.concatenate(collectionVariables);
   return builder.build();
 }
Esempio n. 2
0
 /**
  * Static helper method which creates canonicalized cell collection according to the given
  * contents.
  */
 public static Term of(
     ListMultimap<CellLabel, Cell> cells,
     Variable frame,
     org.kframework.kore.Sort collectionSort,
     Definition definition) {
   Builder builder = builder(collectionSort, definition);
   builder.putAll(cells);
   if (frame != null) {
     builder.concatenate(frame);
   }
   return builder.build();
 }
Esempio n. 3
0
 public static Term concatenate(GlobalContext global, Term... sets) {
   Builder builder = new Builder(global);
   builder.concatenate(sets);
   return builder.build();
 }