diff --git a/src/main/java/de/dhbwstuttgart/bytecode/gGenericsAli/FamilyOfGeneratedGenerics.java b/src/main/java/de/dhbwstuttgart/bytecode/gGenericsAli/FamilyOfGeneratedGenerics.java index ecaded579..cf5b88e29 100644 --- a/src/main/java/de/dhbwstuttgart/bytecode/gGenericsAli/FamilyOfGeneratedGenerics.java +++ b/src/main/java/de/dhbwstuttgart/bytecode/gGenericsAli/FamilyOfGeneratedGenerics.java @@ -32,6 +32,7 @@ public class FamilyOfGeneratedGenerics { // extends TPHConstraint? public String getLeftSideOfConstraint(TPHConstraint constraint) { if(constraint.getRel() == Relation.EXTENDS) return constraint.getLeft(); + return null; } /*public Type getRightSideOfConstraint(TPHConstraint constraint) { @@ -47,6 +48,7 @@ public class FamilyOfGeneratedGenerics { // extends TPHConstraint? public String getRightSideOfConstraint(TPHConstraint constraint) { if(constraint.getRel() == Relation.EXTENDS) return constraint.getRight(); + return null; } /*public Relation getRelationOfConstraint(TPHConstraint constraint) { @@ -56,25 +58,32 @@ public class FamilyOfGeneratedGenerics { // extends TPHConstraint? public void addConstraintToClassConstraint(List constraintsSet) { //TODO: Regeln - for(TPHConstraint cons: constraintsSet){ - - cs_cl = - } +// for(TPHConstraint cons: constraintsSet){ +// +// cs_cl = +// } + List classConstraints1 = typeOfANodeOfAField(constraintsSet); + cs_cl.addAll(classConstraints1); + List classConstraints2 = transitiveSubtypeForClassTypes(cs, cs_cl); // in Klammer classConstraints1 oder constraintsSet? beides eher + cs_cl.addAll(classConstraints2); + List classConstraints3 = hasNoSupertypeForClassTypes(cs, cs_cl); + cs_cl.addAll(classConstraints3); } public void addConstraintToMethodConstraint(List constraintsSet) { //TODO: Regeln - for(TPHConstraint cons: constraintsSet){ +// for(TPHConstraint cons: constraintsSet){ +// +// cs_m = +// } - cs_m = - } } /** * Def. FGG: erste Zeile von cs_cl * {T < .T' | T is a type variable in a type of a node of a field} */ - public List typeOfANodeOfAField() { + public List typeOfANodeOfAField(List cs) { //TODO: } @@ -82,7 +91,7 @@ public class FamilyOfGeneratedGenerics { // extends TPHConstraint? * Def. FGG: zweite Zeile von cs_cl * {T' <. T'' | \exists T: (T <. T') \in cs_cl, (T' <. T'') \in cs } */ - public List transitiveSubtypeForClass() { + public List transitiveSubtypeForClassTypes(List allConstraints, List classConstraints) { //TODO: } @@ -91,7 +100,7 @@ public class FamilyOfGeneratedGenerics { // extends TPHConstraint? * {T <. Object | ((T is a type variable in a type of a node of a field * or (\exists T~: (T~ <. T) \in cs_cl)) and (\existsnot T': T <. T') \in cs)} */ - public List hasNoSupertypeForClassTypes() { + public List hasNoSupertypeForClassTypes(List allConstraints, List classConstraints) { } @@ -100,7 +109,7 @@ public class FamilyOfGeneratedGenerics { // extends TPHConstraint? * Def. FGG: erste Zeile von cs_m * {T < .T' | T is a type variable in a type of the method/constructor m in cl_\sigma, (T <. T') \in cs} */ - public List typeOfTheMethodInClSigma() { + public List typeOfTheMethodInClSigma() { // cl_\sigma?? } @@ -108,7 +117,7 @@ public class FamilyOfGeneratedGenerics { // extends TPHConstraint? * Def. FGG: zweite Zeile von cs_m * {R' <. S | (R <. R'), (S <. S') \in cs_m and (R',S) is in the transitive closure of cs} */ - public List firstTransitiveSubtypeForMethodTypes() { + public List firstTransitiveSubtypeForMethodTypes() { //transitive closure of cs }