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))
|
||||
.filter(p -> {
|
||||
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))
|
||||
return false;
|
||||
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);
|
||||
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user