Compare commits
No commits in common. "targetBytecode" and "gradle" have entirely different histories.
targetByte
...
gradle
9
.gitattributes
vendored
Normal file
9
.gitattributes
vendored
Normal file
@ -0,0 +1,9 @@
|
||||
#
|
||||
# https://help.github.com/articles/dealing-with-line-endings/
|
||||
#
|
||||
# Linux start script should use lf
|
||||
/gradlew text eol=lf
|
||||
|
||||
# These are Windows script files and should use crlf
|
||||
*.bat text eol=crlf
|
||||
|
@ -1,25 +0,0 @@
|
||||
name: Build and Test with Maven
|
||||
on: [push]
|
||||
|
||||
jobs:
|
||||
Build-and-test-with-Maven:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check out repository code
|
||||
uses: actions/checkout@v3
|
||||
- name: Install maven
|
||||
run: |
|
||||
apt update
|
||||
apt install -y maven
|
||||
- name: Install java
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: 'temurin'
|
||||
java-version: '21'
|
||||
cache: 'maven'
|
||||
- name: Compile project
|
||||
run: |
|
||||
mvn compile
|
||||
- name: Run tests
|
||||
run: |
|
||||
mvn test
|
11
.gitignore
vendored
11
.gitignore
vendored
@ -19,9 +19,7 @@ bin
|
||||
.DS_Store
|
||||
.project
|
||||
.settings/
|
||||
.vscode/
|
||||
/target/
|
||||
settings.json
|
||||
|
||||
#
|
||||
manually/
|
||||
@ -31,3 +29,12 @@ logFiles/**
|
||||
|
||||
src/main/java/de/dhbwstuttgart/parser/antlr/
|
||||
src/main/java/de/dhbwstuttgart/sat/asp/parser/antlr/
|
||||
|
||||
#GRADLE
|
||||
# Ignore Gradle project-specific cache directory
|
||||
.gradle
|
||||
|
||||
# Ignore Gradle build output directory
|
||||
build
|
||||
|
||||
|
||||
|
@ -1,14 +0,0 @@
|
||||
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
|
||||
master, derzeit nicht genutzt
|
||||
plugin, eigemntlicher Branch fuer Plugin-Basis, derzeit nicht aktuelle (aktuelle Version in simplifyRes
|
||||
simplifyRes, Basis fuer Plugin, sollte auf Plugin gemerged werden, noch keine Packages, Michael
|
||||
strucTypesNew, Struturelle Typen, alte Basis, arbeite derzeit niemand
|
||||
|
||||
Stand 21.2.23
|
||||
unif23: Testbranch fuer Tagungseinrecihung Unif23
|
||||
|
BIN
app/.build.gradle.kts.swp
Normal file
BIN
app/.build.gradle.kts.swp
Normal file
Binary file not shown.
53
app/build.gradle.kts
Normal file
53
app/build.gradle.kts
Normal file
@ -0,0 +1,53 @@
|
||||
/*
|
||||
* This file was generated by the Gradle 'init' task.
|
||||
*
|
||||
* This generated file contains a sample Java application project to get you started.
|
||||
* For more details take a look at the 'Building Java & JVM projects' chapter in the Gradle
|
||||
* User Manual available at https://docs.gradle.org/7.6/userguide/building_java_projects.html
|
||||
*/
|
||||
|
||||
plugins {
|
||||
// Apply the application plugin to add support for building a CLI application in Java.
|
||||
antlr
|
||||
application
|
||||
}
|
||||
|
||||
java {
|
||||
toolchain {
|
||||
languageVersion.set(JavaLanguageVersion.of(19))
|
||||
}
|
||||
}
|
||||
|
||||
repositories {
|
||||
// Use Maven Central for resolving dependencies.
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
// Use JUnit test framework.
|
||||
testImplementation("junit:junit:4.13.2")
|
||||
|
||||
// This dependency is used by the application.
|
||||
implementation("com.google.guava:guava:31.1-jre")
|
||||
implementation("commons-io:commons-io:2.6")
|
||||
implementation("org.reflections:reflections:0.9.11")
|
||||
implementation("org.ow2.asm:asm:7.0")
|
||||
//implementation("org.antlr:antlr4:4.11.1")
|
||||
antlr("org.antlr:antlr4:4.8-1")
|
||||
}
|
||||
|
||||
|
||||
tasks.withType<JavaCompile> {
|
||||
options.compilerArgs.add("--enable-preview")
|
||||
}
|
||||
tasks.withType<Test> {
|
||||
jvmArgs("--enable-preview")
|
||||
}
|
||||
tasks.withType<JavaExec> {
|
||||
jvmArgs("--enable-preview")
|
||||
}
|
||||
|
||||
application {
|
||||
// Define the main class for the application.
|
||||
mainClass.set("de.dhbwstuttgart.App")
|
||||
}
|
13
app/resources/AllgemeinTest/Box.jav
Normal file
13
app/resources/AllgemeinTest/Box.jav
Normal 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());
|
||||
}
|
||||
}
|
13
app/resources/AllgemeinTest/Box_Main.jav
Normal file
13
app/resources/AllgemeinTest/Box_Main.jav
Normal 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();
|
||||
}
|
||||
}
|
12
app/resources/AllgemeinTest/FCTest1.jav
Normal file
12
app/resources/AllgemeinTest/FCTest1.jav
Normal file
@ -0,0 +1,12 @@
|
||||
import java.util.Vector;
|
||||
import java.util.List;
|
||||
import java.lang.Integer;
|
||||
|
||||
class FCTest1 extends Vector<Vector<Integer>> {
|
||||
fc1() {
|
||||
var y;
|
||||
var z;
|
||||
y.add(z);
|
||||
return y;
|
||||
}
|
||||
}
|
11
app/resources/AllgemeinTest/FCTest2.jav
Normal file
11
app/resources/AllgemeinTest/FCTest2.jav
Normal file
@ -0,0 +1,11 @@
|
||||
import java.util.Vector;
|
||||
import java.util.List;
|
||||
import java.lang.Integer;
|
||||
|
||||
class FCTest2 extends Vector<Vector<Integer>> {
|
||||
fc2(y) {
|
||||
var z;
|
||||
y.add(z);
|
||||
return y;
|
||||
}
|
||||
}
|
19
app/resources/AllgemeinTest/FCTest3.jav
Normal file
19
app/resources/AllgemeinTest/FCTest3.jav
Normal file
@ -0,0 +1,19 @@
|
||||
import java.util.Vector;
|
||||
import java.lang.Integer;
|
||||
|
||||
class FCTest3 extends Pair<Vector<Integer>, Vector<Integer>> {
|
||||
|
||||
|
||||
fc2(x) {
|
||||
x.snd().addElement(2);
|
||||
}
|
||||
|
||||
|
||||
|
||||
fc2a() {
|
||||
var y;
|
||||
y.snd().addElement(2);
|
||||
return y;
|
||||
}
|
||||
|
||||
}
|
10
app/resources/AllgemeinTest/GenTest.jav
Normal file
10
app/resources/AllgemeinTest/GenTest.jav
Normal file
@ -0,0 +1,10 @@
|
||||
import java.lang.Integer;
|
||||
import java.util.Vector;
|
||||
|
||||
public class GenTest {
|
||||
|
||||
main(x) {
|
||||
var v = new Vector();
|
||||
return 1 + v.elementAt(0);
|
||||
}
|
||||
}
|
9
app/resources/AllgemeinTest/Generics.jav
Normal file
9
app/resources/AllgemeinTest/Generics.jav
Normal file
@ -0,0 +1,9 @@
|
||||
class Generics {
|
||||
a;
|
||||
id(b) { return b; }
|
||||
setA(x) {
|
||||
a = x;
|
||||
return a;
|
||||
}
|
||||
m(x,y) { x = id(y); }
|
||||
}
|
7
app/resources/AllgemeinTest/M.jav
Executable file
7
app/resources/AllgemeinTest/M.jav
Executable file
@ -0,0 +1,7 @@
|
||||
import java.util.List;
|
||||
class M {
|
||||
void m(p, p2){
|
||||
|
||||
new addList().addLists(p, p2);
|
||||
}
|
||||
}
|
9
app/resources/AllgemeinTest/OverloadingMain.jav
Normal file
9
app/resources/AllgemeinTest/OverloadingMain.jav
Normal file
@ -0,0 +1,9 @@
|
||||
import java.util.Stack;
|
||||
import java.util.Vector;
|
||||
|
||||
class OverloadingMain {
|
||||
|
||||
mmMain(x) { var y; return new O1().mm(y); }
|
||||
|
||||
}
|
||||
|
20
app/resources/AllgemeinTest/Overloading_Generics.jav
Normal file
20
app/resources/AllgemeinTest/Overloading_Generics.jav
Normal file
@ -0,0 +1,20 @@
|
||||
import java.lang.Integer;
|
||||
|
||||
|
||||
public class Overloading_Generics {
|
||||
|
||||
id1 (x) { return x; }
|
||||
|
||||
//Integer id (Integer x) { return x; }
|
||||
}
|
||||
|
||||
|
||||
class Overloading_Generics1 {
|
||||
main(x) {
|
||||
var olg = new Overloading_Generics();
|
||||
return olg.id1(1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
25
app/resources/AllgemeinTest/OverrideMain.jav
Normal file
25
app/resources/AllgemeinTest/OverrideMain.jav
Normal file
@ -0,0 +1,25 @@
|
||||
import java.util.Vector;
|
||||
import java.util.Stack;
|
||||
|
||||
class OverrideMain {
|
||||
ovrMain(x) {
|
||||
var overide;
|
||||
overide.ovr(x);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
[
|
||||
[(TPH L = java.util.Stack<TPH FTM>), (TPH N = java.lang.String), (TPH M = ? extends Override2), (TPH FTN, TPH FTM), (TPH K = void)],
|
||||
[(TPH FTO, TPH FTP), (TPH M = ? extends Override2), (TPH N = java.lang.String), (TPH L = java.util.Stack<TPH FTP>), (TPH K = void)],
|
||||
[(TPH M = ? extends Override2), (TPH N = java.lang.String), (TPH K = void), (TPH FTR, TPH FTQ), (TPH L = java.util.Vector<TPH FTQ>)],
|
||||
[(TPH FTT, TPH FTS), (TPH M = ? extends Override2), (TPH L = java.util.Vector<TPH FTS>), (TPH K = void), (TPH N = java.lang.String)],
|
||||
[(TPH L = java.util.Vector<TPH FTV>), (TPH M = ? extends Override2), (TPH N = java.lang.String), (TPH FTU, TPH FTV), (TPH K = void)],
|
||||
[(TPH FTX, TPH FTW), (TPH M = ? extends Override2), (TPH L = java.util.Vector<TPH FTW>), (TPH K = void), (TPH N = java.lang.String)],
|
||||
[(TPH M = ? extends Override2), (TPH L = java.util.Stack<TPH FTZ>), (TPH K = void), (TPH FTY, TPH FTZ), (TPH N = java.lang.String)],
|
||||
[(TPH FUB, TPH FUA), (TPH K = void), (TPH M = ? extends Override2), (TPH N = java.lang.String), (TPH L = java.util.Vector<TPH FUA>)],
|
||||
[(TPH N = java.lang.String), (TPH L = java.util.Vector<TPH FUC>), (TPH FUD, TPH FUC), (TPH M = ? extends Override2), (TPH K = void)],
|
||||
[(TPH N = java.lang.String), (TPH FUF, TPH FUE), (TPH M = ? extends Override2), (TPH K = void), (TPH L = java.util.Vector<TPH FUE>)]]
|
||||
|
||||
[[(TPH M = ? extends Override2), (TPH MNX, TPH MNY), (TPH N = java.lang.String), (TPH K = void), (TPH L = java.util.Stack<TPH MNY>)], [(TPH L = java.util.Stack<TPH MOC>), (TPH N = java.lang.String), (TPH M = ? extends Override2), (TPH K = void), (TPH MOB, TPH MOC)], [(TPH M = ? extends Override2), (TPH N = java.lang.String), (TPH MNZ, TPH MOA), (TPH L = java.util.Vector<TPH MOA>), (TPH K = void)], [(TPH L = java.util.Vector<TPH MOE>), (TPH K = void), (TPH M = ? extends Override2), (TPH MOD, TPH MOE), (TPH N = java.lang.String)], [(TPH M = ? extends Override2), (TPH K = void), (TPH N = java.lang.String), (TPH MOF, TPH MOG), (TPH L = java.util.Stack<TPH MOG>)], [(TPH L = java.util.Vector<TPH MOI>), (TPH K = void), (TPH MOH, TPH MOI), (TPH M = ? extends Override2), (TPH N = java.lang.String)], [(TPH L = java.util.Vector<TPH MOK>), (TPH MOJ, TPH MOK), (TPH K = void), (TPH M = ? extends Override2), (TPH N = java.lang.String)], [(TPH MOL, TPH MOM), (TPH L = java.util.Stack<TPH MOM>), (TPH M = ? extends Override2), (TPH K = void), (TPH N = java.lang.String)], [(TPH L = java.util.Vector<TPH MOO>), (TPH MON, TPH MOO), (TPH N = java.lang.String), (TPH K = void), (TPH M = ? extends Override2)], [(TPH L = java.util.Stack<TPH MOP>), (TPH N = java.lang.String), (TPH M = ? extends Override2), (TPH MOQ, TPH MOP), (TPH K = void)]]
|
||||
*/
|
11
app/resources/AllgemeinTest/OverrideMainRet.jav
Normal file
11
app/resources/AllgemeinTest/OverrideMainRet.jav
Normal file
@ -0,0 +1,11 @@
|
||||
import java.util.Vector;
|
||||
import java.util.Stack;
|
||||
|
||||
class OverrideMainRet {
|
||||
ovrMain() {
|
||||
var overide;
|
||||
var x;
|
||||
overide.ovr(x);
|
||||
return x;
|
||||
}
|
||||
}
|
18
app/resources/AllgemeinTest/Pair.java
Normal file
18
app/resources/AllgemeinTest/Pair.java
Normal file
@ -0,0 +1,18 @@
|
||||
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;
|
||||
}
|
||||
|
||||
public U snd () {
|
||||
return y;
|
||||
}
|
||||
}
|
19
app/resources/AllgemeinTest/Put.jav
Normal file
19
app/resources/AllgemeinTest/Put.jav
Normal 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);
|
||||
}
|
||||
|
||||
}
|
4
app/resources/AllgemeinTest/Test.jav
Normal file
4
app/resources/AllgemeinTest/Test.jav
Normal file
@ -0,0 +1,4 @@
|
||||
class Test {
|
||||
a;
|
||||
Test b;
|
||||
}
|
12
app/resources/AllgemeinTest/TestSubTypless.jav
Normal file
12
app/resources/AllgemeinTest/TestSubTypless.jav
Normal 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);
|
||||
}
|
||||
}
|
3
app/resources/AllgemeinTest/Twice.jav
Normal file
3
app/resources/AllgemeinTest/Twice.jav
Normal file
@ -0,0 +1,3 @@
|
||||
class Twice {
|
||||
twice = f -> x -> f.apply(f.apply(x));
|
||||
}
|
5
app/resources/AllgemeinTest/Var.jav
Normal file
5
app/resources/AllgemeinTest/Var.jav
Normal file
@ -0,0 +1,5 @@
|
||||
class Var {
|
||||
|
||||
var(x) { var y; }
|
||||
|
||||
}
|
15
app/resources/AllgemeinTest/VectorConstAdd.jav
Normal file
15
app/resources/AllgemeinTest/VectorConstAdd.jav
Normal 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;
|
||||
}
|
||||
}
|
8
app/resources/AllgemeinTest/Wildcard_Andi.jav
Normal file
8
app/resources/AllgemeinTest/Wildcard_Andi.jav
Normal file
@ -0,0 +1,8 @@
|
||||
class Wildcard_Andi {
|
||||
|
||||
Test<? extends A> ex = new Test<>();
|
||||
|
||||
Test<? super A> sup = new Test<>();
|
||||
}
|
||||
|
||||
|
8
app/resources/AllgemeinTest/addList.jav
Executable file
8
app/resources/AllgemeinTest/addList.jav
Executable file
@ -0,0 +1,8 @@
|
||||
import java.util.List;
|
||||
|
||||
class addList {
|
||||
addLists(a, b){
|
||||
a.add(b.get(0));
|
||||
b.add(a.get(0));
|
||||
}
|
||||
}
|
22
app/resources/AllgemeinTest/wildcardPair.jav
Normal file
22
app/resources/AllgemeinTest/wildcardPair.jav
Normal 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
|
||||
}
|
||||
}
|
8
app/resources/bytecode/javFiles/AA.jav
Normal file
8
app/resources/bytecode/javFiles/AA.jav
Normal file
@ -0,0 +1,8 @@
|
||||
import java.lang.Integer;
|
||||
import java.lang.String;
|
||||
|
||||
public class AA {
|
||||
m(Integer i) { return "AA"; }
|
||||
|
||||
m2(AA x) { return "AA"; }
|
||||
}
|
3
app/resources/bytecode/javFiles/BB.jav
Normal file
3
app/resources/bytecode/javFiles/BB.jav
Normal file
@ -0,0 +1,3 @@
|
||||
import java.lang.Integer;
|
||||
|
||||
public class BB extends AA { }
|
@ -3,15 +3,15 @@ import java.lang.Double;
|
||||
|
||||
public class BinaryInMeth {
|
||||
|
||||
public m(a){
|
||||
m(a){
|
||||
return ++a;
|
||||
}
|
||||
|
||||
public m2(a,b){
|
||||
m2(a,b){
|
||||
return m(a+b);
|
||||
}
|
||||
|
||||
public m3(a) {
|
||||
m3(a) {
|
||||
return m(++a);
|
||||
}
|
||||
}
|
@ -1,11 +1,11 @@
|
||||
import java.lang.Integer;
|
||||
import java.lang.String;
|
||||
import BB;
|
||||
|
||||
|
||||
public class CC extends BB {
|
||||
public m(Integer i) {
|
||||
m(Integer i) {
|
||||
return "CC";
|
||||
}
|
||||
|
||||
public m2(CC x) { return "CC"; }
|
||||
m2(CC x) { return "CC"; }
|
||||
}
|
6
app/resources/bytecode/javFiles/Cycle.jav
Normal file
6
app/resources/bytecode/javFiles/Cycle.jav
Normal file
@ -0,0 +1,6 @@
|
||||
class Cycle {
|
||||
m(x, y) {
|
||||
y = x;
|
||||
x = y;
|
||||
}
|
||||
}
|
@ -1,5 +1,4 @@
|
||||
import java.lang.Integer;
|
||||
import CC;
|
||||
|
||||
public class DD extends CC { }
|
||||
|
3
app/resources/bytecode/javFiles/Exceptions.jav
Normal file
3
app/resources/bytecode/javFiles/Exceptions.jav
Normal file
@ -0,0 +1,3 @@
|
||||
public class Exceptions {
|
||||
// m(Integer i) throws
|
||||
}
|
@ -1,12 +1,12 @@
|
||||
import java.lang.Integer;
|
||||
import java.lang.Double;
|
||||
import java.lang.String;
|
||||
//import java.lang.Double;
|
||||
|
||||
public class Fac {
|
||||
getFac(n) {
|
||||
public class Fac {
|
||||
|
||||
getFac(n){
|
||||
var res = 1;
|
||||
var i = 1;
|
||||
while (i <= n) {
|
||||
while(i<=n) {
|
||||
res = res * i;
|
||||
i++;
|
||||
}
|
@ -17,7 +17,7 @@ public class Faculty {
|
||||
|
||||
|
||||
|
||||
public getFact(java.lang.Integer x) {
|
||||
public getFact(x) {
|
||||
return fact.apply(x);
|
||||
}
|
||||
}
|
12
app/resources/bytecode/javFiles/FieldTph2.jav
Normal file
12
app/resources/bytecode/javFiles/FieldTph2.jav
Normal file
@ -0,0 +1,12 @@
|
||||
public class FieldTph2 {
|
||||
a;
|
||||
|
||||
m(b){
|
||||
b = a;
|
||||
return b;
|
||||
}
|
||||
|
||||
m2(c){
|
||||
a = c;
|
||||
}
|
||||
}
|
@ -1,20 +1,20 @@
|
||||
public class FieldTphConsMeth {
|
||||
|
||||
public a;
|
||||
a;
|
||||
public FieldTphConsMeth(c) {
|
||||
a = id(c);
|
||||
}
|
||||
|
||||
public id(b) {
|
||||
id(b) {
|
||||
return b;
|
||||
}
|
||||
|
||||
public setA(x) {
|
||||
setA(x) {
|
||||
a = x;
|
||||
return a;
|
||||
}
|
||||
|
||||
public m(x,y) {
|
||||
m(x,y) {
|
||||
x = id(y);
|
||||
}
|
||||
|
@ -1,13 +1,13 @@
|
||||
import java.lang.Boolean;
|
||||
|
||||
public class FieldTphMMeth {
|
||||
public a;
|
||||
a;
|
||||
|
||||
public FieldTphMMeth(c,d,e) {
|
||||
a = m(c,d,e);
|
||||
}
|
||||
|
||||
public m(b,d,e) {
|
||||
m(b,d,e) {
|
||||
if(e) {
|
||||
return m3(b);
|
||||
} else{
|
||||
@ -16,11 +16,11 @@ public class FieldTphMMeth {
|
||||
|
||||
}
|
||||
|
||||
public m2(b) {
|
||||
m2(b) {
|
||||
a = m3(b);
|
||||
}
|
||||
|
||||
public m3(b){
|
||||
m3(b){
|
||||
return b;
|
||||
}
|
||||
|
30
app/resources/bytecode/javFiles/For.jav
Normal file
30
app/resources/bytecode/javFiles/For.jav
Normal file
@ -0,0 +1,30 @@
|
||||
import java.lang.Integer;
|
||||
import java.lang.Boolean;
|
||||
|
||||
class For{
|
||||
Integer m(Integer x){
|
||||
var c = x + 2;
|
||||
// Boolean b = true;
|
||||
// c = 5;
|
||||
// c++;
|
||||
// ++c;
|
||||
// c--;
|
||||
// --c;
|
||||
// while(x<2){
|
||||
// x = x +1;
|
||||
// b = false;
|
||||
// }
|
||||
return c;
|
||||
// for(int i = 0;i<10;i++) {
|
||||
// x = x + 5;
|
||||
// }
|
||||
}
|
||||
|
||||
// m2(Integer x){
|
||||
// if(x<2) {
|
||||
// return 1;
|
||||
// }else {
|
||||
// return 2;
|
||||
// }
|
||||
// }
|
||||
}
|
6
app/resources/bytecode/javFiles/Generics2.jav
Normal file
6
app/resources/bytecode/javFiles/Generics2.jav
Normal file
@ -0,0 +1,6 @@
|
||||
class Generics2<B extends String>{
|
||||
<B extends Integer> B m1(B b){
|
||||
return b;
|
||||
}
|
||||
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
public class Id <FAU> {
|
||||
public class Id {
|
||||
// a;
|
||||
// id(b){
|
||||
// return b;
|
@ -10,10 +10,6 @@ public class Inf {
|
||||
w=y;
|
||||
y=a;
|
||||
b=a;
|
||||
var c;
|
||||
var d;
|
||||
c = v;
|
||||
d = v;
|
||||
}
|
||||
}
|
||||
|
||||
@ -29,27 +25,21 @@ TPH M m(TPH N x, TPH O y, TPH P a)({
|
||||
(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
|
||||
})::TPH U
|
||||
|
||||
Inf()({
|
||||
super(());
|
||||
})::TPH Z
|
||||
})::TPH X
|
||||
|
||||
}
|
||||
// c::U d::V
|
||||
// \ /
|
||||
// v::R w::S
|
||||
// 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)]]
|
||||
RESULT Final: [[(TPH O < TPH S), (TPH P < TPH O), (TPH O < TPH R), (TPH P < TPH T), (TPH M = void), (TPH N < TPH O), (TPH N < TPH Q)]]
|
||||
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: []
|
@ -2,18 +2,15 @@ import java.util.Vector;
|
||||
|
||||
import java.lang.Integer;
|
||||
import java.lang.String;
|
||||
import AA;
|
||||
import BB;
|
||||
import CC;
|
||||
import DD;
|
||||
|
||||
|
||||
public class Inherit {
|
||||
|
||||
public main(d, i) {
|
||||
main(d, i) {
|
||||
return d.m(i);
|
||||
}
|
||||
|
||||
public main(v, i) {
|
||||
main(v, i) {
|
||||
var aa = v.elementAt(0);
|
||||
return aa.m(i);
|
||||
}
|
@ -2,18 +2,15 @@ import java.util.Vector;
|
||||
|
||||
import java.lang.Integer;
|
||||
import java.lang.String;
|
||||
import AA;
|
||||
import BB;
|
||||
import CC;
|
||||
import DD;
|
||||
|
||||
|
||||
public class Inherit2 {
|
||||
|
||||
public main(d) {
|
||||
main(d) {
|
||||
return d.m2(d);
|
||||
}
|
||||
|
||||
public main(v) {
|
||||
main(v) {
|
||||
var aa = v.elementAt(0);
|
||||
return aa.m2(aa);
|
||||
}
|
9
app/resources/bytecode/javFiles/LamRunnable.jav
Normal file
9
app/resources/bytecode/javFiles/LamRunnable.jav
Normal file
@ -0,0 +1,9 @@
|
||||
public class LamRunnable{
|
||||
|
||||
public LamRunnable(){
|
||||
|
||||
Runnable lam = () -> {System.out.println("lambda");};
|
||||
lam.run();
|
||||
}
|
||||
}
|
||||
|
@ -2,7 +2,7 @@ import java.lang.Integer;
|
||||
|
||||
public class Lambda {
|
||||
|
||||
public m() {
|
||||
m () {
|
||||
var lam1 = (x) -> {
|
||||
return x;
|
||||
};
|
@ -4,52 +4,52 @@ import java.lang.Float;
|
||||
import java.lang.Double;
|
||||
|
||||
public class LessEqual {
|
||||
public lessEqual(Integer a, Integer b){
|
||||
lessEqual(Integer a, Integer b){
|
||||
var c = a<=b;
|
||||
return c;
|
||||
}
|
||||
|
||||
public lessEqual(Long a, Long b){
|
||||
lessEqual(Long a, Long b){
|
||||
var c = a<=b;
|
||||
return c;
|
||||
}
|
||||
|
||||
public lessEqual(Float a, Float b){
|
||||
lessEqual(Float a, Float b){
|
||||
var c = a<=b;
|
||||
return c;
|
||||
}
|
||||
|
||||
public lessEqual(Double a, Double b){
|
||||
lessEqual(Double a, Double b){
|
||||
var c = a<=b;
|
||||
return c;
|
||||
}
|
||||
|
||||
public lessEqual(Long a, Integer b){
|
||||
lessEqual(Long a, Integer b){
|
||||
var c = a<=b;
|
||||
return c;
|
||||
}
|
||||
|
||||
public lessEqual(Float a, Integer b){
|
||||
lessEqual(Float a, Integer b){
|
||||
var c = a<=b;
|
||||
return c;
|
||||
}
|
||||
|
||||
public lessEqual(Double a, Integer b){
|
||||
lessEqual(Double a, Integer b){
|
||||
var c = a<=b;
|
||||
return c;
|
||||
}
|
||||
|
||||
public lessEqual(Float a, Long b){
|
||||
lessEqual(Float a, Long b){
|
||||
var c = a<=b;
|
||||
return c;
|
||||
}
|
||||
|
||||
public lessEqual(Double a, Long b){
|
||||
lessEqual(Double a, Long b){
|
||||
var c = a<=b;
|
||||
return c;
|
||||
}
|
||||
|
||||
public lessEqual(Double a, Float b){
|
||||
lessEqual(Double a, Float b){
|
||||
var c = a<=b;
|
||||
return c;
|
||||
}
|
@ -5,52 +5,52 @@ import java.lang.Double;
|
||||
|
||||
public class LessThan {
|
||||
|
||||
public lessThan(Integer a, Integer b){
|
||||
lessThan(Integer a, Integer b){
|
||||
var c = a<b;
|
||||
return c;
|
||||
}
|
||||
|
||||
public lessThan(Long a, Long b){
|
||||
lessThan(Long a, Long b){
|
||||
var c = a<b;
|
||||
return c;
|
||||
}
|
||||
|
||||
public lessThan(Float a, Float b){
|
||||
lessThan(Float a, Float b){
|
||||
var c = a<b;
|
||||
return c;
|
||||
}
|
||||
|
||||
public lessThan(Double a, Double b){
|
||||
lessThan(Double a, Double b){
|
||||
var c = a<b;
|
||||
return c;
|
||||
}
|
||||
|
||||
public lessThan(Long a, Integer b){
|
||||
lessThan(Long a, Integer b){
|
||||
var c = a<b;
|
||||
return c;
|
||||
}
|
||||
|
||||
public lessThan(Float a, Integer b){
|
||||
lessThan(Float a, Integer b){
|
||||
var c = a<b;
|
||||
return c;
|
||||
}
|
||||
|
||||
public lessThan(Double a, Integer b){
|
||||
lessThan(Double a, Integer b){
|
||||
var c = a<b;
|
||||
return c;
|
||||
}
|
||||
|
||||
public lessThan(Float a, Long b){
|
||||
lessThan(Float a, Long b){
|
||||
var c = a<b;
|
||||
return c;
|
||||
}
|
||||
|
||||
public lessThan(Double a, Long b){
|
||||
lessThan(Double a, Long b){
|
||||
var c = a<b;
|
||||
return c;
|
||||
}
|
||||
|
||||
public lessThan(Double a, Float b){
|
||||
lessThan(Double a, Float b){
|
||||
var c = a<b;
|
||||
return c;
|
||||
}
|
@ -1,8 +1,6 @@
|
||||
import java.util.List;
|
||||
import java.util.AbstractList;
|
||||
import java.util.Vector;
|
||||
import java.lang.Integer;
|
||||
//import java.lang.Float;
|
||||
import java.lang.Float;
|
||||
//import java.lang.Byte;
|
||||
//import java.lang.Boolean;
|
||||
|
||||
@ -11,7 +9,7 @@ public class Matrix extends Vector<Vector<Integer>> {
|
||||
Matrix () {
|
||||
}
|
||||
|
||||
public Matrix(vv) {
|
||||
Matrix(vv) {
|
||||
Integer i;
|
||||
i = 0;
|
||||
while(i < vv.size()) {
|
||||
@ -21,7 +19,7 @@ public class Matrix extends Vector<Vector<Integer>> {
|
||||
}
|
||||
}
|
||||
|
||||
public mul(m) {
|
||||
mul(m) {
|
||||
var ret = new Matrix();
|
||||
var i = 0;
|
||||
while(i < size()) {
|
||||
@ -32,8 +30,8 @@ public class Matrix extends Vector<Vector<Integer>> {
|
||||
var erg = 0;
|
||||
var k = 0;
|
||||
while(k < v1.size()) {
|
||||
erg = erg + v1.get(k)
|
||||
* m.get(k).get(j);
|
||||
erg = erg + v1.elementAt(k)
|
||||
* m.elementAt(k).elementAt(j);
|
||||
k++; }
|
||||
// v2.addElement(new Integer(erg));
|
||||
v2.addElement(erg);
|
@ -8,7 +8,7 @@ public class MatrixOP extends Vector<Vector<Integer>> {
|
||||
MatrixOP () {
|
||||
}
|
||||
|
||||
public MatrixOP(vv) {
|
||||
MatrixOP(vv) {
|
||||
Integer i;
|
||||
i = 0;
|
||||
while(i < vv.size()) {
|
@ -2,16 +2,16 @@ import java.util.List;
|
||||
import java.lang.Integer;
|
||||
//import java.util.Collection;
|
||||
|
||||
public class Merge {
|
||||
class Merge {
|
||||
|
||||
public merge(a, b) {
|
||||
merge(a, b) {
|
||||
a.addAll(b);
|
||||
return a;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public sort(in){
|
||||
sort(in){
|
||||
var firstHalf = in.subList(1,2);
|
||||
var secondHalf = in.subList(1,2);
|
||||
return merge(sort(firstHalf), sort(secondHalf));
|
32
app/resources/bytecode/javFiles/OL.jav
Normal file
32
app/resources/bytecode/javFiles/OL.jav
Normal file
@ -0,0 +1,32 @@
|
||||
import java.lang.String;
|
||||
import java.lang.Integer;
|
||||
import java.lang.Double;
|
||||
import java.lang.Boolean;
|
||||
//import java.util.Vector;
|
||||
|
||||
|
||||
public class OL {
|
||||
|
||||
java.lang.Double m(java.lang.Double x) { return x + x; }
|
||||
java.lang.Integer m(java.lang.Integer x) { return x + x; }
|
||||
java.lang.String m(java.lang.String x) { return x + x; }
|
||||
java.lang.Boolean m(Boolean x) { return x; }
|
||||
|
||||
// if the class contains just this method, then correct BC will be generated.
|
||||
// But if another methods are contained then the generated BC is not correct
|
||||
// m(x) {
|
||||
// //x.add(1);
|
||||
// x.addAll(x);
|
||||
// return x;
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
public class OLMain {
|
||||
|
||||
main(x) {
|
||||
var ol;
|
||||
ol = new OL();
|
||||
return ol.m(x);
|
||||
}
|
||||
}
|
@ -9,11 +9,5 @@ public class OLFun {
|
||||
//f = x -> {return x + x;};
|
||||
m(f, x) {
|
||||
x = f.apply(x+x);
|
||||
return x;
|
||||
}
|
||||
|
||||
m2(y) {
|
||||
m(x -> x * 2, y);
|
||||
return;
|
||||
}
|
||||
}
|
@ -8,6 +8,6 @@ public class OLFun2 {
|
||||
|
||||
x;
|
||||
m(f){
|
||||
x = f.apply(x + x);
|
||||
x = f.apply(x + x)
|
||||
}
|
||||
}
|
@ -1,17 +1,11 @@
|
||||
import java.lang.Integer;
|
||||
import java.lang.Double;
|
||||
import java.lang.String;
|
||||
|
||||
public class Op2 {
|
||||
public m(){
|
||||
m(){
|
||||
var x = "";
|
||||
var a = 5+x;
|
||||
|
||||
Integer x = 10;
|
||||
Double y = 10.5;
|
||||
|
||||
var a = x - y;
|
||||
|
||||
|
||||
return a;
|
||||
}
|
||||
}
|
@ -2,17 +2,17 @@ import java.lang.String;
|
||||
|
||||
public class Overloading{
|
||||
|
||||
public test(x){
|
||||
test(x){
|
||||
return x.methode();
|
||||
}
|
||||
|
||||
public methode(){
|
||||
methode(){
|
||||
return "Overloading";
|
||||
}
|
||||
}
|
||||
|
||||
public class Overloading2{
|
||||
public methode(){
|
||||
methode(){
|
||||
return "Overloading2";
|
||||
}
|
||||
}
|
@ -3,7 +3,7 @@ import java.lang.String;
|
||||
|
||||
public class Plus {
|
||||
|
||||
public m(a,b) {
|
||||
m(a,b) {
|
||||
return a+b;
|
||||
}
|
||||
}
|
@ -1,25 +1,25 @@
|
||||
import java.lang.Integer;
|
||||
|
||||
public class PostIncDec {
|
||||
public m() {
|
||||
m() {
|
||||
var i = 0;
|
||||
i++;
|
||||
return i;
|
||||
}
|
||||
|
||||
public m2() {
|
||||
m2() {
|
||||
var i = 0;
|
||||
var j = i++;
|
||||
return j;
|
||||
}
|
||||
|
||||
public d() {
|
||||
d() {
|
||||
var i = 0;
|
||||
i--;
|
||||
return i;
|
||||
}
|
||||
|
||||
public d2() {
|
||||
d2() {
|
||||
var i = 0;
|
||||
var j = i--;
|
||||
return j;
|
@ -1,25 +1,25 @@
|
||||
import java.lang.Integer;
|
||||
|
||||
public class PreInc {
|
||||
public m() {
|
||||
m() {
|
||||
var i = 0;
|
||||
++i;
|
||||
return i;
|
||||
}
|
||||
|
||||
public m2() {
|
||||
m2() {
|
||||
var i = 0;
|
||||
var j = ++i;
|
||||
return j;
|
||||
}
|
||||
|
||||
public d() {
|
||||
d() {
|
||||
var i = 0;
|
||||
--i;
|
||||
return i;
|
||||
}
|
||||
|
||||
public d2() {
|
||||
d2() {
|
||||
var i = 0;
|
||||
var j = --i;
|
||||
return j;
|
@ -3,16 +3,16 @@ import java.util.Stack;
|
||||
|
||||
public class Put {
|
||||
|
||||
public putElement(ele, v) {
|
||||
putElement(ele, v) {
|
||||
v.addElement(ele);
|
||||
}
|
||||
|
||||
public putElement(ele, s) {
|
||||
putElement(ele, s) {
|
||||
s.push(ele);
|
||||
}
|
||||
|
||||
|
||||
public main(ele, x) {
|
||||
main(ele, x) {
|
||||
putElement(ele, x);
|
||||
}
|
||||
|
@ -2,7 +2,7 @@ import java.lang.Integer;
|
||||
import java.lang.Boolean;
|
||||
|
||||
public class RelOps {
|
||||
public m(a,b){
|
||||
m(a,b){
|
||||
return a<b;
|
||||
}
|
||||
}
|
@ -1,6 +1,6 @@
|
||||
public class SimpleCycle {
|
||||
|
||||
m(){
|
||||
m(a,b,d){
|
||||
var g;
|
||||
var h;
|
||||
g = h;
|
@ -1,11 +1,11 @@
|
||||
public class Tph {
|
||||
|
||||
public m(a,b){
|
||||
m(a,b){
|
||||
var c = m2(b);
|
||||
return a;
|
||||
}
|
||||
|
||||
public m2(b){
|
||||
m2(b){
|
||||
return b;
|
||||
}
|
||||
}
|
18
app/resources/bytecode/javFiles/Tph2.jav
Normal file
18
app/resources/bytecode/javFiles/Tph2.jav
Normal file
@ -0,0 +1,18 @@
|
||||
public class Tph2 {
|
||||
id = x->x;
|
||||
id3 (x) {
|
||||
return id.apply(x);
|
||||
}
|
||||
|
||||
/*
|
||||
m(a,b){
|
||||
var c = m2(a,b);
|
||||
//m2(a,b);
|
||||
return a;
|
||||
}
|
||||
|
||||
m2(a,b){
|
||||
return b;
|
||||
}
|
||||
*/
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user