From 89b7d99621a144f0f27c9b42bceaa1eb4c47d3e1 Mon Sep 17 00:00:00 2001 From: Pluemicke Martin Date: Wed, 14 Mar 2018 17:45:16 +0100 Subject: [PATCH 1/2] modified: TypeUnifyTask.java modified: model/UnifyPair.java --- .../typeinference/unify/TypeUnifyTask.java | 12 ++++++++---- .../typeinference/unify/model/UnifyPair.java | 4 ++++ 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/src/de/dhbwstuttgart/typeinference/unify/TypeUnifyTask.java b/src/de/dhbwstuttgart/typeinference/unify/TypeUnifyTask.java index 4af7a62c..15eef7c2 100644 --- a/src/de/dhbwstuttgart/typeinference/unify/TypeUnifyTask.java +++ b/src/de/dhbwstuttgart/typeinference/unify/TypeUnifyTask.java @@ -362,10 +362,6 @@ 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.isEmpty()) { if (variance == 1) { if (a.iterator().next().getLhsType().getName().equals("WL")) @@ -399,6 +395,14 @@ public class TypeUnifyTask extends RecursiveTask>> { return result; } + protected boolean isUndefinedPairSet(Set> s) { + boolean res = true; + if (s.size() ==1) { + s.iterator().next().stream().forEach(x -> { res = res && x.isUndefinedPair(); return; }); + return res; + } + + } /** * Checks whether a set of pairs is in solved form. * @param eqPrimePrime The set of pair diff --git a/src/de/dhbwstuttgart/typeinference/unify/model/UnifyPair.java b/src/de/dhbwstuttgart/typeinference/unify/model/UnifyPair.java index 82194363..52dc605a 100644 --- a/src/de/dhbwstuttgart/typeinference/unify/model/UnifyPair.java +++ b/src/de/dhbwstuttgart/typeinference/unify/model/UnifyPair.java @@ -75,6 +75,10 @@ public class UnifyPair { public void setVariance(byte v) { variance = v; } + + public boolean isUndefinedPair() { + return undefinedPair; + } @Override public boolean equals(Object obj) { if(!(obj instanceof UnifyPair)) From f7e1a34c5ad0d957846bf45852a59704aa35891c Mon Sep 17 00:00:00 2001 From: Michael Uhl Date: Tue, 15 Jan 2019 20:42:07 +0100 Subject: [PATCH 2/2] Revoved invalid target"9" from maven pom file. --- pom.xml | 8 -------- 1 file changed, 8 deletions(-) diff --git a/pom.xml b/pom.xml index 1b97e501..6f54967a 100644 --- a/pom.xml +++ b/pom.xml @@ -79,14 +79,6 @@ - - org.apache.maven.plugins - maven-compiler-plugin - - 9 - 9 - -