Change BigRefactoring to Gradle build

This commit is contained in:
JanUlrich 2023-01-10 14:22:05 +01:00
commit 2edb23f2d8
605 changed files with 43716 additions and 0 deletions

9
.gitattributes vendored Normal file
View 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

40
.gitignore vendored Normal file
View File

@ -0,0 +1,40 @@
CVS
bin
*.class
*.log
# Mobile Tools for Java (J2ME)
.mtj.tmp/
# Package Files #
*.jar
*.war
*.ear
# IDEs
.classpath
*.iml
.idea/
/target/
.DS_Store
.project
.settings/
/target/
#
manually/
logFiles/**
!logFiles/.gitkeep
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

BIN
app/.build.gradle.kts.swp Normal file

Binary file not shown.

53
app/build.gradle.kts Normal file
View 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")
}

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

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

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

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

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

View File

@ -0,0 +1,9 @@
class Generics {
a;
id(b) { return b; }
setA(x) {
a = x;
return a;
}
m(x,y) { x = id(y); }
}

View File

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

View File

@ -0,0 +1,9 @@
import java.util.Stack;
import java.util.Vector;
class OverloadingMain {
mmMain(x) { var y; return new O1().mm(y); }
}

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

View 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)]]
*/

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

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

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

View 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"; }
}

View File

@ -0,0 +1,30 @@
import java.lang.Integer;
import java.lang.Boolean;
import java.lang.String;
import java.lang.Byte;
import java.lang.Short;
import java.lang.Long;
import java.lang.Float;
import java.lang.Double;
import java.lang.Character;
class AssignToLit {
void m(){
// String s = "Test";
// Boolean b = false;
// Byte byte1 = 5;
// Byte byte2 = 55;
// Short short1 = 5;
// Short short2 = 55;
// Integer int1 = 5;
// Integer int2 = 8888888;
// Long long1 = 1;
// Long long2 = 5;
// Long long3 = 89989898;
// Float float1 = 1;
// Float float2 = 55;
// Double d1 = 1;
// Double d2 = 55;
Character c = 'A';
}
}

View File

@ -0,0 +1,3 @@
import java.lang.Integer;
public class BB extends AA { }

View File

@ -0,0 +1,17 @@
import java.lang.Integer;
import java.lang.Double;
public class BinaryInMeth {
m(a){
return ++a;
}
m2(a,b){
return m(a+b);
}
m3(a) {
return m(++a);
}
}

View File

@ -0,0 +1,11 @@
import java.lang.Integer;
import java.lang.String;
public class CC extends BB {
m(Integer i) {
return "CC";
}
m2(CC x) { return "CC"; }
}

View File

@ -0,0 +1,8 @@
import java.lang.Integer;
public class ClassGenLam {
lam = x-> x;
// public ClassGenLam() {
// lam = x->x;
// }
}

View File

@ -0,0 +1,6 @@
class Cycle {
m(x, y) {
y = x;
x = y;
}
}

View File

@ -0,0 +1,4 @@
import java.lang.Integer;
public class DD extends CC { }

View File

@ -0,0 +1,11 @@
public class DuMethod{
method(a){
return a+a;
}
method(a){
return a;
}
}

View File

@ -0,0 +1,8 @@
public class EmptyMethod{
public void m1(){
System.out.println("test");
}
public void m2(){}
}

View File

@ -0,0 +1,9 @@
import java.lang.String;
public class Example {
public m() {
String x = "X";
return x;
}
}

View File

@ -0,0 +1,3 @@
public class Exceptions {
// m(Integer i) throws
}

View File

@ -0,0 +1,15 @@
import java.lang.Integer;
//import java.lang.Double;
public class Fac {
getFac(n){
var res = 1;
var i = 1;
while(i<=n) {
res = res * i;
i++;
}
return res;
}
}

View File

@ -0,0 +1,52 @@
import java.lang.Integer;
//import java.lang.Long;
//import java.lang.Short;
public class Faculty {
public fact;
Faculty() {
fact = (x) -> {
if (x == 1) {
return 1;
}
else {
return x * (fact.apply(x-1));
}
};
}
public getFact(x) {
return fact.apply(x);
}
}
// m (x) {
//
//// var fact = (x) -> {
//// if (x == 1) {
//// return x;
//// }
//// else {
//// return x * (fact.apply(x-1));
//// }
//// };
//// return fact;
//// var x = 13;
//// if(x>22) {
//// return 0;
//// }else if(x <1){
//// return x;
//// }else {
//// return 1;
//// }
//
// if (x < 0) {
// return 0;
// }else if(x<2) {
// return x;
// } else {
// return x * m(x-1);
// }
// }
//}

