diff --git a/.classpath b/.classpath
index 822c05c8..46d57734 100755
--- a/.classpath
+++ b/.classpath
@@ -4,7 +4,6 @@
-
diff --git a/bin/.gitignore b/bin/.gitignore
index 8c252d62..f1735d3a 100644
--- a/bin/.gitignore
+++ b/bin/.gitignore
@@ -1,4 +1,3 @@
/de/
/mycompiler/
-/syntaxTree/
/plugindevelopment/
diff --git a/bin/log4j.xml b/bin/log4j.xml
index 41480fbd..64e7c5db 100755
--- a/bin/log4j.xml
+++ b/bin/log4j.xml
@@ -3,10 +3,10 @@
-
+
-
+
diff --git a/bin/log4jTesting.xml b/bin/log4jTesting.xml
index 642079a3..dc30c245 100755
--- a/bin/log4jTesting.xml
+++ b/bin/log4jTesting.xml
@@ -3,10 +3,10 @@
-
+
-
+
diff --git a/log4j.xml b/log4j.xml
index 41480fbd..64e7c5db 100755
--- a/log4j.xml
+++ b/log4j.xml
@@ -3,10 +3,10 @@
-
+
-
+
diff --git a/src/de/dhbwstuttgart/bytecode/Attribute.java b/src/de/dhbwstuttgart/bytecode/Attribute.java
index 57998779..a7e33972 100755
--- a/src/de/dhbwstuttgart/bytecode/Attribute.java
+++ b/src/de/dhbwstuttgart/bytecode/Attribute.java
@@ -7,9 +7,10 @@ import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;
-import org.apache.log4j.Logger;
// ino.end
+
+import de.dhbwstuttgart.logger.Logger;
import de.dhbwstuttgart.myexception.JVMCodeException;
// ino.class.Attribute.21446.declaration
diff --git a/src/de/dhbwstuttgart/bytecode/CPInfo.java b/src/de/dhbwstuttgart/bytecode/CPInfo.java
index a3591b64..425011a2 100755
--- a/src/de/dhbwstuttgart/bytecode/CPInfo.java
+++ b/src/de/dhbwstuttgart/bytecode/CPInfo.java
@@ -7,7 +7,8 @@ import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;
-import org.apache.log4j.Logger;
+import de.dhbwstuttgart.logger.Logger;
+
// ino.end
// ino.class.CPInfo.22026.declaration
diff --git a/src/de/dhbwstuttgart/bytecode/ClassFile.java b/src/de/dhbwstuttgart/bytecode/ClassFile.java
index ba7de8e5..d5165110 100755
--- a/src/de/dhbwstuttgart/bytecode/ClassFile.java
+++ b/src/de/dhbwstuttgart/bytecode/ClassFile.java
@@ -12,8 +12,6 @@ import java.io.IOException;
import java.io.OutputStream;
import java.lang.reflect.Array;
import java.util.Vector;
-
-import org.apache.log4j.Logger;
// ino.end
@@ -23,7 +21,9 @@ import org.apache.log4j.Logger;
+
import de.dhbwstuttgart.core.MyCompiler;
+import de.dhbwstuttgart.logger.Logger;
import de.dhbwstuttgart.myexception.JVMCodeException;
import de.dhbwstuttgart.syntaxtree.Interface;
import de.dhbwstuttgart.syntaxtree.ParameterList;
diff --git a/src/de/dhbwstuttgart/bytecode/CodeAttribute.java b/src/de/dhbwstuttgart/bytecode/CodeAttribute.java
index d8a6dfdf..6cff7bc5 100755
--- a/src/de/dhbwstuttgart/bytecode/CodeAttribute.java
+++ b/src/de/dhbwstuttgart/bytecode/CodeAttribute.java
@@ -16,7 +16,6 @@ import java.util.Vector;
import de.dhbwstuttgart.myexception.JVMCodeException;
import de.dhbwstuttgart.syntaxtree.type.Type;
-import sun.reflect.generics.reflectiveObjects.NotImplementedException;
// ino.class.CodeAttribute.21681.declaration
public class CodeAttribute extends Attribute
diff --git a/src/de/dhbwstuttgart/bytecode/ExceptionTable.java b/src/de/dhbwstuttgart/bytecode/ExceptionTable.java
index 8c5dbe48..7d22e35f 100755
--- a/src/de/dhbwstuttgart/bytecode/ExceptionTable.java
+++ b/src/de/dhbwstuttgart/bytecode/ExceptionTable.java
@@ -7,7 +7,7 @@ import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;
-import org.apache.log4j.Logger;
+import de.dhbwstuttgart.logger.Logger;
// ino.end
// ino.class.ExceptionTable.22047.declaration
diff --git a/src/de/dhbwstuttgart/bytecode/FieldInfo.java b/src/de/dhbwstuttgart/bytecode/FieldInfo.java
index 9347bb60..1118e3ba 100755
--- a/src/de/dhbwstuttgart/bytecode/FieldInfo.java
+++ b/src/de/dhbwstuttgart/bytecode/FieldInfo.java
@@ -8,7 +8,7 @@ import java.io.IOException;
import java.io.OutputStream;
import java.util.Vector;
-import org.apache.log4j.Logger;
+import de.dhbwstuttgart.logger.Logger;
// ino.end
import de.dhbwstuttgart.myexception.JVMCodeException;
diff --git a/src/de/dhbwstuttgart/bytecode/JVMCode.java b/src/de/dhbwstuttgart/bytecode/JVMCode.java
index 1966ae88..24f9b23f 100755
--- a/src/de/dhbwstuttgart/bytecode/JVMCode.java
+++ b/src/de/dhbwstuttgart/bytecode/JVMCode.java
@@ -4,7 +4,7 @@ package de.dhbwstuttgart.bytecode;
// ino.module.JVMCode.8547.import
import java.util.Vector;
-import org.apache.log4j.Logger;
+import de.dhbwstuttgart.logger.Logger;
// ino.end
diff --git a/src/de/dhbwstuttgart/bytecode/Key.java b/src/de/dhbwstuttgart/bytecode/Key.java
index 77df160e..6f4eee5b 100755
--- a/src/de/dhbwstuttgart/bytecode/Key.java
+++ b/src/de/dhbwstuttgart/bytecode/Key.java
@@ -6,7 +6,7 @@ package de.dhbwstuttgart.bytecode;
import java.io.FileOutputStream;
import java.io.OutputStream;
-import org.apache.log4j.Logger;
+import de.dhbwstuttgart.logger.Logger;
// ino.end
// ino.class.Key.22890.declaration
diff --git a/src/de/dhbwstuttgart/bytecode/MethodInfo.java b/src/de/dhbwstuttgart/bytecode/MethodInfo.java
index a083b106..ef2f9163 100755
--- a/src/de/dhbwstuttgart/bytecode/MethodInfo.java
+++ b/src/de/dhbwstuttgart/bytecode/MethodInfo.java
@@ -8,7 +8,7 @@ import java.io.IOException;
import java.io.OutputStream;
import java.util.Vector;
-import org.apache.log4j.Logger;
+import de.dhbwstuttgart.logger.Logger;
// ino.end
import de.dhbwstuttgart.myexception.JVMCodeException;
diff --git a/src/de/dhbwstuttgart/bytecode/SignatureInfo.java b/src/de/dhbwstuttgart/bytecode/SignatureInfo.java
index cb434597..c7fa7873 100755
--- a/src/de/dhbwstuttgart/bytecode/SignatureInfo.java
+++ b/src/de/dhbwstuttgart/bytecode/SignatureInfo.java
@@ -8,7 +8,7 @@ import java.io.IOException;
import java.io.OutputStream;
import java.util.Vector;
-import org.apache.log4j.Logger;
+import de.dhbwstuttgart.logger.Logger;
// ino.end
diff --git a/src/de/dhbwstuttgart/core/AClassOrInterface.java b/src/de/dhbwstuttgart/core/AClassOrInterface.java
index ab9f8a06..cf3ba515 100755
--- a/src/de/dhbwstuttgart/core/AClassOrInterface.java
+++ b/src/de/dhbwstuttgart/core/AClassOrInterface.java
@@ -6,7 +6,7 @@ package de.dhbwstuttgart.core;
// ino.module.AClassOrInterface.8526.import
import java.util.Vector;
-import org.apache.log4j.Logger;
+import de.dhbwstuttgart.logger.Logger;
// ino.end
diff --git a/src/de/dhbwstuttgart/core/ConsoleInterface.java b/src/de/dhbwstuttgart/core/ConsoleInterface.java
index 576077d7..742f0fe6 100755
--- a/src/de/dhbwstuttgart/core/ConsoleInterface.java
+++ b/src/de/dhbwstuttgart/core/ConsoleInterface.java
@@ -5,8 +5,7 @@ import static org.junit.Assert.fail;
import java.util.*;
-import org.apache.log4j.Logger;
-import org.apache.log4j.varia.NullAppender;
+import de.dhbwstuttgart.logger.Logger;
import de.dhbwstuttgart.typeinference.TypeinferenceResultSet;
import de.dhbwstuttgart.typeinference.exceptions.TypeinferenceException;
@@ -21,7 +20,7 @@ public class ConsoleInterface {
for(String file : args){
filenames.add(file);
}
- Logger.getRootLogger().addAppender(new NullAppender()); // sämtliches Logging unterdrücken
+ Logger.setOutput(null); // sämtliches Logging unterdrücken
run(filenames);
}
diff --git a/src/de/dhbwstuttgart/core/MyCompiler.java b/src/de/dhbwstuttgart/core/MyCompiler.java
index f6f1c363..7ec12f3b 100755
--- a/src/de/dhbwstuttgart/core/MyCompiler.java
+++ b/src/de/dhbwstuttgart/core/MyCompiler.java
@@ -13,8 +13,7 @@ import java.io.Reader;
import java.io.StringReader;
import java.util.Vector;
-import org.apache.log4j.Logger;
-import org.apache.log4j.xml.DOMConfigurator;
+import de.dhbwstuttgart.logger.Logger;
import de.dhbwstuttgart.bytecode.ClassFile;
diff --git a/src/de/dhbwstuttgart/logger/Logger.java b/src/de/dhbwstuttgart/logger/Logger.java
new file mode 100644
index 00000000..a640ae55
--- /dev/null
+++ b/src/de/dhbwstuttgart/logger/Logger.java
@@ -0,0 +1,59 @@
+package de.dhbwstuttgart.logger;
+
+import java.io.PrintStream;
+import java.util.HashMap;
+
+public class Logger {
+
+ private static PrintStream standardOutput;
+ private static final HashMap LOGGER_DIRECTORY = new HashMap<>();
+
+ private String name;
+ private PrintStream output;
+
+ private Logger(String name, PrintStream output) {
+ this.name = name;
+ this.output = output;
+ }
+
+ public void debug(String message){
+ output(message);
+ }
+
+ public static Logger getLogger(String name) {
+ Logger ret;
+ if(LOGGER_DIRECTORY.containsKey(name)){
+ ret = LOGGER_DIRECTORY.get(name);
+ }else{
+ ret = new Logger(name, standardOutput);
+ LOGGER_DIRECTORY.put(name, ret);
+ }
+ return ret;
+ }
+
+ private void output(String msg){
+ if(output != null){
+ output.println(msg);
+ }else if(standardOutput != null){
+ standardOutput.println(msg);
+ }
+ }
+
+ public void info(String string) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void error(String string) {
+ // TODO Auto-generated method stub
+
+ }
+
+ /**
+ * wird hier null übergeben, so wird sämtliches Logging unterdrückt.
+ */
+ public static void setStandardOutput(PrintStream outputStream) {
+ Logger.standardOutput = outputStream;
+ }
+
+}
diff --git a/src/de/dhbwstuttgart/myexception/SCClassException.java b/src/de/dhbwstuttgart/myexception/SCClassException.java
index 03ed35ee..c6d87741 100755
--- a/src/de/dhbwstuttgart/myexception/SCClassException.java
+++ b/src/de/dhbwstuttgart/myexception/SCClassException.java
@@ -4,7 +4,7 @@ package de.dhbwstuttgart.myexception;
// ino.module.SCClassException.8576.import
import java.util.Enumeration;
import java.util.Vector;
-import org.apache.log4j.Logger;
+import de.dhbwstuttgart.logger.Logger;
// ino.end
diff --git a/src/de/dhbwstuttgart/myexception/SCExcept.java b/src/de/dhbwstuttgart/myexception/SCExcept.java
index fd5d6ba8..e8ad93d5 100755
--- a/src/de/dhbwstuttgart/myexception/SCExcept.java
+++ b/src/de/dhbwstuttgart/myexception/SCExcept.java
@@ -3,7 +3,7 @@ package de.dhbwstuttgart.myexception;
// ino.end
// ino.module.SCExcept.8577.import
-import org.apache.log4j.Logger;
+import de.dhbwstuttgart.logger.Logger;
// ino.end
// ino.class.SCExcept.23838.declaration
diff --git a/src/de/dhbwstuttgart/myexception/SCException.java b/src/de/dhbwstuttgart/myexception/SCException.java
index d996cc66..9c96f2bd 100755
--- a/src/de/dhbwstuttgart/myexception/SCException.java
+++ b/src/de/dhbwstuttgart/myexception/SCException.java
@@ -4,7 +4,7 @@ package de.dhbwstuttgart.myexception;
// ino.module.SCException.8578.import
import java.util.Enumeration;
import java.util.Vector;
-import org.apache.log4j.Logger;
+import de.dhbwstuttgart.logger.Logger;
// ino.end
diff --git a/src/de/dhbwstuttgart/parser/JavaLexer.java b/src/de/dhbwstuttgart/parser/JavaLexer.java
index 4c5ccab1..788641ac 100644
--- a/src/de/dhbwstuttgart/parser/JavaLexer.java
+++ b/src/de/dhbwstuttgart/parser/JavaLexer.java
@@ -1291,7 +1291,7 @@ public class JavaLexer {
case -37:
break;
case 37:
- {org.apache.log4j.Logger.getLogger("parser").debug("Kommentar: "+yytext());}
+ {de.dhbwstuttgart.logger.Logger.getLogger("parser").debug("Kommentar: "+yytext());}
case -38:
break;
case 38:
diff --git a/src/de/dhbwstuttgart/parser/JavaLexer.lex b/src/de/dhbwstuttgart/parser/JavaLexer.lex
index 60f3806e..9df37ace 100755
--- a/src/de/dhbwstuttgart/parser/JavaLexer.lex
+++ b/src/de/dhbwstuttgart/parser/JavaLexer.lex
@@ -167,7 +167,7 @@ null {
//">>=" {this.token = new Token(JavaParser.SIGNEDSHIFTRIGHTEQUAL, yytext(), yyline, yychar);return true;}
//">>>=" {this.token = new Token(JavaParser.UNSIGNEDSHIFTRIGHTEQUAL, yytext(), yyline, yychar);return true;}
{ws}|\n { /* System.out.print(yytext()); */ }
-\\.\n {org.apache.log4j.Logger.getLogger("parser").debug("Kommentar: "+yytext());}
+\\.\n {de.dhbwstuttgart.logger.Logger.getLogger("parser").debug("Kommentar: "+yytext());}
"->" {this.token = new Token(JavaParser.LAMBDAASSIGNMENT, yytext(), yyline, yychar);return true;}
diff --git a/src/de/dhbwstuttgart/parser/JavaParser.java b/src/de/dhbwstuttgart/parser/JavaParser.java
index 4968adaf..8ab37814 100644
--- a/src/de/dhbwstuttgart/parser/JavaParser.java
+++ b/src/de/dhbwstuttgart/parser/JavaParser.java
@@ -978,7 +978,7 @@ case 36:
pl.getParalist().addElement(new GenericTypeVar(((Token)yyVals[0+yyTop]).getLexem(),null, ((Token)yyVals[0+yyTop]).getOffset()));
/*pl.getParalist().addElement( new TypePlaceholder($1.getLexem()) );*/
/* ########################################################### */
- org.apache.log4j.Logger.getLogger("parser").debug( "IDENTIFIER --> Paralist f�r " + ((Token)yyVals[0+yyTop]).getLexem() + " TV");
+ de.dhbwstuttgart.logger.Logger.getLogger("parser").debug( "IDENTIFIER --> Paralist f�r " + ((Token)yyVals[0+yyTop]).getLexem() + " TV");
yyVal = pl;
}
break;
@@ -989,7 +989,7 @@ case 37:
RefType t = new RefType( ((Token)yyVals[-3+yyTop]).getLexem(),null,((Token)yyVals[-3+yyTop]).getOffset() );
t.set_ParaList( ((ParaList)yyVals[-1+yyTop]).get_ParaList() );
pl.getParalist().addElement(t);
- org.apache.log4j.Logger.getLogger("parser").debug( "IDENTIFIER '<' paralist '>' --> Paralist f�r " + ((Token)yyVals[-3+yyTop]).getLexem() + ": RefType");
+ de.dhbwstuttgart.logger.Logger.getLogger("parser").debug( "IDENTIFIER '<' paralist '>' --> Paralist f�r " + ((Token)yyVals[-3+yyTop]).getLexem() + ": RefType");
yyVal = pl;
}
break;
@@ -1010,8 +1010,8 @@ case 39:
((ParaList)yyVals[-2+yyTop]).getParalist().addElement(new GenericTypeVar(((Token)yyVals[0+yyTop]).getLexem(), null,((Token)yyVals[0+yyTop]).getOffset()));
/*$1.getParalist().addElement(new TypePlaceholder($3.getLexem()));*/
/* ########################################################### */
- org.apache.log4j.Logger.getLogger("parser").debug( "paralist ',' IDENTIFIER --> Paralist f�r " + ((Token)yyVals[0+yyTop]).getLexem() + ": TV");
- org.apache.log4j.Logger.getLogger("parser").debug( "paralist: " + ((ParaList)yyVals[-2+yyTop]).getParalist());
+ de.dhbwstuttgart.logger.Logger.getLogger("parser").debug( "paralist ',' IDENTIFIER --> Paralist f�r " + ((Token)yyVals[0+yyTop]).getLexem() + ": TV");
+ de.dhbwstuttgart.logger.Logger.getLogger("parser").debug( "paralist: " + ((ParaList)yyVals[-2+yyTop]).getParalist());
yyVal=((ParaList)yyVals[-2+yyTop]);
}
break;
@@ -1021,7 +1021,7 @@ case 40:
RefType t = new RefType( ((Token)yyVals[-3+yyTop]).getLexem(),null ,((Token)yyVals[-3+yyTop]).getOffset() );
t.set_ParaList( ((ParaList)yyVals[-1+yyTop]).get_ParaList() );
((ParaList)yyVals[-5+yyTop]).getParalist().addElement(t);
- org.apache.log4j.Logger.getLogger("parser").debug( "paralist ',' IDENTIFIER '<' paralist '>' --> Paralist f�r " + ((Token)yyVals[-3+yyTop]).getLexem() + ": RefType");
+ de.dhbwstuttgart.logger.Logger.getLogger("parser").debug( "paralist ',' IDENTIFIER '<' paralist '>' --> Paralist f�r " + ((Token)yyVals[-3+yyTop]).getLexem() + ": RefType");
yyVal=((ParaList)yyVals[-5+yyTop]);
}
break;
@@ -1423,7 +1423,7 @@ case 93:
case 94:
// line 875 "./../src/de/dhbwstuttgart/parser/JavaParser.jay"
{
- org.apache.log4j.Logger.getLogger("parser").debug("T->Parser->fielddeclaration ...: type " + ((Type)yyVals[-2+yyTop]));
+ de.dhbwstuttgart.logger.Logger.getLogger("parser").debug("T->Parser->fielddeclaration ...: type " + ((Type)yyVals[-2+yyTop]));
((FieldDeclaration)yyVals[-1+yyTop]).setType(((Type)yyVals[-2+yyTop]));
yyVal = ((FieldDeclaration)yyVals[-1+yyTop]);
}
@@ -1955,7 +1955,7 @@ case 155:
case 156:
// line 1316 "./../src/de/dhbwstuttgart/parser/JavaParser.jay"
{
- org.apache.log4j.Logger.getLogger("parser").debug("T->Parser->referenctype: " + ((UsedId)yyVals[0+yyTop]));
+ de.dhbwstuttgart.logger.Logger.getLogger("parser").debug("T->Parser->referenctype: " + ((UsedId)yyVals[0+yyTop]));
RefType RT = new RefType(null,((UsedId)yyVals[0+yyTop]).getOffset());
/*ausgetauscht PL 05-07-30*/
@@ -2002,7 +2002,7 @@ case 160:
case 161:
// line 1393 "./../src/de/dhbwstuttgart/parser/JavaParser.jay"
{
- org.apache.log4j.Logger.getLogger("parser").debug("\nFunktionsdeklaration mit typlosen Parametern: " + ((DeclId)yyVals[0+yyTop]).name);
+ de.dhbwstuttgart.logger.Logger.getLogger("parser").debug("\nFunktionsdeklaration mit typlosen Parametern: " + ((DeclId)yyVals[0+yyTop]).name);
FormalParameter FP = new FormalParameter(((DeclId)yyVals[0+yyTop]));
@@ -2011,7 +2011,7 @@ case 161:
/*Type T = TypePlaceholder.fresh(); //auskommentiert von Andreas Stadelmeier*/
/* Type T = new TypePlaceholder(""); /* otth: Name wird automatisch berechnet * /*/
/* ###########################################################*/
- /*org.apache.log4j.Logger.getLogger("parser").debug("\n--> berechneter Name: " + T.getName());*/
+ /*de.dhbwstuttgart.logger.Logger.getLogger("parser").debug("\n--> berechneter Name: " + T.getName());*/
/*auskommentiert von Andreas Stadelmeier (a10023) FP.setType( T );*/
/*FP.set_DeclId($1);*/
@@ -2132,7 +2132,7 @@ case 176:
case 177:
// line 1500 "./../src/de/dhbwstuttgart/parser/JavaParser.jay"
{
- org.apache.log4j.Logger.getLogger("parser").debug("P -> Lokale Variable angelegt!");
+ de.dhbwstuttgart.logger.Logger.getLogger("parser").debug("P -> Lokale Variable angelegt!");
LocalVarDecl LVD = new LocalVarDecl(((Type)yyVals[-1+yyTop]).getOffset(),((Type)yyVals[-1+yyTop]).getVariableLength());
LVD.setType(((Type)yyVals[-1+yyTop]));
LVD.setDeclidVector(((FieldDeclaration)yyVals[0+yyTop]).getDeclIdVector());
@@ -2142,7 +2142,7 @@ case 177:
case 178:
// line 1511 "./../src/de/dhbwstuttgart/parser/JavaParser.jay"
{
- org.apache.log4j.Logger.getLogger("parser").debug("P -> Lokale Variable angelegt!");
+ de.dhbwstuttgart.logger.Logger.getLogger("parser").debug("P -> Lokale Variable angelegt!");
LocalVarDecl LVD = new LocalVarDecl(((FieldDeclaration)yyVals[0+yyTop]).getOffset(),((FieldDeclaration)yyVals[0+yyTop]).getVariableLength());
/*auskommentiert von Andreas Stadelmeier (a10023) LVD.setType(TypePlaceholder.fresh());*/
LVD.setDeclidVector(((FieldDeclaration)yyVals[0+yyTop]).getDeclIdVector());
@@ -2296,7 +2296,7 @@ case 193:
case 194:
// line 1650 "./../src/de/dhbwstuttgart/parser/JavaParser.jay"
{
- org.apache.log4j.Logger.getLogger("parser").debug("conditionalexpression");
+ de.dhbwstuttgart.logger.Logger.getLogger("parser").debug("conditionalexpression");
yyVal=((Expr)yyVals[0+yyTop]);
}
break;
@@ -2361,7 +2361,7 @@ case 203:
case 204:
// line 1703 "./../src/de/dhbwstuttgart/parser/JavaParser.jay"
{
- org.apache.log4j.Logger.getLogger("parser").debug("\nParser --> Zuweisung1!\n");
+ de.dhbwstuttgart.logger.Logger.getLogger("parser").debug("\nParser --> Zuweisung1!\n");
Assign Ass = new Assign(((UsedId)yyVals[-2+yyTop]).getOffset(),((UsedId)yyVals[-2+yyTop]).getVariableLength());
LocalOrFieldVar LOFV = new LocalOrFieldVar(((UsedId)yyVals[-2+yyTop]).getOffset(),((UsedId)yyVals[-2+yyTop]).getVariableLength());
LOFV.set_UsedId(((UsedId)yyVals[-2+yyTop]));
@@ -2369,7 +2369,7 @@ case 204:
/*auskommentiert von Andreas Stadelmeier (a10023) Ass.setType(TypePlaceholder.fresh());*/
if( ((Operator)yyVals[-1+yyTop]) == null )
{
- org.apache.log4j.Logger.getLogger("parser").debug("\nParser --> Zuweisung1 --> " + ((Expr)yyVals[0+yyTop]) + " \n");
+ de.dhbwstuttgart.logger.Logger.getLogger("parser").debug("\nParser --> Zuweisung1 --> " + ((Expr)yyVals[0+yyTop]) + " \n");
Ass.set_Expr( LOFV,((Expr)yyVals[0+yyTop]) );
}
else
@@ -2378,7 +2378,7 @@ case 204:
Bin.set_Expr1(LOFV);
Bin.set_Operator(((Operator)yyVals[-1+yyTop]));
Bin.set_Expr2(((Expr)yyVals[0+yyTop]));
- org.apache.log4j.Logger.getLogger("parser").debug("\nParser --> Zuweisung1 --> Binary\n");
+ de.dhbwstuttgart.logger.Logger.getLogger("parser").debug("\nParser --> Zuweisung1 --> Binary\n");
/*auskommentiert von Andreas Stadelmeier (a10023) Bin.setType(TypePlaceholder.fresh());*/
Ass.set_Expr( LOFV, Bin );
}
@@ -2608,7 +2608,7 @@ case 232:
case 233:
// line 1933 "./../src/de/dhbwstuttgart/parser/JavaParser.jay"
{
- org.apache.log4j.Logger.getLogger("parser").debug("M1");
+ de.dhbwstuttgart.logger.Logger.getLogger("parser").debug("M1");
MethodCall MC = new MethodCall(((UsedId)yyVals[-2+yyTop]).getOffset(),((UsedId)yyVals[-2+yyTop]).getVariableLength());
UsedId udidmeth = new UsedId(((UsedId)yyVals[-2+yyTop]).getOffset());
udidmeth.set_Name((String)((((UsedId)yyVals[-2+yyTop]).get_Name()).elementAt(((UsedId)yyVals[-2+yyTop]).get_Name().size()-1)));
@@ -2640,7 +2640,7 @@ case 233:
case 234:
// line 1963 "./../src/de/dhbwstuttgart/parser/JavaParser.jay"
{
- org.apache.log4j.Logger.getLogger("parser").debug("M2");
+ de.dhbwstuttgart.logger.Logger.getLogger("parser").debug("M2");
MethodCall MCarg = new MethodCall(((UsedId)yyVals[-3+yyTop]).getOffset(),((UsedId)yyVals[-3+yyTop]).getVariableLength());
UsedId udidmeth = new UsedId(((UsedId)yyVals[-3+yyTop]).getOffset());
udidmeth.set_Name((String)((((UsedId)yyVals[-3+yyTop]).get_Name()).elementAt(((UsedId)yyVals[-3+yyTop]).get_Name().size()-1)));
@@ -2673,7 +2673,7 @@ case 234:
case 235:
// line 1994 "./../src/de/dhbwstuttgart/parser/JavaParser.jay"
{
- org.apache.log4j.Logger.getLogger("parser").debug("M3");
+ de.dhbwstuttgart.logger.Logger.getLogger("parser").debug("M3");
MethodCall MCpr = new MethodCall(((Expr)yyVals[-4+yyTop]).getOffset(),((Expr)yyVals[-4+yyTop]).getVariableLength());
/* PL 05-08-21 primary ist kein UsedId*/
@@ -2694,7 +2694,7 @@ case 235:
case 236:
// line 2013 "./../src/de/dhbwstuttgart/parser/JavaParser.jay"
{
- org.apache.log4j.Logger.getLogger("parser").debug("M4");
+ de.dhbwstuttgart.logger.Logger.getLogger("parser").debug("M4");
MethodCall MCPA = new MethodCall(((Expr)yyVals[-5+yyTop]).getOffset(),((Expr)yyVals[-5+yyTop]).getVariableLength());
/* PL 05-08-21 primary ist kein UsedId*/
diff --git a/src/de/dhbwstuttgart/parser/JavaParser.jay b/src/de/dhbwstuttgart/parser/JavaParser.jay
index 23de6cbf..80d2bd39 100755
--- a/src/de/dhbwstuttgart/parser/JavaParser.jay
+++ b/src/de/dhbwstuttgart/parser/JavaParser.jay
@@ -486,7 +486,7 @@ paralist : IDENTIFIER
pl.getParalist().addElement(new GenericTypeVar($1.getLexem(),null, $1.getOffset()));
//pl.getParalist().addElement( new TypePlaceholder($1.getLexem()) );
/* ########################################################### */
- org.apache.log4j.Logger.getLogger("parser").debug( "IDENTIFIER --> Paralist f�r " + $1.getLexem() + " TV");
+ de.dhbwstuttgart.logger.Logger.getLogger("parser").debug( "IDENTIFIER --> Paralist f�r " + $1.getLexem() + " TV");
$$ = pl;
}
| IDENTIFIER '<' paralist '>'
@@ -495,7 +495,7 @@ paralist : IDENTIFIER
RefType t = new RefType( $1.getLexem(),null,$1.getOffset() );
t.set_ParaList( $3.get_ParaList() );
pl.getParalist().addElement(t);
- org.apache.log4j.Logger.getLogger("parser").debug( "IDENTIFIER '<' paralist '>' --> Paralist f�r " + $1.getLexem() + ": RefType");
+ de.dhbwstuttgart.logger.Logger.getLogger("parser").debug( "IDENTIFIER '<' paralist '>' --> Paralist f�r " + $1.getLexem() + ": RefType");
$$ = pl;
}
| wildcardparameter
@@ -512,8 +512,8 @@ paralist : IDENTIFIER
$1.getParalist().addElement(new GenericTypeVar($3.getLexem(), null,$3.getOffset()));
//$1.getParalist().addElement(new TypePlaceholder($3.getLexem()));
/* ########################################################### */
- org.apache.log4j.Logger.getLogger("parser").debug( "paralist ',' IDENTIFIER --> Paralist f�r " + $3.getLexem() + ": TV");
- org.apache.log4j.Logger.getLogger("parser").debug( "paralist: " + $1.getParalist());
+ de.dhbwstuttgart.logger.Logger.getLogger("parser").debug( "paralist ',' IDENTIFIER --> Paralist f�r " + $3.getLexem() + ": TV");
+ de.dhbwstuttgart.logger.Logger.getLogger("parser").debug( "paralist: " + $1.getParalist());
$$=$1;
}
@@ -522,7 +522,7 @@ paralist : IDENTIFIER
RefType t = new RefType( $3.getLexem(),null ,$3.getOffset() );
t.set_ParaList( $5.get_ParaList() );
$1.getParalist().addElement(t);
- org.apache.log4j.Logger.getLogger("parser").debug( "paralist ',' IDENTIFIER '<' paralist '>' --> Paralist f�r " + $3.getLexem() + ": RefType");
+ de.dhbwstuttgart.logger.Logger.getLogger("parser").debug( "paralist ',' IDENTIFIER '<' paralist '>' --> Paralist f�r " + $3.getLexem() + ": RefType");
$$=$1;
}
| paralist ',' wildcardparameter
@@ -873,7 +873,7 @@ fielddeclaration : type fielddeclarator ';'
|
type variabledeclarators ';'
{
- org.apache.log4j.Logger.getLogger("parser").debug("T->Parser->fielddeclaration ...: type " + $1);
+ de.dhbwstuttgart.logger.Logger.getLogger("parser").debug("T->Parser->fielddeclaration ...: type " + $1);
$2.setType($1);
$$ = $2;
}
@@ -1314,7 +1314,7 @@ referencelongtype : typename parameter
referencetype :classorinterfacetype
{
- org.apache.log4j.Logger.getLogger("parser").debug("T->Parser->referenctype: " + $1);
+ de.dhbwstuttgart.logger.Logger.getLogger("parser").debug("T->Parser->referenctype: " + $1);
RefType RT = new RefType(null,$1.getOffset());
//ausgetauscht PL 05-07-30
@@ -1385,13 +1385,13 @@ formalparameter : type variabledeclaratorid
//FP.set_DeclId($5);
$$=FP;
- org.apache.log4j.Logger.getLogger("parser").debug("P->Polymorphes Methodenargument hinzugefuegt: Name = " + $5.get_Name() + " Typ = " + $1.getName());
+ de.dhbwstuttgart.logger.Logger.getLogger("parser").debug("P->Polymorphes Methodenargument hinzugefuegt: Name = " + $5.get_Name() + " Typ = " + $1.getName());
}
*/
| variabledeclaratorid
{
- org.apache.log4j.Logger.getLogger("parser").debug("\nFunktionsdeklaration mit typlosen Parametern: " + $1.name);
+ de.dhbwstuttgart.logger.Logger.getLogger("parser").debug("\nFunktionsdeklaration mit typlosen Parametern: " + $1.name);
FormalParameter FP = new FormalParameter($1);
@@ -1400,7 +1400,7 @@ formalparameter : type variabledeclaratorid
//Type T = TypePlaceholder.fresh(); //auskommentiert von Andreas Stadelmeier
// Type T = new TypePlaceholder(""); /* otth: Name wird automatisch berechnet */
// ###########################################################
- //org.apache.log4j.Logger.getLogger("parser").debug("\n--> berechneter Name: " + T.getName());
+ //de.dhbwstuttgart.logger.Logger.getLogger("parser").debug("\n--> berechneter Name: " + T.getName());
//auskommentiert von Andreas Stadelmeier (a10023) FP.setType( T );
//FP.set_DeclId($1);
@@ -1498,7 +1498,7 @@ integraltype :INT
localvariabledeclaration : type variabledeclarators
{
- org.apache.log4j.Logger.getLogger("parser").debug("P -> Lokale Variable angelegt!");
+ de.dhbwstuttgart.logger.Logger.getLogger("parser").debug("P -> Lokale Variable angelegt!");
LocalVarDecl LVD = new LocalVarDecl($1.getOffset(),$1.getVariableLength());
LVD.setType($1);
LVD.setDeclidVector($2.getDeclIdVector());
@@ -1509,7 +1509,7 @@ localvariabledeclaration : type variabledeclarators
/* ########################################################### */
|variabledeclarators
{
- org.apache.log4j.Logger.getLogger("parser").debug("P -> Lokale Variable angelegt!");
+ de.dhbwstuttgart.logger.Logger.getLogger("parser").debug("P -> Lokale Variable angelegt!");
LocalVarDecl LVD = new LocalVarDecl($1.getOffset(),$1.getVariableLength());
//auskommentiert von Andreas Stadelmeier (a10023) LVD.setType(TypePlaceholder.fresh());
LVD.setDeclidVector($1.getDeclIdVector());
@@ -1648,7 +1648,7 @@ forstatement
assignmentexpression : conditionalexpression
{
- org.apache.log4j.Logger.getLogger("parser").debug("conditionalexpression");
+ de.dhbwstuttgart.logger.Logger.getLogger("parser").debug("conditionalexpression");
$$=$1;
}
| assignment
@@ -1701,7 +1701,7 @@ conditionalexpression :conditionalorexpression
assignment :lefthandside assignmentoperator assignmentexpression
{
- org.apache.log4j.Logger.getLogger("parser").debug("\nParser --> Zuweisung1!\n");
+ de.dhbwstuttgart.logger.Logger.getLogger("parser").debug("\nParser --> Zuweisung1!\n");
Assign Ass = new Assign($1.getOffset(),$1.getVariableLength());
LocalOrFieldVar LOFV = new LocalOrFieldVar($1.getOffset(),$1.getVariableLength());
LOFV.set_UsedId($1);
@@ -1709,7 +1709,7 @@ assignment :lefthandside assignmentoperator assignmentexpr
//auskommentiert von Andreas Stadelmeier (a10023) Ass.setType(TypePlaceholder.fresh());
if( $2 == null )
{
- org.apache.log4j.Logger.getLogger("parser").debug("\nParser --> Zuweisung1 --> " + $3 + " \n");
+ de.dhbwstuttgart.logger.Logger.getLogger("parser").debug("\nParser --> Zuweisung1 --> " + $3 + " \n");
Ass.set_Expr( LOFV,$3 );
}
else
@@ -1718,7 +1718,7 @@ assignment :lefthandside assignmentoperator assignmentexpr
Bin.set_Expr1(LOFV);
Bin.set_Operator($2);
Bin.set_Expr2($3);
- org.apache.log4j.Logger.getLogger("parser").debug("\nParser --> Zuweisung1 --> Binary\n");
+ de.dhbwstuttgart.logger.Logger.getLogger("parser").debug("\nParser --> Zuweisung1 --> Binary\n");
//auskommentiert von Andreas Stadelmeier (a10023) Bin.setType(TypePlaceholder.fresh());
Ass.set_Expr( LOFV, Bin );
}
@@ -1931,7 +1931,7 @@ postdecrementexpression :postfixexpression DECREMENT
methodinvocation:
name '(' ')'
{
- org.apache.log4j.Logger.getLogger("parser").debug("M1");
+ de.dhbwstuttgart.logger.Logger.getLogger("parser").debug("M1");
MethodCall MC = new MethodCall($1.getOffset(),$1.getVariableLength());
UsedId udidmeth = new UsedId($1.getOffset());
udidmeth.set_Name((String)(($1.get_Name()).elementAt($1.get_Name().size()-1)));
@@ -1961,7 +1961,7 @@ methodinvocation:
}
| name '('argumentlist')'
{
- org.apache.log4j.Logger.getLogger("parser").debug("M2");
+ de.dhbwstuttgart.logger.Logger.getLogger("parser").debug("M2");
MethodCall MCarg = new MethodCall($1.getOffset(),$1.getVariableLength());
UsedId udidmeth = new UsedId($1.getOffset());
udidmeth.set_Name((String)(($1.get_Name()).elementAt($1.get_Name().size()-1)));
@@ -1992,7 +1992,7 @@ methodinvocation:
}
| primary '.' IDENTIFIER '(' ')'
{
- org.apache.log4j.Logger.getLogger("parser").debug("M3");
+ de.dhbwstuttgart.logger.Logger.getLogger("parser").debug("M3");
MethodCall MCpr = new MethodCall($1.getOffset(),$1.getVariableLength());
// PL 05-08-21 primary ist kein UsedId
@@ -2011,7 +2011,7 @@ methodinvocation:
}
| primary '.' IDENTIFIER '('argumentlist ')'
{
- org.apache.log4j.Logger.getLogger("parser").debug("M4");
+ de.dhbwstuttgart.logger.Logger.getLogger("parser").debug("M4");
MethodCall MCPA = new MethodCall($1.getOffset(),$1.getVariableLength());
// PL 05-08-21 primary ist kein UsedId
diff --git a/src/de/dhbwstuttgart/syntaxtree/Class.java b/src/de/dhbwstuttgart/syntaxtree/Class.java
index a33f3d76..65f07318 100755
--- a/src/de/dhbwstuttgart/syntaxtree/Class.java
+++ b/src/de/dhbwstuttgart/syntaxtree/Class.java
@@ -9,7 +9,7 @@ import java.util.Hashtable;
import java.util.Iterator;
import java.util.Vector;
-import org.apache.log4j.Logger;
+import de.dhbwstuttgart.logger.Logger;
import de.dhbwstuttgart.core.AClassOrInterface;
import de.dhbwstuttgart.core.IItemWithOffset;
diff --git a/src/de/dhbwstuttgart/syntaxtree/ClassBody.java b/src/de/dhbwstuttgart/syntaxtree/ClassBody.java
index 3dd79b67..da24d8cd 100755
--- a/src/de/dhbwstuttgart/syntaxtree/ClassBody.java
+++ b/src/de/dhbwstuttgart/syntaxtree/ClassBody.java
@@ -6,7 +6,7 @@ import java.util.Enumeration;
import java.util.Hashtable;
import java.util.Vector;
-import org.apache.log4j.Logger;
+import de.dhbwstuttgart.logger.Logger;
// ino.end
diff --git a/src/de/dhbwstuttgart/syntaxtree/FormalParameter.java b/src/de/dhbwstuttgart/syntaxtree/FormalParameter.java
index 47101ad5..d3d67c87 100755
--- a/src/de/dhbwstuttgart/syntaxtree/FormalParameter.java
+++ b/src/de/dhbwstuttgart/syntaxtree/FormalParameter.java
@@ -5,7 +5,7 @@ package de.dhbwstuttgart.syntaxtree;
// ino.module.FormalParameter.8561.import
import java.util.Vector;
-import org.apache.log4j.Logger;
+import de.dhbwstuttgart.logger.Logger;
import de.dhbwstuttgart.bytecode.ClassFile;
import de.dhbwstuttgart.bytecode.CodeAttribute;
diff --git a/src/de/dhbwstuttgart/syntaxtree/Method.java b/src/de/dhbwstuttgart/syntaxtree/Method.java
index 9b0d5bba..6d8725b8 100755
--- a/src/de/dhbwstuttgart/syntaxtree/Method.java
+++ b/src/de/dhbwstuttgart/syntaxtree/Method.java
@@ -7,7 +7,7 @@ import java.util.Hashtable;
import java.util.Iterator;
import java.util.Vector;
-import org.apache.log4j.Logger;
+import de.dhbwstuttgart.logger.Logger;
import de.dhbwstuttgart.bytecode.ClassFile;
import de.dhbwstuttgart.core.IItemWithOffset;
diff --git a/src/de/dhbwstuttgart/syntaxtree/SourceFile.java b/src/de/dhbwstuttgart/syntaxtree/SourceFile.java
index f98cf230..d1f45761 100755
--- a/src/de/dhbwstuttgart/syntaxtree/SourceFile.java
+++ b/src/de/dhbwstuttgart/syntaxtree/SourceFile.java
@@ -10,8 +10,7 @@ import java.util.Hashtable;
import java.util.Iterator;
import java.util.Vector;
-import org.apache.log4j.Logger;
-
+import de.dhbwstuttgart.logger.Logger;
import de.dhbwstuttgart.bytecode.ClassFile;
import de.dhbwstuttgart.core.AClassOrInterface;
import de.dhbwstuttgart.core.MyCompiler;
@@ -45,6 +44,7 @@ import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions;
import de.dhbwstuttgart.typeinference.exceptions.DebugException;
import de.dhbwstuttgart.typeinference.exceptions.TypeinferenceException;
import de.dhbwstuttgart.typeinference.unify.FC_TTO;
+import de.dhbwstuttgart.typeinference.unify.Unifier;
import de.dhbwstuttgart.typeinference.unify.Unify;
@@ -691,11 +691,16 @@ public class SourceFile
////////////////
//Unmögliche ConstraintsSets aussortieren durch Unifizierung
- oderConstraints.filterWrongConstraints((pairs)->{return Unify.unify(pairs,finiteClosure);});
+ Unifier unifier = (pairs)->{
+ Vector> retValue = new Vector<>();
+ retValue = Unify.unify(pairs, finiteClosure);
+ return retValue;};
+ oderConstraints.filterWrongConstraints(unifier);
+ oderConstraints.unifyUndConstraints(unifier);
typinferenzLog.debug("Übriggebliebene Konstraints:\n"+oderConstraints+"\n");
//Die Constraints in Pair's umwandeln (Karthesisches Produkt bilden):
Vector> xConstraints = new Vector>();// = oderConstraints.getConstraints();
- for(Vector uC:oderConstraints.getConstraints()){ //mit dem getConstraints-Aufruf wird das Karthesische Produkt erzeugt.
+ for(Vector uC : oderConstraints.getConstraints()){ //mit dem getConstraints-Aufruf wird das Karthesische Produkt erzeugt.
Vector cons = new Vector();
for(UndConstraint undCons:uC){
cons.addAll(undCons.getConstraintPairs());
diff --git a/src/de/dhbwstuttgart/syntaxtree/misc/DeclId.java b/src/de/dhbwstuttgart/syntaxtree/misc/DeclId.java
index 7142823c..111c0b53 100755
--- a/src/de/dhbwstuttgart/syntaxtree/misc/DeclId.java
+++ b/src/de/dhbwstuttgart/syntaxtree/misc/DeclId.java
@@ -4,7 +4,7 @@ package de.dhbwstuttgart.syntaxtree.misc;
// ino.module.DeclId.8558.import
import java.util.Vector;
-import org.apache.log4j.Logger;
+import de.dhbwstuttgart.logger.Logger;
// ino.end
diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/Assign.java b/src/de/dhbwstuttgart/syntaxtree/statement/Assign.java
index 04bffdb1..96196a5a 100755
--- a/src/de/dhbwstuttgart/syntaxtree/statement/Assign.java
+++ b/src/de/dhbwstuttgart/syntaxtree/statement/Assign.java
@@ -7,7 +7,7 @@ import java.util.Hashtable;
import java.util.Iterator;
import java.util.Vector;
-import org.apache.log4j.Logger;
+import de.dhbwstuttgart.logger.Logger;
import de.dhbwstuttgart.bytecode.ClassFile;
import de.dhbwstuttgart.bytecode.CodeAttribute;
diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/Binary.java b/src/de/dhbwstuttgart/syntaxtree/statement/Binary.java
index b062ff29..0e2934d5 100755
--- a/src/de/dhbwstuttgart/syntaxtree/statement/Binary.java
+++ b/src/de/dhbwstuttgart/syntaxtree/statement/Binary.java
@@ -7,7 +7,7 @@ import java.util.HashMap;
import java.util.Hashtable;
import java.util.Vector;
-import org.apache.log4j.Logger;
+import de.dhbwstuttgart.logger.Logger;
import de.dhbwstuttgart.bytecode.ClassFile;
import de.dhbwstuttgart.bytecode.CodeAttribute;
diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/Block.java b/src/de/dhbwstuttgart/syntaxtree/statement/Block.java
index c6780c41..316b7bfe 100755
--- a/src/de/dhbwstuttgart/syntaxtree/statement/Block.java
+++ b/src/de/dhbwstuttgart/syntaxtree/statement/Block.java
@@ -7,7 +7,7 @@ import java.util.Hashtable;
import java.util.Iterator;
import java.util.Vector;
-import org.apache.log4j.Logger;
+import de.dhbwstuttgart.logger.Logger;
import de.dhbwstuttgart.bytecode.ClassFile;
import de.dhbwstuttgart.bytecode.CodeAttribute;
diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/BoolLiteral.java b/src/de/dhbwstuttgart/syntaxtree/statement/BoolLiteral.java
index 7bbaf757..dcb75bad 100755
--- a/src/de/dhbwstuttgart/syntaxtree/statement/BoolLiteral.java
+++ b/src/de/dhbwstuttgart/syntaxtree/statement/BoolLiteral.java
@@ -5,7 +5,7 @@ package de.dhbwstuttgart.syntaxtree.statement;
import java.util.Hashtable;
import java.util.Vector;
-import org.apache.log4j.Logger;
+import de.dhbwstuttgart.logger.Logger;
import de.dhbwstuttgart.bytecode.ClassFile;
import de.dhbwstuttgart.bytecode.CodeAttribute;
import de.dhbwstuttgart.bytecode.JVMCode;
diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/CastExpr.java b/src/de/dhbwstuttgart/syntaxtree/statement/CastExpr.java
index 681a0354..3e087090 100755
--- a/src/de/dhbwstuttgart/syntaxtree/statement/CastExpr.java
+++ b/src/de/dhbwstuttgart/syntaxtree/statement/CastExpr.java
@@ -6,7 +6,7 @@ import java.util.Hashtable;
import java.util.Iterator;
import java.util.Vector;
-import org.apache.log4j.Logger;
+import de.dhbwstuttgart.logger.Logger;
import de.dhbwstuttgart.bytecode.ClassFile;
import de.dhbwstuttgart.bytecode.CodeAttribute;
import de.dhbwstuttgart.bytecode.JVMCode;
diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/CharLiteral.java b/src/de/dhbwstuttgart/syntaxtree/statement/CharLiteral.java
index a8b3e8f6..3790bbfc 100755
--- a/src/de/dhbwstuttgart/syntaxtree/statement/CharLiteral.java
+++ b/src/de/dhbwstuttgart/syntaxtree/statement/CharLiteral.java
@@ -4,7 +4,7 @@ package de.dhbwstuttgart.syntaxtree.statement;
// ino.module.CharLiteral.8628.import
import java.util.Hashtable;
import java.util.Vector;
-import org.apache.log4j.Logger;
+import de.dhbwstuttgart.logger.Logger;
import de.dhbwstuttgart.bytecode.ClassFile;
import de.dhbwstuttgart.bytecode.CodeAttribute;
import de.dhbwstuttgart.bytecode.JVMCode;
diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/DoubleLiteral.java b/src/de/dhbwstuttgart/syntaxtree/statement/DoubleLiteral.java
index 55a3d430..a9b87056 100755
--- a/src/de/dhbwstuttgart/syntaxtree/statement/DoubleLiteral.java
+++ b/src/de/dhbwstuttgart/syntaxtree/statement/DoubleLiteral.java
@@ -6,7 +6,7 @@ import java.util.Hashtable;
import java.util.Vector;
-import org.apache.log4j.Logger;
+import de.dhbwstuttgart.logger.Logger;
import de.dhbwstuttgart.bytecode.ClassFile;
import de.dhbwstuttgart.bytecode.CodeAttribute;
diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/EmptyStmt.java b/src/de/dhbwstuttgart/syntaxtree/statement/EmptyStmt.java
index 24fe0cb0..0d99f419 100755
--- a/src/de/dhbwstuttgart/syntaxtree/statement/EmptyStmt.java
+++ b/src/de/dhbwstuttgart/syntaxtree/statement/EmptyStmt.java
@@ -5,7 +5,7 @@ package de.dhbwstuttgart.syntaxtree.statement;
import java.util.Hashtable;
import java.util.Vector;
-import org.apache.log4j.Logger;
+import de.dhbwstuttgart.logger.Logger;
import de.dhbwstuttgart.bytecode.ClassFile;
import de.dhbwstuttgart.bytecode.CodeAttribute;
diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/ExprStmt.java b/src/de/dhbwstuttgart/syntaxtree/statement/ExprStmt.java
index 14451efd..40c30950 100755
--- a/src/de/dhbwstuttgart/syntaxtree/statement/ExprStmt.java
+++ b/src/de/dhbwstuttgart/syntaxtree/statement/ExprStmt.java
@@ -6,7 +6,7 @@ package de.dhbwstuttgart.syntaxtree.statement;
import java.util.Iterator;
import java.util.Vector;
-import org.apache.log4j.Logger;
+import de.dhbwstuttgart.logger.Logger;
import de.dhbwstuttgart.core.MyCompiler;
import de.dhbwstuttgart.syntaxtree.type.Type;
diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/FloatLiteral.java b/src/de/dhbwstuttgart/syntaxtree/statement/FloatLiteral.java
index b1e1bb2b..36d1dc5b 100755
--- a/src/de/dhbwstuttgart/syntaxtree/statement/FloatLiteral.java
+++ b/src/de/dhbwstuttgart/syntaxtree/statement/FloatLiteral.java
@@ -5,7 +5,7 @@ package de.dhbwstuttgart.syntaxtree.statement;
import java.util.Hashtable;
import java.util.Vector;
-import org.apache.log4j.Logger;
+import de.dhbwstuttgart.logger.Logger;
import de.dhbwstuttgart.bytecode.ClassFile;
import de.dhbwstuttgart.bytecode.CodeAttribute;
diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/ForStmt.java b/src/de/dhbwstuttgart/syntaxtree/statement/ForStmt.java
index d103c6e8..e8e2e7a4 100755
--- a/src/de/dhbwstuttgart/syntaxtree/statement/ForStmt.java
+++ b/src/de/dhbwstuttgart/syntaxtree/statement/ForStmt.java
@@ -5,7 +5,7 @@ import java.util.Hashtable;
import java.util.Iterator;
import java.util.Vector;
-import org.apache.log4j.Logger;
+import de.dhbwstuttgart.logger.Logger;
import de.dhbwstuttgart.bytecode.ClassFile;
import de.dhbwstuttgart.bytecode.CodeAttribute;
diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/IfStmt.java b/src/de/dhbwstuttgart/syntaxtree/statement/IfStmt.java
index 59b31505..8b8ae046 100755
--- a/src/de/dhbwstuttgart/syntaxtree/statement/IfStmt.java
+++ b/src/de/dhbwstuttgart/syntaxtree/statement/IfStmt.java
@@ -7,7 +7,7 @@ import java.util.Hashtable;
import java.util.Iterator;
import java.util.Vector;
-import org.apache.log4j.Logger;
+import de.dhbwstuttgart.logger.Logger;
import de.dhbwstuttgart.bytecode.ClassFile;
import de.dhbwstuttgart.bytecode.CodeAttribute;
diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/InstVar.java b/src/de/dhbwstuttgart/syntaxtree/statement/InstVar.java
index 28fa843b..c98496c6 100755
--- a/src/de/dhbwstuttgart/syntaxtree/statement/InstVar.java
+++ b/src/de/dhbwstuttgart/syntaxtree/statement/InstVar.java
@@ -7,7 +7,7 @@ import java.util.Hashtable;
import java.util.Iterator;
import java.util.Vector;
-import org.apache.log4j.Logger;
+import de.dhbwstuttgart.logger.Logger;
import de.dhbwstuttgart.bytecode.ClassFile;
import de.dhbwstuttgart.bytecode.CodeAttribute;
diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/InstanceOf.java b/src/de/dhbwstuttgart/syntaxtree/statement/InstanceOf.java
index 79276d89..1f49be5d 100755
--- a/src/de/dhbwstuttgart/syntaxtree/statement/InstanceOf.java
+++ b/src/de/dhbwstuttgart/syntaxtree/statement/InstanceOf.java
@@ -6,7 +6,7 @@ import java.util.Enumeration;
import java.util.Hashtable;
import java.util.Vector;
-import org.apache.log4j.Logger;
+import de.dhbwstuttgart.logger.Logger;
import de.dhbwstuttgart.bytecode.ClassFile;
diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/IntLiteral.java b/src/de/dhbwstuttgart/syntaxtree/statement/IntLiteral.java
index d251cd7b..1e13b855 100755
--- a/src/de/dhbwstuttgart/syntaxtree/statement/IntLiteral.java
+++ b/src/de/dhbwstuttgart/syntaxtree/statement/IntLiteral.java
@@ -5,7 +5,7 @@ package de.dhbwstuttgart.syntaxtree.statement;
import java.util.Hashtable;
import java.util.Vector;
-import org.apache.log4j.Logger;
+import de.dhbwstuttgart.logger.Logger;
import de.dhbwstuttgart.bytecode.ClassFile;
import de.dhbwstuttgart.bytecode.CodeAttribute;
import de.dhbwstuttgart.bytecode.JVMCode;
diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/LocalOrFieldVar.java b/src/de/dhbwstuttgart/syntaxtree/statement/LocalOrFieldVar.java
index d773f48c..3266d67a 100755
--- a/src/de/dhbwstuttgart/syntaxtree/statement/LocalOrFieldVar.java
+++ b/src/de/dhbwstuttgart/syntaxtree/statement/LocalOrFieldVar.java
@@ -6,7 +6,7 @@ import java.util.Enumeration;
import java.util.Hashtable;
import java.util.Vector;
-import org.apache.log4j.Logger;
+import de.dhbwstuttgart.logger.Logger;
import de.dhbwstuttgart.bytecode.ClassFile;
import de.dhbwstuttgart.bytecode.CodeAttribute;
import de.dhbwstuttgart.bytecode.JVMCode;
diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/LocalVarDecl.java b/src/de/dhbwstuttgart/syntaxtree/statement/LocalVarDecl.java
index 855f9dde..5358a9e2 100755
--- a/src/de/dhbwstuttgart/syntaxtree/statement/LocalVarDecl.java
+++ b/src/de/dhbwstuttgart/syntaxtree/statement/LocalVarDecl.java
@@ -6,7 +6,7 @@ import java.util.Enumeration;
import java.util.Hashtable;
import java.util.Vector;
-import org.apache.log4j.Logger;
+import de.dhbwstuttgart.logger.Logger;
import de.dhbwstuttgart.bytecode.ClassFile;
import de.dhbwstuttgart.bytecode.CodeAttribute;
@@ -209,7 +209,7 @@ public class LocalVarDecl extends Statement implements TypeInsertable
throw ex;
}
else if(paralist==null && c.get_ParaList().size()>0){
- parserlog.debug(paralist);
+ parserlog.debug(paralist.toString());
parserlog.debug(c.getName()+" "+c.get_ParaList().size());
SCStatementException ex = new SCStatementException();
SCExcept e = new SCExcept();
diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/LongLiteral.java b/src/de/dhbwstuttgart/syntaxtree/statement/LongLiteral.java
index 7317255f..c35f333a 100755
--- a/src/de/dhbwstuttgart/syntaxtree/statement/LongLiteral.java
+++ b/src/de/dhbwstuttgart/syntaxtree/statement/LongLiteral.java
@@ -6,7 +6,7 @@ import java.util.Hashtable;
import java.util.Vector;
-import org.apache.log4j.Logger;
+import de.dhbwstuttgart.logger.Logger;
import de.dhbwstuttgart.bytecode.ClassFile;
import de.dhbwstuttgart.bytecode.CodeAttribute;
diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/MethodCall.java b/src/de/dhbwstuttgart/syntaxtree/statement/MethodCall.java
index a2c418d0..d6e596c1 100755
--- a/src/de/dhbwstuttgart/syntaxtree/statement/MethodCall.java
+++ b/src/de/dhbwstuttgart/syntaxtree/statement/MethodCall.java
@@ -5,7 +5,7 @@ package de.dhbwstuttgart.syntaxtree.statement;
import java.util.Hashtable;
import java.util.Vector;
-import org.apache.log4j.Logger;
+import de.dhbwstuttgart.logger.Logger;
import de.dhbwstuttgart.bytecode.ClassFile;
import de.dhbwstuttgart.bytecode.CodeAttribute;
diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/NegativeExpr.java b/src/de/dhbwstuttgart/syntaxtree/statement/NegativeExpr.java
index c83cfe5a..108ec380 100755
--- a/src/de/dhbwstuttgart/syntaxtree/statement/NegativeExpr.java
+++ b/src/de/dhbwstuttgart/syntaxtree/statement/NegativeExpr.java
@@ -6,7 +6,7 @@ import java.util.Hashtable;
import java.util.Iterator;
import java.util.Vector;
-import org.apache.log4j.Logger;
+import de.dhbwstuttgart.logger.Logger;
import de.dhbwstuttgart.bytecode.ClassFile;
import de.dhbwstuttgart.bytecode.CodeAttribute;
diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/NewArray.java b/src/de/dhbwstuttgart/syntaxtree/statement/NewArray.java
index 94e9af5c..a1f03f3c 100755
--- a/src/de/dhbwstuttgart/syntaxtree/statement/NewArray.java
+++ b/src/de/dhbwstuttgart/syntaxtree/statement/NewArray.java
@@ -6,7 +6,7 @@ import java.util.Hashtable;
import java.util.Vector;
-import org.apache.log4j.Logger;
+import de.dhbwstuttgart.logger.Logger;
import de.dhbwstuttgart.bytecode.ClassFile;
import de.dhbwstuttgart.bytecode.CodeAttribute;
import de.dhbwstuttgart.bytecode.JVMCode;
diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/NewClass.java b/src/de/dhbwstuttgart/syntaxtree/statement/NewClass.java
index d279ebff..ce586551 100755
--- a/src/de/dhbwstuttgart/syntaxtree/statement/NewClass.java
+++ b/src/de/dhbwstuttgart/syntaxtree/statement/NewClass.java
@@ -8,7 +8,7 @@ import java.util.Iterator;
import java.util.Vector;
-import org.apache.log4j.Logger;
+import de.dhbwstuttgart.logger.Logger;
import de.dhbwstuttgart.bytecode.ClassFile;
import de.dhbwstuttgart.bytecode.CodeAttribute;
import de.dhbwstuttgart.bytecode.JVMCode;
diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/NotExpr.java b/src/de/dhbwstuttgart/syntaxtree/statement/NotExpr.java
index 0b7a2a55..e859441e 100755
--- a/src/de/dhbwstuttgart/syntaxtree/statement/NotExpr.java
+++ b/src/de/dhbwstuttgart/syntaxtree/statement/NotExpr.java
@@ -6,7 +6,7 @@ import java.util.Hashtable;
import java.util.Iterator;
import java.util.Vector;
-import org.apache.log4j.Logger;
+import de.dhbwstuttgart.logger.Logger;
import de.dhbwstuttgart.bytecode.ClassFile;
import de.dhbwstuttgart.bytecode.CodeAttribute;
diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/Null.java b/src/de/dhbwstuttgart/syntaxtree/statement/Null.java
index a02121ac..b60060c4 100755
--- a/src/de/dhbwstuttgart/syntaxtree/statement/Null.java
+++ b/src/de/dhbwstuttgart/syntaxtree/statement/Null.java
@@ -6,7 +6,7 @@ import java.util.Hashtable;
import java.util.Vector;
-import org.apache.log4j.Logger;
+import de.dhbwstuttgart.logger.Logger;
import de.dhbwstuttgart.bytecode.ClassFile;
import de.dhbwstuttgart.bytecode.CodeAttribute;
import de.dhbwstuttgart.bytecode.JVMCode;
diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/PositivExpr.java b/src/de/dhbwstuttgart/syntaxtree/statement/PositivExpr.java
index bea0c19d..4e2ff472 100755
--- a/src/de/dhbwstuttgart/syntaxtree/statement/PositivExpr.java
+++ b/src/de/dhbwstuttgart/syntaxtree/statement/PositivExpr.java
@@ -6,7 +6,7 @@ import java.util.Hashtable;
import java.util.Vector;
-import org.apache.log4j.Logger;
+import de.dhbwstuttgart.logger.Logger;
import de.dhbwstuttgart.bytecode.ClassFile;
import de.dhbwstuttgart.bytecode.CodeAttribute;
import de.dhbwstuttgart.myexception.CTypeReconstructionException;
diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/PostDecExpr.java b/src/de/dhbwstuttgart/syntaxtree/statement/PostDecExpr.java
index 99b83e51..2c224f97 100755
--- a/src/de/dhbwstuttgart/syntaxtree/statement/PostDecExpr.java
+++ b/src/de/dhbwstuttgart/syntaxtree/statement/PostDecExpr.java
@@ -6,7 +6,7 @@ import java.util.Hashtable;
import java.util.Iterator;
import java.util.Vector;
-import org.apache.log4j.Logger;
+import de.dhbwstuttgart.logger.Logger;
import de.dhbwstuttgart.bytecode.ClassFile;
import de.dhbwstuttgart.bytecode.CodeAttribute;
diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/PostIncExpr.java b/src/de/dhbwstuttgart/syntaxtree/statement/PostIncExpr.java
index 3837a3aa..02959a14 100755
--- a/src/de/dhbwstuttgart/syntaxtree/statement/PostIncExpr.java
+++ b/src/de/dhbwstuttgart/syntaxtree/statement/PostIncExpr.java
@@ -6,7 +6,7 @@ import java.util.Hashtable;
import java.util.Iterator;
import java.util.Vector;
-import org.apache.log4j.Logger;
+import de.dhbwstuttgart.logger.Logger;
import de.dhbwstuttgart.bytecode.ClassFile;
import de.dhbwstuttgart.bytecode.CodeAttribute;
diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/PreDecExpr.java b/src/de/dhbwstuttgart/syntaxtree/statement/PreDecExpr.java
index a40139a3..778f7491 100755
--- a/src/de/dhbwstuttgart/syntaxtree/statement/PreDecExpr.java
+++ b/src/de/dhbwstuttgart/syntaxtree/statement/PreDecExpr.java
@@ -6,7 +6,7 @@ import java.util.Hashtable;
import java.util.Iterator;
import java.util.Vector;
-import org.apache.log4j.Logger;
+import de.dhbwstuttgart.logger.Logger;
import de.dhbwstuttgart.bytecode.ClassFile;
import de.dhbwstuttgart.bytecode.CodeAttribute;
diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/PreIncExpr.java b/src/de/dhbwstuttgart/syntaxtree/statement/PreIncExpr.java
index 97a5bc0d..51553b2f 100755
--- a/src/de/dhbwstuttgart/syntaxtree/statement/PreIncExpr.java
+++ b/src/de/dhbwstuttgart/syntaxtree/statement/PreIncExpr.java
@@ -6,7 +6,7 @@ import java.util.Hashtable;
import java.util.Iterator;
import java.util.Vector;
-import org.apache.log4j.Logger;
+import de.dhbwstuttgart.logger.Logger;
import de.dhbwstuttgart.bytecode.ClassFile;
import de.dhbwstuttgart.bytecode.CodeAttribute;
diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/Receiver.java b/src/de/dhbwstuttgart/syntaxtree/statement/Receiver.java
index bfe41dd7..8ed2da92 100755
--- a/src/de/dhbwstuttgart/syntaxtree/statement/Receiver.java
+++ b/src/de/dhbwstuttgart/syntaxtree/statement/Receiver.java
@@ -5,7 +5,7 @@ package de.dhbwstuttgart.syntaxtree.statement;
import java.util.Hashtable;
import java.util.Vector;
-import org.apache.log4j.Logger;
+import de.dhbwstuttgart.logger.Logger;
// ino.end
diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/Return.java b/src/de/dhbwstuttgart/syntaxtree/statement/Return.java
index 865bf1da..d0c13f81 100755
--- a/src/de/dhbwstuttgart/syntaxtree/statement/Return.java
+++ b/src/de/dhbwstuttgart/syntaxtree/statement/Return.java
@@ -5,7 +5,7 @@ package de.dhbwstuttgart.syntaxtree.statement;
import java.util.Hashtable;
import java.util.Vector;
-import org.apache.log4j.Logger;
+import de.dhbwstuttgart.logger.Logger;
import de.dhbwstuttgart.bytecode.ClassFile;
import de.dhbwstuttgart.bytecode.CodeAttribute;
import de.dhbwstuttgart.bytecode.JVMCode;
diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/StringLiteral.java b/src/de/dhbwstuttgart/syntaxtree/statement/StringLiteral.java
index a1ed579f..63123426 100755
--- a/src/de/dhbwstuttgart/syntaxtree/statement/StringLiteral.java
+++ b/src/de/dhbwstuttgart/syntaxtree/statement/StringLiteral.java
@@ -6,7 +6,7 @@ import java.util.Hashtable;
import java.util.Vector;
-import org.apache.log4j.Logger;
+import de.dhbwstuttgart.logger.Logger;
import de.dhbwstuttgart.bytecode.ClassFile;
import de.dhbwstuttgart.bytecode.CodeAttribute;
import de.dhbwstuttgart.bytecode.JVMCode;
diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/This.java b/src/de/dhbwstuttgart/syntaxtree/statement/This.java
index 7733b5aa..e7c836fa 100755
--- a/src/de/dhbwstuttgart/syntaxtree/statement/This.java
+++ b/src/de/dhbwstuttgart/syntaxtree/statement/This.java
@@ -5,7 +5,7 @@ package de.dhbwstuttgart.syntaxtree.statement;
import java.util.Hashtable;
import java.util.Vector;
-import org.apache.log4j.Logger;
+import de.dhbwstuttgart.logger.Logger;
import de.dhbwstuttgart.bytecode.ClassFile;
import de.dhbwstuttgart.bytecode.CodeAttribute;
import de.dhbwstuttgart.bytecode.JVMCode;
diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/WhileStmt.java b/src/de/dhbwstuttgart/syntaxtree/statement/WhileStmt.java
index 7649743c..8d1e0ddc 100755
--- a/src/de/dhbwstuttgart/syntaxtree/statement/WhileStmt.java
+++ b/src/de/dhbwstuttgart/syntaxtree/statement/WhileStmt.java
@@ -7,7 +7,7 @@ import java.util.Hashtable;
import java.util.Iterator;
import java.util.Vector;
-import org.apache.log4j.Logger;
+import de.dhbwstuttgart.logger.Logger;
import de.dhbwstuttgart.bytecode.ClassFile;
import de.dhbwstuttgart.bytecode.CodeAttribute;
diff --git a/src/de/dhbwstuttgart/syntaxtree/type/ParaList.java b/src/de/dhbwstuttgart/syntaxtree/type/ParaList.java
index efa0b35f..6ac63a02 100755
--- a/src/de/dhbwstuttgart/syntaxtree/type/ParaList.java
+++ b/src/de/dhbwstuttgart/syntaxtree/type/ParaList.java
@@ -3,7 +3,7 @@ package de.dhbwstuttgart.syntaxtree.type;
// ino.end
// ino.module.ParaList.8674.import
import java.util.Vector;
-import org.apache.log4j.Logger;
+import de.dhbwstuttgart.logger.Logger;
// ino.end
diff --git a/src/de/dhbwstuttgart/syntaxtree/type/RefType.java b/src/de/dhbwstuttgart/syntaxtree/type/RefType.java
index ba8178dd..85e4ba2f 100755
--- a/src/de/dhbwstuttgart/syntaxtree/type/RefType.java
+++ b/src/de/dhbwstuttgart/syntaxtree/type/RefType.java
@@ -8,7 +8,7 @@ import java.util.Hashtable;
import java.util.Iterator;
import java.util.Vector;
-import org.apache.log4j.Logger;
+import de.dhbwstuttgart.logger.Logger;
import de.dhbwstuttgart.bytecode.JVMCode;
import de.dhbwstuttgart.core.IItemWithOffset;
diff --git a/src/de/dhbwstuttgart/syntaxtree/type/Void.java b/src/de/dhbwstuttgart/syntaxtree/type/Void.java
index 2ef1cd1c..1e58e564 100755
--- a/src/de/dhbwstuttgart/syntaxtree/type/Void.java
+++ b/src/de/dhbwstuttgart/syntaxtree/type/Void.java
@@ -74,5 +74,11 @@ public class Void extends RefType
public ConstraintType TYPE(TypeAssumptions ass, SyntaxTreeNode parent){
return new ConstraintType(this);
}
+
+ @Override
+ public Type checkTYPE(TypeAssumptions ass, SyntaxTreeNode method) {
+ return this;//VOID ist immer korrekt, das wird vom Parser geprüft
+ }
+
}
// ino.end
diff --git a/src/de/dhbwstuttgart/typeinference/ConstraintsSet.java b/src/de/dhbwstuttgart/typeinference/ConstraintsSet.java
index 4a28b687..13939320 100755
--- a/src/de/dhbwstuttgart/typeinference/ConstraintsSet.java
+++ b/src/de/dhbwstuttgart/typeinference/ConstraintsSet.java
@@ -57,4 +57,23 @@ public class ConstraintsSet implements Iterable{
constraint.filterWrongConstraints(unify);
}
}
+
+ public void unifyUndConstraints(Unifier unifier) {
+ Vector uCons = this.filterUndConstraints();
+
+ }
+
+ /**
+ * Aus dem ConstraintsSet [ u1, u2, ... (OderConstraint), ... uN ] werden alle
+ * UndConstraints, welche sich nicht innerhalb eines OderConstraints befinden, herausgefiltert
+ * @return [u1, ... , uN]
+ */
+ private Vector filterUndConstraints() {
+ Vector ret = new Vector<>();
+ for(OderConstraint con : constraintsSet){
+ UndConstraint filtered = con.filterUndConstraints();
+ if(filtered != null)ret.add(filtered);
+ }
+ return ret;
+ }
}
diff --git a/src/de/dhbwstuttgart/typeinference/OderConstraint.java b/src/de/dhbwstuttgart/typeinference/OderConstraint.java
index 53fd06bb..84f59d6a 100755
--- a/src/de/dhbwstuttgart/typeinference/OderConstraint.java
+++ b/src/de/dhbwstuttgart/typeinference/OderConstraint.java
@@ -2,7 +2,7 @@ package de.dhbwstuttgart.typeinference;
import java.util.Vector;
-import de.dhbwstuttgart.logger.TypinferenzLog;
+import de.dhbwstuttgart.logger.Logger;
import de.dhbwstuttgart.syntaxtree.type.RefType;
import de.dhbwstuttgart.syntaxtree.type.Type;
import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder;
@@ -11,6 +11,8 @@ import de.dhbwstuttgart.typeinference.unify.Unifier;
public class OderConstraint{
private Vector oderConstraintPairs;
+ private final static Logger logger = Logger.getLogger(OderConstraint.class.getName());
+
/**
* Erstellt ein neues Oder Constraint und fügt bereits ein Constraint hinzu.
* @param p1
@@ -81,16 +83,21 @@ public class OderConstraint{
oderConstraintPairs.add(methodConstraint);
}
- public void filterWrongConstraints(Unifier unify) {
+ void filterWrongConstraints(Unifier unifier) {
Vector filteredConstraints = new Vector<>();
for(UndConstraint cons : this.getUndConstraints()){
- if(!unify.unify(cons.getConstraintPairs()).isEmpty()){
+ Vector> unifierResult = unifier.apply(cons.getConstraintPairs());
+ if(!unifierResult.isEmpty()){
filteredConstraints.add(cons);
}else{
- TypinferenzLog.debug("Ausgesondertes Constraint: "+cons);
+ logger.debug("Ausgesondertes Constraint: "+cons);
}
}
this.oderConstraintPairs = filteredConstraints;
}
+
+ UndConstraint filterUndConstraints() {
+ return null;
+ }
}
diff --git a/src/de/dhbwstuttgart/typeinference/UndConstraint.java b/src/de/dhbwstuttgart/typeinference/UndConstraint.java
index b8f6b9cc..6dd7ec14 100755
--- a/src/de/dhbwstuttgart/typeinference/UndConstraint.java
+++ b/src/de/dhbwstuttgart/typeinference/UndConstraint.java
@@ -3,6 +3,7 @@ package de.dhbwstuttgart.typeinference;
import java.util.Vector;
import de.dhbwstuttgart.syntaxtree.type.Type;
+import de.dhbwstuttgart.typeinference.unify.Unifier;
/**
* Stellt ein Constraint dar, welches aus mehreren Constraint-Paaren besteht. Diese gelten alle stets gleichzeitig / sind per "Und" miteinander verknüpft.
@@ -36,5 +37,14 @@ public class UndConstraint extends OderConstraint {
}
return ret+"]";
}
+
+ @Override
+ void filterWrongConstraints(Unifier unifier) {
+ //In einem UndConstraint gibt es keine falschen Constraints
+ }
+ @Override
+ UndConstraint filterUndConstraints(){
+ return this;
+ }
}
diff --git a/src/de/dhbwstuttgart/typeinference/typedeployment/TypeInsertSet.java b/src/de/dhbwstuttgart/typeinference/typedeployment/TypeInsertSet.java
index 671a560d..1a34a845 100644
--- a/src/de/dhbwstuttgart/typeinference/typedeployment/TypeInsertSet.java
+++ b/src/de/dhbwstuttgart/typeinference/typedeployment/TypeInsertSet.java
@@ -5,7 +5,7 @@ import java.util.HashMap;
import java.util.Iterator;
import java.util.Vector;
-import org.apache.log4j.Logger;
+import de.dhbwstuttgart.logger.Logger;
import de.dhbwstuttgart.core.IItemWithOffset;
import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode;
diff --git a/src/de/dhbwstuttgart/typeinference/unify/CSubstitution.java b/src/de/dhbwstuttgart/typeinference/unify/CSubstitution.java
index 05cac78e..7e86182c 100755
--- a/src/de/dhbwstuttgart/typeinference/unify/CSubstitution.java
+++ b/src/de/dhbwstuttgart/typeinference/unify/CSubstitution.java
@@ -6,7 +6,7 @@ package de.dhbwstuttgart.typeinference.unify;
import java.util.Iterator;
import java.util.Vector;
-import org.apache.log4j.Logger;
+import de.dhbwstuttgart.logger.Logger;
// ino.end
diff --git a/src/de/dhbwstuttgart/typeinference/unify/Unifier.java b/src/de/dhbwstuttgart/typeinference/unify/Unifier.java
index 73478957..f51eb9b9 100644
--- a/src/de/dhbwstuttgart/typeinference/unify/Unifier.java
+++ b/src/de/dhbwstuttgart/typeinference/unify/Unifier.java
@@ -6,6 +6,6 @@ import de.dhbwstuttgart.typeinference.Pair;
public interface Unifier {
- public Vector> unify (Vector E);
+ public Vector> apply (Vector E);
}
diff --git a/src/de/dhbwstuttgart/typeinference/unify/Unify.java b/src/de/dhbwstuttgart/typeinference/unify/Unify.java
index 7e3b8221..886226a5 100755
--- a/src/de/dhbwstuttgart/typeinference/unify/Unify.java
+++ b/src/de/dhbwstuttgart/typeinference/unify/Unify.java
@@ -7,7 +7,7 @@ import java.util.Enumeration;
import java.util.Hashtable;
import java.util.Iterator;
import java.util.Vector;
-import org.apache.log4j.Logger;
+import de.dhbwstuttgart.logger.Logger;
import de.dhbwstuttgart.core.MyCompiler;
import de.dhbwstuttgart.myexception.CTypeReconstructionException;
import de.dhbwstuttgart.myexception.MatchException;
@@ -128,7 +128,7 @@ public class Unify
//WAS PASSIERT MIT EINE PAAR HIER DRIN BLEIBT???
Eq_12.addElement(P);
printMenge("Eq_12", Eq_12, 6);
- inferencelog.debug(P.OperatorEqual());
+ //inferencelog.debug(P.OperatorEqual());
}
else if (P.TA1 instanceof BoundedGenericTypeVar && P.TA2 instanceof RefType)
{ //PL 06-06-13
@@ -224,7 +224,7 @@ public class Unify
else ready = false;
sigma.addElement(new Pair(r1, r2));
}
- inferencelog.debug(ready);
+ //inferencelog.debug(ready);
if (!ready) {
printMenge("Sigma", sigma, 6);
diff --git a/test/log4jTesting.xml b/test/log4jTesting.xml
index 642079a3..dc30c245 100755
--- a/test/log4jTesting.xml
+++ b/test/log4jTesting.xml
@@ -3,10 +3,10 @@
-
+
-
+
diff --git a/test/mycompiler/test/AllTests.java b/test/mycompiler/test/AllTests.java
index c793951e..c4e1235a 100755
--- a/test/mycompiler/test/AllTests.java
+++ b/test/mycompiler/test/AllTests.java
@@ -13,7 +13,7 @@ import mycompiler.test.operators.AllTestsOperators;
import mycompiler.test.primitiveTypes.AllTestsPrimitiveTypes;
import mycompiler.test.trivial.AllTestsTrivial;
-import org.apache.log4j.xml.DOMConfigurator;
+import de.dhbwstuttgart.logger.xml.DOMConfigurator;
public class AllTests {
diff --git a/test/mycompiler/test/Log4jWrapper.java b/test/mycompiler/test/Log4jWrapper.java
index 45692360..715dedb2 100755
--- a/test/mycompiler/test/Log4jWrapper.java
+++ b/test/mycompiler/test/Log4jWrapper.java
@@ -1,6 +1,6 @@
package mycompiler.test;
-import org.apache.log4j.xml.DOMConfigurator;
+import de.dhbwstuttgart.logger.xml.DOMConfigurator;
/**
* needed to assure one-time execution of configure script
diff --git a/test/mycompiler/test/inferenceByCharacteristic/TestInferenceOwnTypeByMethodCall.java b/test/mycompiler/test/inferenceByCharacteristic/TestInferenceOwnTypeByMethodCall.java
index fb2bf184..aac98c00 100755
--- a/test/mycompiler/test/inferenceByCharacteristic/TestInferenceOwnTypeByMethodCall.java
+++ b/test/mycompiler/test/inferenceByCharacteristic/TestInferenceOwnTypeByMethodCall.java
@@ -1,6 +1,6 @@
package mycompiler.test.inferenceByCharacteristic;
-import org.apache.log4j.xml.DOMConfigurator;
+import de.dhbwstuttgart.logger.xml.DOMConfigurator;
import de.dhbwstuttgart.syntaxtree.type.RefType;
import mycompiler.test.AbstractInferenceTest;
diff --git a/test/mycompiler/test/unittest/typeReconstructionTest/TrMakeFCTest.java b/test/mycompiler/test/unittest/typeReconstructionTest/TrMakeFCTest.java
index 2863bf1c..ae4f48cd 100755
--- a/test/mycompiler/test/unittest/typeReconstructionTest/TrMakeFCTest.java
+++ b/test/mycompiler/test/unittest/typeReconstructionTest/TrMakeFCTest.java
@@ -4,8 +4,8 @@ import java.util.Vector;
import junit.framework.TestCase;
-import org.apache.log4j.Logger;
-import org.apache.log4j.xml.DOMConfigurator;
+import de.dhbwstuttgart.logger.Logger;
+import de.dhbwstuttgart.logger.xml.DOMConfigurator;
import de.dhbwstuttgart.syntaxtree.Class;
import de.dhbwstuttgart.syntaxtree.ClassBody;
diff --git a/test/mycompiler/test/unittest/typeReconstructionTest/TrSubUnifyTest.java b/test/mycompiler/test/unittest/typeReconstructionTest/TrSubUnifyTest.java
index 537464c6..e9ea300f 100755
--- a/test/mycompiler/test/unittest/typeReconstructionTest/TrSubUnifyTest.java
+++ b/test/mycompiler/test/unittest/typeReconstructionTest/TrSubUnifyTest.java
@@ -5,8 +5,8 @@ import java.util.Vector;
import junit.framework.TestCase;
-import org.apache.log4j.Logger;
-import org.apache.log4j.xml.DOMConfigurator;
+import de.dhbwstuttgart.logger.Logger;
+import de.dhbwstuttgart.logger.xml.DOMConfigurator;
import org.junit.After;
import org.junit.Before;
import org.junit.BeforeClass;
diff --git a/test/mycompiler/test/unittest/typeReconstructionTest/TrUnifyTest.java b/test/mycompiler/test/unittest/typeReconstructionTest/TrUnifyTest.java
index 75765509..7a42c8d2 100755
--- a/test/mycompiler/test/unittest/typeReconstructionTest/TrUnifyTest.java
+++ b/test/mycompiler/test/unittest/typeReconstructionTest/TrUnifyTest.java
@@ -4,7 +4,7 @@ import java.util.Vector;
import junit.framework.TestCase;
-import org.apache.log4j.xml.DOMConfigurator;
+import de.dhbwstuttgart.logger.xml.DOMConfigurator;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
diff --git a/test/plugindevelopment/TypeInsertTester.java b/test/plugindevelopment/TypeInsertTester.java
index aba7e5b8..1b2df547 100644
--- a/test/plugindevelopment/TypeInsertTester.java
+++ b/test/plugindevelopment/TypeInsertTester.java
@@ -10,12 +10,7 @@ import java.nio.file.Files;
import java.nio.file.Paths;
import java.util.Vector;
-import org.apache.log4j.ConsoleAppender;
-import org.apache.log4j.FileAppender;
-import org.apache.log4j.Level;
-import org.apache.log4j.Logger;
-import org.apache.log4j.PatternLayout;
-import org.apache.log4j.SimpleLayout;
+import de.dhbwstuttgart.logger.Logger;
import de.dhbwstuttgart.core.MyCompiler;
import de.dhbwstuttgart.core.MyCompilerAPI;
@@ -31,11 +26,14 @@ public class TypeInsertTester{
private static Logger inferencelog = Logger.getLogger("Typeinference");
static{
{
+ Logger.setStandardOutput(System.out);
+ /*
// Ausgabeoptionen fuer die Logger
ConsoleAppender logAppender = new ConsoleAppender(new SimpleLayout());
logAppender.setTarget("System.out");
logAppender.activateOptions();
inferencelog.addAppender(logAppender); //Bei den Tests wird der Log auch in System.out geschrieben.
+ */
}
}
static final String rootDirectory = System.getProperty("user.dir")+"/test/plugindevelopment/";