Zuviele Elemente der transitiven Hülle in 3. Zeile hinzugefügt #72

Open
opened 2021-02-02 21:06:25 +00:00 by pl · 0 comments
Owner

public class TestTwoArgs {
a;

id(b) {
    var c = b;
    return c;
}

setA(x) {
    a = x;
    return a;
}

m(x,y) {
    x = id(y);
    return x;
}

main(x,y) {
	return m(id(x),setA(y));
}

}

liefert

fogg.classConstraints: [N < AP, AP < Z, Z < P, P < Q, Q < AL, AL < Y, Y < AT, AT < AF, AF < java/lang/Object]
fogg.methodConstraintsWithPosition: {
TPH AL id(TPH P)=[],
TPH AT m(TPH YTPH Z)=[],
TPH AP setA(TPH T)=[T < N],
TPH AF main(TPH AG TPH AH)=[AH < T, AG < P,
T < N, //wird durch 3. Zeile hingefuegt
T < AP, T < Z, T < P, T < Q, T < AL, T < Y, T < AT, T < AF //sollte nicht hinzugefügt werden, weil AP < ... < AF zur transitiven Hüelle gehören. Diese sollten nicht dazu genommen werden.
]}

T < AP, T < Z, T < P, T < Q, T < AL, T < Y, T < AT, T < AF

public class TestTwoArgs { a; id(b) { var c = b; return c; } setA(x) { a = x; return a; } m(x,y) { x = id(y); return x; } main(x,y) { return m(id(x),setA(y)); } } liefert fogg.classConstraints: [N < AP, AP < Z, Z < P, P < Q, Q < AL, AL < Y, Y < AT, AT < AF, AF < java/lang/Object] fogg.methodConstraintsWithPosition: { TPH AL id(TPH P)=[], TPH AT m(TPH YTPH Z)=[], TPH AP setA(TPH T)=[T < N], TPH AF main(TPH AG TPH AH)=[AH < T, AG < P, T < N, //wird durch 3. Zeile hingefuegt T < AP, T < Z, T < P, T < Q, T < AL, T < Y, T < AT, T < AF //sollte nicht hinzugefügt werden, weil AP < ... < AF zur transitiven Hüelle gehören. Diese sollten nicht dazu genommen werden. ]} T < AP, T < Z, T < P, T < Q, T < AL, T < Y, T < AT, T < AF
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#72
No description provided.