returntypevisitor added. restructuring.
This commit is contained in:
parent
427a87598c
commit
23ae5d5745
@ -1,6 +1,6 @@
|
||||
package de.dhbwstuttgart.parser.SyntaxTreeGenerator;
|
||||
|
||||
import de.dhbwstuttgart.strucTypes.ASTReturnVisitor;
|
||||
import de.dhbwstuttgart.strucTypes.visitor.ASTReturnVisitor;
|
||||
import de.dhbwstuttgart.syntaxtree.StatementVisitor;
|
||||
import de.dhbwstuttgart.syntaxtree.statement.AssignLeftSide;
|
||||
import de.dhbwstuttgart.syntaxtree.statement.Expression;
|
||||
|
@ -14,6 +14,7 @@ import de.dhbwstuttgart.strucTypes.constraint.ConstraintsSet;
|
||||
import de.dhbwstuttgart.strucTypes.constraint.SubTypeConstraint;
|
||||
import de.dhbwstuttgart.strucTypes.exception.IllegalInterfaceTypeException;
|
||||
import de.dhbwstuttgart.strucTypes.exception.ImpossibleSubTypeException;
|
||||
import de.dhbwstuttgart.strucTypes.visitor.DefaultASTVisitor;
|
||||
import de.dhbwstuttgart.syntaxtree.ClassOrInterface;
|
||||
import de.dhbwstuttgart.syntaxtree.Constructor;
|
||||
import de.dhbwstuttgart.syntaxtree.Field;
|
||||
|
@ -10,8 +10,11 @@ import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
import de.dhbwstuttgart.parser.NullToken;
|
||||
import de.dhbwstuttgart.strucTypes.classorinterface.ClassOrInterfaceWithConstraints;
|
||||
import de.dhbwstuttgart.strucTypes.constraint.SubTypeConstraint;
|
||||
import de.dhbwstuttgart.strucTypes.exception.InconsistentConstraintsException;
|
||||
import de.dhbwstuttgart.strucTypes.visitor.InferTypes;
|
||||
import de.dhbwstuttgart.strucTypes.visitor.TypeVar;
|
||||
import de.dhbwstuttgart.syntaxtree.ClassOrInterface;
|
||||
import de.dhbwstuttgart.syntaxtree.GenericDeclarationList;
|
||||
import de.dhbwstuttgart.syntaxtree.GenericTypeVar;
|
||||
@ -75,7 +78,7 @@ public class Solve {
|
||||
if (!consistent(cs)) {
|
||||
throw new InconsistentConstraintsException();
|
||||
}
|
||||
return new ClassOrInterfaceWithConstraints(this.clsA.accept(new InferTypesVisitor(inferredTypes)), Tnew,
|
||||
return new ClassOrInterfaceWithConstraints(this.clsA.accept(new InferTypes(inferredTypes)), Tnew,
|
||||
this.constraints);
|
||||
|
||||
}
|
||||
|
@ -1,6 +1,7 @@
|
||||
package de.dhbwstuttgart.strucTypes;
|
||||
|
||||
import de.dhbwstuttgart.strucTypes.constraint.ConstraintsSet;
|
||||
import de.dhbwstuttgart.strucTypes.visitor.DefaultASTVisitor;
|
||||
import de.dhbwstuttgart.syntaxtree.ClassOrInterface;
|
||||
import de.dhbwstuttgart.syntaxtree.Method;
|
||||
import de.dhbwstuttgart.syntaxtree.SourceFile;
|
||||
|
@ -7,6 +7,8 @@ import de.dhbwstuttgart.strucTypes.constraint.ConstraintsSet;
|
||||
import de.dhbwstuttgart.strucTypes.constraint.FieldConstraint;
|
||||
import de.dhbwstuttgart.strucTypes.constraint.MethodConstraint;
|
||||
import de.dhbwstuttgart.strucTypes.constraint.SubTypeConstraint;
|
||||
import de.dhbwstuttgart.strucTypes.visitor.DefaultASTVisitor;
|
||||
import de.dhbwstuttgart.strucTypes.visitor.TypeExtract;
|
||||
import de.dhbwstuttgart.syntaxtree.ClassOrInterface;
|
||||
import de.dhbwstuttgart.syntaxtree.Field;
|
||||
import de.dhbwstuttgart.syntaxtree.FormalParameter;
|
||||
|
@ -1,4 +1,4 @@
|
||||
package de.dhbwstuttgart.strucTypes;
|
||||
package de.dhbwstuttgart.strucTypes.classorinterface;
|
||||
|
||||
import java.util.Optional;
|
||||
|
@ -1,4 +1,4 @@
|
||||
package de.dhbwstuttgart.strucTypes;
|
||||
package de.dhbwstuttgart.strucTypes.classorinterface;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
@ -1,4 +1,4 @@
|
||||
package de.dhbwstuttgart.strucTypes;
|
||||
package de.dhbwstuttgart.strucTypes.classorinterface;
|
||||
|
||||
import java.lang.reflect.Modifier;
|
||||
import java.util.ArrayList;
|
||||
@ -9,6 +9,7 @@ import org.antlr.v4.runtime.Token;
|
||||
|
||||
import de.dhbwstuttgart.parser.NullToken;
|
||||
import de.dhbwstuttgart.parser.scope.JavaClassName;
|
||||
import de.dhbwstuttgart.strucTypes.InferredTypes;
|
||||
import de.dhbwstuttgart.strucTypes.constraint.SubTypeConstraint;
|
||||
import de.dhbwstuttgart.syntaxtree.ClassOrInterface;
|
||||
import de.dhbwstuttgart.syntaxtree.Constructor;
|
@ -1,4 +1,4 @@
|
||||
package de.dhbwstuttgart.strucTypes;
|
||||
package de.dhbwstuttgart.strucTypes.visitor;
|
||||
|
||||
import de.dhbwstuttgart.parser.SyntaxTreeGenerator.AssignToLocal;
|
||||
import de.dhbwstuttgart.syntaxtree.ClassOrInterface;
|
@ -1,4 +1,4 @@
|
||||
package de.dhbwstuttgart.strucTypes;
|
||||
package de.dhbwstuttgart.strucTypes.visitor;
|
||||
|
||||
import de.dhbwstuttgart.exceptions.NotImplementedException;
|
||||
import de.dhbwstuttgart.parser.SyntaxTreeGenerator.AssignToLocal;
|
@ -1,4 +1,4 @@
|
||||
package de.dhbwstuttgart.strucTypes;
|
||||
package de.dhbwstuttgart.strucTypes.visitor;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
@ -10,6 +10,7 @@ import de.dhbwstuttgart.exceptions.NotImplementedException;
|
||||
import de.dhbwstuttgart.parser.NullToken;
|
||||
import de.dhbwstuttgart.parser.SyntaxTreeGenerator.AssignToLocal;
|
||||
import de.dhbwstuttgart.parser.scope.JavaClassName;
|
||||
import de.dhbwstuttgart.strucTypes.InferredTypes;
|
||||
import de.dhbwstuttgart.syntaxtree.ClassOrInterface;
|
||||
import de.dhbwstuttgart.syntaxtree.Constructor;
|
||||
import de.dhbwstuttgart.syntaxtree.Field;
|
||||
@ -56,11 +57,11 @@ import de.dhbwstuttgart.syntaxtree.type.RefTypeOrTPHOrWildcardOrGeneric;
|
||||
import de.dhbwstuttgart.syntaxtree.type.SuperWildcardType;
|
||||
import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder;
|
||||
|
||||
public class InferTypesVisitor implements ASTReturnVisitor {
|
||||
public class InferTypes implements ASTReturnVisitor {
|
||||
|
||||
private InferredTypes inferredTypes = new InferredTypes();
|
||||
|
||||
public InferTypesVisitor(InferredTypes inferredTypes) {
|
||||
public InferTypes(InferredTypes inferredTypes) {
|
||||
this.inferredTypes = inferredTypes;
|
||||
}
|
||||
|
@ -1,10 +1,11 @@
|
||||
package de.dhbwstuttgart.strucTypes;
|
||||
package de.dhbwstuttgart.strucTypes.visitor;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
|
||||
import de.dhbwstuttgart.parser.scope.JavaClassName;
|
||||
import de.dhbwstuttgart.strucTypes.classorinterface.ClassOrInterfaceFactory;
|
||||
import de.dhbwstuttgart.syntaxtree.ClassOrInterface;
|
||||
import de.dhbwstuttgart.syntaxtree.Constructor;
|
||||
import de.dhbwstuttgart.syntaxtree.Field;
|
@ -1,8 +1,9 @@
|
||||
package de.dhbwstuttgart.strucTypes;
|
||||
package de.dhbwstuttgart.strucTypes.visitor;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
import de.dhbwstuttgart.strucTypes.InferredTypes;
|
||||
import de.dhbwstuttgart.syntaxtree.AbstractASTWalker;
|
||||
import de.dhbwstuttgart.syntaxtree.type.RefTypeOrTPHOrWildcardOrGeneric;
|
||||
import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder;
|
@ -3,7 +3,7 @@ package de.dhbwstuttgart.syntaxtree;
|
||||
import de.dhbwstuttgart.core.IItemWithOffset;
|
||||
import de.dhbwstuttgart.exceptions.DebugException;
|
||||
import de.dhbwstuttgart.parser.scope.JavaClassName;
|
||||
import de.dhbwstuttgart.strucTypes.ASTReturnVisitor;
|
||||
import de.dhbwstuttgart.strucTypes.visitor.ASTReturnVisitor;
|
||||
import de.dhbwstuttgart.syntaxtree.type.RefType;
|
||||
import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder;
|
||||
import de.dhbwstuttgart.syntaxtree.visual.ASTPrinter;
|
||||
|
@ -6,7 +6,7 @@ import de.dhbwstuttgart.syntaxtree.type.RefType;
|
||||
import de.dhbwstuttgart.syntaxtree.type.RefTypeOrTPHOrWildcardOrGeneric;
|
||||
import org.antlr.v4.runtime.Token;
|
||||
|
||||
import de.dhbwstuttgart.strucTypes.ASTReturnVisitor;
|
||||
import de.dhbwstuttgart.strucTypes.visitor.ASTReturnVisitor;
|
||||
import de.dhbwstuttgart.syntaxtree.statement.Block;
|
||||
|
||||
import java.util.List;
|
||||
|
@ -1,6 +1,6 @@
|
||||
package de.dhbwstuttgart.syntaxtree;
|
||||
|
||||
import de.dhbwstuttgart.strucTypes.ASTReturnVisitor;
|
||||
import de.dhbwstuttgart.strucTypes.visitor.ASTReturnVisitor;
|
||||
import de.dhbwstuttgart.syntaxtree.type.RefTypeOrTPHOrWildcardOrGeneric;
|
||||
import org.antlr.v4.runtime.Token;
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
package de.dhbwstuttgart.syntaxtree;
|
||||
|
||||
import de.dhbwstuttgart.strucTypes.ASTReturnVisitor;
|
||||
import de.dhbwstuttgart.strucTypes.visitor.ASTReturnVisitor;
|
||||
import de.dhbwstuttgart.syntaxtree.type.RefTypeOrTPHOrWildcardOrGeneric;
|
||||
import org.antlr.v4.runtime.Token;
|
||||
|
||||
|
@ -2,7 +2,7 @@ package de.dhbwstuttgart.syntaxtree;
|
||||
|
||||
import org.antlr.v4.runtime.Token;
|
||||
|
||||
import de.dhbwstuttgart.strucTypes.ASTReturnVisitor;
|
||||
import de.dhbwstuttgart.strucTypes.visitor.ASTReturnVisitor;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
package de.dhbwstuttgart.syntaxtree;
|
||||
|
||||
import de.dhbwstuttgart.strucTypes.ASTReturnVisitor;
|
||||
import de.dhbwstuttgart.strucTypes.visitor.ASTReturnVisitor;
|
||||
import de.dhbwstuttgart.syntaxtree.type.RefTypeOrTPHOrWildcardOrGeneric;
|
||||
|
||||
import org.antlr.v4.runtime.Token;
|
||||
|
@ -3,7 +3,7 @@ package de.dhbwstuttgart.syntaxtree;
|
||||
import java.util.ArrayList;
|
||||
|
||||
import de.dhbwstuttgart.parser.NullToken;
|
||||
import de.dhbwstuttgart.strucTypes.ASTReturnVisitor;
|
||||
import de.dhbwstuttgart.strucTypes.visitor.ASTReturnVisitor;
|
||||
import de.dhbwstuttgart.syntaxtree.type.RefTypeOrTPHOrWildcardOrGeneric;
|
||||
import de.dhbwstuttgart.typeinference.assumptions.TypeInferenceBlockInformation;
|
||||
import de.dhbwstuttgart.typeinference.constraints.ConstraintSet;
|
||||
|
@ -4,7 +4,7 @@ package de.dhbwstuttgart.syntaxtree;
|
||||
|
||||
import org.antlr.v4.runtime.Token;
|
||||
|
||||
import de.dhbwstuttgart.strucTypes.ASTReturnVisitor;
|
||||
import de.dhbwstuttgart.strucTypes.visitor.ASTReturnVisitor;
|
||||
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
@ -4,7 +4,7 @@ import java.util.*;
|
||||
|
||||
import de.dhbwstuttgart.parser.NullToken;
|
||||
import de.dhbwstuttgart.parser.scope.JavaClassName;
|
||||
import de.dhbwstuttgart.strucTypes.ASTReturnVisitor;
|
||||
import de.dhbwstuttgart.strucTypes.visitor.ASTReturnVisitor;
|
||||
import de.dhbwstuttgart.typeinference.constraints.ConstraintSet;
|
||||
import de.dhbwstuttgart.typeinference.assumptions.TypeInferenceInformation;
|
||||
//import sun.security.x509.X509CertInfo;
|
||||
|
@ -4,7 +4,7 @@ import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import de.dhbwstuttgart.core.IItemWithOffset;
|
||||
import de.dhbwstuttgart.strucTypes.ASTReturnVisitor;
|
||||
import de.dhbwstuttgart.strucTypes.visitor.ASTReturnVisitor;
|
||||
import de.dhbwstuttgart.typeinference.assumptions.TypeInferenceInformation;
|
||||
import org.antlr.v4.runtime.Token;
|
||||
//import org.antlr.v4.runtime.misc.Pair;
|
||||
|
@ -1,7 +1,7 @@
|
||||
package de.dhbwstuttgart.syntaxtree.statement;
|
||||
|
||||
|
||||
import de.dhbwstuttgart.strucTypes.ASTReturnVisitor;
|
||||
import de.dhbwstuttgart.strucTypes.visitor.ASTReturnVisitor;
|
||||
import de.dhbwstuttgart.syntaxtree.ASTVisitor;
|
||||
import de.dhbwstuttgart.syntaxtree.StatementVisitor;
|
||||
import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode;
|
||||
|
@ -1,7 +1,7 @@
|
||||
|
||||
package de.dhbwstuttgart.syntaxtree.statement;
|
||||
|
||||
import de.dhbwstuttgart.strucTypes.ASTReturnVisitor;
|
||||
import de.dhbwstuttgart.strucTypes.visitor.ASTReturnVisitor;
|
||||
import de.dhbwstuttgart.syntaxtree.StatementVisitor;
|
||||
import de.dhbwstuttgart.typeinference.assumptions.TypeInferenceBlockInformation;
|
||||
import de.dhbwstuttgart.typeinference.constraints.ConstraintSet;
|
||||
|
@ -1,6 +1,6 @@
|
||||
package de.dhbwstuttgart.syntaxtree.statement;
|
||||
|
||||
import de.dhbwstuttgart.strucTypes.ASTReturnVisitor;
|
||||
import de.dhbwstuttgart.strucTypes.visitor.ASTReturnVisitor;
|
||||
import de.dhbwstuttgart.syntaxtree.StatementVisitor;
|
||||
|
||||
public class AssignToField extends AssignLeftSide{
|
||||
|
@ -1,7 +1,7 @@
|
||||
package de.dhbwstuttgart.syntaxtree.statement;
|
||||
|
||||
|
||||
import de.dhbwstuttgart.strucTypes.ASTReturnVisitor;
|
||||
import de.dhbwstuttgart.strucTypes.visitor.ASTReturnVisitor;
|
||||
import de.dhbwstuttgart.syntaxtree.StatementVisitor;
|
||||
import de.dhbwstuttgart.syntaxtree.type.RefTypeOrTPHOrWildcardOrGeneric;
|
||||
import org.antlr.v4.runtime.Token;
|
||||
|
@ -1,7 +1,7 @@
|
||||
package de.dhbwstuttgart.syntaxtree.statement;
|
||||
import java.util.*;
|
||||
|
||||
import de.dhbwstuttgart.strucTypes.ASTReturnVisitor;
|
||||
import de.dhbwstuttgart.strucTypes.visitor.ASTReturnVisitor;
|
||||
import de.dhbwstuttgart.syntaxtree.StatementVisitor;
|
||||
import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder;
|
||||
import de.dhbwstuttgart.typeinference.assumptions.TypeInferenceBlockInformation;
|
||||
|
@ -1,7 +1,7 @@
|
||||
package de.dhbwstuttgart.syntaxtree.statement;
|
||||
|
||||
import de.dhbwstuttgart.exceptions.NotImplementedException;
|
||||
import de.dhbwstuttgart.strucTypes.ASTReturnVisitor;
|
||||
import de.dhbwstuttgart.strucTypes.visitor.ASTReturnVisitor;
|
||||
import de.dhbwstuttgart.syntaxtree.StatementVisitor;
|
||||
import de.dhbwstuttgart.syntaxtree.type.RefTypeOrTPHOrWildcardOrGeneric;
|
||||
import de.dhbwstuttgart.typeinference.assumptions.TypeInferenceBlockInformation;
|
||||
|
@ -1,6 +1,6 @@
|
||||
package de.dhbwstuttgart.syntaxtree.statement;
|
||||
|
||||
import de.dhbwstuttgart.strucTypes.ASTReturnVisitor;
|
||||
import de.dhbwstuttgart.strucTypes.visitor.ASTReturnVisitor;
|
||||
import de.dhbwstuttgart.syntaxtree.StatementVisitor;
|
||||
import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder;
|
||||
import org.antlr.v4.runtime.Token;
|
||||
|
@ -1,6 +1,6 @@
|
||||
package de.dhbwstuttgart.syntaxtree.statement;
|
||||
|
||||
import de.dhbwstuttgart.strucTypes.ASTReturnVisitor;
|
||||
import de.dhbwstuttgart.strucTypes.visitor.ASTReturnVisitor;
|
||||
import de.dhbwstuttgart.syntaxtree.StatementVisitor;
|
||||
import de.dhbwstuttgart.syntaxtree.type.Void;
|
||||
import de.dhbwstuttgart.typeinference.assumptions.TypeInferenceBlockInformation;
|
||||
|
@ -1,6 +1,6 @@
|
||||
package de.dhbwstuttgart.syntaxtree.statement;
|
||||
|
||||
import de.dhbwstuttgart.strucTypes.ASTReturnVisitor;
|
||||
import de.dhbwstuttgart.strucTypes.visitor.ASTReturnVisitor;
|
||||
import de.dhbwstuttgart.syntaxtree.StatementVisitor;
|
||||
import de.dhbwstuttgart.syntaxtree.type.RefTypeOrTPHOrWildcardOrGeneric;
|
||||
import org.antlr.v4.runtime.Token;
|
||||
|
@ -1,7 +1,7 @@
|
||||
package de.dhbwstuttgart.syntaxtree.statement;
|
||||
|
||||
import de.dhbwstuttgart.exceptions.TypeinferenceException;
|
||||
import de.dhbwstuttgart.strucTypes.ASTReturnVisitor;
|
||||
import de.dhbwstuttgart.strucTypes.visitor.ASTReturnVisitor;
|
||||
import de.dhbwstuttgart.syntaxtree.StatementVisitor;
|
||||
import de.dhbwstuttgart.syntaxtree.type.RefTypeOrTPHOrWildcardOrGeneric;
|
||||
import de.dhbwstuttgart.typeinference.assumptions.FieldAssumption;
|
||||
|
@ -2,7 +2,7 @@
|
||||
package de.dhbwstuttgart.syntaxtree.statement;
|
||||
|
||||
import de.dhbwstuttgart.exceptions.NotImplementedException;
|
||||
import de.dhbwstuttgart.strucTypes.ASTReturnVisitor;
|
||||
import de.dhbwstuttgart.strucTypes.visitor.ASTReturnVisitor;
|
||||
import de.dhbwstuttgart.syntaxtree.StatementVisitor;
|
||||
import de.dhbwstuttgart.typeinference.assumptions.TypeInferenceBlockInformation;
|
||||
import de.dhbwstuttgart.typeinference.constraints.ConstraintSet;
|
||||
|
@ -1,6 +1,6 @@
|
||||
package de.dhbwstuttgart.syntaxtree.statement;
|
||||
|
||||
import de.dhbwstuttgart.strucTypes.ASTReturnVisitor;
|
||||
import de.dhbwstuttgart.strucTypes.visitor.ASTReturnVisitor;
|
||||
import de.dhbwstuttgart.syntaxtree.StatementVisitor;
|
||||
import de.dhbwstuttgart.syntaxtree.type.RefTypeOrTPHOrWildcardOrGeneric;
|
||||
import de.dhbwstuttgart.typeinference.assumptions.TypeInferenceBlockInformation;
|
||||
|
@ -1,7 +1,7 @@
|
||||
package de.dhbwstuttgart.syntaxtree.statement;
|
||||
|
||||
import de.dhbwstuttgart.exceptions.NotImplementedException;
|
||||
import de.dhbwstuttgart.strucTypes.ASTReturnVisitor;
|
||||
import de.dhbwstuttgart.strucTypes.visitor.ASTReturnVisitor;
|
||||
import de.dhbwstuttgart.syntaxtree.StatementVisitor;
|
||||
import de.dhbwstuttgart.syntaxtree.type.RefTypeOrTPHOrWildcardOrGeneric;
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
package de.dhbwstuttgart.syntaxtree.statement;
|
||||
|
||||
import de.dhbwstuttgart.strucTypes.ASTReturnVisitor;
|
||||
import de.dhbwstuttgart.strucTypes.visitor.ASTReturnVisitor;
|
||||
import de.dhbwstuttgart.syntaxtree.*;
|
||||
import de.dhbwstuttgart.syntaxtree.type.RefType;
|
||||
import de.dhbwstuttgart.syntaxtree.type.RefTypeOrTPHOrWildcardOrGeneric;
|
||||
|
@ -1,7 +1,7 @@
|
||||
package de.dhbwstuttgart.syntaxtree.statement;
|
||||
|
||||
|
||||
import de.dhbwstuttgart.strucTypes.ASTReturnVisitor;
|
||||
import de.dhbwstuttgart.strucTypes.visitor.ASTReturnVisitor;
|
||||
import de.dhbwstuttgart.syntaxtree.StatementVisitor;
|
||||
import de.dhbwstuttgart.syntaxtree.statement.Expression;
|
||||
import de.dhbwstuttgart.syntaxtree.type.RefTypeOrTPHOrWildcardOrGeneric;
|
||||
|
@ -1,6 +1,6 @@
|
||||
package de.dhbwstuttgart.syntaxtree.statement;
|
||||
|
||||
import de.dhbwstuttgart.strucTypes.ASTReturnVisitor;
|
||||
import de.dhbwstuttgart.strucTypes.visitor.ASTReturnVisitor;
|
||||
import de.dhbwstuttgart.syntaxtree.StatementVisitor;
|
||||
import de.dhbwstuttgart.syntaxtree.type.RefTypeOrTPHOrWildcardOrGeneric;
|
||||
import org.antlr.v4.runtime.Token;
|
||||
|
@ -2,7 +2,7 @@ package de.dhbwstuttgart.syntaxtree.statement;
|
||||
|
||||
|
||||
import de.dhbwstuttgart.exceptions.NotImplementedException;
|
||||
import de.dhbwstuttgart.strucTypes.ASTReturnVisitor;
|
||||
import de.dhbwstuttgart.strucTypes.visitor.ASTReturnVisitor;
|
||||
import de.dhbwstuttgart.syntaxtree.StatementVisitor;
|
||||
import de.dhbwstuttgart.syntaxtree.type.RefTypeOrTPHOrWildcardOrGeneric;
|
||||
import de.dhbwstuttgart.typeinference.assumptions.TypeInferenceBlockInformation;
|
||||
|
@ -1,7 +1,7 @@
|
||||
package de.dhbwstuttgart.syntaxtree.statement;
|
||||
|
||||
import de.dhbwstuttgart.exceptions.TypeinferenceException;
|
||||
import de.dhbwstuttgart.strucTypes.ASTReturnVisitor;
|
||||
import de.dhbwstuttgart.strucTypes.visitor.ASTReturnVisitor;
|
||||
import de.dhbwstuttgart.syntaxtree.*;
|
||||
import de.dhbwstuttgart.syntaxtree.type.RefType;
|
||||
import de.dhbwstuttgart.syntaxtree.type.RefTypeOrTPHOrWildcardOrGeneric;
|
||||
|
@ -6,7 +6,7 @@ import de.dhbwstuttgart.syntaxtree.type.RefTypeOrTPHOrWildcardOrGeneric;
|
||||
import de.dhbwstuttgart.typeinference.assumptions.TypeInferenceBlockInformation;
|
||||
import de.dhbwstuttgart.typeinference.constraints.ConstraintSet;
|
||||
import de.dhbwstuttgart.exceptions.NotImplementedException;
|
||||
import de.dhbwstuttgart.strucTypes.ASTReturnVisitor;
|
||||
import de.dhbwstuttgart.strucTypes.visitor.ASTReturnVisitor;
|
||||
|
||||
|
||||
public class NewArray extends Expression
|
||||
|
@ -6,7 +6,7 @@ import java.util.Set;
|
||||
|
||||
import de.dhbwstuttgart.exceptions.TypeinferenceException;
|
||||
import de.dhbwstuttgart.parser.NullToken;
|
||||
import de.dhbwstuttgart.strucTypes.ASTReturnVisitor;
|
||||
import de.dhbwstuttgart.strucTypes.visitor.ASTReturnVisitor;
|
||||
import de.dhbwstuttgart.syntaxtree.ClassOrInterface;
|
||||
import de.dhbwstuttgart.syntaxtree.Method;
|
||||
import de.dhbwstuttgart.syntaxtree.StatementVisitor;
|
||||
|
@ -1,6 +1,6 @@
|
||||
package de.dhbwstuttgart.syntaxtree.statement;
|
||||
|
||||
import de.dhbwstuttgart.strucTypes.ASTReturnVisitor;
|
||||
import de.dhbwstuttgart.strucTypes.visitor.ASTReturnVisitor;
|
||||
import de.dhbwstuttgart.syntaxtree.StatementVisitor;
|
||||
import org.antlr.v4.runtime.Token;
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
package de.dhbwstuttgart.syntaxtree.statement;
|
||||
|
||||
import de.dhbwstuttgart.strucTypes.ASTReturnVisitor;
|
||||
import de.dhbwstuttgart.strucTypes.visitor.ASTReturnVisitor;
|
||||
import de.dhbwstuttgart.syntaxtree.StatementVisitor;
|
||||
import org.antlr.v4.runtime.Token;
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
package de.dhbwstuttgart.syntaxtree.statement;
|
||||
|
||||
import de.dhbwstuttgart.parser.scope.JavaClassName;
|
||||
import de.dhbwstuttgart.strucTypes.ASTReturnVisitor;
|
||||
import de.dhbwstuttgart.strucTypes.visitor.ASTReturnVisitor;
|
||||
import de.dhbwstuttgart.syntaxtree.StatementVisitor;
|
||||
import de.dhbwstuttgart.syntaxtree.type.RefType;
|
||||
import de.dhbwstuttgart.typeinference.assumptions.TypeInferenceBlockInformation;
|
||||
|
@ -6,7 +6,7 @@ import de.dhbwstuttgart.typeinference.constraints.ConstraintSet;
|
||||
import de.dhbwstuttgart.typeinference.assumptions.TypeInferenceInformation;
|
||||
import org.antlr.v4.runtime.Token;
|
||||
import de.dhbwstuttgart.exceptions.NotImplementedException;
|
||||
import de.dhbwstuttgart.strucTypes.ASTReturnVisitor;
|
||||
import de.dhbwstuttgart.strucTypes.visitor.ASTReturnVisitor;
|
||||
|
||||
public class Super extends Expression
|
||||
{
|
||||
|
@ -1,6 +1,6 @@
|
||||
package de.dhbwstuttgart.syntaxtree.statement;
|
||||
|
||||
import de.dhbwstuttgart.strucTypes.ASTReturnVisitor;
|
||||
import de.dhbwstuttgart.strucTypes.visitor.ASTReturnVisitor;
|
||||
import de.dhbwstuttgart.syntaxtree.StatementVisitor;
|
||||
import de.dhbwstuttgart.syntaxtree.type.RefType;
|
||||
import de.dhbwstuttgart.syntaxtree.type.Void;
|
||||
|
@ -5,7 +5,7 @@ import de.dhbwstuttgart.syntaxtree.type.RefType;
|
||||
import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder;
|
||||
import org.antlr.v4.runtime.Token;
|
||||
import de.dhbwstuttgart.exceptions.NotImplementedException;
|
||||
import de.dhbwstuttgart.strucTypes.ASTReturnVisitor;
|
||||
import de.dhbwstuttgart.strucTypes.visitor.ASTReturnVisitor;
|
||||
|
||||
public class This extends Expression
|
||||
{
|
||||
|
@ -1,7 +1,7 @@
|
||||
package de.dhbwstuttgart.syntaxtree.statement;
|
||||
|
||||
|
||||
import de.dhbwstuttgart.strucTypes.ASTReturnVisitor;
|
||||
import de.dhbwstuttgart.strucTypes.visitor.ASTReturnVisitor;
|
||||
import de.dhbwstuttgart.syntaxtree.StatementVisitor;
|
||||
import de.dhbwstuttgart.syntaxtree.statement.Expression;
|
||||
import de.dhbwstuttgart.syntaxtree.statement.JavaInternalExpression;
|
||||
|
@ -2,7 +2,7 @@ package de.dhbwstuttgart.syntaxtree.statement;
|
||||
|
||||
import org.antlr.v4.runtime.Token;
|
||||
|
||||
import de.dhbwstuttgart.strucTypes.ASTReturnVisitor;
|
||||
import de.dhbwstuttgart.strucTypes.visitor.ASTReturnVisitor;
|
||||
import de.dhbwstuttgart.syntaxtree.StatementVisitor;
|
||||
import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder;
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
package de.dhbwstuttgart.syntaxtree.type;
|
||||
|
||||
|
||||
import de.dhbwstuttgart.strucTypes.ASTReturnVisitor;
|
||||
import de.dhbwstuttgart.strucTypes.visitor.ASTReturnVisitor;
|
||||
import de.dhbwstuttgart.syntaxtree.ASTVisitor;
|
||||
import de.dhbwstuttgart.typeinference.result.ResultSetVisitor;
|
||||
import org.antlr.v4.runtime.Token;
|
||||
|
@ -1,6 +1,6 @@
|
||||
package de.dhbwstuttgart.syntaxtree.type;
|
||||
|
||||
import de.dhbwstuttgart.strucTypes.ASTReturnVisitor;
|
||||
import de.dhbwstuttgart.strucTypes.visitor.ASTReturnVisitor;
|
||||
import de.dhbwstuttgart.syntaxtree.ASTVisitor;
|
||||
import de.dhbwstuttgart.typeinference.result.ResultSetVisitor;
|
||||
import org.antlr.v4.runtime.Token;
|
||||
|
@ -1,7 +1,7 @@
|
||||
package de.dhbwstuttgart.syntaxtree.type;
|
||||
|
||||
import de.dhbwstuttgart.parser.scope.JavaClassName;
|
||||
import de.dhbwstuttgart.strucTypes.ASTReturnVisitor;
|
||||
import de.dhbwstuttgart.strucTypes.visitor.ASTReturnVisitor;
|
||||
import de.dhbwstuttgart.syntaxtree.ASTVisitor;
|
||||
import de.dhbwstuttgart.typeinference.result.ResultSetVisitor;
|
||||
import org.antlr.v4.runtime.Token;
|
||||
|
@ -1,7 +1,7 @@
|
||||
package de.dhbwstuttgart.syntaxtree.type;
|
||||
|
||||
|
||||
import de.dhbwstuttgart.strucTypes.ASTReturnVisitor;
|
||||
import de.dhbwstuttgart.strucTypes.visitor.ASTReturnVisitor;
|
||||
import de.dhbwstuttgart.syntaxtree.ASTVisitor;
|
||||
import de.dhbwstuttgart.typeinference.result.ResultSetVisitor;
|
||||
import org.antlr.v4.runtime.Token;
|
||||
|
@ -1,7 +1,7 @@
|
||||
package de.dhbwstuttgart.syntaxtree.type;
|
||||
import java.util.Hashtable;
|
||||
|
||||
import de.dhbwstuttgart.strucTypes.ASTReturnVisitor;
|
||||
import de.dhbwstuttgart.strucTypes.visitor.ASTReturnVisitor;
|
||||
import de.dhbwstuttgart.syntaxtree.ASTVisitor;
|
||||
import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode;
|
||||
import de.dhbwstuttgart.syntaxtree.factory.NameGenerator;
|
||||
|
@ -11,7 +11,6 @@ import org.junit.Test;
|
||||
|
||||
import de.dhbwstuttgart.core.JavaTXCompiler;
|
||||
import de.dhbwstuttgart.strucTypes.Construct;
|
||||
import de.dhbwstuttgart.strucTypes.InferTypesVisitor;
|
||||
import de.dhbwstuttgart.strucTypes.InferredTypes;
|
||||
import de.dhbwstuttgart.strucTypes.StrucTYPE;
|
||||
import de.dhbwstuttgart.strucTypes.constraint.ConstraintsSet;
|
||||
@ -20,6 +19,7 @@ import de.dhbwstuttgart.strucTypes.exception.ImpossibleSubTypeException;
|
||||
import de.dhbwstuttgart.strucTypes.printutils.PrintConstraints;
|
||||
import de.dhbwstuttgart.strucTypes.printutils.PrintInferredTypes;
|
||||
import de.dhbwstuttgart.strucTypes.printutils.SyntaxTreePrinter;
|
||||
import de.dhbwstuttgart.strucTypes.visitor.InferTypes;
|
||||
import de.dhbwstuttgart.syntaxtree.ClassOrInterface;
|
||||
import de.dhbwstuttgart.syntaxtree.SourceFile;
|
||||
|
||||
@ -45,7 +45,7 @@ public class TestInferTypesVisitor {
|
||||
System.out.println("Filename: " + name);
|
||||
SourceFile sourceFile = compiler.sourceFiles.get(f);
|
||||
//Print SourceFile Infos
|
||||
sourceFile.accept(new InferTypesVisitor(new InferredTypes()));
|
||||
sourceFile.accept(new InferTypes(new InferredTypes()));
|
||||
|
||||
|
||||
System.out.println("____________________________________________________________________________");
|
||||
@ -92,7 +92,7 @@ public class TestInferTypesVisitor {
|
||||
printConstraints.printSubTypeConstraints(subTypeConstraints);
|
||||
PrintInferredTypes.print(inferredTypesConstruct);
|
||||
System.out.println("\n--Inferred SysntaxTree--");
|
||||
sourceFile = sourceFile.accept(new InferTypesVisitor(inferredTypesConstruct));
|
||||
sourceFile = sourceFile.accept(new InferTypes(inferredTypesConstruct));
|
||||
sourceFile.accept(syntaxTreePrinter);
|
||||
|
||||
System.out.println("____________________________________________________________________________");
|
||||
|
@ -6,7 +6,7 @@ import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
|
||||
import de.dhbwstuttgart.core.JavaTXCompiler;
|
||||
import de.dhbwstuttgart.strucTypes.TypeExtract;
|
||||
import de.dhbwstuttgart.strucTypes.visitor.TypeExtract;
|
||||
|
||||
public class TestInterface {
|
||||
public static final String rootDirectory = System.getProperty("user.dir")+"/test/strucType/javFiles/";
|
||||
|
@ -7,11 +7,11 @@ import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import de.dhbwstuttgart.core.JavaTXCompiler;
|
||||
import de.dhbwstuttgart.strucTypes.ClassOrInterfaceWithConstraints;
|
||||
import de.dhbwstuttgart.strucTypes.Construct;
|
||||
import de.dhbwstuttgart.strucTypes.InferredTypes;
|
||||
import de.dhbwstuttgart.strucTypes.Solve;
|
||||
import de.dhbwstuttgart.strucTypes.StrucTYPE;
|
||||
import de.dhbwstuttgart.strucTypes.classorinterface.ClassOrInterfaceWithConstraints;
|
||||
import de.dhbwstuttgart.strucTypes.constraint.ConstraintsSet;
|
||||
import de.dhbwstuttgart.strucTypes.constraint.SubTypeConstraint;
|
||||
import de.dhbwstuttgart.strucTypes.exception.ImpossibleSubTypeException;
|
||||
|
@ -7,11 +7,11 @@ import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import de.dhbwstuttgart.core.JavaTXCompiler;
|
||||
import de.dhbwstuttgart.strucTypes.ClassOrInterfaceWithConstraints;
|
||||
import de.dhbwstuttgart.strucTypes.Construct;
|
||||
import de.dhbwstuttgart.strucTypes.InferredTypes;
|
||||
import de.dhbwstuttgart.strucTypes.Solve;
|
||||
import de.dhbwstuttgart.strucTypes.StrucTYPE;
|
||||
import de.dhbwstuttgart.strucTypes.classorinterface.ClassOrInterfaceWithConstraints;
|
||||
import de.dhbwstuttgart.strucTypes.constraint.ConstraintsSet;
|
||||
import de.dhbwstuttgart.strucTypes.constraint.SubTypeConstraint;
|
||||
import de.dhbwstuttgart.strucTypes.exception.ImpossibleSubTypeException;
|
||||
|
Loading…
Reference in New Issue
Block a user