modified: src/main/java/de/dhbwstuttgart/bytecode/gGenericsAli/FamilyOfGeneratedGenerics.java

This commit is contained in:
AluAli 2020-10-23 00:11:54 +02:00
parent f6154b8f2c
commit 7900449897

View File

@ -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<TPHConstraint> constraintsSet) {
//TODO: Regeln
for(TPHConstraint cons: constraintsSet){
cs_cl =
}
// for(TPHConstraint cons: constraintsSet){
//
// 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) {
//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<ClassConstraint> typeOfANodeOfAField() {
public List<ClassConstraint> typeOfANodeOfAField(List<TPHConstraint> 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<ClassConstraint> transitiveSubtypeForClass() {
public List<ClassConstraint> transitiveSubtypeForClassTypes(List<TPHConstraint> allConstraints, List<ClassConstraint> 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<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
* {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
* {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
}