View File

@ -0,0 +1,10 @@
class Faculty2 {
m () {
var fact = (Integer x) -> {
return x;
};
return fact;
}
}

View File

@ -0,0 +1,9 @@
import java.lang.Integer;
public class Field {
public x = 5;
m(){
return x;
}
}

View File

@ -0,0 +1,4 @@
public class FieldTph {
a;
}

View File

@ -0,0 +1,12 @@
public class FieldTph2 {
a;
m(b){
b = a;
return b;
}
m2(c){
a = c;
}
}

View File

@ -0,0 +1,26 @@
public class FieldTphConsMeth {
a;
public FieldTphConsMeth(c) {
a = id(c);
}
id(b) {
return b;
}
setA(x) {
a = x;
return a;
}
m(x,y) {
x = id(y);
}
/*m2(x,y) {
x = setA(y);
return x;
}*/
}

View File

@ -0,0 +1,27 @@
import java.lang.Boolean;
public class FieldTphMMeth {
a;
public FieldTphMMeth(c,d,e) {
a = m(c,d,e);
}
m(b,d,e) {
if(e) {
return m3(b);
} else{
return m3(d);
}
}
m2(b) {
a = m3(b);
}
m3(b){
return b;
}
}

View 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;
// }
// }
}

View File

@ -0,0 +1,12 @@
import java.util.Vector;
import java.lang.Integer;
import java.lang.String;
//import java.lang.Byte;
//import java.lang.Boolean;
public class FunOL {
add(f, y) {
return f.apply() + y;
}
}

View File

@ -0,0 +1,8 @@
import java.lang.Integer;
import java.util.Vector;
public class Gen{
Vector<Integer> m(Vector<Integer> v){
return v;
}
}

View File

@ -0,0 +1,17 @@
class Generics<B> {
Generics(B b){
}
B mt1(B b){
return mt1(b);
}
}
/*
Problem:
auto test = new List<String>();
auto test2 = new List<Integer>();
... //code, welcher möglicherweise test und test2 vertauscht
test.add("hallo");
*/

View File

@ -0,0 +1,6 @@
class Generics2<B extends String>{
<B extends Integer> B m1(B b){
return b;
}
}

View File

@ -0,0 +1,57 @@
import java.lang.Integer;
import java.lang.Long;
import java.lang.Float;
import java.lang.Double;
public class GreaterEqual {
gE(Integer a, Integer b){
var c = a>=b;
return c;
}
gE(Long a, Long b){
var c = a>=b;
return c;
}
gE(Float a, Float b){
var c = a>=b;
return c;
}
gE(Double a, Double b){
var c = a>=b;
return c;
}
gE(Long a, Integer b){
var c = a>=b;
return c;
}
gE(Float a, Integer b){
var c = a>=b;
return c;
}
gE(Double a, Integer b){
var c = a>=b;
return c;
}
gE(Float a, Long b){
var c = a>=b;
return c;
}
gE(Double a, Long b){
var c = a>=b;
return c;
}
gE(Double a, Float b){
var c = a>=b;
return c;
}
}

View File

@ -0,0 +1,56 @@
import java.lang.Integer;
import java.lang.Long;
import java.lang.Float;
import java.lang.Double;
public class GreaterThan {
gT(Integer a, Integer b){
var c = a>b;
return c;
}
gT(Long a, Long b){
var c = a>b;
return c;
}
gT(Float a, Float b){
var c = a>b;
return c;
}
gT(Double a, Double b){
var c = a>b;
return c;
}
gT(Long a, Integer b){
var c = a>b;
return c;
}
gT(Float a, Integer b){
var c = a>b;
return c;
}
gT(Double a, Integer b){
var c = a>b;
return c;
}
gT(Float a, Long b){
var c = a>b;
return c;
}
gT(Double a, Long b){
var c = a>b;
return c;
}
gT(Double a, Float b){
var c = a>b;
return c;
}
}

View File

@ -0,0 +1,20 @@
public class Id {
// a;
// id(b){
// return b;
// }
id2 = x -> x;
// id2 = () -> {
// var x = m(a);
// var y = x;
// var z = y;
// };
//
// m(a){
// return a;
// }
id3 (x) {
return id2.apply(x);
}
}

