Compare commits
245
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4affe5074d | ||
|
|
d6a79ea3a1 | ||
|
|
1f909f13ee | ||
|
|
be6f4bd578 | ||
|
|
478efd5649 | ||
|
|
c73e57cf2b | ||
|
|
ce29f4bcf1 | ||
|
|
42821f3215 | ||
|
|
f68afc88a6 | ||
|
|
ed671aeb97 | ||
|
|
82061474b2 | ||
|
|
d849bc127f | ||
|
|
f6a4fe8142 | ||
|
|
f6fe3a68aa | ||
|
|
86d229cac9 | ||
|
|
02c8dd9804 | ||
|
|
0908d512d9 | ||
|
|
e231cf722b | ||
|
|
aa9782edd7 | ||
|
|
e55b9938dc | ||
|
|
6815d8fc0a | ||
|
|
317f8b1aad | ||
|
|
f7b60214fa | ||
|
|
1ad5540500 | ||
|
|
3963baa9ce | ||
|
|
b9f19cc105 | ||
|
|
cf2d612870 | ||
|
|
b55fc71811 | ||
|
|
79335449d0 | ||
|
|
14606a846e | ||
|
|
2b67230a15 | ||
|
|
29b05b56cc | ||
|
|
08b9fc0ea3 | ||
|
|
6b767bc09b | ||
|
|
2dff7909ed | ||
|
|
d93836d110 | ||
|
|
b5af3a42a8 | ||
|
|
070dd16999 | ||
|
|
9d7e46925d | ||
|
|
d780d322f0 | ||
|
|
867f3d39e8 | ||
|
|
303246adce | ||
|
|
48daa9731f | ||
|
|
9d03080667 | ||
|
|
02e596ce7e | ||
|
|
acf4569908 | ||
|
|
a77c64cea2 | ||
|
|
034faf1f66 | ||
|
|
88db5016bf | ||
|
|
3a05912dfe | ||
|
|
40b04a4877 | ||
|
|
04b509613f | ||
|
|
cdd4cd9968 | ||
|
|
62e022c2f7 | ||
|
|
506fd0dc0e | ||
|
|
1c31b6d769 | ||
|
|
2d82dc1ae4 | ||
|
|
9606dc7b26 | ||
|
|
d79d2d28b1 | ||
|
|
3eebfdc9d9 | ||
|
|
ba66f29fba | ||
|
|
ffdedd4f99 | ||
|
|
9500deaf3d | ||
|
|
11eb03cdf0 | ||
|
|
3de89a5cfa | ||
|
|
c0348ed304 | ||
|
|
1ad4cfcb21 | ||
|
|
374d2e811b | ||
|
|
68034ed434 | ||
|
|
a92172c9da | ||
|
|
24bbce8265 | ||
|
|
84a5ed2cc3 | ||
|
|
b58b6c2288 | ||
|
|
99c46bf37f | ||
|
|
5058315a1b | ||
|
|
60d5da6f24 | ||
|
|
29f654279b | ||
|
|
239698c8d6 | ||
|
|
4074273ecb | ||
|
|
2d117e24cf | ||
|
|
1c2e868589 | ||
|
|
d39fd64f0f | ||
|
|
e699fc36ae | ||
|
|
64ec7989b4 | ||
|
|
5243b160f5 | ||
|
|
62fad15b6f | ||
|
|
21fb477ee1 | ||
|
|
baec9999db | ||
|
|
a7720fbf20 | ||
|
|
0c9612a2ea | ||
|
|
dabe7f269c | ||
|
|
a9f69ead5c | ||
|
|
04508a85f1 | ||
|
|
9dca8ccdaa | ||
|
|
8250f0cb51 | ||
|
|
a26f466471 | ||
|
|
dc4b1c7b4f | ||
|
|
2448969426 | ||
|
|
5e89ceeee8 | ||
|
|
1ce180ce74 | ||
|
|
2ab3becf44 | ||
|
|
3b77a1271b | ||
|
|
9d20c0564c | ||
|
|
8be7f3d790 | ||
|
|
9e6b2e9ced | ||
|
|
69bdb4aa5b | ||
|
|
8aa67594d9 | ||
|
|
8dfce15850 | ||
|
|
d1fd65fad7 | ||
|
|
752faaca86 | ||
|
|
a2d8ab35ae | ||
|
|
0944cf59fb | ||
|
|
db089bea60 | ||
|
|
abe7553c37 | ||
|
|
43e8837308 | ||
|
|
268f2b72eb | ||
|
|
d9bb0037b8 | ||
|
|
e8eaa3ac6e | ||
|
|
f0f3a91e27 | ||
|
|
b9c7b888c1 | ||
|
|
55a6f3e434 | ||
|
|
41d76533c0 | ||
|
|
7220829d80 | ||
|
|
a9ca1eb5b9 | ||
|
|
7aa7f94110 | ||
|
|
229c6c523d | ||
|
|
96ffc12ebc | ||
|
|
f714589728 | ||
|
|
f3e7fc0dc3 | ||
|
|
9f27d0d0fa | ||
|
|
7d50ddab51 | ||
|
|
9310882a28 | ||
|
|
b41680dc84 | ||
|
|
b63d1bcf73 | ||
|
|
8806d1462c | ||
|
|
dbd5311d93 | ||
|
|
291fee12db | ||
|
|
f8c8e2c805 | ||
|
|
462d791712 | ||
|
|
3df7df9802 | ||
|
|
00c8f41671 | ||
|
|
84cb7d871b | ||
|
|
83b735716f | ||
|
|
15e94111d4 | ||
|
|
9d942a7014 | ||
|
|
aa156b793f | ||
|
|
be1c356a9f | ||
|
|
4307371dee | ||
|
|
26bb3c9579 | ||
|
|
8f7becd62d | ||
|
|
c40fbd9399 | ||
|
|
b4e1be0fb7 | ||
|
|
469feb6349 | ||
|
|
82f5146abb | ||
|
|
f119bff0b6 | ||
|
|
a660d7a295 | ||
|
|
247eb0ef79 | ||
|
|
04b9af8c7b | ||
|
|
33e9b87562 | ||
|
|
5503f3723c | ||
|
|
b0c1d5d96d | ||
|
|
6fb329ae1a | ||
|
|
45b80bb6c5 | ||
|
|
5d5f3ee627 | ||
|
|
edf85dca7f | ||
|
|
bca1bd622f | ||
|
|
6fc70db481 | ||
|
|
c933160dcb | ||
|
|
2af59d1e1f | ||
|
|
f36f981ca8 | ||
|
|
d54cd5e20a | ||
|
|
975f2cefe3 | ||
|
|
56f68e84e4 | ||
|
|
d87ea005b1 | ||
|
|
bca02137a6 | ||
|
|
092d066774 | ||
|
|
6d12102fbf | ||
|
|
fa5a29c682 | ||
|
|
4e15bd4ae2 | ||
|
|
4e6e8c5cc7 | ||
|
|
bfc5c55e90 | ||
|
|
c21104f646 | ||
|
|
9fc558c21a | ||
|
|
6e1786ec7c | ||
|
|
2f3d3e1bb9 | ||
|
|
699155e21a | ||
|
|
de417d3ee6 | ||
|
|
ef06a8de38 | ||
|
|
560f0c5a6f | ||
|
|
d7380c6cb7 | ||
|
|
b43afd40ee | ||
|
|
a8be387dd9 | ||
|
|
7e259e2597 | ||
|
|
f00ee2598f | ||
|
|
3b439a49cd | ||
|
|
29112e7bd7 | ||
|
|
0a1a596bb9 | ||
|
|
372182aa8b | ||
|
|
1ef3f22c18 | ||
|
|
20f11a5bef | ||
|
|
6c584f92e9 | ||
|
|
8666bfdf17 | ||
|
|
590a4f04ae | ||
|
|
e8cc6ade11 | ||
|
|
8e80cc2985 | ||
|
|
f03d3f5e64 | ||
|
|
dfd12422a6 | ||
|
|
eebb07ec8b | ||
|
|
c65102d89a | ||
|
|
ed00aeb056 | ||
|
|
7012010462 | ||
|
|
9444ee38d6 | ||
|
|
4ed30f11f7 | ||
|
|
fcedec60e7 | ||
|
|
d8bdcf854c | ||
|
|
0e363cfae3 | ||
|
|
fedf33a006 | ||
|
|
4522aeff36 | ||
|
|
bcf56e6bdd | ||
|
|
15c05e5cba | ||
|
|
dc9a54be3b | ||
|
|
21adeb7f26 | ||
|
|
6381d09174 | ||
|
|
918a2cc04d | ||
|
|
ac1e0340c3 | ||
|
|
0d84e8361f | ||
|
|
0207c7d1b0 | ||
|
|
f1f028f0b9 | ||
|
|
8b58259fe0 | ||
|
|
55a75b04a0 | ||
|
|
06b27dabd2 | ||
|
|
9baf89acc2 | ||
|
|
be307e95a6 | ||
|
|
df4faebd92 | ||
|
|
36ef1e124a | ||
|
|
2706c31beb | ||
|
|
c32a0cc222 | ||
|
|
eaec7f613a | ||
|
|
c681396061 | ||
|
|
3d19d8d729 | ||
|
|
f457e7e4d0 | ||
|
|
c22d12f6b0 | ||
|
|
0aab2d9f53 | ||
|
|
33d6adf899 | ||
|
|
00add07132 |
No files matched your search
@@ -29,4 +29,3 @@ logFiles/**
|
||||
|
||||
src/main/java/de/dhbwstuttgart/parser/antlr/
|
||||
src/main/java/de/dhbwstuttgart/sat/asp/parser/antlr/
|
||||
/pull.sh
|
||||
@@ -0,0 +1,16 @@
|
||||
full:
|
||||
mvn -DskipTests package
|
||||
cp target/JavaTXcompiler-0.1-jar-with-dependencies.jar target/JavaTXcompiler-0.1-jar-with-dependencies_full.jar
|
||||
|
||||
NoMinMax:
|
||||
mvn -DskipTests package
|
||||
cp target/JavaTXcompiler-0.1-jar-with-dependencies.jar target/JavaTXcompiler-0.1-jar-with-dependencies_NoMinMax.jar
|
||||
|
||||
NoOpt:
|
||||
mvn -DskipTests package
|
||||
cp target/JavaTXcompiler-0.1-jar-with-dependencies.jar target/JavaTXcompiler-0.1-jar-with-dependencies_NoOpt.jar
|
||||
|
||||
NoOptParallel:
|
||||
mvn -DskipTests package
|
||||
cp target/JavaTXcompiler-0.1-jar-with-dependencies.jar target/JavaTXcompiler-0.1-jar-with-dependencies_NoOptParallel.jar
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
Stand: 24.5.21
|
||||
bigRefactoring: Master-Brach
|
||||
targetBytecode: Neuer Codegenerator mit generated generics Daniel
|
||||
bigRefactoringUnifyComment: Dokumentation Unify, Martin
|
||||
bytecodeGenericsSecond: Generated Generics, Ali, Martin
|
||||
inferWildcards, Wildcards, Till
|
||||
|
||||
Binary file not shown.
@@ -17,10 +17,11 @@ http://maven.apache.org/maven-v4_0_0.xsd">
|
||||
<version>4.11</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<!-- https://mvnrepository.com/artifact/org.antlr/antlr4 -->
|
||||
<dependency>
|
||||
<groupId>org.antlr</groupId>
|
||||
<artifactId>antlr4</artifactId>
|
||||
<version>4.8-1</version>
|
||||
<version>4.11.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-io</groupId>
|
||||
@@ -43,60 +44,44 @@ http://maven.apache.org/maven-v4_0_0.xsd">
|
||||
<artifactId>asm</artifactId>
|
||||
<version>7.0</version>
|
||||
</dependency>
|
||||
<!-- <dependency> <groupId>org.ow2.asm</groupId> <artifactId>asm-all</artifactId>
|
||||
<version>[4.0.0,)</version> </dependency> -->
|
||||
<!-- <dependency> <groupId>org.bitbucket.mstrobel</groupId> <artifactId>procyon-reflection</artifactId>
|
||||
<version>[0.5.32,)</version> </dependency> -->
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<directory>target</directory>
|
||||
<outputDirectory>target/classes</outputDirectory>
|
||||
<finalName>${project.artifactId}-${project.version}</finalName>
|
||||
<testOutputDirectory>target/test-classes</testOutputDirectory>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<version>3.0.0-M3</version>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>3.8.0</version>
|
||||
<configuration>
|
||||
<skipTests>true</skipTests>
|
||||
</configuration>
|
||||
<compilerArgs>--enable-preview</compilerArgs>
|
||||
<source>19</source>
|
||||
<target>19</target>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<!-- plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>3.8.1</version>
|
||||
<configuration>
|
||||
<verbose>true</verbose>
|
||||
<fork>true</fork>
|
||||
<executable>/home/michael/programs/jdk/jdk8u232-b09/bin/javac</executable>
|
||||
<compilerVersion>1.8</compilerVersion>
|
||||
<source>1.8</source>
|
||||
<target>1.8</target>
|
||||
</configuration>
|
||||
</plugin -->
|
||||
<plugin>
|
||||
<groupId>org.antlr</groupId>
|
||||
<artifactId>antlr4-maven-plugin</artifactId>
|
||||
<version>4.8-1</version>
|
||||
<version>4.11.1</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>antlr</id>
|
||||
<goals>
|
||||
<goal>antlr4</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<sourceDirectory>src/main/antlr4/java8</sourceDirectory>
|
||||
<outputDirectory>${project.basedir}/src/main/java/de/dhbwstuttgart/parser/antlr</outputDirectory>
|
||||
<arguments>
|
||||
<argument>-package</argument>
|
||||
<argument>de.dhbwstuttgart.parser.antlr</argument>
|
||||
</arguments>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-jar-plugin</artifactId>
|
||||
<configuration>
|
||||
<archive>
|
||||
<manifest>
|
||||
<mainClass>de.dhbwstuttgart.core.ConsoleInterface</mainClass>
|
||||
</manifest>
|
||||
</archive>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-assembly-plugin</artifactId>
|
||||
<executions>
|
||||
@@ -127,11 +112,8 @@ http://maven.apache.org/maven-v4_0_0.xsd">
|
||||
</repository>
|
||||
</repositories>
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||
<maven.compiler.source>1.8</maven.compiler.source>
|
||||
<maven.compiler.target>1.8</maven.compiler.target>
|
||||
<tycho.version>0.23.0</tycho.version>
|
||||
<maven.compiler.source>19</maven.compiler.source>
|
||||
<maven.compiler.target>19</maven.compiler.target>
|
||||
<mainClass>de.dhbwstuttgart.core.ConsoleInterface</mainClass>
|
||||
</properties>
|
||||
<distributionManagement>
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
class Assign {
|
||||
|
||||
assign(x, y) {
|
||||
x = y;
|
||||
}
|
||||
|
||||
assign2(x, y) {
|
||||
assign(x,y);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
class Box<A>{
|
||||
void m(A a){}
|
||||
}
|
||||
|
||||
class B { }
|
||||
|
||||
class Box_Main extends B {
|
||||
|
||||
m(b) {
|
||||
b.m(new Box_Main());
|
||||
b.m(new B());
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
class Box<A>{
|
||||
A f;
|
||||
}
|
||||
|
||||
class B { }
|
||||
|
||||
class Box_Main extends B {//Fehler Bugzilla Bug 230
|
||||
|
||||
m(b) {
|
||||
b.f = new Box_Main();
|
||||
b.f = new B();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
import java.lang.Object;
|
||||
import java.util.Vector;
|
||||
|
||||
class CaptureConversion {
|
||||
|
||||
<X> void assign(Vector<X> v1, Vector<X> v2) {
|
||||
v1 = v2;
|
||||
}
|
||||
|
||||
void main() {
|
||||
Vector<?> v1;
|
||||
v1 = new Vector<Object>();
|
||||
Vector<? extends Object> v2;
|
||||
v2 = new Vector<Object>();
|
||||
v1 = v2;
|
||||
assign(v1, v2);
|
||||
}
|
||||
}
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Executable
+7
@@ -0,0 +1,7 @@
|
||||
import java.util.List;
|
||||
class M {
|
||||
void m(p, p2){
|
||||
|
||||
new addList().addLists(p, p2);
|
||||
}
|
||||
}
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -0,0 +1,36 @@
|
||||
import java.util.Vector;
|
||||
import java.lang.Boolean;
|
||||
import java.lang.Object;
|
||||
|
||||
class Pair<U, T> {
|
||||
U a;
|
||||
T b;
|
||||
|
||||
make(x) {
|
||||
var ret = new Pair<>();
|
||||
ret.a = x.elementAt(0);
|
||||
ret.b = x.elementAt(1);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
eq(a, b) {
|
||||
b = a;
|
||||
return a == b;
|
||||
}
|
||||
|
||||
|
||||
compare( p) {
|
||||
return eq(p.a, p.b);
|
||||
//return p.a == p.b;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
void m(Pair<?, ?> p, Vector<?> b)
|
||||
{
|
||||
//this.compare(p); //1, type incorrect
|
||||
this.compare(this.make(b)); //2, OK
|
||||
}
|
||||
*/
|
||||
}
|
||||
@@ -2,6 +2,12 @@ class Pair<T, U> {
|
||||
T x;
|
||||
U y;
|
||||
|
||||
public Pair() { }
|
||||
public Pair(T x, U y) {
|
||||
this.x = x;
|
||||
this.y = y;
|
||||
}
|
||||
|
||||
public T fst () {
|
||||
return x;
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
import java.util.Vector;
|
||||
import java.util.Stack;
|
||||
|
||||
class Put {
|
||||
|
||||
putElement(ele, v) {
|
||||
v.addElement(ele);
|
||||
}
|
||||
|
||||
putElement(ele, s) {
|
||||
s.push(ele);
|
||||
}
|
||||
|
||||
|
||||
main(ele, x) {
|
||||
putElement(ele, x);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
class Test {
|
||||
a;
|
||||
Test b;
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
import java.util.ArrayList;
|
||||
|
||||
class TestSubTypless {
|
||||
m(a){
|
||||
var l = new ArrayList<>();
|
||||
l.add(a);
|
||||
return m2(l).get(0);
|
||||
}
|
||||
m2(a){
|
||||
return m(a);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
class Twice {
|
||||
twice = f -> x -> f.apply(f.apply(x));
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
import java.util.Vector;
|
||||
import java.lang.Boolean;
|
||||
|
||||
class UseWildcardPair{
|
||||
|
||||
void m(Pair<?, ?> p, Vector<?> b)
|
||||
{
|
||||
p.compare(p); //1, type incorrect
|
||||
p.compare(p.make(b)); //2, OK
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
class Var {
|
||||
|
||||
var(x) { var y; }
|
||||
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
import java.util.Vector;
|
||||
import java.lang.Integer;
|
||||
|
||||
|
||||
public class VectorConstAdd {
|
||||
vectorAdd(v1) {
|
||||
var i = 0;
|
||||
var erg = new Vector<>();
|
||||
while (i < v1.size()) {
|
||||
erg.addElement(v1.elementAt(i) + 1);
|
||||
i++;
|
||||
}
|
||||
return erg;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
import java.util.Vector;
|
||||
|
||||
class VectorNotObject {
|
||||
|
||||
vectorAddAll(v1, v2) {
|
||||
v1.addAll(v2);
|
||||
return v1;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
import java.util.Vector;
|
||||
import java.lang.Integer;
|
||||
import java.lang.String;
|
||||
|
||||
class WildcardCaptureConversionTest {
|
||||
|
||||
m(x, y ,z) {
|
||||
x = new Vector<Integer>();
|
||||
y = new Vector<String>();
|
||||
x.add(1);
|
||||
y.add("2");
|
||||
//Integer i = x.elementAt(0);
|
||||
//String s = y.elementAt(0);
|
||||
return z.vectorAddAll(x, y);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
class Wildcard_Andi {
|
||||
|
||||
Test<? extends A> ex = new Test<>();
|
||||
|
||||
Test<? super A> sup = new Test<>();
|
||||
}
|
||||
|
||||
|
||||
Executable
+8
@@ -0,0 +1,8 @@
|
||||
import java.util.List;
|
||||
|
||||
class addList {
|
||||
addLists(a, b){
|
||||
a.add(b.get(0));
|
||||
b.add(a.get(0));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
import java.util.List;
|
||||
import java.lang.Integer;
|
||||
import java.lang.Object;
|
||||
import java.lang.Boolean;
|
||||
|
||||
class wildcardPair {
|
||||
|
||||
make(l) {
|
||||
var p = new Pair(l.get(0), l.get(1));
|
||||
return p;
|
||||
}
|
||||
//<X>Boolean compare(Pair<X, X> x) { return true; }
|
||||
void m(l) {
|
||||
Object o = l.get(0);
|
||||
|
||||
//Pair<? extends Object, ? extends Object> p;
|
||||
//List<?> b;
|
||||
//this.compare(p); //1, type incorrect
|
||||
make(l);
|
||||
//this.compare(this.make(b)); //2, OK
|
||||
}
|
||||
}
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -0,0 +1,7 @@
|
||||
class B { }
|
||||
class Box_Main extends B {
|
||||
m(b) {
|
||||
b.m(new Box_Main());
|
||||
b.m(new B());
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
class Box<A> {
|
||||
void m(A a) { }
|
||||
}
|
||||
File renamed without changes.
File renamed without changes.
@@ -0,0 +1,6 @@
|
||||
class Cycle {
|
||||
m(x, y) {
|
||||
y = x;
|
||||
x = y;
|
||||
}
|
||||
}
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
+3
@@ -1,3 +1,6 @@
|
||||
import java.lang.String;
|
||||
import java.lang.Integer;
|
||||
|
||||
class Generics2<B extends String>{
|
||||
<B extends Integer> B m1(B b){
|
||||
return b;
|
||||
@@ -0,0 +1,7 @@
|
||||
import java.lang.String;
|
||||
import java.lang.Integer;
|
||||
import java.util.List;
|
||||
|
||||
class Generics3<B extends String & List<Integer>> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
import java.lang.String;
|
||||
import java.lang.Integer;
|
||||
|
||||
class Generics4<B extends String> {
|
||||
<C extends Integer> C m1(C b){
|
||||
return b;
|
||||
}
|
||||
|
||||
m2(x) {
|
||||
return m1(x);
|
||||
}
|
||||
}
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -0,0 +1,65 @@
|
||||
public class Inf {
|
||||
m(x,y,a){
|
||||
var z;
|
||||
var v;
|
||||
var w;
|
||||
var b;
|
||||
y=x;
|
||||
z=x;
|
||||
v=y;
|
||||
w=y;
|
||||
y=a;
|
||||
b=a;
|
||||
var c;
|
||||
var d;
|
||||
c = v;
|
||||
d = v;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
TPH M m(TPH N x, TPH O y, TPH P a)({
|
||||
TPH Q z;
|
||||
TPH R v;
|
||||
TPH S w;
|
||||
TPH T b;
|
||||
(y)::TPH O = (x)::TPH N;
|
||||
(z)::TPH Q = (x)::TPH N;
|
||||
(v)::TPH R = (y)::TPH O;
|
||||
(w)::TPH S = (y)::TPH O;
|
||||
(y)::TPH O = (a)::TPH P;
|
||||
(b)::TPH T = (a)::TPH P;
|
||||
TPH U c;
|
||||
TPH V d;
|
||||
(c)::TPH U = (v)::TPH R;
|
||||
(d)::TPH V = (v)::TPH R;
|
||||
return;
|
||||
})::TPH W
|
||||
|
||||
Inf()({
|
||||
super(());
|
||||
})::TPH Z
|
||||
|
||||
}
|
||||
// c::U d::V
|
||||
// \ /
|
||||
// v::R w::S
|
||||
// \ /
|
||||
// z::Q y::O b::T
|
||||
// \ / \ /
|
||||
// x::N a::P
|
||||
|
||||
RESULT Final: [[(TPH N < TPH O), (TPH R < TPH V), (TPH N < TPH Q), (TPH P < TPH O), (TPH R < TPH U), (TPH M = void), (TPH O < TPH S), (TPH O < TPH R), (TPH P < TPH T)]]
|
||||
Simplified constraints: [(TPH O < TPH S), (TPH P < TPH O), (TPH O < TPH R), (TPH P < TPH T), (TPH N < TPH O), (TPH N < TPH Q)]
|
||||
m: [(TPH DDV = java.lang.Object), (TPH DDX = java.lang.Object), (TPH DDX < TPH DDV), (TPH N < TPH DDX), (TPH P < TPH DDX)]
|
||||
Class Inf: []
|
||||
Inf: []
|
||||
|
||||
Unify nach Oder-Constraints-Anpassung:
|
||||
UND:[(void =. M, , -1 WC: false, IT: false), (N <. O, 1 WC: false, IT: false, 1 WC: false, IT: false), (P <. O, 1 WC: false, IT: false, 1 WC: false, IT: false), (N <. Q, 1 WC: false, IT: false, 0 WC: true, IT: false), (O <. S, 1 WC: false, IT: false, 0 WC: true, IT: false), (O <. R, 1 WC: false, IT: false, 0 WC: true, IT: false), (P <. T, 1 WC: false, IT: false, 0 WC: true, IT: false)]
|
||||
isInherited = false
|
||||
isStatement = false
|
||||
|
||||
ODER:
|
||||
*/
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
class Infimum {
|
||||
m(x, y, z) {
|
||||
y = x;
|
||||
z = x;
|
||||
}
|
||||
}
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
+1
-1
@@ -1,6 +1,6 @@
|
||||
import java.util.Vector;
|
||||
import java.lang.Integer;
|
||||
import java.lang.Float;
|
||||
//import java.lang.Float;
|
||||
//import java.lang.Byte;
|
||||
//import java.lang.Boolean;
|
||||
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
+7
-5
@@ -4,14 +4,16 @@ import java.lang.Double;
|
||||
import java.util.Vector;
|
||||
import java.lang.Boolean;
|
||||
|
||||
|
||||
|
||||
|
||||
public class OLFun {
|
||||
|
||||
//f = x -> {return x + x;};
|
||||
|
||||
m(f, x) {
|
||||
x = f.apply(x+x);
|
||||
x = f.apply(x+x);
|
||||
return x;
|
||||
}
|
||||
|
||||
m2(y) {
|
||||
m(x -> x * 2, y);
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
import java.lang.String;
|
||||
import java.lang.Integer;
|
||||
import java.lang.Double;
|
||||
import java.util.Vector;
|
||||
import java.lang.Boolean;
|
||||
|
||||
public class OLFun2 {
|
||||
|
||||
x;
|
||||
m(f){
|
||||
x = f.apply(x + x);
|
||||
}
|
||||
}
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -0,0 +1,32 @@
|
||||
import java.util.Vector;
|
||||
import java.lang.Boolean;
|
||||
import java.lang.Object;
|
||||
|
||||
class Pair<U, T> {
|
||||
U a;
|
||||
T b;
|
||||
|
||||
make(x) {
|
||||
var ret = new Pair<>();
|
||||
ret.a = x.elementAt(0);
|
||||
ret.b = x.elementAt(1);
|
||||
return ret;
|
||||
}
|
||||
/*
|
||||
eq(a, b) {
|
||||
b = a;
|
||||
return a == b;
|
||||
}
|
||||
|
||||
compare( p) {
|
||||
return eq(p.a, p.b);
|
||||
//return p.a == p.b;
|
||||
}
|
||||
|
||||
void m(Pair<?, ?> p, List<? extends Eq> b)
|
||||
{
|
||||
//this.compare(p); //1, type incorrect
|
||||
this.compare(this.make(b)); //2, OK
|
||||
}
|
||||
*/
|
||||
}
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loaded 100 of 492 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user