Compare commits

..

149 Commits

Author SHA1 Message Date
stan 4085c62231 Remove --enable-preview from pom.xml
Build and Test with Maven / Build-and-test-with-Maven (push) Successful in 59s
2024-08-15 15:25:59 +02:00
stan 8421023ea8 Set to Java 21 2024-08-15 15:23:06 +02:00
JanUlrich 852659dce6 Set Java Version to 21
Build and Test with Maven / Build-and-test-with-Maven (push) Successful in 58s
2024-08-08 12:32:07 +02:00
dholle 7012eb1d86 Remove jav-files
Build and Test with Maven / Build-and-test-with-Maven (push) Failing after 43s
2024-08-07 17:07:53 +02:00
dholle 7f1578a5b7 Fix build
Build and Test with Maven / Build-and-test-with-Maven (push) Failing after 43s
2024-08-07 17:02:27 +02:00
dholle d176dfb1e3 Remove tests
Build and Test with Maven / Build-and-test-with-Maven (push) Failing after 44s
2024-08-07 16:51:46 +02:00
dholle 494ce63838 Remove everything that doesn't touch constraints
Build and Test with Maven / Build-and-test-with-Maven (push) Failing after 49s
2024-08-07 16:40:06 +02:00
dholle edafbbc5a0 Fix #340
Build and Test with Maven / Build-and-test-with-Maven (push) Failing after 44s
2024-07-23 15:33:09 +02:00
dholle ba8810e5df I don't know why isFunctionalInterface returns true on things that aren't even interfaces but here we go
Build and Test with Maven / Build-and-test-with-Maven (push) Failing after 1m0s
2024-07-19 18:04:33 +02:00
dholle 63493ed0f7 Make lambdas castable
Build and Test with Maven / Build-and-test-with-Maven (push) Waiting to run
2024-07-19 17:26:39 +02:00
dholle ec92b5d5e1 Work on Bug #332
Build and Test with Maven / Build-and-test-with-Maven (push) Failing after 46s
2024-06-13 17:23:19 +02:00
dholle 091a6b8f1f Fix merge conflict
Build and Test with Maven / Build-and-test-with-Maven (push) Failing after 43s
2024-06-07 12:16:03 +02:00
dholle 60a1f3b220 Merge branch 'targetBytecode' of https://gitea.hb.dhbw-stuttgart.de/JavaTX/JavaCompilerCore into targetBytecode
Build and Test with Maven / Build-and-test-with-Maven (push) Failing after 47s
2024-06-07 12:04:01 +02:00
dholle 7e6aeaf728 Make Function Types implement others to allow Subtyping, fixes #337 2024-06-07 12:03:16 +02:00
Ruben ea217d16d5 Revert "feat: changes in Grammar and Parser so typeless Recs get recognised"
Build and Test with Maven / Build-and-test-with-Maven (push) Failing after 6m35s
This reverts commit 7650813bb7.
2024-06-06 12:07:32 +02:00
Ruben 7650813bb7 feat: changes in Grammar and Parser so typeless Recs get recognised
Build and Test with Maven / Build-and-test-with-Maven (push) Has been cancelled
2024-06-06 12:06:28 +02:00
dholle 4880527d4d Give an exception if a method has been duplicated
Build and Test with Maven / Build-and-test-with-Maven (push) Failing after 9m6s
2024-05-27 15:51:48 +02:00
dholle 50f2a29e1e Merge branch 'targetBytecode' of https://gitea.hb.dhbw-stuttgart.de/JavaTX/JavaCompilerCore into targetBytecode
Build and Test with Maven / Build-and-test-with-Maven (push) Failing after 8m1s
2024-05-27 12:17:24 +02:00
dholle 99f219de3b Work on #338, partially fixed 2024-05-27 12:14:00 +02:00
dholle 12bb613eb0 Fix test cases
Build and Test with Maven / Build-and-test-with-Maven (push) Failing after 7m42s
2024-05-24 12:46:26 +02:00
dholle 141e1cbc94 Make wildcard imports work again #330
Build and Test with Maven / Build-and-test-with-Maven (push) Failing after 7m6s
2024-05-23 11:39:56 +02:00
julian 5b4ea5a0c5 fix #327 and add support for glob syntax in classpath input
Build and Test with Maven / Build-and-test-with-Maven (push) Failing after 5m37s
2024-05-22 23:47:50 +02:00
dholle b824680508 Fix #335
Build and Test with Maven / Build-and-test-with-Maven (push) Failing after 6m34s
2024-05-22 12:55:47 +02:00
dholle 295bf079b9 Add continue and do-while, close #331
Build and Test with Maven / Build-and-test-with-Maven (push) Failing after 6m15s
2024-05-21 12:14:12 +02:00
dholle 974582f7e5 Fix #333
Build and Test with Maven / Build-and-test-with-Maven (push) Failing after 5m57s
2024-05-17 10:49:45 +02:00
dholle 2ded0c9044 Add public
Build and Test with Maven / Build-and-test-with-Maven (push) Failing after 6m27s
2024-05-15 16:46:15 +02:00
pl@gohorb.ba-horb.de c3343959c5 modified: ../resources/AllgemeinTest/Box.jav
Build and Test with Maven / Build-and-test-with-Maven (push) Failing after 6m43s
modified:   ../resources/bytecode/javFiles/Box.jav
	modified:   ../src/test/java/AllgemeinTest.java
	modified:   ../src/test/java/TestComplete.java
2024-05-15 14:26:42 +02:00
pl@gohorb.ba-horb.de 39f04b1a1b Merge branch 'targetBytecode' of ssh://gohorb.ba-horb.de/bahome/projekt/git/JavaCompilerCore into targetBytecode 2024-05-14 22:53:52 +02:00
Pluemicke Martin db01b0c8dd new file: resources/AllgemeinTest/Box.jav 2024-05-14 22:50:20 +02:00
dholle 662756ac18 Merge branch 'targetBytecode' of https://gitea.hb.dhbw-stuttgart.de/JavaTX/JavaCompilerCore into targetBytecode
Build and Test with Maven / Build-and-test-with-Maven (push) Failing after 5m26s
2024-05-10 16:51:10 +02:00
dholle b0bf41968e Bug325 2024-05-10 16:50:06 +02:00
pl@gohorb.ba-horb.de 2221b559ca Implementierungen von Interfaces eingefuegt und Overriding ersetzt durch implementierung
Build and Test with Maven / Build-and-test-with-Maven (push) Successful in 6m2s
modified:   ../src/main/java/de/dhbwstuttgart/syntaxtree/factory/ASTFactory.java

