From 0f1526daa20a275757de0aa54a7075917b7e8754 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Pl=C3=BCmicke?= Date: Thu, 28 Mar 2019 15:44:03 +0100 Subject: [PATCH] modified: ../../../main/java/de/dhbwstuttgart/typeinference/unify/TypeUnifyTask.java deleted: .gitignore --- .../typeinference/unify/TypeUnifyTask.java | 14 +++++++++----- src/test/java/logFiles/.gitignore | 5 ----- src/test/resources/bytecode/javFiles/Id.jav | 4 ++-- src/test/resources/bytecode/javFiles/MatrixOP.jav | 4 ++-- 4 files changed, 13 insertions(+), 14 deletions(-) delete mode 100644 src/test/java/logFiles/.gitignore diff --git a/src/main/java/de/dhbwstuttgart/typeinference/unify/TypeUnifyTask.java b/src/main/java/de/dhbwstuttgart/typeinference/unify/TypeUnifyTask.java index cb5d2ca1..8eb49691 100644 --- a/src/main/java/de/dhbwstuttgart/typeinference/unify/TypeUnifyTask.java +++ b/src/main/java/de/dhbwstuttgart/typeinference/unify/TypeUnifyTask.java @@ -1121,7 +1121,7 @@ public class TypeUnifyTask extends RecursiveTask>> { } else { //alle Fehlerfaelle und alle korrekten Ergebnis jeweils adden - writeLog("RES Fst:" + result.toString() + " " + res.toString()); + writeLog("RES Fst: reuslt: " + result.toString() + " res: " + res.toString()); result.addAll(res); } } @@ -1373,8 +1373,10 @@ public class TypeUnifyTask extends RecursiveTask>> { for (UnifyPair sameEq : sameEqSet) { if (sameEq.getLhsType() instanceof PlaceholderType) { Set localEq = new HashSet<>(); - Set unitedSubst = new HashSet<>(aPair.getSubstitution()); - unitedSubst.addAll(sameEq.getSubstitution()); + Set unitedSubst = new HashSet<>(aPair.getAllSubstitutions()); + unitedSubst.addAll(aPair.getAllBases()); + unitedSubst.addAll(sameEq.getAllSubstitutions()); + unitedSubst.addAll(sameEq.getAllBases()); localEq.add(new UnifyPair(aPair.getRhsType(), sameEq.getRhsType(), sameEq.getPairOp(), unitedSubst, null)); Set> localRes = unify(localEq, new ArrayList<>(), fc, false, 0, false); if (isUndefinedPairSetSet(localRes)) { @@ -1387,8 +1389,10 @@ public class TypeUnifyTask extends RecursiveTask>> { } else { Set localEq = new HashSet<>(); - Set unitedSubst = new HashSet<>(aPair.getSubstitution()); - unitedSubst.addAll(sameEq.getSubstitution()); + Set unitedSubst = new HashSet<>(aPair.getAllSubstitutions()); + unitedSubst.addAll(aPair.getAllBases()); + unitedSubst.addAll(sameEq.getAllSubstitutions()); + unitedSubst.addAll(sameEq.getAllBases()); localEq.add(new UnifyPair(sameEq.getLhsType(), aPair.getRhsType(), sameEq.getPairOp(), unitedSubst, null)); Set> localRes = unify(localEq, new ArrayList<>(), fc, false, 0, false); if (isUndefinedPairSetSet(localRes)) { diff --git a/src/test/java/logFiles/.gitignore b/src/test/java/logFiles/.gitignore deleted file mode 100644 index 76bedaea..00000000 --- a/src/test/java/logFiles/.gitignore +++ /dev/null @@ -1,5 +0,0 @@ -# Ignore everything in this directory -* -# Except this file -!.gitignore - diff --git a/src/test/resources/bytecode/javFiles/Id.jav b/src/test/resources/bytecode/javFiles/Id.jav index 6cb5d4b0..de6bd7d7 100644 --- a/src/test/resources/bytecode/javFiles/Id.jav +++ b/src/test/resources/bytecode/javFiles/Id.jav @@ -1,6 +1,6 @@ -public class Id { +public class Id { - id(b){ + id(FTU b){ return b; } } \ No newline at end of file diff --git a/src/test/resources/bytecode/javFiles/MatrixOP.jav b/src/test/resources/bytecode/javFiles/MatrixOP.jav index 494453cb..4de9dc6c 100644 --- a/src/test/resources/bytecode/javFiles/MatrixOP.jav +++ b/src/test/resources/bytecode/javFiles/MatrixOP.jav @@ -3,7 +3,7 @@ import java.lang.Integer; import java.lang.Byte; import java.lang.Boolean; -public class MatrixOP extends Vector> { +public class MatrixOP extends Vector> { MatrixOP () { } @@ -18,7 +18,7 @@ public class MatrixOP extends Vector> { } } - public mul = (m1, m2) -> { + Fun2$$>, java.util.Vector>, MatrixOP> mul = (m1, m2) -> { var ret = new MatrixOP(); var i = 0; while(i < m1.size()) {