From 403430d0c4264d2e20d2ef0b9d612fadd797d869 Mon Sep 17 00:00:00 2001 From: Aldaron7 Date: Sat, 12 May 2018 15:22:31 +0200 Subject: [PATCH] adapt2 incode docu added --- src/de/dhbwstuttgart/strucTypes/RuleSetStrucType.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/de/dhbwstuttgart/strucTypes/RuleSetStrucType.java b/src/de/dhbwstuttgart/strucTypes/RuleSetStrucType.java index 88b9d8dd..b0a5d1fa 100644 --- a/src/de/dhbwstuttgart/strucTypes/RuleSetStrucType.java +++ b/src/de/dhbwstuttgart/strucTypes/RuleSetStrucType.java @@ -48,7 +48,7 @@ public class RuleSetStrucType extends RuleSet { && (p.getRhsType() instanceof ReferenceType)) .filter(p -> { UnifyType typeD1 = p.getRhsType(); - // check ! (D <=* D') + // check not(D <=* D') if (fc.getAncestors(typeD).contains(typeD1)) return false; Optional opt = fc.getLeftHandedType(typeD.getName()); @@ -91,13 +91,14 @@ public class RuleSetStrucType extends RuleSet { Optional sigmaopt = new MartelliMontanariUnify().unify(unifD1gen.apply(typeD1gen), typeD); if (!sigmaopt.isPresent()) - return Optional.empty(); + continue; // replace outerLeftPair.lhs and outerRightPair.rhs witch new Types Unifier sigma = sigmaopt.get(); pairs.remove(outerLeftPair); pairs.remove(outerRightPair); pairs.add(UnifyTypeFactory.generateSmallerDotPair(sigma.apply(typeD), outerLeftPair.getRhsType())); pairs.add(UnifyTypeFactory.generateSmallerDotPair(outerRightPair.getLhsType(), sigma.apply(typeD1))); + // TODO pairs.add mit sigma als Pair return Optional.of(pairs); } // No Linking found