Overriding ersetzt durch implementierung (Umbennennung)
	modified:   ../resources/bytecode/javFiles/Matrix.jav
	modified:   ../src/main/java/de/dhbwstuttgart/syntaxtree/Method.java
	modified:   ../src/main/java/de/dhbwstuttgart/typeinference/constraints/Constraint.java
	modified:   ../src/main/java/de/dhbwstuttgart/typeinference/constraints/ConstraintSet.java
	modified:   ../src/main/java/de/dhbwstuttgart/typeinference/typeAlgo/TYPEStmt.java
	modified:   ../src/main/java/de/dhbwstuttgart/typeinference/unify/RuleSet.java
	modified:   ../src/main/java/de/dhbwstuttgart/typeinference/unify/TypeUnifyTask.java
2024-05-10 14:16:23 +02:00
pl@gohorb.ba-horb.de 021b7ec9fe Fehler vom vorigen korriert Commit
modified:   ../resources/bytecode/javFiles/Matrix.jav
	modified:   ../src/main/java/de/dhbwstuttgart/typeinference/constraints/Constraint.java
	modified:   ../src/main/java/de/dhbwstuttgart/typeinference/constraints/ConstraintSet.java
	modified:   ../src/test/java/TestComplete.java
2024-05-08 09:07:22 +02:00
pl@gohorb.ba-horb.de 154d4823e4 isOverridden eingefuegt.
Problem beim Konvertioeren
	modified:   ../src/main/java/de/dhbwstuttgart/core/JavaTXCompiler.java
	modified:   ../src/main/java/de/dhbwstuttgart/syntaxtree/Method.java
	modified:   ../src/main/java/de/dhbwstuttgart/syntaxtree/factory/ASTFactory.java
	modified:   ../src/main/java/de/dhbwstuttgart/typeinference/assumptions/MethodAssumption.java
	modified:   ../src/main/java/de/dhbwstuttgart/typeinference/constraints/Constraint.java
	modified:   ../src/main/java/de/dhbwstuttgart/typeinference/constraints/ConstraintSet.java
	modified:   ../src/main/java/de/dhbwstuttgart/typeinference/typeAlgo/TYPEStmt.java
	modified:   ../src/main/java/de/dhbwstuttgart/typeinference/unify/RuleSet.java
	modified:   ../src/main/java/de/dhbwstuttgart/typeinference/unify/TypeUnifyTask.java
	modified:   ../src/main/java/de/dhbwstuttgart/typeinference/unify/model/FiniteClosure.java
2024-05-08 00:14:21 +02:00
pl@gohorb.ba-horb.de 71dfe5d9e1 Bei diesem und vorigen Commit wurde der Bug #328
Build and Test with Maven / Build-and-test-with-Maven (push) Successful in 11m55s
#328
geloest.

1. src/main/java/de/dhbwstuttgart/typeinference/unify/TypeUnifyTask.java
in der Methode copute wurden die methodSignatureConstraints der bereits zu Beginn
aufegloesten einer Oder Constraints in die Methodconstraints der Unifikation geschrieben
2. Elementtyp der linken Seiten der methodSignatureConstraints wurden von RefTypeOrTPHOrWildcardOrGeneric auf TypePlaceholder geaendert, weil dort nur TypePlaceholder geaendert.
3. src/main/java/de/dhbwstuttgart/parser/SyntaxTreeGenerator/SyntaxTreeGenerator.java
in der Methode prepareBlock wurde der Typ des Rückgabewerts des supercalls von Void auf eine
Freshtpevar gesetzt.
4. src/main/java/de/dhbwstuttgart/typeinference/unify/TypeUnifyTask.java
in der unify2-Methode wurde am Ende der Aufruf der Substitution nach Hinzufuegen der
Methodconstraints auskommentiert -> hat zu nicht geloesten Constraints gefuehrt.

	modified:   src/main/java/de/dhbwstuttgart/typeinference/unify/TypeUnifyTask.java
	modified:   src/test/java/TestComplete.java
2024-05-02 16:33:37 +02:00
pl@gohorb.ba-horb.de 58110c474a mathStrucInteger.jav funktioniert gerade nicht
Build and Test with Maven / Build-and-test-with-Maven (push) Failing after 12m21s
modified:   resources/bytecode/javFiles/Matrix.jav
	modified:   src/main/java/de/dhbwstuttgart/parser/SyntaxTreeGenerator/StatementGenerator.java
	modified:   src/main/java/de/dhbwstuttgart/parser/SyntaxTreeGenerator/SyntaxTreeGenerator.java
	modified:   src/main/java/de/dhbwstuttgart/syntaxtree/statement/MethodCall.java
	modified:   src/main/java/de/dhbwstuttgart/syntaxtree/statement/NewClass.java
	modified:   src/main/java/de/dhbwstuttgart/syntaxtree/statement/SuperCall.java
	modified:   src/main/java/de/dhbwstuttgart/syntaxtree/statement/ThisCall.java
	modified:   src/main/java/de/dhbwstuttgart/typeinference/constraints/Constraint.java
	modified:   src/main/java/de/dhbwstuttgart/typeinference/unify/TypeUnifyTask.java
	modified:   src/main/java/de/dhbwstuttgart/typeinference/unify/model/FiniteClosure.java
	modified:   src/main/java/de/dhbwstuttgart/typeinference/unify/model/ReferenceType.java
