public static String getKompiledString(Module mainModule, KLabel topCellInitializer, FileUtil files, boolean heatCoolEquations) { mainModule = new GenerateSortPredicateRules(true).gen(mainModule); mainModule = ModuleTransformer.fromKTransformer(new AddSortInjections(mainModule)::addInjections, "Add sort injections").apply(mainModule); mainModule = ModuleTransformer.fromSentenceTransformer(new MinimizeTermConstruction(mainModule)::resolve, "Minimize term construction").apply(mainModule); ModuleToKORE moduleToKORE = new ModuleToKORE(mainModule, files, topCellInitializer); String kompiledString = moduleToKORE.convert(heatCoolEquations); Properties koreToKLabels = new Properties(); koreToKLabels.putAll(moduleToKORE.getKToKoreLabelMap().inverse()); try { FileOutputStream output = new FileOutputStream(files.resolveKompiled("kore_to_k_labels.properties")); koreToKLabels.store(output, "Properties file containing the mapping from kore to k labels"); } catch (IOException e) { throw KEMException.criticalError("Error while saving kore to K labels map", e); } return kompiledString; }