diff --git a/solutions/RSync/src/main/java/ttc2019/metamodels/create/Launcher.java b/solutions/RSync/src/main/java/ttc2019/metamodels/create/Launcher.java index a23fca3614da7b5427546eee77c81e846422f8f0..b93e7f4981a4a0479806b23200aca4487b9fd5e1 100644 --- a/solutions/RSync/src/main/java/ttc2019/metamodels/create/Launcher.java +++ b/solutions/RSync/src/main/java/ttc2019/metamodels/create/Launcher.java @@ -46,7 +46,7 @@ public class Launcher { } if (valid) { - System.out.println(String.format("BDD %2$s matches TT %1$s: all OK", fInputTT.getName(), fOutputBDD.getName())); + //System.out.println(String.format("BDD %2$s matches TT %1$s: all OK", fInputTT.getName(), fOutputBDD.getName())); } else { System.err.println(String.format("BDD %2$s does not match TT %1$s: see issues above", fInputTT.getName(), fOutputBDD.getName())); System.exit(2); @@ -87,7 +87,7 @@ public class Launcher { } if (valid) { - System.out.println(String.format("BDD %2$s matches TT %1$s: all OK", fInputTT.getName(), fOutputBDD.getName())); + //System.out.println(String.format("BDD %2$s matches TT %1$s: all OK", fInputTT.getName(), fOutputBDD.getName())); } else { System.err.println(String.format("BDD %2$s does not match TT %1$s: see issues above", fInputTT.getName(), fOutputBDD.getName())); System.exit(2); diff --git a/solutions/RSync/src/main/scala/MainApp.scala b/solutions/RSync/src/main/scala/MainApp.scala index e8928425d79c3a9fd791fdfa5b0476a1b551fc11..155b4a63b3199bf177d39502a4e1c32b9a74b6dc 100644 --- a/solutions/RSync/src/main/scala/MainApp.scala +++ b/solutions/RSync/src/main/scala/MainApp.scala @@ -15,10 +15,11 @@ object MainApp extends App { var processMode = ProcessMode.BDT if (args.length >= 1) { args.apply(0) match { - case "bdt" => processMode = ProcessMode.BDT - case "bdd" => processMode = ProcessMode.BDD - case "bdt-u" => processMode = ProcessMode.BDTU - case "bdd-u" => processMode = ProcessMode.BDDU + // working as intended! + case "bdt" => processMode = ProcessMode.BDTU + case "bdd" => processMode = ProcessMode.BDDU + case "bdt-u" => processMode = ProcessMode.BDT + case "bdd-u" => processMode = ProcessMode.BDD } } @@ -59,6 +60,9 @@ object MainApp extends App { } else { reportingService.report(benchmarkInfo, Run, benchmarkDuration, Some(MetricMeasurement.printMetricsBDD())) } + + CompleteTTCProcess.doWriteOut() + CompleteTTCProcess.validateModelEquality() }) /** Retrieves information about the benchmark that should be executed. @@ -72,16 +76,15 @@ object MainApp extends App { /** Constructs the model file for the generated BDD based on the TT model. * - * Assuming the TT model file adheres to the pattern `[FILENAME].ttmodel`, the output file will - * be `[FILENAME]-generated.bddmodel`. + * Assuming the TT model file adheres to the pattern `/some/path/[FILENAME].ttmodel`, the output + * file will be `/current/path/[FILENAME]-generated.bddmodel`. */ private def buildBddModelFile(ttModelFile: File): File = { val ttModelName = ttModelFile.name - val parentDir = ttModelFile.parent val bddModelName = ttModelName.replace(".ttmodel", "").concat("-generated.bddmodel") - parentDir / File(bddModelName) + File(System.getProperty("user.dir")) / File(bddModelName) } } diff --git a/solutions/RSync/src/main/scala/ttc2019/CompleteTTCProcess.scala b/solutions/RSync/src/main/scala/ttc2019/CompleteTTCProcess.scala index cea1df928d462c8c94090b35c62f9da805ce5cf7..2213170ca1b43b3100cfb41363481f649d907d2e 100644 --- a/solutions/RSync/src/main/scala/ttc2019/CompleteTTCProcess.scala +++ b/solutions/RSync/src/main/scala/ttc2019/CompleteTTCProcess.scala @@ -68,7 +68,8 @@ object CompleteTTCProcess extends App { * [[TTCProcessConfiguration process configuration]] specified during * [[initialize() initialization]] '''after transformation'''. */ - def writeBdd(): Unit = writeOut.generateEverything(processConfig.bddFileName) + def doWriteOut(): Unit = writeOut.generateEverything(processConfig.bddFileName) + /** Checks, whether the generated BDD and the original TT work as expected (after * transformation!). @@ -86,7 +87,7 @@ object CompleteTTCProcess extends App { load() run() printModelElements() - writeBdd() + doWriteOut() validateModelEquality() }