forked from JavaTX/JavaCompilerCore
modified: ../../src/de/dhbwstuttgart/typeinference/unify/TypeUnifyTask.java
modified: ../javFiles/Matrix.jav
This commit is contained in:
parent
273ddb92d7
commit
7e6dee8e1d
@ -158,7 +158,8 @@ public class TypeUnifyTask extends RecursiveTask<Set<Set<UnifyPair>>> {
|
||||
writeLog("UndefinedPairs; " + undefinedPairs);
|
||||
Set<Set<UnifyPair>> 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<Set<Set<UnifyPair>>> {
|
||||
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"))
|
||||
|
@ -4,7 +4,7 @@ import java.lang.Boolean;
|
||||
|
||||
class Matrix extends Vector<Vector<Integer>> {
|
||||
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<Vector<Integer>> {
|
||||
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++; }
|
||||
|
Loading…
Reference in New Issue
Block a user