From 37923779b1ea62c2751c3d258fa2e22d36336b29 Mon Sep 17 00:00:00 2001 From: JanUlrich Date: Tue, 7 Oct 2014 09:20:35 +0200 Subject: [PATCH] In der FC_TTO werden keine T <. T Constraints mehr aufgenommen --- src/de/dhbwstuttgart/syntaxtree/SourceFile.java | 6 ++++-- src/de/dhbwstuttgart/typeinference/ConstraintsSet.java | 3 --- src/de/dhbwstuttgart/typeinference/JavaCodeResult.java | 1 - 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/de/dhbwstuttgart/syntaxtree/SourceFile.java b/src/de/dhbwstuttgart/syntaxtree/SourceFile.java index 5ed9db31..41dc1589 100755 --- a/src/de/dhbwstuttgart/syntaxtree/SourceFile.java +++ b/src/de/dhbwstuttgart/syntaxtree/SourceFile.java @@ -310,8 +310,10 @@ public class SourceFile // 1. Menge <= in FC aufnehmen --> Iteration ueber alle Klassen for(ClassAssumption cAss : ass.getClassAssumptions()){ - Pair p = new Pair(cAss.getAssumedClass().getType(), cAss.getAssumedClass().getSuperClass()); - vFC.add(p); + Type t1 = cAss.getAssumedClass().getType(); + Type t2 = cAss.getAssumedClass().getType(); + Pair p = new Pair(t1, t2); + if(! t1.equals(t2))vFC.add(p); //Um FC_TTO darf kein T <. T stehen. } for( int i = 0; i < KlassenVektor.size(); i++ ) diff --git a/src/de/dhbwstuttgart/typeinference/ConstraintsSet.java b/src/de/dhbwstuttgart/typeinference/ConstraintsSet.java index a3f44659..4a28b687 100755 --- a/src/de/dhbwstuttgart/typeinference/ConstraintsSet.java +++ b/src/de/dhbwstuttgart/typeinference/ConstraintsSet.java @@ -57,7 +57,4 @@ public class ConstraintsSet implements Iterable{ constraint.filterWrongConstraints(unify); } } - - - } diff --git a/src/de/dhbwstuttgart/typeinference/JavaCodeResult.java b/src/de/dhbwstuttgart/typeinference/JavaCodeResult.java index bd9c1978..fe902460 100755 --- a/src/de/dhbwstuttgart/typeinference/JavaCodeResult.java +++ b/src/de/dhbwstuttgart/typeinference/JavaCodeResult.java @@ -3,7 +3,6 @@ package de.dhbwstuttgart.typeinference; import java.util.Vector; import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; -import sun.reflect.generics.reflectiveObjects.NotImplementedException; public class JavaCodeResult{