modified: src/de/dhbwstuttgart/typeinference/unify/TypeUnifyTask.java

This commit is contained in:
Martin Plümicke 2018-10-11 09:47:55 +02:00
parent 241c7f37d9
commit bda7dcb5c1

View File

@ -571,8 +571,9 @@ public class TypeUnifyTask extends RecursiveTask<Set<Set<UnifyPair>>> {
if (!durchschnitt.isEmpty()) {
UnifyPair groundBasepair = res.iterator().next().iterator().next().getGroundBasePair().get();
Set<UnifyPair> undefRes = res.stream().reduce((y,z) -> { y.addAll(z); return y;}).get();
Set<Set<UnifyPair>> reducedUndefResSubst = undefRes.stream()
.map(x -> x.getAllSubstitutions()).map(y -> { y.removeAll(durchschnitt); return y;})
Set<Set<UnifyPair>> reducedUndefResSubstGroundedBasePair = undefRes.stream()
.map(x -> { Set<UnifyPair> su = x.getAllSubstitutions(); su.add(x.getGroundBasePair().get()); return su;})
.map(y -> { y.removeAll(durchschnitt); return y;})
.collect(Collectors.toCollection(HashSet::new));
Set<UnifyPair> resGroundBasepairs = undefRes.stream().map(x -> x.getGroundBasePair().get()).collect(Collectors.toCollection(HashSet::new));
if (res.size() > 1) {