2024-05-02 00:13:45 +02:00
dholle df2ec4b1ba Fix #326, convert captures to correct types
Build and Test with Maven / Build-and-test-with-Maven (push) Failing after 3m9s
2024-04-30 16:55:40 +02:00
dholle 2c66a1d6e6 add class file
Build and Test with Maven / Build-and-test-with-Maven (push) Failing after 3m58s
2024-04-29 10:27:23 +02:00
dholle c76ee355d8 Add bug for #328
Build and Test with Maven / Build-and-test-with-Maven (push) Has been cancelled
2024-04-29 10:25:01 +02:00
dholle a5c314c5c5 Fix #328
Build and Test with Maven / Build-and-test-with-Maven (push) Successful in 2m50s
2024-04-28 19:25:20 +02:00
dholle cba35a4bec Don't load source files twice
Build and Test with Maven / Build-and-test-with-Maven (push) Successful in 2m51s
2024-04-27 23:08:15 +02:00
dholle b774281cbb Add Ternary, fix #324
Build and Test with Maven / Build-and-test-with-Maven (push) Successful in 2m48s
2024-04-22 12:17:53 +02:00
dholle 9358130468 Fix package weirdness? See #322
Build and Test with Maven / Build-and-test-with-Maven (push) Successful in 3m3s
2024-04-18 11:51:08 +02:00
dholle 708aa64283 Fix current directory not being added to path
Build and Test with Maven / Build-and-test-with-Maven (push) Successful in 2m50s
2024-04-18 10:31:12 +02:00
dholle c21e5202d6 Fix #323
Build and Test with Maven / Build-and-test-with-Maven (push) Successful in 3m14s
2024-04-18 10:20:35 +02:00
dholle b3bd5cde10 Fix tests
Build and Test with Maven / Build-and-test-with-Maven (push) Successful in 3m58s
2024-04-15 16:44:34 +02:00
dholle df78937ef3 Fix test case a bit
Build and Test with Maven / Build-and-test-with-Maven (push) Failing after 3m35s
2024-04-15 16:18:25 +02:00
dholle 7fb4824f8d Add modulo, fix #319
Build and Test with Maven / Build-and-test-with-Maven (push) Failing after 2m53s
2024-04-12 15:40:22 +02:00
dholle e0d71a6003 fix console
Build and Test with Maven / Build-and-test-with-Maven (push) Failing after 2m37s
2024-04-12 14:17:15 +02:00
dholle 49803385cf Fix optional parameters
Build and Test with Maven / Build-and-test-with-Maven (push) Failing after 2m44s
2024-04-12 13:58:11 +02:00
dholle 39d02f792c Deal with multiple source files properly, don't throw all the constraints together
Build and Test with Maven / Build-and-test-with-Maven (push) Failing after 2m21s
2024-04-12 10:48:13 +02:00
dholle 4fc78f494c More poking around
Build and Test with Maven / Build-and-test-with-Maven (push) Successful in 3m1s
2024-04-10 10:22:34 +02:00
dholle b752219d8c Throw exception if class doesn't exist
Build and Test with Maven / Build-and-test-with-Maven (push) Failing after 3m11s
2024-04-10 10:03:59 +02:00
dholle ec890356e4 Don't trim stack trace because some tests randomly fail and we need to know why
Build and Test with Maven / Build-and-test-with-Maven (push) Failing after 2m59s
2024-04-10 09:58:01 +02:00
dholle d405b0c3a2 Merge branch 'targetBytecode' of ssh://gitea.hb.dhbw-stuttgart.de:2222/JavaTX/JavaCompilerCore into targetBytecode
Build and Test with Maven / Build-and-test-with-Maven (push) Successful in 2m51s
2024-04-10 09:42:47 +02:00
dholle 6c8657b7a8 Work on #308 2024-04-10 09:42:31 +02:00
pl@gohorb.ba-horb.de bcce4cee19 modified: src/main/java/de/dhbwstuttgart/parser/SyntaxTreeGenerator/SyntacticSugar.java
Build and Test with Maven / Build-and-test-with-Maven (push) Failing after 2m21s
Im Visitor ReturnFinder wuder nicht beruecksichtigt, dass auch in einem Lambda-Ausdruck ein Reurn stehen kann, welchen die umgebenden Block nicht beendet.
2024-04-09 18:25:26 +02:00
dholle e6cd4038e2 Fix bytecode error when calling interface functions
Build and Test with Maven / Build-and-test-with-Maven (push) Failing after 2m48s
2024-04-09 15:52:44 +02:00
dholle e50f941b79 Merge branch 'targetBytecode' of ssh://gitea.hb.dhbw-stuttgart.de:2222/JavaTX/JavaCompilerCore into targetBytecode
Build and Test with Maven / Build-and-test-with-Maven (push) Failing after 2m33s
2024-04-09 14:59:16 +02:00
dholle cb7d0e22cc Fix #314 2024-04-09 14:58:43 +02:00
pl@gohorb.ba-horb.de 0d5be89310 modified: ../src/main/java/de/dhbwstuttgart/typeinference/unify/Match.java
Build and Test with Maven / Build-and-test-with-Maven (push) Failing after 2m50s
modified:   ../src/test/java/TestComplete.java
2024-04-09 01:50:42 +02:00
dholle 0b7f07108f Fix #313
Build and Test with Maven / Build-and-test-with-Maven (push) Successful in 2m43s
2024-04-08 14:25:41 +02:00
dholle 6b0816c1c4 Add test for #309
Build and Test with Maven / Build-and-test-with-Maven (push) Successful in 2m47s
2024-04-08 14:02:57 +02:00
dholle f66b9099f3 Fix #311
Build and Test with Maven / Build-and-test-with-Maven (push) Successful in 2m55s
2024-04-08 13:51:49 +02:00
dholle da74898f9d Fix #312
Build and Test with Maven / Build-and-test-with-Maven (push) Successful in 2m45s
2024-04-08 13:18:27 +02:00
dholle 46a7f61234 Fix #310
Build and Test with Maven / Build-and-test-with-Maven (push) Successful in 2m49s
2024-04-08 11:52:52 +02:00
dholle e59accf7ee Fix #308
Build and Test with Maven / Build-and-test-with-Maven (push) Has been cancelled
2024-04-08 11:40:46 +02:00
pl@gohorb.ba-horb.de 4b110244f2 new file: ../../AllgemeinTest/List.jav
Build and Test with Maven / Build-and-test-with-Maven (push) Successful in 2m46s
2024-04-07 17:31:05 +02:00
pl@gohorb.ba-horb.de e37040f367 Bug 307 gefixt
Build and Test with Maven / Build-and-test-with-Maven (push) Successful in 2m51s
Changes to be committed:
	modified:   src/main/java/de/dhbwstuttgart/typeinference/typeAlgo/TYPEStmt.java
	modified:   src/main/java/de/dhbwstuttgart/typeinference/unify/TypeUnifyTask.java
	modified:   src/test/java/TestComplete.java