View File

@ -0,0 +1,15 @@
import java.lang.Integer;
import java.lang.Boolean;
import java.lang.String;
public class IfTest{
Integer m1(Boolean b) {
Integer i;
String b;
if(b) {
return i;
}else{
return b;
}
}
}

View File

@ -0,0 +1,8 @@
import java.util.Vector;
class Import {
void methode(){
Vector v = new Vector<>();
v.add("X");
}
}

View File

@ -0,0 +1,55 @@
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;
}
}
/*
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;
return;
})::TPH U
Inf()({
super(());
})::TPH X
}
// v::R w::S
// \ /
// z::Q y::O b::T
// \ / \ /
// x::N a::P
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: []
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:
*/

View File

@ -0,0 +1,6 @@
class Infimum {
m(x, y, z) {
y = x;
z = x;
}
}

View File

@ -0,0 +1,18 @@
import java.util.Vector;
import java.lang.Integer;
import java.lang.String;
public class Inherit {
main(d, i) {
return d.m(i);
}
main(v, i) {
var aa = v.elementAt(0);
return aa.m(i);
}
}

View File

@ -0,0 +1,17 @@
import java.util.Vector;
import java.lang.Integer;
import java.lang.String;
public class Inherit2 {
main(d) {
return d.m2(d);
}
main(v) {
var aa = v.elementAt(0);
return aa.m2(aa);
}
}

View File

@ -0,0 +1,3 @@
public interface Interface1{
public void test();
}

View File

@ -0,0 +1,13 @@
public class KompTph {
public m(a, b, c) {
var d = a;
var e = a;
a = b;
c = b;
m2(a,c);
}
public m2(a,b){
m(a,a,b);
}
}

View File

@ -0,0 +1,9 @@
public class LamRunnable{
public LamRunnable(){
Runnable lam = () -> {System.out.println("lambda");};
lam.run();
}
}

View File

@ -0,0 +1,11 @@
import java.lang.Integer;
public class Lambda {
m () {
var lam1 = (x) -> {
return x;
};
return lam1;
}
}

View File

@ -0,0 +1,35 @@
import java.lang.String;
public class Lambda2
{
public static void main(List<String> args){
var listOfStrings = new List<String>();
var listOfObjects;
listOfObjects = map(listOfStrings, (a) -> a);
}
public map(a , b){
b.apply(a);
return a;
}
/*
public static <I,O> List<O> map(List<I> input, Function<I,O> func) {
List<O> output;
output = new List<O>();
output.add(func.apply(input.get()));
return output;
}
*/
}
class List<A>{
/* A get();
void add(A);
*/
}
/*
class Function<A,B>{
B apply(A a);
}
*/

View File

@ -0,0 +1,23 @@
public class Lambda2
{
/*
public static <A> List<A> map(List<? extends A> input,
Function<? super A, ? extends A> func){
input.add(func.apply(input.get()));
}
*/
public map(input,func){
input.add(func.apply(input.get()));
return map(new List<String>(), func);
}
}
class List<A>{
A get();
void add(A);
}
class Function<A,B>{
B apply(A a);
}

View File

@ -0,0 +1,18 @@
class Lambda{
methode(){
return ((f) -> f);
}
}
/*
interface Fun0<A>{
A apply();
}
interface Fun1<A,B>{
A apply(B b);
}
*/
interface Fun2<A,B,C>{
A apply(B b, C c);
}

View File

@ -0,0 +1,12 @@
import java.lang.Integer;
public class LambdaCapture {
Integer i = 8;
f;
public LambdaCapture(){
Integer w = 7;
f = j ->{
return w+i;};
}
}

View File

@ -0,0 +1,9 @@
import java.lang.Integer;
public class Lambda {
m () {
var lam1 = (x) -> { };
return lam1;
}
}

View File

@ -0,0 +1,56 @@
import java.lang.Integer;
import java.lang.Long;
import java.lang.Float;
import java.lang.Double;
public class LessEqual {
lessEqual(Integer a, Integer b){
var c = a<=b;
return c;
}
lessEqual(Long a, Long b){
var c = a<=b;
return c;
}
lessEqual(Float a, Float b){
var c = a<=b;
return c;
}
lessEqual(Double a, Double b){
var c = a<=b;
return c;
}
lessEqual(Long a, Integer b){
var c = a<=b;
return c;
}
lessEqual(Float a, Integer b){
var c = a<=b;
return c;
}
lessEqual(Double a, Integer b){
var c = a<=b;
return c;
}
lessEqual(Float a, Long b){
var c = a<=b;
return c;
}
lessEqual(Double a, Long b){
var c = a<=b;
return c;
}
lessEqual(Double a, Float b){
var c = a<=b;
return c;
}
}

