Commit 48a8523a authored by Sascha Niklas Schneiders's avatar Sascha Niklas Schneiders
Browse files

fixed generator halt if optimizations are only partially supported

parent 4b9e7856
Pipeline #56124 passed with stage
in 2 minutes and 20 seconds
......@@ -132,7 +132,7 @@ public class Variable {
setVariableType(TypeConverter.getVariableTypeForMontiCarTypeName(this.type.getTypeNameMontiCar(), this, type).get());
} else {
Log.info(type.getClass().getName(), "ASTType:");
Log.error("Case not handled!");
Log.debug("setTypeNameMontiCar","Case not handled");
}
}
......
......@@ -61,31 +61,31 @@ public class LinalgBackend implements MathBackend {
@Override
public String getPowerOfString(MathArithmeticExpressionSymbol mathExpressionSymbol, String valueListString) {
Log.error("Not supported yet");
Log.debug("Not supported yet","Not Implemented");
return null;
}
@Override
public String getPowerOfString(MathArithmeticExpressionSymbol mathExpressionSymbol, String valueListString, String seperator) {
Log.error("Not supported yet");
Log.debug("Not supported yet","Not Implemented");
return null;
}
@Override
public String getPowerOfString(MathMatrixArithmeticExpressionSymbol mathExpressionSymbol, String valueListString) {
Log.error("Not supported yet");
Log.debug("Not supported yet","Not Implemented");
return null;
}
@Override
public String getPowerOfEEString(MathMatrixArithmeticExpressionSymbol mathExpressionSymbol, String valueListString) {
Log.error("Not supported yet");
Log.debug("Not supported yet","Not Implemented");
return null;
}
@Override
public String getDivisionEEString(MathMatrixArithmeticExpressionSymbol mathExpressionSymbol, String valueListString) {
Log.error("Not supported yet");
Log.debug("Not supported yet","Not Implemented");
return null;
}
......
......@@ -66,7 +66,7 @@ public class MathFunctionFixer {
if (notHandled) {
Log.info(mathExpressionSymbol.getClass().getName(), "Symbol name:");
Log.info(mathExpressionSymbol.getTextualRepresentation(), "Symbol:");
Log.error("Case not handled!");
Log.debug("Not supported yet","Case not handled");
}
}
......
......@@ -159,7 +159,8 @@ public class OctaveHelper {
String typeName = variable.getVariableType().getTypeNameTargetLanguage();
return typeName.substring(0, 1).toUpperCase() + typeName.substring(1);
} else {
Log.error("OctaveHelper Case not handled!");
Log.debug("Not supported yet","Case not handled OctaveHelper");
}
return null;
}
......@@ -172,7 +173,7 @@ public class OctaveHelper {
if (mathExpressionSymbol.isMatrixNameExpression()) {
return getOctaveFunctionTypeName((MathMatrixNameExpressionSymbol) mathExpressionSymbol);
} else {
Log.error("Case not handeld!");
Log.debug("Not supported yet","Case not handled OctaveHelper");
return null;
}
}
......@@ -199,7 +200,7 @@ public class OctaveHelper {
} else {
Log.info(mathExpressionSymbol.getTextualRepresentation(), "Symbol:");
Log.error("FunctionTypeName not handled!");
Log.debug("FunctionTypeName not handled!", "Case not handled");
}
return result;
......
......@@ -57,7 +57,8 @@ public class ExecuteMethodGenerator {
result = ExecuteMethodGeneratorHandler.generateExecuteCode((MathParenthesisExpressionSymbol) mathExpressionSymbol, includeStrings);
} else {
Log.info(mathExpressionSymbol.getTextualRepresentation(), "Symbol:");
Log.error("Case not handled!");
Log.debug("ExecuteMethodGenerator", "Case not handled!");
}
return result;
}
......
......@@ -162,12 +162,12 @@ public class ExecuteMethodGeneratorMatrixExpressionHandler {
}
private static String tryFix(String result, MathMatrixAccessOperatorSymbol mathMatrixAccessOperatorSymbol) {
result=fixDoubleOffset(result,mathMatrixAccessOperatorSymbol,"]");
result=fixDoubleOffset(result,mathMatrixAccessOperatorSymbol,")");
result = fixDoubleOffset(result, mathMatrixAccessOperatorSymbol, "]");
result = fixDoubleOffset(result, mathMatrixAccessOperatorSymbol, ")");
return result;
}
private static String fixDoubleOffset(String result,MathMatrixAccessOperatorSymbol mathMatrixAccessOperatorSymbol,String endPart){
private static String fixDoubleOffset(String result, MathMatrixAccessOperatorSymbol mathMatrixAccessOperatorSymbol, String endPart) {
String fixingTestString = (result.substring(0, result.length() - 3) + endPart);
Log.info("Checking Possible Fixing Test String: " + fixingTestString, "MathMatrixAccessOperatorSymbol");
if (fixingTestString.equals(mathMatrixAccessOperatorSymbol.getTextualRepresentation())) {
......@@ -227,7 +227,7 @@ public class ExecuteMethodGeneratorMatrixExpressionHandler {
} else {
Log.info(mathMatrixExpressionSymbol.getTextualRepresentation(), "Symbol:");
Log.info(mathMatrixExpressionSymbol.getClass().getName(), "Symbol Name:");
Log.error("0xMAMAEXSY Case not handled!");
Log.debug("0xMAMAEXSY", "Case not handled");
}
return result;
}
......
......@@ -44,7 +44,7 @@ public class MathMatrixMultiplicationOrder implements MathOptimizationRule {
optimize((MathForLoopExpressionSymbol) mathExpressionSymbol, precedingExpressions);
} else {
Log.info(mathExpressionSymbol.getClass().getName(), "Symbol name:");
Log.error("Optimizer Case not handled!");
Log.debug("Optimizer case not handled", "Case not handled!");
}
}
......@@ -94,7 +94,7 @@ public class MathMatrixMultiplicationOrder implements MathOptimizationRule {
optimize((MathMatrixNameExpressionSymbol) matrixExpressionSymbol, precedingExpressions);
} else {
Log.info(matrixExpressionSymbol.getClass().getName(), "Symbol name:");
Log.error("Optimizer Case not handled!");
Log.debug("Optimizer case not handled", "Case not handled!");
}
}
......
......@@ -42,7 +42,8 @@ public class MathMultiplicationAddition implements MathOptimizationRule {
optimize((MathForLoopExpressionSymbol) mathExpressionSymbol, precedingExpressions);
} else {
Log.info(mathExpressionSymbol.getClass().getName(), "Symbol name:");
Log.error("Optimizer Case not handled!");
Log.debug("Optimizer case not handled", "Case not handled!");
}
}
......@@ -86,8 +87,7 @@ public class MathMultiplicationAddition implements MathOptimizationRule {
optimize((MathMatrixNameExpressionSymbol) matrixExpressionSymbol, precedingExpressions);
} else {
Log.info(matrixExpressionSymbol.getClass().getName(), "Symbol name:");
Log.error("Optimizer Case not handled!");
Log.debug("Optimizer case not handled", "Case not handled!");
}
}
......@@ -107,7 +107,7 @@ public class MathMultiplicationAddition implements MathOptimizationRule {
public void optimizeMatrixAddition(MathMatrixArithmeticExpressionSymbol matrixArithmeticExpressionSymbol, List<MathExpressionSymbol> precedingExpressions) {
if (MathOptimizer.isArithmeticExpression(matrixArithmeticExpressionSymbol.getLeftExpression().getRealMathExpressionSymbol(), "*", precedingExpressions) && MathOptimizer.isArithmeticExpression(matrixArithmeticExpressionSymbol.getRightExpression().getRealMathExpressionSymbol(), "*", precedingExpressions)) {
Log.error("b");
Log.debug("Optimizer case not handled", "Case not handled!");
}
}
......
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