FunNMethode implementiert

This commit is contained in:
JanUlrich 2014-02-22 04:58:49 +01:00
parent 282b068552
commit b891ad4580
23 changed files with 337 additions and 32 deletions

View File

@ -695,5 +695,7 @@ public class Method extends Field implements ITypeReplacementListener, IItemWith
return ret;
}
}
// ino.end

View File

@ -67,15 +67,7 @@ public class Block extends Statement
// ino.attribute.statements.25047.declaration
public Vector<Statement> statements = new Vector<Statement>();
// ino.end
// ino.attribute.HashTabelleKlasse.25050.declaration
private Hashtable HashTabelleKlasse;
// ino.end
// ino.attribute.HashTabelleBlock.25053.declaration
private Hashtable<String,String> HashTabelleBlock;
// ino.end
// ino.attribute.block_para.25056.declaration
private Hashtable<String,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<SyntaxTreeNode> getChildren() {
Vector<SyntaxTreeNode> ret = new Vector<SyntaxTreeNode>();

View File

@ -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<SyntaxTreeNode> getChildren() {
Vector<SyntaxTreeNode> ret = new Vector<SyntaxTreeNode>();
return ret;
}
}
// ino.end

View File

@ -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<SyntaxTreeNode> getChildren() {
Vector<SyntaxTreeNode> ret = new Vector<SyntaxTreeNode>();
return ret;
}
}
// ino.end

View File

@ -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<SyntaxTreeNode> getChildren() {
Vector<SyntaxTreeNode> ret = new Vector<SyntaxTreeNode>();
return ret;
}
}
// ino.end

View File

@ -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<SyntaxTreeNode> getChildren() {
Vector<SyntaxTreeNode> ret = new Vector<SyntaxTreeNode>();
return ret;
}
}
// ino.end

View File

@ -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<SyntaxTreeNode> getChildren() {
Vector<SyntaxTreeNode> ret = new Vector<SyntaxTreeNode>();
ret.add(this.body_Loop_block);
throw new NotImplementedException();
//return ret;
}
}

View File

@ -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<SyntaxTreeNode> getChildren() {
Vector<SyntaxTreeNode> ret = new Vector<SyntaxTreeNode>();
return ret;
}
}
// ino.end

View File

@ -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<SyntaxTreeNode> getChildren() {
Vector<SyntaxTreeNode> ret = new Vector<SyntaxTreeNode>();
ret.add(this.method_body);
return ret;
}
}

View File

@ -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<SyntaxTreeNode> getChildren() {
Vector<SyntaxTreeNode> ret = new Vector<SyntaxTreeNode>();
return ret;
}
}
// ino.end

View File

@ -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<SyntaxTreeNode> getChildren() {
Vector<SyntaxTreeNode> ret = new Vector<SyntaxTreeNode>();
return ret;
}
}
// ino.end

View File

@ -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<SyntaxTreeNode> getChildren() {
Vector<SyntaxTreeNode> ret = new Vector<SyntaxTreeNode>();
return ret;
}
}
// ino.end

View File

@ -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<String> exprtypes=new Vector<String>(); //hier werden die Typen der <EFBFBD>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<String,Method> 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<SyntaxTreeNode> getChildren() {
Vector<SyntaxTreeNode> ret = new Vector<SyntaxTreeNode>();
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

View File

@ -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("<init>");
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<SyntaxTreeNode> getChildren() {
Vector<SyntaxTreeNode> ret = new Vector<SyntaxTreeNode>();
if(this.arglist!=null)for(Expr e : this.arglist.expr){
ret.add(e);
}
return ret;
}
}
// ino.end

View File

@ -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<SyntaxTreeNode> getChildren() {
Vector<SyntaxTreeNode> ret = new Vector<SyntaxTreeNode>();
ret.add(this.retexpr);
return ret;
}
}
// ino.end

View File

@ -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<SyntaxTreeNode> getChildren() {
Vector<SyntaxTreeNode> ret = new Vector<SyntaxTreeNode>();
return ret;
}
}

View File

@ -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<SyntaxTreeNode> getChildren() {
Vector<SyntaxTreeNode> ret = new Vector<SyntaxTreeNode>();
return ret;
}
}
// ino.end

View File

@ -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<SyntaxTreeNode> getChildren() {
Vector<SyntaxTreeNode> ret = new Vector<SyntaxTreeNode>();
ret.add(this.expr);
ret.add(this.loop_block);
return ret;
}
}
// ino.end

View File

@ -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<R, T1, T2>)
*/
public FunNMethod(int N){
this.setType(TypePlaceholder.fresh(this));
ParameterList pl = new ParameterList();
Vector<FormalParameter> fpList = new Vector<FormalParameter>();
for(int i = 0;i<N;i++){
FormalParameter parameter = new FormalParameter();
parameter.setType(TypePlaceholder.fresh(parameter));
DeclId paramName = new DeclId("T"+i);
parameter.set_DeclId(paramName);
fpList.add(parameter);
}
pl.formalparameter = fpList;
this.parameterlist = pl;
}
}

View File

@ -16,6 +16,7 @@ public class OderConstraint{
* @param p2
*/
public OderConstraint(Type p1, Type p2){
if(p1 == null || p2 == null)throw new NullPointerException();
Pair constraintPair = new Pair(p1,p2);
oderConstraintPairs = new Vector<UndConstraint>();
this.addConstraint(constraintPair);

View File

@ -39,6 +39,8 @@ public class MethodAssumption extends FieldAssumption {
}
public String toString(){
return "MethodAssumption: "+this.method.toString();
}
}

View File

@ -7,4 +7,12 @@ testMethode(){
return var1.getVar1();
}
}
}
class Klasse1 {
var1;
int getVar1(){
return var1;
}
}

View File

@ -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()
{
}
}