View File

@ -0,0 +1,57 @@
import java.lang.Integer;
import java.lang.Long;
import java.lang.Float;
import java.lang.Double;
public class LessThan {
lessThan(Integer a, Integer b){
var c = a<b;
return c;
}
lessThan(Long a, Long b){
var c = a<b;
return c;
}
lessThan(Float a, Float b){
var c = a<b;
return c;
}
lessThan(Double a, Double b){
var c = a<b;
return c;
}
lessThan(Long a, Integer b){
var c = a<b;
return c;
}
lessThan(Float a, Integer b){
var c = a<b;
return c;
}
lessThan(Double a, Integer b){
var c = a<b;
return c;
}
lessThan(Float a, Long b){
var c = a<b;
return c;
}
lessThan(Double a, Long b){
var c = a<b;
return c;
}
lessThan(Double a, Float b){
var c = a<b;
return c;
}
}

View File

@ -0,0 +1,44 @@
import java.util.Vector;
import java.lang.Integer;
import java.lang.Float;
//import java.lang.Byte;
//import java.lang.Boolean;
public class Matrix extends Vector<Vector<Integer>> {
Matrix () {
}
Matrix(vv) {
Integer i;
i = 0;
while(i < vv.size()) {
// Boolean a = this.add(vv.elementAt(i));
this.add(vv.elementAt(i));
i=i+1;
}
}
mul(m) {
var ret = new Matrix();
var i = 0;
while(i < size()) {
var v1 = this.elementAt(i);
var v2 = new Vector<Integer>();
var j = 0;
while(j < v1.size()) {
var erg = 0;
var k = 0;
while(k < v1.size()) {
erg = erg + v1.elementAt(k)
* m.elementAt(k).elementAt(j);
k++; }
// v2.addElement(new Integer(erg));
v2.addElement(erg);
j++; }
ret.addElement(v2);
i++;
}
return ret;
}
}

View File

@ -0,0 +1,43 @@
import java.util.Vector;
import java.lang.Integer;
//import java.lang.Byte;
import java.lang.Boolean;
public class MatrixOP extends Vector<Vector<Integer>> {
MatrixOP () {
}
MatrixOP(vv) {
Integer i;
i = 0;
while(i < vv.size()) {
// Boolean a = this.add(vv.elementAt(i));
this.add(vv.elementAt(i));
i=i+1;
}
}
public mul = (m1, m2) -> {
var ret = new MatrixOP();
var i = 0;
while(i < m1.size()) {
var v1 = m1.elementAt(i);
var v2 = new Vector<Integer>();
var j = 0;
while(j < v1.size()) {
var erg = 0;
var k = 0;
while(k < v1.size()) {
erg = erg + v1.elementAt(k)
* m2.elementAt(k).elementAt(j);
k++; }
// v2.addElement(new Integer(erg));
v2.addElement(erg);
j++; }
ret.addElement(v2);
i++;
}
return ret;
};
}

View File

@ -0,0 +1,20 @@
import java.util.List;
import java.lang.Integer;
//import java.util.Collection;
class Merge {
merge(a, b) {
a.addAll(b);
return a;
}
sort(in){
var firstHalf = in.subList(1,2);
var secondHalf = in.subList(1,2);
return merge(sort(firstHalf), sort(secondHalf));
}
}

View File

@ -0,0 +1,14 @@
import java.lang.Integer;
class Methods {
m(a,b){
var c=a+b;
return c;
}
method2(x){
Integer i = this.m(x,2);
return i;
}
}

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

View File

@ -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 OLFun {
//f = x -> {return x + x;};
m(f, x) {
x = f.apply(x+x);
}
}

View File

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

View File

@ -0,0 +1,16 @@
import java.lang.Integer;
import java.lang.String;
import java.lang.Long;
import java.lang.Float;
import java.lang.Double;
import java.lang.Boolean;
import java.lang.Short;
import java.lang.Byte;
public class Op {
m(a, b) {
//var c = a+b;
return a+b;
}
}

View File

