Skip to content
Snippets Groups Projects
Commit 77f1c696 authored by Markus Alexander Kuppe's avatar Markus Alexander Kuppe
Browse files

Model is stuck in 'modelchecking' state.

Fixes Github issue #143
https://github.com/tlaplus/tlaplus/issues/143

[Bug][Toolbox]
parent 103204a6
Branches
Tags
No related merge requests found
......@@ -255,10 +255,10 @@ public class ParseUnit {
***********************************************************************/
if (ToolIO.getMode() == ToolIO.SYSTEM)
{
ToolIO.out.printf("Parsing file %s\n", absoluteResolvedPath);
ToolIO.out.println(String.format("Parsing file %s\n", absoluteResolvedPath));
} else
{
ToolIO.out.printf("Parsing module %s in file %s\n", nis.getModuleName(), absoluteResolvedPath);
ToolIO.out.println(String.format("Parsing module %s in file %s\n", nis.getModuleName(), absoluteResolvedPath));
}
boolean parseSuccess;
......
......@@ -5,6 +5,7 @@ import java.io.PrintStream;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
import java.util.Locale;
import tla2sany.semantic.SemanticNode;
......@@ -87,7 +88,7 @@ public class ToolIO
* List of semantic nodes which are used by tools
* @see ToolIO#registerSemanticNode()
*/
private static List semanticNodes = new LinkedList();
private static List<SemanticNode> semanticNodes = new LinkedList<>();
/**
* The current sequence of messages is messages[0] ...
......@@ -253,10 +254,10 @@ public class ToolIO
*/
public static void cleanToolObjects(int toolId)
{
Iterator iter = semanticNodes.iterator();
Iterator<SemanticNode> iter = semanticNodes.iterator();
while(iter.hasNext())
{
SemanticNode node = (SemanticNode) iter.next();
SemanticNode node = iter.next();
node.setToolObject(toolId, null);
}
}
......@@ -266,7 +267,7 @@ public class ToolIO
*/
public static void unregisterSemanticNodes()
{
semanticNodes = new LinkedList();
semanticNodes = new LinkedList<SemanticNode>();
}
} // class ToolIO
......@@ -283,6 +284,26 @@ class ToolPrintStream extends PrintStream
ToolIO.err = this;
}
/* (non-Javadoc)
* @see java.io.PrintStream#printf(java.lang.String, java.lang.Object[])
*/
@Override
public PrintStream printf(String format, Object... args) {
// See special logic in println. If super.printf(...) gets used, Toolbox
// functionality breaks.
throw new UnsupportedOperationException("use println instead");
}
/* (non-Javadoc)
* @see java.io.PrintStream#printf(java.util.Locale, java.lang.String, java.lang.Object[])
*/
@Override
public PrintStream printf(Locale l, String format, Object... args) {
// See special logic in println. If super.printf(...) gets used, Toolbox
// functionality breaks.
throw new UnsupportedOperationException("use println instead");
}
/**
* Prints a string in to the ToolIO buffer in a separate line
* @param str String to be printed
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment