From bc1a796e2891f7a0fc2559b4cdb8dcbdbc9bad53 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Pl=C3=BCmicke?= Date: Tue, 3 Jul 2018 11:54:24 +0200 Subject: [PATCH] modified: ../../src/de/dhbwstuttgart/typeinference/unify/TypeUnifyTask.java --- .../typeinference/unify/TypeUnifyTask.java | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/de/dhbwstuttgart/typeinference/unify/TypeUnifyTask.java b/src/de/dhbwstuttgart/typeinference/unify/TypeUnifyTask.java index 1519faa5..69b1246b 100644 --- a/src/de/dhbwstuttgart/typeinference/unify/TypeUnifyTask.java +++ b/src/de/dhbwstuttgart/typeinference/unify/TypeUnifyTask.java @@ -145,12 +145,12 @@ public class TypeUnifyTask extends RecursiveTask>> { * @return The set of all principal type unifiers */ protected Set> unify(Set eq, IFiniteClosure fc, boolean parallel) { - Set aas = eq.stream().filter(x -> x.getLhsType().getName().equals("AA") //&& x.getPairOp().equals(PairOperator.SMALLERDOT) - ).collect(Collectors.toCollection(HashSet::new)); - writeLog(nOfUnify.toString() + " AA: " + aas.toString()); - if (aas.isEmpty()) { - System.out.println(""); - } + //Set aas = eq.stream().filter(x -> x.getLhsType().getName().equals("AA") //&& x.getPairOp().equals(PairOperator.SMALLERDOT) + // ).collect(Collectors.toCollection(HashSet::new)); + //writeLog(nOfUnify.toString() + " AA: " + aas.toString()); + //if (aas.isEmpty()) { + // System.out.println(""); + //} /* * Step 1: Repeated application of reduce, adapt, erase, swap */ @@ -490,7 +490,7 @@ public class TypeUnifyTask extends RecursiveTask>> { Set> elems = new HashSet>(fstElems); elems.add(a); //if (remainingSets.isEmpty()) {//muss immer gegeben sein, weil nur 1 Element der topLevelSets mehr als ein Elemet enthaelt - writeLog("Vor unify2 Aufruf: " + eq.toString()); + //writeLog("Vor unify2 Aufruf: " + eq.toString()); Set> res = unify2(elems, eq, fc, parallel); if (!isUndefinedPairSetSet(res) && isUndefinedPairSetSet(result)) { //wenn korrektes Ergebnis gefunden alle Fehlerfaelle loeschen @@ -1144,7 +1144,7 @@ public class TypeUnifyTask extends RecursiveTask>> { BiFunction f = (x,y) -> { ArrayList termList = new ArrayList(); - termList.add(new UnifyPair(y,t.getTypeParams().get(i_ef), PairOperator.EQUALSDOT)); + termList.add(new UnifyPair(y,thetaS.getTypeParams().get(i_ef), PairOperator.EQUALSDOT)); return ((match.match(termList).isPresent()) || x); }; //if (parai.getName().equals("java.lang.Integer")) { @@ -1155,7 +1155,7 @@ public class TypeUnifyTask extends RecursiveTask>> { resultPrime.add(new UnifyPair(thetaS.getTypeParams().get(i), freshTphs[i], PairOperator.EQUALSDOT, pair.getSubstitution(), pair)); } else { - fBounded.add(theta); + fBounded.add(thetaS.getTypeParams().get(i)); resultPrime.add(new UnifyPair(thetaS.getTypeParams().get(i), freshTphs[i], PairOperator.SMALLERDOTWC, pair.getSubstitution(), pair, fBounded)); } } @@ -1193,7 +1193,7 @@ public class TypeUnifyTask extends RecursiveTask>> { resultPrime.add(new UnifyPair(a, new ExtendsType(freshTph), PairOperator.EQUALSDOT, pair.getSubstitution(), pair)); resultPrime.add(new UnifyPair(theta, freshTph, PairOperator.SMALLERDOT, pair.getSubstitution(), pair, pair.getfBounded())); result.add(resultPrime); - writeLog("resultPrime: " + resultPrime.toString()); + //writeLog("resultPrime: " + resultPrime.toString()); resultPrime = new HashSet<>(); resultPrime.add(new UnifyPair(a, new SuperType(freshTph), PairOperator.EQUALSDOT, pair.getSubstitution(), pair));