TestTwoArgs #77

Closed
opened 2021-02-25 21:35:19 +00:00 by pl · 5 comments
Owner

Created attachment 20
Das erwartete Ergebnis

fogg.allConstraints: [Z < P, AH < T, AL < AF, P < AL, AG < P, AP < Z, T < AP]
fogg.posOfTPHs: {P=[PairTphMethod[METHOD,TPH ALid(TPH P)]], T=[PairTphMethod[METHOD,TPH APsetA(TPH T)]], AF=[PairTphMethod[METHOD,TPH AFm(TPH AFTPH Z)], PairTphMethod[METHOD,TPH AFmain(TPH AGTPH AH)]], AG=[PairTphMethod[METHOD,TPH AFmain(TPH AGTPH AH)]], AH=[PairTphMethod[METHOD,TPH AFmain(TPH AGTPH AH)]], Z=[PairTphMethod[METHOD,TPH AFm(TPH AFTPH Z)]], AL=[PairTphMethod[METHOD,TPH ALid(TPH P)], PairTphMethod[METHOD,TPH AFm(TPH AFTPH Z)], PairTphMethod[METHOD,TPH AFmain(TPH AGTPH AH)]], AP=[PairTphMethod[FIELD,null]]}

fogg.classConstraints: [AP < Z, Z < P, P < AL, AL < AF, AF < java/lang/Object]

fogg.methodConstraintsWithPosition: {TPH ALid(TPH P)=[],
TPH AFm(TPH AFTPH Z)=[],
TPH APsetA(TPH T)=[T < AP],
TPH AFmain(TPH AGTPH AH)=[AH < T, AG < P, T < AL, T < P, T < AP, T < Z, T < AF]}

Created attachment 20 Das erwartete Ergebnis fogg.allConstraints: [Z < P, AH < T, AL < AF, P < AL, AG < P, AP < Z, T < AP] fogg.posOfTPHs: {P=[PairTphMethod[METHOD,TPH ALid(TPH P)]], T=[PairTphMethod[METHOD,TPH APsetA(TPH T)]], AF=[PairTphMethod[METHOD,TPH AFm(TPH AFTPH Z)], PairTphMethod[METHOD,TPH AFmain(TPH AGTPH AH)]], AG=[PairTphMethod[METHOD,TPH AFmain(TPH AGTPH AH)]], AH=[PairTphMethod[METHOD,TPH AFmain(TPH AGTPH AH)]], Z=[PairTphMethod[METHOD,TPH AFm(TPH AFTPH Z)]], AL=[PairTphMethod[METHOD,TPH ALid(TPH P)], PairTphMethod[METHOD,TPH AFm(TPH AFTPH Z)], PairTphMethod[METHOD,TPH AFmain(TPH AGTPH AH)]], AP=[PairTphMethod[FIELD,null]]} fogg.classConstraints: [AP < Z, Z < P, P < AL, AL < AF, AF < java/lang/Object] fogg.methodConstraintsWithPosition: {TPH ALid(TPH P)=[], TPH AFm(TPH AFTPH Z)=[], TPH APsetA(TPH T)=[T < AP], TPH AFmain(TPH AGTPH AH)=[AH < T, AG < P, T < AL, T < P, T < AP, T < Z, T < AF]}
Author
Owner

Created attachment 24
Das erwartete Ergebnis (korrgiert für Umbennungen)

Created attachment 24 Das erwartete Ergebnis (korrgiert für Umbennungen)
Author
Owner

fogg.methodConstraintsWithPosition: {
TPH ALid(TPH P)=[AL = AL, P < AL],
ok

TPH AFm(TPH AFTPH Z)=[AF = AF, AL < AF, Z < P, AL = AL, P < AL],
ok

TPH APsetA(TPH T)=[T < AP, AP = AP, AP = AP],
ok

TPH AFmain(TPH AGTPH AH)=[AF = AF, AG < P, AL = AL, AP = AP, AH < T, AP < Z, AF = AF, AL < AF, P < AL, T < AP, Z < AF]}

Z < AF sind class-Constraints, also hier löschen

fogg.methodConstraintsWithPosition: { TPH ALid(TPH P)=[AL = AL, P < AL], ok TPH AFm(TPH AFTPH Z)=[AF = AF, AL < AF, Z < P, AL = AL, P < AL], ok TPH APsetA(TPH T)=[T < AP, AP = AP, AP = AP], ok TPH AFmain(TPH AGTPH AH)=[AF = AF, AG < P, AL = AL, AP = AP, AH < T, AP < Z, AF = AF, AL < AF, P < AL, T < AP, Z < AF]} Z < AF sind class-Constraints, also hier löschen
Author
Owner

