From d41d3293aa9bb0cdf915b38b748f4dcf33421e01 Mon Sep 17 00:00:00 2001 From: JanUlrich Date: Tue, 4 Nov 2014 17:01:35 +0100 Subject: [PATCH] =?UTF-8?q?Debugausgaben=20eingeschr=C3=A4nkt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/de/dhbwstuttgart/syntaxtree/SourceFile.java | 4 ++-- src/de/dhbwstuttgart/syntaxtree/type/RefType.java | 2 -- .../typeinference/assumptions/TypeAssumptions.java | 2 -- .../typeinference/typedeployment/TypeInsertSet.java | 5 +++++ test/plugindevelopment/TypeInsertTests/Matrix.java | 8 ++++++-- .../TypeInsertTests/TypedMatrixSimpleTest.jav | 2 +- .../TypeInsertTests/TypedMatrixSimpleTest.java | 2 +- 7 files changed, 15 insertions(+), 10 deletions(-) diff --git a/src/de/dhbwstuttgart/syntaxtree/SourceFile.java b/src/de/dhbwstuttgart/syntaxtree/SourceFile.java index 86bcc272f..d3d35cdeb 100755 --- a/src/de/dhbwstuttgart/syntaxtree/SourceFile.java +++ b/src/de/dhbwstuttgart/syntaxtree/SourceFile.java @@ -698,7 +698,7 @@ public class SourceFile retValue = Unify.unify(pairs, finiteClosure); return retValue;}; oderConstraints.filterWrongConstraints(unifier); - oderConstraints.unifyUndConstraints(unifier); + //oderConstraints.unifyUndConstraints(unifier); typinferenzLog.debug("Übriggebliebene Konstraints:\n"+oderConstraints+"\n", Section.TYPEINFERENCE); //Die Constraints in Pair's umwandeln (Karthesisches Produkt bilden): Vector> xConstraints = new Vector>();// = oderConstraints.getConstraints(); @@ -865,7 +865,7 @@ public class SourceFile // Debugoutput:Vector> - typinferenzLog.debug("Unifiziertes Ergebnis: "+result, Section.TYPEINFERENCE); + //typinferenzLog.debug("Unifiziertes Ergebnis: "+result, Section.TYPEINFERENCE); /* // Prüfe ob eindeutige Lösung: diff --git a/src/de/dhbwstuttgart/syntaxtree/type/RefType.java b/src/de/dhbwstuttgart/syntaxtree/type/RefType.java index 7fe0621a1..95be24c75 100755 --- a/src/de/dhbwstuttgart/syntaxtree/type/RefType.java +++ b/src/de/dhbwstuttgart/syntaxtree/type/RefType.java @@ -8,8 +8,6 @@ import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; -import org.antlr.v4.runtime.misc.NotNull; - import de.dhbwstuttgart.logger.Logger; import de.dhbwstuttgart.bytecode.JVMCode; import de.dhbwstuttgart.core.IItemWithOffset; diff --git a/src/de/dhbwstuttgart/typeinference/assumptions/TypeAssumptions.java b/src/de/dhbwstuttgart/typeinference/assumptions/TypeAssumptions.java index 26abe0c10..ddfa44c77 100755 --- a/src/de/dhbwstuttgart/typeinference/assumptions/TypeAssumptions.java +++ b/src/de/dhbwstuttgart/typeinference/assumptions/TypeAssumptions.java @@ -3,8 +3,6 @@ package de.dhbwstuttgart.typeinference.assumptions; import java.util.Iterator; import java.util.Vector; -import org.antlr.v4.tool.ast.SetAST; - import de.dhbwstuttgart.core.IItemWithOffset; import de.dhbwstuttgart.logger.Logger; import de.dhbwstuttgart.logger.Section; diff --git a/src/de/dhbwstuttgart/typeinference/typedeployment/TypeInsertSet.java b/src/de/dhbwstuttgart/typeinference/typedeployment/TypeInsertSet.java index 28c3e15d1..c80a1b224 100644 --- a/src/de/dhbwstuttgart/typeinference/typedeployment/TypeInsertSet.java +++ b/src/de/dhbwstuttgart/typeinference/typedeployment/TypeInsertSet.java @@ -145,6 +145,11 @@ public class TypeInsertSet { } } + @Override + public String toString(){ + return this.points.toString(); + } + } /** diff --git a/test/plugindevelopment/TypeInsertTests/Matrix.java b/test/plugindevelopment/TypeInsertTests/Matrix.java index dbc9ed1c0..cea6d9d53 100644 --- a/test/plugindevelopment/TypeInsertTests/Matrix.java +++ b/test/plugindevelopment/TypeInsertTests/Matrix.java @@ -4,13 +4,17 @@ import java.util.Vector; import org.junit.Test; +import de.dhbwstuttgart.logger.Logger; +import de.dhbwstuttgart.logger.LoggerConfiguration; +import de.dhbwstuttgart.logger.Section; + public class Matrix { private static final String TEST_FILE = "Matrix.jav"; @Test public void run(){ Vector mustContain = new Vector(); - //mustContain.add("TestIfStmt var"); - //MultipleTypesInsertTester.testSingleInsert(this.TEST_FILE, mustContain); + mustContain.add("TestIfStmt var"); + MultipleTypesInsertTester.testSingleInsert(this.TEST_FILE, mustContain); } } diff --git a/test/plugindevelopment/TypeInsertTests/TypedMatrixSimpleTest.jav b/test/plugindevelopment/TypeInsertTests/TypedMatrixSimpleTest.jav index 72d008774..0324151cd 100644 --- a/test/plugindevelopment/TypeInsertTests/TypedMatrixSimpleTest.jav +++ b/test/plugindevelopment/TypeInsertTests/TypedMatrixSimpleTest.jav @@ -5,7 +5,7 @@ class Matrix extends Vector> { Matrix mul(Matrix m){ Matrix ret; ret = new Matrix(); - Integer i; + i; i = 0; while(i < this.size()) { Vector v1; diff --git a/test/plugindevelopment/TypeInsertTests/TypedMatrixSimpleTest.java b/test/plugindevelopment/TypeInsertTests/TypedMatrixSimpleTest.java index 2db278050..3c874195a 100644 --- a/test/plugindevelopment/TypeInsertTests/TypedMatrixSimpleTest.java +++ b/test/plugindevelopment/TypeInsertTests/TypedMatrixSimpleTest.java @@ -10,7 +10,7 @@ public class TypedMatrixSimpleTest { @Test public void run(){ Vector mustContain = new Vector(); - mustContain.add("Integer erg;"); + mustContain.add("Integer i;"); MultipleTypesInsertTester.testSingleInsert(this.TEST_FILE, mustContain); } }