Commit c04a7605 authored by Nils Kaminski's avatar Nils Kaminski
Browse files

Remove System outs

parent 335509af
......@@ -97,8 +97,7 @@ public class ArmadilloBackend implements MathBackend {
result += "*" + matrixName;
}*/
System.out.println(mathExpressionSymbol.getTextualRepresentation());
Log.error("Break down power of into smaller multiplications, this is not fully supported by this backend");
Log.error(mathExpressionSymbol.getTextualRepresentation()+System.lineSeparator()+"Break down power of into smaller multiplications, this is not fully supported by this backend");
return null;
}
......
......@@ -317,7 +317,8 @@ public final class TestsGeneratorCPP {
private static void processIncomingPort(ComponentCheckViewModel vm, ASTStreamValue sv, String portName) {
ASTStreamValue2InputPortValue converter = new ASTStreamValue2InputPortValue();
sv.accept(converter);
System.out.println("Processing: " + portName);
// System.out.println("Processing: " + portName);
Log.debug("Processing: " + portName, "TestGeneratorCPP.processIncomingPort");
if (converter.getResult() != null) {
vm.getInputPortName2Value().put(portName, converter.getResult());
}
......@@ -334,7 +335,7 @@ public final class TestsGeneratorCPP {
private static void processIncomingPortArray(ComponentCheckViewModel vm, ASTStreamArrayValues sv, String portName) {
ASTStreamValue2InputPortValue converter = new ASTStreamValue2InputPortValue();
sv.accept(converter);
System.out.println("Processing: " + portName);
Log.debug("Processing: " + portName, "TestGeneratorCPP.processIncomingPortArray");
if (converter.getResult() != null) {
vm.getInputPortName2Value().put(portName, converter.getResult());
}
......@@ -446,7 +447,7 @@ public final class TestsGeneratorCPP {
//TODO valuepair conversion
builder.append("NOT HANDLED VALUEPAIROPT!!!");
}
System.out.println("Result: " + builder.toString());
Log.debug("Result: " + builder.toString(), "TestGeneratorCPP");
result = RangeOutputPortCheck.from(builder.toString(), builder.toString(),true);
}
handled = true;
......@@ -513,7 +514,7 @@ public final class TestsGeneratorCPP {
//TODO valuepair conversion
result += "NOT HANDLED VALUEPAIROPT!!!";
}
System.out.println("Result: " + builder.toString());
Log.debug("Result: " + builder.toString(), "TestGeneratorCPP.vists(ASTStreamArrayValues)");
result += builder.toString();
}
handled = true;
......
......@@ -102,7 +102,8 @@ public class MathSizeCommand extends MathCommand {
} else if (elementAccess.equals("2")) {
accessPart = "n_cols";
} else {
System.out.println(elementAccess);
// System.out.println(elementAccess);
Log.debug(elementAccess, "MathSizeCommand.getAccessPart");
Log.error("Size error");
}
return accessPart;
......
......@@ -29,6 +29,7 @@ import de.monticore.lang.monticar.generator.order.simulator.AbstractSymtab;
import de.monticore.lang.tagging._symboltable.TagSymbol;
import de.monticore.lang.tagging._symboltable.TaggingResolver;
import de.monticore.prettyprint.IndentPrinter;
import de.se_rwth.commons.logging.Log;
import java.io.BufferedReader;
import java.io.File;
......@@ -54,7 +55,8 @@ public class Slist extends AbstractSymtab {
ip.println("slist Distronic");
ip.println("slist BrakeForceAssistant");
ip.unindent();
System.out.println(ip.getContent());
Log.debug(ip.getContent(), "Slist.main");
// System.out.println(ip.getContent());
} else {
//creates a fileReader for the *.arc file
FileReader fr = new FileReader(args[0] + ".arc");
......@@ -79,7 +81,8 @@ public class Slist extends AbstractSymtab {
EMAComponentInstanceSymbol inst = symTab.<EMAComponentInstanceSymbol>resolve(
Names.getExpandedComponentInstanceSymbolName(componentName),
EMAComponentInstanceSymbol.KIND).orElse(null);
System.out.println(execute(symTab, inst));
Log.debug(execute(symTab, inst), "Slist.main");
// System.out.println(execute(symTab, inst));
}
}
......
......@@ -44,7 +44,8 @@ public class StreamTestExecution {
execName = "./compileCPPTests.sh";
} else {
execName = "generic_platform";
System.out.println("ERROR: Unsupported platform!!!");
Log.error("Unsupported platform!!!");
// System.out.println("ERROR: Unsupported platform!!!");
}
//Check if g++ is available
......@@ -60,6 +61,7 @@ public class StreamTestExecution {
private static void execWithExitCheck(Process p, String errorPrefix) throws IOException {
while (p.isAlive()) {
//if (Log.isInfoEnabled(""))
{
......@@ -103,7 +105,8 @@ public class StreamTestExecution {
execName = "./executeStreamTest.sh";
} else {
execName = "generic_platform";
System.out.println("ERROR: Unsupported platform!!!");
Log.error("ERROR: Unsupported platform!!!");
// System.out.println("ERROR: Unsupported platform!!!");
}
Process p = Runtime.
getRuntime().
......
......@@ -44,18 +44,19 @@ public class StreamTestGenerator {
int intMin, intMax;
public void createStreamTest(EMAComponentInstanceSymbol expandedComponentInstanceSymbol, int amountOfValues, String testNamePostFix) {
//TODO remove System.out.printlns
currentGeneratedStreamTest = new StreamTest();
Collection<EMAPortInstanceSymbol> inPorts = expandedComponentInstanceSymbol.getIncomingPortInstances();
currentGeneratedStreamTest.setComponentName(Names.FirstUpperCase(expandedComponentInstanceSymbol.getName()));
currentGeneratedStreamTest.setPackageName(expandedComponentInstanceSymbol.getPackageName());
currentGeneratedStreamTest.setName(currentGeneratedStreamTest.getComponentName() + "Test" + testNamePostFix);
System.out.println("Generating StreamTest for component " + currentGeneratedStreamTest.getComponentName());
Log.debug("Generating StreamTest for component " + currentGeneratedStreamTest.getComponentName(), "StreamTestGenerator.createStreamTest");
for (EMAPortInstanceSymbol p : inPorts) {
if (p.getAstNode().isPresent()) {
System.out.println(p.getAstNode().get().getClass().getName());
// System.out.println(p.getAstNode().get().getClass().getName());
ASTPort astPort = (ASTPort) p.getAstNode().get();
System.out.println(astPort.getName());
// System.out.println(astPort.getName());
StreamTestPort streamTestPort = new StreamTestPort();
streamTestPort.setName(p.getName());
doubleMin = -10000000;//Maybe these values should be configurable as parameters later?
......@@ -72,8 +73,8 @@ public class StreamTestGenerator {
} else if (astPort.getType() instanceof ASTCommonMatrixType) {
type = 1;
ASTCommonMatrixType astCommonMatrixType = (ASTCommonMatrixType) astPort.getType();
System.out.println(astCommonMatrixType.getDimension().getDimensionList().get(0).getClass().getName());
System.out.println(astCommonMatrixType.getDimension().getDimensionList().get(1).getClass().getName());
// System.out.println(astCommonMatrixType.getDimension().getDimensionList().get(0).getClass().getName());
// System.out.println(astCommonMatrixType.getDimension().getDimensionList().get(1).getClass().getName());
//System.out.println(astCommonMatrixType.getDimension().getDimensionList().get(0).toString());
//System.out.println(astCommonMatrixType.getDimension().getDimensionList().get(1).toString());
ASTNode node1 = astCommonMatrixType.getDimension().getDimensionList().get(0);
......@@ -89,7 +90,7 @@ public class StreamTestGenerator {
//sizeX = astCommonMatrixType.getDimension().getDimensionList().get(0).getClass().getName().toString();
//sizeY = astCommonMatrixType.getDimension().getDimensionList().get(1).toString();
}
System.out.println("AmountOfValues:" + amountOfValues);
// System.out.println("AmountOfValues:" + amountOfValues);
for (int i = 0; i < amountOfValues; ++i) {
StreamTestValue streamTestValue;
if (type == 0) {//singular value
......@@ -121,7 +122,7 @@ public class StreamTestGenerator {
//ConstantPorts do not have an ASTNode
//Log.debug(p.getName(), "PortSymbol has no ASTNode:");
}
System.out.println();
// System.out.println();
}
currentGeneratedStreamTest.fixPortArrays();
}
......@@ -141,11 +142,11 @@ public class StreamTestGenerator {
doubleMin = astElementType.getRange().getStartValue().doubleValue();
intMin = astElementType.getRange().getStartValue().intValue();
}
System.out.println("Min: " + doubleMin);
// System.out.println("Min: " + doubleMin);
if (astElementType.getRange().getMax().getNumber().isPresent()) {
doubleMax = astElementType.getRange().getEndValue().doubleValue();
intMax = astElementType.getRange().getEndValue().intValue();
System.out.println("Max: " + doubleMax);
// System.out.println("Max: " + doubleMax);
}
}
}
......@@ -176,11 +177,11 @@ public class StreamTestGenerator {
public Double[][] getRandomDoubleMatrix(int sizeX, int sizeY, double min, double max) {
Double[][] matrix = new Double[sizeX][sizeY];
System.out.println("Started Generation of random " + sizeX + "x" + sizeY + " matrix");
// System.out.println("Started Generation of random " + sizeX + "x" + sizeY + " matrix");
for (int i = 0; i < sizeX; ++i)
for (int j = 0; j < sizeY; ++j)
matrix[i][j] = getRandomDoubleBetween(min, max);
System.out.println("Generation of this matrix is done");
// System.out.println("Generation of this matrix is done");
return matrix;
}
......
......@@ -95,7 +95,7 @@ public class StreamTestModifier {
File curDir = new File(OSHelper.getDirPrefix() + "/target/generated-sources-cpp/streamtest/exec/");
File curDir2 = new File(OSHelper.getDirPrefix() + "/target/generated-sources-cpp/streamtest/");
System.out.println("Directories:");
// System.out.println("Directories:");
getAllFiles(curDir);
getAllFiles(curDir2);
}
......@@ -116,7 +116,7 @@ public class StreamTestModifier {
public static void getAllFiles(File curDir) {
File[] filesList = curDir.listFiles();
for (File f : filesList) {
System.out.println(f.getName());
// System.out.println(f.getName());
}
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment