Merge with bigRefactoring

This commit is contained in:
Vic Nightfall 2023-01-04 16:07:48 +01:00
commit 96ffc12ebc
234 changed files with 244 additions and 26293 deletions

Binary file not shown.

75
pom.xml
View File

@ -43,39 +43,18 @@ 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>
<compilerArgs>--enable-preview</compilerArgs>
</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>
@ -86,47 +65,9 @@ http://maven.apache.org/maven-v4_0_0.xsd">
<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>
<artifactId>maven-assembly-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
<configuration>
<archive>
<manifest>
<mainClass>de.dhbwstuttgart.core.ConsoleInterface</mainClass>
</manifest>
</archive>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>18</source>
<target>18</target>
<compilerArgs>--enable-preview</compilerArgs>
</configuration>
</plugin>
</plugins>
</build>
<repositories>
@ -136,14 +77,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>18</maven.compiler.source>
<maven.compiler.target>18</maven.compiler.target>
<compilerArgs>
--enable-preview
</compilerArgs>
<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>

View File

@ -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());
}
}

View File

@ -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();
}
}

7
resources/AllgemeinTest/M.jav Executable file
View File

@ -0,0 +1,7 @@
import java.util.List;
class M {
void m(p, p2){
new addList().addLists(p, p2);
}
}

View File

@ -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;
}

View File

@ -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);
}
}

View File

@ -0,0 +1,4 @@
class Test {
a;
Test b;
}

View File

@ -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);
}
}

View File

@ -0,0 +1,3 @@
class Twice {
twice = f -> x -> f.apply(f.apply(x));
}

View File

@ -0,0 +1,5 @@
class Var {
var(x) { var y; }
}

View File

@ -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;
}
}

View File

@ -0,0 +1,8 @@
class Wildcard_Andi {
Test<? extends A> ex = new Test<>();
Test<? super A> sup = new Test<>();
}

View File

@ -0,0 +1,8 @@
import java.util.List;
class addList {
addLists(a, b){
a.add(b.get(0));
b.add(a.get(0));
}
}

View File

@ -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
}
}

Some files were not shown because too many files have changed in this diff Show More