signaturesBuilder.build(), attributesBuilder.build(), JavaConverters.mapAsJavaMapConverter(module.freshFunctionFor()).asJava().entrySet().stream().collect(Collectors.toMap( e -> Sort.of(e.getKey()), e -> e.getValue())),
@Override public K apply(KVariable k) { if (freshVars.contains(k)) { Optional<Sort> s = k.att().getOptional(Sort.class); if (!s.isPresent()) { throw KEMException.compilerError("Fresh constant used without a declared sort.", k); } Option<KLabel> lbl = m.freshFunctionFor().get(s.get()); if (!lbl.isDefined()) { throw KEMException.compilerError("No fresh generator defined for sort " + s, k); } return KApply(lbl.get(), KApply(KLabel("_+Int_"), FRESH, KToken(offsets.get(k).toString(), Sorts.Int()))); } return super.apply(k); } }.apply(term);
for (KLabel freshFunction : iterable(mainModule.freshFunctionFor().values())) { predecessors[mapping.get(label)].add(mapping.get(freshFunction)); dependencies.addEdge(new Object(), label, freshFunction);
if (hook.equals("KREFLECTION.fresh")) { sb.append(conn).append("freshFunction (sort: string) (config: k) (counter: Z.t) : k = match sort with \n"); for (Sort sort : iterable(mainModule.freshFunctionFor().keys())) { sb.append("| \"").append(sort.toString()).append("\" -> ("); KLabel freshFunction = mainModule.freshFunctionFor().apply(sort); encodeStringToFunction(sb, freshFunction); sb.append(" ([Int counter]) config (-1))\n");
for (KLabel freshFunction : iterable(module.freshFunctionFor().values())) { dependencies.addEdge(new Object(), label, freshFunction);