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);
|
writeLog("UndefinedPairs; " + undefinedPairs);
|
||||||
Set<Set<UnifyPair>> error = new HashSet<>();
|
Set<Set<UnifyPair>> error = new HashSet<>();
|
||||||
error.add(undefinedPairs);
|
error.add(undefinedPairs);
|
||||||
return error;
|
//return error;
|
||||||
|
return new HashSet<>();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Up to here, no cartesian products are calculated.
|
/* Up to here, no cartesian products are calculated.
|
||||||
@ -362,10 +363,10 @@ public class TypeUnifyTask extends RecursiveTask<Set<Set<UnifyPair>>> {
|
|||||||
else {
|
else {
|
||||||
result.addAll(computeCartesianRecursive(elems, remainingSets, eq, fc, parallel));
|
result.addAll(computeCartesianRecursive(elems, remainingSets, eq, fc, parallel));
|
||||||
}
|
}
|
||||||
if (result.size() == 1) {
|
//if (result.size() == 1) {
|
||||||
System.out.println(result.toString());
|
// System.out.println(result.toString());
|
||||||
result.remove(result.iterator().next());
|
// result.remove(result.iterator().next());
|
||||||
}
|
//}
|
||||||
if (!result.isEmpty()) {
|
if (!result.isEmpty()) {
|
||||||
if (variance == 1) {
|
if (variance == 1) {
|
||||||
if (a.iterator().next().getLhsType().getName().equals("WL"))
|
if (a.iterator().next().getLhsType().getName().equals("WL"))
|
||||||
|
@ -4,7 +4,7 @@ import java.lang.Boolean;
|
|||||||
|
|
||||||
class Matrix extends Vector<Vector<Integer>> {
|
class Matrix extends Vector<Vector<Integer>> {
|
||||||
Integer mul1(Integer x, Integer y) { return x;}
|
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) {
|
mul(m) {
|
||||||
var ret = new Matrix();
|
var ret = new Matrix();
|
||||||
var i = 0;
|
var i = 0;
|
||||||
@ -16,9 +16,9 @@ class Matrix extends Vector<Vector<Integer>> {
|
|||||||
var erg = 0;
|
var erg = 0;
|
||||||
var k = 0;
|
var k = 0;
|
||||||
while(k < v1.size()) {
|
while(k < v1.size()) {
|
||||||
erg = erg + v1.elementAt(k) * m.elementAt(k).elementAt(j);
|
//erg = erg + v1.elementAt(k) * m.elementAt(k).elementAt(j);
|
||||||
erg = add(erg, mul1(v1.elementAt(k),
|
//erg = add1(erg, mul1(v1.elementAt(k),
|
||||||
m.elementAt(k).elementAt(j)));
|
// m.elementAt(k).elementAt(j)));
|
||||||
k++; }
|
k++; }
|
||||||
v2.addElement(new Integer(erg));
|
v2.addElement(new Integer(erg));
|
||||||
j++; }
|
j++; }
|
||||||
|
Loading…
Reference in New Issue
Block a user