From 7e6dee8e1d9c8e097812f5954ab2fff9c972814e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Pl=C3=BCmicke?= Date: Wed, 14 Mar 2018 17:48:04 +0100 Subject: [PATCH] modified: ../../src/de/dhbwstuttgart/typeinference/unify/TypeUnifyTask.java modified: ../javFiles/Matrix.jav --- .../typeinference/unify/TypeUnifyTask.java | 11 ++++++----- test/javFiles/Matrix.jav | 8 ++++---- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/src/de/dhbwstuttgart/typeinference/unify/TypeUnifyTask.java b/src/de/dhbwstuttgart/typeinference/unify/TypeUnifyTask.java index 4af7a62ce..b2c9f4587 100644 --- a/src/de/dhbwstuttgart/typeinference/unify/TypeUnifyTask.java +++ b/src/de/dhbwstuttgart/typeinference/unify/TypeUnifyTask.java @@ -158,7 +158,8 @@ public class TypeUnifyTask extends RecursiveTask>> { writeLog("UndefinedPairs; " + undefinedPairs); Set> error = new HashSet<>(); error.add(undefinedPairs); - return error; + //return error; + return new HashSet<>(); } /* Up to here, no cartesian products are calculated. @@ -362,10 +363,10 @@ public class TypeUnifyTask extends RecursiveTask>> { else { result.addAll(computeCartesianRecursive(elems, remainingSets, eq, fc, parallel)); } - if (result.size() == 1) { - System.out.println(result.toString()); - result.remove(result.iterator().next()); - } + //if (result.size() == 1) { + // System.out.println(result.toString()); + // result.remove(result.iterator().next()); + //} if (!result.isEmpty()) { if (variance == 1) { if (a.iterator().next().getLhsType().getName().equals("WL")) diff --git a/test/javFiles/Matrix.jav b/test/javFiles/Matrix.jav index 6d73c1fc8..4ae776401 100644 --- a/test/javFiles/Matrix.jav +++ b/test/javFiles/Matrix.jav @@ -4,7 +4,7 @@ import java.lang.Boolean; class Matrix extends Vector> { Integer mul1(Integer x, Integer y) { return x;} - Integer add(Integer x, Integer y) { return x;} + Integer add1(Integer x, Integer y) { return x;} mul(m) { var ret = new Matrix(); var i = 0; @@ -16,9 +16,9 @@ class Matrix extends Vector> { var erg = 0; var k = 0; while(k < v1.size()) { - erg = erg + v1.elementAt(k) * m.elementAt(k).elementAt(j); - erg = add(erg, mul1(v1.elementAt(k), - m.elementAt(k).elementAt(j))); + //erg = erg + v1.elementAt(k) * m.elementAt(k).elementAt(j); + //erg = add1(erg, mul1(v1.elementAt(k), + // m.elementAt(k).elementAt(j))); k++; } v2.addElement(new Integer(erg)); j++; }