fogg.classConstraints: [AP < java/lang/Object, AP < Z, Z < P, P < AL, AL < AF, AF < java/lang/Object]

AP < java/lang/Object ist falsch

fogg.methodConstraintsWithPosition: {
TPH ALid(TPH P)=[AL = AL, P < AL],
ok, aber AL < Object fehlt

TPH AFm(TPH AFTPH Z)=[AF = AF, AL < AF, Z < P, AL = AL, P < AL],
ok, aber AF < Object fehlt

TPH APsetA(TPH T)=[T < AP, AP = AP, AP = AP],
ok, aber AP < Object fehlt

TPH AFmain(TPH AGTPH AH)=[AF = AF, AG < P, AL = AL, AP = AP, AH < T, AP < Z, AF = AF, AL < AF, P < AL, T < AP, Z < AF]}

Z < AF sind class-Constraints, also hier löschen

fogg.classConstraints: [AP < java/lang/Object, AP < Z, Z < P, P < AL, AL < AF, AF < java/lang/Object] AP < java/lang/Object ist falsch fogg.methodConstraintsWithPosition: { TPH ALid(TPH P)=[AL = AL, P < AL], ok, aber AL < Object fehlt TPH AFm(TPH AFTPH Z)=[AF = AF, AL < AF, Z < P, AL = AL, P < AL], ok, aber AF < Object fehlt TPH APsetA(TPH T)=[T < AP, AP = AP, AP = AP], ok, aber AP < Object fehlt TPH AFmain(TPH AGTPH AH)=[AF = AF, AG < P, AL = AL, AP = AP, AH < T, AP < Z, AF = AF, AL < AF, P < AL, T < AP, Z < AF]} Z < AF sind class-Constraints, also hier löschen
Author
Owner

Das sieht jetzt schon ganz gut aus. das Ergebnis wäre
public class TestTwoArgs<T extends AS, AS extends Z, Z extends AN, AN extends AG, AG> {
AS a;

//AN -> AN
AN id(AN b) {
    var c = b;
    return c;
}

//T -> AS
AS setA(T x) {
    var a = x;
    return a;
}

//(AG,Z) -> AG 
AG m(AG x, Z y) {
    x = id(y);
    return x;
}

//<E extends AN, F extends T> (E, F) -> AG
<AI extends AN, AH extends T> AG main(AI x, AH y) {
	return m(id(x),setA(y));
}

}

Du bekommst:
public class TestTwoArgs<Z extends AN, AG, AN extends AG, AS extends Z> {
public AS a;
public TestTwoArgs();
public

AN id(AN);
public AS setA(T);
public AG m(AG, Z);
public <AI, AN extends AG, AH extends AG> AG main(AH, AI);
}

Das sieht jetzt schon ganz gut aus. das Ergebnis wäre public class TestTwoArgs<T extends AS, AS extends Z, Z extends AN, AN extends AG, AG> { AS a; //AN -> AN AN id(AN b) { var c = b; return c; } //T -> AS AS setA(T x) { var a = x; return a; } //(AG,Z) -> AG AG m(AG x, Z y) { x = id(y); return x; } //<E extends AN, F extends T> (E, F) -> AG <AI extends AN, AH extends T> AG main(AI x, AH y) { return m(id(x),setA(y)); } } Du bekommst: public class TestTwoArgs<Z extends AN, AG, AN extends AG, AS extends Z> { public AS a; public TestTwoArgs(); public <P extends AN> AN id(AN); public <T extends AS> AS setA(T); public <Z extends AG> AG m(AG, Z); public <AI, AN extends AG, AH extends AG> AG main(AH, AI); }
Author
Owner

Es geht noch allgemeiner

public class TestTwoArgs <AS extends Z, Z extends P, P extends AN, AN extends AG, AG>
{
AS
a;

//AN -> AN
AN id(P b) {
    var c = b;
    return c;
}

//T -> AS
<T extends AS>
AS setA(T x) {
    a = x;
    return a;
}

//(AG,Z) -> AG 
AG m(AG x, Z y) {
    x = id(y);
    return x;
}

<AH extends P, AI extends AS> //(AI, AH) -> AG
AG main(AH x, AI y) {
	return m(id(x),setA(y));
}

}

Es geht noch allgemeiner public class TestTwoArgs <AS extends Z, Z extends P, P extends AN, AN extends AG, AG> { AS a; //AN -> AN AN id(P b) { var c = b; return c; } //T -> AS <T extends AS> AS setA(T x) { a = x; return a; } //(AG,Z) -> AG AG m(AG x, Z y) { x = id(y); return x; } <AH extends P, AI extends AS> //(AI, AH) -> AG AG main(AH x, AI y) { return m(id(x),setA(y)); } }
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: JavaTX/JavaCompilerCore#77
No description provided.