Generics werden aus .class-Files nicht übernommen #220

Closed
opened 2023-07-18 09:52:05 +00:00 by pl · 1 comment
Owner

Branch: targetBytecode
Commit: 18429d9cf9

Beispiel JavaCompilerCore/src/test/java/AllgemeinTest.java

Ressource: JavaCompilerCore/resources/AllgemeinTest/Iteration.jav

Mit der Pair.class (JavaCompilerCore/resources/AllgemeinTest/Pair.java muss comiliert werden!) bekommt man folgenden Fehler!

de.dhbwstuttgart.exceptions.TypeinferenceException: Unresolved constraints: (Pair <. Pair<AK,AL>, )
at de.dhbwstuttgart.typeinference.unify.TypeUnifyTask.compute(TypeUnifyTask.java:274)
at de.dhbwstuttgart.typeinference.unify.TypeUnify.unifyOderConstraints(TypeUnify.java:110)
at de.dhbwstuttgart.core.JavaTXCompiler.typeInference(JavaTXCompiler.java:746)
at de.dhbwstuttgart.core.JavaTXCompiler.generateBytecode(JavaTXCompiler.java:862)
at de.dhbwstuttgart.core.JavaTXCompiler.generateBytecode(JavaTXCompiler.java:853)
at AllgemeinTest.test(AllgemeinTest.java:71)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
at java.base/java.lang.reflect.Method.invoke(Method.java:578)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:93)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:40)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:529)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:756)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:452)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:210)

Branch: targetBytecode Commit: 18429d9cf96d2f9f89e8cdac525fa6be03ce1bf9 Beispiel JavaCompilerCore/src/test/java/AllgemeinTest.java Ressource: JavaCompilerCore/resources/AllgemeinTest/Iteration.jav Mit der Pair.class (JavaCompilerCore/resources/AllgemeinTest/Pair.java muss comiliert werden!) bekommt man folgenden Fehler! de.dhbwstuttgart.exceptions.TypeinferenceException: Unresolved constraints: [[(Pair <. Pair<AK,AL>, )]] at de.dhbwstuttgart.typeinference.unify.TypeUnifyTask.compute(TypeUnifyTask.java:274) at de.dhbwstuttgart.typeinference.unify.TypeUnify.unifyOderConstraints(TypeUnify.java:110) at de.dhbwstuttgart.core.JavaTXCompiler.typeInference(JavaTXCompiler.java:746) at de.dhbwstuttgart.core.JavaTXCompiler.generateBytecode(JavaTXCompiler.java:862) at de.dhbwstuttgart.core.JavaTXCompiler.generateBytecode(JavaTXCompiler.java:853) at AllgemeinTest.test(AllgemeinTest.java:71) at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104) at java.base/java.lang.reflect.Method.invoke(Method.java:578) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229) at org.junit.runners.ParentRunner.run(ParentRunner.java:309) at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:93) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:40) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:529) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:756) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:452) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:210)
Owner

Konnte den Fehler leider nicht nachstellen.
Meine Herangehensweise

  1. Parser generieren mit antlr: $ mvn antlr4:antlr4
  2. Die Pair.java Datei mit javac (version 19.0.2) kompilieren
  3. test() in AllgemeinTest ausführen.

Läuft ohne Fehler durch. Output:

/usr/lib/jvm/jdk-20/bin/java -agentlib:jdwp=transport=dt_socket,address=127.0.0.1:41229,suspend=y,server=n -ea --enable-preview -Didea.test.cyclic.buffer.size=1048576 -javaagent:/home/andreas/bin/idea-IU-223.8617.56/plugins/java/lib/rt/debugger-agent.jar -Dfile.encoding=UTF-8 -Dsun.stdout.encoding=UTF-8 -Dsun.stderr.encoding=UTF-8 -classpath /home/andreas/bin/idea-IU-223.8617.56/lib/idea_rt.jar:/home/andreas/bin/idea-IU-223.8617.56/plugins/junit/lib/junit5-rt.jar:/home/andreas/bin/idea-IU-223.8617.56/plugins/junit/lib/junit-rt.jar:/home/andreas/Development/JavaCompilerCore/target/test-classes:/home/andreas/Development/JavaCompilerCore/target/classes:/home/andreas/.m2/repository/junit/junit/4.11/junit-4.11.jar:/home/andreas/.m2/repository/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar:/home/andreas/.m2/repository/org/antlr/antlr4/4.11.1/antlr4-4.11.1.jar:/home/andreas/.m2/repository/org/antlr/antlr4-runtime/4.11.1/antlr4-runtime-4.11.1.jar:/home/andreas/.m2/repository/org/antlr/antlr-runtime/3.5.3/antlr-runtime-3.5.3.jar:/home/andreas/.m2/repository/org/antlr/ST4/4.3.4/ST4-4.3.4.jar:/home/andreas/.m2/repository/org/abego/treelayout/org.abego.treelayout.core/1.0.3/org.abego.treelayout.core-1.0.3.jar:/home/andreas/.m2/repository/org/glassfish/javax.json/1.1.4/javax.json-1.1.4.jar:/home/andreas/.m2/repository/com/ibm/icu/icu4j/71.1/icu4j-71.1.jar:/home/andreas/.m2/repository/commons-io/commons-io/2.6/commons-io-2.6.jar:/home/andreas/.m2/repository/com/google/guava/guava/22.0/guava-22.0.jar:/home/andreas/.m2/repository/com/google/code/findbugs/jsr305/1.3.9/jsr305-1.3.9.jar:/home/andreas/.m2/repository/com/google/errorprone/error_prone_annotations/2.0.18/error_prone_annotations-2.0.18.jar:/home/andreas/.m2/repository/com/google/j2objc/j2objc-annotations/1.1/j2objc-annotations-1.1.jar:/home/andreas/.m2/repository/org/codehaus/mojo/animal-sniffer-annotations/1.14/animal-sniffer-annotations-1.14.jar:/home/andreas/.m2/repository/org/reflections/reflections/0.9.11/reflections-0.9.11.jar:/home/andreas/.m2/repository/org/javassist/javassist/3.21.0-GA/javassist-3.21.0-GA.jar:/home/andreas/.m2/repository/org/ow2/asm/asm/9.5/asm-9.5.jar com.intellij.rt.junit.JUnitStarter -ideVersion5 -junit4 AllgemeinTest,test
Connected to the target VM, address: '127.0.0.1:41229', transport: 'socket'
m2
methodSignatureConstraint; [
(TPH V =. TPH AR),
(TPH X =. TPH AQ),
(TPH W =. TPH AS)]
snd
methodSignatureConstraint; [
(TPH AB =. GTV U)]
id
methodSignatureConstraint; [
(TPH AH =. TPH N),
(TPH AG =. TPH O)]
m1
methodSignatureConstraint; [
(TPH AV =. TPH R),
(TPH AX =. TPH Q),
(TPH AW =. TPH S)]
fst
methodSignatureConstraint; [
(TPH BB =. GTV T)]
id
methodSignatureConstraint; [
(TPH BG =. TPH O),
(TPH BH =. TPH N)]
{java.lang.Object=Elem: Node(java.lang.Object)
Prec: [java.lang.Object]
Desc: [java.lang.Object, Pair<EZD,EZE>, Iteration]

, Pair<EZD,EZE>=Elem: Node(Pair<EZD,EZE>)
Prec: [java.lang.Object]
Desc: []

, Iteration=Elem: Node(Iteration)
Prec: [java.lang.Object]
Desc: []

}

