Skip to content
Snippets Groups Projects
Commit 2a12f607 authored by loki der quaeler's avatar loki der quaeler Committed by loki der quaeler
Browse files

CLI Trace Explorer, Stage 4 - #393

. A clean model check with the generateSpecTE flag specified created a post-model-check exception and an aborted SpecTE file left on the filesystem; addressed this, as well as verbiage change due to -tool being implicitly set under this flag set condition.

[Feature][Tools]
parent 367a8eb8
No related branches found
No related tags found
No related merge requests found
...@@ -438,6 +438,7 @@ public class TLC { ...@@ -438,6 +438,7 @@ public class TLC {
temporaryMCOutputStream.close(); temporaryMCOutputStream.close();
haveClosedOutputStream = true; haveClosedOutputStream = true;
if (mcOutputConsumer.getError() != null) {
final File tempTLA = File.createTempFile("temp_tlc_tla_", ".tla"); final File tempTLA = File.createTempFile("temp_tlc_tla_", ".tla");
tempTLA.deleteOnExit(); tempTLA.deleteOnExit();
FileUtil.copyFile(specTETLAFile, tempTLA); FileUtil.copyFile(specTETLAFile, tempTLA);
...@@ -459,6 +460,7 @@ public class TLC { ...@@ -459,6 +460,7 @@ public class TLC {
mcOutputConsumer.getSourceDirectory(), mcOutputConsumer.getSourceDirectory(),
extendedModules, mcParserResults.getAllExtendedModules()); extendedModules, mcParserResults.getAllExtendedModules());
monolithCreator.copy(); monolithCreator.copy();
}
waitingOnGenerationCompletion.set(false); waitingOnGenerationCompletion.set(false);
synchronized(this) { synchronized(this) {
...@@ -483,8 +485,7 @@ public class TLC { ...@@ -483,8 +485,7 @@ public class TLC {
MP.printMessage(EC.GENERAL, MP.printMessage(EC.GENERAL,
"Will generate a " + TLAConstants.TraceExplore.ERROR_STATES_MODULE_NAME "Will generate a " + TLAConstants.TraceExplore.ERROR_STATES_MODULE_NAME
+ " file pair if error states are encountered and we are " + " file pair if error states are encountered.");
+ "being run with the '-tool' flag.");
} catch (final IOException ioe) { } catch (final IOException ioe) {
printErrorMsg("Failed to set up piped output consumers; no potential " printErrorMsg("Failed to set up piped output consumers; no potential "
+ TLAConstants.TraceExplore.ERROR_STATES_MODULE_NAME + " will be generated: " + TLAConstants.TraceExplore.ERROR_STATES_MODULE_NAME + " will be generated: "
...@@ -1056,13 +1057,7 @@ public class TLC { ...@@ -1056,13 +1057,7 @@ public class TLC {
result = TLCGlobals.mainChecker.modelCheck(); result = TLCGlobals.mainChecker.modelCheck();
} }
if (mcOutputConsumer != null) { if ((mcOutputConsumer != null) && (mcOutputConsumer.getError() != null)) {
if (mcOutputConsumer.getError() == null) {
MP.printMessage(EC.GENERAL,
"The model check run produced no usable error-state messages, "
+ "so no " + TLAConstants.TraceExplore.ERROR_STATES_MODULE_NAME
+ " was generated.");
} else {
final SpecProcessor sp = tool.getSpecProcessor(); final SpecProcessor sp = tool.getSpecProcessor();
final ModelConfig mc = tool.getModelConfig(); final ModelConfig mc = tool.getModelConfig();
final File sourceDirectory = mcOutputConsumer.getSourceDirectory(); final File sourceDirectory = mcOutputConsumer.getSourceDirectory();
...@@ -1077,7 +1072,6 @@ public class TLC { ...@@ -1077,7 +1072,6 @@ public class TLC {
specTETLAFile = files[0]; specTETLAFile = files[0];
} }
} }
}
return result; return result;
} catch (Throwable e) } catch (Throwable e)
{ {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment