diff --git a/bin/mycompiler/test/generics/TestAssignmentTwoGenericTypesNegative.jav b/bin/mycompiler/test/generics/TestAssignmentTwoGenericTypesNegative.jav deleted file mode 100755 index 160126b58..000000000 --- a/bin/mycompiler/test/generics/TestAssignmentTwoGenericTypesNegative.jav +++ /dev/null @@ -1,12 +0,0 @@ -import java.util.ArrayList; - -public class TestAssignmentTwoGenericTypesNegative { - - public void m() { - - ArrayList ls; - ls = new ArrayList(); - ArrayList lo; - lo = ls; /*<-- compile error*/ - } -} \ No newline at end of file diff --git a/bin/mycompiler/test/generics/TestClassesWithBoundedGenericsOfTwoTypes.jav b/bin/mycompiler/test/generics/TestClassesWithBoundedGenericsOfTwoTypes.jav deleted file mode 100755 index aec3e2351..000000000 --- a/bin/mycompiler/test/generics/TestClassesWithBoundedGenericsOfTwoTypes.jav +++ /dev/null @@ -1,17 +0,0 @@ -interface I1 {} - -interface I2 {} - -class Implementation implements I1 {} - -class Implementation2 implements I2 {} - -class A {} - -class B{} - -class C{} - -class D{} - -class E{} \ No newline at end of file diff --git a/bin/mycompiler/test/generics/TestClassesWithBoundedGenericsUsedInMethods.jav b/bin/mycompiler/test/generics/TestClassesWithBoundedGenericsUsedInMethods.jav deleted file mode 100755 index b5a53fc73..000000000 --- a/bin/mycompiler/test/generics/TestClassesWithBoundedGenericsUsedInMethods.jav +++ /dev/null @@ -1,21 +0,0 @@ -interface I1 { - public m1(); -} - -class Implementation implements I1 { - public m1() { - } -} - -class TestClassesWithBoundedGenericsUsedInMethods { - - /*since S is at least of Type I1, call m1() should work*/ - public void m3 (S x) { - x.m1(); - } - - /*T is bounded by class generics, thus always at least of type I1*/ - public m2(T x) { - x.m1(); - } -} \ No newline at end of file diff --git a/bin/mycompiler/test/generics/TestExtendedClassesWithBoundedGenerics.jav b/bin/mycompiler/test/generics/TestExtendedClassesWithBoundedGenerics.jav deleted file mode 100755 index 9e98bb177..000000000 --- a/bin/mycompiler/test/generics/TestExtendedClassesWithBoundedGenerics.jav +++ /dev/null @@ -1,34 +0,0 @@ -interface I1 { - public m1(); -} - -interface I2 { - public m2(); -} - -class Implementation implements I1, I2 { - public m1() {} - - public m2() {} -} - -class Tester { - - public m3(T x) { - x.m1(); - x.m2(); - } -} - -public class TestExtendedClassesWithBoundedGenerics { - - public m() { - x; - /*can only be of Type Implementation*/ - x= new Implementation(); - y; - /*could be of Type: Tester, Tester*/ - y= new Tester(); - y.m3(x); - } -} \ No newline at end of file diff --git a/bin/mycompiler/test/generics/TestNestedGenerics.jav b/bin/mycompiler/test/generics/TestNestedGenerics.jav deleted file mode 100755 index 1b34d70c4..000000000 --- a/bin/mycompiler/test/generics/TestNestedGenerics.jav +++ /dev/null @@ -1,14 +0,0 @@ -class A{ - -} - -public class TestNestedGenerics{ - ,C> void foo(T a,C b){} - - void m(){ - TestNestedGenerics t = new TestNestedGenerics(); - String str = new String(); - A a = new A(); - t.foo(a,str); - } -} \ No newline at end of file diff --git a/bin/mycompiler/test/generics/TestNestedGenericsNonExistingType.jav b/bin/mycompiler/test/generics/TestNestedGenericsNonExistingType.jav deleted file mode 100755 index 428cdda4c..000000000 --- a/bin/mycompiler/test/generics/TestNestedGenericsNonExistingType.jav +++ /dev/null @@ -1,6 +0,0 @@ - -public class TestNestedGenerics{ - - ,C> void foo(T a,C b){} - -} \ No newline at end of file diff --git a/bin/mycompiler/test/generics/TestSimpleClassesWithBoundedGenerics.jav b/bin/mycompiler/test/generics/TestSimpleClassesWithBoundedGenerics.jav deleted file mode 100755 index 622a50079..000000000 --- a/bin/mycompiler/test/generics/TestSimpleClassesWithBoundedGenerics.jav +++ /dev/null @@ -1,30 +0,0 @@ -import java.util.Vector; -import java.util.HashMap; - -public class TestSimpleClassesWithBoundedGenerics { - - public ma(T x) { - return x; - } -} - -class A { - - public m1() { - x; - x= new TestSimpleClassesWithBoundedGenerics(); - return x.ma(3); - } - - public m2() { - x; - x = new TestSimpleClassesWithBoundedGenerics(); - } -/* - public m2() { - x; - x= new TestSimpleClassesWithBoundedGenerics(); - return x.m(new Double(3.)); - } -*/ -} \ No newline at end of file diff --git a/bin/mycompiler/test/generics/TestSimpleClassesWithBoundedGenericsNegative.jav b/bin/mycompiler/test/generics/TestSimpleClassesWithBoundedGenericsNegative.jav deleted file mode 100755 index 19ef124c3..000000000 --- a/bin/mycompiler/test/generics/TestSimpleClassesWithBoundedGenericsNegative.jav +++ /dev/null @@ -1,17 +0,0 @@ - -public class TestSimpleClassesWithBoundedGenericsNegative { - - public m(T x) { - return x; - } - -} - -class A { - public m1() { - x; - x = new TestSimpleClassesWithBoundedGenericsNegative(); - return x.m("abc"); - - } -} \ No newline at end of file diff --git a/bin/mycompiler/test/generics/TestSimpleClassesWithGenerics.jav b/bin/mycompiler/test/generics/TestSimpleClassesWithGenerics.jav deleted file mode 100755 index 359b9a522..000000000 --- a/bin/mycompiler/test/generics/TestSimpleClassesWithGenerics.jav +++ /dev/null @@ -1,17 +0,0 @@ -public class TestSimpleClassesWithGenerics { - - public m(T x) { - return x; - } - -} - -class A { - - public method() { - x; - x= new TestSimpleClassesWithGenerics(); - return x.m(3); - } - -} \ No newline at end of file diff --git a/bin/mycompiler/test/generics/TestSimpleClassesWithGenericsNegative.jav b/bin/mycompiler/test/generics/TestSimpleClassesWithGenericsNegative.jav deleted file mode 100755 index 938ea5044..000000000 --- a/bin/mycompiler/test/generics/TestSimpleClassesWithGenericsNegative.jav +++ /dev/null @@ -1,17 +0,0 @@ -public class TestSimpleClassesWithGenericsNegative { - - public m(T x) { - return x; - } - -} - -class A { - - public method() { - x; - x= new TestSimpleClassesWithGenerics(); - return x.m("abc"); - } - -} \ No newline at end of file diff --git a/bin/mycompiler/test/inferenceByCharacteristic/TestInferenceOwnTypeByMember.jav b/bin/mycompiler/test/inferenceByCharacteristic/TestInferenceOwnTypeByMember.jav deleted file mode 100755 index d6b39b878..000000000 --- a/bin/mycompiler/test/inferenceByCharacteristic/TestInferenceOwnTypeByMember.jav +++ /dev/null @@ -1,16 +0,0 @@ -public class TestInferenceOwnTypeByMember { - - Float a; - - public void m1(b) { - a += b; - } - - public void m2(a) { - this.a=a; - } - - public m3() { - return a; - } -} \ No newline at end of file diff --git a/bin/mycompiler/test/inferenceByCharacteristic/TestInferenceOwnTypeByMemberAcrossClasses.jav b/bin/mycompiler/test/inferenceByCharacteristic/TestInferenceOwnTypeByMemberAcrossClasses.jav deleted file mode 100755 index c595b224b..000000000 --- a/bin/mycompiler/test/inferenceByCharacteristic/TestInferenceOwnTypeByMemberAcrossClasses.jav +++ /dev/null @@ -1,14 +0,0 @@ -class A { - - public Character c; - -} - -public class TestInferenceOwnTypeByMemberAcrossClasses { - - public m1(a) { - x; - x = new A(); - a=x.c; - } -} \ No newline at end of file diff --git a/bin/mycompiler/test/inferenceByCharacteristic/TestInferenceOwnTypeByMethodCall.jav b/bin/mycompiler/test/inferenceByCharacteristic/TestInferenceOwnTypeByMethodCall.jav deleted file mode 100755 index fc3ca3d2e..000000000 --- a/bin/mycompiler/test/inferenceByCharacteristic/TestInferenceOwnTypeByMethodCall.jav +++ /dev/null @@ -1,32 +0,0 @@ -public class TestInferenceOwnTypeByMethodCall{ - - public m1(a) { - return a; - } - - public Integer m2(a) { - return a; - } - - public m3(a) { - return a; - } - - - - public void m01(d) { - e; - e=m1(d); - } - - public void m02(d) { - e; - e=m2(d); - } - - public void m03(c,Character d) { - e; - e=c.m3(d); - } - - } \ No newline at end of file diff --git a/bin/mycompiler/test/inferenceByCharacteristic/TestInferenceOwnTypeByMethodCallAcrossClasses.jav b/bin/mycompiler/test/inferenceByCharacteristic/TestInferenceOwnTypeByMethodCallAcrossClasses.jav deleted file mode 100755 index 4bb4bcce8..000000000 --- a/bin/mycompiler/test/inferenceByCharacteristic/TestInferenceOwnTypeByMethodCallAcrossClasses.jav +++ /dev/null @@ -1,18 +0,0 @@ -class A{ - public mA(x){ - return(x); - } -} - -class TestInferenceOwnTypeByMethodCallAcrossClasses{ - - public m(Integer a, String b){ - x; - x=new A(); - c; - c=x.mA(a); - d; - d=x.mA(b); - - } -} \ No newline at end of file diff --git a/bin/mycompiler/test/inferenceByCharacteristic/TestInferenceOwnTypeByMethodParameter.jav b/bin/mycompiler/test/inferenceByCharacteristic/TestInferenceOwnTypeByMethodParameter.jav deleted file mode 100755 index 0970988fc..000000000 --- a/bin/mycompiler/test/inferenceByCharacteristic/TestInferenceOwnTypeByMethodParameter.jav +++ /dev/null @@ -1,19 +0,0 @@ -class A { - static void m() {} -} - -public class TestInferenceOwnTypeByMethodParameter { - - m1(a,b) { - return a+b; - } - - m2(java.lang.String a) { - return a; - } - - m3(a) { - return a.m(); - } - -} \ No newline at end of file diff --git a/bin/mycompiler/test/inferenceByCharacteristic/TestInferenceOwnTypeByMethodReturnTypeMixed1.jav b/bin/mycompiler/test/inferenceByCharacteristic/TestInferenceOwnTypeByMethodReturnTypeMixed1.jav deleted file mode 100755 index b6e341d3f..000000000 --- a/bin/mycompiler/test/inferenceByCharacteristic/TestInferenceOwnTypeByMethodReturnTypeMixed1.jav +++ /dev/null @@ -1,20 +0,0 @@ -class A1{ - void foo(java.lang.String x){} -} -class A2{ - void foo(java.lang.Integer y){} -} -class B1{ - java.lang.String bar(){return("");} -} -class B2{ - java.lang.Integer bar(){return(1);} -} -public class TestInferenceOwnTypeByMethodReturnTypeMixed1{ - method1(a,b){ - a.foo(b.bar()); - } - method2(a,B2 b) { - a.foo(b.bar()); - } -} \ No newline at end of file diff --git a/bin/mycompiler/test/inferenceByCharacteristic/TestInferenceOwnTypeByReturnType.jav b/bin/mycompiler/test/inferenceByCharacteristic/TestInferenceOwnTypeByReturnType.jav deleted file mode 100755 index 559fde50a..000000000 --- a/bin/mycompiler/test/inferenceByCharacteristic/TestInferenceOwnTypeByReturnType.jav +++ /dev/null @@ -1,18 +0,0 @@ -public class TestInferenceOwnTypeByReturnType { - - public java.lang.Integer m1(a) { - return a; - } - - public String m2() { - return "abc"; - } - - public void m3(a) { - a=m2(); - } - - public java.lang.Integer m4(a,b) { - return a+b; - } -} \ No newline at end of file diff --git a/bin/mycompiler/test/inferenceByCharacteristic/TestInferenceOwnTypeByReturnTypeAcrossClasses.jav b/bin/mycompiler/test/inferenceByCharacteristic/TestInferenceOwnTypeByReturnTypeAcrossClasses.jav deleted file mode 100755 index 243df6d9a..000000000 --- a/bin/mycompiler/test/inferenceByCharacteristic/TestInferenceOwnTypeByReturnTypeAcrossClasses.jav +++ /dev/null @@ -1,23 +0,0 @@ -class A{ - public String m() { - return "abc"; - } -} - -class B{ - public Integer m() { - return 1; - } -} - -public class TestInferenceOwnTypeByReturnTypeAcrossClasses { - - public main1(java.lang.Integer i, x){ - i=x.m(); - } - - public main2(i,x) { - i=x.m(); - } - -} \ No newline at end of file diff --git a/bin/mycompiler/test/inferenceByCharacteristic/TestInferenceStdTypeByMember.jav b/bin/mycompiler/test/inferenceByCharacteristic/TestInferenceStdTypeByMember.jav deleted file mode 100755 index a2c370f4b..000000000 --- a/bin/mycompiler/test/inferenceByCharacteristic/TestInferenceStdTypeByMember.jav +++ /dev/null @@ -1,9 +0,0 @@ -import java.lang.System; - -public class TestInferenceStdTypeByMember { - - public m1(a) { - a=System.out; - } - -} \ No newline at end of file diff --git a/bin/mycompiler/test/inferenceByCharacteristic/TestInferenceStdTypeByOperation.jav b/bin/mycompiler/test/inferenceByCharacteristic/TestInferenceStdTypeByOperation.jav deleted file mode 100755 index 955a14783..000000000 --- a/bin/mycompiler/test/inferenceByCharacteristic/TestInferenceStdTypeByOperation.jav +++ /dev/null @@ -1,13 +0,0 @@ -import java.util.HashMap; -import java.lang.Object; - -public class TestInferenceStdTypeByOperation { - - public m1(a) { - a.put("1","1"); - } - - public m2(b) { - b.toString(); - } -} \ No newline at end of file diff --git a/bin/mycompiler/test/inferenceByCharacteristic/TestInferenceStdTypeByReturnType.jav b/bin/mycompiler/test/inferenceByCharacteristic/TestInferenceStdTypeByReturnType.jav deleted file mode 100755 index 9317cd986..000000000 --- a/bin/mycompiler/test/inferenceByCharacteristic/TestInferenceStdTypeByReturnType.jav +++ /dev/null @@ -1,18 +0,0 @@ -import java.util.Vector; -import java.util.ArrayList; - -public class TestInferenceStdTypeByReturnType { - - public void m1(a) { - b; - b= new Vector(); - a = b.size(); - } - - public void m2(a) { - b; - b= new ArrayList(); - a = b.get(0); - - } -} \ No newline at end of file diff --git a/bin/mycompiler/test/javaConcepts/inheritance/TestInheritanceAcrossLevel.jav b/bin/mycompiler/test/javaConcepts/inheritance/TestInheritanceAcrossLevel.jav deleted file mode 100755 index 053275681..000000000 --- a/bin/mycompiler/test/javaConcepts/inheritance/TestInheritanceAcrossLevel.jav +++ /dev/null @@ -1,56 +0,0 @@ -/* - A - B C -D E - -*/ - -class A { - fooA() {} -} - -class B extends A { - fooB() {} -} - -class C extends A { - fooC(){} -} - -class D extends B { - fooD() {} -} - -class E extends B { - fooE() {} -} - - - -public class TestInheritanceAcrossLevel { - - public m1(x) { - x.fooA(); - return x; - } - - public m2(x) { - x.fooB(); - /*return x;*/ - } - - public m3(x) { - x.fooC(); - /*return x;*/ - } - - public m4(x) { - x.fooD(); - /*return x;*/ - } - - public m5(B x) { - x.fooA(); - return x; - } -} \ No newline at end of file diff --git a/bin/mycompiler/test/javaConcepts/inheritance/TestInheritanceCircle.jav b/bin/mycompiler/test/javaConcepts/inheritance/TestInheritanceCircle.jav deleted file mode 100755 index 354e09f54..000000000 --- a/bin/mycompiler/test/javaConcepts/inheritance/TestInheritanceCircle.jav +++ /dev/null @@ -1,41 +0,0 @@ -/* - - A - B C - D -*/ - -interface A{ - fooA(); -} - -interface B extends A{ - fooB(); -} - -interface C extends A{} - -class D implements B,C { - fooA() { - } - fooB() { - } -} - -public class TestInheritanceCircle{ - - public m1(x) { - x.fooA(); - /*return x;*/ - } - - public m2(x) { - x.fooB(); - /*return x;*/ - } - public m3(D x) { - x.fooA(); - return x; - } - -} \ No newline at end of file diff --git a/bin/mycompiler/test/javaConcepts/inheritance/TestInheritanceConstructor.jav b/bin/mycompiler/test/javaConcepts/inheritance/TestInheritanceConstructor.jav deleted file mode 100755 index 11073ccf8..000000000 --- a/bin/mycompiler/test/javaConcepts/inheritance/TestInheritanceConstructor.jav +++ /dev/null @@ -1,27 +0,0 @@ -class A { - public Integer memberInteger; - - public A(i) { - member=i; - } - -} - -class B extends A { - public String memberString; - public B(i,s) { - super(i); - memberString=s; - } -} - -public class TestInheritanceConstructor { - - public static main() { - x; - x=new B(3,"abc"); - y; - y=x.memberInteger; - } - -} \ No newline at end of file diff --git a/bin/mycompiler/test/javaConcepts/inheritance/TestInheritanceMultiple.jav b/bin/mycompiler/test/javaConcepts/inheritance/TestInheritanceMultiple.jav deleted file mode 100755 index 63b6a1998..000000000 --- a/bin/mycompiler/test/javaConcepts/inheritance/TestInheritanceMultiple.jav +++ /dev/null @@ -1,22 +0,0 @@ -interface A{ -} -interface B{} - -class Tester implements A,B{ - m(){ - } -} - -public class TestInheritanceMultiple{ - - /*should return either of Type Intf1, Intf2, or Tester*/ - public m1(x){ - x.m(); - return(x); - } - - public m2(Tester x){ - x.m(); - return x; - } -} \ No newline at end of file diff --git a/bin/mycompiler/test/javaConcepts/inheritance/TestInheritanceMultipleClasses.jav b/bin/mycompiler/test/javaConcepts/inheritance/TestInheritanceMultipleClasses.jav deleted file mode 100755 index 70241b36f..000000000 --- a/bin/mycompiler/test/javaConcepts/inheritance/TestInheritanceMultipleClasses.jav +++ /dev/null @@ -1,8 +0,0 @@ - -class A {} - -class B {} - -public class TestInheritanceMultipleClasses extends A, B { - -} \ No newline at end of file diff --git a/bin/mycompiler/test/javaConcepts/inheritance/TestInheritanceOverriding.jav b/bin/mycompiler/test/javaConcepts/inheritance/TestInheritanceOverriding.jav deleted file mode 100755 index 7690516b3..000000000 --- a/bin/mycompiler/test/javaConcepts/inheritance/TestInheritanceOverriding.jav +++ /dev/null @@ -1,27 +0,0 @@ -class A{ - public m() { - return new A(); - } -} - -class B extends A{ - - public m() { - return new B(); - } - public m(java.lang.Integer a) { - return a; - } -} - -public class TestInheritanceOverriding { - - public main1(x,A y) { - y = new B(); - x = y.m(); - } - /*public main2(x) { - y; - y=x.m(2); - }*/ -} \ No newline at end of file diff --git a/bin/mycompiler/test/javaConcepts/inheritance/TestInheritanceTwoHierarchies.jav b/bin/mycompiler/test/javaConcepts/inheritance/TestInheritanceTwoHierarchies.jav deleted file mode 100755 index df2f7dca8..000000000 --- a/bin/mycompiler/test/javaConcepts/inheritance/TestInheritanceTwoHierarchies.jav +++ /dev/null @@ -1,37 +0,0 @@ - -/* - - A I - B C D -E F - -*/ -interface I{ - void fooA(); -} -class A{ - void fooA() {} -} -class B extends A{} - -class C extends A implements I{} - -class D implements I{ - fooD() {} -} -class E extends B {} - -class F extends C{} - -public class TestInheritanceTwoHierarchies { - - public m1(x) { - x.fooA(); - return x; - } - - public m2(x) { - x.fooD(); - return x; - } -} diff --git a/bin/mycompiler/test/javaConcepts/inheritance/TestSimpleInheritance.jav b/bin/mycompiler/test/javaConcepts/inheritance/TestSimpleInheritance.jav deleted file mode 100755 index 3a0c0639c..000000000 --- a/bin/mycompiler/test/javaConcepts/inheritance/TestSimpleInheritance.jav +++ /dev/null @@ -1,13 +0,0 @@ - -class A { - - public m1() { - } -} - -public class TestSimpleInheritance extends A { - - public m(x) { - x.m1(); - } -} \ No newline at end of file diff --git a/bin/mycompiler/test/javaConcepts/overloading/OverloadingDifferentNumberOfParameters.jav b/bin/mycompiler/test/javaConcepts/overloading/OverloadingDifferentNumberOfParameters.jav deleted file mode 100755 index 27139295d..000000000 --- a/bin/mycompiler/test/javaConcepts/overloading/OverloadingDifferentNumberOfParameters.jav +++ /dev/null @@ -1,6 +0,0 @@ -class OverloadingDifferentNumberOfParameters{ - void foo(){} - void foo(Integer a){} - void foo(Integer a, Double b){} - void foo(Integer a, Double b, Long c){} -} \ No newline at end of file diff --git a/bin/mycompiler/test/javaConcepts/overloading/OverloadingDifferentNumberOfParametersAndDifferentTypes.jav b/bin/mycompiler/test/javaConcepts/overloading/OverloadingDifferentNumberOfParametersAndDifferentTypes.jav deleted file mode 100755 index 5cc96afcc..000000000 --- a/bin/mycompiler/test/javaConcepts/overloading/OverloadingDifferentNumberOfParametersAndDifferentTypes.jav +++ /dev/null @@ -1,9 +0,0 @@ -class OverloadingDifferentNumberOfParametersAndDifferentTypes{ - void foo(){} - void foo(Integer a){} - void foo(Integer a, Double b){} - void foo(Integer a, Double b, Long c){} - void foo(String a){} - void foo(String a, Integer b){} - void foo(String a, Integer b, Long c){} -} \ No newline at end of file diff --git a/bin/mycompiler/test/javaConcepts/overloading/OverloadingGenericNotSameHierarchy.jav b/bin/mycompiler/test/javaConcepts/overloading/OverloadingGenericNotSameHierarchy.jav deleted file mode 100755 index cc8b080f1..000000000 --- a/bin/mycompiler/test/javaConcepts/overloading/OverloadingGenericNotSameHierarchy.jav +++ /dev/null @@ -1,13 +0,0 @@ -/* -Diese Klasse ueberlaed eine Methoden bei total Typverschiedenen generischen parametern (nicht gleiche Vererbungshierarchie -*/ -class OverloadingGenericNotSameHierarchy{ - - void foo(){} - void foo(T n){} - void foo(T v){} - -/* - void foo(T n){} - */ -} \ No newline at end of file diff --git a/bin/mycompiler/test/javaConcepts/overloading/OverloadingGenericSameHierarchy.jav b/bin/mycompiler/test/javaConcepts/overloading/OverloadingGenericSameHierarchy.jav deleted file mode 100755 index 7db406522..000000000 --- a/bin/mycompiler/test/javaConcepts/overloading/OverloadingGenericSameHierarchy.jav +++ /dev/null @@ -1,8 +0,0 @@ -/* -Diese Klasse ueberlaedt eine Methoden bei verschiedenen generischen Typen von Parametern welche in der gleichen Vererbungshierarchie liegen*/ - -class OverloadingGenericSameHierarchy { - void foo(T o){} - void foo(T n){} - void foo(T i){} -} \ No newline at end of file diff --git a/bin/mycompiler/test/javaConcepts/overloading/OverloadingGenericTypeInferenceNotSameHierarchy.jav b/bin/mycompiler/test/javaConcepts/overloading/OverloadingGenericTypeInferenceNotSameHierarchy.jav deleted file mode 100755 index cc0ff01ab..000000000 --- a/bin/mycompiler/test/javaConcepts/overloading/OverloadingGenericTypeInferenceNotSameHierarchy.jav +++ /dev/null @@ -1,19 +0,0 @@ -/* -Diese Klasse ueberlaedt eine Methode durch Typinferenz erkannte generische typverschiedenen Tarametern (nicht gleiche Vererbungshierarchie) -*/ - -import java.util.Vector; - -class A { - -} - -class OverloadingGenericTypeInferenceNotSameHierarchy{ - foo(){} - foo(i){ - i = new A(); - } - foo(s){ - s = new Vector(); - } -} \ No newline at end of file diff --git a/bin/mycompiler/test/javaConcepts/overloading/OverloadingGenericTypeInferenceSameHierarchy.jav b/bin/mycompiler/test/javaConcepts/overloading/OverloadingGenericTypeInferenceSameHierarchy.jav deleted file mode 100755 index e4af92395..000000000 --- a/bin/mycompiler/test/javaConcepts/overloading/OverloadingGenericTypeInferenceSameHierarchy.jav +++ /dev/null @@ -1,20 +0,0 @@ -/* -Diese Klasse ueberlaedt eine Methoden durch typeinferenz erkannte generische Typverschiedenen parametern welche in der selben Typhierarchie sind*/ -class B{ -} -class C extends B{ -} -class D extends C{ -} -class OverloadingGenericTypeInferenceSameHierarchy{ - foo(i){ - i = new B(); - } - foo(n){ - n = new C(); - } - - foo(o){ - o = new D(); - } -} \ No newline at end of file diff --git a/bin/mycompiler/test/javaConcepts/overloading/OverloadingNotSameHierarchy.jav b/bin/mycompiler/test/javaConcepts/overloading/OverloadingNotSameHierarchy.jav deleted file mode 100755 index 2b2e635e0..000000000 --- a/bin/mycompiler/test/javaConcepts/overloading/OverloadingNotSameHierarchy.jav +++ /dev/null @@ -1,8 +0,0 @@ -/* -Diese Klasse ueberlaed eine Methoden bei total Typverschiedenen parametern (nicht gleiche Vererbungshierarchie -*/ -class OverloadingNotSameHierarchy{ - void foo(){} - void foo(String s){} - void foo(Integer i){} -} \ No newline at end of file diff --git a/bin/mycompiler/test/javaConcepts/overloading/OverloadingSameHierarchy.jav b/bin/mycompiler/test/javaConcepts/overloading/OverloadingSameHierarchy.jav deleted file mode 100755 index d622462f3..000000000 --- a/bin/mycompiler/test/javaConcepts/overloading/OverloadingSameHierarchy.jav +++ /dev/null @@ -1,7 +0,0 @@ -/* -Diese Klasse ueberlaedt eine Methoden bei verschiedenen Typen von Parametern welche in der gleichen Vererbungshierarchie liegen*/ -class OverloadingSameHierarchy{ - void foo(java.lang.Number n){} - void foo(java.lang.Integer i){} - void foo(java.lang.Object o){} -} \ No newline at end of file diff --git a/bin/mycompiler/test/javaConcepts/overloading/OverloadingSameSignature.jav b/bin/mycompiler/test/javaConcepts/overloading/OverloadingSameSignature.jav deleted file mode 100755 index ff58ff0a7..000000000 --- a/bin/mycompiler/test/javaConcepts/overloading/OverloadingSameSignature.jav +++ /dev/null @@ -1,6 +0,0 @@ -class OverloadingSameSignature{ - void foo(){ - } - void foo(){ - } -} \ No newline at end of file diff --git a/bin/mycompiler/test/javaConcepts/overloading/OverloadingSameSignatureDifferentReturnTypes.jav b/bin/mycompiler/test/javaConcepts/overloading/OverloadingSameSignatureDifferentReturnTypes.jav deleted file mode 100755 index 2668cd06e..000000000 --- a/bin/mycompiler/test/javaConcepts/overloading/OverloadingSameSignatureDifferentReturnTypes.jav +++ /dev/null @@ -1,7 +0,0 @@ -class OverloadingSameSignatureDifferentReturnTypes{ - void foo(){ - } - String foo(){ - return "abcd"; - } -} \ No newline at end of file diff --git a/bin/mycompiler/test/javaConcepts/overloading/OverloadingSameSignatureGenerics.jav b/bin/mycompiler/test/javaConcepts/overloading/OverloadingSameSignatureGenerics.jav deleted file mode 100755 index de6ebda2d..000000000 --- a/bin/mycompiler/test/javaConcepts/overloading/OverloadingSameSignatureGenerics.jav +++ /dev/null @@ -1,8 +0,0 @@ -class OverloadingSameSignatureGenerics{ - T foo(T a){ - return a; - } - void foo(T a){ - } - -} \ No newline at end of file diff --git a/bin/mycompiler/test/javaConcepts/overloading/OverloadingTypeInferenceNotSameHierarchy.jav b/bin/mycompiler/test/javaConcepts/overloading/OverloadingTypeInferenceNotSameHierarchy.jav deleted file mode 100755 index 317fc85c1..000000000 --- a/bin/mycompiler/test/javaConcepts/overloading/OverloadingTypeInferenceNotSameHierarchy.jav +++ /dev/null @@ -1,12 +0,0 @@ -/* -Diese Klasse ueberlaed eine Methoden durch typeinferenz erkannte Typverschiedenen parametern (nicht gleiche Vererbungshierarchie -*/ -class OverloadingTypeInferenceNotSameHierarchy{ - foo(){} - foo(i){ - i = new java.lang.Integer(); - } - foo(s){ - s = "String"; - } -} \ No newline at end of file diff --git a/bin/mycompiler/test/javaConcepts/overloading/OverloadingTypeInferenceSameHierarchy.jav b/bin/mycompiler/test/javaConcepts/overloading/OverloadingTypeInferenceSameHierarchy.jav deleted file mode 100755 index dc83554cb..000000000 --- a/bin/mycompiler/test/javaConcepts/overloading/OverloadingTypeInferenceSameHierarchy.jav +++ /dev/null @@ -1,16 +0,0 @@ -/* -Diese Klasse ueberlaed eine Methoden durch typeinferenz erkannte Typverschiedenen parametern welche in der selben Typhierarchie sind*/ -class OverloadingTypeInferenceSameHierarchy{ - /*i = Integer*/ - foo(i){ - i = new java.lang.Integer(); - } - /*n = Number*/ - foo(n){ - n = new java.lang.Number(); - } - /*o = Object*/ - foo(o){ - o = new java.lang.Object(); - } -} \ No newline at end of file diff --git a/bin/mycompiler/test/javaConcepts/staticAccess/TestNonStaticAccess.jav b/bin/mycompiler/test/javaConcepts/staticAccess/TestNonStaticAccess.jav deleted file mode 100755 index 717d5ed3b..000000000 --- a/bin/mycompiler/test/javaConcepts/staticAccess/TestNonStaticAccess.jav +++ /dev/null @@ -1,19 +0,0 @@ -public class Access{ - - public String nonStaticMember="abc"; - - public nonStaticMethod() { - return "def"; - } - -} - -class TestNonStaticAccess { - - public method1(a,b) { - x; - x = new Access(); - a=x.nonStaticMember; - b=x.nonStaticMethod(); - } -} \ No newline at end of file diff --git a/bin/mycompiler/test/javaConcepts/staticAccess/TestStaticAccess.jav b/bin/mycompiler/test/javaConcepts/staticAccess/TestStaticAccess.jav deleted file mode 100755 index b00c2e8ef..000000000 --- a/bin/mycompiler/test/javaConcepts/staticAccess/TestStaticAccess.jav +++ /dev/null @@ -1,18 +0,0 @@ -public class Access{ - - public static String staticMember="def"; - - public static staticMethod() { - return "abc"; - } - -} - -class TestStaticAccess { - - public method1(a,b) { - x; - a=x.staticMember; - b=x.staticMethod(); - } -} diff --git a/bin/mycompiler/test/javaConcepts/staticAccess/TestStaticAccessError.jav b/bin/mycompiler/test/javaConcepts/staticAccess/TestStaticAccessError.jav deleted file mode 100755 index e7445702f..000000000 --- a/bin/mycompiler/test/javaConcepts/staticAccess/TestStaticAccessError.jav +++ /dev/null @@ -1,17 +0,0 @@ -public class Access{ - public String nonStaticMember="abc"; - - public nonStaticMethod() { - return "def"; - } - -} - -class TestStaticAccessError { - - public methodError1(a,b) { - x; - a=x.nonStaticMember; - b=x.nonStaticMethod(); - } -} \ No newline at end of file diff --git a/bin/mycompiler/test/lambda/BasicAssumptions.jav b/bin/mycompiler/test/lambda/BasicAssumptions.jav deleted file mode 100755 index f9da2d184..000000000 --- a/bin/mycompiler/test/lambda/BasicAssumptions.jav +++ /dev/null @@ -1,10 +0,0 @@ -class BasicAssumptionsTest{ - -varString; -var = 2; - -void methode(){ - var = 1; - varString = varString.toString(); -} -} \ No newline at end of file diff --git a/bin/mycompiler/test/lambda/ConstructorTestFile1.jav b/bin/mycompiler/test/lambda/ConstructorTestFile1.jav deleted file mode 100755 index 1b26e2bb4..000000000 --- a/bin/mycompiler/test/lambda/ConstructorTestFile1.jav +++ /dev/null @@ -1,8 +0,0 @@ -class ConstructorTest1{ - -ConstructorTest1(){ -var; -var = 1; -} - -} \ No newline at end of file diff --git a/bin/mycompiler/test/lambda/ConstructorTestFile2.jav b/bin/mycompiler/test/lambda/ConstructorTestFile2.jav deleted file mode 100755 index d2ce318e8..000000000 --- a/bin/mycompiler/test/lambda/ConstructorTestFile2.jav +++ /dev/null @@ -1,7 +0,0 @@ -class ConstructorTest2{ -var; - void method(){ - var = new ConstructorTest1(); - } - -} \ No newline at end of file diff --git a/bin/mycompiler/test/lambda/GenericParameterTest.jav b/bin/mycompiler/test/lambda/GenericParameterTest.jav deleted file mode 100644 index 820e7b33d..000000000 --- a/bin/mycompiler/test/lambda/GenericParameterTest.jav +++ /dev/null @@ -1,7 +0,0 @@ -class GenericVarTest{ - Vector test; - method(){ - test = test; - return 1; - } -} \ No newline at end of file diff --git a/bin/mycompiler/test/lambda/GenericVarTest.jav b/bin/mycompiler/test/lambda/GenericVarTest.jav deleted file mode 100755 index 6e6db51b8..000000000 --- a/bin/mycompiler/test/lambda/GenericVarTest.jav +++ /dev/null @@ -1,7 +0,0 @@ -class GenericVarTest{ - test; - method(){ - test = test; - return 1; - } -} \ No newline at end of file diff --git a/bin/mycompiler/test/lambda/LambdaTest1.jav b/bin/mycompiler/test/lambda/LambdaTest1.jav deleted file mode 100755 index b024385cc..000000000 --- a/bin/mycompiler/test/lambda/LambdaTest1.jav +++ /dev/null @@ -1,7 +0,0 @@ -class LambdaTest1{ - var = "test"; - - method(String toAppend){ - return (String text) -> { return toAppend;}; - } -} diff --git a/bin/mycompiler/test/lambda/OverloadingTest.jav b/bin/mycompiler/test/lambda/OverloadingTest.jav deleted file mode 100755 index bed6f9604..000000000 --- a/bin/mycompiler/test/lambda/OverloadingTest.jav +++ /dev/null @@ -1,21 +0,0 @@ -class OverloadingTest{ - - var; - - public Object clone(){ - return this; - } - - public testMethode(){ - return var.clone(); - } - -} - -class OverloadingTest2{ - - public Object clone(){ - return this; - } - -} diff --git a/bin/mycompiler/test/lambda/TestAssign.jav b/bin/mycompiler/test/lambda/TestAssign.jav deleted file mode 100755 index 17117f182..000000000 --- a/bin/mycompiler/test/lambda/TestAssign.jav +++ /dev/null @@ -1,3 +0,0 @@ -class Assign{ -stringVar = "String"; -} \ No newline at end of file diff --git a/bin/mycompiler/test/lambda/TestFunN.jav b/bin/mycompiler/test/lambda/TestFunN.jav deleted file mode 100755 index b810f636b..000000000 --- a/bin/mycompiler/test/lambda/TestFunN.jav +++ /dev/null @@ -1,2 +0,0 @@ -class Matrix extends Vector> { -op = (m) -> (f) -> f.apply(this, m); } \ No newline at end of file diff --git a/bin/mycompiler/test/lambda/TestIfStmt.jav b/bin/mycompiler/test/lambda/TestIfStmt.jav deleted file mode 100755 index b4a244d46..000000000 --- a/bin/mycompiler/test/lambda/TestIfStmt.jav +++ /dev/null @@ -1,13 +0,0 @@ -class TestIfStmt { - -methode(){ - var; - if(true){ - var=this; - }else{ - var=this; - } - return 1; -} - -} \ No newline at end of file diff --git a/bin/mycompiler/test/lambda/TestLambda.jav b/bin/mycompiler/test/lambda/TestLambda.jav deleted file mode 100755 index 36f107343..000000000 --- a/bin/mycompiler/test/lambda/TestLambda.jav +++ /dev/null @@ -1,3 +0,0 @@ -class TestLambda{ -op = (test) -> test = "string"; -} \ No newline at end of file diff --git a/bin/mycompiler/test/lambda/TestMethodCall.jav b/bin/mycompiler/test/lambda/TestMethodCall.jav deleted file mode 100755 index 8abb035be..000000000 --- a/bin/mycompiler/test/lambda/TestMethodCall.jav +++ /dev/null @@ -1,17 +0,0 @@ -class TestMethodCall { - -var; - -getSomething(){ - return this; -} - -getSomethingMore(){ - return getSomething(); -} - -void setVar(){ - var = getSomethingMore(); -} - -} \ No newline at end of file diff --git a/bin/mycompiler/test/lambda/TestWhile.jav b/bin/mycompiler/test/lambda/TestWhile.jav deleted file mode 100755 index 019bf8f4e..000000000 --- a/bin/mycompiler/test/lambda/TestWhile.jav +++ /dev/null @@ -1,10 +0,0 @@ -class WhileTest{ - - public method(){ - var; - while(true){ - var = "String"; - } - } - -} \ No newline at end of file diff --git a/bin/mycompiler/test/lambda/ThisTest.jav b/bin/mycompiler/test/lambda/ThisTest.jav deleted file mode 100755 index 0ca725581..000000000 --- a/bin/mycompiler/test/lambda/ThisTest.jav +++ /dev/null @@ -1,5 +0,0 @@ -class ThisTest{ - -thisVar = this; - -} \ No newline at end of file diff --git a/bin/mycompiler/test/lambda/parseMultipleFilesFile1.jav b/bin/mycompiler/test/lambda/parseMultipleFilesFile1.jav deleted file mode 100755 index 79a5554a5..000000000 --- a/bin/mycompiler/test/lambda/parseMultipleFilesFile1.jav +++ /dev/null @@ -1,10 +0,0 @@ -class Klasse2 { - -var1; - -testMethode(){ - var1 = new Klasse1(); - return var1.getVar1(); -} - -} \ No newline at end of file diff --git a/bin/mycompiler/test/lambda/parseMultipleFilesFile2.jav b/bin/mycompiler/test/lambda/parseMultipleFilesFile2.jav deleted file mode 100755 index 47def1950..000000000 --- a/bin/mycompiler/test/lambda/parseMultipleFilesFile2.jav +++ /dev/null @@ -1,7 +0,0 @@ -class Klasse1 { - var1; - - int getVar1(){ - return var1; - } -} diff --git a/bin/mycompiler/test/lambda/testResults/LambdaTest.log b/bin/mycompiler/test/lambda/testResults/LambdaTest.log deleted file mode 100644 index e69de29bb..000000000 diff --git a/bin/mycompiler/test/notUsedAnymore/TestAbstractInferenceTest.jav b/bin/mycompiler/test/notUsedAnymore/TestAbstractInferenceTest.jav deleted file mode 100755 index df5e707fc..000000000 --- a/bin/mycompiler/test/notUsedAnymore/TestAbstractInferenceTest.jav +++ /dev/null @@ -1,20 +0,0 @@ - -class TestAbstractInferenceTest { - - public foo(a, b) { - c; - d; - d = a+ b; - { - i; - i=5; - } - { - i; - i="abc"; - } - c = new TestAbstractInferenceTest(); - return a+b; - } - -} \ No newline at end of file diff --git a/bin/mycompiler/test/notUsedAnymore/TestAbstractInferenceTest2.jav b/bin/mycompiler/test/notUsedAnymore/TestAbstractInferenceTest2.jav deleted file mode 100755 index 1f4cef494..000000000 --- a/bin/mycompiler/test/notUsedAnymore/TestAbstractInferenceTest2.jav +++ /dev/null @@ -1,21 +0,0 @@ - -public class TestAbstractInferenceTest2 { - - method(Integer a, String s) { - } -} - -class TestAbstractInferenceTest3 extends TestAbstractInferenceTest2 { -/* - method(Integer a) { - c; - }*/ - method2(String s) { - c; - c = new TestAbstractInferenceTest2(); - c.method(2,"abc"); - method(3,"abc"); - } - - -} \ No newline at end of file diff --git a/bin/mycompiler/test/notUsedAnymore/TestClassMemberWithoutType.jav b/bin/mycompiler/test/notUsedAnymore/TestClassMemberWithoutType.jav deleted file mode 100755 index 249e1d57d..000000000 --- a/bin/mycompiler/test/notUsedAnymore/TestClassMemberWithoutType.jav +++ /dev/null @@ -1,5 +0,0 @@ - -public class TestClassMemberWithoutType { - - member; -} \ No newline at end of file diff --git a/bin/mycompiler/test/notUsedAnymore/TestConstantsWithoutType.jav b/bin/mycompiler/test/notUsedAnymore/TestConstantsWithoutType.jav deleted file mode 100755 index e61a2feb8..000000000 --- a/bin/mycompiler/test/notUsedAnymore/TestConstantsWithoutType.jav +++ /dev/null @@ -1,6 +0,0 @@ -public class TestConstantsWithoutType { - public final static B = true; - public final static I = 1; - public final static C = 'A'; - public final static S = "Hello World!"; -} \ No newline at end of file diff --git a/bin/mycompiler/test/notUsedAnymore/TestGenerics.jav b/bin/mycompiler/test/notUsedAnymore/TestGenerics.jav deleted file mode 100755 index 337a16164..000000000 --- a/bin/mycompiler/test/notUsedAnymore/TestGenerics.jav +++ /dev/null @@ -1,8 +0,0 @@ - - -public class TestGenerics { - - > void foo(T n) {} - void foo(T i) {} - -} \ No newline at end of file diff --git a/bin/mycompiler/test/notUsedAnymore/TestInheritanceCheckValidImplementationFromInterface.jav b/bin/mycompiler/test/notUsedAnymore/TestInheritanceCheckValidImplementationFromInterface.jav deleted file mode 100755 index 127ed26eb..000000000 --- a/bin/mycompiler/test/notUsedAnymore/TestInheritanceCheckValidImplementationFromInterface.jav +++ /dev/null @@ -1,7 +0,0 @@ -interface A{ - public m(); -} -class TestInheritanceCheckValidImplementationFromInterface implements A{ - - public void m(){} -} \ No newline at end of file diff --git a/bin/mycompiler/test/notUsedAnymore/TestInheritanceCheckValidImplementationFromInterfaceNegative.jav b/bin/mycompiler/test/notUsedAnymore/TestInheritanceCheckValidImplementationFromInterfaceNegative.jav deleted file mode 100755 index e05fdae65..000000000 --- a/bin/mycompiler/test/notUsedAnymore/TestInheritanceCheckValidImplementationFromInterfaceNegative.jav +++ /dev/null @@ -1,7 +0,0 @@ -interface A{ - public m(); -} -class TestInheritanceCheckValidImplementationFromInterfaceNegative implements A{ - - public void m1(){} -} \ No newline at end of file diff --git a/bin/mycompiler/test/notUsedAnymore/TestInheritanceCheckValidImplementationFromInterfaceNegative2.jav b/bin/mycompiler/test/notUsedAnymore/TestInheritanceCheckValidImplementationFromInterfaceNegative2.jav deleted file mode 100755 index 0dd2a73e1..000000000 --- a/bin/mycompiler/test/notUsedAnymore/TestInheritanceCheckValidImplementationFromInterfaceNegative2.jav +++ /dev/null @@ -1,14 +0,0 @@ -interface TestInheritanceCheckValidImplementationFromInterfaceNegative2{ - public m(); -} -class A implements TestInheritanceCheckValidImplementationFromInterfaceNegative2{ - - public void m(){} -} - -class B implements TestInheritanceCheckValidImplementationFromInterfaceNegative2 { - - public m() { - return 1; - } -} \ No newline at end of file diff --git a/bin/mycompiler/test/notUsedAnymore/TestMethodReturnType.jav b/bin/mycompiler/test/notUsedAnymore/TestMethodReturnType.jav deleted file mode 100755 index ae4d9c9be..000000000 --- a/bin/mycompiler/test/notUsedAnymore/TestMethodReturnType.jav +++ /dev/null @@ -1,21 +0,0 @@ - -public class TestMethodReturnType { - -/* methodReturnType1(a) { - return a; - } - */ - methodReturnType2(a,b) { - return a+b; - } - - methodReturnType3(String a) { - return a; - } - - Integer methodReturnType4(a) { - return a; - } - - -} \ No newline at end of file diff --git a/bin/mycompiler/test/notUsedAnymore/TestMethodReturnTypeGeneric.jav b/bin/mycompiler/test/notUsedAnymore/TestMethodReturnTypeGeneric.jav deleted file mode 100755 index c33e753b2..000000000 --- a/bin/mycompiler/test/notUsedAnymore/TestMethodReturnTypeGeneric.jav +++ /dev/null @@ -1,15 +0,0 @@ - -public class TestMethodReturnTypeGeneric { - - testMethodReturnTypeGeneric() { - return new TestMethodReturnTypeGeneric(); - } - - testMethodReturnTypeGeneric2(T a) { - return a; - } - - - - -} \ No newline at end of file diff --git a/bin/mycompiler/test/notUsedAnymore/TestMethodReturnTypeNegative.jav b/bin/mycompiler/test/notUsedAnymore/TestMethodReturnTypeNegative.jav deleted file mode 100755 index 10b5f1087..000000000 --- a/bin/mycompiler/test/notUsedAnymore/TestMethodReturnTypeNegative.jav +++ /dev/null @@ -1,8 +0,0 @@ - -public class TestMethodReturnTypeNegative { - - /*returned String, but must be Integer*/ - Integer m1(String a) { - return a; - } -} \ No newline at end of file diff --git a/bin/mycompiler/test/notUsedAnymore/TestMethodReturnTypeNegative2.jav b/bin/mycompiler/test/notUsedAnymore/TestMethodReturnTypeNegative2.jav deleted file mode 100755 index 15f21075d..000000000 --- a/bin/mycompiler/test/notUsedAnymore/TestMethodReturnTypeNegative2.jav +++ /dev/null @@ -1,11 +0,0 @@ - -public class TestMethodReturnTypeNegative2 { - - /*not always boolean returned*/ - public m1() { - a; - if (a) { - return a; - } - } -} \ No newline at end of file diff --git a/bin/mycompiler/test/operators/TestOperatorArithmetic.jav b/bin/mycompiler/test/operators/TestOperatorArithmetic.jav deleted file mode 100755 index 7c346c58f..000000000 --- a/bin/mycompiler/test/operators/TestOperatorArithmetic.jav +++ /dev/null @@ -1,40 +0,0 @@ -public class TestOperatorArithmetic { - - public m1(i,j) { - return i+j; - } - - public m2(i,java.lang.Double j) { - return i-j; - } - - public m3(java.lang.Integer i,j) { - return i*j; - } - - public java.lang.Double m4(i,j) { - return i/j; - } - - public m5(i,j) { - return i%j; - } - - public m6(i) { - return -i; - } - - public m7 (i,j) { - i+=j; - return i; - } - - public m8(i, java.lang.Float j) { - return i/j; - } - - /*public java.lang.Long m9(i, j) { - return i+j; - }*/ - -} \ No newline at end of file diff --git a/bin/mycompiler/test/operators/TestOperatorBitwise.jav b/bin/mycompiler/test/operators/TestOperatorBitwise.jav deleted file mode 100755 index 7c7026cc0..000000000 --- a/bin/mycompiler/test/operators/TestOperatorBitwise.jav +++ /dev/null @@ -1,45 +0,0 @@ -public class TestOperatorBitwise { - - public m1(a,b) { - return a & b; - } - - public m2(a,b) { - return a ^ b; - } - - public m3(a,b) { - return a | b; - } - - public m4(Integer a, b) { - return a & b; - } - - public m5(a, Long b) { - return a & b; - } - - public Integer m6(a,b) { - return a & b; - } - - /* bit-shift not accepted by parser - - public m7(a,b) { - return x << y; - } - - public m8(a,b) { - return x >> y; - } - - public m9(a,b) { - return x >>> y; - } - - public m10(a) { - return ~a; - } - */ -} \ No newline at end of file diff --git a/bin/mycompiler/test/operators/TestOperatorBool.jav b/bin/mycompiler/test/operators/TestOperatorBool.jav deleted file mode 100755 index 33c002b12..000000000 --- a/bin/mycompiler/test/operators/TestOperatorBool.jav +++ /dev/null @@ -1,19 +0,0 @@ -public class TestOperatorBool { - - public m1(a,b) { - return a && b; - } - - public m2(a,b) { - return a || b; - } - - public m3(a) { - return !a; - } - - public m4( a, b) { - return a==b; - } - -} \ No newline at end of file diff --git a/bin/mycompiler/test/operators/TestOperatorComparison.jav b/bin/mycompiler/test/operators/TestOperatorComparison.jav deleted file mode 100755 index 62aaee58f..000000000 --- a/bin/mycompiler/test/operators/TestOperatorComparison.jav +++ /dev/null @@ -1,22 +0,0 @@ -public class TestOperatorComparison { - -/* public m1(a,b) { - return a < b; - } - - public m2(a, b) { - return a >= b; - } - */ - public m3(a, b) { - return a==b; - } - - public java.lang.Boolean m4(a,b) { - return a!=b; - } - - public m5(Integer a, b) { - return a { - -} \ No newline at end of file diff --git a/bin/mycompiler/test/trivial/TestClassMember.jav b/bin/mycompiler/test/trivial/TestClassMember.jav deleted file mode 100755 index 89a4b51dc..000000000 --- a/bin/mycompiler/test/trivial/TestClassMember.jav +++ /dev/null @@ -1,6 +0,0 @@ -import java.util.Vector; -public class TestClassMember { - - Integer member; - Vector member2; -} \ No newline at end of file diff --git a/bin/mycompiler/test/trivial/TestClassMemberAssignment.jav b/bin/mycompiler/test/trivial/TestClassMemberAssignment.jav deleted file mode 100755 index 771ea288a..000000000 --- a/bin/mycompiler/test/trivial/TestClassMemberAssignment.jav +++ /dev/null @@ -1,22 +0,0 @@ - -public class TestClassMemberAssignment { - - Integer member; - - public m1() { - member=1; - } - - public m2() { - this.member=2; - } - - public m3(a) { - member=a; - } - - public void m(a) { - this.a=a; - } - -} \ No newline at end of file diff --git a/bin/mycompiler/test/trivial/TestConstants.jav b/bin/mycompiler/test/trivial/TestConstants.jav deleted file mode 100755 index f9d293ac5..000000000 --- a/bin/mycompiler/test/trivial/TestConstants.jav +++ /dev/null @@ -1,6 +0,0 @@ -public class TestConstants { - public final static Boolean B = true; - public final static Integer I = 1; - public final static Character C = 'A'; - public final static String S = "Hello World!"; -} \ No newline at end of file diff --git a/bin/mycompiler/test/trivial/TestConstructor.jav b/bin/mycompiler/test/trivial/TestConstructor.jav deleted file mode 100755 index f07566b45..000000000 --- a/bin/mycompiler/test/trivial/TestConstructor.jav +++ /dev/null @@ -1,20 +0,0 @@ -import java.util.Stack; - -public class TestConstructor { - Integer i; - Stack s; - - public TestConstructor() { - i=3; - s=new Stack(); - } - - public TestConstructor(a) { - a=4; - } - - public TestConstructor(java.lang.Integer a, Stack b) { - i=a; - s=b; - } -} \ No newline at end of file diff --git a/bin/mycompiler/test/trivial/TestConstructorNegative.jav b/bin/mycompiler/test/trivial/TestConstructorNegative.jav deleted file mode 100755 index b4bfcf903..000000000 --- a/bin/mycompiler/test/trivial/TestConstructorNegative.jav +++ /dev/null @@ -1,8 +0,0 @@ - -public class TestConstructorNegative { - - /*should throw error*/ - public TestConstructorNegative(java.lang.Integer a, String b) { - return a; - } -} \ No newline at end of file diff --git a/bin/mycompiler/test/trivial/TestInterfaceEmpty.jav b/bin/mycompiler/test/trivial/TestInterfaceEmpty.jav deleted file mode 100755 index 52bfca29f..000000000 --- a/bin/mycompiler/test/trivial/TestInterfaceEmpty.jav +++ /dev/null @@ -1,4 +0,0 @@ - -interface TestInterfaceEmpty { - -} \ No newline at end of file diff --git a/bin/mycompiler/test/trivial/TestInterfaceMember.jav b/bin/mycompiler/test/trivial/TestInterfaceMember.jav deleted file mode 100755 index 5e60eb603..000000000 --- a/bin/mycompiler/test/trivial/TestInterfaceMember.jav +++ /dev/null @@ -1,5 +0,0 @@ -interface TestInterfaceMember { - - Integer member=3; - -} \ No newline at end of file diff --git a/bin/mycompiler/test/trivial/TestInterfaceMethod.jav b/bin/mycompiler/test/trivial/TestInterfaceMethod.jav deleted file mode 100755 index 1b416fd08..000000000 --- a/bin/mycompiler/test/trivial/TestInterfaceMethod.jav +++ /dev/null @@ -1,10 +0,0 @@ -interface TestInterfaceMethod { - - empty1(); - - void empty2(); - - empty3(Integer a); - - empty4(String a, Integer b); -} \ No newline at end of file diff --git a/bin/mycompiler/test/trivial/TestInterfaceNotInferenced.jav b/bin/mycompiler/test/trivial/TestInterfaceNotInferenced.jav deleted file mode 100755 index f03d6b181..000000000 --- a/bin/mycompiler/test/trivial/TestInterfaceNotInferenced.jav +++ /dev/null @@ -1,10 +0,0 @@ -public interface TestInterfaceNotInferenced { - - public Integer m1(); - - /*should throw error, because not all Types defined*/ - public m2(); - - public void m3(a); - -} \ No newline at end of file diff --git a/bin/mycompiler/test/trivial/TestMethodEmpty.jav b/bin/mycompiler/test/trivial/TestMethodEmpty.jav deleted file mode 100755 index c9c21cd5c..000000000 --- a/bin/mycompiler/test/trivial/TestMethodEmpty.jav +++ /dev/null @@ -1,6 +0,0 @@ - -public class TestMethodEmpty { - - emptyMethod() { - } -} \ No newline at end of file diff --git a/bin/mycompiler/test/trivial/TestMethodEmptyGeneric.jav b/bin/mycompiler/test/trivial/TestMethodEmptyGeneric.jav deleted file mode 100755 index c7043f018..000000000 --- a/bin/mycompiler/test/trivial/TestMethodEmptyGeneric.jav +++ /dev/null @@ -1,10 +0,0 @@ - -public class TestMethodEmptyGeneric{ - - emptyMethodGeneric() { - } - - emptyMethodGeneric2() { - } - -} \ No newline at end of file diff --git a/bin/mycompiler/test/trivial/TestMethodEmptyParameter.jav b/bin/mycompiler/test/trivial/TestMethodEmptyParameter.jav deleted file mode 100755 index 7b5b47ac0..000000000 --- a/bin/mycompiler/test/trivial/TestMethodEmptyParameter.jav +++ /dev/null @@ -1,16 +0,0 @@ - -public class TestMethodEmptyParameter{ - - - emptyMethodParameter(Integer a) { - } - - - emptyMethodParameter2(Boolean a, Integer b) { - - } - - emptyMethodParameter3(a,b) { - } - -} \ No newline at end of file diff --git a/bin/mycompiler/test/trivial/TestMethodEmptyParameterGenericExtends.jav b/bin/mycompiler/test/trivial/TestMethodEmptyParameterGenericExtends.jav deleted file mode 100755 index 369661ac9..000000000 --- a/bin/mycompiler/test/trivial/TestMethodEmptyParameterGenericExtends.jav +++ /dev/null @@ -1,9 +0,0 @@ - -public class TestMethodEmptyParameterGenericExtends{ - - emptyMethodGenericExtends2(T a) { - } - - emptyMethodGenericExtends3(T a, S b) { - } -} \ No newline at end of file diff --git a/src/mycompiler/SourceFile.java b/src/mycompiler/SourceFile.java index 4167ce8a0..2db1dda70 100755 --- a/src/mycompiler/SourceFile.java +++ b/src/mycompiler/SourceFile.java @@ -604,7 +604,7 @@ public class SourceFile // ino.end public TypeAssumptions getPublicFieldAssumptions(){ - TypeAssumptions publicAssumptions = new TypeAssumptions(); + TypeAssumptions publicAssumptions = new TypeAssumptions(null); //Alle PublicAssumptions der in dieser SourceFile enthaltenen Klassen sammeln: for(Class klasse : KlassenVektor){ publicAssumptions.add(klasse.getPublicFieldAssumptions()); @@ -863,7 +863,7 @@ public class SourceFile * @return */ private TypeAssumptions getBasicAssumptions() { - TypeAssumptions ret = new TypeAssumptions(); + TypeAssumptions ret = new TypeAssumptions(null); // AB hier der Teil aus makeBasicAssumptionsFromJRE: Vector doneImports=new Vector(); @@ -955,7 +955,7 @@ public class SourceFile //CInstVarTypeAssumption instVar = new CInstVarTypeAssumption(className, fields[j].getName(), new RefType(fields[j].getType().getSimpleName()), MyCompiler.NO_LINENUMBER,MyCompiler.NO_LINENUMBER,new Vector()); CInstVarTypeAssumption instVar = new CInstVarTypeAssumption(className, fields[j].getName(), new RefType(fields[j].getType().getName(),-1), MyCompiler.NO_LINENUMBER,MyCompiler.NO_LINENUMBER,new Vector()); //basicAssumptions.addFieldOrLocalVarAssumption(instVar); - ret.add(instVar); + //ret.add(instVar); //auskommentiert von Andreas Stadelmeier } } for(int j=0;j())); } //basicAssumptions.addMethodIntersectionType(new CIntersectionType(method)); - ret.add(method); + //ret.add(method); //auskommentiert von Andreas Stadelmeier } } @@ -991,7 +991,7 @@ public class SourceFile constructor.addParaAssumption(new CParaTypeAssumption(className, methodName, constructors[j].getParameterTypes().length,0,paraType, new RefType(paraType,-1), MyCompiler.NO_LINENUMBER,MyCompiler.NO_LINENUMBER,new Vector())); } //basicAssumptions.addMethodIntersectionType(new CIntersectionType(constructor)); - ret.add(constructor); + //ret.add(constructor); //auskommentiert von Andreas Stadelmeier } } @@ -1376,7 +1376,7 @@ public class SourceFile return foo; */ - return new TypeAssumptions(); //TODO: Diese TypeAssumptions mit basic-Assumptions füllen + return new TypeAssumptions(null); //TODO: Diese TypeAssumptions mit basic-Assumptions füllen } // ino.end diff --git a/src/mycompiler/myclass/Method.java b/src/mycompiler/myclass/Method.java index f224cbd1d..ff26f8e9e 100755 --- a/src/mycompiler/myclass/Method.java +++ b/src/mycompiler/myclass/Method.java @@ -582,7 +582,7 @@ public class Method extends Field implements ITypeReplacementListener, IItemWith @Override public TypeAssumptions createTypeAssumptions(Class classmember) { Class parentClass = this.getParentClass(); - TypeAssumptions ret = new TypeAssumptions(parentClass.getName()); + TypeAssumptions ret = new TypeAssumptions(); ret.addMethodAssumption(new MethodAssumption(this, parentClass)); return ret; /* diff --git a/src/typinferenz/FunN.java b/src/typinferenz/FunN.java index 7e7f1fdd2..890a16f54 100755 --- a/src/typinferenz/FunN.java +++ b/src/typinferenz/FunN.java @@ -4,6 +4,9 @@ package typinferenz; import java.util.Iterator; import java.util.Vector; +import mycompiler.myclass.Method; +import mycompiler.myclass.ParameterList; +import typinferenz.assumptions.MethodAssumption; import typinferenz.assumptions.TypeAssumptions; import mycompiler.mytype.GenericTypeVar; import mycompiler.mytype.RefType; @@ -120,13 +123,21 @@ public class FunN extends RefType implements ITypeReplacementListener{ return 0; } + /* public CMethodTypeAssumption toCMethodTypeAssumption() { - CMethodTypeAssumption ret = new CMethodTypeAssumption(this, "apply", R, this.T.size(), 0,this.getOffset(),new Vector(),null); + //CMethodTypeAssumption ret = new CMethodTypeAssumption(this, "apply", R, this.T.size(), 0,this.getOffset(),new Vector(),null); + MethodAssumption ret = null; + Method method = new Method(); + method.set_Method_Name(this.getName()); + ParameterList paraList = new ParameterList(); + method.setParameterList(this.get_ParaList().clone()); for(Type t : T){ - ret.addParaAssumption(TypeAssumptions.createCParaTypeAssumption(t.get_Name(), t)); + + //ret.addParaAssumption(TypeAssumptions.createCParaTypeAssumption(t.get_Name(), t)); } return ret; } + */ @Override public JavaCodeResult printJavaCode(ResultSet resultSet){ diff --git a/src/typinferenz/Overloading.java b/src/typinferenz/Overloading.java index 7020e61ef..c961ec46a 100755 --- a/src/typinferenz/Overloading.java +++ b/src/typinferenz/Overloading.java @@ -2,6 +2,7 @@ package typinferenz; import java.util.Vector; +import typinferenz.assumptions.MethodAssumption; import typinferenz.assumptions.TypeAssumptions; import mycompiler.mystatement.MethodCall; import mycompiler.mytype.RefType; @@ -54,26 +55,28 @@ public class Overloading{ */ public OderConstraint generateConsstraints(){ OderConstraint ret = new OderConstraint(); - for(CMethodTypeAssumption assumption : assumptions.getMethodAssumptions(methodCall.getName(), methodCall.getArgumentList().size())){ - if(!(this.type instanceof TypePlaceholder) && !this.type.equals(assumption.getAssumedType()))break; + for(MethodAssumption methodAssumption : assumptions.getMethodAssumptions(methodCall.getName(), methodCall.getArgumentList().size())){ + if(!(this.type instanceof TypePlaceholder) && !this.type.equals(methodAssumption.getAssumedType()))break; UndConstraint methodConstraint = new UndConstraint(); //Ein Constraint für den ReturnType der Methode... - methodConstraint.addConstraint(assumption.getAssumedType(), type); + methodConstraint.addConstraint(methodAssumption.getAssumedType(), type); //Ein Constraint für die Parameter der Methode... - for(int i=0; i parameterAssumptions = new Vector(); - parameterAssumptions.add(assumption.getAssumedType()); - for(CParaTypeAssumption pAss : assumption.getParaAssumptions() ){ + parameterAssumptions.add(methodAssumption.getAssumedType()); + for(CParaTypeAssumption pAss : methodAssumption.getParaAssumptions() ){ parameterAssumptions.add(pAss.getAssumedType()); } + */ //Ein Constraint für den Receiver der Methode (falls vorhanden)... //ret.add(new Constraint(methodCall.get_Receiver().get_Expr().getTypeVariable(), new RefType(assumption.getClassName(), null, 0))); if(methodCall.get_Receiver() != null && methodCall.get_Receiver().get_Expr() != null) - methodConstraint.addConstraint(methodCall.get_Receiver().get_Expr().getType(), assumption.getClassType()); + methodConstraint.addConstraint(methodCall.get_Receiver().get_Expr().getType(), methodAssumption.getParentClassType()); //ret.add(new Constraint(methodCall.get_Receiver().get_Expr().getTypeVariable(), new RefType(assumption.getClassName(), parameterAssumptions, 0))); //return ret; //Bereits nach der ersten Assumption abbrechen... diff --git a/src/typinferenz/assumptions/Assumption.java b/src/typinferenz/assumptions/Assumption.java index 53d82866f..583d6d30f 100644 --- a/src/typinferenz/assumptions/Assumption.java +++ b/src/typinferenz/assumptions/Assumption.java @@ -1,5 +1,21 @@ package typinferenz.assumptions; +import typinferenz.Typeable; +import mycompiler.mytype.*; +import mycompiler.myclass.Class; + public class Assumption { + private Typeable typable; + + public Assumption(Typeable ass){ + this.typable = ass; + } + + public Type getAssumedType() { + return this.typable.getType(); + } + + + } diff --git a/src/typinferenz/assumptions/FieldVarAssumption.java b/src/typinferenz/assumptions/FieldVarAssumption.java index c6e81c3ea..c76bdd718 100644 --- a/src/typinferenz/assumptions/FieldVarAssumption.java +++ b/src/typinferenz/assumptions/FieldVarAssumption.java @@ -6,7 +6,7 @@ import mycompiler.myclass.Class; public class FieldVarAssumption extends Assumption { public FieldVarAssumption(Field fieldVar, Class inClass){ - + super(fieldVar); } } diff --git a/src/typinferenz/assumptions/LocalVarAssumption.java b/src/typinferenz/assumptions/LocalVarAssumption.java index 68a8bb170..94340d546 100644 --- a/src/typinferenz/assumptions/LocalVarAssumption.java +++ b/src/typinferenz/assumptions/LocalVarAssumption.java @@ -1,5 +1,9 @@ package typinferenz.assumptions; -public class LocalVarAssumption extends Assumption { +import mycompiler.mystatement.LocalVarDecl; +public class LocalVarAssumption extends Assumption { + public LocalVarAssumption(LocalVarDecl localVar){ + super(localVar); + } } diff --git a/src/typinferenz/assumptions/MethodAssumption.java b/src/typinferenz/assumptions/MethodAssumption.java index 994b519ac..26b08c397 100644 --- a/src/typinferenz/assumptions/MethodAssumption.java +++ b/src/typinferenz/assumptions/MethodAssumption.java @@ -2,11 +2,43 @@ package typinferenz.assumptions; import mycompiler.myclass.Method; import mycompiler.myclass.Class; +import mycompiler.mytypereconstruction.typeassumption.CParaTypeAssumption; +import mycompiler.mytype.*; +import mycompiler.myclass.Class; public class MethodAssumption extends Assumption { + private Method method; + private Class parentClass; + public MethodAssumption(Method assumedMethod, Class parentClass){ - + super(assumedMethod); + this.method = assumedMethod; + this.parentClass = parentClass; + } + + public String getMethodName() { + return this.method.get_Method_Name(); } + public int getParaCount(){ + return this.method.getParameterCount(); + } + + /** + * Liefert den Typ des i-ten Parameters dieser Method-Assumption + * @param i + * @return + */ + public Type getParameterType(int i) { + return this.method.getParameterList().getParameterAt(i).getType(); + } + + public Type getParentClassType() { + return new RefType(this.parentClass.getName(),0); + } + + + + } diff --git a/src/typinferenz/assumptions/ParameterAssumption.java b/src/typinferenz/assumptions/ParameterAssumption.java index f8c4935a9..543573d62 100644 --- a/src/typinferenz/assumptions/ParameterAssumption.java +++ b/src/typinferenz/assumptions/ParameterAssumption.java @@ -1,5 +1,15 @@ package typinferenz.assumptions; -public class ParameterAssumption extends Assumption { +import mycompiler.myclass.FormalParameter; +/** + * ParameterAssumptions repräsentieren die Methodenparameter innerhalb des Rumpfes einer Methode. + * + * @author janulrich + * + */ +public class ParameterAssumption extends Assumption { + public ParameterAssumption(FormalParameter parameter){ + super(parameter); + } } diff --git a/src/typinferenz/assumptions/TypeAssumptions.java b/src/typinferenz/assumptions/TypeAssumptions.java index 2452616cd..b429df327 100755 --- a/src/typinferenz/assumptions/TypeAssumptions.java +++ b/src/typinferenz/assumptions/TypeAssumptions.java @@ -5,6 +5,8 @@ import java.util.Vector; import sun.reflect.generics.reflectiveObjects.NotImplementedException; import typinferenz.FunN; +import typinferenz.FunNInterface; +import typinferenz.FunNMethod; import typinferenz.TypinferenzException; import mycompiler.mytype.GenericTypeVar; import mycompiler.mytype.RefType; @@ -52,14 +54,26 @@ public class TypeAssumptions { * Dieser Konstruktor setzt bei der Initialisierung auch den Wert von "this" * @param klassenname - Wert für "this" */ - public TypeAssumptions(String klassenname){ - this.thisClassName = klassenname; + public TypeAssumptions(){ + //this.thisClassName = klassenname; } public void addMethodAssumption(MethodAssumption mAss){ this.methodAssumptions.add(mAss); } + + public void addFieldAssumption(FieldVarAssumption ass){ + this.fieldAssumptions.add(ass); + } + + public void addLocalVarAssumption(LocalVarAssumption ass){ + this.localVarAssumptions.add(ass); + } + + public void addParameterAssumption(ParameterAssumption ass){ + this.parameterAssumptions.add(ass); + } /** * Liefert alle bekannten öffentlichen Feldern mit dem Namen withName. Dabei werden alle bekannten Klassen durchsucht. @@ -96,12 +110,53 @@ public class TypeAssumptions { - - + /** + * Sucht nach Assumptions zu einer Methode mit dem Namen methodName und parameterCount Parametern. + * @param methodName + * @param parameterCount Anzahl der Parameter der gesuchten Methoden-Assumption + * @return + */ + public Vector getMethodAssumptions(String methodName, int parameterCount){ + Vector ret = new Vector(); + for(MethodAssumption ass : this.methodAssumptions){ + if(ass.getMethodName().equals(methodName) && ass.getParaCount() == parameterCount){ + ret.add(ass); + } + } + + //Falls es sich um die apply-Methode eines FunN-Interface handelt: + if(methodName.equals("apply")){ //Ein Workaround für den Typinferenzalgorithmus TODO: Das hier rausnehmen. + //CMethodTypeAssumption funNAssumption = new FunN(parameterCount).toCMethodTypeAssumption(); + MethodAssumption funNAssumption = new MethodAssumption(new FunNMethod(parameterCount), new FunNInterface()); + ret.add(funNAssumption); + } + if(ret.size()==0)throw new TypinferenzException("Eine Methode "+methodName+" ist in den Assumptions nicht vorhanden"); + return ret; + } - + + /** + * Durchsucht die Assumptions des aktuellen Gültigkeitsbereichs (lokale Variablen und Felder der aktuellen Klasse) nach einem Eintrag für den übergebenen Variablennamen. + * In den Assumptions wird dann in der Reihenfolge LocalVarAssumptions, FieldAssumption nach dem übergebenen Variablennamen gesucht. + * @param variableName - der Identifier der gesuchten Variablen + * @return - Der Typ für diesen Identifier. + */ + public Type getVarType(String variableName){ + //Zuerst die Parameter durchsuchen + for(CTypeAssumption ass : this.assumptions){//this.getParameterAssumptions(null)){ + if(ass.getIdentifier().equals(variableName))return ass.getAssumedType(); + } + //TODO: Dann die lokalen Variablen + // ... (noch nicht implementiert) + //und zuletzt die Felder der Klasse in dessen Namensraum sich dieses AssumptionSet befindet. + for(CTypeAssumption ass : this.getInstVarAssumptions()){ + if(ass.getIdentifier().equals(variableName))return ass.getAssumedType(); + } + //Wird keine Assumption gefunden, muss ein Fehler vorliegen: + throw new TypinferenzException("Eine Variable "+variableName+" ist in den Assumptions nicht vorhanden"); + } public TypeAssumptions add(TypeAssumptions assumptions){ this.methodAssumptions.addAll(assumptions.methodAssumptions); @@ -116,7 +171,7 @@ public class TypeAssumptions { @Override public TypeAssumptions clone(){ - TypeAssumptions ret = new TypeAssumptions(thisClassName); + TypeAssumptions ret = new TypeAssumptions(); ret.add(this); return ret; }