xxx1
Unify:
UND:[(Pair<BK,BL> <. AQ, , 0 WC: true, IT: false), (U =. Iteration, 0 WC: true, IT: false), (AU =. Iteration, 0 WC: true, IT: false), (Pair<AK,AL> <. Q, , 0 WC: true, IT: false), (O <. N, 0 WC: true, IT: false, 0 WC: true, IT: false), (AC <. AA, 0 WC: true, IT: false, 0 WC: true, IT: false), (BC <. BA, 0 WC: true, IT: false, 0 WC: true, IT: false), (BF =. Iteration, 0 WC: true, IT: false), (AY <. AT, 0 WC: true, IT: false, 0 WC: true, IT: false), (BI <. BE, 0 WC: true, IT: false, 0 WC: true, IT: false), (AF =. Iteration, 0 WC: true, IT: false), (AI <. AE, 0 WC: true, IT: false, 0 WC: true, IT: false), (Y <. T, 0 WC: true, IT: false, 0 WC: true, IT: false)]
isInherited = false

ODER:
[[(AQ <. Y, 0 WC: true, IT: false, 0 WC: true, IT: false), (U =. Iteration, 0 WC: true, IT: false), (S <. AS, 0 WC: true, IT: false, 0 WC: true, IT: false), (R <. AR, 0 WC: true, IT: false, 0 WC: true, IT: false)]
isInherited = false
, [(AQ <. Y, 0 WC: true, IT: false, 0 WC: true, IT: false), (S <. AS, 0 WC: true, IT: false, 0 WC: true, IT: false), (U =. ? extends Iteration, 0 WC: true, IT: false), (R <. AR, 0 WC: true, IT: false, 0 WC: true, IT: false)]
isInherited = false
]
[[(T =. ? extends Pair<AUH,AUI>, 0 WC: true, IT: false), (AUI <. AC, 0 WC: true, IT: true, 0 WC: true, IT: false)]
isInherited = false
, [(AUI <. AC, 0 WC: true, IT: true, 0 WC: true, IT: false), (T =. Pair<AUH,AUI>, 0 WC: true, IT: false)]
isInherited = false
]
[[(N <. AI, 0 WC: true, IT: false, 0 WC: true, IT: false), (R <. O, 0 WC: true, IT: false, 0 WC: true, IT: false), (AF =. ? extends Iteration, 0 WC: true, IT: false)]
isInherited = false
, [(N <. AI, 0 WC: true, IT: false, 0 WC: true, IT: false), (AF =. Iteration, 0 WC: true, IT: false), (R <. O, 0 WC: true, IT: false, 0 WC: true, IT: false)]
isInherited = false
]
[[(AE <. AUJ, 0 WC: true, IT: false, 0 WC: true, IT: true), (AA <. AUK, 0 WC: true, IT: false, 0 WC: true, IT: true), (Pair<AUJ,AUK> <. Pair<AK,AL>, )]
isInherited = false
]
[[(Q <. AY, 0 WC: true, IT: false, 0 WC: true, IT: false), (AU =. Iteration, 0 WC: true, IT: false), (AS <. S, 0 WC: true, IT: false, 0 WC: true, IT: false), (AR <. R, 0 WC: true, IT: false, 0 WC: true, IT: false)]
isInherited = false
, [(Q <. AY, 0 WC: true, IT: false, 0 WC: true, IT: false), (AS <. S, 0 WC: true, IT: false, 0 WC: true, IT: false), (AU =. ? extends Iteration, 0 WC: true, IT: false), (AR <. R, 0 WC: true, IT: false, 0 WC: true, IT: false)]
isInherited = false
]
[[(AT =. ? extends Pair<BPT,BPU>, 0 WC: true, IT: false), (BPT <. BC, 0 WC: true, IT: true, 0 WC: true, IT: false)]
isInherited = false
, [(AT =. Pair<BPT,BPU>, 0 WC: true, IT: false), (BPT <. BC, 0 WC: true, IT: true, 0 WC: true, IT: false)]
isInherited = false
]
[[(N <. BI, 0 WC: true, IT: false, 0 WC: true, IT: false), (AS <. O, 0 WC: true, IT: false, 0 WC: true, IT: false), (BF =. ? extends Iteration, 0 WC: true, IT: false)]
isInherited = false
, [(BF =. Iteration, 0 WC: true, IT: false), (N <. BI, 0 WC: true, IT: false, 0 WC: true, IT: false), (AS <. O, 0 WC: true, IT: false, 0 WC: true, IT: false)]
isInherited = false
]
[[(Pair<BPV,BPW> <. Pair<BK,BL>, ), (BA <. BPV, 0 WC: true, IT: false, 0 WC: true, IT: true), (BE <. BPW, 0 WC: true, IT: false, 0 WC: true, IT: true)]
isInherited = false
]
class Iteration {

Iteration()({
super(());
})::TPH BV
TPH N id(TPH O x)({
return (x)::TPH O;
})::TPH P

TPH Q m1(TPH R x, TPH S y)({
TPH T help;
(help)::TPH T = ((this)::TPH U.m2 Signature: [TPH V, TPH W, TPH X]((x)::TPH R, (y)::TPH S))::TPH Y;
TPH AA y2;
(y2)::TPH AA = ((help)::TPH T.snd Signature: TPH AB)::TPH AC;
TPH AE x2;
(x2)::TPH AE = ((this)::TPH AF.id Signature: [TPH AG, TPH AH]((x)::TPH R))::TPH AI;
return new Pair((x2)::TPH AE, (y2)::TPH AA);
})::TPH AP

TPH AQ m2(TPH AR x, TPH AS y)({
TPH AT help;
(help)::TPH AT = ((this)::TPH AU.m1 Signature: [TPH AV, TPH AW, TPH AX]((x)::TPH AR, (y)::TPH AS))::TPH AY;
TPH BA x2;
(x2)::TPH BA = ((help)::TPH AT.fst Signature: TPH BB)::TPH BC;
TPH BE y2;
(y2)::TPH BE = ((this)::TPH BF.id Signature: [TPH BG, TPH BH]((y)::TPH AS))::TPH BI;
return new Pair((x2)::TPH BA, (y2)::TPH BE);
})::TPH BP

Iteration()({
super(());
})::TPH BS

}
Unify nach Oder-Constraints-Anpassung:
UND:[(Pair<BK,BL> <. AQ, , -1 WC: false, IT: false), (U =. Iteration, 0 WC: true, IT: false), (AU =. Iteration, 0 WC: true, IT: false), (Pair<AK,AL> <. Q, , -1 WC: false, IT: false), (O <. N, 1 WC: false, IT: false, -1 WC: false, IT: false), (AC <. AA, 0 WC: true, IT: true, 0 WC: true, IT: true), (BC <. BA, 0 WC: true, IT: true, 0 WC: true, IT: true), (BF =. Iteration, 0 WC: true, IT: false), (AY <. AT, 0 WC: true, IT: false, 0 WC: true, IT: false), (BI <. BE, 0 WC: true, IT: false, 0 WC: true, IT: true), (AF =. Iteration, 0 WC: true, IT: false), (AI <. AE, 0 WC: true, IT: false, 0 WC: true, IT: true), (Y <. T, 0 WC: true, IT: false, 0 WC: true, IT: false)]
isInherited = false

ODER:
[[(AQ <. Y, -1 WC: false, IT: false, 0 WC: true, IT: false), (U =. Iteration, 0 WC: true, IT: false), (S <. AS, 1 WC: false, IT: false, 1 WC: false, IT: false), (R <. AR, 1 WC: false, IT: false, 1 WC: false, IT: false)]
isInherited = false
, [(AQ <. Y, -1 WC: false, IT: false, 0 WC: true, IT: false), (S <. AS, 1 WC: false, IT: false, 1 WC: false, IT: false), (U =. ? extends Iteration, 0 WC: true, IT: false), (R <. AR, 1 WC: false, IT: false, 1 WC: false, IT: false)]
isInherited = false
]
[[(T =. ? extends Pair<AUH,AUI>, 0 WC: true, IT: false), (AUI <. AC, 0 WC: true, IT: true, 0 WC: true, IT: true)]
isInherited = false
, [(AUI <. AC, 0 WC: true, IT: true, 0 WC: true, IT: true), (T =. Pair<AUH,AUI>, 0 WC: true, IT: false)]
isInherited = false
]
[[(N <. AI, -1 WC: false, IT: false, 0 WC: true, IT: false), (R <. O, 1 WC: false, IT: false, 1 WC: false, IT: false), (AF =. ? extends Iteration, 0 WC: true, IT: false)]
isInherited = false
, [(N <. AI, -1 WC: false, IT: false, 0 WC: true, IT: false), (AF =. Iteration, 0 WC: true, IT: false), (R <. O, 1 WC: false, IT: false, 1 WC: false, IT: false)]
isInherited = false
]
[[(AE <. AUJ, 0 WC: true, IT: true, 0 WC: true, IT: true), (AA <. AUK, 0 WC: true, IT: true, 0 WC: true, IT: true), (Pair<AUJ,AUK> <. Pair<AK,AL>, )]
isInherited = false
]
[[(Q <. AY, -1 WC: false, IT: false, 0 WC: true, IT: false), (AU =. Iteration, 0 WC: true, IT: false), (AS <. S, 1 WC: false, IT: false, 1 WC: false, IT: false), (AR <. R, 1 WC: false, IT: false, 1 WC: false, IT: false)]
isInherited = false
, [(Q <. AY, -1 WC: false, IT: false, 0 WC: true, IT: false), (AS <. S, 1 WC: false, IT: false, 1 WC: false, IT: false), (AU =. ? extends Iteration, 0 WC: true, IT: false), (AR <. R, 1 WC: false, IT: false, 1 WC: false, IT: false)]
isInherited = false
]
[[(AT =. ? extends Pair<BPT,BPU>, 0 WC: true, IT: false), (BPT <. BC, 0 WC: true, IT: true, 0 WC: true, IT: true)]
isInherited = false
, [(AT =. Pair<BPT,BPU>, 0 WC: true, IT: false), (BPT <. BC, 0 WC: true, IT: true, 0 WC: true, IT: true)]
isInherited = false
]
[[(N <. BI, -1 WC: false, IT: false, 0 WC: true, IT: false), (AS <. O, 1 WC: false, IT: false, 1 WC: false, IT: false), (BF =. ? extends Iteration, 0 WC: true, IT: false)]
isInherited = false
, [(BF =. Iteration, 0 WC: true, IT: false), (N <. BI, -1 WC: false, IT: false, 0 WC: true, IT: false), (AS <. O, 1 WC: false, IT: false, 1 WC: false, IT: false)]
isInherited = false
]
[[(Pair<BPV,BPW> <. Pair<BK,BL>, ), (BA <. BPV, 0 WC: true, IT: true, 0 WC: true, IT: true), (BE <. BPW, 0 WC: true, IT: true, 0 WC: true, IT: true)]
isInherited = false
]

RESULT:
RESULT Final:
Constraints for Generated Generics: ???
TPH AS 1
TPH T = Pair<TPH FBP, TPH AUI>
TPH AR 1
TPH X = Pair<TPH FBP, TPH AUI>
TPH Q = Pair<TPH BPT, TPH FBR>
TPH AI -1
TPH BE -1
TPH R 1
TPH AC -1
TPH AT = Pair<TPH BPT, TPH FBR>
TPH BPT -1
TPH AS 1
TPH BC -1
TPH BA -1
TPH BI -1
TPH N -1
TPH U = Iteration
TPH O 1
TPH AUI -1
TPH N -1
TPH Y = Pair<TPH FBP, TPH AUI>
TPH AQ = Pair<TPH FBP, TPH AUI>
TPH AF = Iteration
TPH AX = Pair<TPH BPT, TPH FBR>
TPH R 1
TPH AA -1
TPH AE -1
TPH S 1
TPH AU = Iteration
TPH BF = Iteration
TPH AY = Pair<TPH BPT, TPH FBR>
TPH BB = GTV T
Simplified constraints: [(AR < R), (AS < S), (AE < BPT), (AC < AA), (BC < BA), (O < N), (R < AR), (S < AS), (AS < O), (AI < AE), (BPT < BC), (BI < BE), (R < O), (N < AI), (N < BI), (AA < FBR), (BA < FBP), (BE < AUI), (AUI < AC)]
TPH AS 1
TPH T = Pair<TPH FBP, TPH AUI>
TPH AR 1
TPH X = Pair<TPH FBP, TPH AUI>
TPH Q = Pair<TPH BPT, TPH FBR>
TPH AI -1
TPH BE -1
TPH R 1
TPH AC -1
TPH AT = Pair<TPH BPT, TPH FBR>
TPH BPT -1
TPH AS 1
TPH BC -1
TPH BA -1
TPH BI -1
TPH N -1
TPH U = Iteration
TPH O 1
TPH AUI -1
TPH N -1
TPH Y = Pair<TPH FBP, TPH AUI>
TPH AQ = Pair<TPH FBP, TPH AUI>
TPH AF = Iteration
TPH AX = Pair<TPH BPT, TPH FBR>
TPH R 1
TPH AA -1
TPH AE -1
TPH S 1
TPH AU = Iteration
TPH BF = Iteration
TPH AY = Pair<TPH BPT, TPH FBR>
TPH BB = GTV T
Simplified constraints: [(AR < R), (AS < S), (AE < BPT), (AC < AA), (BC < BA), (O < N), (R < AR), (S < AS), (AS < O), (AI < AE), (BPT < BC), (BI < BE), (R < O), (N < AI), (N < BI), (AA < FBR), (BA < FBP), (BE < AUI), (AUI < AC)]
T1s: [R, S] T2s: [FBP, AUI]
In: m1 Method: m2
T1s: [AR, AS] T2s: [BPT, FBR]
In: m2 Method: m1
T1s: [] T2s: [BC]
T1s: [AS] T2s: [BI]
In: m2 Method: id
New pair: (AS < BI)
T1s: [BE, BA] T2s: [BK, BL]
New pair: (S < AUI)
T1s: [] T2s: [AC]
T1s: [R] T2s: [AI]
In: m1 Method: id
New pair: (R < AI)
T1s: [AE, AA] T2s: [AK, AL]
T1s: [R, S] T2s: [FBP, AUI]
In: m1 Method: m2
T1s: [AR, AS] T2s: [BPT, FBR]
In: m2 Method: m1
New pair: (AR < BPT)
New pair: (AS < FBR)
T1s: [] T2s: [BC]
T1s: [AS] T2s: [BI]
In: m2 Method: id
New pair: (AS < BI)
T1s: [BE, BA] T2s: [BK, BL]
New pair: (R < FBP)
New pair: (S < AUI)
T1s: [] T2s: [AC]
T1s: [R] T2s: [AI]
In: m1 Method: id
New pair: (R < AI)
T1s: [AE, AA] T2s: [AK, AL]
T1s: [R, S] T2s: [FBP, AUI]
In: m1 Method: m2
T1s: [AR, AS] T2s: [BPT, FBR]
In: m2 Method: m1
New pair: (AR < BPT)
New pair: (AS < FBR)
T1s: [] T2s: [BC]
T1s: [AS] T2s: [BI]
In: m2 Method: id
New pair: (AS < BI)
T1s: [BE, BA] T2s: [BK, BL]
New pair: (R < FBP)
New pair: (S < AUI)
T1s: [] T2s: [AC]
T1s: [R] T2s: [AI]
In: m1 Method: id
New pair: (R < AI)
T1s: [AE, AA] T2s: [AK, AL]
[O, N] [1, -1]
ToAdd[left=TPH N, right=TPH O]
TPH N -> TPH O -1
JavaGenerics id: [(O = java.lang.Object)]
[(R < AI), (R < FBP)]
Find: R [AE, BPT, AI]
TPH R -> TPH AE 1
TPH AE -> TPH BPT -1
TPH BPT -> TPH AI -1
Find: AI [AI]
[(AI < AI), (AI < FBP)]
Find: AI [AI]
Find: AI [AI]
[(AI < AI), (AI < FBP)]
Find: AI [AI]
Find: AI [AI]
[(AI < AI), (AI < FBP)]
Find: AI [AI]
Find: AI [AI]
[(AI < AI), (AI < FBP)]
Find: AI [AI]
Find: AI [AI]
[(AI < AI), (AI < FBP)]
Find: AI [AI]
Find: AI [AI]
[S, AUI, AC, AA, FBR] [1, -1, -1, -1, -1]
[AI, FBP] [-1, -1]
ToAdd[left=TPH FBR, right=TPH S]
TPH FBR -> TPH S -1
JavaGenerics m1: [(S = java.lang.Object), (AI = java.lang.Object)]
[(AS < S), (AS < BI)]
Find: AS [BE, AUI, BI]
TPH AS -> TPH BE 1
TPH BE -> TPH AUI -1
TPH AUI -> TPH BI -1
Find: BI [BI]
[(BI < BI), (BI < S)]
Find: BI [BI]
Find: BI [BI]
[(BI < BI), (BI < S)]
Find: BI [BI]
Find: BI [BI]
[(BI < BI), (BI < S)]
Find: BI [BI]
Find: BI [BI]
[(BI < BI), (BI < S)]
Find: BI [BI]
Find: BI [BI]
[(BI < BI), (BI < S)]
Find: BI [BI]
Find: BI [BI]
[(BI < BI), (BI < S)]
Find: BI [BI]
Find: BI [BI]
[(BI < BI), (BI < S)]
Find: BI [BI]
Find: BI [BI]
[BI, S] [-1, 1]
[AR, AI, BC, BA, FBP] [1, -1, -1, -1, -1]
ToAdd[left=TPH FBP, right=TPH AR]
TPH FBP -> TPH AR -1
JavaGenerics m2: [(AR = java.lang.Object), (BI = java.lang.Object)]
JavaGenerics Iteration: []
JavaGenerics Class Iteration: []
T1s: [R, S] T2s: [FBP, AUI]
In: m1 Method: m2
T1s: [AR, AS] T2s: [BPT, FBR]
In: m2 Method: m1
T1s: [] T2s: [BC]
T1s: [AS] T2s: [BI]
In: m2 Method: id
New pair: (AS < BI)
T1s: [BE, BA] T2s: [BK, BL]
New pair: (S < AUI)
T1s: [] T2s: [AC]
T1s: [R] T2s: [AI]
In: m1 Method: id
New pair: (R < AI)
T1s: [AE, AA] T2s: [AK, AL]
T1s: [R, S] T2s: [FBP, AUI]
In: m1 Method: m2
T1s: [AR, AS] T2s: [BPT, FBR]
In: m2 Method: m1
New pair: (AR < BPT)
New pair: (AS < FBR)
T1s: [] T2s: [BC]
T1s: [AS] T2s: [BI]
In: m2 Method: id
New pair: (AS < BI)
T1s: [BE, BA] T2s: [BK, BL]
New pair: (R < FBP)
New pair: (S < AUI)
T1s: [] T2s: [AC]
T1s: [R] T2s: [AI]
In: m1 Method: id
New pair: (R < AI)
T1s: [AE, AA] T2s: [AK, AL]
T1s: [R, S] T2s: [FBP, AUI]
In: m1 Method: m2
T1s: [AR, AS] T2s: [BPT, FBR]
In: m2 Method: m1
New pair: (AR < BPT)
New pair: (AS < FBR)
T1s: [] T2s: [BC]
T1s: [AS] T2s: [BI]
In: m2 Method: id
New pair: (AS < BI)
T1s: [BE, BA] T2s: [BK, BL]
New pair: (R < FBP)
New pair: (S < AUI)
T1s: [] T2s: [AC]
T1s: [R] T2s: [AI]
In: m1 Method: id
New pair: (R < AI)
T1s: [AE, AA] T2s: [AK, AL]
TxGenerics id: [(O < N), (N = java.lang.Object)]
[(R < AI), (R < FBP)] [-1, -1]
Infima new TPH TPH FCM variance -1
TPH AI -> TPH FCM -1
TPH FBP -> TPH FCM -1
TxGenerics m1: [(R < FCM), (FCM < BPT), (FBR = java.lang.Object), (S < FBR), (BPT = java.lang.Object)]
[(AS < BI), (AS < FBR)] [-1, -1]
Infima new TPH TPH FCN variance -1
TPH BI -> TPH FCN -1
TPH FBR -> TPH FCN -1
TxGenerics m2: [(FCM = java.lang.Object), (AR < FCM), (AS < FCN), (FCN < AUI), (AUI = java.lang.Object)]
TxGenerics Iteration: []
TxGenerics Class Iteration: []
Cached Iteration: []
Cached Iteration: []
Cached id: [(O = java.lang.Object)]
Cached id: [(O < N), (N = java.lang.Object)]
Cached m1: [(S = java.lang.Object), (AI = java.lang.Object)]
Cached m1: [(R < FCM), (FCM < BPT), (FCN = java.lang.Object), (S < FCN), (BPT = java.lang.Object)]
Cached m2: [(AR = java.lang.Object), (BI = java.lang.Object)]
Cached m2: [(FCM = java.lang.Object), (AR < FCM), (AS < FCN), (FCN < AUI), (AUI = java.lang.Object)]
generating Iteration.class file ...
Iteration.class file generated
Disconnected from the target VM, address: '127.0.0.1:41229', transport: 'socket'

Process finished with exit code 0