@ -0,0 +1,11 @@
import java.lang.Integer;
import java.lang.String;
public class Op2 {
m(){
var x = "";
var a = 5+x;
return a;
}
}

View File

@ -0,0 +1,11 @@
import java.util.Vector;
class OverlaodGen {
void method(Vector<Integer> v) {
// Integer i = v.get(0);
}
void method(Vector<String> v) {
// String s = v.get(0);
}
}

View File

@ -0,0 +1,18 @@
import java.lang.String;
public class Overloading{
test(x){
return x.methode();
}
methode(){
return "Overloading";
}
}
public class Overloading2{
methode(){
return "Overloading2";
}
}

View File

@ -0,0 +1,9 @@
import java.lang.Integer;
import java.lang.String;
public class Plus {
m(a,b) {
return a+b;
}
}

View File

@ -0,0 +1,27 @@
import java.lang.Integer;
public class PostIncDec {
m() {
var i = 0;
i++;
return i;
}
m2() {
var i = 0;
var j = i++;
return j;
}
d() {
var i = 0;
i--;
return i;
}
d2() {
var i = 0;
var j = i--;
return j;
}
}

View File

@ -0,0 +1,28 @@
import java.lang.Integer;
public class PreInc {
m() {
var i = 0;
++i;
return i;
}
m2() {
var i = 0;
var j = ++i;
return j;
}
d() {
var i = 0;
--i;
return i;
}
d2() {
var i = 0;
var j = --i;
return j;
}
}

View File

@ -0,0 +1,19 @@
import java.util.Vector;
import java.util.Stack;
public 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,5 @@
public class RecursiveMeth{
public Integer test(){
return this.test();
}
}

View File

@ -0,0 +1,8 @@
import java.lang.Integer;
import java.lang.Boolean;
public class RelOps {
m(a,b){
return a<b;
}
}

View File

@ -0,0 +1,6 @@
class ReturnMethod{
Integer r;
Integer mul(Integer x, Integer y) {
return r;
}
}

View File

@ -0,0 +1,25 @@
public class SimpleCycle {
m(a,b,d){
var g;
var h;
g = h;
h = g;
/*
var y;
var z;
y=z;
z=y;
var j = z;
var x;
b = a;
var c = b;
var f = d;
b = x;
var l = c;
a = l;
*/
}
}

View File

@ -0,0 +1,23 @@
import java.util.List;
import java.util.ArrayList;
import java.lang.String;
public class Sorting{
merge(a, b){
a.addAll(b);
return a;
}
sort(in){
var firstHalf = in;
var secondHalf = in;
return merge(sort(firstHalf), sort(secondHalf));
}
/*
void sort(a){
a = merge(a,a);
}
*/
}

View File

@ -0,0 +1,10 @@
public class StaticM {
public static void m() {
System.out.println("Test");
}
public static void m2() {
m();
}
}

View File

@ -0,0 +1,13 @@
import java.util.Vector;
import java.lang.Integer;
public class Matrix2 extends Vector<Integer> {
}
public class SubMatrix extends Matrix2 {
m(){
Vector<Integer> v = new Vector<Integer>();
v.add(1);
}
}

View File

@ -0,0 +1,11 @@
public class Tph {
m(a,b){
var c = m2(b);
return a;
}
m2(b){
return b;
}
}

View 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;
}
*/
}

View File

@ -0,0 +1,14 @@
public class Tph3 {
// m(a,b){
// var c = m2(a,b);
// return c;
// }
//
// m2(a,b){
// return m(a,b);
// }
m1(x, y) { m2(x); x = y;
}
m2(y) { m1(y, y); }
}

View File

@ -0,0 +1,12 @@
public class Tph4{
m(a,b){
var c = m2(b);
var d = m2(c);
return d;
}
m2(b){
return b;
}
}

View File

@ -0,0 +1,13 @@
public class Tph5 {
// m(a,b,c){
// a = c;
// b = c;
// return a;
// }
m(x,y){
x = m2(y);
}
m2(y) { return y; }
}

View File

@ -0,0 +1,14 @@
public class Tph6 {
// m(a,b,c){
// a = c;
// b = c;
// return a;
// }
m(x,y){
var c = m2(y);
c = m2(x);
}
m2(y) { return y; }
}

View File

@ -0,0 +1,11 @@
public class Tph7 {
m(a,b){
var c = m2(b);
return m2(b);
}
m2(b){
return b;
}
}

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