2024-04-03 00:11:01 +02:00
dholle 6850a8fa21 Decouple unify from the rest of the code
Build and Test with Maven / Build-and-test-with-Maven (push) Failing after 3m22s
2024-03-28 10:35:34 +01:00
dholle 877e5ed38a Reversing alone would disturb the parameters (#298)
Build and Test with Maven / Build-and-test-with-Maven (push) Successful in 1m2s
2024-03-27 14:52:15 +01:00
dholle 82b4450857 Fix 298 for real this time?
Build and Test with Maven / Build-and-test-with-Maven (push) Successful in 1m3s
2024-03-27 14:39:43 +01:00
dholle b70e435120 Work on issue
Build and Test with Maven / Build-and-test-with-Maven (push) Failing after 59s
2024-03-27 12:21:57 +01:00
dholle 3b14cd609f Revert "Get rid of mutable state, hopefully fix #307"
This reverts commit bc61fc2e1d.
2024-03-27 09:57:21 +01:00
dholle 8fdfbf875b Fix #298 maybe?
Build and Test with Maven / Build-and-test-with-Maven (push) Failing after 2m42s
2024-03-26 17:31:48 +01:00
dholle bc61fc2e1d Get rid of mutable state, hopefully fix #307
Build and Test with Maven / Build-and-test-with-Maven (push) Successful in 2m57s
2024-03-26 16:54:24 +01:00
dholle 62f2e05f35 Add test case for #307
Build and Test with Maven / Build-and-test-with-Maven (push) Successful in 2m37s
2024-03-26 11:04:03 +01:00
dholle 606ce8b82d Implement AND/OR/XOR, fix #305
Build and Test with Maven / Build-and-test-with-Maven (push) Successful in 2m26s
2024-03-26 10:54:32 +01:00
dholle c84befae51 Add Negation operator (fixes #304)
Build and Test with Maven / Build-and-test-with-Maven (push) Successful in 2m41s
2024-03-25 17:05:20 +01:00
dholle 7f3c1686ec Fix #303
Build and Test with Maven / Build-and-test-with-Maven (push) Successful in 2m37s
2024-03-25 15:10:47 +01:00
dholle 43da2ffbdc Fix #302
Build and Test with Maven / Build-and-test-with-Maven (push) Successful in 2m47s
2024-03-25 14:49:18 +01:00
dholle 9472b5c86f Types are weird in this one
Build and Test with Maven / Build-and-test-with-Maven (push) Successful in 2m23s
2024-03-25 13:51:56 +01:00
dholle 7cb0e9dbb7 Taking the super methods parameters should only happen for the types, fix #306
Build and Test with Maven / Build-and-test-with-Maven (push) Failing after 2m23s
2024-03-25 13:43:30 +01:00
dholle e07521d9b6 Fix #298
Build and Test with Maven / Build-and-test-with-Maven (push) Failing after 2m33s
2024-03-25 12:14:03 +01:00
dholle c2ee12397f Work on issue
Build and Test with Maven / Build-and-test-with-Maven (push) Failing after 2m53s
2024-03-22 14:54:23 +01:00
dholle e6321ff8bc Fix gtvs being strange, #301 2024-03-21 17:40:42 +01:00
dholle 786e0a7a23 Fix #300 and also call private methods correctly
Build and Test with Maven / Build-and-test-with-Maven (push) Failing after 2m35s
2024-03-21 11:49:16 +01:00
dholle 1c63321b30 Fix #294
Build and Test with Maven / Build-and-test-with-Maven (push) Failing after 2m35s
2024-03-20 14:37:15 +01:00
dholle 1f74345324 Upload test for #298
Build and Test with Maven / Build-and-test-with-Maven (push) Failing after 3m16s
2024-03-19 15:19:57 +01:00
dholle 518f58e08f Maybe null here was in fact right?
Build and Test with Maven / Build-and-test-with-Maven (push) Successful in 2m43s
2024-03-18 13:40:37 +01:00
dholle 0acfe6c0d4 Implement ThisCall (fix #295)
Build and Test with Maven / Build-and-test-with-Maven (push) Has been cancelled
2024-03-18 13:29:53 +01:00
dholle c07d4d36e9 Fix wrong type conversion, see #297
Build and Test with Maven / Build-and-test-with-Maven (push) Successful in 2m51s
2024-03-18 12:14:03 +01:00
dholle 01e374eadd Fix #296
Build and Test with Maven / Build-and-test-with-Maven (push) Failing after 3m29s
2024-03-18 10:14:40 +01:00
dholle a1b5c0541b Fix NPE in generics, probably because interface method don't have code
Build and Test with Maven / Build-and-test-with-Maven (push) Successful in 2m55s
2024-03-15 17:14:27 +01:00
dholle 66c8c307b0 Fix recursive packages
Build and Test with Maven / Build-and-test-with-Maven (push) Successful in 2m25s
2024-03-14 15:23:31 +01:00
dholle ebd6a00a39 Fix the rest of the test cases
Build and Test with Maven / Build-and-test-with-Maven (push) Successful in 2m50s
2024-03-14 14:38:02 +01:00
dholle f57d89c966 Manage imports per source file instead of globally, should fix #290 2024-03-14 13:51:20 +01:00
dholle f9188e65ca Public all the things 2024-03-14 13:50:56 +01:00
dholle e354838491 Use wildcard constraint in foreach, fixes #291 and hopefully doesn't break anything
Build and Test with Maven / Build-and-test-with-Maven (push) Failing after 2m45s
2024-03-14 10:23:19 +01:00
dholle e17f08263e Fix <?> Wildcard not working in STG, fixes #287
Build and Test with Maven / Build-and-test-with-Maven (push) Failing after 2m23s
2024-03-13 11:42:32 +01:00
dholle 2cb84f9e2b Ignore annotations in STG, fix #288
Build and Test with Maven / Build-and-test-with-Maven (push) Failing after 2m33s
2024-03-13 11:29:17 +01:00
dholle 83ae05ea4a Fix #289
Build and Test with Maven / Build-and-test-with-Maven (push) Failing after 3m13s
2024-03-13 11:21:00 +01:00
dholle 26452eb5de Fix #286
Build and Test with Maven / Build-and-test-with-Maven (push) Failing after 3m19s
2024-03-11 16:16:10 +01:00
dholle 38827544c9 Split up test and compile to improve readability
Build and Test with Maven / Build-and-test-with-Maven (push) Failing after 2m21s
2024-03-08 17:33:49 +01:00
dholle ff905390e8 Limit stack traces
Build and Test with Maven / Build-and-test-with-Maven (push) Failing after 2m47s
2024-03-08 17:30:01 +01:00
dholle 2d9094ec4e Redirect test output to file in order for the test output to be visible on gitea
Build and Test with Maven / Build-and-test-with-Maven (push) Failing after 2m28s
2024-03-08 17:20:54 +01:00
dholle e27eb3a3fe Fix #285
Build and Test with Maven / Build-and-test-with-Maven (push) Failing after 2m37s
2024-03-08 16:58:00 +01:00
dholle 73ca790711 Create folder
Build and Test with Maven / Build-and-test-with-Maven (push) Failing after 2m36s
2024-03-08 15:26:40 +01:00
dholle 452064398a Update actions
Build and Test with Maven / Build-and-test-with-Maven (push) Failing after 58s
2024-03-08 15:08:45 +01:00
dholle 20d6cb8eb9 Remove sudo?
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 1m3s
2024-03-08 15:05:02 +01:00
dholle b7f1db5d80 Update workflow
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 7s
2024-03-08 15:00:17 +01:00
dholle b327518921 Update workflow
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 52s
2024-03-08 14:54:58 +01:00
dholle 945b47c762 Fix #284
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 8s
2024-03-08 14:42:49 +01:00
dholle 65a71ebe0c Add test for #285 and partially fix it
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 7s
2024-03-08 14:00:52 +01:00
dholle deeb67c4f7 Add test workflow
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 1m0s
2024-03-07 14:41:50 +01:00
dholle c92edeaf2a Merge branch 'targetBytecode' of ssh://gohorb.ba-horb.de:/bahome/projekt/git/JavaCompilerCore into targetBytecode 2024-03-07 10:44:37 +01:00
dholle 01e3d31f1a Add Object methods to every interface, fixes #125 2024-03-06 14:10:57 +01:00
dholle a90e9df1e8 Fix regression #283 2024-03-05 10:26:30 +01:00
pl@gohorb.ba-horb.de 1c1f5ae29f Merge branch 'targetBytecode' of ssh://gohorb.ba-horb.de/bahome/projekt/git/JavaCompilerCore into targetBytecode 2024-03-04 19:37:40 +01:00
pl@gohorb.ba-horb.de 8ab5bbd831 modified: src/test/java/AllgemeinTest.java 2024-03-04 19:37:10 +01:00
dholle 1877d7f170 Add test for #112 2024-03-04 12:19:56 +01:00
dholle 388614b220 Add testcase for LamRunnable 2024-03-04 12:00:29 +01:00
dholle f2e43f180c Add test for issue #125 2024-03-04 11:51:28 +01:00
dholle 59585296b0 Fix single expressions not converting to blocks. Fixes #123 2024-03-04 11:30:36 +01:00
dholle f11d4b0716 Fix for loop overflowing the stack. Fixes #122 2024-03-04 10:58:26 +01:00
dholle 584690596e Add filename to debug output, closes #126 2024-03-01 17:34:40 +01:00
dholle 9c6372c3ba Thats probably important 2024-02-28 13:22:13 +01:00
dholle 688358aa33 Add more debug help 2024-02-28 13:16:32 +01:00
dholle a60282414c Add location information to constraints 2024-02-27 16:25:47 +01:00
dholle 75b9020cf9 Fix up Character 2024-02-26 15:02:15 +01:00
dholle e88d4428c5 Fix constructor overloads getting picked with the wrong arity 2024-02-05 15:24:06 +01:00
dholle dcfafe5995 Fix null literal 2024-02-05 14:46:00 +01:00
dholle a035589647 Implement throw 2024-02-01 11:58:08 +01:00
dholle 9da763b361 Add instanceof 2024-01-31 17:27:18 +01:00
dholle 700ea125fc Throw different exception 2024-01-30 15:46:02 +01:00
dholle f18903834e Fix super calls 2024-01-23 14:00:42 +01:00
dholle b80cc726c8 Add ForEach loop 2024-01-19 16:29:59 +01:00
pl@gohorb.ba-horb.de 6cc40162da Merge branch 'targetBytecode' of gohorb.ba-horb.de:/bahome/projekt/git/JavaCompilerCore into targetBytecode 2023-12-15 13:49:35 +01:00
pl@gohorb.ba-horb.de 71899ac673 Please enter the commit message for your changes. Lines starting
with '#' will be ignored, and an empty message aborts the commit.
2023-12-15 13:47:25 +01:00
pl@gohorb.ba-horb.de a84d1ffdd7 modified: ../src/main/java/de/dhbwstuttgart/core/JavaTXCompiler.java
Resultmodell aktiviert
	modified:   ../src/main/java/de/dhbwstuttgart/typeinference/unify/TypeUnifyTask.java
a < void und void < a => a = void.
2023-11-08 18:28:54 +01:00
pl@gohorb.ba-horb.de a3d63a0266 modified: ../src/main/java/de/dhbwstuttgart/core/JavaTXCompiler.java
modified:   ../src/test/java/TestComplete.java
2023-11-08 18:10:56 +01:00
pl@gohorb.ba-horb.de dcc2da85c5 Merge branch 'targetBytecode' of ssh://gohorb.ba-horb.de/bahome/projekt/git/JavaCompilerCore into targetBytecode 2023-11-07 00:13:53 +01:00
pl@gohorb.ba-horb.de 6f193b19ab modified: src/main/java/de/dhbwstuttgart/parser/SyntaxTreeGenerator/SyntaxTreeGenerator.java
modified:   src/test/java/TestComplete.java
2023-11-07 00:13:43 +01:00
dholle 1c55954e5c Merge branch 'targetBytecode' of ssh://gohorb.ba-horb.de:/bahome/projekt/git/JavaCompilerCore into targetBytecode 2023-11-06 12:31:27 +01:00
dholle ec04f01a10 Allow relative paths by getting the absolute file (seriously Java) 2023-11-06 12:30:42 +01:00
pl@gohorb.ba-horb.de 78a2fddc21 modified: ../../../../../resources/bytecode/javFiles/Cycle.class 2023-11-03 20:30:22 +01:00
pl@gohorb.ba-horb.de 44f8899157 Merge branch 'targetBytecode' of gohorb.ba-horb.de:/bahome/projekt/git/JavaCompilerCore into targetBytecode 2023-11-03 20:26:41 +01:00
pl@gohorb.ba-horb.de d1a6dcbbac modified: core/JavaTXCompiler.java
modified:   typeinference/constraints/ConstraintSet.java
	modified:   typeinference/unify/TypeUnifyTask.java
2023-11-03 20:25:17 +01:00
pl@gohorb.ba-horb.de 15150fca9e modified: ../../../src/main/java/de/dhbwstuttgart/typeinference/unify/TypeUnifyTask.java 2023-11-03 18:56:31 +01:00
405 changed files with 1026 additions and 23281 deletions
+25
View File
@@ -0,0 +1,25 @@
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 -7
View File
@@ -29,14 +29,14 @@ http://maven.apache.org/maven-v4_0_0.xsd">
<version>2.6</version> <version>2.6</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.google.guava</groupId> <groupId>io.github.classgraph</groupId>
<artifactId>guava</artifactId> <artifactId>classgraph</artifactId>
<version>22.0</version> <version>4.8.172</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.reflections</groupId> <groupId>com.google.guava</groupId>
<artifactId>reflections</artifactId> <artifactId>guava</artifactId>
<version>0.9.11</version> <version>33.2.0-jre</version>
</dependency> </dependency>
<!-- https://mvnrepository.com/artifact/org.ow2.asm/asm --> <!-- https://mvnrepository.com/artifact/org.ow2.asm/asm -->
<dependency> <dependency>
@@ -53,7 +53,6 @@ http://maven.apache.org/maven-v4_0_0.xsd">
<artifactId>maven-compiler-plugin</artifactId> <artifactId>maven-compiler-plugin</artifactId>
<version>3.11.0</version> <version>3.11.0</version>
<configuration> <configuration>
<compilerArgs>--enable-preview</compilerArgs>
<source>21</source> <source>21</source>
<target>21</target> <target>21</target>
</configuration> </configuration>
@@ -63,9 +62,14 @@ http://maven.apache.org/maven-v4_0_0.xsd">
<artifactId>maven-surefire-plugin</artifactId> <artifactId>maven-surefire-plugin</artifactId>
<version>3.1.0</version> <version>3.1.0</version>
<configuration> <configuration>
<redirectTestOutputToFile>true</redirectTestOutputToFile>
<reportsDirectory>${project.build.directory}/test-reports</reportsDirectory>
<argLine>--enable-preview</argLine> <argLine>--enable-preview</argLine>
<trimStackTrace>false</trimStackTrace>
<excludes> <excludes>
<exclude>**/JavaTXCompilerTest.java</exclude> <exclude>**/JavaTXCompilerTest.java</exclude>
<exclude>**/AllgemeinTest.java</exclude>
<exclude>**/syntaxtreegenerator/*.java</exclude>
</excludes> </excludes>
</configuration> </configuration>
</plugin> </plugin>
-10
View File
@@ -1,10 +0,0 @@
class Assign {
assign(x, y) {
x = y;
}
assign2(x, y) {
assign(x,y);
}
}
@@ -1,18 +0,0 @@
import java.lang.Object;
import java.util.Vector;
class CaptureConversion {
<X> void assign(Vector<X> v1, Vector<X> v2) {
v1 = v2;
}
void main() {
Vector<?> v1;
v1 = new Vector<Object>();
Vector<? extends Object> v2;
v2 = new Vector<Object>();
v1 = v2;
assign(v1, v2);
}
}
-22
View File
@@ -1,22 +0,0 @@
class Pair<U, T> {
U a;
T b;
Pair(U x, T y) {
a = x; b = y;
}
}
class Complex {
m(b) {
var c = b;
var d = c;
var e;
d = e;
var r1 = e;
var f = e;
var g;
f = g;
var r2 = g;
return new Pair<>(r1, r2);
}
}
-7
View File
@@ -1,7 +0,0 @@
public class InfReturn {
m(a) {
var ret;
a = ret;
return ret;
}
}
-8
View File
@@ -1,8 +0,0 @@
public class InfReturnII {
m(a, b) {
var ret;
a = ret;
b = ret;
return ret;
}
}
-7
View File
@@ -1,7 +0,0 @@
class InnerInf {
m(a, b) {
var i;
a = i;
b = i;
}
}
-43
View File
@@ -1,43 +0,0 @@
/*
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;
}
}
*/
public class Iteration {
id(x) {
return x;
}
m1(x, y) {
var help;
help = m2(x, y);
var y2 = help.snd();
var x2 = id(x);
return new Pair<>(x2,y2);
}
m2(x,y) {
var help = m1(x, y);
var x2 = help.fst();
var y2 = id(y);
return new Pair<>(x2, y2);
}
}
-7
View File
@@ -1,7 +0,0 @@
import java.lang.Integer;
import java.lang.Double;
class Overloading {
m(x) { return x + x; }
m(x) { return x || x; }
}
-36
View File
@@ -1,36 +0,0 @@
import java.util.Vector;
import java.lang.Boolean;
import java.lang.Object;
class Pair<U, T> {
U a;
T b;
make(x) {
var ret = new Pair<>();
ret.a = x.elementAt(0);
ret.b = x.elementAt(1);
return ret;
}
eq(a, b) {
b = a;
return a == b;
}
compare( p) {
return eq(p.a, p.b);
//return p.a == p.b;
}
/*
void m(Pair<?, ?> p, Vector<?> b)
{
//this.compare(p); //1, type incorrect
this.compare(this.make(b)); //2, OK
}
*/
}
@@ -1,8 +0,0 @@
class RecursionCond {
m(a, b, c) {
if (1 == 2) {
b = m(a, b);
c = m(a, b);
} else return a;
}
}
-14
View File
@@ -1,14 +0,0 @@
import java.util.stream.Stream;
import java.util.Vector;
import java.lang.Integer;
class StreamTest {
m() {
var vecInt = new Vector<Integer>();
var strInt = vecInt.stream();
var dup = x -> x*2;
strInt.map(dup);
return dup;
}
}
-9
View File
@@ -1,9 +0,0 @@
import java.lang.Boolean;
import java.lang.Integer;
public class Test {
fac = (x) -> {
if (x == 1) { return 1; }
return x * fac.apply(x - 1);
};
}
-19
View File
@@ -1,19 +0,0 @@
class Triple<U, T, S> {
U a;
T b;
S c;
Triple(U x, T y, S z) {
a = x; b = y; c = z;
}
U fst() { return a; }
T snd() { return b; }
S thrd() { return c; }
}
public class TripleTest {
m() {
return new Triple<>(m().thrd(), m().thrd(), m().thrd());
}
}
-12
View File
@@ -1,12 +0,0 @@
class Twice2 {
id1inst = new Id<>();
id1 = id1inst.id;
id2inst = new Id<>();
id2 = id2inst.id;
twice = id1.apply(id2);
}
class Id<T> {
id = (T x) -> x;
}
@@ -1,12 +0,0 @@
import java.util.Vector;
import java.lang.Boolean;
class UseWildcardPair{
void m(Pair<?, ?> p, Vector<?> b)
{
p.compare(p); //1, type incorrect
p.compare(p.make(b)); //2, OK
}
}
-8
View File
@@ -1,8 +0,0 @@
import java.lang.Integer;
import java.lang.String;
public class AA {
m(Integer i) { return "AA"; }
m2(AA x) { return "AA"; }
}
-9
View File
@@ -1,9 +0,0 @@
import java.lang.Integer;
import java.lang.Long;
public class AddLong{
Long add(Integer a, Long b) {
Long c = a+b;
return c;
}
}
@@ -1,30 +0,0 @@
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';
}
}
-3
View File
@@ -1,3 +0,0 @@
import java.lang.Integer;
public class BB extends AA { }
@@ -1,17 +0,0 @@
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);
}
}
-7
View File
@@ -1,7 +0,0 @@
class B { }
class Box_Main extends B {
m(b) {
b.m(new Box_Main());
b.m(new B());
}
}
-3
View File
@@ -1,3 +0,0 @@
class Box<A> {
void m(A a) { }
}
-11
View File
@@ -1,11 +0,0 @@
import java.lang.Integer;
import java.lang.String;
public class CC extends BB {
m(Integer i) {
return "CC";
}
m2(CC x) { return "CC"; }
}
-13
View File
@@ -1,13 +0,0 @@
import java.lang.Integer;
public class Chain {
x = 5;
chain() {
return this;
}
m() {
return this.chain().chain().chain().x;
}
}
@@ -1,8 +0,0 @@
import java.lang.Integer;
public class ClassGenLam {
lam = x-> x;
// public ClassGenLam() {
// lam = x->x;
// }
}
Binary file not shown.
-6
View File
@@ -1,6 +0,0 @@
class Cycle {
m(x, y) {
y = x;
x = y;
}
}
-4
View File
@@ -1,4 +0,0 @@
import java.lang.Integer;
public class DD extends CC { }
-11
View File
@@ -1,11 +0,0 @@
public class DuMethod{
method(a){
return a+a;
}
method(a){
return a;
}
}
@@ -1,3 +0,0 @@
public class EmptyClass{
}
@@ -1,8 +0,0 @@
public class EmptyMethod{
public void m1(){
System.out.println("test");
}
public void m2(){}
}
-9
View File
@@ -1,9 +0,0 @@
import java.lang.String;
public class Example {
public m() {
String x = "X";
return x;
}
}
@@ -1,3 +0,0 @@
public class Exceptions {
// m(Integer i) throws
}
@@ -1,8 +0,0 @@
class Expressions{
void test(){
var x = 2;
x = x + 2;
}
}
-10
View File
@@ -1,10 +0,0 @@
import java.util.Vector;
class Matrix extends Vector<Vector<Integer>> {
methode(m) {
m.add(1);
Matrix i;
methode(i);
}
}
-15
View File
@@ -1,15 +0,0 @@
import java.lang.Integer;
import java.lang.Double;
import java.lang.String;
public class Fac {
getFac(n) {
var res = 1;
var i = 1;
while (i <= n) {
res = res * i;
i++;
}
return res;
}
}
-52
View File
@@ -1,52 +0,0 @@
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(java.lang.Integer 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);
// }
// }
//}
-10
View File
@@ -1,10 +0,0 @@
class Faculty2 {
m () {
var fact = (Integer x) -> {
return x;
};
return fact;
}
}
-17
View File
@@ -1,17 +0,0 @@
import java.lang.Integer;
class Faculty {
m () {
var fact = (Integer x) -> {
if (x == 1) {
return x;
}
else {
return x * (fact.apply(x-1));
}
};
return fact;
}
}
@@ -1,19 +0,0 @@
import java.lang.Integer;
class Faculty {
Integer mul(Integer x, Integer y) {
return x;
}
Fun1<java.lang.Integer,java.lang.Integer> m () {
var fact = (Integer x) -> {
return mul(x, fact.apply(x));
};
return fact;
}
}
interface Fun1<A,B>{
B apply(A a);
}
-9
View File
@@ -1,9 +0,0 @@
import java.lang.Integer;
public class Field {
public x = 5;
m(){
return x;
}
}
@@ -1,13 +0,0 @@
class Box<A> {
A f;
}
class B {
}
class Box_Main extends B {
m(b) {
b.f = new Box_Main();
b.f = new B();
}
}
-4
View File
@@ -1,4 +0,0 @@
public class FieldTph {
a;
}
-14
View File
@@ -1,14 +0,0 @@
import java.lang.String;
public class FieldTph2 {
a;
m(b){
b = a;
return b;
}
m2(c){
a = c;
}
}
@@ -1,26 +0,0 @@
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;
}*/
}
@@ -1,27 +0,0 @@
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;
}
}
-11
View File
@@ -1,11 +0,0 @@
import java.lang.String;
class Fields{
test2 = "test";
test;
m(){
var test3;
return test;
}
}
-30
View File
@@ -1,30 +0,0 @@
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;
}
for(int i = 0; i<10; i++) {
x = x + 5;
}
return x;
}
// m2(Integer x){
// if(x<2) {
// return 1;
// }else {
// return 2;
// }
// }
}
-12
View File
@@ -1,12 +0,0 @@
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;
}
}
@@ -1,15 +0,0 @@
import java.lang.Integer;
import java.util.function.Function;
public class FunctionalInterface {
Integer accept(Function<Integer, Integer> f) {
return f.apply(20);
}
Integer m() {
var v = accept(i -> {
return i * 10;
});
return v;
}
}
-8
View File
@@ -1,8 +0,0 @@
import java.lang.Integer;
import java.util.Vector;
public class Gen{
Vector<Integer> m(Vector<Integer> v){
return v;
}
}
-17
View File
@@ -1,17 +0,0 @@
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");
*/
@@ -1,9 +0,0 @@
import java.lang.String;
import java.lang.Integer;
class Generics2<B extends String>{
<B extends Integer> B m1(B b){
return b;
}
}
@@ -1,7 +0,0 @@
import java.lang.String;
import java.lang.Integer;
import java.util.List;
class Generics3<B extends String & List<Integer>> {
}
-12
View File
@@ -1,12 +0,0 @@
import java.lang.String;
import java.lang.Integer;
class Generics4<B extends String> {
<C extends Integer> C m1(C b){
return b;
}
m2(x) {
return m1(x);
}
}
@@ -1,57 +0,0 @@
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;
}
}
@@ -1,56 +0,0 @@
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;
}
}
@@ -1,9 +0,0 @@
import java.lang.System;
import java.lang.String;
import java.io.PrintStream;
public class HelloWorld {
static hello() {
System.out.println("Hello World!");
}
}
-20
View File
@@ -1,20 +0,0 @@
public class Id <FAU> {
// 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);
}
}
-15
View File
@@ -1,15 +0,0 @@
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;
}
}
}
-8
View File
@@ -1,8 +0,0 @@
import java.util.Vector;
class Import {
void methode(){
Vector v = new Vector<>();
v.add("X");
}
}
-65
View File
@@ -1,65 +0,0 @@
public class Inf {
m(x,y,a){
var z;
var v;
var w;
var b;
y=x;
z=x;
v=y;
w=y;
y=a;
b=a;
var c;
var d;
c = v;
d = v;
}
}
/*
TPH M m(TPH N x, TPH O y, TPH P a)({
TPH Q z;
TPH R v;
TPH S w;
TPH T b;
(y)::TPH O = (x)::TPH N;
(z)::TPH Q = (x)::TPH N;
(v)::TPH R = (y)::TPH O;
(w)::TPH S = (y)::TPH O;
(y)::TPH O = (a)::TPH P;
(b)::TPH T = (a)::TPH P;
TPH U c;
TPH V d;
(c)::TPH U = (v)::TPH R;
(d)::TPH V = (v)::TPH R;
return;
})::TPH W
Inf()({
super(());
})::TPH Z
}
// c::U d::V
// \ /
// v::R w::S
// \ /
// z::Q y::O b::T
// \ / \ /
// x::N a::P
RESULT Final: [[(TPH N < TPH O), (TPH R < TPH V), (TPH N < TPH Q), (TPH P < TPH O), (TPH R < TPH U), (TPH M = void), (TPH O < TPH S), (TPH O < TPH R), (TPH P < TPH T)]]
Simplified constraints: [(TPH O < TPH S), (TPH P < TPH O), (TPH O < TPH R), (TPH P < TPH T), (TPH N < TPH O), (TPH N < TPH Q)]
m: [(TPH DDV = java.lang.Object), (TPH DDX = java.lang.Object), (TPH DDX < TPH DDV), (TPH N < TPH DDX), (TPH P < TPH DDX)]
Class Inf: []
Inf: []
Unify nach Oder-Constraints-Anpassung:
UND:[(void =. M, , -1 WC: false, IT: false), (N <. O, 1 WC: false, IT: false, 1 WC: false, IT: false), (P <. O, 1 WC: false, IT: false, 1 WC: false, IT: false), (N <. Q, 1 WC: false, IT: false, 0 WC: true, IT: false), (O <. S, 1 WC: false, IT: false, 0 WC: true, IT: false), (O <. R, 1 WC: false, IT: false, 0 WC: true, IT: false), (P <. T, 1 WC: false, IT: false, 0 WC: true, IT: false)]
isInherited = false
isStatement = false
ODER:
*/
-6
View File
@@ -1,6 +0,0 @@
class Infimum {
m(x, y, z) {
y = x;
z = x;
}
}
-18
View File
@@ -1,18 +0,0 @@
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);
}
}
-17
View File
@@ -1,17 +0,0 @@
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);
}
}
@@ -1,18 +0,0 @@
import java.lang.Number;
import java.lang.Integer;
import java.lang.Double;
import java.lang.String;
public class InstanceOf {
main(n) {
if (n instanceof Integer i) {
takes(i);
return "Integer";
} else if (n instanceof Double d) {
takes(d);
return "Double";
}
}
takes(i) {} // Should be overloaded
}
@@ -1,3 +0,0 @@
public interface Interface1{
public void test();
}
@@ -1,33 +0,0 @@
import java.lang.Integer;
interface A {
void method1();
default method2() {
}
}
interface B {
void method3();
}
interface C {
Integer myInt();
}
class ClassX implements A {
}
record ClassY(Integer myInt) implements C {}
public class Interfaces implements A, B {
public void method1() {
}
public void method3() {
var intf = new Interfaces();
intf = new ClassX();
intf.method1();
C c = new ClassY(10);
c.myInt();
}
}
-13
View File
@@ -1,13 +0,0 @@
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);
}
}
@@ -1,9 +0,0 @@
public class LamRunnable{
public LamRunnable(){
Runnable lam = () -> {System.out.println("lambda");};
lam.run();
}
}
-11
View File
@@ -1,11 +0,0 @@
import java.lang.Integer;
public class Lambda {
m () {
var lam1 = (x) -> {
return x;
};
return lam1;
}
}
-35
View File
@@ -1,35 +0,0 @@
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);
}
*/
-23
View File
@@ -1,23 +0,0 @@
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);
}
-18
View File
@@ -1,18 +0,0 @@
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);
}
@@ -1,12 +0,0 @@
import java.lang.Integer;
public class LambdaCapture {
Integer i = 8;
f;
public LambdaCapture(){
Integer w = 7;
f = j ->{
return w+i;};
}
}
@@ -1,6 +0,0 @@
public class LambdaField {
f = x -> x;
}
@@ -1,17 +0,0 @@
import java.lang.Runnable;
import java.lang.String;
import java.lang.System;
import java.io.PrintStream;
public class LambdaRunnable {
public LambdaRunnable(){
Runnable lam = () -> {
System.out.println("Runnable is running");
};
lam.run();
}
}
@@ -1,9 +0,0 @@
import java.lang.Integer;
public class Lambda {
m () {
var lam1 = (x) -> { };
return lam1;
}
}
-56
View File
@@ -1,56 +0,0 @@
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;
}
}
-57
View File
@@ -1,57 +0,0 @@
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;
}
}
@@ -1,20 +0,0 @@
import java.lang.Integer;
import java.lang.String;
class ListenerOverload{
call(p){
call(p.left);
call(p.right);
}
call(Integer i){}
call(String s){}
}
class Pair{
left;
right;
}
-44
View File
@@ -1,44 +0,0 @@
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;
}
}
-43
View File
@@ -1,43 +0,0 @@
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;
};
}
-20
View File
@@ -1,20 +0,0 @@
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));
}
}
-11
View File
@@ -1,11 +0,0 @@
class Meth_Gen {
m1(x, y) {
m2(x);
x = y;
}
m2(y) {
m1(y, y);
}
}
@@ -1,14 +0,0 @@
import java.lang.String;
class Generics<B> {
//<A extends B> A mt1(A a, B b){
B mt1(B a, B b){
return mt1(a, a);
}
}
class Test {
methode(String s){
return new Generics<String>().mt1(s,s);
}
}
@@ -1,21 +0,0 @@
/*
class C<A>{
A f;
m(b, c){
c.f = b;
c.m(b, c);
}
}
*/
class C<X>{
X f;
m(b, c, d){
this.f = b;
this.f = c.f;
c.m2(d);
}
m2(a){
a.f = this.f;
}
}
-14
View File
@@ -1,14 +0,0 @@
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;
}
}
@@ -1,7 +0,0 @@
class Methods {
mt4(a,b,c) { return a.mt3(b).mt3(c) ; }
mt3(a) {return a.mt3(a); }
}
-15
View File
@@ -1,15 +0,0 @@
import java.lang.Double;
import java.lang.String;
import java.lang.Long;
class OL {
m (x) { return x + x; }
}
class OLMain {
main(x) {
var ol;
ol = new OL();
return ol.m(x);
}
}
-19
View File
@@ -1,19 +0,0 @@
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);
return x;
}
m2(y) {
m(x -> x * 2, y);
return;
}
}
-13
View File
@@ -1,13 +0,0 @@
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);
}
}
-16
View File
@@ -1,16 +0,0 @@
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;
}
}
-11
View File
@@ -1,11 +0,0 @@
public class Op1{
public Op1() {
Runnable lam = () -> {
String test = "";
String b = "b";
test = b;
System.out.println(test);};
//lam.run();
}
}
-11
View File
@@ -1,11 +0,0 @@
import java.lang.Integer;
import java.lang.String;
public class Op2 {
m(){
var x = "";
var a = 5+x;
return a;
}
}
@@ -1,11 +0,0 @@
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);
}
}
@@ -1,50 +0,0 @@
import java.lang.Integer;
import java.lang.Number;
import java.lang.Float;
record Point(Number x, Number y) {}
public class OverloadPattern {
m(Point(Integer x, Integer y)) {
return x + y;
}
m(Point(Float x, Float y)) {
return x * y;
}
m(Integer x) {
return x;
}
}
/*
public class OverloadPattern {
Integer m$Point$_$java$lang$Integer$_$java$lang$Integer$_$(Point point) {
var x = point.x();
var y = point.y();
return x + y;
}
Float m$Point$_$java$lang$Float$_$java$lang$Float$_$(Point point) {
var x = point.x();
var y = point.y();
return x * y;
}
Number m(Point point) {
return switch(point) {
case Point(Integer x, Integer y) ->
m$Point$_$java$lang$Integer$_$java$lang$Integer$_$(point);
case Point(Float x, Float y) ->
m$Point$_$java$lang$Float$_$java$lang$Float$_$(point);
default -> throw new IllegalArgumentException();
}
}
Integer m(Integer x) {
return x;
}
}
*/
@@ -1,18 +0,0 @@
import java.lang.String;
public class Overloading{
test(x){
return x.methode();
}
methode(){
return "Overloading";
}
}
public class Overloading2{
methode(){
return "Overloading2";
}
}

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