Konnte den Fehler leider nicht nachstellen. Meine Herangehensweise 1. Parser generieren mit antlr: $ mvn antlr4:antlr4 2. Die Pair.java Datei mit javac (version 19.0.2) kompilieren 3. test() in AllgemeinTest ausführen. Läuft ohne Fehler durch. Output: /usr/lib/jvm/jdk-20/bin/java -agentlib:jdwp=transport=dt_socket,address=127.0.0.1:41229,suspend=y,server=n -ea --enable-preview -Didea.test.cyclic.buffer.size=1048576 -javaagent:/home/andreas/bin/idea-IU-223.8617.56/plugins/java/lib/rt/debugger-agent.jar -Dfile.encoding=UTF-8 -Dsun.stdout.encoding=UTF-8 -Dsun.stderr.encoding=UTF-8 -classpath /home/andreas/bin/idea-IU-223.8617.56/lib/idea_rt.jar:/home/andreas/bin/idea-IU-223.8617.56/plugins/junit/lib/junit5-rt.jar:/home/andreas/bin/idea-IU-223.8617.56/plugins/junit/lib/junit-rt.jar:/home/andreas/Development/JavaCompilerCore/target/test-classes:/home/andreas/Development/JavaCompilerCore/target/classes:/home/andreas/.m2/repository/junit/junit/4.11/junit-4.11.jar:/home/andreas/.m2/repository/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar:/home/andreas/.m2/repository/org/antlr/antlr4/4.11.1/antlr4-4.11.1.jar:/home/andreas/.m2/repository/org/antlr/antlr4-runtime/4.11.1/antlr4-runtime-4.11.1.jar:/home/andreas/.m2/repository/org/antlr/antlr-runtime/3.5.3/antlr-runtime-3.5.3.jar:/home/andreas/.m2/repository/org/antlr/ST4/4.3.4/ST4-4.3.4.jar:/home/andreas/.m2/repository/org/abego/treelayout/org.abego.treelayout.core/1.0.3/org.abego.treelayout.core-1.0.3.jar:/home/andreas/.m2/repository/org/glassfish/javax.json/1.1.4/javax.json-1.1.4.jar:/home/andreas/.m2/repository/com/ibm/icu/icu4j/71.1/icu4j-71.1.jar:/home/andreas/.m2/repository/commons-io/commons-io/2.6/commons-io-2.6.jar:/home/andreas/.m2/repository/com/google/guava/guava/22.0/guava-22.0.jar:/home/andreas/.m2/repository/com/google/code/findbugs/jsr305/1.3.9/jsr305-1.3.9.jar:/home/andreas/.m2/repository/com/google/errorprone/error_prone_annotations/2.0.18/error_prone_annotations-2.0.18.jar:/home/andreas/.m2/repository/com/google/j2objc/j2objc-annotations/1.1/j2objc-annotations-1.1.jar:/home/andreas/.m2/repository/org/codehaus/mojo/animal-sniffer-annotations/1.14/animal-sniffer-annotations-1.14.jar:/home/andreas/.m2/repository/org/reflections/reflections/0.9.11/reflections-0.9.11.jar:/home/andreas/.m2/repository/org/javassist/javassist/3.21.0-GA/javassist-3.21.0-GA.jar:/home/andreas/.m2/repository/org/ow2/asm/asm/9.5/asm-9.5.jar com.intellij.rt.junit.JUnitStarter -ideVersion5 -junit4 AllgemeinTest,test Connected to the target VM, address: '127.0.0.1:41229', transport: 'socket' m2 methodSignatureConstraint; [ (TPH V =. TPH AR), (TPH X =. TPH AQ), (TPH W =. TPH AS)] snd methodSignatureConstraint; [ (TPH AB =. GTV U)] id methodSignatureConstraint; [ (TPH AH =. TPH N), (TPH AG =. TPH O)] m1 methodSignatureConstraint; [ (TPH AV =. TPH R), (TPH AX =. TPH Q), (TPH AW =. TPH S)] fst methodSignatureConstraint; [ (TPH BB =. GTV T)] id methodSignatureConstraint; [ (TPH BG =. TPH O), (TPH BH =. TPH N)] {java.lang.Object=Elem: Node(java.lang.Object) Prec: [java.lang.Object] Desc: [java.lang.Object, Pair<EZD,EZE>, Iteration] , Pair<EZD,EZE>=Elem: Node(Pair<EZD,EZE>) Prec: [java.lang.Object] Desc: [] , Iteration=Elem: Node(Iteration) Prec: [java.lang.Object] Desc: [] } xxx1 Unify: UND:[(Pair<BK,BL> <. AQ, , 0 WC: true, IT: false), (U =. Iteration, 0 WC: true, IT: false), (AU =. Iteration, 0 WC: true, IT: false), (Pair<AK,AL> <. Q, , 0 WC: true, IT: false), (O <. N, 0 WC: true, IT: false, 0 WC: true, IT: false), (AC <. AA, 0 WC: true, IT: false, 0 WC: true, IT: false), (BC <. BA, 0 WC: true, IT: false, 0 WC: true, IT: false), (BF =. Iteration, 0 WC: true, IT: false), (AY <. AT, 0 WC: true, IT: false, 0 WC: true, IT: false), (BI <. BE, 0 WC: true, IT: false, 0 WC: true, IT: false), (AF =. Iteration, 0 WC: true, IT: false), (AI <. AE, 0 WC: true, IT: false, 0 WC: true, IT: false), (Y <. T, 0 WC: true, IT: false, 0 WC: true, IT: false)] isInherited = false ODER: [[(AQ <. Y, 0 WC: true, IT: false, 0 WC: true, IT: false), (U =. Iteration, 0 WC: true, IT: false), (S <. AS, 0 WC: true, IT: false, 0 WC: true, IT: false), (R <. AR, 0 WC: true, IT: false, 0 WC: true, IT: false)] isInherited = false , [(AQ <. Y, 0 WC: true, IT: false, 0 WC: true, IT: false), (S <. AS, 0 WC: true, IT: false, 0 WC: true, IT: false), (U =. ? extends Iteration, 0 WC: true, IT: false), (R <. AR, 0 WC: true, IT: false, 0 WC: true, IT: false)] isInherited = false ] [[(T =. ? extends Pair<AUH,AUI>, 0 WC: true, IT: false), (AUI <. AC, 0 WC: true, IT: true, 0 WC: true, IT: false)] isInherited = false , [(AUI <. AC, 0 WC: true, IT: true, 0 WC: true, IT: false), (T =. Pair<AUH,AUI>, 0 WC: true, IT: false)] isInherited = false ] [[(N <. AI, 0 WC: true, IT: false, 0 WC: true, IT: false), (R <. O, 0 WC: true, IT: false, 0 WC: true, IT: false), (AF =. ? extends Iteration, 0 WC: true, IT: false)] isInherited = false , [(N <. AI, 0 WC: true, IT: false, 0 WC: true, IT: false), (AF =. Iteration, 0 WC: true, IT: false), (R <. O, 0 WC: true, IT: false, 0 WC: true, IT: false)] isInherited = false ] [[(AE <. AUJ, 0 WC: true, IT: false, 0 WC: true, IT: true), (AA <. AUK, 0 WC: true, IT: false, 0 WC: true, IT: true), (Pair<AUJ,AUK> <. Pair<AK,AL>, )] isInherited = false ] [[(Q <. AY, 0 WC: true, IT: false, 0 WC: true, IT: false), (AU =. Iteration, 0 WC: true, IT: false), (AS <. S, 0 WC: true, IT: false, 0 WC: true, IT: false), (AR <. R, 0 WC: true, IT: false, 0 WC: true, IT: false)] isInherited = false , [(Q <. AY, 0 WC: true, IT: false, 0 WC: true, IT: false), (AS <. S, 0 WC: true, IT: false, 0 WC: true, IT: false), (AU =. ? extends Iteration, 0 WC: true, IT: false), (AR <. R, 0 WC: true, IT: false, 0 WC: true, IT: false)] isInherited = false ] [[(AT =. ? extends Pair<BPT,BPU>, 0 WC: true, IT: false), (BPT <. BC, 0 WC: true, IT: true, 0 WC: true, IT: false)] isInherited = false , [(AT =. Pair<BPT,BPU>, 0 WC: true, IT: false), (BPT <. BC, 0 WC: true, IT: true, 0 WC: true, IT: false)] isInherited = false ] [[(N <. BI, 0 WC: true, IT: false, 0 WC: true, IT: false), (AS <. O, 0 WC: true, IT: false, 0 WC: true, IT: false), (BF =. ? extends Iteration, 0 WC: true, IT: false)] isInherited = false , [(BF =. Iteration, 0 WC: true, IT: false), (N <. BI, 0 WC: true, IT: false, 0 WC: true, IT: false), (AS <. O, 0 WC: true, IT: false, 0 WC: true, IT: false)] isInherited = false ] [[(Pair<BPV,BPW> <. Pair<BK,BL>, ), (BA <. BPV, 0 WC: true, IT: false, 0 WC: true, IT: true), (BE <. BPW, 0 WC: true, IT: false, 0 WC: true, IT: true)] isInherited = false ] class Iteration { Iteration()({ super(()); })::TPH BV TPH N id(TPH O x)({ return (x)::TPH O; })::TPH P TPH Q m1(TPH R x, TPH S y)({ TPH T help; (help)::TPH T = ((this)::TPH U.m2 Signature: [TPH V, TPH W, TPH X]((x)::TPH R, (y)::TPH S))::TPH Y; TPH AA y2; (y2)::TPH AA = ((help)::TPH T.snd Signature: [TPH AB]())::TPH AC; TPH AE x2; (x2)::TPH AE = ((this)::TPH AF.id Signature: [TPH AG, TPH AH]((x)::TPH R))::TPH AI; return new Pair((x2)::TPH AE, (y2)::TPH AA); })::TPH AP TPH AQ m2(TPH AR x, TPH AS y)({ TPH AT help; (help)::TPH AT = ((this)::TPH AU.m1 Signature: [TPH AV, TPH AW, TPH AX]((x)::TPH AR, (y)::TPH AS))::TPH AY; TPH BA x2; (x2)::TPH BA = ((help)::TPH AT.fst Signature: [TPH BB]())::TPH BC; TPH BE y2; (y2)::TPH BE = ((this)::TPH BF.id Signature: [TPH BG, TPH BH]((y)::TPH AS))::TPH BI; return new Pair((x2)::TPH BA, (y2)::TPH BE); })::TPH BP Iteration()({ super(()); })::TPH BS } Unify nach Oder-Constraints-Anpassung: UND:[(Pair<BK,BL> <. AQ, , -1 WC: false, IT: false), (U =. Iteration, 0 WC: true, IT: false), (AU =. Iteration, 0 WC: true, IT: false), (Pair<AK,AL> <. Q, , -1 WC: false, IT: false), (O <. N, 1 WC: false, IT: false, -1 WC: false, IT: false), (AC <. AA, 0 WC: true, IT: true, 0 WC: true, IT: true), (BC <. BA, 0 WC: true, IT: true, 0 WC: true, IT: true), (BF =. Iteration, 0 WC: true, IT: false), (AY <. AT, 0 WC: true, IT: false, 0 WC: true, IT: false), (BI <. BE, 0 WC: true, IT: false, 0 WC: true, IT: true), (AF =. Iteration, 0 WC: true, IT: false), (AI <. AE, 0 WC: true, IT: false, 0 WC: true, IT: true), (Y <. T, 0 WC: true, IT: false, 0 WC: true, IT: false)] isInherited = false ODER: [[(AQ <. Y, -1 WC: false, IT: false, 0 WC: true, IT: false), (U =. Iteration, 0 WC: true, IT: false), (S <. AS, 1 WC: false, IT: false, 1 WC: false, IT: false), (R <. AR, 1 WC: false, IT: false, 1 WC: false, IT: false)] isInherited = false , [(AQ <. Y, -1 WC: false, IT: false, 0 WC: true, IT: false), (S <. AS, 1 WC: false, IT: false, 1 WC: false, IT: false), (U =. ? extends Iteration, 0 WC: true, IT: false), (R <. AR, 1 WC: false, IT: false, 1 WC: false, IT: false)] isInherited = false ] [[(T =. ? extends Pair<AUH,AUI>, 0 WC: true, IT: false), (AUI <. AC, 0 WC: true, IT: true, 0 WC: true, IT: true)] isInherited = false , [(AUI <. AC, 0 WC: true, IT: true, 0 WC: true, IT: true), (T =. Pair<AUH,AUI>, 0 WC: true, IT: false)] isInherited = false ] [[(N <. AI, -1 WC: false, IT: false, 0 WC: true, IT: false), (R <. O, 1 WC: false, IT: false, 1 WC: false, IT: false), (AF =. ? extends Iteration, 0 WC: true, IT: false)] isInherited = false , [(N <. AI, -1 WC: false, IT: false, 0 WC: true, IT: false), (AF =. Iteration, 0 WC: true, IT: false), (R <. O, 1 WC: false, IT: false, 1 WC: false, IT: false)] isInherited = false ] [[(AE <. AUJ, 0 WC: true, IT: true, 0 WC: true, IT: true), (AA <. AUK, 0 WC: true, IT: true, 0 WC: true, IT: true), (Pair<AUJ,AUK> <. Pair<AK,AL>, )] isInherited = false ] [[(Q <. AY, -1 WC: false, IT: false, 0 WC: true, IT: false), (AU =. Iteration, 0 WC: true, IT: false), (AS <. S, 1 WC: false, IT: false, 1 WC: false, IT: false), (AR <. R, 1 WC: false, IT: false, 1 WC: false, IT: false)] isInherited = false , [(Q <. AY, -1 WC: false, IT: false, 0 WC: true, IT: false), (AS <. S, 1 WC: false, IT: false, 1 WC: false, IT: false), (AU =. ? extends Iteration, 0 WC: true, IT: false), (AR <. R, 1 WC: false, IT: false, 1 WC: false, IT: false)] isInherited = false ] [[(AT =. ? extends Pair<BPT,BPU>, 0 WC: true, IT: false), (BPT <. BC, 0 WC: true, IT: true, 0 WC: true, IT: true)] isInherited = false , [(AT =. Pair<BPT,BPU>, 0 WC: true, IT: false), (BPT <. BC, 0 WC: true, IT: true, 0 WC: true, IT: true)] isInherited = false ] [[(N <. BI, -1 WC: false, IT: false, 0 WC: true, IT: false), (AS <. O, 1 WC: false, IT: false, 1 WC: false, IT: false), (BF =. ? extends Iteration, 0 WC: true, IT: false)] isInherited = false , [(BF =. Iteration, 0 WC: true, IT: false), (N <. BI, -1 WC: false, IT: false, 0 WC: true, IT: false), (AS <. O, 1 WC: false, IT: false, 1 WC: false, IT: false)] isInherited = false ] [[(Pair<BPV,BPW> <. Pair<BK,BL>, ), (BA <. BPV, 0 WC: true, IT: true, 0 WC: true, IT: true), (BE <. BPW, 0 WC: true, IT: true, 0 WC: true, IT: true)] isInherited = false ] RESULT: [[(AU =. Iteration, 0 WC: true, IT: false), (U =. Iteration, 0 WC: true, IT: false), (W =. AS, 0 WC: true, IT: false, 1 WC: false, IT: false), (AW =. S, 0 WC: true, IT: false, 1 WC: false, IT: false), (AK =. gen_hj, -1 WC: false, IT: true, -1 WC: false, IT: false), (BPW =. BL, -1 WC: false, IT: true, -1 WC: false, IT: true), (AS <. O, 1 WC: false, IT: false, 1 WC: false, IT: false), (BI <. BE, -1 WC: false, IT: false, -1 WC: false, IT: true), (BA <. BPV, -1 WC: false, IT: true, -1 WC: false, IT: true), (BPT <. BC, -1 WC: false, IT: true, -1 WC: false, IT: true), (AX =. Pair<gen_hj,gen_k>, 0 WC: true, IT: false), (AI <. AE, -1 WC: false, IT: false, -1 WC: false, IT: true), (gen_k =. BPU, -1 WC: false, IT: false, -1 WC: false, IT: true), (AA <. AUK, -1 WC: false, IT: true, -1 WC: false, IT: true), (AUI <. AC, -1 WC: false, IT: true, -1 WC: false, IT: true), (N <. AI, -1 WC: false, IT: false, -1 WC: false, IT: false), (AH =. N, 0 WC: true, IT: false, -1 WC: false, IT: false), (AG =. O, 0 WC: true, IT: false, 1 WC: false, IT: false), (gen_r =. AUH, -1 WC: true, IT: false, -1 WC: true, IT: true), (BF =. Iteration, 0 WC: true, IT: false), (gen_hr =. AUI, -1 WC: false, IT: false, -1 WC: false, IT: true), (AUK =. AL, -1 WC: false, IT: true, -1 WC: false, IT: true), (gen_hj =. BPT, -1 WC: false, IT: false, -1 WC: false, IT: true), (Q =. Pair<gen_hj,gen_k>, -1 WC: false, IT: false), (V =. AR, 0 WC: true, IT: false, 1 WC: false, IT: false), (AV =. R, 0 WC: true, IT: false, 1 WC: false, IT: false), (AE <. AUJ, -1 WC: false, IT: true, -1 WC: false, IT: true), (AL =. gen_k, -1 WC: false, IT: true, -1 WC: false, IT: false), (BK =. gen_r, -1 WC: true, IT: true, -1 WC: true, IT: false), (BPV =. BK, -1 WC: false, IT: true, -1 WC: true, IT: true), (AR <. R, 1 WC: false, IT: false, 1 WC: false, IT: false), (R <. AR, 1 WC: false, IT: false, 1 WC: false, IT: false), (Y =. Pair<gen_r,gen_hr>, -1 WC: false, IT: false), (AQ =. Pair<gen_r,gen_hr>, -1 WC: false, IT: false), (BB =. T, 0 WC: true, IT: false), (N <. BI, -1 WC: false, IT: false, -1 WC: false, IT: false), (R <. O, 1 WC: false, IT: false, 1 WC: false, IT: false), (T =. Pair<AUH,AUI>, -1 WC: false, IT: false), (O <. N, 1 WC: false, IT: false, -1 WC: false, IT: false), (AC <. AA, -1 WC: false, IT: true, -1 WC: false, IT: true), (BL =. gen_hr, -1 WC: false, IT: true, -1 WC: false, IT: false), (BC <. BA, -1 WC: false, IT: true, -1 WC: false, IT: true), (BG =. O, 0 WC: true, IT: false, 1 WC: false, IT: false), (BH =. N, 0 WC: true, IT: false, -1 WC: false, IT: false), (X =. Pair<gen_r,gen_hr>, 0 WC: true, IT: false), (AS <. S, 1 WC: false, IT: false, 1 WC: false, IT: false), (S <. AS, 1 WC: false, IT: false, 1 WC: false, IT: false), (AT =. Pair<BPT,BPU>, -1 WC: true, IT: false), (AY =. Pair<gen_hj,gen_k>, -1 WC: false, IT: false), (AF =. Iteration, 0 WC: true, IT: false), (AUJ =. AK, -1 WC: false, IT: true, -1 WC: false, IT: true), (BE <. BPW, -1 WC: false, IT: true, -1 WC: false, IT: true)]] RESULT Final: [[(Y =. Pair<AUH,AUI>, -1 WC: false, IT: false), (AU =. Iteration, 0 WC: true, IT: false), (U =. Iteration, 0 WC: true, IT: false), (W =. AS, 0 WC: true, IT: false, 1 WC: false, IT: false), (AW =. S, 0 WC: true, IT: false, 1 WC: false, IT: false), (AS <. O, 1 WC: false, IT: false, 1 WC: false, IT: false), (BK =. AUH, -1 WC: true, IT: true, -1 WC: true, IT: true), (BPW =. AUI, -1 WC: false, IT: true, -1 WC: false, IT: true), (AUK =. BPU, -1 WC: false, IT: true, -1 WC: false, IT: true), (AY =. Pair<BPT,BPU>, -1 WC: false, IT: false), (AE <. BPT, -1 WC: false, IT: true, -1 WC: false, IT: true), (BI <. BE, -1 WC: false, IT: false, -1 WC: false, IT: true), (AQ =. Pair<AUH,AUI>, -1 WC: false, IT: false), (BPT <. BC, -1 WC: false, IT: true, -1 WC: false, IT: true), (Q =. Pair<BPT,BPU>, -1 WC: false, IT: false), (AI <. AE, -1 WC: false, IT: false, -1 WC: false, IT: true), (BE <. AUI, -1 WC: false, IT: true, -1 WC: false, IT: true), (AUI <. AC, -1 WC: false, IT: true, -1 WC: false, IT: true), (N <. AI, -1 WC: false, IT: false, -1 WC: false, IT: false), (gen_hr =. AUI, -1 WC: false, IT: false, -1 WC: false, IT: true), (gen_hj =. BPT, -1 WC: false, IT: false, -1 WC: false, IT: true), (AH =. N, 0 WC: true, IT: false, -1 WC: false, IT: false), (AG =. O, 0 WC: true, IT: false, 1 WC: false, IT: false), (BF =. Iteration, 0 WC: true, IT: false), (AK =. BPT, -1 WC: false, IT: true, -1 WC: false, IT: true), (gen_r =. AUH, -1 WC: true, IT: false, -1 WC: true, IT: true), (V =. AR, 0 WC: true, IT: false, 1 WC: false, IT: false), (AV =. R, 0 WC: true, IT: false, 1 WC: false, IT: false), (BL =. AUI, -1 WC: false, IT: true, -1 WC: false, IT: true), (AR <. R, 1 WC: false, IT: false, 1 WC: false, IT: false), (R <. AR, 1 WC: false, IT: false, 1 WC: false, IT: false), (BPV =. AUH, -1 WC: false, IT: true, -1 WC: true, IT: true), (AUJ =. BPT, -1 WC: false, IT: true, -1 WC: false, IT: true), (BA <. AUH, -1 WC: false, IT: true, -1 WC: true, IT: true), (BB =. T, 0 WC: true, IT: false), (gen_k =. BPU, -1 WC: false, IT: false, -1 WC: false, IT: true), (N <. BI, -1 WC: false, IT: false, -1 WC: false, IT: false), (R <. O, 1 WC: false, IT: false, 1 WC: false, IT: false), (T =. Pair<AUH,AUI>, -1 WC: false, IT: false), (O <. N, 1 WC: false, IT: false, -1 WC: false, IT: false), (AC <. AA, -1 WC: false, IT: true, -1 WC: false, IT: true), (X =. Pair<AUH,AUI>, 0 WC: true, IT: false), (BC <. BA, -1 WC: false, IT: true, -1 WC: false, IT: true), (AX =. Pair<BPT,BPU>, 0 WC: true, IT: false), (BG =. O, 0 WC: true, IT: false, 1 WC: false, IT: false), (BH =. N, 0 WC: true, IT: false, -1 WC: false, IT: false), (AS <. S, 1 WC: false, IT: false, 1 WC: false, IT: false), (S <. AS, 1 WC: false, IT: false, 1 WC: false, IT: false), (AT =. Pair<BPT,BPU>, -1 WC: true, IT: false), (AA <. BPU, -1 WC: false, IT: true, -1 WC: false, IT: true), (AF =. Iteration, 0 WC: true, IT: false), (AL =. BPU, -1 WC: false, IT: true, -1 WC: false, IT: true)]] Constraints for Generated Generics: ??? TPH AS 1 TPH T = Pair<TPH FBP, TPH AUI> TPH AR 1 TPH X = Pair<TPH FBP, TPH AUI> TPH Q = Pair<TPH BPT, TPH FBR> TPH AI -1 TPH BE -1 TPH R 1 TPH AC -1 TPH AT = Pair<TPH BPT, TPH FBR> TPH BPT -1 TPH AS 1 TPH BC -1 TPH BA -1 TPH BI -1 TPH N -1 TPH U = Iteration TPH O 1 TPH AUI -1 TPH N -1 TPH Y = Pair<TPH FBP, TPH AUI> TPH AQ = Pair<TPH FBP, TPH AUI> TPH AF = Iteration TPH AX = Pair<TPH BPT, TPH FBR> TPH R 1 TPH AA -1 TPH AE -1 TPH S 1 TPH AU = Iteration TPH BF = Iteration TPH AY = Pair<TPH BPT, TPH FBR> TPH BB = GTV T Simplified constraints: [(AR < R), (AS < S), (AE < BPT), (AC < AA), (BC < BA), (O < N), (R < AR), (S < AS), (AS < O), (AI < AE), (BPT < BC), (BI < BE), (R < O), (N < AI), (N < BI), (AA < FBR), (BA < FBP), (BE < AUI), (AUI < AC)] TPH AS 1 TPH T = Pair<TPH FBP, TPH AUI> TPH AR 1 TPH X = Pair<TPH FBP, TPH AUI> TPH Q = Pair<TPH BPT, TPH FBR> TPH AI -1 TPH BE -1 TPH R 1 TPH AC -1 TPH AT = Pair<TPH BPT, TPH FBR> TPH BPT -1 TPH AS 1 TPH BC -1 TPH BA -1 TPH BI -1 TPH N -1 TPH U = Iteration TPH O 1 TPH AUI -1 TPH N -1 TPH Y = Pair<TPH FBP, TPH AUI> TPH AQ = Pair<TPH FBP, TPH AUI> TPH AF = Iteration TPH AX = Pair<TPH BPT, TPH FBR> TPH R 1 TPH AA -1 TPH AE -1 TPH S 1 TPH AU = Iteration TPH BF = Iteration TPH AY = Pair<TPH BPT, TPH FBR> TPH BB = GTV T Simplified constraints: [(AR < R), (AS < S), (AE < BPT), (AC < AA), (BC < BA), (O < N), (R < AR), (S < AS), (AS < O), (AI < AE), (BPT < BC), (BI < BE), (R < O), (N < AI), (N < BI), (AA < FBR), (BA < FBP), (BE < AUI), (AUI < AC)] T1s: [R, S] T2s: [FBP, AUI] In: m1 Method: m2 T1s: [AR, AS] T2s: [BPT, FBR] In: m2 Method: m1 T1s: [] T2s: [BC] T1s: [AS] T2s: [BI] In: m2 Method: id New pair: (AS < BI) T1s: [BE, BA] T2s: [BK, BL] New pair: (S < AUI) T1s: [] T2s: [AC] T1s: [R] T2s: [AI] In: m1 Method: id New pair: (R < AI) T1s: [AE, AA] T2s: [AK, AL] T1s: [R, S] T2s: [FBP, AUI] In: m1 Method: m2 T1s: [AR, AS] T2s: [BPT, FBR] In: m2 Method: m1 New pair: (AR < BPT) New pair: (AS < FBR) T1s: [] T2s: [BC] T1s: [AS] T2s: [BI] In: m2 Method: id New pair: (AS < BI) T1s: [BE, BA] T2s: [BK, BL] New pair: (R < FBP) New pair: (S < AUI) T1s: [] T2s: [AC] T1s: [R] T2s: [AI] In: m1 Method: id New pair: (R < AI) T1s: [AE, AA] T2s: [AK, AL] T1s: [R, S] T2s: [FBP, AUI] In: m1 Method: m2 T1s: [AR, AS] T2s: [BPT, FBR] In: m2 Method: m1 New pair: (AR < BPT) New pair: (AS < FBR) T1s: [] T2s: [BC] T1s: [AS] T2s: [BI] In: m2 Method: id New pair: (AS < BI) T1s: [BE, BA] T2s: [BK, BL] New pair: (R < FBP) New pair: (S < AUI) T1s: [] T2s: [AC] T1s: [R] T2s: [AI] In: m1 Method: id New pair: (R < AI) T1s: [AE, AA] T2s: [AK, AL] [O, N] [1, -1] ToAdd[left=TPH N, right=TPH O] TPH N -> TPH O -1 JavaGenerics id: [(O = java.lang.Object)] [(R < AI), (R < FBP)] Find: R [AE, BPT, AI] TPH R -> TPH AE 1 TPH AE -> TPH BPT -1 TPH BPT -> TPH AI -1 Find: AI [AI] [(AI < AI), (AI < FBP)] Find: AI [AI] Find: AI [AI] [(AI < AI), (AI < FBP)] Find: AI [AI] Find: AI [AI] [(AI < AI), (AI < FBP)] Find: AI [AI] Find: AI [AI] [(AI < AI), (AI < FBP)] Find: AI [AI] Find: AI [AI] [(AI < AI), (AI < FBP)] Find: AI [AI] Find: AI [AI] [S, AUI, AC, AA, FBR] [1, -1, -1, -1, -1] [AI, FBP] [-1, -1] ToAdd[left=TPH FBR, right=TPH S] TPH FBR -> TPH S -1 JavaGenerics m1: [(S = java.lang.Object), (AI = java.lang.Object)] [(AS < S), (AS < BI)] Find: AS [BE, AUI, BI] TPH AS -> TPH BE 1 TPH BE -> TPH AUI -1 TPH AUI -> TPH BI -1 Find: BI [BI] [(BI < BI), (BI < S)] Find: BI [BI] Find: BI [BI] [(BI < BI), (BI < S)] Find: BI [BI] Find: BI [BI] [(BI < BI), (BI < S)] Find: BI [BI] Find: BI [BI] [(BI < BI), (BI < S)] Find: BI [BI] Find: BI [BI] [(BI < BI), (BI < S)] Find: BI [BI] Find: BI [BI] [(BI < BI), (BI < S)] Find: BI [BI] Find: BI [BI] [(BI < BI), (BI < S)] Find: BI [BI] Find: BI [BI] [BI, S] [-1, 1] [AR, AI, BC, BA, FBP] [1, -1, -1, -1, -1] ToAdd[left=TPH FBP, right=TPH AR] TPH FBP -> TPH AR -1 JavaGenerics m2: [(AR = java.lang.Object), (BI = java.lang.Object)] JavaGenerics Iteration: [] JavaGenerics Class Iteration: [] T1s: [R, S] T2s: [FBP, AUI] In: m1 Method: m2 T1s: [AR, AS] T2s: [BPT, FBR] In: m2 Method: m1 T1s: [] T2s: [BC] T1s: [AS] T2s: [BI] In: m2 Method: id New pair: (AS < BI) T1s: [BE, BA] T2s: [BK, BL] New pair: (S < AUI) T1s: [] T2s: [AC] T1s: [R] T2s: [AI] In: m1 Method: id New pair: (R < AI) T1s: [AE, AA] T2s: [AK, AL] T1s: [R, S] T2s: [FBP, AUI] In: m1 Method: m2 T1s: [AR, AS] T2s: [BPT, FBR] In: m2 Method: m1 New pair: (AR < BPT) New pair: (AS < FBR) T1s: [] T2s: [BC] T1s: [AS] T2s: [BI] In: m2 Method: id New pair: (AS < BI) T1s: [BE, BA] T2s: [BK, BL] New pair: (R < FBP) New pair: (S < AUI) T1s: [] T2s: [AC] T1s: [R] T2s: [AI] In: m1 Method: id New pair: (R < AI) T1s: [AE, AA] T2s: [AK, AL] T1s: [R, S] T2s: [FBP, AUI] In: m1 Method: m2 T1s: [AR, AS] T2s: [BPT, FBR] In: m2 Method: m1 New pair: (AR < BPT) New pair: (AS < FBR) T1s: [] T2s: [BC] T1s: [AS] T2s: [BI] In: m2 Method: id New pair: (AS < BI) T1s: [BE, BA] T2s: [BK, BL] New pair: (R < FBP) New pair: (S < AUI) T1s: [] T2s: [AC] T1s: [R] T2s: [AI] In: m1 Method: id New pair: (R < AI) T1s: [AE, AA] T2s: [AK, AL] TxGenerics id: [(O < N), (N = java.lang.Object)] [(R < AI), (R < FBP)] [-1, -1] Infima new TPH TPH FCM variance -1 TPH AI -> TPH FCM -1 TPH FBP -> TPH FCM -1 TxGenerics m1: [(R < FCM), (FCM < BPT), (FBR = java.lang.Object), (S < FBR), (BPT = java.lang.Object)] [(AS < BI), (AS < FBR)] [-1, -1] Infima new TPH TPH FCN variance -1 TPH BI -> TPH FCN -1 TPH FBR -> TPH FCN -1 TxGenerics m2: [(FCM = java.lang.Object), (AR < FCM), (AS < FCN), (FCN < AUI), (AUI = java.lang.Object)] TxGenerics Iteration: [] TxGenerics Class Iteration: [] Cached Iteration: [] Cached Iteration: [] Cached id: [(O = java.lang.Object)] Cached id: [(O < N), (N = java.lang.Object)] Cached m1: [(S = java.lang.Object), (AI = java.lang.Object)] Cached m1: [(R < FCM), (FCM < BPT), (FCN = java.lang.Object), (S < FCN), (BPT = java.lang.Object)] Cached m2: [(AR = java.lang.Object), (BI = java.lang.Object)] Cached m2: [(FCM = java.lang.Object), (AR < FCM), (AS < FCN), (FCN < AUI), (AUI = java.lang.Object)] generating Iteration.class file ... Iteration.class file generated Disconnected from the target VM, address: '127.0.0.1:41229', transport: 'socket' Process finished with exit code 0
dholle added the
works for me
label 2024-03-04 11:13:29 +00:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
2 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#220
No description provided.