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