diff --git a/src/mycompiler/myclass/Method.java b/src/mycompiler/myclass/Method.java index 58041076..b645a312 100755 --- a/src/mycompiler/myclass/Method.java +++ b/src/mycompiler/myclass/Method.java @@ -695,5 +695,7 @@ public class Method extends Field implements ITypeReplacementListener, IItemWith return ret; } + + } // ino.end diff --git a/src/mycompiler/mystatement/Block.java b/src/mycompiler/mystatement/Block.java index ea072094..b394c7c7 100755 --- a/src/mycompiler/mystatement/Block.java +++ b/src/mycompiler/mystatement/Block.java @@ -67,15 +67,7 @@ public class Block extends Statement // ino.attribute.statements.25047.declaration public Vector statements = new Vector(); // ino.end - // ino.attribute.HashTabelleKlasse.25050.declaration - private Hashtable HashTabelleKlasse; - // ino.end - // ino.attribute.HashTabelleBlock.25053.declaration - private Hashtable HashTabelleBlock; - // ino.end - // ino.attribute.block_para.25056.declaration - private Hashtable block_para; - // ino.end + //private String sc_meth_ret_type; // ino.attribute.inferencelog.25059.decldescription type=javadoc @@ -223,6 +215,7 @@ public class Block extends Statement @Override public ConstraintsSet TYPEStmt(TypeAssumptions assumptions) { ConstraintsSet ret = new ConstraintsSet(); + if(statements.size()==0)this.setType(new Void(0)); /* this.setTypeVariable(TypePlaceholder.fresh(this)); */ for(Statement stmt : statements){ typinferenceLog.debug("Prozessing statement: "+stmt); @@ -306,9 +299,7 @@ public class Block extends Statement return ret.attach("}"); } - - - + @Override public Vector getChildren() { Vector ret = new Vector(); diff --git a/src/mycompiler/mystatement/BoolLiteral.java b/src/mycompiler/mystatement/BoolLiteral.java index 646e5736..10b6e39b 100755 --- a/src/mycompiler/mystatement/BoolLiteral.java +++ b/src/mycompiler/mystatement/BoolLiteral.java @@ -5,6 +5,7 @@ package mycompiler.mystatement; import java.util.Hashtable; import java.util.Vector; +import mycompiler.SyntaxTreeNode; import mycompiler.mybytecode.ClassFile; import mycompiler.mybytecode.CodeAttribute; import mycompiler.mybytecode.JVMCode; @@ -25,6 +26,7 @@ import org.apache.log4j.Logger; // ino.end + import typinferenz.ConstraintsSet; import typinferenz.JavaCodeResult; import typinferenz.ResultSet; @@ -190,6 +192,14 @@ public class BoolLiteral extends Literal return new JavaCodeResult("false"); } + + + @Override + public Vector getChildren() { + Vector ret = new Vector(); + return ret; + } + } // ino.end diff --git a/src/mycompiler/mystatement/CharLiteral.java b/src/mycompiler/mystatement/CharLiteral.java index e19d3022..c1ed8893 100755 --- a/src/mycompiler/mystatement/CharLiteral.java +++ b/src/mycompiler/mystatement/CharLiteral.java @@ -5,6 +5,7 @@ package mycompiler.mystatement; import java.util.Hashtable; import java.util.Vector; +import mycompiler.SyntaxTreeNode; import mycompiler.mybytecode.ClassFile; import mycompiler.mybytecode.CodeAttribute; import mycompiler.mybytecode.JVMCode; @@ -26,6 +27,7 @@ import org.apache.log4j.Logger; // ino.end + import typinferenz.ConstraintsSet; import typinferenz.JavaCodeResult; import typinferenz.ResultSet; @@ -181,6 +183,10 @@ public class CharLiteral extends Literal public JavaCodeResult printJavaCode(ResultSet resultSet) { return new JavaCodeResult("'"+String.valueOf(this.Char)+"'"); } - + @Override + public Vector getChildren() { + Vector ret = new Vector(); + return ret; + } } // ino.end diff --git a/src/mycompiler/mystatement/DoubleLiteral.java b/src/mycompiler/mystatement/DoubleLiteral.java index b302f5ad..766234de 100755 --- a/src/mycompiler/mystatement/DoubleLiteral.java +++ b/src/mycompiler/mystatement/DoubleLiteral.java @@ -5,6 +5,7 @@ package mycompiler.mystatement; import java.util.Hashtable; import java.util.Vector; +import mycompiler.SyntaxTreeNode; import mycompiler.mybytecode.ClassFile; import mycompiler.mybytecode.CodeAttribute; import mycompiler.mybytecode.JVMCode; @@ -213,6 +214,10 @@ public JavaCodeResult printJavaCode(ResultSet resultSet) { // TODO Auto-generated method stub return null; } - + @Override + public Vector getChildren() { + Vector ret = new Vector(); + return ret; + } } // ino.end diff --git a/src/mycompiler/mystatement/FloatLiteral.java b/src/mycompiler/mystatement/FloatLiteral.java index af4c1e68..55cec4f8 100755 --- a/src/mycompiler/mystatement/FloatLiteral.java +++ b/src/mycompiler/mystatement/FloatLiteral.java @@ -5,6 +5,7 @@ package mycompiler.mystatement; import java.util.Hashtable; import java.util.Vector; +import mycompiler.SyntaxTreeNode; import mycompiler.mybytecode.ClassFile; import mycompiler.mybytecode.CodeAttribute; import mycompiler.myclass.Class; @@ -207,6 +208,10 @@ public JavaCodeResult printJavaCode(ResultSet resultSet) { // TODO Auto-generated method stub return null; } - + @Override + public Vector getChildren() { + Vector ret = new Vector(); + return ret; + } } // ino.end diff --git a/src/mycompiler/mystatement/ForStmt.java b/src/mycompiler/mystatement/ForStmt.java index 9c266e76..1cd575f5 100755 --- a/src/mycompiler/mystatement/ForStmt.java +++ b/src/mycompiler/mystatement/ForStmt.java @@ -5,6 +5,7 @@ import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; +import mycompiler.SyntaxTreeNode; import mycompiler.mybytecode.ClassFile; import mycompiler.mybytecode.CodeAttribute; import mycompiler.mybytecode.JVMCode; @@ -131,4 +132,12 @@ public JavaCodeResult printJavaCode(ResultSet resultSet) { // TODO Auto-generated method stub throw new NotImplementedException(); } + + @Override + public Vector getChildren() { + Vector ret = new Vector(); + ret.add(this.body_Loop_block); + throw new NotImplementedException(); + //return ret; + } } \ No newline at end of file diff --git a/src/mycompiler/mystatement/IntLiteral.java b/src/mycompiler/mystatement/IntLiteral.java index 19976869..e14635f1 100755 --- a/src/mycompiler/mystatement/IntLiteral.java +++ b/src/mycompiler/mystatement/IntLiteral.java @@ -5,6 +5,7 @@ package mycompiler.mystatement; import java.util.Hashtable; import java.util.Vector; +import mycompiler.SyntaxTreeNode; import mycompiler.mybytecode.ClassFile; import mycompiler.mybytecode.CodeAttribute; import mycompiler.mybytecode.JVMCode; @@ -26,6 +27,7 @@ import org.apache.log4j.Logger; // ino.end + import sun.reflect.generics.reflectiveObjects.NotImplementedException; import typinferenz.ConstraintsSet; import typinferenz.JavaCodeResult; @@ -212,6 +214,10 @@ public class IntLiteral extends Literal public JavaCodeResult printJavaCode(ResultSet resultSet) { return new JavaCodeResult(String.valueOf(this.Int)); } - + @Override + public Vector getChildren() { + Vector ret = new Vector(); + return ret; + } } // ino.end diff --git a/src/mycompiler/mystatement/LambdaExpression.java b/src/mycompiler/mystatement/LambdaExpression.java index ea4d47a3..c5a24d0d 100755 --- a/src/mycompiler/mystatement/LambdaExpression.java +++ b/src/mycompiler/mystatement/LambdaExpression.java @@ -13,6 +13,7 @@ import typinferenz.Typeable; import typinferenz.TypinferenzException; import typinferenz.assumptions.ParameterAssumption; import typinferenz.assumptions.TypeAssumptions; +import mycompiler.SyntaxTreeNode; import mycompiler.mybytecode.ClassFile; import mycompiler.mybytecode.CodeAttribute; import mycompiler.myclass.Class; @@ -164,4 +165,11 @@ public class LambdaExpression extends Expr{ return ret; } + @Override + public Vector getChildren() { + Vector ret = new Vector(); + ret.add(this.method_body); + return ret; + } + } diff --git a/src/mycompiler/mystatement/LocalOrFieldVar.java b/src/mycompiler/mystatement/LocalOrFieldVar.java index ebaf14a2..4efc34d4 100755 --- a/src/mycompiler/mystatement/LocalOrFieldVar.java +++ b/src/mycompiler/mystatement/LocalOrFieldVar.java @@ -6,6 +6,7 @@ import java.util.Enumeration; import java.util.Hashtable; import java.util.Vector; +import mycompiler.SyntaxTreeNode; import mycompiler.mybytecode.ClassFile; import mycompiler.mybytecode.CodeAttribute; import mycompiler.mybytecode.JVMCode; @@ -32,6 +33,7 @@ import org.apache.log4j.Logger; // ino.end + import sun.reflect.generics.reflectiveObjects.NotImplementedException; import typinferenz.JavaCodeResult; import typinferenz.SingleConstraint; @@ -220,5 +222,11 @@ public class LocalOrFieldVar extends Expr return new JavaCodeResult(this.get_Name()); } + @Override + public Vector getChildren() { + Vector ret = new Vector(); + return ret; + } + } // ino.end diff --git a/src/mycompiler/mystatement/LocalVarDecl.java b/src/mycompiler/mystatement/LocalVarDecl.java index 7c0f301c..e73d713a 100755 --- a/src/mycompiler/mystatement/LocalVarDecl.java +++ b/src/mycompiler/mystatement/LocalVarDecl.java @@ -12,6 +12,7 @@ import mycompiler.myclass.Class; import mycompiler.myclass.ClassHelper; import mycompiler.myclass.DeclId; import mycompiler.MyCompiler; +import mycompiler.SyntaxTreeNode; import mycompiler.myexception.JVMCodeException; import mycompiler.myexception.SCExcept; import mycompiler.myexception.SCStatementException; @@ -37,6 +38,7 @@ import org.apache.log4j.Logger; + import typinferenz.ConstraintsSet; import typinferenz.FreshTypeVariable; import typinferenz.JavaCodeResult; @@ -516,5 +518,10 @@ public class LocalVarDecl extends Statement implements TypeInsertable return this.get_Name(); } + @Override + public Vector getChildren() { + Vector ret = new Vector(); + return ret; + } } // ino.end diff --git a/src/mycompiler/mystatement/LongLiteral.java b/src/mycompiler/mystatement/LongLiteral.java index 405d87a2..31d1b724 100755 --- a/src/mycompiler/mystatement/LongLiteral.java +++ b/src/mycompiler/mystatement/LongLiteral.java @@ -5,6 +5,7 @@ package mycompiler.mystatement; import java.util.Hashtable; import java.util.Vector; +import mycompiler.SyntaxTreeNode; import mycompiler.mybytecode.ClassFile; import mycompiler.mybytecode.CodeAttribute; import mycompiler.mybytecode.JVMCode; @@ -212,6 +213,10 @@ public JavaCodeResult printJavaCode(ResultSet resultSet) { // TODO Auto-generated method stub return null; } - + @Override + public Vector getChildren() { + Vector ret = new Vector(); + return ret; + } } // ino.end diff --git a/src/mycompiler/mystatement/MethodCall.java b/src/mycompiler/mystatement/MethodCall.java index c8d59e3b..b6304f2b 100755 --- a/src/mycompiler/mystatement/MethodCall.java +++ b/src/mycompiler/mystatement/MethodCall.java @@ -7,6 +7,7 @@ import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; +import mycompiler.SyntaxTreeNode; import mycompiler.mybytecode.ClassFile; import mycompiler.mybytecode.CodeAttribute; import mycompiler.mybytecode.JVMCode; @@ -50,6 +51,7 @@ import org.apache.log4j.Logger; // ino.end + import sun.reflect.generics.reflectiveObjects.NotImplementedException; import typinferenz.ConstraintsSet; import typinferenz.FreshTypeVariable; @@ -93,15 +95,13 @@ public class MethodCall extends Expr private Receiver receiver; // ino.end // ino.attribute.arglist.25642.declaration - private ArgumentList arglist=null; + private ArgumentList arglist=new ArgumentList(); // ino.end private Vector exprtypes=new Vector(); //hier werden die Typen der �bergabewerten von sc_check eingetragen. // ino.attribute.class_name.25645.declaration private String class_name; //hier steht in welcher Klasse die Methode deklariert ist. // ino.end - // ino.attribute.called_method.25648.declaration - private Method called_method=null; //hier steht nach Ende von sc_check die aufgerufene Methode. - // ino.end + // ino.attribute.uebernachdurch.25651.declaration private Hashtable uebernachdurch; // ino.end @@ -268,7 +268,7 @@ public class MethodCall extends Expr String receiverClassName=((RefType)receiver.get_Expr().getType()).getTypeName(); // Die richtige Methode wird gesucht und gesetzt - called_method=getMethodFittingMethodCallAndClassname(receiverClassName); + Method called_method=getMethodFittingMethodCallAndClassname(receiverClassName); Vector name_vector = get_Name_Vector(); @@ -709,6 +709,21 @@ public class MethodCall extends Expr return ret.attach(";"); } + @Override + public Vector getChildren() { + Vector ret = new Vector(); + for(Expr e : this.arglist.expr){ + ret.add(e); + } + if(this.receiver!=null)ret.add(this.receiver.get_Expr()); + return ret; + } + + @Override + public void parserPostProcessing(SyntaxTreeNode parent) { + super.parserPostProcessing(parent); + } + } // ino.end diff --git a/src/mycompiler/mystatement/NewClass.java b/src/mycompiler/mystatement/NewClass.java index 63c75dd4..afc7c20b 100755 --- a/src/mycompiler/mystatement/NewClass.java +++ b/src/mycompiler/mystatement/NewClass.java @@ -7,6 +7,7 @@ import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; +import mycompiler.SyntaxTreeNode; import mycompiler.mybytecode.ClassFile; import mycompiler.mybytecode.CodeAttribute; import mycompiler.mybytecode.JVMCode; @@ -35,6 +36,8 @@ import org.apache.log4j.Logger; // ino.end + + import typinferenz.JavaCodeResult; import typinferenz.Overloading; import typinferenz.SingleConstraint; @@ -243,7 +246,7 @@ public class NewClass extends Expr MethodCall newAufruf = new MethodCall(0,0); this.setType(new RefType(this.get_Name(),0)); newAufruf.type = new RefType(this.get_Name(),0); - newAufruf.set_Name(""); + newAufruf.set_Name(this.get_Name()); newAufruf.set_Receiver(null); ret.add(new Overloading(assumptions, newAufruf, this.getType()).generateConsstraints()); @@ -281,5 +284,15 @@ public class NewClass extends Expr return ret; } + @Override + public Vector getChildren() { + Vector ret = new Vector(); + if(this.arglist!=null)for(Expr e : this.arglist.expr){ + ret.add(e); + } + return ret; + } + + } // ino.end diff --git a/src/mycompiler/mystatement/Return.java b/src/mycompiler/mystatement/Return.java index 70297c5b..50a5cc7a 100755 --- a/src/mycompiler/mystatement/Return.java +++ b/src/mycompiler/mystatement/Return.java @@ -5,6 +5,7 @@ package mycompiler.mystatement; import java.util.Hashtable; import java.util.Vector; +import mycompiler.SyntaxTreeNode; import mycompiler.mybytecode.ClassFile; import mycompiler.mybytecode.CodeAttribute; import mycompiler.mybytecode.JVMCode; @@ -27,6 +28,7 @@ import org.apache.log4j.Logger; // ino.end + import sun.reflect.generics.reflectiveObjects.NotImplementedException; import typinferenz.JavaCodeResult; import typinferenz.SingleConstraint; @@ -142,6 +144,13 @@ public class Return extends Statement ret.attach(this.retexpr.printJavaCode(resultSet)); return ret.attach(";"); } + + @Override + public Vector getChildren() { + Vector ret = new Vector(); + ret.add(this.retexpr); + return ret; + } } // ino.end diff --git a/src/mycompiler/mystatement/StringLiteral.java b/src/mycompiler/mystatement/StringLiteral.java index 56705fc4..4ad18a42 100755 --- a/src/mycompiler/mystatement/StringLiteral.java +++ b/src/mycompiler/mystatement/StringLiteral.java @@ -5,6 +5,7 @@ package mycompiler.mystatement; import java.util.Hashtable; import java.util.Vector; +import mycompiler.SyntaxTreeNode; import mycompiler.mybytecode.ClassFile; import mycompiler.mybytecode.CodeAttribute; import mycompiler.mybytecode.JVMCode; @@ -25,6 +26,7 @@ import org.apache.log4j.Logger; // ino.end + import typinferenz.ConstraintsSet; import typinferenz.JavaCodeResult; import typinferenz.ResultSet; @@ -143,6 +145,12 @@ public class StringLiteral extends Literal public JavaCodeResult printJavaCode(ResultSet resultSet) { return new JavaCodeResult("\""+this.string+"\""); } + + @Override + public Vector getChildren() { + Vector ret = new Vector(); + return ret; + } } diff --git a/src/mycompiler/mystatement/This.java b/src/mycompiler/mystatement/This.java index 9942e600..d4756945 100755 --- a/src/mycompiler/mystatement/This.java +++ b/src/mycompiler/mystatement/This.java @@ -5,6 +5,7 @@ package mycompiler.mystatement; import java.util.Hashtable; import java.util.Vector; +import mycompiler.SyntaxTreeNode; import mycompiler.mybytecode.ClassFile; import mycompiler.mybytecode.CodeAttribute; import mycompiler.mybytecode.JVMCode; @@ -27,6 +28,7 @@ import org.apache.log4j.Logger; // ino.end + import typinferenz.ConstraintsSet; import typinferenz.JavaCodeResult; import typinferenz.ResultSet; @@ -185,5 +187,11 @@ public class This extends Expr return new JavaCodeResult("this"); } + @Override + public Vector getChildren() { + Vector ret = new Vector(); + return ret; + } + } // ino.end diff --git a/src/mycompiler/mystatement/WhileStmt.java b/src/mycompiler/mystatement/WhileStmt.java index 97a8194c..ff9989ee 100755 --- a/src/mycompiler/mystatement/WhileStmt.java +++ b/src/mycompiler/mystatement/WhileStmt.java @@ -7,6 +7,7 @@ import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; +import mycompiler.SyntaxTreeNode; import mycompiler.mybytecode.ClassFile; import mycompiler.mybytecode.CodeAttribute; import mycompiler.mybytecode.JVMCode; @@ -36,6 +37,7 @@ import org.apache.log4j.Logger; // ino.end + import sun.reflect.generics.reflectiveObjects.NotImplementedException; import typinferenz.JavaCodeResult; import typinferenz.SingleConstraint; @@ -200,5 +202,13 @@ public class WhileStmt extends Statement public JavaCodeResult printJavaCode(ResultSet resultSet) { return new JavaCodeResult().attach("while(").attach(this.expr.printJavaCode(resultSet)).attach(")").attach(this.loop_block.printJavaCode(resultSet)); } + + @Override + public Vector getChildren() { + Vector ret = new Vector(); + ret.add(this.expr); + ret.add(this.loop_block); + return ret; + } } // ino.end diff --git a/src/typinferenz/FunNMethod.java b/src/typinferenz/FunNMethod.java index 48d60fa3..7581f9b8 100644 --- a/src/typinferenz/FunNMethod.java +++ b/src/typinferenz/FunNMethod.java @@ -1,6 +1,9 @@ package typinferenz; -import mycompiler.myclass.Method; +import java.util.Vector; + +import mycompiler.myclass.*; +import mycompiler.mytype.TypePlaceholder; public class FunNMethod extends Method{ @@ -9,7 +12,18 @@ public class FunNMethod extends Method{ * @param N - Anzahl der Parameter (Beispiel: Fun2) */ public FunNMethod(int N){ - + this.setType(TypePlaceholder.fresh(this)); + ParameterList pl = new ParameterList(); + Vector fpList = new Vector(); + for(int i = 0;i(); this.addConstraint(constraintPair); diff --git a/src/typinferenz/assumptions/MethodAssumption.java b/src/typinferenz/assumptions/MethodAssumption.java index 4b4c5184..b1036cf4 100644 --- a/src/typinferenz/assumptions/MethodAssumption.java +++ b/src/typinferenz/assumptions/MethodAssumption.java @@ -39,6 +39,8 @@ public class MethodAssumption extends FieldAssumption { } - + public String toString(){ + return "MethodAssumption: "+this.method.toString(); + } } diff --git a/test/mycompiler/test/lambda/parseMultipleFilesFile1.jav b/test/mycompiler/test/lambda/parseMultipleFilesFile1.jav index 79a5554a..e51527c0 100755 --- a/test/mycompiler/test/lambda/parseMultipleFilesFile1.jav +++ b/test/mycompiler/test/lambda/parseMultipleFilesFile1.jav @@ -7,4 +7,12 @@ testMethode(){ return var1.getVar1(); } -} \ No newline at end of file +} + +class Klasse1 { + var1; + + int getVar1(){ + return var1; + } +} diff --git a/test/mycompiler/test/lambda/testResults/LambdaTest.log b/test/mycompiler/test/lambda/testResults/LambdaTest.log index 7421bb94..47aabcb4 100644 --- a/test/mycompiler/test/lambda/testResults/LambdaTest.log +++ b/test/mycompiler/test/lambda/testResults/LambdaTest.log @@ -1,11 +1,166 @@ -Class DEBUG [Typeinference] Erstellte Assumptions: this: WhileTestMethod Assumptions: -[typinferenz.assumptions.MethodAssumption@53be6b71, typinferenz.assumptions.MethodAssumption@7a7ff2aa] +Class DEBUG [Typeinference] Erstellte Assumptions: this: Klasse2Method Assumptions: +[MethodAssumption: TPH B null { [(var1 = NEW Klasse1), null Return null (var1.getVar1( [ ]))], MethodAssumption: Klasse2 null { []] FieldVar Assumptions: -[typinferenz.assumptions.FieldAssumption@6614b5ba] +[typinferenz.assumptions.FieldAssumption@3ea4e3ae] LocalVar Assumptions: [] Parameter Assumptions: [] -Block DEBUG [Typeinference] Prozessing statement: WHILE null { [(var = mycompiler.mystatement.StringLiteral@49940c14)] -Block DEBUG [Typeinference] Prozessing statement: (var = mycompiler.mystatement.StringLiteral@49940c14) +Class DEBUG [Typeinference] Erstellte Assumptions: this: Klasse1Method Assumptions: +[MethodAssumption: int int { [null Return var1], MethodAssumption: Klasse1 null { []] +FieldVar Assumptions: +[typinferenz.assumptions.FieldAssumption@1799e2e2] +LocalVar Assumptions: +[] +Parameter Assumptions: +[] + +Block DEBUG [Typeinference] Prozessing statement: (var1 = NEW Klasse1) +Block DEBUG [Typeinference] Prozessing statement: null Return null (var1.getVar1( [ ])) +Block DEBUG [Typeinference] Prozessing statement: TPH K Return TPH J (var1: TPH A.getVar1( [ ])) +Block DEBUG [Typeinference] Prozessing statement: void(var1: TPH A = NEW Klasse1) +Class DEBUG [Typeinference] Erstellte Constraints: TPH A < TPH A +[(Klasse1 <. Klasse1), (Klasse1 <. Klasse1), ] +Klasse1 < TPH A +TPH A < TPH I +[(int <. TPH J), (TPH A <. Klasse1), (int <. TPH J), (TPH A <. Klasse1), ] +TPH J < TPH K +TPH K < TPH B + +SourceFile DEBUG [Typeinference] Karthesisches Produkt der Constraints: [[(TPH A <. TPH A), (Klasse1 <. Klasse1), (Klasse1 <. TPH A), (TPH A <. TPH I), (int <. TPH J), (TPH A <. Klasse1), (TPH J <. TPH K), (TPH K <. TPH B)], [(TPH A <. TPH A), (Klasse1 <. Klasse1), (Klasse1 <. TPH A), (TPH A <. TPH I), (int <. TPH J), (TPH A <. Klasse1), (TPH J <. TPH K), (TPH K <. TPH B)], [(TPH A <. TPH A), (Klasse1 <. Klasse1), (Klasse1 <. TPH A), (TPH A <. TPH I), (int <. TPH J), (TPH A <. Klasse1), (TPH J <. TPH K), (TPH K <. TPH B)], [(TPH A <. TPH A), (Klasse1 <. Klasse1), (Klasse1 <. TPH A), (TPH A <. TPH I), (int <. TPH J), (TPH A <. Klasse1), (TPH J <. TPH K), (TPH K <. TPH B)]] +SourceFile DEBUG [Typeinference] Unifiziertes Ergebnis: [[(TPH B = int), (TPH I = Klasse1), (TPH K = int), (TPH A = Klasse1), (TPH J = int)]] +SourceFile DEBUG [Typeinference] +JavaFiles: + +SourceFile DEBUG [Typeinference] JavaFile für ResultSet Unified Constraints: [(TPH B = int), (TPH I = Klasse1), (TPH K = int), (TPH A = Klasse1), (TPH J = int)] + +SourceFile DEBUG [Typeinference] class Klasse2 extends Object +{ +Klasse1 var1; +int testMethode() +{ +var1 = new Klasse1(); +return var1.getVar1();; +} +Klasse2 Klasse2() +{ +} +} + +SourceFile DEBUG [Typeinference] Unifiziertes Ergebnis: [[(TPH B = int), (TPH I = Klasse1), (TPH K = int), (TPH A = Klasse1), (TPH J = int)]] +SourceFile DEBUG [Typeinference] +JavaFiles: + +SourceFile DEBUG [Typeinference] JavaFile für ResultSet Unified Constraints: [(TPH B = int), (TPH I = Klasse1), (TPH K = int), (TPH A = Klasse1), (TPH J = int)] + +SourceFile DEBUG [Typeinference] class Klasse2 extends Object +{ +Klasse1 var1; +int testMethode() +{ +var1 = new Klasse1(); +return var1.getVar1();; +} +Klasse2 Klasse2() +{ +} +} + +SourceFile DEBUG [Typeinference] Unifiziertes Ergebnis: [[(TPH B = int), (TPH I = Klasse1), (TPH K = int), (TPH A = Klasse1), (TPH J = int)]] +SourceFile DEBUG [Typeinference] +JavaFiles: + +SourceFile DEBUG [Typeinference] JavaFile für ResultSet Unified Constraints: [(TPH B = int), (TPH I = Klasse1), (TPH K = int), (TPH A = Klasse1), (TPH J = int)] + +SourceFile DEBUG [Typeinference] class Klasse2 extends Object +{ +Klasse1 var1; +int testMethode() +{ +var1 = new Klasse1(); +return var1.getVar1();; +} +Klasse2 Klasse2() +{ +} +} + +SourceFile DEBUG [Typeinference] Unifiziertes Ergebnis: [[(TPH B = int), (TPH I = Klasse1), (TPH K = int), (TPH A = Klasse1), (TPH J = int)]] +SourceFile DEBUG [Typeinference] +JavaFiles: + +SourceFile DEBUG [Typeinference] JavaFile für ResultSet Unified Constraints: [(TPH B = int), (TPH I = Klasse1), (TPH K = int), (TPH A = Klasse1), (TPH J = int)] + +SourceFile DEBUG [Typeinference] class Klasse2 extends Object +{ +Klasse1 var1; +int testMethode() +{ +var1 = new Klasse1(); +return var1.getVar1();; +} +Klasse2 Klasse2() +{ +} +} + +Block DEBUG [Typeinference] Prozessing statement: null Return var1 +Block DEBUG [Typeinference] Prozessing statement: TPH L Return var1: TPH D +Class DEBUG [Typeinference] Erstellte Constraints: TPH D < TPH D +TPH D < TPH L +TPH L < int + +SourceFile DEBUG [Typeinference] Karthesisches Produkt der Constraints: [[(TPH D <. TPH D), (TPH D <. TPH L), (TPH L <. int)]] +SourceFile DEBUG [Typeinference] Unifiziertes Ergebnis: [[(TPH D = int), (TPH L = int)]] +SourceFile DEBUG [Typeinference] +JavaFiles: + +SourceFile DEBUG [Typeinference] JavaFile für ResultSet Unified Constraints: [(TPH D = int), (TPH L = int)] + +SourceFile DEBUG [Typeinference] class Klasse1 extends Object +{ +int var1; +int getVar1() +{ +return var1; +} +Klasse1 Klasse1() +{ +} +} + +Class DEBUG [Typeinference] Erstellte Assumptions: this: Klasse1Method Assumptions: +[MethodAssumption: int int { [null Return var1], MethodAssumption: Klasse1 null { []] +FieldVar Assumptions: +[typinferenz.assumptions.FieldAssumption@744578e0] +LocalVar Assumptions: +[] +Parameter Assumptions: +[] + +Block DEBUG [Typeinference] Prozessing statement: null Return var1 +Block DEBUG [Typeinference] Prozessing statement: TPH M Return var1: TPH F +Class DEBUG [Typeinference] Erstellte Constraints: TPH F < TPH F +TPH F < TPH M +TPH M < int + +SourceFile DEBUG [Typeinference] Karthesisches Produkt der Constraints: [[(TPH F <. TPH F), (TPH F <. TPH M), (TPH M <. int)]] +SourceFile DEBUG [Typeinference] Unifiziertes Ergebnis: [[(TPH F = int), (TPH M = int)]] +SourceFile DEBUG [Typeinference] +JavaFiles: + +SourceFile DEBUG [Typeinference] JavaFile für ResultSet Unified Constraints: [(TPH F = int), (TPH M = int)] + +SourceFile DEBUG [Typeinference] class Klasse1 extends Object +{ +int var1; +int getVar1() +{ +return var1; +} +Klasse1 Klasse1() +{ +} +} +