adapt2 incode docu added
This commit is contained in:
parent
d9ab487253
commit
403430d0c4
@ -48,7 +48,7 @@ public class RuleSetStrucType extends RuleSet {
|
|||||||
&& (p.getRhsType() instanceof ReferenceType))
|
&& (p.getRhsType() instanceof ReferenceType))
|
||||||
.filter(p -> {
|
.filter(p -> {
|
||||||
UnifyType typeD1 = p.getRhsType();
|
UnifyType typeD1 = p.getRhsType();
|
||||||
// check ! (D<theta.1,..,theta.n> <=* D'<theta'.1,..,theta'.m>)
|
// check not(D<theta.1,..,theta.n> <=* D'<theta'.1,..,theta'.m>)
|
||||||
if (fc.getAncestors(typeD).contains(typeD1))
|
if (fc.getAncestors(typeD).contains(typeD1))
|
||||||
return false;
|
return false;
|
||||||
Optional<UnifyType> opt = fc.getLeftHandedType(typeD.getName());
|
Optional<UnifyType> opt = fc.getLeftHandedType(typeD.getName());
|
||||||
@ -91,13 +91,14 @@ public class RuleSetStrucType extends RuleSet {
|
|||||||
Optional<Unifier> sigmaopt = new MartelliMontanariUnify().unify(unifD1gen.apply(typeD1gen), typeD);
|
Optional<Unifier> sigmaopt = new MartelliMontanariUnify().unify(unifD1gen.apply(typeD1gen), typeD);
|
||||||
|
|
||||||
if (!sigmaopt.isPresent())
|
if (!sigmaopt.isPresent())
|
||||||
return Optional.empty();
|
continue;
|
||||||
// replace outerLeftPair.lhs and outerRightPair.rhs witch new Types
|
// replace outerLeftPair.lhs and outerRightPair.rhs witch new Types
|
||||||
Unifier sigma = sigmaopt.get();
|
Unifier sigma = sigmaopt.get();
|
||||||
pairs.remove(outerLeftPair);
|
pairs.remove(outerLeftPair);
|
||||||
pairs.remove(outerRightPair);
|
pairs.remove(outerRightPair);
|
||||||
pairs.add(UnifyTypeFactory.generateSmallerDotPair(sigma.apply(typeD), outerLeftPair.getRhsType()));
|
pairs.add(UnifyTypeFactory.generateSmallerDotPair(sigma.apply(typeD), outerLeftPair.getRhsType()));
|
||||||
pairs.add(UnifyTypeFactory.generateSmallerDotPair(outerRightPair.getLhsType(), sigma.apply(typeD1)));
|
pairs.add(UnifyTypeFactory.generateSmallerDotPair(outerRightPair.getLhsType(), sigma.apply(typeD1)));
|
||||||
|
// TODO pairs.add mit sigma als Pair
|
||||||
return Optional.of(pairs);
|
return Optional.of(pairs);
|
||||||
}
|
}
|
||||||
// No Linking found
|
// No Linking found
|
||||||
|
Loading…
Reference in New Issue
Block a user