Compare commits

..

462 Commits

Author SHA1 Message Date
23786184ad modified: test/strucType/javFiles/testLocalVar.jav 2018-07-04 11:05:25 +02:00
55f6fe47ac geändert: src/de/dhbwstuttgart/core/JavaTXCompiler.java
geändert:   src/de/dhbwstuttgart/strucTypes/visitor/InferTypes.java
	geändert:   src/de/dhbwstuttgart/typeinference/unify/RuleSet.java
nach merge mit plugin-Branch
2018-06-09 16:34:05 +02:00
4919dd34b2 Merge branch 'plugin' of ssh://gohorb.ba-horb.de/bahome/projekt/git/JavaCompilerCore into strucTypesNew 2018-06-08 14:42:18 +02:00
c08d4b8457 Merge branch 'plugin' of ssh://gohorb.ba-horb.de/bahome/projekt/git/JavaCompilerCore into plugin 2018-06-08 14:39:51 +02:00
aac113e12e Merge branch 'plugin' of ssh://gohorb.ba-horb.de/bahome/projekt/git/JavaCompilerCore into strucTypesNew
src/de/dhbwstuttgart/core/JavaTXCompiler.java
	src/de/dhbwstuttgart/parser/SyntaxTreeGenerator/TypeGenerator.java
	src/de/dhbwstuttgart/syntaxtree/GenericDeclarationList.java
 It looks like you may be committing a merge.
 If this is not correct, please remove the file
	.git/MERGE_HEAD
 and try again.
2018-06-08 14:37:04 +02:00
d2d02e26f0 modified: target/JavaTXcompiler-0.1-jar-with-dependencies.jar 2018-06-08 14:35:22 +02:00
e9d5d5f7c7 classdiagram added 2018-06-08 14:06:27 +02:00
092ee53f74 Studienarbeit added. 2018-06-06 21:22:40 +02:00
413cb48a96 updates to strukture. 2018-06-06 21:22:09 +02:00
e0d5699ae7 deleted: Installation/install.html 2018-06-01 17:13:05 +02:00
3f2558d21e new file: Website/Installation/install.html
new file:   Website/JavaTXExamples.zip
	new file:   Website/index.html
	new file:   Website/install/Restart.png
	new file:   Website/install/availableSoftware1.png
	new file:   Website/install/availableSoftware2.png
	new file:   Website/install/instal.html
	new file:   Website/install/install.html
	new file:   Website/install/installAnyway.png
	new file:   Website/install/installationDetails.png
	new file:   Website/install/licenseAgreement.png
	new file:   Website/install/newsoftware.png
	new file:   Website/install/selectInstallation.png
	new file:   Website/newJavaTXProject/addLibrary2.png
	new file:   Website/newJavaTXProject/buildPath1.png
	new file:   Website/newJavaTXProject/buildPath2.png
	new file:   Website/newJavaTXProject/buildPath3.png
	new file:   Website/newJavaTXProject/buildPath4.png
	new file:   Website/newJavaTXProject/newJavFile.png
	new file:   Website/newJavaTXProject/newJavFolder1.png
	new file:   Website/newJavaTXProject/newJavFolder2.png
	new file:   Website/newJavaTXProject/newJavaTXProject.html
	new file:   Website/newJavaTXProject/newJavaTXProject.png
	new file:   Website/usePlugin/usePlugin.html
	new file:   Website/usePlugin/usePlugin1.png
	new file:   Website/usePlugin/usePlugin2.png
	modified:   test/bytecode/javFiles/OL.jav
2018-06-01 16:57:35 +02:00
24f93f0bcb updated project structure. Implemented trans. 2018-05-31 15:13:39 +02:00
f44f08b895 TYPEExpr fixed for newClass. 2018-05-30 23:50:32 +02:00
814aef082d modified: ../../src/de/dhbwstuttgart/core/JavaTXCompiler.java
modified:   ../../src/de/dhbwstuttgart/typeinference/unify/RuleSet.java
	modified:   ../../src/de/dhbwstuttgart/typeinference/unify/TypeUnify.java
	modified:   ../../src/de/dhbwstuttgart/typeinference/unify/TypeUnifyTask.java
log-File schreiben entfernt
2018-05-30 18:35:57 +02:00
5a0e53485c modified: src/de/dhbwstuttgart/typeinference/typeAlgo/TYPEStmt.java
Unary-Expression SMALLERNEQDOT eingefuegt
	modified:   test/bytecode/javFiles/Fac.jav
2018-05-30 17:23:55 +02:00
e972282620 Generics fix 2018-05-30 16:14:09 +02:00
f7160c10f4 Fix Generics parsing 2018-05-30 16:04:13 +02:00
7a5940ac65 cherrypick ee1fa17 Typegenerator 2018-05-30 15:51:25 +02:00
86e94b8cc0 cherrypick ee1fa17 Typegenerator 2018-05-30 15:51:08 +02:00
25a5e79509 update solve (not fixed). 2018-05-30 15:36:28 +02:00
7e1d6fad01 solve tNew generics superclass and interfaces added. 2018-05-30 12:39:11 +02:00
c7e0281d53 solve tph zu grt 2018-05-30 11:52:38 +02:00
23ae5d5745 returntypevisitor added. restructuring. 2018-05-30 09:00:46 +02:00
bb26112a9b modified: ../../../target/JavaTXcompiler-0.1-jar-with-dependencies.jar
modified:   Fac.jav
	modified:   Faculty.jav
	modified:   OL.jav
	modified:   While.jav
	modified:   ../../javFiles/AddLong.jav
2018-05-30 00:27:20 +02:00
97d893e66b Merge branch 'plugin' of ssh://gohorb.ba-horb.de/bahome/projekt/git/JavaCompilerCore into plugin
merge
2018-05-28 16:36:46 +02:00
57fb90afaf modified: src/de/dhbwstuttgart/core/JavaTXCompiler.java
modified:   src/de/dhbwstuttgart/typeinference/unify/TypeUnify.java
	modified:   src/de/dhbwstuttgart/typeinference/unify/TypeUnifyTask.java
LogFile  optional gemacht
2018-05-28 16:35:47 +02:00
63ac79f02c Hotfix für Typparsen Problem 2018-05-28 16:21:52 +02:00
07fa62d11d merge Keine Ahnung mit was ... 2018-05-28 16:21:43 +02:00
66587a8f71 modified: src/de/dhbwstuttgart/typeinference/unify/TypeUnifyTask.java
SMALERNEQDOT in Regel a <!=. Theta korrigiert
SMALERNEQDOT in Regel Theta <!=. a geloescht
2018-05-28 16:07:29 +02:00
581e5e574e Merge branch 'bytecode2' into plugin 2018-05-25 14:41:22 +02:00
ae14dfd947 modified: src/de/dhbwstuttgart/typeinference/unify/RuleSet.java
modified:   src/de/dhbwstuttgart/typeinference/unify/TypeUnifyTask.java
2018-05-25 14:39:54 +02:00
9d53d9d5d1 modified: src/de/dhbwstuttgart/typeinference/unify/model/FiniteClosure.java
kleiner Fehler korrigiert
	modified:   test/javFiles/Matrix.jav
2018-05-25 11:16:02 +02:00
58f5e17ab5 FacTest.java 2018-05-25 10:01:44 +02:00
6fce2760c5 While.jav 2018-05-25 09:53:30 +02:00
1de897fb1f modified: src/de/dhbwstuttgart/typeinference/unify/model/FiniteClosure.java
System.out.println geloescht
2018-05-24 17:59:51 +02:00
87dede5d5f modified: ../../src/de/dhbwstuttgart/typeinference/unify/model/FiniteClosure.java
F-Bounded Problematik durche neues greater ggf. geloest.
Es werden Falle ausgeschlossen. Diese Faelle muessen noch ergaenzt werden.
2018-05-24 17:45:10 +02:00
f085f9f499 Merge branch 'bytecode2' of ssh://gohorb.ba-horb.de/bahome/projekt/git/JavaCompilerCore into bytecode2 2018-05-24 16:44:28 +02:00
a40d2b991f kleine Änderung 2018-05-24 16:44:05 +02:00
704415ae3b Merge branch 'unifyOptimierung' into plugin
fixed	test/javFiles/Matrix.jav
2018-05-24 16:43:31 +02:00
65531ac12e modified: ../../src/de/dhbwstuttgart/syntaxtree/factory/UnifyTypeFactory.java
modified:   ../../src/de/dhbwstuttgart/typeinference/constraints/Pair.java
	modified:   ../../src/de/dhbwstuttgart/typeinference/typeAlgo/TYPEStmt.java
	modified:   ../../src/de/dhbwstuttgart/typeinference/unify/RuleSet.java
	modified:   ../../src/de/dhbwstuttgart/typeinference/unify/TypeUnifyTask.java
	modified:   ../../src/de/dhbwstuttgart/typeinference/unify/model/PairOperator.java
Einführung eines neuen Operators SMALLERNEQDOT um Ungleichungen a <!=. Number für die Relationsoperatoren einfuehren zu koennen.

	modified:   ../../test/javFiles/Matrix.jav
2018-05-24 16:20:57 +02:00
34e632b872 modified: ../../src/de/dhbwstuttgart/core/JavaTXCompiler.java
Reduce ausgetauscht bei ArgPara und Returntype
	modified:   ../../src/de/dhbwstuttgart/typeinference/typeAlgo/TYPEStmt.java
	modified:   ../../src/de/dhbwstuttgart/typeinference/unify/TypeUnifyTask.java
isUndefinedPair korrigiert.
	modified:   ../../test/bytecode/LambdaTest.java
	modified:   ../../test/bytecode/javFiles/Plus.jav
	modified:   ../../test/bytecode/javFiles/RelOps.jav
2018-05-24 14:11:04 +02:00
3470215bae Merge branch 'bytecode2' of ssh://gohorb.ba-horb.de/bahome/projekt/git/JavaCompilerCore into bytecode2 2018-05-24 10:48:57 +02:00
f5398fa8e9 deleted: ../../test/logFiles/log 2018-05-24 10:34:50 +02:00
f617ad8946 modified: ../../src/de/dhbwstuttgart/typeinference/typeAlgo/TYPEStmt.java
Relationen auf verschiedene Numeric-Typen umgestellt
im equals Null abgefragt
2018-05-24 10:28:22 +02:00
876ec6a4f6 Merge branch 'bytecode2' of ssh://gohorb.ba-horb.de/bahome/projekt/git/JavaCompilerCore into unifyOptimierung
Conflicts:
	src/de/dhbwstuttgart/core/JavaTXCompiler.java
solved
2018-05-24 09:41:15 +02:00
26d9b1215f modified: ../../src/de/dhbwstuttgart/typeinference/unify/RuleSet.java
modified:   ../../src/de/dhbwstuttgart/typeinference/unify/TypeUnifyTask.java
	modified:   ../../src/de/dhbwstuttgart/typeinference/unify/interfaces/IFiniteClosure.java
	modified:   ../../src/de/dhbwstuttgart/typeinference/unify/model/ExtendsType.java
	modified:   ../../src/de/dhbwstuttgart/typeinference/unify/model/FiniteClosure.java
	modified:   ../../src/de/dhbwstuttgart/typeinference/unify/model/FunNType.java
	modified:   ../../src/de/dhbwstuttgart/typeinference/unify/model/PlaceholderType.java
	modified:   ../../src/de/dhbwstuttgart/typeinference/unify/model/ReferenceType.java
	modified:   ../../src/de/dhbwstuttgart/typeinference/unify/model/SuperType.java
	modified:   ../../src/de/dhbwstuttgart/typeinference/unify/model/UnifyType.java
	modified:   ../../test/javFiles/Matrix.jav
F-Bounded angefangen
2018-05-24 09:17:31 +02:00
0f29bc038a Bugs gefixt. Tests für relationalen Operatoren(GreaterEqualTest, ...) laufen.
Für Typplaceholder werden Generics verwendet.

Neue Tests angefügt.
2018-05-23 15:38:41 +02:00
a5ed5a2a46 Merge branch 'unifyOptimierung' into plugin 2018-05-22 17:29:44 +02:00
c597b0430a modified: ../../src/de/dhbwstuttgart/core/JavaTXCompiler.java
cardProd als Variable eingfuegt
	modified:   ../../src/de/dhbwstuttgart/syntaxtree/ClassOrInterface.java
toString() eingfuegt
	modified:   ../../src/de/dhbwstuttgart/syntaxtree/GenericDeclarationList.java
toString() eingfuegt
	modified:   ../../src/de/dhbwstuttgart/typeinference/typeAlgo/TYPEStmt.java
BinaryOp <. statt =.
	modified:   ../../src/de/dhbwstuttgart/typeinference/unify/TypeUnifyTask.java
Bei nicht importierten (result []) undefinPair gesetzt
	modified:   ../javFiles/Matrix.jav
falsche importe rausgenommen
2018-05-22 17:10:07 +02:00
06a0cb8eaf modified: TypeUnifyTask.java
noAllErasedElements eingefuegt
2018-05-19 10:13:08 +02:00
b5a601d798 modified: TypeUnifyTask.java
Varianceweitergabe in den verschiedenen Cases eingefuegt
Erste Zaehlungen eingefuegt
2018-05-19 09:50:57 +02:00
7ea6777906 modified: ../../src/de/dhbwstuttgart/typeinference/unify/TypeUnifyTask.java
modified:   ../javFiles/Lambda.jav
	modified:   ../typeinference/UnifyTest.java
2018-05-18 13:12:49 +02:00
6b1896f58c modified: src/de/dhbwstuttgart/typeinference/unify/RuleSet.java
modified:   src/de/dhbwstuttgart/typeinference/unify/distributeVariance.java
greaterFUNN und smallFUNN fuer generierte TPHs Variance gesetzt
	modified:   test/javFiles/Lambda.jav
vom bytecode ruebergeholt
2018-05-18 09:55:45 +02:00
d81c06cdd9 modified: ../../src/de/dhbwstuttgart/typeinference/unify/distributeVariance.java
Implementierung fuer FuNN eingefuegt
	deleted:    ../../src/de/dhbwstuttgart/typeinference/unify/inheritVariance.java

wahrscheinlich bei FuNN-Regeln Variance setzen.
2018-05-18 00:03:07 +02:00
8baff8f376 modified: ../../src/de/dhbwstuttgart/core/JavaTXCompiler.java
Variancenvererbung eingefuegt
	modified:   ../../src/de/dhbwstuttgart/typeinference/unify/TypeUnifyTask.java
Variancenvererbung geloescht
	modified:   ../../src/de/dhbwstuttgart/typeinference/unify/model/PlaceholderType.java
	modified:   ../../test/typeinference/UnifyTest.java
2018-05-17 22:51:41 +02:00
427a87598c solve added 2018-05-17 21:35:14 +02:00
bc2cab8c95 modified: src/de/dhbwstuttgart/core/JavaTXCompiler.java
modified:   src/de/dhbwstuttgart/syntaxtree/factory/UnifyTypeFactory.java
	modified:   src/de/dhbwstuttgart/typeinference/unify/model/PlaceholderType.java
	modified:   test/javFiles/Lambda.jav
	modified:   test/javFiles/Lambda3.jav
2018-05-17 18:07:21 +02:00
dca5d21c23 JavaCompilerCoreWithDependencies upload 2018-05-17 12:47:01 +02:00
51a2acdbaf modified: src/de/dhbwstuttgart/core/JavaTXCompiler.java
modified:   test/typeinference/UnifyTest.java
2018-05-17 11:42:03 +02:00
dcc36f082f code aufräumen 2018-05-16 13:37:31 +02:00
9575afd0b4 Fun umbenannt und Argumente umgedreht 2018-05-15 10:33:30 +02:00
403430d0c4 adapt2 incode docu added 2018-05-12 15:22:31 +02:00
d9ab487253 adapt2 rule implemented 2018-05-12 14:59:48 +02:00
5c797a44a1 modified: ../../src/de/dhbwstuttgart/typeinference/unify/RuleSet.java
disableWildcardtable in den FUNN-Regeln eingefuegt.
2018-05-10 09:07:33 +02:00
87dbcfdad4 Merge branch 'unifyOptimierung' of ssh://gohorb.ba-horb.de/bahome/projekt/git/JavaCompilerCore into unifyOptimierung
Merge
2018-05-09 18:10:17 +02:00
8048af2106 modified: ../../test/javFiles/Lambda2.jav
modified:   ../../test/typeinference/UnifyTest.java
2018-05-09 18:10:08 +02:00
e4243b612c modified: src/de/dhbwstuttgart/typeinference/typeAlgo/TYPEStmt.java
Operatoren neue getypte
Returnargument bei FUNN nach hinten verschoben
	modified:   src/de/dhbwstuttgart/typeinference/unify/RuleSet.java
Returnargument bei FUNN nach hinten verschoben
Wildcards in Argumenten von als Undefined Pairs (funktioniert noch nicht)
Methode wrongWildcard eingefuegt
	modified:   src/de/dhbwstuttgart/typeinference/unify/model/UnifyPair.java
Methode doubleWildcard ind wrongWildcard umbenannt
	modified:   src/de/dhbwstuttgart/typeinference/unify/model/UnifyType.java
Methode doubleWildcard ind wrongWildcard umbenannt
	modified:   src/de/dhbwstuttgart/typeinference/unify/model/WildcardType.java
Methode doubleWildcard ind wrongWildcard umbenannt
2018-05-09 18:05:06 +02:00
da4c59f2cf modified: ../../src/de/dhbwstuttgart/typeinference/typeAlgo/TYPEStmt.java
modified:   ../../test/typeinference/UnifyTest.java
2018-05-09 16:24:28 +02:00
1c22fc7d57 Merge branch 'bytecode2' of ssh://gohorb.ba-horb.de/bahome/projekt/git/JavaCompilerCore into unifyOptimierung
merge bytecode2
2018-05-09 13:29:11 +02:00
0b7aea21d9 modified: ../../test/bytecode/LambdaTest.java
modified:   ../../test/bytecode/javFiles/Lambda2.jav
2018-05-08 18:52:43 +02:00
521a1cbf3b Bug 77 gefixt 2018-05-08 17:42:58 +02:00
22ca2cbd4a modified: BytecodeGenMethod.java 2018-05-08 11:28:24 +02:00
49ea4ee283 Pfad der erzeugten klassendateien angepasst 2018-05-08 10:19:13 +02:00
225dc16a89 modified: test/typeinference/UnifyTest.java 2018-05-08 09:23:20 +02:00
6f85c2b376 fixed RuleSetStrucType refl(). 2018-05-07 19:03:47 +02:00
a17342458e fixed Construct. Changed Field and Method Types to GenericRefType. 2018-05-07 18:37:21 +02:00
4738add4fc modified: ../../../../../test/javFiles/Matrix.jav
modified:   ../../../../../test/typeinference/UnifyTest.java
2018-05-07 15:31:31 +02:00
ab46709390 Fixed Construct. Added Structure for TUnify. Implemented refl. 2018-05-06 19:06:41 +02:00
bc99dc4c8b Merge branch 'plugin' of ssh://gohorb.ba-horb.de/bahome/projekt/git/JavaCompilerCore into plugin 2018-05-02 21:30:11 +02:00
2bbf9eac36 target/repository anlegen 2018-05-02 21:08:32 +02:00
a785c85d42 tests 2018-05-02 20:54:07 +02:00
48e22982c8 Fehler in Construct für Typen der Felder, und Methoden der generierten Interfaces markiert mit //TODO 2018-04-30 20:28:12 +02:00
3ed300268f fixed: Interfaces des selben Typs werden nur noch einmal generiert, auch wenn sie mehrfach in unterschiedlichen Constraints vorkommen. 2018-04-30 19:43:26 +02:00
ec2b501e63 new file: test/javFiles/LambdaField.jav
modified:   test/typeinference/UnifyTest.java
Lambda-Ausdruck als Attribute/field eingefuegt
2018-04-26 15:10:23 +02:00
8be4f94edf modified: test/javFiles/Matrix.jav
In Matrix.jav Binary-Operation eingefuegt.

	new file:   test/javFiles/Meth_Gen.jav
	new file:   test/typeinference/Meth_GenTest.java
Test zu Constraints ueber eine Methode hinaus
2018-04-25 23:32:12 +02:00
1b6cae1be0 GenTest angefügt 2018-04-25 16:44:27 +02:00
41774b3faf Merge mit bytecode 2018-04-25 16:13:23 +02:00
62d44eb15c modified: ../../src/de/dhbwstuttgart/core/JavaTXCompiler.java
modified:   ../../src/de/dhbwstuttgart/typeinference/unify/TypeUnifyTask.java
Undefined Pairs auf oberster Ebene wird zu new HashTable<>() in compute
	new file:   ../../src/de/dhbwstuttgart/typeinference/unify/inheritVariance.java
	modified:   ../../src/de/dhbwstuttgart/typeinference/unify/model/OrderingUnifyPair.java
Unterscheidung zw. <. <? ein compere eingefuegt
	modified:   ../../src/de/dhbwstuttgart/typeinference/unify/model/PlaceholderType.java
Attribut wildcardable eingefuegt
2018-04-24 00:53:33 +02:00
5f8c73f176 modified: src/de/dhbwstuttgart/typeinference/unify/TypeUnifyTask.java
modified:   src/de/dhbwstuttgart/typeinference/unify/model/OrderingUnifyPair.java
In compare wird die Gleichung a =. Theta neu gefiltert
2018-04-22 00:56:49 +02:00
0ae777b4ac modified: src/de/dhbwstuttgart/core/JavaTXCompiler.java
varianceInheritance nach TypeUnifyTask.java verschoben
Kommentar eingefuegt

TODO:
1. compare-Funktinen nochmals ueberpruefen
2. Undef-Pairs in JavaTXiCompiler.java abfangen
3. ? extends bei allen Argumenttypen und Returntypen rauslassen
2018-04-20 23:52:12 +02:00
087170bdbf modified: src/de/dhbwstuttgart/core/JavaTXCompiler.java
modified:   src/de/dhbwstuttgart/typeinference/unify/TypeUnifyTask.java
	modified:   src/de/dhbwstuttgart/typeinference/unify/model/Unifier.java
Variance wieder auskommentiert
	modified:   test/javFiles/Matrix.jav
import String
2018-04-20 13:16:49 +02:00
93d0caaefb modified: src/de/dhbwstuttgart/typeinference/unify/TypeUnifyTask.java
Varianceberechnung geaendert
2018-04-20 09:36:29 +02:00
1f031149d3 modified: src/de/dhbwstuttgart/typeinference/unify/TypeUnifyTask.java
modified:   src/de/dhbwstuttgart/typeinference/unify/model/FiniteClosure.java
	modified:   src/de/dhbwstuttgart/typeinference/unify/model/OrderingUnifyPair.java
	modified:   src/de/dhbwstuttgart/typeinference/unify/model/Unifier.java
Varianceweitergabe eingefuegt
2018-04-20 01:08:35 +02:00
fc870fd706 modified: ../../src/de/dhbwstuttgart/typeinference/unify/TypeUnifyTask.java 2018-04-18 19:44:00 +02:00
4450f5c0cd Merge 2018-04-18 15:08:37 +02:00
478a2df3dc Statische Methoden Test 2018-04-18 11:51:10 +02:00
59243d9f94 modified: src/de/dhbwstuttgart/typeinference/unify/TypeUnifyTask.java 2018-04-17 16:31:13 +02:00
82b08c5aae modified: src/de/dhbwstuttgart/typeinference/unify/TypeUnifyTask.java
modified:   src/de/dhbwstuttgart/typeinference/unify/model/OrderingUnifyPair.java
Wildcard Ordnung veraendert
2018-04-17 14:25:52 +02:00
615983bf37 modified: src/de/dhbwstuttgart/typeinference/unify/TypeUnifyTask.java
resuat add in cartesion angepasst
	modified:   src/de/dhbwstuttgart/typeinference/unify/model/Unifier.java
	modified:   src/de/dhbwstuttgart/typeinference/unify/model/UnifyPair.java

equals in UnfyPair auf UndefinedPairs angepasst
2018-04-13 18:13:31 +02:00
21bc2a67a1 modified: src/de/dhbwstuttgart/typeinference/unify/TypeUnifyTask.java 2018-04-11 16:58:38 +02:00
52a96d7253 OL Test eingefügt 2018-04-11 13:55:32 +02:00
fef4d27d21 modified: src/de/dhbwstuttgart/typeinference/unify/TypeUnifyTask.java 2018-04-11 11:10:08 +02:00
603c4c9c46 modified: ../../src/de/dhbwstuttgart/typeinference/unify/TypeUnifyTask.java
logging ergaenzt

	modified:   ../../src/de/dhbwstuttgart/typeinference/unify/model/Unifier.java
getSubstitution() durch getAllSubstitutions() ersetzt
2018-04-06 20:01:14 +02:00
baee0024e9 modified: ../../src/de/dhbwstuttgart/typeinference/unify/TypeUnifyTask.java
Zu beginn von unify werden doppelte wildcard konstruktionen entfernt
Variableneumbenennung bei smaller in Fall 1 weider entfernt

	modified:   ../../src/de/dhbwstuttgart/typeinference/unify/interfaces/IMatch.java
	modified:   ../../src/de/dhbwstuttgart/typeinference/unify/interfaces/IUnify.java
	modified:   ../../src/de/dhbwstuttgart/typeinference/unify/model/ExtendsType.java
	modified:   ../../src/de/dhbwstuttgart/typeinference/unify/model/FiniteClosure.java
In computeGreater unify durch match ersetzt

	modified:   ../../src/de/dhbwstuttgart/typeinference/unify/model/OrderingUnifyPair.java

	modified:   ../../src/de/dhbwstuttgart/typeinference/unify/model/UnifyPair.java
	modified:   ../../src/de/dhbwstuttgart/typeinference/unify/model/UnifyType.java
	modified:   ../../src/de/dhbwstuttgart/typeinference/unify/model/WildcardType.java
Abfrage ob eine doppelte wildcard konstruktion vorhanden ist eingefuegt
2018-04-05 18:09:24 +02:00
1baaf79f8c modified: src/de/dhbwstuttgart/typeinference/unify/TypeUnifyTask.java
modified:   src/de/dhbwstuttgart/typeinference/unify/model/UnifyPair.java
UndefPairs werden zurueckgegegeben und die naechsten gefiltert

protected boolean isUndefinedPairSet(Set<UnifyPair> s) hat Fehler
2018-04-04 21:47:07 +02:00
52f480147e modified: src/de/dhbwstuttgart/typeinference/unify/MartelliMontanariUnify.java
modified:   src/de/dhbwstuttgart/typeinference/unify/RuleSet.java
	modified:   src/de/dhbwstuttgart/typeinference/unify/model/OrderingUnifyPair.java
	modified:   src/de/dhbwstuttgart/typeinference/unify/model/Unifier.java
	modified:   src/de/dhbwstuttgart/typeinference/unify/model/UnifyPair.java

Subsitution auf UnifyPair umgestellt
2018-04-04 01:14:30 +02:00
9717c54d53 modified: src/de/dhbwstuttgart/typeinference/unify/TypeUnifyTask.java
Mehrfacher Aufruf von computeCartesianRecursive entfernt
2018-04-03 14:16:38 +02:00
c271c689de modified: src/de/dhbwstuttgart/typeinference/unify/TypeUnifyTask.java
abhaengige Substitutionen auch bei Faellen 1 - 8 eingefuegt
2018-04-03 10:29:58 +02:00
24c27303dd modified: src/de/dhbwstuttgart/typeinference/unify/MartelliMontanariUnify.java
modified:   src/de/dhbwstuttgart/typeinference/unify/RuleSet.java
	modified:   src/de/dhbwstuttgart/typeinference/unify/TypeUnifyTask.java
	modified:   src/de/dhbwstuttgart/typeinference/unify/model/OrderingUnifyPair.java
	modified:   src/de/dhbwstuttgart/typeinference/unify/model/Unifier.java
	modified:   src/de/dhbwstuttgart/typeinference/unify/model/UnifyPair.java
Substututions die eine UnifyPair erzeugen eingefuegt
UnifyCase1-8 weitermachen
2018-04-01 22:04:10 +02:00
117106a7b3 modified: src/de/dhbwstuttgart/typeinference/unify/TypeUnifyTask.java
? ext theta bei smaller eingefuegt

	modified:   src/de/dhbwstuttgart/typeinference/unify/model/Unifier.java
basiPair und Subsitution nur noch gefuegt, wen wirk etwas eingesetzt wurde

	modified:   src/de/dhbwstuttgart/typeinference/unify/model/UnifyPair.java
unifier umbenannt in substitution
getBasePair und getSubsitutuon eingefuegt
2018-04-01 17:07:58 +02:00
5680f913ef modified: src/de/dhbwstuttgart/typeinference/unify/TypeUnifyTask.java
new file:   src/de/dhbwstuttgart/typeinference/unify/distributeVariance.java
	modified:   src/de/dhbwstuttgart/typeinference/unify/model/PlaceholderType.java
	new file:   src/de/dhbwstuttgart/typeinference/unify/visitUnifyTypeVisitor.java
2018-03-28 17:42:25 +02:00
ebacb72dcb Merge branch 'bigRefactoring' of ssh://gohorb.ba-horb.de/bahome/projekt/git/JavaCompilerCore into strucTypesNew 2018-03-28 16:37:09 +02:00
22ff521d08 Aufräumen 2018-03-28 15:35:04 +02:00
32ab198f9e Bugfix für duplicate methods 2018-03-28 14:57:36 +02:00
fae26a8f26 modified: src/de/dhbwstuttgart/typeinference/unify/freshPlaceholder.java
modified:   src/de/dhbwstuttgart/typeinference/unify/interfaces/UnifyTypeVisitor.java
	modified:   src/de/dhbwstuttgart/typeinference/unify/model/ExtendsType.java
	modified:   src/de/dhbwstuttgart/typeinference/unify/model/FunNType.java
	modified:   src/de/dhbwstuttgart/typeinference/unify/model/PlaceholderType.java
	modified:   src/de/dhbwstuttgart/typeinference/unify/model/ReferenceType.java
	modified:   src/de/dhbwstuttgart/typeinference/unify/model/SuperType.java
	modified:   src/de/dhbwstuttgart/typeinference/unify/model/UnifyType.java

Visitors verallgemeinert
2018-03-28 12:06:23 +02:00
bb5a4e8580 Bug 72 gefixt 2018-03-28 11:31:32 +02:00
000c16b907 Gencoy ASP Generator implementieren 2018-03-27 23:56:12 +02:00
663ce36e22 modified: test/strucType/javFiles/testFieldMethod.jav
Mehrfache Aufrufe eines Receivers mit unterschiedlichen Methoden/Fields eingefügt
Fehler: die Interfaces werden zwar richtig generiert. Allerdings werden die Inerfaces
mehrfach mit unterschiedlichen generisches Typvariabeln generiert. Einmal würde reichen:

class: constructedinterface.DE <BoGTV MH, BoGTV MI, BoGTV MK>
field: g : TPH MH

 method: m2 : TPH MI
parameter: MK : TPH MK

 superClass: java.lang.Object

und

class: constructedinterface.DE <BoGTV MR, BoGTV MS, BoGTV MU>
field: g : TPH MR

 method: m2 : TPH MS
parameter: MU : TPH MU

 superClass: java.lang.Object
2018-03-27 18:55:07 +02:00
87a2ed8117 APS GeneratorTest.simple anfügen 2018-03-27 14:25:54 +02:00
a0de7a4467 Test, bei dem Bug 72 auftritt 2018-03-24 20:28:26 +01:00
ce2b4e0303 Anpassung bei typisierungen in TYPEExpr, Anpassung Ausgabe 2018-03-23 21:41:31 +01:00
4886976752 Fehler in FCGenerator beheben 2018-03-23 17:20:15 +01:00
daf684deef ASP Factory für Algorithmus von Herr Gencay 2018-03-23 16:54:32 +01:00
0b680f831d modified: src/de/dhbwstuttgart/typeinference/unify/TypeUnifyTask.java
modified:   src/de/dhbwstuttgart/typeinference/unify/model/UnifyPair.java
2018-03-22 20:40:22 +01:00
41c87e3085 Merge branch 'bigRefactoring' into sat 2018-03-22 13:50:30 +01:00
52dd0e6276 Merge branch 'bigRefactoring' into strucTypesNew 2018-03-22 11:42:46 +01:00
bcee5e5209 Fehler im Parsen von Package beheben 2018-03-22 11:41:59 +01:00
95e9b2dbda modified: src/de/dhbwstuttgart/core/JavaTXCompiler.java
modified:   src/de/dhbwstuttgart/typeinference/unify/TypeUnifyTask.java
	modified:   src/de/dhbwstuttgart/typeinference/unify/model/PlaceholderType.java
	modified:   src/de/dhbwstuttgart/typeinference/unify/model/UnifyPair.java
Variance auf PlacehloderType uebertragen
2018-03-22 11:26:29 +01:00
72f27fab7a Fehler in ASTFactory Generierung von Superinterfaces beheben 2018-03-22 11:17:51 +01:00
06bb978cf6 Testfall erweitern 2018-03-21 18:08:33 +01:00
dbe05bb718 modified: src/de/dhbwstuttgart/parser/SyntaxTreeGenerator/FCGenerator.java
Feher rausgemacht

TODO: Varianven werden nicht uebertragen wahrscheinlich subst
2018-03-21 17:37:34 +01:00
9a735e86dd GenericFC Test anfügen 2018-03-21 17:26:43 +01:00
240d57a8ba Merge branch 'bigRefactoring' of ssh://gohorb.ba-horb.de/bahome/projekt/git/JavaCompilerCore into bigRefactoring 2018-03-21 17:26:23 +01:00
dd18c7c40e Test anfügen 2018-03-21 17:24:12 +01:00
45ccfb58e3 Test commit 2018-03-21 17:10:40 +01:00
4ac99b61bf Merge branch 'bigRefactoring' of ssh://gohorb.ba-horb.de/bahome/projekt/git/JavaCompilerCore into unify-test 2018-03-21 17:07:14 +01:00
f107c8d1f7 modified: src/de/dhbwstuttgart/core/JavaTXCompiler.java
Variancebestimmung fuer Argument- und Returntypen der Methoden eingefuegt.
2018-03-21 17:03:32 +01:00
f29faa2680 Neuer Branch. Merge mit bigRefactoring 2018-03-21 16:04:41 +01:00
161c1a1b53 Test anfügen 2018-03-21 15:15:31 +01:00
6b1a4eddfc Java 9 zu Java 8 ändern. Sollte ausreichen 2018-03-21 14:40:47 +01:00
ae7a63fbca Tests fix 2018-03-21 14:22:30 +01:00
79810be94f FC Generator berücksichtig interfaces 2018-03-21 14:21:50 +01:00
8870bc326c Merge branch 'bigRefactoring' of ssh://gohorb.ba-horb.de/bahome/projekt/git/JavaCompilerCore into bytecode2 2018-03-21 13:47:19 +01:00
e1c6369bcb Bytecode für Post-/Preincrement und Post-/Predecrement 2018-03-21 13:08:39 +01:00
46255efb70 Merge branch 'bigRefactoring' of ssh://gohorb.ba-horb.de/bahome/projekt/git/JavaCompilerCore into unify-test 2018-03-21 11:29:01 +01:00
fb77f9192f Merge branch 'bigRefactoring' of ssh://gohorb.ba-horb.de/bahome/projekt/git/JavaCompilerCore into bigRefactoring 2018-03-21 11:28:35 +01:00
a71e56ea97 Fix 2018-03-21 11:28:21 +01:00
5dfa6769b2 Merge branch 'bigRefactoring' of ssh://gohorb.ba-horb.de/bahome/projekt/git/JavaCompilerCore into unify-test 2018-03-21 11:16:45 +01:00
77be216ee5 Fix 2018-03-21 11:15:59 +01:00
100db9baac Merge branch 'bigRefactoring' of ssh://gohorb.ba-horb.de/bahome/projekt/git/JavaCompilerCore into unify-test
Fehler by atElement
2018-03-21 11:13:20 +01:00
e1f579664a Fix Generics in MethodCall 2018-03-21 11:12:06 +01:00
7a9c0a1e69 LambdaRunnableTest fix 2018-03-21 11:09:29 +01:00
7e5aa852d7 Fehler fix 2018-03-21 10:35:46 +01:00
5d39863cc6 modified: src/de/dhbwstuttgart/typeinference/unify/TypeUnifyTask.java
Maximumsbildung auf maximale Elemente soweit fertig
Argument von mul funktion nicht, liefret nur Vec<TypPl>
2018-03-20 22:30:57 +01:00
01dd4e57e6 modified: src/de/dhbwstuttgart/typeinference/unify/TypeUnifyTask.java
modified:   src/de/dhbwstuttgart/typeinference/unify/model/OrderingUnifyPair.java
Letzte Version bevor MatchUnifyTask
2018-03-20 10:14:01 +01:00
6faffdf90c modified: src/de/dhbwstuttgart/typeinference/unify/TypeUnifyTask.java 2018-03-19 17:43:27 +01:00
f4bc057aff modified: src/de/dhbwstuttgart/core/JavaTXCompiler.java
LogAusgabe FC

	modified:   src/de/dhbwstuttgart/typeinference/unify/TypeUnifyTask.java
fresh TV in unifyCase1 auf alle cs ausgedehnt
	modified:   test/javFiles/Matrix.jav
2018-03-19 15:25:40 +01:00
78db0f0177 modified: src/de/dhbwstuttgart/typeinference/unify/TypeUnifyTask.java
Errorrueckgabe auskommentiert
	new file:   src/de/dhbwstuttgart/typeinference/unify/interfaces/UnifyTypeVisitor.java
eingecheckt vorher vergessen
	modified:   test/javFiles/Matrix.jav
add und mul aktiviert
2018-03-19 09:38:37 +01:00
3233ccd845 Overloading funktioniert. Erzeugt Bytecode für Postincrement (für Integers). 2018-03-18 16:08:52 +01:00
b0b1426e20 modified: src/de/dhbwstuttgart/typeinference/unify/TypeUnifyTask.java
new file:   src/de/dhbwstuttgart/typeinference/unify/freshPlaceholder.java
	modified:   src/de/dhbwstuttgart/typeinference/unify/model/ExtendsType.java
	modified:   src/de/dhbwstuttgart/typeinference/unify/model/FunNType.java
	modified:   src/de/dhbwstuttgart/typeinference/unify/model/PlaceholderType.java
	modified:   src/de/dhbwstuttgart/typeinference/unify/model/ReferenceType.java
	modified:   src/de/dhbwstuttgart/typeinference/unify/model/SuperType.java
	modified:   src/de/dhbwstuttgart/typeinference/unify/model/UnifyType.java
freshtypevraiable Vistor soweit fertig noch nicht getestet
2018-03-18 15:11:45 +01:00
103c7e4b14 modified: src/de/dhbwstuttgart/typeinference/unify/TypeUnifyTask.java
modified:   src/de/dhbwstuttgart/typeinference/unify/model/ExtendsType.java
	modified:   src/de/dhbwstuttgart/typeinference/unify/model/FunNType.java
	modified:   src/de/dhbwstuttgart/typeinference/unify/model/PlaceholderType.java
	modified:   src/de/dhbwstuttgart/typeinference/unify/model/ReferenceType.java
	modified:   src/de/dhbwstuttgart/typeinference/unify/model/SuperType.java
	modified:   src/de/dhbwstuttgart/typeinference/unify/model/TypeParams.java
	modified:   src/de/dhbwstuttgart/typeinference/unify/model/UnifyType.java
visitor freshPlaceholder implements UnifyTypeVisitor
2018-03-17 15:01:03 +01:00
3638edfa73 modified: src/de/dhbwstuttgart/typeinference/unify/TypeUnifyTask.java
modified:   test/javFiles/Matrix.jav
Fehler entdeckt, in unifyCase1 fuer die Typen aus FC keine fresh TV getsetzt werden.
2018-03-16 14:10:40 +01:00
bd98bed5ca Merge branch 'unify-test' of ssh://gohorb.ba-horb.de/bahome/projekt/git/JavaCompilerCore into unify-test
Merge
2018-03-15 20:50:59 +01:00
6299086297 modified: typeinference/unify/TypeUnifyTask.java
modified:   typeinference/unify/model/UnifyPair.java
2018-03-15 20:47:16 +01:00
de5b43d72b modified: src/de/dhbwstuttgart/typeinference/unify/TypeUnifyTask.java
modified:   src/de/dhbwstuttgart/typeinference/unify/model/Unifier.java
	modified:   src/de/dhbwstuttgart/typeinference/unify/model/UnifyPair.java

Links der substitierten Pare eingefuegt.
2018-03-15 17:00:26 +01:00
7e6dee8e1d modified: ../../src/de/dhbwstuttgart/typeinference/unify/TypeUnifyTask.java
modified:   ../javFiles/Matrix.jav
2018-03-14 17:48:04 +01:00
dafcd2f125 Bytecode für While-Schleifen 2018-03-14 15:51:38 +01:00
6a5ababa51 ANTLR Parsetreewalker für ASP Result implementieren 2018-03-14 14:32:36 +01:00
273ddb92d7 modified: ../../src/de/dhbwstuttgart/typeinference/unify/TypeUnifyTask.java
modified:   ../../src/de/dhbwstuttgart/typeinference/unify/model/UnifyPair.java
	modified:   ../javFiles/Matrix.jav
2018-03-14 13:56:28 +01:00
4a2b901465 aufräumen 2018-03-13 14:53:27 +01:00
dea3da3b69 Merge branch 'bigRefactoring' into unify-test
Fehelr mit elementAt geloest
2018-03-13 10:41:57 +01:00
13c70148a8 modified: ../../src/de/dhbwstuttgart/typeinference/unify/TypeUnifyTask.java
modified:   ../../src/de/dhbwstuttgart/typeinference/unify/model/OrderingUnifyPair.java
	modified:   ../javFiles/Matrix.jav
mul1 und add ergaenzt.
Fehler bei elementAt: Liefert Object als Returntyp
2018-03-13 08:46:25 +01:00
bb5945898a Bug in ASTFactory beseitigen 2018-03-13 01:57:21 +01:00
123f94aea7 ANTLR Parser für ASP Statements implementieren 2018-03-13 00:24:40 +01:00
dff72b0c97 ResultSetOutputGenerator 2018-03-12 00:38:02 +01:00
1667b394f2 modified: ../../src/de/dhbwstuttgart/typeinference/unify/TypeUnifyTask.java
modified:   ../../src/de/dhbwstuttgart/typeinference/unify/model/OrderingUnifyPair.java
Variancen gesetzt
2018-03-11 20:39:38 +01:00
95943b1627 modified: src/de/dhbwstuttgart/typeinference/unify/model/OrderingUnifyPair.java
compare(Matrix, Vector<gen_ab>, ? extends Vector<? extends Integer>> <.? gen_ab
   eingefuegt.
2018-03-10 12:32:07 +01:00
0315a1f144 modified: ../../src/de/dhbwstuttgart/core/JavaTXCompiler.java
modified:   ../../src/de/dhbwstuttgart/typeinference/unify/TypeUnify.java
	modified:   ../../src/de/dhbwstuttgart/typeinference/unify/TypeUnifyTask.java
compare(Matrix, Vector<gen_ab>, ? extends Vector<? extends Integer>> <.? gen_ab
funktioniert nicht
2018-03-10 01:04:19 +01:00
52a5fd7904 erzeugt Bytecode für relationale Operatoren. Getestet. 2018-03-09 21:57:39 +01:00
b5b5b5d9c9 modified: ../../src/de/dhbwstuttgart/typeinference/constraints/Pair.java
modified:   ../../src/de/dhbwstuttgart/typeinference/unify/TypeUnifyTask.java
	modified:   ../../src/de/dhbwstuttgart/typeinference/unify/model/UnifyPair.java
Varinace in UnfyPair eingefuegt und Abfrage in computeCartesianRecursive eingefuegt
Pruefen, ob Varianve bei Subst und andrene erhalten bleibt.
2018-03-09 01:23:02 +01:00
83aaff140c Aufräumen 2018-03-08 01:44:40 +01:00
3deaceec01 UnifyWithoutWildcards Test läuft durch 2018-03-08 01:41:38 +01:00
9862df9e63 modified: ../../src/de/dhbwstuttgart/typeinference/unify/TypeUnifyTask.java
modified:   ../../src/de/dhbwstuttgart/typeinference/unify/model/OrderingUnifyPair.java

Minimum funktion soweit
2018-03-08 01:12:17 +01:00
9f2702276f Fehler beheben 2018-03-08 00:03:26 +01:00
87cf674352 Fehler in FCGenerator beheben 2018-03-07 23:07:53 +01:00
dfd6a1f532 erge branch 'bigRefactoring' into sat 2018-03-07 23:04:16 +01:00
e8388e2748 Aufräumen 2018-03-07 22:42:05 +01:00
095f9a7956 Tests an neue ASPFactory anpassen 2018-03-07 22:41:00 +01:00
c4aec8379e Erste Version von ASPFactory implementieren 2018-03-07 21:52:46 +01:00
ccc16fd22b modified: ../../src/de/dhbwstuttgart/typeinference/unify/RuleSet.java
modified:   ../../src/de/dhbwstuttgart/typeinference/unify/TypeUnifyTask.java
	modified:   ../../src/de/dhbwstuttgart/typeinference/unify/interfaces/IRuleSet.java
	modified:   ../../src/de/dhbwstuttgart/typeinference/unify/model/FiniteClosure.java
	modified:   ../../src/de/dhbwstuttgart/typeinference/unify/model/OrderingUnifyPair.java

1. Version mit compare von UnifyPairs
2018-03-07 13:09:47 +01:00
54cf24926e Bytecode arithmetische Operatoren unterschiedlischer Typen vollständig und getestet 2018-03-07 12:26:30 +01:00
94d39ee21a Merge branch 'bigRefactoring' of ssh://gohorb.ba-horb.de/bahome/projekt/git/JavaCompilerCore into bytecode2 2018-03-07 11:49:16 +01:00
725b071d28 Problem mit BinaryExpr gefixt 2018-03-07 08:47:43 +01:00
284af1246b Nicht lauffähig. ASPFactory neu implementieren 2018-03-07 07:41:46 +01:00
f453343f1c Bytecode für arithmetische Operatoren mit Parametern unterschiedlicher Typen. Testfälle bereinigt und aufgeräumt. 2018-03-06 19:14:27 +01:00
bb016e6417 modified: src/de/dhbwstuttgart/typeinference/unify/interfaces/IFiniteClosure.java
modified:   src/de/dhbwstuttgart/typeinference/unify/model/FiniteClosure.java
	modified:   src/de/dhbwstuttgart/typeinference/unify/model/OrderingUnifyPair.java
2018-03-05 20:04:10 +01:00
831bf1fe17 modified: src/de/dhbwstuttgart/typeinference/unify/model/OrderingUnifyPair.java
weitere Fälle in die Ordnung eingebaut
2018-03-04 22:58:31 +01:00
cba489f279 modified: src/de/dhbwstuttgart/typeinference/unify/model/OrderingUnifyPair.java
eine Variable korrigiert
TODO eingefuegt
compare muss fuer ale moeglichen Faelle aus calculatePairSets erstellt werden
2018-03-03 01:07:25 +01:00
9f3439a15e x 2018-03-02 14:12:06 +01:00
356b8a7a34 modified: src/de/dhbwstuttgart/typeinference/unify/RuleSet.java
modified:   src/de/dhbwstuttgart/typeinference/unify/TypeUnifyTask.java
Eq for Unify vereinfachen noch nicht fertig
2018-03-01 18:00:38 +01:00
ab37e1a607 Merge branch 'bigRefactoring' of ssh://gohorb.ba-horb.de/bahome/projekt/git/JavaCompilerCore into bigRefactoring 2018-03-01 15:03:48 +01:00
18545cff9a GenericRefType umgestalten. Unnötige Backreferenzen entfernen 2018-03-01 13:25:03 +01:00
9840281d83 Test für ASP anfügen 2018-03-01 12:31:56 +01:00
6256bdfe2e modified: src/de/dhbwstuttgart/typeinference/unify/TypeUnifyTask.java
In Unfy:
- Bildung des kartesischen Produkts auf secondlevel-Ebene entfernt

In computeCartesianRecursive:
- Vereinigung der Ergebnisse ueber die Schleifen und die Rekursion eingefuegt
- Minimumbestimmung korrigiert
2018-03-01 12:27:38 +01:00
6a9db81981 Merge 2018-02-28 17:16:28 +01:00
53087a8e04 result.add wieder aktiviert 2018-02-28 17:11:50 +01:00
aa631b5099 UnifyTest korrekt benennen 2018-02-28 16:35:45 +01:00
a3a02fe475 Merge branch 'bigRefactoring' into unify-Test 2018-02-28 16:34:48 +01:00
99ce7c1122 <, > Operatoren einführen 2018-02-28 16:33:18 +01:00
cef82c6359 Typgenerator auf alten Stand setzen, damit Matrix test lauft 2018-02-28 16:27:08 +01:00
67fe88215a eigenerTest 2018-02-28 16:25:45 +01:00
f31023b4fa merge2 2018-02-28 16:16:22 +01:00
a733eee8b5 merge 2018-02-28 16:12:57 +01:00
15f5a2dc76 Merge branch 'bigRefactoring' into unify-Test 2018-02-28 16:10:08 +01:00
6fcaafe477 test 2018-02-28 16:07:02 +01:00
35b99a4095 Bytecode kann für folgende Operationen +,-,*,/,% erzeugt werden 2018-02-28 15:59:21 +01:00
327f36f1c2 Faculty Test ändern. UnifyTypeFactory konvertiert automatisch FunN Typen korrekt 2018-02-28 15:21:12 +01:00
6b57aacef0 Merge branch 'bigRefactoring' of ssh://gohorb.ba-horb.de/bahome/projekt/git/JavaCompilerCore into bytecode2 2018-02-28 14:58:58 +01:00
f023754328 TypeStmt für +,-,/,*,% einführen 2018-02-28 14:50:16 +01:00
77aaa0ecb6 Merge branch 'bigRefactoring' of ssh://gohorb.ba-horb.de/bahome/projekt/git/JavaCompilerCore into bigRefactoring 2018-02-28 13:32:51 +01:00
9f9a94b5cf Testfälle bereinigen 2018-02-28 13:32:36 +01:00
b66d06a165 Merge branch 'parser' into bigRefactoring 2018-02-28 11:53:53 +01:00
92b110a971 Funktionierender Clingo Test 2018-02-27 19:10:16 +01:00
2277f68509 Ordner manually/ in .gitignore hinzugefügt 2018-02-25 13:20:19 +01:00
1c0fa6a820 modified: de/dhbwstuttgart/typeinference/unify/RuleSet.java
modified:   de/dhbwstuttgart/typeinference/unify/TypeUnifyTask.java
	modified:   de/dhbwstuttgart/typeinference/unify/model/FiniteClosure.java
logFile eingefuegt
2018-02-24 19:56:22 +01:00
59569380ed Kleiner Bug beseitigt 2018-02-23 20:17:32 +01:00
4fbcf87e0c Methoden visit(assign)/visit(literal) angepasst und generiert bytecode für Binaryexpressions. noch nicht fertig 2018-02-23 20:10:11 +01:00
10b5d87119 Merge branch 'bigRefactoring' into sat 2018-02-23 11:14:47 +01:00
73c37027d9 Fehler in TypeStmt UnaryExpression beheben 2018-02-23 09:16:12 +01:00
8e198679c7 Instabiler Zustand reduce funktionert nicht 2018-02-23 00:37:59 +01:00
419e4a6d0e MERGE
Merge branch 'unify-test' of ssh://gohorb.ba-horb.de/bahome/projekt/git/JavaCompilerCore into unify-test
2018-02-21 17:55:47 +01:00
5cd2ee7d80 geändert: src/de/dhbwstuttgart/core/JavaTXCompiler.java
geändert:   src/de/dhbwstuttgart/typeinference/unify/TypeUnifyTask.java
recursiveCartesionProduct wieder entfernt
2018-02-21 17:54:26 +01:00
9c35f04a09 modified: src/de/dhbwstuttgart/typeinference/unify/RuleSet.java 2018-02-21 17:22:23 +01:00
6808535f67 Merge branch 'parser' of ssh://gohorb.ba-horb.de/bahome/projekt/git/JavaCompilerCore into bytecode2 2018-02-21 15:45:22 +01:00
ac4a79f0e7 Additive/multiplicativeExpression und UnaryExpression implementiert 2018-02-21 15:43:28 +01:00
89246ece5c modified: src/de/dhbwstuttgart/core/JavaTXCompiler.java
modified:   src/de/dhbwstuttgart/typeinference/unify/RuleSet.java
	modified:   test/javFiles/Matrix.jav
2018-02-21 14:02:48 +01:00
7c2f7c54dd Kleine Änderung 2018-02-21 11:44:03 +01:00
c747ab0885 Additive Expression implementieren 2018-02-21 11:40:54 +01:00
6cf98f200b Merge branch 'bytecode2' of ssh://gohorb.ba-horb.de/bahome/projekt/git/JavaCompilerCore into bytecode2 2018-02-21 11:05:57 +01:00
ed3a3909c0 Merge branch 'bytecode2' into bigRefactoring 2018-02-21 11:05:25 +01:00
d53faa0c86 FiniteClosure korrekt generieren 2018-02-19 11:33:08 +01:00
b7bb0fa1c4 Vector Test Fehler beheben 2018-02-19 04:47:10 +01:00
166aa5e506 merge mit sat 2018-02-19 04:22:08 +01:00
5270cecec9 Changes to be committed:
modified:   src/de/dhbwstuttgart/core/JavaTXCompiler.java
	modified:   src/de/dhbwstuttgart/typeinference/unify/RuleSet.java
	modified:   src/de/dhbwstuttgart/typeinference/unify/TypeUnifyTask.java
	modified:   test/javFiles/Matrix.jav

Fehler in der Aufteilung von Unify korrigiert.
Equalcheck in Schritt 6 wiedre eingefuegt.
2018-02-14 17:45:08 +01:00
f6e0c561bb Merge branch 'bytecode2' of ssh://gohorb.ba-horb.de/bahome/projekt/git/JavaCompilerCore into bytecode2 2018-02-14 14:38:46 +01:00
a45aa50574 erzeugt bytecode für Zuweisung von Literale 2018-02-14 14:37:36 +01:00
191a1166b9 ASP Generator auf neues Format anpassen 2018-02-13 05:25:18 +01:00
6e770b5ec5 Java 9: Classloader ändern
*
2018-02-12 22:32:03 +01:00
87fe51767c modified: src/de/dhbwstuttgart/typeinference/unify/RuleSet.java
Reduce 1
C und D koennen auch gleich sein.
Muss nochmals ueberprueft werden.
2018-02-09 22:55:40 +01:00
f0610aeff1 Changes to be committed:
modified:   src/de/dhbwstuttgart/typeinference/typeAlgo/TYPEStmt.java
	modified:   src/de/dhbwstuttgart/typeinference/unify/TypeUnifyTask.java
	modified:   test/typeinference/JavaTXCompilerTest.java
2018-02-09 21:32:15 +01:00
e4fbd17a55 modified: src/de/dhbwstuttgart/typeinference/unify/TypeUnifyTask.java
modified:   test/javFiles/Matrix.jav
Rekursive Berechnung des Kartesischen Produkts
2018-02-08 00:02:27 +01:00
9c526f20fb merge 2018-02-07 16:56:11 +01:00
1f269918fb nicht lauffaehig 2018-02-07 16:53:24 +01:00
2d5c863008 HEAD detached at 2f994cdf
Changes to be committed:
Aenderungen am Unify: Fehler behoben und Vereinfachung

	modified:   src/de/dhbwstuttgart/core/JavaTXCompiler.java
	new file:   src/de/dhbwstuttgart/typeinference/unify/Match.java
	modified:   src/de/dhbwstuttgart/typeinference/unify/TypeUnifyTask.java
	new file:   src/de/dhbwstuttgart/typeinference/unify/interfaces/IMatch.java
	modified:   src/de/dhbwstuttgart/typeinference/unify/model/FiniteClosure.java
	modified:   src/de/dhbwstuttgart/typeinference/unify/model/Node.java
	modified:   src/de/dhbwstuttgart/typeinference/unify/model/TypeParams.java
	modified:   src/de/dhbwstuttgart/typeinference/unify/model/Unifier.java
	modified:   test/javFiles/Matrix.jav
2018-02-07 14:38:45 +01:00
22499f09e8 modified: src/de/dhbwstuttgart/typeinference/unify/model/TypeParams.java
Zeile 101 Dangling-else Problematik behoben
War Fehler im Occurs-Cheeck von Montanari-Martelli.
2018-02-01 00:17:12 +01:00
1f89238fe4 Kleiner Bug beseitigt. Ungetesteter Stand 2018-01-31 18:38:52 +01:00
c61dd5411e Merge branch 'bigRefactoring' of ssh://gohorb.ba-horb.de/bahome/projekt/git/JavaCompilerCore into bytecode2 2018-01-31 16:47:18 +01:00
52487f3389 test LamAssign 2018-01-31 16:47:08 +01:00
5a3dcd7100 Merge branch 'bigRefactoring' of ssh://gohorb.ba-horb.de/bahome/projekt/git/JavaCompilerCore into plugin 2018-01-31 16:43:04 +01:00
2f994cdfa8 java.lang. nicht standardmäßig importieren 2018-01-31 16:42:51 +01:00
9c4f763c9a java.lang. nicht standardmäßig importieren 2018-01-31 16:42:25 +01:00
8f9c07d88e Merge 2018-01-31 16:18:29 +01:00
b32e437a05 Fehler 2018-01-31 16:16:05 +01:00
48e2d2eec2 Tests fixen 2018-01-31 16:15:07 +01:00
1a1ab2696d Merge branch 'bigRefactoring' of ssh://gohorb.ba-horb.de/bahome/projekt/git/JavaCompilerCore into plugin 2018-01-31 16:06:21 +01:00
1888eb6d46 merge 2018-01-31 15:57:58 +01:00
56d919f446 bug fix 2018-01-31 15:55:02 +01:00
15d120d594 Funktionsfähiges Matrix Beispiel, aber nicht komplett 2018-01-31 15:51:38 +01:00
e556a470e7 Literal löschen 2018-01-31 15:39:19 +01:00
398c1992fa merge 2018-01-31 14:23:19 +01:00
9a94ba2114 unnötige Kommentare wurden entfernt 2018-01-31 14:16:20 +01:00
cdcebdd4ac Merge 2018-01-31 13:36:35 +01:00
8e4791cca6 Anpassungen im Matrix Test 2018-01-31 13:34:54 +01:00
3ce4937bc1 Fehler im Trailing Return anhängen beheben 2018-01-30 02:23:58 +01:00
027538a082 Unary Expression und while statement anfügen 2018-01-30 01:08:21 +01:00
39793b461e modified: test/javFiles/Matrix.jav
Falsche Typen in methode korrigiert.
2018-01-29 22:35:48 +01:00
29173ba172 Merge branch 'bigRefactoring' of ssh://gohorb.ba-horb.de/bahome/projekt/git/JavaCompilerCore into bigRefactoring
Genauere Fehlermeldung im Unify
2018-01-29 21:32:46 +01:00
5d94820fed modified: src/de/dhbwstuttgart/typeinference/unify/RuleSet.java
modified:   src/de/dhbwstuttgart/typeinference/unify/model/Node.java
Genauere Fehlermeldung
2018-01-29 21:30:45 +01:00
c7dea4c86b Matrix Test 2018-01-29 18:26:14 +01:00
ede55d228e Fehler in ASTFactory beheben. GenericRefType statt RefType in den Parameterlisten 2018-01-29 17:35:49 +01:00
0610ea8e63 FC Generator 2018-01-29 17:32:25 +01:00
9186f5dff5 Alle Dependencies werden in eine Jar gepackt. Diese in Eclipseplugin umwandeln und einbinden funktioniert \o/ 2018-01-24 19:05:09 +01:00
5c9b40e0b7 Rumprobieren. Nicht lauffähig 2018-01-24 16:37:01 +01:00
8d12821c68 Methode erbt nicht mehr von Feld 2018-01-21 11:38:55 +01:00
311d7ee63a Merge branch 'bigRefactoring' into sat 2018-01-21 11:17:46 +01:00
bd0678f362 Lokales Repo eintragen 2018-01-21 11:17:20 +01:00
a08e2e8815 Versuche google und reflections auch noch als plugin zu verpacken. WIll nicht funktionieren 2018-01-19 17:48:25 +01:00
47689f2fc6 ZIP-FIle erstellen 2018-01-19 16:55:23 +01:00
b7aca99301 local maven repository 2018-01-19 16:36:08 +01:00
8920b32020 Unnötige import entfernen 2018-01-19 15:28:54 +01:00
1f5071d4e4 Methode soll kein Feld mehr sein. Nicht lauffähig! 2018-01-19 15:24:49 +01:00
da41857a4f Plugin deploy backup 2018-01-19 15:22:29 +01:00
09dcdaeb96 Local Repo anfügen 2018-01-19 15:14:39 +01:00
6d0392956d Pom anpassen 2018-01-19 14:34:41 +01:00
542f87e8a3 erzeugt Klassendatei für FunN 2018-01-17 13:49:18 +01:00
57df329751 Merge branch 'bigRefactoring' into sat 2018-01-12 22:47:49 +01:00
7b24e2d83f bytecode für Generics: LamAssignTest funktioniert richtig 2018-01-10 15:37:50 +01:00
b1b1cfdc54 --amend 2018-01-10 12:14:20 +01:00
672373fc8d --amend 2018-01-10 12:11:51 +01:00
ab86cc3229 RefType.toString(): Ausgabe von Parameterliste implementieren 2018-01-10 12:10:01 +01:00
0c19cc7400 Merge branch 'bigRefactoring' into bytecode2 2018-01-10 11:58:03 +01:00
268056542b erzeugt bytecode für generics 2018-01-10 11:36:29 +01:00
19a1ef4024 Erste lauffähige aber unvollständige Version des UnifyWithoutWildcards 2018-01-10 10:53:07 +01:00
3c732346d9 ASPParameterlist erzeugt auch paramNum 2018-01-06 09:38:53 +01:00
01339ca7ec Descriptor-Erzeugen neu mit Visitor-pattern implementiert 2017-12-28 10:20:28 +01:00
6ddc4983b0 Fehler im Type beheben 2017-12-20 17:12:40 +01:00
719d1a5ced Interface Modifier setzen 2017-12-20 15:59:07 +01:00
90a9273fc2 TypeToStringVisitor 2017-12-20 15:37:33 +01:00
009a638c9a FC ohne java.lang generieren 2017-12-20 15:27:39 +01:00
55be865ab4 Bugfix 2017-12-20 15:06:04 +01:00
01fd396d29 Test generics 2017-12-20 15:04:03 +01:00
dccdc5da2b Merge branch 'bigRefactoring' into bytecode2 2017-12-20 15:01:19 +01:00
940c922c80 ResultSet kann GenericRefTypes auflösen 2017-12-20 15:01:02 +01:00
bdc2a83b1c Merge branch 'bytecode2' of ssh://gohorb.ba-horb.de/bahome/projekt/git/JavaCompilerCore into bytecode2 2017-12-20 14:14:25 +01:00
d989100b47 korrekte bytecode 2017-12-20 14:14:05 +01:00
f015ef75f7 Merge branch 'bigRefactoring' into bytecode2 2017-12-20 13:43:46 +01:00
5f731bb09c letzte tests 2017-12-20 13:35:55 +01:00
09bdaa6a21 Generics Test erzeugt falsches ConstraintSet 2017-12-20 13:34:34 +01:00
e8757a179f ASP-Generierung: parameterListe 2017-12-18 14:43:03 +01:00
3a444c0172 Aufräumen 2017-12-15 13:12:18 +01:00
ab36050f9b Merge branch 'bigRefactoring' of ssh://gohorb.ba-horb.de/bahome/projekt/git/JavaCompilerCore into bytecode2 2017-12-15 09:01:59 +01:00
9919ecd083 Anfangen mit Masterarbeit 2017-12-15 00:06:57 +01:00
7d8e8249ed Merge branch 'sat' into bigRefactoring 2017-12-15 00:05:47 +01:00
fb0ef510b2 Fehlende Klasse 2017-12-15 00:05:30 +01:00
72fdf2dca8 merge 2017-12-14 21:20:57 +01:00
eb8db0e0eb TPH = TPH ist jetzt auch im ResultSet möglich. Anpassungen an der Generierung der Imports einer SourceFile; läuft noch nicht fehlerfrei 2017-12-14 17:44:43 +01:00
5386227a34 Merge branch 'bigRefactoring' into sat 2017-12-14 00:06:11 +01:00
5e675b9a93 Test anfügen 2017-12-13 13:34:22 +01:00
fd8df92c03 generatedBC-Directory anfügen 2017-12-13 13:32:00 +01:00
eddac2c8ed VoidMeth Test korrigieren 2017-12-13 13:15:11 +01:00
a8274bdc69 erzeugt bytecode fuer lambda 2017-11-29 14:45:15 +01:00
e702f745c3 Dirty fix 2017-11-29 14:31:07 +01:00
4616f82b09 Merge branch 'bytecode2' of ssh://gohorb.ba-horb.de/bahome/projekt/git/JavaCompilerCore into bytecode2 2017-11-22 13:15:21 +01:00
dbe47f41c1 FunNClass anfügen 2017-11-22 13:12:21 +01:00
b55d0779e9 ResultPairs des Unify Algorithmus könnnen nun auch Wildcard-Typen enthalten 2017-11-22 06:49:11 +01:00
928396927e Faculty Test geht wieder 2017-11-16 17:28:50 +01:00
9a886ed223 Typdeklarationen wie List, werden jetzt automatisch TPHs eingesetzt. (Als hätte man den Diamond-Operator benutzt) 2017-11-16 16:56:12 +01:00
16e14f9363 Finite CLosure TEst läuft wieder halbwegs. Sonst unfertiger Zustand 2017-11-16 15:10:08 +01:00
b51d8356b7 Unvollständiger Zustand; Verknüpfung zwischen GTVs und TPH geändert. Änderungen in TypeStmt 2017-11-15 17:58:15 +01:00
48dc76646b createPair Methode entfernen. Die Generics können nicht generell aufgelöst werden. (unvollständiger Zustand) 2017-11-14 19:28:46 +01:00
fea86460e8 Änderungen an der FC generierung und an dem Verhalten von GTVs im Type Algorithmus UNVOLLSTÄNDIG. Kleines Backup, da große Änderung am Type-Algorithmus noch ansteht. 2017-11-09 19:41:53 +01:00
01703a73c5 generiert Bytecode fuer einfachen Lambda 2017-11-07 10:55:33 +01:00
bb5e697699 Merge branch 'bytecode2' of ssh://gohorb.ba-horb.de/bahome/projekt/git/JavaCompilerCore into bytecode2 2017-11-03 14:18:32 +01:00
5a026a431c kleine Aenderung 2017-11-03 14:17:36 +01:00
1d767a7696 Matrix Test 2017-11-03 13:56:04 +01:00
d2fa9e00f8 Fix bug 2017-10-30 18:08:40 +01:00
934e5f85f8 Unterschied zwischen Expr-Receiver und Classname-Receiver 2017-10-26 21:45:04 +02:00
bfa106913b extends in Parser implementieren. Dirty fix für fehlende Object-Klasse in der JavaClassNameRegistry 2017-10-18 16:40:27 +02:00
44f4aa4b27 Test anfügen 2017-10-18 16:18:46 +02:00
a69b827805 Var Keyword ist kein keyword mehr, kann also auch als Variablennamen verwendet werden 2017-10-18 00:22:42 +02:00
0c80a4c343 Fix bei Typeinsetzung 2017-10-16 19:19:42 +02:00
e18439918c Merge 2017-10-15 23:09:46 +02:00
b116139357 Guava Version update 2017-10-15 22:49:23 +02:00
040300d78e unnötige Imports entfernen 2017-10-10 17:05:32 +02:00
c442e2ac17 Merge branch 'bigRefactoring' 2017-10-10 15:51:13 +02:00
9607fcf980 Imports in parser implementieren 2017-10-10 15:34:52 +02:00
cecec91f74 Merge 2017-10-10 14:51:53 +02:00
8c00d89731 Finite Closure beachtet imports 2017-10-10 14:47:05 +02:00
d5d74fef85 Merge 2017-10-06 14:13:31 +02:00
36bb442bff Aufräumen 2017-10-06 13:34:03 +02:00
c595925112 Fehlende Tests anfügen 2017-10-06 13:31:36 +02:00
0116643bc1 .gitignore erweitern 2017-10-06 13:24:17 +02:00
8d6a722cec .gitignore erweitern 2017-10-06 13:23:48 +02:00
672d40c557 Merge branch 'bytecode2' of ssh://gohorb.ba-horb.de/bahome/projekt/git/JavaCompilerCore into bytecode2 2017-10-06 09:16:42 +02:00
94c69cca55 Merge branch 'bigRefactoring' into bytecode2 2017-10-06 03:59:58 +02:00
843dd7453d ANTLR Plugin + Configuration an pom.xml anfügen 2017-10-06 03:59:35 +02:00
ad36158a47 Test dateien 2017-10-05 20:23:27 +02:00
7de617f0c1 test 2017-10-05 20:02:11 +02:00
6738eecdf3 Merge 2017-10-05 19:21:30 +02:00
a011061f22 Merge branch 'bytecode2' of ssh://gohorb.ba-horb.de/bahome/projekt/git/JavaCompilerCore into bytecode2 2017-10-05 18:29:37 +02:00
15e18c5907 merge unvollständig 2017-10-05 18:29:27 +02:00
4c213eb3cf generate bytecode 2017-10-05 18:25:52 +02:00
a194bdbc9f Aufräumen 2017-10-05 18:23:28 +02:00
e341d9075e Alle Klassen aus Standard Library laden 2017-10-05 01:13:08 +02:00
b104ff591f Aufräumen 2017-10-05 00:47:05 +02:00
bf8e6d1492 merge 2017-10-04 16:46:31 +02:00
bd024d9f4a Aufräumen 2017-10-04 16:39:02 +02:00
a78b7c5af3 unnötige librarys löschen 2017-10-04 13:26:18 +02:00
5d5132faf4 Merge branch 'bigRefactoring' 2017-10-04 13:23:56 +02:00
0a8236cd86 modified: src/de/dhbwstuttgart/typeinference/unify/RuleSet.java
In reduceFunN:
&& (pair.getPairOp() != PairOperator.EQUALSDOT))     //PL 2017-10-03 hinzugefuegt
		                                                       //da Regel auch fuer EQUALSDOT anwendbar
			                                                   //TODO: fuer allen anderen Relationen noch pruefen
2017-10-03 22:06:37 +02:00
7f888a1bf8 modified: src/de/dhbwstuttgart/typeinference/unify/RuleSet.java
FunType von Bedingung <. auf beliebig zu gelassen
	modified:   src/de/dhbwstuttgart/typeinference/unify/TypeUnifyTask.java
bei childrenaufruf unifyCase1 gleiches Element hinzugefuegt
	modified:   test/typeinference/JavaTXCompilerTest.java
typeinference-Aufruf vor die Schleife gezogen
2017-10-03 21:58:39 +02:00
fa92fee98d modified: .classpath
Keine Ahnung

	modified:   src/de/dhbwstuttgart/typeinference/unify/RuleSet.java
Aenderung Zeile 578
				rhsType = pair.getRhsType(); //PL eingefuegt 2017-09-29 statt !((rhsType = pair.getRhsType()) instanceof PlaceholderType)
			if(lhsType != null
					//&& !((rhsType = pair.getRhsType()) instanceof PlaceholderType) //PL geloescht am 2017-09-29 Begründung: auch Typvariablen muessen ersetzt werden.

	modified:   src/de/dhbwstuttgart/typeinference/unify/TypeUnifyTask.java

1. Aenderung: Zeile 168
/*
			 * Step 6 a) Restart (fork) for pairs where subst was applied
			 */
			if(parallel) {
				if //(eqPrime.equals(eq))         //PL 2017-09-29 auskommentiert und durch
					(!eqPrimePrime.isPresent())   //PL 2071-09-29 dies ersetzt
					                              //Begruendung: Wenn in der Substitution keine Veraenderung
					                              //(!eqPrimePrime.isPresent()) erfolgt ist, ist das Ergebnis erzielt.
					eqPrimePrimeSet.add(eqPrime);

2. Aenderung: Ziel 188
else { // sequentiell (Step 6b is included)
				if //(eqPrime.equals(eq))         //PL 2017-09-29 auskommentiert und durch
				(!eqPrimePrime.isPresent())       //PL 2071-09-29 dies ersetzt
                                                  //Begruendung: Wenn in der Substitution keine Veraenderung
                                                  //(!eqPrimePrime.isPresent()) erfolgt ist, ist das Ergebnis erzielt.
					eqPrimePrimeSet.add(eqPrime);
2017-09-30 14:51:05 +02:00
43413d5e3c Bugfix in Test 2017-09-28 16:55:29 +02:00
d24b2fa7d6 bcel entfernen. pom.xml anlegen 2017-09-28 16:52:07 +02:00
db9298e383 library adden 2017-09-26 12:37:21 +02:00
1e0da98c4b auto-keyword zu var-keyword ändern 2017-09-25 23:47:38 +02:00
4b44fba421 Bugfix 2017-09-25 16:49:27 +02:00
07b159f9a3 Bugfix 2017-09-25 15:57:35 +02:00
276ff44756 Berücksichtige TPH =. TPH Ergebnisse im ResultSet 2017-09-25 11:22:53 +02:00
b31da88902 Logik für Generics implementieren. Unvollständig 2017-09-25 01:14:02 +02:00
6a1f5dc248 Unvollständiger Stand bei der Implementierung von Generics 2017-09-22 18:31:47 +02:00
0e2390a80a GlobalGenerics eingeführt 2017-09-20 23:41:06 +02:00
8ce017c2f2 Fehler beheben. PackageCrawler lauffähig 2017-09-20 18:20:52 +02:00
b8a5795bb3 PackageCrawler und CompilationEnvironment implementieren 2017-09-20 17:26:09 +02:00
9b960329fc PackageCrawler wieder einführen. Unvollständig 2017-09-20 15:52:14 +02:00
b1adc4671d Environment einführen 2017-09-20 14:00:44 +02:00
6e03d24582 Tests auslagern 2017-09-19 18:51:44 +02:00
f81496fe1f Fehler in TypeStmt beheben 2017-09-18 18:32:22 +02:00
201a0978bc Constructor für IfStmt 2017-09-18 13:56:27 +02:00
98331af3c0 Fehler in UnifyTypeConvert beheben 2017-09-07 19:52:05 +02:00
a355fe7786 fehler beheben 2017-09-07 18:37:56 +02:00
ea1e81bb95 Merge branch 'bigRefactoring' of ssh://gohorb.ba-horb.de/bahome/projekt/git/JavaCompilerCore into bigRefactoring 2017-09-07 17:03:15 +02:00
b6f62b48eb ResultSet um resolveType erweitern 2017-09-07 17:02:49 +02:00
995af3004a Merge branch 'bigRefactoring' of ssh://gohorb.ba-horb.de/bahome/projekt/git/JavaCompilerCore into bytecode2 2017-09-07 16:42:19 +02:00
5c66212afb neue Datei: S2017_Jan-Elric_Neumann.pdf 2017-09-04 09:30:59 +02:00
9a233e437b bytecode 2017-08-30 18:08:05 +02:00
9918e78f97 Merge branch 'master' of ssh://gohorb.ba-horb.de/bahome/projekt/git/JavaCompilerCore into bytecode2 2017-08-30 17:21:17 +02:00
d245aa7367 Added Modifier to Method 2017-08-30 17:20:59 +02:00
3d07f60145 Merge branch 'master' of ssh://gohorb.ba-horb.de/bahome/projekt/git/JavaCompilerCore into bytecode2 2017-08-30 17:11:46 +02:00
7c3181c3f0 Super-Statement an Constructor angefügt 2017-08-30 17:06:42 +02:00
b251a646ca System.out.println Statement schein halbwegs zu funktionieren ^^ 2017-08-30 15:29:34 +02:00
276f235b56 Merge branch 'bigRefactoring' of ssh://gohorb.ba-horb.de/bahome/projekt/git/JavaCompilerCore into bytecode2 2017-08-30 14:43:53 +02:00
866429ffe7 Merge branch 'bigRefactoring' of ssh://gohorb.ba-horb.de/bahome/projekt/git/JavaCompilerCore into bytecode2 2017-08-30 14:43:31 +02:00
4b21f03a5a Refactoring 2017-08-30 14:36:40 +02:00
a7e1a5e2c2 Fehler beheben 2017-08-28 18:36:26 +02:00
932b277dcc Imports implementieren 2017-08-28 17:36:51 +02:00
45c85b7686 Type refactoring 2017-08-28 15:42:51 +02:00
ff59b585bd TypeInsert ausbessern 2017-08-25 03:39:54 +02:00
397ac3cd58 TypeInsert ausbessern 2017-08-25 02:59:16 +02:00
77c59de0f0 Assign ändern. Es gibt jetzt eine AssignLeftSide 2017-08-23 18:28:26 +02:00
6e72bbab16 Merge branch 'bigRefactoring' of ssh://gohorb.ba-horb.de/bahome/gast/abualia/test/JavaCompilerCore into bytecode2 2017-08-23 17:27:23 +02:00
43f017a224 Bytecode TEst 2017-08-23 17:26:59 +02:00
9a7e717c25 Constructor um fieldInits erweitern, auch der TYPE algo 2017-08-23 16:24:25 +02:00
6b98bf6a58 Feld initialisierungen werden an Konstruktoren angehängt 2017-08-23 03:52:24 +02:00
bbc61c67a9 TypeInsert Fehler beheben 2017-08-23 01:43:20 +02:00
1023ed8557 Generics einsetzen 2017-08-22 18:31:07 +02:00
3274f12922 Fehler in TypeInsert beheben 2017-08-22 16:45:28 +02:00
52f562b570 DoStmt zu ASTPrinter hinzufügen 2017-08-17 15:58:56 +02:00
a9c49676a9 do statement implemented 2017-08-17 15:30:57 +02:00
856f9b059d while Statement implemented 2017-08-17 15:08:30 +02:00
ae02ee247a SAT Package erstellen 2017-08-17 15:08:07 +02:00
0cf8f82283 Remove ClassNotFoundException 2017-08-07 23:51:22 +02:00
1e6f046eff Merge branch 'bigRefactoring' of ssh://gohorb.ba-horb.de/bahome/projekt/git/JavaCompilerCore into bigRefactoring 2017-07-14 17:48:04 +02:00
841ac5fcbf PackageCrawler durch ClassLoader ersetzen 2017-07-14 17:47:02 +02:00
3b95cdd76f Merge (auweioiwae) 2017-07-14 15:39:16 +02:00
057df7c702 TypeInsert API anpassen 2017-07-10 21:23:48 +02:00
86f29f1396 TypeInsert API anpassen 2017-07-09 16:35:33 +02:00
0f6381f30b TypeInsert anpassen 2017-07-05 20:09:09 +02:00
adda1db195 Add parse(String) to Compiler 2017-07-05 18:46:08 +02:00
2167a4288e Add possibility to parse a String to parser 2017-07-05 17:52:23 +02:00
0ad97251ca Change Parser FileInput to InputStream 2017-07-05 17:50:38 +02:00
87d2edaaa6 Change TIP creation 2017-07-05 17:42:41 +02:00
fc6040da39 Fehler in TYPE beseitigen 2017-06-30 13:48:59 +02:00
d64823ea30 Fehler bei GenericInsertPoints beheben 2017-06-30 12:14:07 +02:00
3b8ef58222 ASTTypePrinter anfügen 2017-06-30 11:13:15 +02:00
0aa18c74ba ASTPrinter verbessern 2017-06-29 01:19:13 +02:00
726eb60eb3 ASTPrinter einführen 2017-06-28 21:10:28 +02:00
afd3f32f23 ASTVisitor implementieren 2017-06-28 17:20:26 +02:00
3173cccefa Typen einsetzen um Wildcards erweitern 2017-06-26 18:19:56 +02:00
e6c58d44c2 Type für Return fixen 2017-06-26 16:59:10 +02:00
1be1bb83ca FunN-Typen erstellen bei Methodenaufrufen 2017-06-23 21:33:27 +02:00
2c25e56a76 Einsetzen von Generics korrigieren 2017-06-20 14:50:27 +02:00
c272688b2d Fehler beim Ausrechnen zusammenhängender Constraints beheben 2017-06-20 01:14:04 +02:00
cf6d9880e3 Generische Parameter einsetzen (nur Test, nicht korrekt eingesetzt) 2017-06-15 04:48:53 +02:00
920eea43ad Lambda Test angepasst 2017-06-15 02:57:49 +02:00
70ca62202d Typeinsetzen erweitert 2017-06-15 02:17:46 +02:00
44481b4140 Merge branch 'bigRefactoring' of ssh://gohorb.ba-horb.de/bahome/projekt/git/JavaCompilerCore into bigRefactoring 2017-06-14 04:07:43 +02:00
7a337843e6 Lambda-TYPE anpassen. Beginnen mit TypeInsert 2017-06-14 04:07:27 +02:00
fcca50ed78 modified: .classpath
modified:   src/de/dhbwstuttgart/parser/SyntaxTreeGenerator/SyntaxTreeGenerator.java
	modified:   src/de/dhbwstuttgart/syntaxtree/SourceFile.java
	modified:   src/de/dhbwstuttgart/syntaxtree/statement/LambdaExpression.java
	modified:   src/de/dhbwstuttgart/typecheck/GenericTypeName.java
	modified:   src/de/dhbwstuttgart/typeinference/typeAlgo/TYPE.java
	modified:   test/astfactory/ASTFactoryTest.java

imports auskommentiert
2017-06-13 17:38:43 +02:00
5f31150dc8 TYPE-Algo für LambdaExpression implementieren 2017-06-12 18:57:12 +02:00
a48cbae5a5 Removed faulty (and unused import), which prevented ObjectiF from parsing SyntaxTreeNode 2017-05-30 19:40:51 +02:00
b395f6e137 Fixed return type to make code parsable for ObjectiF 2017-05-30 19:38:03 +02:00
568 changed files with 24526 additions and 21771 deletions
.classpath.gitignore.project
.settings
README.md
Website
doc
lib
pom.xml
src/de/dhbwstuttgart
.DS_Store
bytecode
core
environment
exceptions
parser
sat
strucTypes
syntaxtree
ASTVisitor.javaAbstractASTWalker.javaClassOrInterface.javaConstructor.javaExceptionList.javaField.javaFormalParameter.javaGTVDeclarationContext.javaGeneric.javaGenericDeclarationList.javaGenericTypeVar.javaMethod.javaParameterList.javaSourceFile.javaStatementVisitor.javaSyntaxTreeNode.javaTypeScope.java
factory
operator
statement
type
visual
typecheck
typedeployment
typeinference
target
test
asp
astfactory
bytecode
finiteClosure
javFiles
parser
strucType
typeinference
visualisation
testBytecode
tools
.cvsignoreAntParserBuilder.xmlAntParserBuilderDarwin.xmlAntParserBuilderLinux.xmlAntParserBuilderWindows.xmlJLex.jarJLex_neu.jarJavaParser.jay
Lambda
RunJay.batRunJay.shRunJayDarwin.sh
cygwin
Cygwin-Files
ftp%3a%2f%2fftp-stud.fht-esslingen.de%2fpub%2fMirrors%2fsources.redhat.com%2fcygwin
release
_update-info-dir
ash
base-files
base-passwd
bash
bzip2
cygutils
cygwin-doc
cygwin
diffutils
editrights
fileutils
findutils
gawk
gdbm
gettext
grep
groff
gzip
less
libiconv
login
man
mktemp
ncurses
pcre
popt
readline
sed
sh-utils
tar
termcap
terminfo
texinfo
textutils
which
zlib
setup.ini
setup.logsetup.log.full
cygwin_setup.exesetup.exe
cygwin1.dlljayjay.cygwin32jay.darwin
old
skeleton

@ -1,11 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="test"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
<classpathentry kind="lib" path="lib/bcel-6.1-SNAPSHOT.jar" sourcepath="lib/bcel-6.1-SNAPSHOT-sources.jar"/>
<classpathentry kind="lib" path="lib/guava-10.0.1.jar"/>
<classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/4"/>
<classpathentry kind="lib" path="lib/antlr-complete.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>

13
.gitignore vendored

@ -10,3 +10,16 @@ bin
*.jar
*.war
*.ear
# IDEs
.classpath
*.iml
.idea/
/target/
.DS_Store
.project
.settings/
/target/
#
manually/

@ -1,17 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>JavaCompilerCore</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>

@ -1,12 +0,0 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.source=1.8

19
README.md Normal file

@ -0,0 +1,19 @@
# plugin site erstellen
* die JAvaTXCOmpiler DAtei in ein plugin umwandeln und deployen.
* siehe: http://www.vogella.com/tutorials/EclipseJarToPlugin/article.html#convert-jar-files-to-osgi-bundles-with-the-p2-maven-plugin
* AUsführung:
* mvn deploy #erstellt die JAR-Datei und steckt sie in ein lokales Repo (maven-repository)
* mvn p2:site
* mvn package # hier wird die ZIP-Filf zum Einbinden in Eclipse erstellt
# Einbinden in Eclipse
* In Eclipse kann die Zip-FIle wie ein Plugin installiert werden
* Hier tritt FEhler auf. Reflections-Library kann nicht installiert werden. Möglicherweise wird sie auch nicht gebraucht
* Nach dem installieren de.dhbwstuttagrt.JavaTXcompiler zu den DEpendencies des plugins hinzufügen
* Anschließend unter "Overview" auf "Updata Classpath" klicken
# Windows
* JAVA_HOME setzen:
* export JAVA_HOME=/c/Program\ Files/Java/jdk1.8.0_102/

BIN
Website/JavaTXExamples.zip Normal file

Binary file not shown.

88
Website/index.html Normal file

@ -0,0 +1,88 @@
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html> <head>
<title>Java-TX Plugin</title></head>
<center>
<h1>Java-TX Plugin</h1>
</center>
<h2>Content</h2>
<ul>
<li><h4><a href="#introduction">Introduction</a></h4></li>
<li><h4><a href="newJavaTXProject/newJavaTXProject.html" >New Java-TX project</a></h4></li>
<li><h4><a href=" JavaTXExamples.zip" >Example project</a></h4></li>
<li><a href="usePlugin/usePlugin.html" >Using the plugin</a></li>
<li><h4><a href="install/install.html" >Installation</a></h4>
</li>
</ul>
<br/>
<h2 id="introduction">Introduction</h2>
Java-TX (Java Type eXtended) is an extension of Java in which a global type inference algorithm and real function types are added. Since the end of the nineties features from functional program- ming languages have been transferred to Java. Parametric polymorphism extended by wildcards, called generics, were transfered to Java 5.0. Higher-order functions and lambda expression were introduced in Java 8. Java 8 uses functional interfaces as target types of lambda expressions in contrast to real function types as in functional programming languages.
The powerful feature type inference from functional programming languages is incorporated into Java, as into other object-oriented
languages, i.e. only in a restricted way called local type inference. Local type inference allows certain type annotations to be omitted. For instance, it is often not necessary to specify the type of a variable. Type parameters of classes in the new-statement can be left out. Return types of methods can often also be omitted. Local type inference is at its most pronounced in Scala. In Java 10 an extention of local type inference is introduced, where types of local variables can be replaced by the keyword var and inferred automatically during the compilation. In contrast to global type inference, local type inference allows types of recursive methods and lambda expressions not to be omitted.<br>
The Java-TX project contributes to the design of object-oriented languages by developing global type inference algorithms for Java-like languages.
<h3>First Example</h3>
The class <tt>Id</tt> has the method <tt>id</tt>. The type annotations are omitted.
<br/>
<pre> <code class="language-java">
class Id {
id(x) {
return x;
}
}
</code> </pre>
The type inference algorithm inferrs the types, such that <tt>Id</tt> can be applied:
<pre>
new Id().id(1);
new Id().id("hallo");
</pre>
<h3>More complex example</h3>
<pre>
import java.lang.Integer;
import java.lang.Double;
import java.lang.String;
class OL {
m(x) { return x + x; }
}
class OLMain {
main(x) {
var ol;
ol = new OL();
return ol.m(x);
}
}
</pre>
The type inference mechanism considers only imported types. Therefore <tt>Integer</tt> <tt>Double</tt>, and <tt>String</tt> are imported.
<br/>
As the operator <tt>+</tt> is overloaded by all numeric types and String the methods <tt>m</tt> in the class <tt>OL</tt> and <tt>main</tt> in the class <tt>OLMain</tt>, respectively, gets all these types. The generated classfile demonstrates this:
<pre>
> javap OL.class
Compiled from "OL.jav"
class OL {
public OL();
public java.lang.Integer m(java.lang.Integer);
public java.lang.Double m(java.lang.Double);
}
> javap OLMain.class
Compiled from "OLMain.jav"
class OLMain {
public OLMain();
public java.lang.Integer main(java.lang.Integer);
public java.lang.Double main(java.lang.Double);
}
</pre>
<hr>
<address></address>
<!-- hhmts start -->Last modified: Fri Jun 1 16:43:55 CEST 2018 <!-- hhmts end -->
</body> </html>

BIN
Website/install/Restart.png Normal file

Binary file not shown.

After

(image error) Size: 25 KiB

Binary file not shown.

After

(image error) Size: 80 KiB

Binary file not shown.

After

(image error) Size: 109 KiB

@ -0,0 +1,40 @@
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html> <head>
<title>Install Java-TX Plugin</title>
</head>
<body>
<h1>Install Java-TX Plugin</h1>
<ol>
<li>Select "Install New Software ..."<br>
<img width= 400 src="newsoftware.png" >
</li>
<li>Add ...<br>
<img width=550 src="availableSoftware1.png" >
</li>
<li>Insert address<br>
<img width=550 src="availableSoftware2.png" >
</li>
<li>Select installation<br>
<img width=550 src="selectInstallation.png" >
</li>
<li>Installation details<br>
<img width=550 src="installationDetails.png" >
</li>
<li>Accept license agreement<br>
<img width=550 src="licenseAgreement.png" >
</li>
<li>Install anyway<br>
<img width=450 src="installAnyway.png">
</li>
<li>Restart<br>
<img width=450 src="Restart.png">
</li>
</ol>
<hr>
<address></address>
<!-- hhmts start -->Last modified: Fri Jun 1 11:57:15 CEST 2018 <!-- hhmts end -->
</body> </html>

@ -0,0 +1,40 @@
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html> <head>
<title>Install Java-TX Plugin</title>
</head>
<body>
<h2>Install Java-TX Plugin</h2>
<ol>
<li>Select "Install New Software ..."<br>
<img width= 400 src="newsoftware.png" >
</li>
<li>Add ...<br>
<img width=550 src="availableSoftware1.png" >
</li>
<li>Insert address<br>
<img width=550 src="availableSoftware2.png" >
</li>
<li>Select installation<br>
<img width=550 src="selectInstallation.png" >
</li>
<li>Installation details<br>
<img width=550 src="installationDetails.png" >
</li>
<li>Accept license agreement<br>
<img width=550 src="licenseAgreement.png" >
</li>
<li>Install anyway<br>
<img width=450 src="installAnyway.png">
</li>
<li>Restart<br>
<img width=450 src="Restart.png">
</li>
</ol>
<hr>
<address></address>
<!-- hhmts start -->Last modified: Fri Jun 1 12:05:43 CEST 2018 <!-- hhmts end -->
</body> </html>

Binary file not shown.

After

(image error) Size: 32 KiB

Binary file not shown.

After

(image error) Size: 52 KiB

Binary file not shown.

After

(image error) Size: 61 KiB

Binary file not shown.

After

(image error) Size: 96 KiB

Binary file not shown.

After

(image error) Size: 93 KiB

Binary file not shown.

After

(image error) Size: 163 KiB

Binary file not shown.

After

(image error) Size: 163 KiB

Binary file not shown.

After

(image error) Size: 88 KiB

Binary file not shown.

After

(image error) Size: 50 KiB

Binary file not shown.

After

(image error) Size: 96 KiB

Binary file not shown.

After

(image error) Size: 102 KiB

Binary file not shown.

After

(image error) Size: 100 KiB

Binary file not shown.

After

(image error) Size: 76 KiB

@ -0,0 +1,34 @@
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html> <head>
<title></title>
</head>
<h2>New Java-TX project in eclipse</h2>
<ol>
<li>New -> Java Project<br/>
<img width= 400 src="newJavaTXProject.png" >
</li>
<br/>
<li>Generate a jav-File folder<br/>
<img width= 550 src="newJavFolder1.png" ><br/><br/>
<img width= 550 src="newJavFolder2.png" >
</li>
<br/>
<li>Add jav-File folder as library<br/>
At the moment no package system is implemented, Therefore the compiled class files are in the jav-File folder. This has to be added as library:<br/>
<img width= 550 src="buildPath1.png" ><br/><br/>
<img width= 550 src="buildPath2.png" ><br/><br/>
<img width= 400 src="buildPath3.png" ><br/><br/>
<img width= 550 src="buildPath4.png" ><br/>
</li>
</ol>
<body>
<h1></h1>
<hr>
<address></address>
<!-- hhmts start -->Last modified: Fri Jun 1 16:50:02 CEST 2018 <!-- hhmts end -->
</body> </html>

Binary file not shown.

After

(image error) Size: 150 KiB

@ -0,0 +1,24 @@
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html> <head>
<title>Using the plugin</title>
</head>
<h2>Using the plugin</h2>
<ol>
<li>Overview<br/>
<img width=800 src="usePlugin1.png" >
</li>
<br/>
<li>Select types<br/>
If the method is overloaded the user can select types in the outline the right mouse button:<br/><br/>
<img src="usePlugin2.png" ><br/>
</li>
</ol>
<body>
<h1></h1>
<hr>
<address></address>
<!-- hhmts start -->Last modified: Fri Jun 1 16:51:28 CEST 2018 <!-- hhmts end -->
</body> </html>

Binary file not shown.

After

(image error) Size: 112 KiB

Binary file not shown.

After

(image error) Size: 33 KiB

@ -112,7 +112,7 @@ var activeTableTab = "activeTableTab";
<li><a href="../../../../de/dhbwstuttgart/syntaxtree/statement/Expr.html" title="class in de.dhbwstuttgart.syntaxtree.statement">de.dhbwstuttgart.syntaxtree.statement.Expr</a></li>
<li>
<ul class="inheritance">
<li><a href="../../../../de/dhbwstuttgart/syntaxtree/statement/Literal.html" title="class in de.dhbwstuttgart.syntaxtree.statement">de.dhbwstuttgart.syntaxtree.statement.literal.Literal</a></li>
<li><a href="../../../../de/dhbwstuttgart/syntaxtree/statement/Literal.html" title="class in de.dhbwstuttgart.syntaxtree.statement">de.dhbwstuttgart.syntaxtree.statement.Literal</a></li>
<li>
<ul class="inheritance">
<li>de.dhbwstuttgart.syntaxtree.statement.literal.BoolLiteral</li>
@ -253,7 +253,7 @@ extends <a href="../../../../de/dhbwstuttgart/syntaxtree/statement/Literal.html"
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.de.dhbwstuttgart.syntaxtree.statement.literal.Literal">
<li class="blockList"><a name="methods.inherited.from.class.de.dhbwstuttgart.syntaxtree.statement.Literal">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;de.dhbwstuttgart.syntaxtree.statement.<a href="../../../../de/dhbwstuttgart/syntaxtree/statement/Literal.html" title="class in de.dhbwstuttgart.syntaxtree.statement">Literal</a></h3>

@ -112,7 +112,7 @@ var activeTableTab = "activeTableTab";
<li><a href="../../../../de/dhbwstuttgart/syntaxtree/statement/Expr.html" title="class in de.dhbwstuttgart.syntaxtree.statement">de.dhbwstuttgart.syntaxtree.statement.Expr</a></li>
<li>
<ul class="inheritance">
<li><a href="../../../../de/dhbwstuttgart/syntaxtree/statement/Literal.html" title="class in de.dhbwstuttgart.syntaxtree.statement">de.dhbwstuttgart.syntaxtree.statement.literal.Literal</a></li>
<li><a href="../../../../de/dhbwstuttgart/syntaxtree/statement/Literal.html" title="class in de.dhbwstuttgart.syntaxtree.statement">de.dhbwstuttgart.syntaxtree.statement.Literal</a></li>
<li>
<ul class="inheritance">
<li>de.dhbwstuttgart.syntaxtree.statement.literal.CharLiteral</li>
@ -253,7 +253,7 @@ extends <a href="../../../../de/dhbwstuttgart/syntaxtree/statement/Literal.html"
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.de.dhbwstuttgart.syntaxtree.statement.literal.Literal">
<li class="blockList"><a name="methods.inherited.from.class.de.dhbwstuttgart.syntaxtree.statement.Literal">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;de.dhbwstuttgart.syntaxtree.statement.<a href="../../../../de/dhbwstuttgart/syntaxtree/statement/Literal.html" title="class in de.dhbwstuttgart.syntaxtree.statement">Literal</a></h3>

@ -112,7 +112,7 @@ var activeTableTab = "activeTableTab";
<li><a href="../../../../de/dhbwstuttgart/syntaxtree/statement/Expr.html" title="class in de.dhbwstuttgart.syntaxtree.statement">de.dhbwstuttgart.syntaxtree.statement.Expr</a></li>
<li>
<ul class="inheritance">
<li><a href="../../../../de/dhbwstuttgart/syntaxtree/statement/Literal.html" title="class in de.dhbwstuttgart.syntaxtree.statement">de.dhbwstuttgart.syntaxtree.statement.literal.Literal</a></li>
<li><a href="../../../../de/dhbwstuttgart/syntaxtree/statement/Literal.html" title="class in de.dhbwstuttgart.syntaxtree.statement">de.dhbwstuttgart.syntaxtree.statement.Literal</a></li>
<li>
<ul class="inheritance">
<li>de.dhbwstuttgart.syntaxtree.statement.literal.DoubleLiteral</li>
@ -263,7 +263,7 @@ extends <a href="../../../../de/dhbwstuttgart/syntaxtree/statement/Literal.html"
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.de.dhbwstuttgart.syntaxtree.statement.literal.Literal">
<li class="blockList"><a name="methods.inherited.from.class.de.dhbwstuttgart.syntaxtree.statement.Literal">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;de.dhbwstuttgart.syntaxtree.statement.<a href="../../../../de/dhbwstuttgart/syntaxtree/statement/Literal.html" title="class in de.dhbwstuttgart.syntaxtree.statement">Literal</a></h3>

@ -112,7 +112,7 @@ var activeTableTab = "activeTableTab";
<li><a href="../../../../de/dhbwstuttgart/syntaxtree/statement/Expr.html" title="class in de.dhbwstuttgart.syntaxtree.statement">de.dhbwstuttgart.syntaxtree.statement.Expr</a></li>
<li>
<ul class="inheritance">
<li><a href="../../../../de/dhbwstuttgart/syntaxtree/statement/Literal.html" title="class in de.dhbwstuttgart.syntaxtree.statement">de.dhbwstuttgart.syntaxtree.statement.literal.Literal</a></li>
<li><a href="../../../../de/dhbwstuttgart/syntaxtree/statement/Literal.html" title="class in de.dhbwstuttgart.syntaxtree.statement">de.dhbwstuttgart.syntaxtree.statement.Literal</a></li>
<li>
<ul class="inheritance">
<li>de.dhbwstuttgart.syntaxtree.statement.literal.FloatLiteral</li>
@ -263,7 +263,7 @@ extends <a href="../../../../de/dhbwstuttgart/syntaxtree/statement/Literal.html"
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.de.dhbwstuttgart.syntaxtree.statement.literal.Literal">
<li class="blockList"><a name="methods.inherited.from.class.de.dhbwstuttgart.syntaxtree.statement.Literal">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;de.dhbwstuttgart.syntaxtree.statement.<a href="../../../../de/dhbwstuttgart/syntaxtree/statement/Literal.html" title="class in de.dhbwstuttgart.syntaxtree.statement">Literal</a></h3>

@ -112,7 +112,7 @@ var activeTableTab = "activeTableTab";
<li><a href="../../../../de/dhbwstuttgart/syntaxtree/statement/Expr.html" title="class in de.dhbwstuttgart.syntaxtree.statement">de.dhbwstuttgart.syntaxtree.statement.Expr</a></li>
<li>
<ul class="inheritance">
<li><a href="../../../../de/dhbwstuttgart/syntaxtree/statement/Literal.html" title="class in de.dhbwstuttgart.syntaxtree.statement">de.dhbwstuttgart.syntaxtree.statement.literal.Literal</a></li>
<li><a href="../../../../de/dhbwstuttgart/syntaxtree/statement/Literal.html" title="class in de.dhbwstuttgart.syntaxtree.statement">de.dhbwstuttgart.syntaxtree.statement.Literal</a></li>
<li>
<ul class="inheritance">
<li>de.dhbwstuttgart.syntaxtree.statement.literal.NumberLiteral</li>
@ -263,7 +263,7 @@ extends <a href="../../../../de/dhbwstuttgart/syntaxtree/statement/Literal.html"
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.de.dhbwstuttgart.syntaxtree.statement.literal.Literal">
<li class="blockList"><a name="methods.inherited.from.class.de.dhbwstuttgart.syntaxtree.statement.Literal">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;de.dhbwstuttgart.syntaxtree.statement.<a href="../../../../de/dhbwstuttgart/syntaxtree/statement/Literal.html" title="class in de.dhbwstuttgart.syntaxtree.statement">Literal</a></h3>

@ -112,7 +112,7 @@ var activeTableTab = "activeTableTab";
<li><a href="../../../../de/dhbwstuttgart/syntaxtree/statement/Expr.html" title="class in de.dhbwstuttgart.syntaxtree.statement">de.dhbwstuttgart.syntaxtree.statement.Expr</a></li>
<li>
<ul class="inheritance">
<li>de.dhbwstuttgart.syntaxtree.statement.literal.Literal</li>
<li>de.dhbwstuttgart.syntaxtree.statement.Literal</li>
</ul>
</li>
</ul>

@ -112,7 +112,7 @@ var activeTableTab = "activeTableTab";
<li><a href="../../../../de/dhbwstuttgart/syntaxtree/statement/Expr.html" title="class in de.dhbwstuttgart.syntaxtree.statement">de.dhbwstuttgart.syntaxtree.statement.Expr</a></li>
<li>
<ul class="inheritance">
<li><a href="../../../../de/dhbwstuttgart/syntaxtree/statement/Literal.html" title="class in de.dhbwstuttgart.syntaxtree.statement">de.dhbwstuttgart.syntaxtree.statement.literal.Literal</a></li>
<li><a href="../../../../de/dhbwstuttgart/syntaxtree/statement/Literal.html" title="class in de.dhbwstuttgart.syntaxtree.statement">de.dhbwstuttgart.syntaxtree.statement.Literal</a></li>
<li>
<ul class="inheritance">
<li>de.dhbwstuttgart.syntaxtree.statement.LongLiteral</li>
@ -263,7 +263,7 @@ extends <a href="../../../../de/dhbwstuttgart/syntaxtree/statement/Literal.html"
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.de.dhbwstuttgart.syntaxtree.statement.literal.Literal">
<li class="blockList"><a name="methods.inherited.from.class.de.dhbwstuttgart.syntaxtree.statement.Literal">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;de.dhbwstuttgart.syntaxtree.statement.<a href="../../../../de/dhbwstuttgart/syntaxtree/statement/Literal.html" title="class in de.dhbwstuttgart.syntaxtree.statement">Literal</a></h3>

@ -115,7 +115,7 @@ var activeTableTab = "activeTableTab";
<li><a href="../../../../de/dhbwstuttgart/syntaxtree/statement/UnaryExpr.html" title="class in de.dhbwstuttgart.syntaxtree.statement">de.dhbwstuttgart.syntaxtree.statement.UnaryExpr</a></li>
<li>
<ul class="inheritance">
<li>de.dhbwstuttgart.syntaxtree.statement.NegativeExpr</li>
<li>de.dhbwstuttgart.syntaxtree.statement.javaInternal.NegativeExpr</li>
</ul>
</li>
</ul>

@ -115,7 +115,7 @@ var activeTableTab = "activeTableTab";
<li><a href="../../../../de/dhbwstuttgart/syntaxtree/statement/UnaryExpr.html" title="class in de.dhbwstuttgart.syntaxtree.statement">de.dhbwstuttgart.syntaxtree.statement.UnaryExpr</a></li>
<li>
<ul class="inheritance">
<li>de.dhbwstuttgart.syntaxtree.statement.NotExpr</li>
<li>de.dhbwstuttgart.syntaxtree.statement.javaInternal.NotExpr</li>
</ul>
</li>
</ul>

@ -112,7 +112,7 @@ var activeTableTab = "activeTableTab";
<li><a href="../../../../de/dhbwstuttgart/syntaxtree/statement/Expr.html" title="class in de.dhbwstuttgart.syntaxtree.statement">de.dhbwstuttgart.syntaxtree.statement.Expr</a></li>
<li>
<ul class="inheritance">
<li><a href="../../../../de/dhbwstuttgart/syntaxtree/statement/Literal.html" title="class in de.dhbwstuttgart.syntaxtree.statement">de.dhbwstuttgart.syntaxtree.statement.literal.Literal</a></li>
<li><a href="../../../../de/dhbwstuttgart/syntaxtree/statement/Literal.html" title="class in de.dhbwstuttgart.syntaxtree.statement">de.dhbwstuttgart.syntaxtree.statement.Literal</a></li>
<li>
<ul class="inheritance">
<li>de.dhbwstuttgart.syntaxtree.statement.literal.Null</li>
@ -245,7 +245,7 @@ extends <a href="../../../../de/dhbwstuttgart/syntaxtree/statement/Literal.html"
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.de.dhbwstuttgart.syntaxtree.statement.literal.Literal">
<li class="blockList"><a name="methods.inherited.from.class.de.dhbwstuttgart.syntaxtree.statement.Literal">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;de.dhbwstuttgart.syntaxtree.statement.<a href="../../../../de/dhbwstuttgart/syntaxtree/statement/Literal.html" title="class in de.dhbwstuttgart.syntaxtree.statement">Literal</a></h3>

@ -115,7 +115,7 @@ var activeTableTab = "activeTableTab";
<li><a href="../../../../de/dhbwstuttgart/syntaxtree/statement/UnaryExpr.html" title="class in de.dhbwstuttgart.syntaxtree.statement">de.dhbwstuttgart.syntaxtree.statement.UnaryExpr</a></li>
<li>
<ul class="inheritance">
<li>de.dhbwstuttgart.syntaxtree.statement.PositivExpr</li>
<li>de.dhbwstuttgart.syntaxtree.statement.javaInternal.PositivExpr</li>
</ul>
</li>
</ul>

@ -115,7 +115,7 @@ var activeTableTab = "activeTableTab";
<li><a href="../../../../de/dhbwstuttgart/syntaxtree/statement/UnaryExpr.html" title="class in de.dhbwstuttgart.syntaxtree.statement">de.dhbwstuttgart.syntaxtree.statement.UnaryExpr</a></li>
<li>
<ul class="inheritance">
<li>de.dhbwstuttgart.syntaxtree.statement.PostDecExpr</li>
<li>de.dhbwstuttgart.syntaxtree.statement.javaInternal.PostDecExpr</li>
</ul>
</li>
</ul>

@ -115,7 +115,7 @@ var activeTableTab = "activeTableTab";
<li><a href="../../../../de/dhbwstuttgart/syntaxtree/statement/UnaryExpr.html" title="class in de.dhbwstuttgart.syntaxtree.statement">de.dhbwstuttgart.syntaxtree.statement.UnaryExpr</a></li>
<li>
<ul class="inheritance">
<li>de.dhbwstuttgart.syntaxtree.statement.PostIncExpr</li>
<li>de.dhbwstuttgart.syntaxtree.statement.javaInternal.PostIncExpr</li>
</ul>
</li>
</ul>

@ -115,7 +115,7 @@ var activeTableTab = "activeTableTab";
<li><a href="../../../../de/dhbwstuttgart/syntaxtree/statement/UnaryExpr.html" title="class in de.dhbwstuttgart.syntaxtree.statement">de.dhbwstuttgart.syntaxtree.statement.UnaryExpr</a></li>
<li>
<ul class="inheritance">
<li>de.dhbwstuttgart.syntaxtree.statement.PreDecExpr</li>
<li>de.dhbwstuttgart.syntaxtree.statement.javaInternal.PreDecExpr</li>
</ul>
</li>
</ul>

@ -115,7 +115,7 @@ var activeTableTab = "activeTableTab";
<li><a href="../../../../de/dhbwstuttgart/syntaxtree/statement/UnaryExpr.html" title="class in de.dhbwstuttgart.syntaxtree.statement">de.dhbwstuttgart.syntaxtree.statement.UnaryExpr</a></li>
<li>
<ul class="inheritance">
<li>de.dhbwstuttgart.syntaxtree.statement.PreIncExpr</li>
<li>de.dhbwstuttgart.syntaxtree.statement.javaInternal.PreIncExpr</li>
</ul>
</li>
</ul>

@ -112,7 +112,7 @@ var activeTableTab = "activeTableTab";
<li><a href="../../../../de/dhbwstuttgart/syntaxtree/statement/Expr.html" title="class in de.dhbwstuttgart.syntaxtree.statement">de.dhbwstuttgart.syntaxtree.statement.Expr</a></li>
<li>
<ul class="inheritance">
<li><a href="../../../../de/dhbwstuttgart/syntaxtree/statement/Literal.html" title="class in de.dhbwstuttgart.syntaxtree.statement">de.dhbwstuttgart.syntaxtree.statement.literal.Literal</a></li>
<li><a href="../../../../de/dhbwstuttgart/syntaxtree/statement/Literal.html" title="class in de.dhbwstuttgart.syntaxtree.statement">de.dhbwstuttgart.syntaxtree.statement.Literal</a></li>
<li>
<ul class="inheritance">
<li>de.dhbwstuttgart.syntaxtree.statement.literal.StringLiteral</li>
@ -253,7 +253,7 @@ extends <a href="../../../../de/dhbwstuttgart/syntaxtree/statement/Literal.html"
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.de.dhbwstuttgart.syntaxtree.statement.literal.Literal">
<li class="blockList"><a name="methods.inherited.from.class.de.dhbwstuttgart.syntaxtree.statement.Literal">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;de.dhbwstuttgart.syntaxtree.statement.<a href="../../../../de/dhbwstuttgart/syntaxtree/statement/Literal.html" title="class in de.dhbwstuttgart.syntaxtree.statement">Literal</a></h3>

@ -3,7 +3,7 @@
<html lang="de">
<head>
<!-- Generated by javadoc (1.8.0_05) on Tue May 12 19:56:24 CEST 2015 -->
<title>Uses of Class de.dhbwstuttgart.syntaxtree.statement.literal.Literal</title>
<title>Uses of Class de.dhbwstuttgart.syntaxtree.statement.Literal</title>
<meta name="date" content="2015-05-12">
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">
<script type="text/javascript" src="../../../../../script.js"></script>
@ -70,7 +70,7 @@
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<div class="header">
<h2 title="Uses of Class de.dhbwstuttgart.syntaxtree.statement.literal.Literal" class="title">Uses of Class<br>de.dhbwstuttgart.syntaxtree.statement.Literal</h2>
<h2 title="Uses of Class de.dhbwstuttgart.syntaxtree.statement.Literal" class="title">Uses of Class<br>de.dhbwstuttgart.syntaxtree.statement.Literal</h2>
</div>
<div class="classUseContainer">
<ul class="blockList">

@ -3,7 +3,7 @@
<html lang="de">
<head>
<!-- Generated by javadoc (1.8.0_05) on Tue May 12 19:56:24 CEST 2015 -->
<title>Uses of Class de.dhbwstuttgart.syntaxtree.statement.NegativeExpr</title>
<title>Uses of Class de.dhbwstuttgart.syntaxtree.statement.javaInternal.NegativeExpr</title>
<meta name="date" content="2015-05-12">
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">
<script type="text/javascript" src="../../../../../script.js"></script>
@ -70,9 +70,9 @@
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<div class="header">
<h2 title="Uses of Class de.dhbwstuttgart.syntaxtree.statement.NegativeExpr" class="title">Uses of Class<br>de.dhbwstuttgart.syntaxtree.statement.NegativeExpr</h2>
<h2 title="Uses of Class de.dhbwstuttgart.syntaxtree.statement.javaInternal.NegativeExpr" class="title">Uses of Class<br>de.dhbwstuttgart.syntaxtree.statement.NegativeExpr</h2>
</div>
<div class="classUseContainer">No usage of de.dhbwstuttgart.syntaxtree.statement.NegativeExpr</div>
<div class="classUseContainer">No usage of de.dhbwstuttgart.syntaxtree.statement.javaInternal.NegativeExpr</div>
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar.bottom">
<!-- -->

@ -3,7 +3,7 @@
<html lang="de">
<head>
<!-- Generated by javadoc (1.8.0_05) on Tue May 12 19:56:24 CEST 2015 -->
<title>Uses of Class de.dhbwstuttgart.syntaxtree.statement.NotExpr</title>
<title>Uses of Class de.dhbwstuttgart.syntaxtree.statement.javaInternal.NotExpr</title>
<meta name="date" content="2015-05-12">
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">
<script type="text/javascript" src="../../../../../script.js"></script>
@ -70,9 +70,9 @@
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<div class="header">
<h2 title="Uses of Class de.dhbwstuttgart.syntaxtree.statement.NotExpr" class="title">Uses of Class<br>de.dhbwstuttgart.syntaxtree.statement.NotExpr</h2>
<h2 title="Uses of Class de.dhbwstuttgart.syntaxtree.statement.javaInternal.NotExpr" class="title">Uses of Class<br>de.dhbwstuttgart.syntaxtree.statement.NotExpr</h2>
</div>
<div class="classUseContainer">No usage of de.dhbwstuttgart.syntaxtree.statement.NotExpr</div>
<div class="classUseContainer">No usage of de.dhbwstuttgart.syntaxtree.statement.javaInternal.NotExpr</div>
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar.bottom">
<!-- -->

@ -3,7 +3,7 @@
<html lang="de">
<head>
<!-- Generated by javadoc (1.8.0_05) on Tue May 12 19:56:24 CEST 2015 -->
<title>Uses of Class de.dhbwstuttgart.syntaxtree.statement.PositivExpr</title>
<title>Uses of Class de.dhbwstuttgart.syntaxtree.statement.javaInternal.PositivExpr</title>
<meta name="date" content="2015-05-12">
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">
<script type="text/javascript" src="../../../../../script.js"></script>
@ -70,9 +70,9 @@
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<div class="header">
<h2 title="Uses of Class de.dhbwstuttgart.syntaxtree.statement.PositivExpr" class="title">Uses of Class<br>de.dhbwstuttgart.syntaxtree.statement.PositivExpr</h2>
<h2 title="Uses of Class de.dhbwstuttgart.syntaxtree.statement.javaInternal.PositivExpr" class="title">Uses of Class<br>de.dhbwstuttgart.syntaxtree.statement.PositivExpr</h2>
</div>
<div class="classUseContainer">No usage of de.dhbwstuttgart.syntaxtree.statement.PositivExpr</div>
<div class="classUseContainer">No usage of de.dhbwstuttgart.syntaxtree.statement.javaInternal.PositivExpr</div>
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar.bottom">
<!-- -->

@ -3,7 +3,7 @@
<html lang="de">
<head>
<!-- Generated by javadoc (1.8.0_05) on Tue May 12 19:56:24 CEST 2015 -->
<title>Uses of Class de.dhbwstuttgart.syntaxtree.statement.PostDecExpr</title>
<title>Uses of Class de.dhbwstuttgart.syntaxtree.statement.javaInternal.PostDecExpr</title>
<meta name="date" content="2015-05-12">
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">
<script type="text/javascript" src="../../../../../script.js"></script>
@ -70,9 +70,9 @@
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<div class="header">
<h2 title="Uses of Class de.dhbwstuttgart.syntaxtree.statement.PostDecExpr" class="title">Uses of Class<br>de.dhbwstuttgart.syntaxtree.statement.PostDecExpr</h2>
<h2 title="Uses of Class de.dhbwstuttgart.syntaxtree.statement.javaInternal.PostDecExpr" class="title">Uses of Class<br>de.dhbwstuttgart.syntaxtree.statement.PostDecExpr</h2>
</div>
<div class="classUseContainer">No usage of de.dhbwstuttgart.syntaxtree.statement.PostDecExpr</div>
<div class="classUseContainer">No usage of de.dhbwstuttgart.syntaxtree.statement.javaInternal.PostDecExpr</div>
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar.bottom">
<!-- -->

@ -3,7 +3,7 @@
<html lang="de">
<head>
<!-- Generated by javadoc (1.8.0_05) on Tue May 12 19:56:24 CEST 2015 -->
<title>Uses of Class de.dhbwstuttgart.syntaxtree.statement.PostIncExpr</title>
<title>Uses of Class de.dhbwstuttgart.syntaxtree.statement.javaInternal.PostIncExpr</title>
<meta name="date" content="2015-05-12">
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">
<script type="text/javascript" src="../../../../../script.js"></script>
@ -70,9 +70,9 @@
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<div class="header">
<h2 title="Uses of Class de.dhbwstuttgart.syntaxtree.statement.PostIncExpr" class="title">Uses of Class<br>de.dhbwstuttgart.syntaxtree.statement.PostIncExpr</h2>
<h2 title="Uses of Class de.dhbwstuttgart.syntaxtree.statement.javaInternal.PostIncExpr" class="title">Uses of Class<br>de.dhbwstuttgart.syntaxtree.statement.PostIncExpr</h2>
</div>
<div class="classUseContainer">No usage of de.dhbwstuttgart.syntaxtree.statement.PostIncExpr</div>
<div class="classUseContainer">No usage of de.dhbwstuttgart.syntaxtree.statement.javaInternal.PostIncExpr</div>
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar.bottom">
<!-- -->

@ -3,7 +3,7 @@
<html lang="de">
<head>
<!-- Generated by javadoc (1.8.0_05) on Tue May 12 19:56:24 CEST 2015 -->
<title>Uses of Class de.dhbwstuttgart.syntaxtree.statement.PreDecExpr</title>
<title>Uses of Class de.dhbwstuttgart.syntaxtree.statement.javaInternal.PreDecExpr</title>
<meta name="date" content="2015-05-12">
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">
<script type="text/javascript" src="../../../../../script.js"></script>
@ -70,9 +70,9 @@
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<div class="header">
<h2 title="Uses of Class de.dhbwstuttgart.syntaxtree.statement.PreDecExpr" class="title">Uses of Class<br>de.dhbwstuttgart.syntaxtree.statement.PreDecExpr</h2>
<h2 title="Uses of Class de.dhbwstuttgart.syntaxtree.statement.javaInternal.PreDecExpr" class="title">Uses of Class<br>de.dhbwstuttgart.syntaxtree.statement.PreDecExpr</h2>
</div>
<div class="classUseContainer">No usage of de.dhbwstuttgart.syntaxtree.statement.PreDecExpr</div>
<div class="classUseContainer">No usage of de.dhbwstuttgart.syntaxtree.statement.javaInternal.PreDecExpr</div>
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar.bottom">
<!-- -->

@ -3,7 +3,7 @@
<html lang="de">
<head>
<!-- Generated by javadoc (1.8.0_05) on Tue May 12 19:56:24 CEST 2015 -->
<title>Uses of Class de.dhbwstuttgart.syntaxtree.statement.PreIncExpr</title>
<title>Uses of Class de.dhbwstuttgart.syntaxtree.statement.javaInternal.PreIncExpr</title>
<meta name="date" content="2015-05-12">
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">
<script type="text/javascript" src="../../../../../script.js"></script>
@ -70,9 +70,9 @@
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<div class="header">
<h2 title="Uses of Class de.dhbwstuttgart.syntaxtree.statement.PreIncExpr" class="title">Uses of Class<br>de.dhbwstuttgart.syntaxtree.statement.PreIncExpr</h2>
<h2 title="Uses of Class de.dhbwstuttgart.syntaxtree.statement.javaInternal.PreIncExpr" class="title">Uses of Class<br>de.dhbwstuttgart.syntaxtree.statement.PreIncExpr</h2>
</div>
<div class="classUseContainer">No usage of de.dhbwstuttgart.syntaxtree.statement.PreIncExpr</div>
<div class="classUseContainer">No usage of de.dhbwstuttgart.syntaxtree.statement.javaInternal.PreIncExpr</div>
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar.bottom">
<!-- -->

@ -100,7 +100,7 @@ var activeTableTab = "activeTableTab";
<li>java.lang.Object</li>
<li>
<ul class="inheritance">
<li>de.dhbwstuttgart.typeinference.ResultSet</li>
<li>de.dhbwstuttgart.typeinference.result.ResultSet</li>
</ul>
</li>
</ul>

@ -3,7 +3,7 @@
<html lang="de">
<head>
<!-- Generated by javadoc (1.8.0_05) on Tue May 12 19:56:24 CEST 2015 -->
<title>Uses of Class de.dhbwstuttgart.typeinference.ResultSet</title>
<title>Uses of Class de.dhbwstuttgart.typeinference.result.ResultSet</title>
<meta name="date" content="2015-05-12">
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">
<script type="text/javascript" src="../../../../script.js"></script>
@ -70,7 +70,7 @@
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<div class="header">
<h2 title="Uses of Class de.dhbwstuttgart.typeinference.ResultSet" class="title">Uses of Class<br>de.dhbwstuttgart.typeinference.ResultSet</h2>
<h2 title="Uses of Class de.dhbwstuttgart.typeinference.result.ResultSet" class="title">Uses of Class<br>de.dhbwstuttgart.typeinference.ResultSet</h2>
</div>
<div class="classUseContainer">
<ul class="blockList">

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

181
pom.xml Normal file

@ -0,0 +1,181 @@
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>de.dhbwstuttgart</groupId>
<artifactId>JavaTXcompiler</artifactId>
<packaging>jar</packaging>
<version>0.1</version>
<name>JavaTXcompiler</name>
<url>http://maven.apache.org</url>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.antlr</groupId>
<artifactId>antlr4</artifactId>
<version>4.7</version>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.6</version>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>22.0</version>
</dependency>
<dependency>
<groupId>org.reflections</groupId>
<artifactId>reflections</artifactId>
<version>0.9.11</version>
</dependency>
<dependency>
<groupId>org.ow2.asm</groupId>
<artifactId>asm-all</artifactId>
<version>[4.0.0,)</version>
</dependency>
<!--
<dependency>
<groupId>org.bitbucket.mstrobel</groupId>
<artifactId>procyon-reflection</artifactId>
<version>[0.5.32,)</version>
</dependency> -->
</dependencies>
<build>
<directory>target</directory>
<outputDirectory>target/classes</outputDirectory>
<finalName>${project.artifactId}-${project.version}</finalName>
<testOutputDirectory>target/test-classes</testOutputDirectory>
<sourceDirectory>src/</sourceDirectory>
<testSourceDirectory>test/</testSourceDirectory>
<plugins>
<plugin>
<groupId>org.antlr</groupId>
<artifactId>antlr4-maven-plugin</artifactId>
<version>4.7</version>
<executions>
<execution>
<id>antlr</id>
<goals>
<goal>antlr4</goal>
</goals>
<configuration>
<sourceDirectory>src/de/dhbwstuttgart/parser/antlr/</sourceDirectory>
<outputDirectory>src/de/dhbwstuttgart/parser/antlr/</outputDirectory>
<arguments> <argument>-package</argument> <argument>de.dhbwstuttgart.parser.antlr</argument> </arguments>
</configuration>
</execution>
<execution>
<id>aspParser</id>
<goals>
<goal>antlr4</goal>
</goals>
<configuration>
<sourceDirectory>src/de/dhbwstuttgart/sat/asp/parser/antlr/</sourceDirectory>
<outputDirectory>src/de/dhbwstuttgart/sat/asp/parser/antlr/</outputDirectory>
<arguments>
<argument>-package</argument>
<argument>de.dhbwstuttgart.sat.asp.parser.antlr</argument>
</arguments>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
<configuration>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
</configuration>
</plugin>
<plugin>
<groupId>org.reficio</groupId>
<artifactId>p2-maven-plugin</artifactId>
<version>1.1.2-SNAPSHOT</version>
<executions>
<execution>
<id>default-cli</id>
<configuration>
<artifacts>
<!-- specify your depencies here -->
<!-- groupId:artifactId:version -->
<artifact>
<id>de.dhbwstuttgart:JavaTXcompiler:0.1</id>
</artifact>
<artifact><id>org.reflections:reflections:0.9.11</id></artifact>
<artifact><id>com.google.guava:guava:22.0</id></artifact>
<artifact><id>javax.annotation:javax.annotation-api:1.3.1</id></artifact>
<artifact><id>org.glassfish:javax.annotation:3.1.1</id></artifact>
</artifacts>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-p2-repository-plugin</artifactId>
<version>${tycho.version}</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>archive-repository</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>9</source>
<target>9</target>
</configuration>
</plugin>
</plugins>
</build>
<pluginRepositories>
<pluginRepository>
<id>reficio</id>
<url>http://repo.reficio.org/maven/</url>
</pluginRepository>
</pluginRepositories>
<repositories>
<repository>
<id>maven-repository</id>
<url>file:///${project.basedir}/target</url>
</repository>
</repositories>
<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<tycho.version>0.23.0</tycho.version>
</properties>
<distributionManagement>
<repository>
<id>maven-repository</id>
<name>MyCo Internal Repository</name>
<url>file:///${project.basedir}/maven-repository/</url>
</repository>
</distributionManagement>
</project>

BIN
src/de/dhbwstuttgart/.DS_Store vendored Normal file

Binary file not shown.

@ -0,0 +1,30 @@
package de.dhbwstuttgart.bytecode;
import org.objectweb.asm.Label;
import org.objectweb.asm.MethodVisitor;
import org.objectweb.asm.Opcodes;
import de.dhbwstuttgart.syntaxtree.statement.BinaryExpr;
import de.dhbwstuttgart.syntaxtree.statement.Expression;
public abstract class AStatement implements IStatement {
protected Expression expr;
public AStatement(Expression expr) {
this.expr = expr;
}
@Override
public boolean isExprBinary() {
return (expr instanceof BinaryExpr);
}
@Override
public void genBCForRelOp(MethodVisitor mv,Label branchLabel, Label endLabel, BytecodeGenMethod bytecodeGenMethod) {
mv.visitInsn(Opcodes.ICONST_1);
mv.visitJumpInsn(Opcodes.GOTO, endLabel);
mv.visitLabel(branchLabel);
mv.visitInsn(Opcodes.ICONST_0);
mv.visitLabel(endLabel);
}
}

@ -0,0 +1,11 @@
package de.dhbwstuttgart.bytecode;
import de.dhbwstuttgart.syntaxtree.statement.Expression;
public class ArgumentExpr extends AStatement {
public ArgumentExpr(Expression expr) {
super(expr);
}
}

@ -0,0 +1,11 @@
package de.dhbwstuttgart.bytecode;
import de.dhbwstuttgart.syntaxtree.statement.Expression;
public class AssignStmt extends AStatement {
public AssignStmt(Expression rightSide) {
super(rightSide);
}
}

@ -0,0 +1,479 @@
package de.dhbwstuttgart.bytecode;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import de.dhbwstuttgart.exceptions.NotImplementedException;
import de.dhbwstuttgart.syntaxtree.statement.*;
import org.objectweb.asm.ClassWriter;
import org.objectweb.asm.FieldVisitor;
import org.objectweb.asm.MethodVisitor;
import org.objectweb.asm.Opcodes;
import org.objectweb.asm.Type;
import de.dhbwstuttgart.bytecode.descriptor.DescriptorToString;
import de.dhbwstuttgart.bytecode.descriptor.TypeToDescriptor;
import de.dhbwstuttgart.bytecode.signature.Signature;
import de.dhbwstuttgart.bytecode.signature.TypeToString;
import de.dhbwstuttgart.bytecode.utilities.NormalConstructor;
import de.dhbwstuttgart.bytecode.utilities.NormalMethod;
import de.dhbwstuttgart.parser.SyntaxTreeGenerator.AssignToLocal;
import de.dhbwstuttgart.syntaxtree.*;
import de.dhbwstuttgart.syntaxtree.statement.Literal;
import de.dhbwstuttgart.syntaxtree.type.ExtendsWildcardType;
import de.dhbwstuttgart.syntaxtree.type.GenericRefType;
import de.dhbwstuttgart.syntaxtree.type.RefType;
import de.dhbwstuttgart.syntaxtree.type.RefTypeOrTPHOrWildcardOrGeneric;
import de.dhbwstuttgart.syntaxtree.type.SuperWildcardType;
import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder;
import de.dhbwstuttgart.typeinference.result.ResultPair;
import de.dhbwstuttgart.typeinference.result.ResultSet;
public class BytecodeGen implements ASTVisitor {
ClassWriter cw =new ClassWriter(ClassWriter.COMPUTE_FRAMES|ClassWriter.COMPUTE_MAXS);
String type;
String className;
private boolean isInterface;
private List<ResultSet> listOfResultSets;
private ResultSet resultSet;
private int indexOfFirstParam = 0;
// stores parameter, local vars and the next index on the local variable table, which use for aload_i, astore_i,...
HashMap<String, Integer> paramsAndLocals = new HashMap<>();
// stores generics and their bounds of class
HashMap<String, String> genericsAndBounds = new HashMap<>();
// stores generics and their bounds of method
HashMap<String, String> genericsAndBoundsMethod = new HashMap<>();
HashMap<String,RefTypeOrTPHOrWildcardOrGeneric> methodParamsAndTypes = new HashMap<>();
byte[] bytecode;
HashMap<String,byte[]> classFiles;
ArrayList<String> methodNameAndParamsT = new ArrayList<>();
public BytecodeGen(HashMap<String,byte[]> classFiles, List<ResultSet> listOfResultSets) {
this.classFiles = classFiles;
this.listOfResultSets = listOfResultSets;
}
@Override
public void visit(SourceFile sourceFile) {
for(ClassOrInterface cl : sourceFile.getClasses()) {
System.out.println("in Class: " + cl.getClassName().toString());
BytecodeGen classGen = new BytecodeGen(classFiles, listOfResultSets);
cl.accept(classGen);
classGen.writeClass(cl.getClassName().toString());
}
}
/**
* Associates the bytecode of the class that was build with the classWriter {@link #cw}
* with the class name in the map {@link #classFiles}
*
* @param name name of the class with which the the bytecode is to be associated
*/
private void writeClass(String name) {
bytecode = cw.toByteArray();
classFiles.put(name, bytecode);
}
public HashMap<String,byte[]> getClassFiles() {
return classFiles;
}
@Override
public void visit(ClassOrInterface classOrInterface) {
className = classOrInterface.getClassName().toString();
cw.visitSource(className +".jav", null);
isInterface = (classOrInterface.getModifiers()&512)==512;
int acc = isInterface?classOrInterface.getModifiers()+Opcodes.ACC_ABSTRACT:classOrInterface.getModifiers()+Opcodes.ACC_SUPER;
String sig = null;
/* if class has generics then creates signature
* Signature looks like:
* <E:Ljava/...>Superclass
*/
if(classOrInterface.getGenerics().iterator().hasNext()) {
Signature signature = new Signature(classOrInterface, genericsAndBounds);
sig = signature.toString();
}
// needs implemented Interfaces?
cw.visit(Opcodes.V1_8, acc, classOrInterface.getClassName().toString()
, sig, classOrInterface.getSuperClass().acceptTV(new TypeToDescriptor()), null);
for(Field f : classOrInterface.getFieldDecl()) {
f.accept(this);
}
// resultSet = listOfResultSets.get(0);
boolean isConsWithNoParamsVisited = false;
for(ResultSet rs : listOfResultSets) {
resultSet = rs;
for(Constructor c : classOrInterface.getConstructors()) {
if(!isConsWithNoParamsVisited)
c.accept(this);
if(!c.getParameterList().iterator().hasNext())
isConsWithNoParamsVisited = true;
}
for(Method m : classOrInterface.getMethods()) {
m.accept(this);
}
}
}
@Override
public void visit(Constructor field) {
field.getParameterList().accept(this);
String desc = null;
boolean hasGen = false;
for(String paramName : methodParamsAndTypes.keySet()) {
String typeOfParam = methodParamsAndTypes.get(paramName).acceptTV(new TypeToDescriptor());
if(genericsAndBounds.containsKey(typeOfParam)) {
hasGen = true;
break;
}
}
String sig = null;
if(hasGen) {
Signature signature = new Signature(field, genericsAndBounds,methodParamsAndTypes);
sig = signature.toString();
}
NormalConstructor constructor = new NormalConstructor(field,genericsAndBounds,hasGen);
desc = constructor.accept(new DescriptorToString(resultSet));
MethodVisitor mv = cw.visitMethod(Opcodes.ACC_PUBLIC, "<init>", desc, sig, null);
mv.visitCode();
BytecodeGenMethod gen = new BytecodeGenMethod(className,resultSet,field, mv,paramsAndLocals,cw,
genericsAndBoundsMethod,genericsAndBounds,isInterface,classFiles);
if(!field.getParameterList().iterator().hasNext()) {
mv.visitInsn(Opcodes.RETURN);
}
mv.visitMaxs(0, 0);
mv.visitEnd();
}
@Override
public void visit(Method method) {
// TODO: check if the method is static => if static then the first param will be stored in pos 0
// else it will be stored in pos 1 and this will be stored in pos 0
String retType = resultSet.resolveType(method.getReturnType()).resolvedType.acceptTV(new TypeToDescriptor());
String methParamTypes = retType+method.name+"%%";
method.getParameterList().accept(this);
Iterator<FormalParameter> itr = method.getParameterList().iterator();
while(itr.hasNext()) {
FormalParameter fp = itr.next();
methParamTypes += resultSet.resolveType(fp.getType()).resolvedType.acceptTV(new TypeToDescriptor())+";";
}
if(methodNameAndParamsT.contains(methParamTypes)) {
return;
}
methodNameAndParamsT.add(methParamTypes);
System.out.println("Method: "+method.name +" , paramsType: "+methParamTypes);
String methDesc = null;
// Method getModifiers() ?
int acc = isInterface?Opcodes.ACC_ABSTRACT:method.modifier;
System.out.println(acc);
/*Prüfe, ob die Rückgabe-Type der Methode eine Type-Variable ist*/
boolean hasGenInParameterList = genericsAndBounds.containsKey(retType) || retType.subSequence(0, 4).equals("TPH ");
/*Wenn die Rückgabe-Type eine Typ-variable ist, erzeuge direkt die Signature, wenn nicht,
* prüfe, ob einer der Parameter Typ-Variable als Typ hat*/
if(!hasGenInParameterList) {
for(String paramName : methodParamsAndTypes.keySet()) {
String typeOfParam = methodParamsAndTypes.get(paramName).acceptTV(new TypeToDescriptor());
if(genericsAndBounds.containsKey(typeOfParam)||typeOfParam.substring(0, 4).equals("TPH ")) {
hasGenInParameterList = true;
break;
}
}
}
//TODO: Test if the return-type or any of the parameter is a parameterized type. (VP)
//then create the descriptor with the new syntax.
String sig = null;
/* method.getGenerics: <....> RT method(..)
* */
boolean hasGen = method.getGenerics().iterator().hasNext() || hasGenInParameterList;
/* if method has generics or return type is TPH, create signature */
// zwite operand muss weggelassen werden
if(hasGen||method.getReturnType().acceptTV(new TypeToString()).equals("TPH")) {
// resultset hier zum testen
Signature signature = new Signature(method, genericsAndBoundsMethod, methodParamsAndTypes,resultSet);
sig = signature.toString();
}
// System.out.println(sig);
NormalMethod meth = new NormalMethod(method,genericsAndBounds,genericsAndBoundsMethod,hasGen);
methDesc = meth.accept(new DescriptorToString(resultSet));
// System.out.println(methDesc);
MethodVisitor mv = cw.visitMethod(Opcodes.ACC_PUBLIC+acc, method.getName(), methDesc, sig, null);
mv.visitCode();
BytecodeGenMethod gen = new BytecodeGenMethod(className,resultSet,method, mv,paramsAndLocals,cw,
genericsAndBoundsMethod,genericsAndBounds,isInterface,classFiles);
mv.visitMaxs(0, 0);
mv.visitEnd();
}
@Override
public void visit(ParameterList formalParameters) {
paramsAndLocals = new HashMap<>();
methodParamsAndTypes = new HashMap<>();
Iterator<FormalParameter> itr = formalParameters.iterator();
int i = 1;
while(itr.hasNext()) {
FormalParameter fp = itr.next();
paramsAndLocals.put(fp.getName(), i);
methodParamsAndTypes.put(fp.getName(), resultSet.resolveType(fp.getType()).resolvedType);
fp.accept(this);
i++;
}
}
@Override
public void visit(FormalParameter formalParameter) {
formalParameter.getType().accept(this);
}
@Override
public void visit(RefType refType) {
type = "L"+refType.toString()+";";
}
@Override
public void visit(SuperWildcardType superWildcardType) {
// TODO Auto-generated method stub
}
@Override
public void visit(TypePlaceholder typePlaceholder) {
// TODO Auto-generated method stub
}
@Override
public void visit(ExtendsWildcardType extendsWildcardType) {
// TODO Auto-generated method stub
}
@Override
public void visit(GenericRefType genericRefType) {
// TODO Auto-generated method stub
}
// ??
@Override
public void visit(FieldVar fieldVar) {
// cw.newField(fieldVar.receiver.toString(), fieldVar.fieldVarName.toString(), fieldVar.getType().toString());
FieldVisitor fv = cw.visitField(Opcodes.ACC_PRIVATE, fieldVar.fieldVarName, "L"+fieldVar.getType()+";", null, null);
fv.visitEnd();
}
// access flages?? modifiers
@Override
public void visit(Field field) {
FieldVisitor fv = cw.visitField(Opcodes.ACC_PRIVATE, field.getName(), "L"+field.getType().toString().replace(".", "/")+";", null, null);
fv.visitEnd();
}
@Override
public void visit(LambdaExpression lambdaExpression) {
// TODO Auto-generated method stub
}
@Override
public void visit(Assign assign) {
// TODO Auto-generated method stub
}
@Override
public void visit(BinaryExpr binary) {
}
@Override
public void visit(Block block) {
// TODO Auto-generated method stub
}
@Override
public void visit(CastExpr castExpr) {
// TODO Auto-generated method stub
}
@Override
public void visit(EmptyStmt emptyStmt) {
// TODO Auto-generated method stub
}
@Override
public void visit(ForStmt forStmt) {
// TODO Auto-generated method stub
}
@Override
public void visit(IfStmt ifStmt) {
// TODO Auto-generated method stub
}
@Override
public void visit(InstanceOf instanceOf) {
// TODO Auto-generated method stub
}
@Override
public void visit(LocalVar localVar) {
// TODO Auto-generated method stub
}
@Override
public void visit(LocalVarDecl localVarDecl) {
// TODO Auto-generated method stub
}
@Override
public void visit(MethodCall methodCall) {
// TODO Auto-generated method stub
}
@Override
public void visit(NewClass methodCall) {
// TODO Auto-generated method stub
}
@Override
public void visit(NewArray newArray) {
// TODO Auto-generated method stub
}
@Override
public void visit(Return aReturn) {
// TODO Auto-generated method stub
}
@Override
public void visit(ReturnVoid aReturn) {
// TODO Auto-generated method stub
}
@Override
public void visit(StaticClassName staticClassName) {
// TODO Auto-generated method stub
}
@Override
public void visit(Super aSuper) {
// TODO Auto-generated method stub
}
@Override
public void visit(This aThis) {
// TODO Auto-generated method stub
}
@Override
public void visit(WhileStmt whileStmt) {
// TODO Auto-generated method stub
}
@Override
public void visit(DoStmt whileStmt) {
// TODO Auto-generated method stub
}
// ???
@Override
public void visit(Literal literal) {
// TODO Auto-generated method stub
}
@Override
public void visit(ArgumentList argumentList) {
// TODO Auto-generated method stub
}
@Override
public void visit(GenericTypeVar genericTypeVar) {
// TODO Auto-generated method stub
}
@Override
public void visit(GenericDeclarationList genericTypeVars) {
// TODO Auto-generated method stub
}
@Override
public void visit(AssignToField assignLeftSide) {
// TODO Auto-generated method stub
}
@Override
public void visit(AssignToLocal assignLeftSide) {
// TODO Auto-generated method stub
}
@Override
public void visit(SuperCall superCall) {
}
@Override
public void visit(ExpressionReceiver expressionReceiver) {
// TODO Auto-generated method stub
}
@Override
public void visit(UnaryExpr unaryExpr) {
throw new NotImplementedException();
}
}

File diff suppressed because it is too large Load Diff

@ -0,0 +1,9 @@
package de.dhbwstuttgart.bytecode;
import org.objectweb.asm.Label;
import org.objectweb.asm.MethodVisitor;
public interface IStatement {
public boolean isExprBinary();
public void genBCForRelOp(MethodVisitor mv, Label branchLabel, Label endLabel, BytecodeGenMethod bytecodeGenMethod);
}

@ -0,0 +1,25 @@
package de.dhbwstuttgart.bytecode;
import org.objectweb.asm.Label;
import org.objectweb.asm.MethodVisitor;
import org.objectweb.asm.Opcodes;
import de.dhbwstuttgart.syntaxtree.statement.Expression;
import de.dhbwstuttgart.syntaxtree.statement.Statement;
public class LoopStmt extends AStatement {
private Statement loopBlock;
public LoopStmt(Expression expr, Statement loopBlock) {
super(expr);
this.loopBlock = loopBlock;
}
@Override
public void genBCForRelOp(MethodVisitor mv,Label branchLabel, Label endLabel, BytecodeGenMethod bytecodeGenMethod) {
this.loopBlock.accept(bytecodeGenMethod);
mv.visitJumpInsn(Opcodes.GOTO, endLabel);
mv.visitLabel(branchLabel);
}
}

@ -0,0 +1,14 @@
package de.dhbwstuttgart.bytecode;
import org.objectweb.asm.MethodVisitor;
import de.dhbwstuttgart.syntaxtree.statement.BinaryExpr;
import de.dhbwstuttgart.syntaxtree.statement.Expression;
public class ReturnStmt extends AStatement {
public ReturnStmt(Expression retexpr) {
super(retexpr);
}
}

@ -0,0 +1,170 @@
package de.dhbwstuttgart.bytecode.descriptor;
import java.util.Iterator;
import de.dhbwstuttgart.bytecode.signature.TypeToSignature;
import de.dhbwstuttgart.bytecode.utilities.Lambda;
import de.dhbwstuttgart.bytecode.utilities.MethodFromMethodCall;
import de.dhbwstuttgart.bytecode.utilities.NormalConstructor;
import de.dhbwstuttgart.bytecode.utilities.NormalMethod;
import de.dhbwstuttgart.bytecode.utilities.SamMethod;
import de.dhbwstuttgart.syntaxtree.FormalParameter;
import de.dhbwstuttgart.syntaxtree.statement.Expression;
import de.dhbwstuttgart.syntaxtree.type.RefType;
import de.dhbwstuttgart.syntaxtree.type.RefTypeOrTPHOrWildcardOrGeneric;
import de.dhbwstuttgart.typeinference.result.ResultSet;
public class DescriptorToString implements DescriptorVisitor{
ResultSet resultSet;
public DescriptorToString(ResultSet resultSet) {
this.resultSet = resultSet;
}
private String addReturnType(String desc, RefTypeOrTPHOrWildcardOrGeneric returnType, ResultSet resultSet) {
if(resultSet.resolveType(returnType).resolvedType.toString().equals("void")){
desc = desc + ")V";
}else {
desc = desc + ")" + "L"+resultSet.resolveType(returnType).resolvedType.acceptTV(new TypeToDescriptor())+ ";";
}
return desc;
}
@Override
public String visit(NormalMethod method) {
String desc = "(";
Iterator<FormalParameter> itr = method.getParameterList().iterator();
while(itr.hasNext()) {
FormalParameter fp = itr.next();
// System.out.println(resultSet.resolveType(fp.getType()).resolvedType.acceptTV(new TypeToSignature()));
// System.out.println("Parmetrisierte typ ? "+ ((RefType) fp.getType()).getParaList().size());
if(method.hasGen()) {
String fpDesc = fp.getType().acceptTV(new TypeToDescriptor());
if(method.getGenericsAndBoundsMethod().containsKey(fpDesc)) {
desc += "L"+method.getGenericsAndBoundsMethod().get(fpDesc)+ ";";
}else if(method.getGenericsAndBounds().containsKey(fpDesc)){
desc += "L"+method.getGenericsAndBounds().get(fpDesc)+ ";";
}else {
// desc += "L"+resultSet.resolveType(fp.getType()).resolvedType.acceptTV(new TypeToDescriptor())+ ";";
String resType = resultSet.resolveType(fp.getType()).resolvedType.acceptTV(new TypeToDescriptor());
if(resType.subSequence(0, 4).equals("TPH ")) {
desc += "L"+method.getGenericsAndBoundsMethod().get(resType.substring(4)+"$")+ ";";
} else {
desc += "L"+resType+ ";";
}
}
}
//TODO: generate a class java%% ... %%
else if(resultSet.resolveType(fp.getType()).resolvedType.acceptTV(new TypeToDescriptor()).contains("<")){
desc += "L"+resultSet.resolveType(fp.getType()).resolvedType.toString().replace(".", "$$").replace("<", "$$$").replace(">", "$$$")+ ";";
}
else {
desc += "L"+resultSet.resolveType(fp.getType()).resolvedType.acceptTV(new TypeToDescriptor())+ ";";
}
}
if(resultSet.resolveType(method.getReturnType()).resolvedType.toString().equals("void")) {
desc += ")V";
}else {
if(method.hasGen()) {
String ret = method.getReturnType().acceptTV(new TypeToDescriptor());
if(method.getGenericsAndBoundsMethod().containsKey(ret)) {
desc += ")L"+method.getGenericsAndBoundsMethod().get(ret)+ ";";
}else if(method.getGenericsAndBounds().containsKey(ret)){
desc += ")L"+method.getGenericsAndBounds().get(ret)+ ";";
}else {
String resType = resultSet.resolveType(method.getReturnType()).resolvedType.acceptTV(new TypeToDescriptor());
if(resType.subSequence(0, 4).equals("TPH ")) {
desc += ")" + "L"+method.getGenericsAndBoundsMethod().get(resType.substring(4)+"$")+ ";";
} else {
desc += ")" + "L"+resType+ ";";
}
}
}else {
desc += ")" + "L"+resultSet.resolveType(method.getReturnType()).resolvedType.acceptTV(new TypeToDescriptor())+ ";";
}
}
// desc = addReturnType(desc,method.getReturnType(), resultSet);
return desc;
}
@Override
public String visit(NormalConstructor constructor) {
String desc = "(";
Iterator<FormalParameter> itr = constructor.getParameterList().iterator();
while(itr.hasNext()) {
FormalParameter fp = itr.next();
if(constructor.hasGen()) {
// System.out.println("Cons has Gens");
String fpDesc = fp.getType().acceptTV(new TypeToDescriptor());
// System.out.println(fpDesc);
if(constructor.getGenericsAndBounds().containsKey(fpDesc)){
desc += "L"+constructor.getGenericsAndBounds().get(fpDesc)+ ";";
}else {
desc += "L"+resultSet.resolveType(fp.getType()).resolvedType.acceptTV(new TypeToDescriptor())+ ";";
}
}else {
// System.out.println("Cons has NOT Gens");
desc += "L"+resultSet.resolveType(fp.getType()).resolvedType.acceptTV(new TypeToDescriptor())+ ";";
}
}
desc = desc + ")V";
return desc;
}
@Override
public String visit(Lambda lambdaExpression) {
String desc = "(";
Iterator<FormalParameter> itr = lambdaExpression.getParams().iterator();
while(itr.hasNext()) {
FormalParameter fp = itr.next();
desc = desc + "L"+resultSet.resolveType(fp.getType()).resolvedType.acceptTV(new TypeToDescriptor()) + ";";
}
desc = addReturnType(desc, lambdaExpression.getReturnType(), resultSet);
return desc;
}
@Override
public String visit(SamMethod samMethod) {
String desc = "(";
Iterator<RefTypeOrTPHOrWildcardOrGeneric> itr = samMethod.getArgumentList().iterator();
while(itr.hasNext()) {
RefTypeOrTPHOrWildcardOrGeneric rt = itr.next();
desc = desc + "L"+resultSet.resolveType(rt).resolvedType.acceptTV(new TypeToDescriptor())+";";
}
desc = desc + ")"+"L"+resultSet.resolveType(samMethod.getReturnType()).resolvedType.acceptTV(new TypeToDescriptor())+";";
return desc;
}
@Override
public String visit(MethodFromMethodCall methodFromMethodCall) {
String desc = "(";
for(Expression e : methodFromMethodCall.getArgList().getArguments()) {
String d = e.getType().acceptTV(new TypeToDescriptor());
if(methodFromMethodCall.getGenericsAndBoundsMethod().containsKey(d)) {
desc += "L"+methodFromMethodCall.getGenericsAndBoundsMethod().get(d)+ ";";
}else if(methodFromMethodCall.getGenericsAndBounds().containsKey(d)) {
desc += "L"+methodFromMethodCall.getGenericsAndBounds().get(d)+ ";";
}else {
desc += "L"+resultSet.resolveType(e.getType()).resolvedType.acceptTV(new TypeToDescriptor())+ ";";
}
}
if(resultSet.resolveType(methodFromMethodCall.getReturnType()).resolvedType.toString().equals("void")) {
desc += ")V";
}else {
String ret = resultSet.resolveType(methodFromMethodCall.getReturnType()).resolvedType.acceptTV(new TypeToDescriptor());
if(methodFromMethodCall.getGenericsAndBoundsMethod().containsKey(ret)) {
desc += ")L"+methodFromMethodCall.getGenericsAndBoundsMethod().get(ret)+ ";";
}else if(methodFromMethodCall.getGenericsAndBounds().containsKey(ret)){
desc += ")L"+methodFromMethodCall.getGenericsAndBounds().get(ret)+ ";";
}else {
desc += ")" + "L"+resultSet.resolveType(methodFromMethodCall.getReturnType()).resolvedType.acceptTV(new TypeToDescriptor())+ ";";
}
}
// desc = addReturnType(desc, methodFromMethodCall.getReturnType(), resultSet);
return desc;
}
}

@ -0,0 +1,15 @@
package de.dhbwstuttgart.bytecode.descriptor;
import de.dhbwstuttgart.bytecode.utilities.Lambda;
import de.dhbwstuttgart.bytecode.utilities.MethodFromMethodCall;
import de.dhbwstuttgart.bytecode.utilities.NormalConstructor;
import de.dhbwstuttgart.bytecode.utilities.NormalMethod;
import de.dhbwstuttgart.bytecode.utilities.SamMethod;
public interface DescriptorVisitor {
public String visit(NormalMethod method);
public String visit(NormalConstructor constructor);
public String visit(Lambda lambdaExpression);
public String visit(SamMethod samMethod);
public String visit(MethodFromMethodCall methodFromMethodCall);
}

@ -0,0 +1,40 @@
package de.dhbwstuttgart.bytecode.descriptor;
import de.dhbwstuttgart.exceptions.NotImplementedException;
import de.dhbwstuttgart.syntaxtree.type.ExtendsWildcardType;
import de.dhbwstuttgart.syntaxtree.type.GenericRefType;
import de.dhbwstuttgart.syntaxtree.type.RefType;
import de.dhbwstuttgart.syntaxtree.type.SuperWildcardType;
import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder;
import de.dhbwstuttgart.syntaxtree.type.TypeVisitor;
public class TypeToDescriptor implements TypeVisitor<String>{
@Override
public String visit(RefType refType) {
return refType.getName().toString().replace(".", "/");
// String t = refType.getName().toString().replace(".", "/");
// return t.equals("Fun1")?(t+"$$"):t;
}
@Override
public String visit(SuperWildcardType superWildcardType) {
throw new NotImplementedException();
}
@Override
public String visit(TypePlaceholder typePlaceholder) {
return typePlaceholder.toString().replace(".", "/");
}
@Override
public String visit(ExtendsWildcardType extendsWildcardType) {
return extendsWildcardType.getInnerType().toString().replace(".", "/");
//throw new NotImplementedException();
}
@Override
public String visit(GenericRefType genericRefType) {
return genericRefType.getParsedName().replace(".", "/");
}
}

@ -0,0 +1,225 @@
package de.dhbwstuttgart.bytecode.signature;
import java.util.HashMap;
import java.util.Iterator;
import org.objectweb.asm.Type;
import org.objectweb.asm.signature.SignatureVisitor;
import org.objectweb.asm.signature.SignatureWriter;
import de.dhbwstuttgart.bytecode.descriptor.TypeToDescriptor;
import de.dhbwstuttgart.syntaxtree.ClassOrInterface;
import de.dhbwstuttgart.syntaxtree.Constructor;
import de.dhbwstuttgart.syntaxtree.GenericTypeVar;
import de.dhbwstuttgart.syntaxtree.Method;
import de.dhbwstuttgart.syntaxtree.statement.LambdaExpression;
import de.dhbwstuttgart.syntaxtree.type.GenericRefType;
import de.dhbwstuttgart.syntaxtree.type.RefTypeOrTPHOrWildcardOrGeneric;
import de.dhbwstuttgart.typeinference.result.ResultSet;
public class Signature {
private ClassOrInterface classOrInterface;
private HashMap<String, String> genericsAndBounds;
private HashMap<String, String> genericsAndBoundsMethod;
private SignatureWriter sw;
private Constructor constructor;
private Method method;
private HashMap<String,RefTypeOrTPHOrWildcardOrGeneric> methodParamsAndTypes;
private ResultSet resultSet;
public Signature(ClassOrInterface classOrInterface, HashMap<String, String> genericsAndBounds) {
this.classOrInterface = classOrInterface;
this.genericsAndBounds = genericsAndBounds;
sw = new SignatureWriter();
createSignatureForClassOrInterface();
}
public Signature(Constructor constructor, HashMap<String, String> genericsAndBounds, HashMap<String,RefTypeOrTPHOrWildcardOrGeneric> methodParamsAndTypes) {
this.constructor = constructor;
this.genericsAndBounds = genericsAndBounds;
this.methodParamsAndTypes = methodParamsAndTypes;
sw = new SignatureWriter();
createSignatureForConsOrMethod(this.constructor,true);
}
public Signature(Method method, HashMap<String, String> genericsAndBoundsMethod,
HashMap<String, RefTypeOrTPHOrWildcardOrGeneric> methodParamsAndTypes, ResultSet resultSet) {
this.method = method;
this.genericsAndBoundsMethod = genericsAndBoundsMethod;
this.methodParamsAndTypes = methodParamsAndTypes;
this.resultSet = resultSet;
sw = new SignatureWriter();
createSignatureForConsOrMethod(this.method,false);
}
public Signature(LambdaExpression lambdaExpression,int numberOfParams) {
sw = new SignatureWriter();
createSignatureForFunN(lambdaExpression, numberOfParams);
}
private void createSignatureForFunN(LambdaExpression lambdaExpression, int numberOfParams) {
// sw.visitClassBound().visitEnd();
for(int i = 0;i<numberOfParams;i++) {
int j = i+1;
sw.visitFormalTypeParameter("T"+ j);
// getBounds von Params
sw.visitClassBound().visitClassType(Type.getInternalName(Object.class));
sw.visitClassBound().visitEnd();
}
sw.visitFormalTypeParameter("R");
// getBounds vom Return-Type
sw.visitClassBound().visitClassType(Type.getInternalName(Object.class));
sw.visitClassBound().visitEnd();
// TODO: prüfe ob Return-Type = void,
sw.visitSuperclass().visitClassType(Type.getInternalName(Object.class));;
sw.visitEnd();
}
/**
* Creates signature for a method or constructor with @see {@link SignatureWriter}
* Signature looks like:
* <typevaliables (K:Ljava/lang/Object "Bounds")>(params L.. OR T.. Or basistape)ReturnType
*
* @param method method or constructor
* @param isConstructor true if constructor
*/
private void createSignatureForConsOrMethod(Method method, boolean isConstructor) {
Iterator<? extends GenericTypeVar> itr = method.getGenerics().iterator();
// visits all formal type parameter and visits their bounds <T:...;B:...;...>
while(itr.hasNext()) {
GenericTypeVar g = itr.next();
getBoundsOfTypeVar(g,genericsAndBoundsMethod);
}
// Wenn die RückgabeType eine TPH ist, wird als generic behandelt
// z.B: Type = TPH K => wird eine Formal Type Parameter K$ erzeugt und Bound = Object
String ret = resultSet.resolveType(method.getReturnType()).resolvedType.acceptTV(new TypeToSignature());
if(ret.substring(0,4).equals("TPH ")) {
String g = ret.substring(4)+"$";
sw.visitFormalTypeParameter(g);
sw.visitClassBound().visitClassType(Type.getInternalName(Object.class));
genericsAndBoundsMethod.put(g, Type.getInternalName(Object.class));
sw.visitClassBound().visitEnd();
}
for(String paramName : methodParamsAndTypes.keySet()) {
RefTypeOrTPHOrWildcardOrGeneric t = methodParamsAndTypes.get(paramName);
String pT = t.acceptTV(new TypeToSignature());
// S.o
if(pT.substring(0,4).equals("TPH ") && !genericsAndBoundsMethod.containsKey(pT)) {
String gP = pT.substring(4)+"$";
sw.visitFormalTypeParameter(gP);
sw.visitClassBound().visitClassType(Type.getInternalName(Object.class));
genericsAndBoundsMethod.put(gP, Type.getInternalName(Object.class));
sw.visitClassBound().visitEnd();
}
}
// visit each method-parameter to create the signature
for(String paramName : methodParamsAndTypes.keySet()) {
RefTypeOrTPHOrWildcardOrGeneric t = methodParamsAndTypes.get(paramName);
// parameter type deswegen ist true
doVisitParamsOrReturn(t,true);
}
if(isConstructor) {
sw.visitReturnType().visitBaseType('V');
}else {
// String ret = resultSet.resolveType(method.getReturnType()).resolvedType.acceptTV(new TypeToSignature());
// if(ret.substring(0,4).equals("TPH ")) {
// String g = ret.substring(4);
// if(!genericsAndBoundsMethod.containsKey(g)) {
// genericsAndBoundsMethod.put(g, Type.getInternalName(Object.class));
// } else {
// genericsAndBoundsMethod.put(g+"_", Type.getInternalName(Object.class));
// }
// }
RefTypeOrTPHOrWildcardOrGeneric returnType = method.getReturnType();
// return type deswegen ist false
doVisitParamsOrReturn(returnType, false);
}
// sw.visitEnd();
}
/**
* Visits parameter type or return type with {@link SignatureVisitor} to create
* the method signature
* @param t type of parameter or return type
* @param isParameterType true if t is type of parameter
*/
private void doVisitParamsOrReturn(RefTypeOrTPHOrWildcardOrGeneric t, boolean isParameterType) {
String type = t.acceptTV(new TypeToString());
SignatureVisitor sv;
if(isParameterType) {
sv = sw.visitParameterType();
}
else {
sv = sw.visitReturnType();
}
switch (type) {
case "RT":
sv.visitClassType(t.acceptTV(new TypeToSignature()));
break;
case "GRT":
GenericRefType g = (GenericRefType) t;
sv.visitTypeVariable(g.acceptTV(new TypeToSignature()));
break;
case "TPH":
RefTypeOrTPHOrWildcardOrGeneric r = resultSet.resolveType(t).resolvedType;
// der Fall wenn die Type eine Interface ist, muss betrachtet werden
// Deswegen muss in ResutSet noch enthalten werden, ob die Type eine
// Interface oder eine Klasse ist.
if(!r.acceptTV(new TypeToSignature()).substring(0, 4).equals("TPH ")) {
// sv.visitInterface().visitClassType(r.acceptTV(new TypeToSignature()));
sv.visitClassType(r.acceptTV(new TypeToSignature()));
} else {
System.out.println(r.getClass()+" Signature TPH: "+r.acceptTV(new TypeToSignature()));
sv.visitTypeVariable(r.acceptTV(new TypeToSignature()).substring(4)+"$");
}
break;
default:
if(!isParameterType)
sv.visitBaseType('V');
break;
}
}
/**
* Creates signature for class or interface with {@link SignatureWriter}
* Signature looks like:
* <typevaliables (K:Ljava/lang/Object "Bounds")>superclass
*/
private void createSignatureForClassOrInterface() {
Iterator<GenericTypeVar> itr = classOrInterface.getGenerics().iterator();
while(itr.hasNext()) {
GenericTypeVar g = itr.next();
getBoundsOfTypeVar(g,genericsAndBounds);
}
sw.visitSuperclass().visitClassType(classOrInterface.getSuperClass().acceptTV(new TypeToDescriptor()));;
sw.visitEnd();
}
/**
* Get bounds of type variable
* @param g type variable
* @param genAndBounds
*/
private void getBoundsOfTypeVar(GenericTypeVar g, HashMap<String, String> genAndBounds) {
sw.visitFormalTypeParameter(g.getName());
Iterator<? extends RefTypeOrTPHOrWildcardOrGeneric> bItr = g.getBounds().iterator();
while(bItr.hasNext()) {
RefTypeOrTPHOrWildcardOrGeneric b =bItr.next();
String boundDesc = b.acceptTV(new TypeToDescriptor());
// System.out.println("GetBounds: " + boundDesc);
// Ensure that <...> extends java.lang.Object OR ...
sw.visitClassBound().visitClassType(boundDesc);
genAndBounds.put(g.getName(), boundDesc);
}
sw.visitClassBound().visitEnd();
}
public String toString() {
return sw.toString();
}
}

@ -0,0 +1,55 @@
package de.dhbwstuttgart.bytecode.signature;
import java.util.Iterator;
import de.dhbwstuttgart.exceptions.NotImplementedException;
import de.dhbwstuttgart.syntaxtree.type.ExtendsWildcardType;
import de.dhbwstuttgart.syntaxtree.type.GenericRefType;
import de.dhbwstuttgart.syntaxtree.type.RefType;
import de.dhbwstuttgart.syntaxtree.type.RefTypeOrTPHOrWildcardOrGeneric;
import de.dhbwstuttgart.syntaxtree.type.SuperWildcardType;
import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder;
import de.dhbwstuttgart.syntaxtree.type.TypeVisitor;
public class TypeToSignature implements TypeVisitor<String> {
@Override
public String visit(RefType refType) {
// return refType.toString().replace(".", "/");
String params = "";
if(refType.getParaList().size()>0){
params += "<";
Iterator<RefTypeOrTPHOrWildcardOrGeneric> it = refType.getParaList().iterator();
while(it.hasNext()){
RefTypeOrTPHOrWildcardOrGeneric param = it.next();
params += "L"+param.toString().replace(".", "/");
if(it.hasNext())params += ";";
}
params += ";>";
}
// String t = refType.getName().toString().replace(".", "/");
// return t.equals("Fun1")?t+"$$"+params+";":t+params+";";
return refType.getName().toString().replace(".", "/") + params+";";
}
@Override
public String visit(SuperWildcardType superWildcardType) {
throw new NotImplementedException();
}
@Override
public String visit(TypePlaceholder typePlaceholder) {
return typePlaceholder.toString().replace(".", "/");
}
@Override
public String visit(ExtendsWildcardType extendsWildcardType) {
throw new NotImplementedException();
}
@Override
public String visit(GenericRefType genericRefType) {
return genericRefType.getParsedName().replace(".", "/");
}
}

@ -0,0 +1,38 @@
package de.dhbwstuttgart.bytecode.signature;
import de.dhbwstuttgart.exceptions.NotImplementedException;
import de.dhbwstuttgart.syntaxtree.type.ExtendsWildcardType;
import de.dhbwstuttgart.syntaxtree.type.GenericRefType;
import de.dhbwstuttgart.syntaxtree.type.RefType;
import de.dhbwstuttgart.syntaxtree.type.SuperWildcardType;
import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder;
import de.dhbwstuttgart.syntaxtree.type.TypeVisitor;
public class TypeToString implements TypeVisitor<String>{
@Override
public String visit(RefType refType) {
return "RT";
}
@Override
public String visit(SuperWildcardType superWildcardType) {
throw new NotImplementedException();
}
@Override
public String visit(TypePlaceholder typePlaceholder) {
return "TPH";
}
@Override
public String visit(ExtendsWildcardType extendsWildcardType) {
throw new NotImplementedException();
}
@Override
public String visit(GenericRefType genericRefType) {
return "GRT";
}
}

@ -0,0 +1,198 @@
package de.dhbwstuttgart.bytecode.utilities;
import de.dhbwstuttgart.exceptions.NotImplementedException;
import de.dhbwstuttgart.syntaxtree.statement.*;
import java.util.ArrayList;
import java.util.List;
import de.dhbwstuttgart.parser.SyntaxTreeGenerator.AssignToLocal;
import de.dhbwstuttgart.syntaxtree.StatementVisitor;
import de.dhbwstuttgart.syntaxtree.statement.Literal;
import de.dhbwstuttgart.syntaxtree.type.RefTypeOrTPHOrWildcardOrGeneric;
public class KindOfLambda implements StatementVisitor{
private boolean isInstanceCapturingLambda = false;
private List<RefTypeOrTPHOrWildcardOrGeneric> argumentList = new ArrayList<>();
public KindOfLambda(LambdaExpression lambdaExpression) {
lambdaExpression.methodBody.accept(this);
}
public boolean isInstanceCapturingLambda() {
return this.isInstanceCapturingLambda;
}
public List<RefTypeOrTPHOrWildcardOrGeneric> getArgumentList() {
return argumentList;
}
@Override
public void visit(ArgumentList argumentList) {
// TODO Auto-generated method stub
}
@Override
public void visit(LambdaExpression lambdaExpression) {
}
@Override
public void visit(Assign assign) {
assign.rightSide.accept(this);
}
@Override
public void visit(BinaryExpr binary) {
// TODO Auto-generated method stub
}
@Override
public void visit(Block block) {
for(Statement stmt : block.getStatements()) {
stmt.accept(this);
}
}
@Override
public void visit(CastExpr castExpr) {
// TODO Auto-generated method stub
}
@Override
public void visit(EmptyStmt emptyStmt) {
// TODO Auto-generated method stub
}
@Override
public void visit(FieldVar fieldVar) {
fieldVar.receiver.accept(this);
}
@Override
public void visit(ForStmt forStmt) {
// TODO Auto-generated method stub
}
@Override
public void visit(IfStmt ifStmt) {
// TODO Auto-generated method stub
}
@Override
public void visit(InstanceOf instanceOf) {
// TODO Auto-generated method stub
}
@Override
public void visit(LocalVar localVar) {
// TODO Auto-generated method stub
}
@Override
public void visit(LocalVarDecl localVarDecl) {
// TODO Auto-generated method stub
}
@Override
public void visit(MethodCall methodCall) {
methodCall.receiver.accept(this);
}
@Override
public void visit(NewClass methodCall) {
// TODO Auto-generated method stub
}
@Override
public void visit(NewArray newArray) {
// TODO Auto-generated method stub
}
@Override
public void visit(ExpressionReceiver receiver) {
receiver.expr.accept(this);
}
@Override
public void visit(UnaryExpr unaryExpr) {
throw new NotImplementedException();
}
@Override
public void visit(Return aReturn) {
aReturn.retexpr.accept(this);
}
@Override
public void visit(ReturnVoid aReturn) {
// TODO Auto-generated method stub
}
@Override
public void visit(StaticClassName staticClassName) {
// TODO Auto-generated method stub
}
@Override
public void visit(Super aSuper) {
// TODO Auto-generated method stub
}
@Override
public void visit(This aThis) {
this.isInstanceCapturingLambda = true;
this.argumentList.add(aThis.getType());
}
@Override
public void visit(WhileStmt whileStmt) {
// TODO Auto-generated method stub
}
@Override
public void visit(DoStmt whileStmt) {
// TODO Auto-generated method stub
}
@Override
public void visit(Literal literal) {
// TODO Auto-generated method stub
}
@Override
public void visit(AssignToField assignLeftSide) {
// TODO Auto-generated method stub
}
@Override
public void visit(AssignToLocal assignLeftSide) {
// TODO Auto-generated method stub
}
@Override
public void visit(SuperCall superCall) {
// TODO Auto-generated method stub
}
}

@ -0,0 +1,26 @@
package de.dhbwstuttgart.bytecode.utilities;
import de.dhbwstuttgart.bytecode.descriptor.DescriptorVisitor;
import de.dhbwstuttgart.syntaxtree.ParameterList;
import de.dhbwstuttgart.syntaxtree.statement.LambdaExpression;
import de.dhbwstuttgart.syntaxtree.type.RefTypeOrTPHOrWildcardOrGeneric;
public class Lambda {
private LambdaExpression lambdaExpression;
public Lambda(LambdaExpression lambdaExpression) {
this.lambdaExpression = lambdaExpression;
}
public ParameterList getParams() {
return lambdaExpression.params;
}
public RefTypeOrTPHOrWildcardOrGeneric getReturnType() {
return lambdaExpression.getReturnType();
}
public String accept(DescriptorVisitor descVisitor) {
return descVisitor.visit(this);
}
}

@ -0,0 +1,42 @@
package de.dhbwstuttgart.bytecode.utilities;
import java.util.HashMap;
import de.dhbwstuttgart.bytecode.descriptor.DescriptorVisitor;
import de.dhbwstuttgart.syntaxtree.statement.ArgumentList;
import de.dhbwstuttgart.syntaxtree.type.RefTypeOrTPHOrWildcardOrGeneric;
public class MethodFromMethodCall {
private ArgumentList argList;
private RefTypeOrTPHOrWildcardOrGeneric returnType;
private HashMap<String, String> genericsAndBoundsMethod;
private HashMap<String,String> genericsAndBounds;
public MethodFromMethodCall(ArgumentList argList,RefTypeOrTPHOrWildcardOrGeneric returnType,
HashMap<String, String> genericsAndBoundsMethod,HashMap<String,String> genericsAndBounds) {
this.argList = argList;
this.returnType = returnType;
this.genericsAndBoundsMethod = genericsAndBoundsMethod;
this.genericsAndBounds = genericsAndBounds;
}
public ArgumentList getArgList() {
return argList;
}
public RefTypeOrTPHOrWildcardOrGeneric getReturnType() {
return returnType;
}
public HashMap<String, String> getGenericsAndBoundsMethod(){
return genericsAndBoundsMethod;
}
public HashMap<String,String> getGenericsAndBounds(){
return genericsAndBounds;
}
public String accept(DescriptorVisitor descVisitor) {
return descVisitor.visit(this);
}
}

@ -0,0 +1,40 @@
package de.dhbwstuttgart.bytecode.utilities;
import java.util.HashMap;
import de.dhbwstuttgart.bytecode.descriptor.DescriptorVisitor;
import de.dhbwstuttgart.syntaxtree.Constructor;
import de.dhbwstuttgart.syntaxtree.ParameterList;
public class NormalConstructor {
private Constructor constructor;
private HashMap<String, String> genericsAndBounds;
private boolean hasGenerics;
public NormalConstructor(Constructor constructor, boolean hasGenerics) {
this.constructor = constructor;
this.hasGenerics = hasGenerics;
}
public NormalConstructor(Constructor constructor, HashMap<String, String> genericsAndBounds, boolean hasGenerics) {
this.constructor = constructor;
this.genericsAndBounds = genericsAndBounds;
this.hasGenerics = hasGenerics;
}
public HashMap<String, String> getGenericsAndBounds() {
return genericsAndBounds;
}
public boolean hasGen() {
return hasGenerics;
}
public ParameterList getParameterList() {
return constructor.getParameterList();
}
public String accept(DescriptorVisitor descVisitor) {
return descVisitor.visit(this);
}
}

@ -0,0 +1,56 @@
package de.dhbwstuttgart.bytecode.utilities;
import java.util.HashMap;
import de.dhbwstuttgart.bytecode.descriptor.DescriptorVisitor;
import de.dhbwstuttgart.syntaxtree.Method;
import de.dhbwstuttgart.syntaxtree.ParameterList;
import de.dhbwstuttgart.syntaxtree.type.RefTypeOrTPHOrWildcardOrGeneric;
public class NormalMethod {
private Method method;
private HashMap<String, String> genericsAndBounds;
private HashMap<String, String> genericsAndBoundsMethod;
private boolean hasGenerics;
public NormalMethod(Method method, boolean hasGenerics) {
this.method = method;
this.hasGenerics = hasGenerics;
}
public NormalMethod(Method method, HashMap<String, String> genericsAndBounds,
HashMap<String, String> genericsAndBoundsMethod,boolean hasGenerics) {
this.method = method;
this.genericsAndBounds = genericsAndBounds;
this.genericsAndBoundsMethod = genericsAndBoundsMethod;
this.hasGenerics = hasGenerics;
}
public Method getMethod() {
return method;
}
public ParameterList getParameterList() {
return method.getParameterList();
}
public HashMap<String, String> getGenericsAndBounds(){
return genericsAndBounds;
}
public HashMap<String, String> getGenericsAndBoundsMethod(){
return genericsAndBoundsMethod;
}
public RefTypeOrTPHOrWildcardOrGeneric getReturnType() {
return method.getReturnType();
}
public boolean hasGen() {
return this.hasGenerics;
}
public String accept(DescriptorVisitor descVisitor) {
return descVisitor.visit(this);
}
}

@ -0,0 +1,32 @@
package de.dhbwstuttgart.bytecode.utilities;
import java.util.List;
import de.dhbwstuttgart.bytecode.descriptor.DescriptorVisitor;
import de.dhbwstuttgart.syntaxtree.type.RefTypeOrTPHOrWildcardOrGeneric;
public class SamMethod {
private List<RefTypeOrTPHOrWildcardOrGeneric> argumentList;
private RefTypeOrTPHOrWildcardOrGeneric returnType;
public SamMethod(List<RefTypeOrTPHOrWildcardOrGeneric> argumentList, RefTypeOrTPHOrWildcardOrGeneric returnType) {
this.argumentList = argumentList;
this.returnType = returnType;
}
public List<RefTypeOrTPHOrWildcardOrGeneric> getArgumentList() {
return argumentList;
}
public RefTypeOrTPHOrWildcardOrGeneric getReturnType() {
return returnType;
}
public String accept(DescriptorVisitor descVisitor) {
return descVisitor.visit(this);
}
}

10
src/de/dhbwstuttgart/core/ConsoleInterface.java Executable file → Normal file

@ -1,8 +1,16 @@
package de.dhbwstuttgart.core;
import java.io.File;
import java.io.IOException;
import java.util.*;
import java.util.stream.Collectors;
public class ConsoleInterface {
private static final String directory = System.getProperty("user.dir");
public static void main(String[] args) throws IOException, ClassNotFoundException {
List<File> input = Arrays.asList(args).stream().map((s -> new File(s))).collect(Collectors.toList());
JavaTXCompiler compiler = new JavaTXCompiler(input);
compiler.typeInference();
}
}

0
src/de/dhbwstuttgart/core/IItemWithOffset.java Executable file → Normal file

@ -1,87 +1,180 @@
package de.dhbwstuttgart.core;
import de.dhbwstuttgart.exceptions.DebugException;
import de.dhbwstuttgart.parser.ClassNotFoundException;
import de.dhbwstuttgart.parser.JavaTXParser;
import de.dhbwstuttgart.syntaxtree.ClassOrInterface;
import de.dhbwstuttgart.syntaxtree.SourceFile;
import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode;
import de.dhbwstuttgart.syntaxtree.factory.UnifyTypeFactory;
import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder;
import de.dhbwstuttgart.typedeployment.TypeInsertFactory;
import de.dhbwstuttgart.typedeployment.TypeInsertPoint;
import de.dhbwstuttgart.typeinference.ResultSet;
import de.dhbwstuttgart.typeinference.constraints.Constraint;
import de.dhbwstuttgart.typeinference.constraints.ConstraintSet;
import de.dhbwstuttgart.typeinference.constraints.Pair;
import de.dhbwstuttgart.typeinference.unify.TypeUnify;
import de.dhbwstuttgart.typeinference.unify.interfaces.IFiniteClosure;
import de.dhbwstuttgart.typeinference.unify.model.FiniteClosure;
import de.dhbwstuttgart.typeinference.unify.model.UnifyPair;
import de.dhbwstuttgart.typeinference.unify.model.UnifyType;
import java.io.File;
import java.io.IOException;
import java.util.*;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.stream.Collectors;
import de.dhbwstuttgart.bytecode.BytecodeGen;
import de.dhbwstuttgart.environment.CompilationEnvironment;
import de.dhbwstuttgart.parser.JavaTXParser;
import de.dhbwstuttgart.parser.SyntaxTreeGenerator.SyntaxTreeGenerator;
import de.dhbwstuttgart.parser.antlr.Java8Parser.CompilationUnitContext;
import de.dhbwstuttgart.parser.scope.GenericsRegistry;
import de.dhbwstuttgart.parser.scope.JavaClassName;
import de.dhbwstuttgart.strucTypes.Construct;
import de.dhbwstuttgart.strucTypes.Solve;
import de.dhbwstuttgart.strucTypes.StrucTYPE;
import de.dhbwstuttgart.strucTypes.constraint.ConstraintsSet;
import de.dhbwstuttgart.strucTypes.constraint.SubTypeConstraint;
import de.dhbwstuttgart.strucTypes.exception.ImpossibleSubTypeException;
import de.dhbwstuttgart.strucTypes.exception.InconsistentConstraintsException;
import de.dhbwstuttgart.strucTypes.model.InferredTypes;
import de.dhbwstuttgart.strucTypes.model.SolvedClass;
import de.dhbwstuttgart.syntaxtree.ClassOrInterface;
import de.dhbwstuttgart.syntaxtree.ParameterList;
import de.dhbwstuttgart.syntaxtree.SourceFile;
import de.dhbwstuttgart.syntaxtree.factory.ASTFactory;
import de.dhbwstuttgart.syntaxtree.factory.UnifyTypeFactory;
import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder;
import de.dhbwstuttgart.syntaxtree.visual.ASTTypePrinter;
import de.dhbwstuttgart.typeinference.constraints.Constraint;
import de.dhbwstuttgart.typeinference.constraints.ConstraintSet;
import de.dhbwstuttgart.typeinference.constraints.Pair;
import de.dhbwstuttgart.typeinference.result.ResultSet;
import de.dhbwstuttgart.typeinference.typeAlgo.TYPE;
import de.dhbwstuttgart.typeinference.unify.RuleSet;
import de.dhbwstuttgart.typeinference.unify.TypeUnify;
import de.dhbwstuttgart.typeinference.unify.interfaces.IFiniteClosure;
import de.dhbwstuttgart.typeinference.unify.model.FiniteClosure;
import de.dhbwstuttgart.typeinference.unify.model.PlaceholderType;
import de.dhbwstuttgart.typeinference.unify.model.UnifyPair;
public class JavaTXCompiler {
private List<SourceFile> sourceFiles = new ArrayList<>();
final CompilationEnvironment environment;
public final Map<File, SourceFile> sourceFiles = new HashMap<>();
public List<TypeInsertPoint> getTypeInserts(File forFile){
ResultSet result = typeInference();
for(SourceFile sf : sourceFiles){
if(sf.getFile().equals(forFile)){
return TypeInsertFactory.createTypeInsertPoints(sf, result);
}
}
throw new DebugException("Die Datei "+forFile+" wurde nicht geparst");
}
public JavaTXCompiler(File sourceFile) throws IOException, ClassNotFoundException {
this(Arrays.asList(sourceFile));
}
public ResultSet typeInference(){
ConstraintSet<Pair> cons = new ConstraintSet<>();
List<ClassOrInterface> allClasses = new ArrayList<>();
for(SourceFile sf : sourceFiles){
allClasses.addAll(sf.getClasses());
}
FiniteClosure finiteClosure = UnifyTypeFactory.generateFC(allClasses);
for(SourceFile sf : sourceFiles){
cons.addAll(sf.getConstraints(sf.getTypeInferenceInformation(sourceFiles)));
}
ConstraintSet<UnifyPair> unifyCons = UnifyTypeFactory.convert(cons);
public JavaTXCompiler(List<File> sources) throws IOException, ClassNotFoundException {
environment = new CompilationEnvironment(sources);
for (File s : sources) {
sourceFiles.put(s, parse(s));
}
}
TypeUnify unify = new TypeUnify();
Set<Set<UnifyPair>> results = new HashSet<>();
for(List<Constraint<UnifyPair>> xCons : unifyCons.cartesianProduct()){
Set<UnifyPair> xConsSet = new HashSet<>();
for(Constraint<UnifyPair> constraint : xCons){
xConsSet.addAll(constraint);
}
public ConstraintSet<Pair> getConstraints() throws ClassNotFoundException {
List<ClassOrInterface> allClasses = new ArrayList<>();// environment.getAllAvailableClasses();
for (SourceFile sf : sourceFiles.values()) {
allClasses.addAll(sf.getClasses());
}
List<ClassOrInterface> importedClasses = new ArrayList<>();
// Alle Importierten Klassen in allen geparsten Sourcefiles kommen ins
// FC
for (File forSourceFile : sourceFiles.keySet())
for (JavaClassName name : sourceFiles.get(forSourceFile).getImports()) {
// TODO: Hier werden imports von eigenen (.jav) Klassen nicht
// beachtet
ClassOrInterface importedClass = ASTFactory
.createClass(ClassLoader.getSystemClassLoader().loadClass(name.toString()));
importedClasses.add(importedClass);
}
allClasses.addAll(importedClasses);
System.out.println(xConsSet);
Set<Set<UnifyPair>> result = unify.unify(xConsSet, finiteClosure);
System.out.println("RESULT: " + result);
results.addAll(result);
}
return new ResultSet(UnifyTypeFactory.convert(results, generateTPHMap(cons)));
}
return new TYPE(sourceFiles.values(), allClasses).getConstraints();
}
private Map<String, TypePlaceholder> generateTPHMap(ConstraintSet<Pair> constraints){
HashMap<String, TypePlaceholder> ret = new HashMap<>();
constraints.map((Pair p)->{
if(p.TA1 instanceof TypePlaceholder){
ret.put(((TypePlaceholder)p.TA1).getName(), (TypePlaceholder) p.TA1);
}
if(p.TA2 instanceof TypePlaceholder){
ret.put(((TypePlaceholder)p.TA2).getName(), (TypePlaceholder) p.TA2);
}
return null;
});
return ret;
}
public List<ClassOrInterface> getAvailableClasses(SourceFile forSourceFile) throws ClassNotFoundException {
List<ClassOrInterface> allClasses = new ArrayList<>();// environment.getAllAvailableClasses();
for (SourceFile sf : sourceFiles.values()) {
allClasses.addAll(sf.getClasses());
}
List<ClassOrInterface> importedClasses = new ArrayList<>();
for (JavaClassName name : forSourceFile.getImports()) {
// TODO: Hier werden imports von eigenen (.jav) Klassen nicht
// beachtet
ClassOrInterface importedClass = ASTFactory
.createClass(ClassLoader.getSystemClassLoader().loadClass(name.toString()));
importedClasses.add(importedClass);
allClasses.addAll(importedClasses);
}
return allClasses;
}
public void parse(File sourceFile) throws IOException, ClassNotFoundException {
sourceFiles.add(new JavaTXParser().parse(sourceFile));
}
public List<SolvedClass> strucTypeInference()
throws ImpossibleSubTypeException, ClassNotFoundException, InconsistentConstraintsException {
List<SolvedClass> solvedClasses = new ArrayList<>();
for (SourceFile sourceFile : sourceFiles.values()) {
ClassOrInterface clsA = sourceFile.getClasses().get(0);
StrucTYPE strucTYPE = new StrucTYPE(clsA);
ConstraintsSet strucTypeConstraints = strucTYPE.getConstraints();
InferredTypes inferredTypes = strucTYPE.getInferredTypes();
}
Construct construct = new Construct(strucTypeConstraints, inferredTypes);
List<ClassOrInterface> constructedInterfaces = construct.getConstructedInterfaces();
Set<SubTypeConstraint> subTypeConstraints = construct.getSubTypeConstraints();
inferredTypes = construct.getInferredTypes();
IFiniteClosure fc = UnifyTypeFactory.generateFC(this.getAvailableClasses(sourceFile));
Solve solve = new Solve(subTypeConstraints, clsA, fc, inferredTypes, constructedInterfaces);
SolvedClass solvedClass = solve.getSolvedClass();
solvedClasses.add(solvedClass);
}
return solvedClasses;
}
public List<ResultSet> typeInference() throws ClassNotFoundException {
List<ClassOrInterface> allClasses = new ArrayList<>();// environment.getAllAvailableClasses();
// Alle Importierten Klassen in allen geparsten Sourcefiles kommen ins
// FC
for (SourceFile sf : this.sourceFiles.values()) {
allClasses.addAll(getAvailableClasses(sf));
allClasses.addAll(sf.getClasses());
}
final ConstraintSet<Pair> cons = getConstraints();
FiniteClosure finiteClosure = UnifyTypeFactory.generateFC(allClasses);
System.out.println(finiteClosure);
ConstraintSet<UnifyPair> unifyCons = UnifyTypeFactory.convert(cons);
TypeUnify unify = new TypeUnify();
Set<Set<UnifyPair>> results = new HashSet<>();
for (List<Constraint<UnifyPair>> xCons : unifyCons.cartesianProduct()) {
Set<UnifyPair> xConsSet = new HashSet<>();
for (Constraint<UnifyPair> constraint : xCons) {
xConsSet.addAll(constraint);
}
System.out.println(xConsSet);
Set<Set<UnifyPair>> result = unify.unify(xConsSet, finiteClosure);
System.out.println("RESULT: " + result.size());
results.addAll(result);
}
return results.stream()
.map((unifyPairs -> new ResultSet(UnifyTypeFactory.convert(unifyPairs, generateTPHMap(cons)))))
.collect(Collectors.toList());
}
private Map<String, TypePlaceholder> generateTPHMap(ConstraintSet<Pair> constraints) {
HashMap<String, TypePlaceholder> ret = new HashMap<>();
constraints.map((Pair p) -> {
if (p.TA1 instanceof TypePlaceholder) {
ret.put(((TypePlaceholder) p.TA1).getName(), (TypePlaceholder) p.TA1);
}
if (p.TA2 instanceof TypePlaceholder) {
ret.put(((TypePlaceholder) p.TA2).getName(), (TypePlaceholder) p.TA2);
}
return null;
});
return ret;
}
private SourceFile parse(File sourceFile) throws IOException, java.lang.ClassNotFoundException {
CompilationUnitContext tree = JavaTXParser.parse(sourceFile);
SyntaxTreeGenerator generator = new SyntaxTreeGenerator(environment.getRegistry(sourceFile),
new GenericsRegistry(null));
SourceFile ret = generator.convert(tree, environment.packageCrawler);
return ret;
}
}

@ -0,0 +1,85 @@
package de.dhbwstuttgart.environment;
import java.io.File;
import java.io.IOException;
import java.net.MalformedURLException;
import java.net.URL;
import java.net.URLClassLoader;
import java.util.*;
import de.dhbwstuttgart.syntaxtree.ClassOrInterface;
import de.dhbwstuttgart.syntaxtree.SourceFile;
import de.dhbwstuttgart.syntaxtree.factory.ASTFactory;
import org.reflections.Reflections;
import org.reflections.scanners.ResourcesScanner;
import org.reflections.scanners.SubTypesScanner;
import org.reflections.util.ClasspathHelper;
import org.reflections.util.ConfigurationBuilder;
import org.reflections.util.FilterBuilder;
import de.dhbwstuttgart.exceptions.DebugException;
import de.dhbwstuttgart.parser.JavaTXParser;
import de.dhbwstuttgart.parser.antlr.Java8Parser.CompilationUnitContext;
import de.dhbwstuttgart.parser.scope.GatherNames;
import de.dhbwstuttgart.parser.scope.JavaClassRegistry;
/**
* Stellt die Java-Environment dar und speichert alle Binarys, Librarys und Sourcefiles im zu kompilierenden Projekt
* Sie erstellt anhand dieser Informationen die JavaClassNameRegistry
*
* TODO: Zur Initialisierung der CompilationEnvironment sollten alle SourceFiles mit ANTLR geparst werden und alle Klassen Generics und Typen herausgefunden werden
*/
public class CompilationEnvironment {
private final List<URL> librarys;
private final List<File> sourceFiles;
public final PackageCrawler packageCrawler;
/**
* Imitiert die Environment beim Aufruf des JavaCompilers auf einer Menge von java-Dateien
* Die Environment enth<74>lt automatisch die Java Standard Library
* @param sourceFiles die zu kompilierenden Dateien
*/
public CompilationEnvironment(List<File> sourceFiles) {
/**
* Java 9 bringt einige Änderungen am Classloader
* So funktioniert der BootClassLoader nicht mehr.
* hier gibts ein paar Quellen zum nachlesen:
* http://java9.wtf/class-loading/
* https://stackoverflow.com/questions/46494112/classloaders-hierarchy-in-java-9
*
*/
//String bootClassPath = System.getProperty("sun.boot.class.path");
// ClassLoader cl = ClassLoader.getPlatformClassLoader();
ClassLoader cl = ClassLoader.getSystemClassLoader();
String bootClassPath = System.getProperty("java.class.path");
librarys = new ArrayList<>();
for(String path : bootClassPath.split(File.pathSeparator)) {
try {
librarys.add(new URL("file:"+path));
} catch (MalformedURLException e) {
new DebugException("Fehler im Classpath auf diesem System");
}
}
//URLClassLoader loader = new URLClassLoader(new URL[0], cl);
//librarys = Arrays.asList(loader.getURLs());
this.sourceFiles = sourceFiles;
this.packageCrawler = new PackageCrawler(librarys);
}
public JavaClassRegistry getRegistry(File forSourceFile) throws ClassNotFoundException, IOException {
Map<String, Integer> allNames;
CompilationUnitContext tree = JavaTXParser.parse(forSourceFile);
allNames = GatherNames.getNames(tree, packageCrawler);
return new JavaClassRegistry(allNames);
}
public List<ClassOrInterface> getAllAvailableClasses() {
List<ClassOrInterface> ret = new ArrayList<>();
for(Class c : new PackageCrawler(librarys).getAllAvailableClasses()){
ret.add(ASTFactory.createClass(c));
}
return ret;
}
}

@ -0,0 +1,77 @@
package de.dhbwstuttgart.environment;
import java.net.URL;
import java.util.*;
import org.reflections.Reflections;
import org.reflections.scanners.ResourcesScanner;
import org.reflections.scanners.SubTypesScanner;
import org.reflections.util.ConfigurationBuilder;
import org.reflections.util.FilterBuilder;
import de.dhbwstuttgart.parser.scope.JavaClassName;
import org.reflections.vfs.SystemDir;
/**
* Hilft beim Durchsuchen von Packages
* Benutzt die Reflections-Library (https://github.com/ronmamo/reflections)
* Hilfe dazu: http://stackoverflow.com/a/9571146
*/
public class PackageCrawler {
final URL[] urls;
public PackageCrawler(List<URL> urlList) {
urls = urlList.toArray(new URL[0]);
}
public Set<Class<?>> getClassesInPackage(String packageName){
/*
List<ClassLoader> classLoadersList = new LinkedList<ClassLoader>();
classLoadersList.add(Thread.currentThread().getContextClassLoader());
classLoadersList.add(ClasspathHelper.staticClassLoader());
classLoadersList.add(Thread.currentThread().getContextClassLoader().getParent());
classLoadersList.add(ClassLoader.getSystemClassLoader());
String bootClassPath = System.getProperty("sun.boot.class.path");
ArrayList<URL> urlList = new ArrayList<>();
for(String path : bootClassPath.split(";")) {
try {
urlList.add(new URL("file:"+path));
} catch (MalformedURLException e) {
new DebugException("Fehler im Classpath auf diesem System");
}
}
URL[] urls = urlList.toArray(new URL[0]);
classLoadersList.add(new URLClassLoader(urls, ClassLoader.getSystemClassLoader()));
*/
Reflections reflections = new Reflections(new ConfigurationBuilder()
.setScanners(new SubTypesScanner(false /* don't exclude Object.class */), new ResourcesScanner())
.setUrls(urls)
.filterInputsBy(new FilterBuilder().include(FilterBuilder.prefix(packageName))));
Set<Class<?>> classes = reflections.getSubTypesOf(Object.class);
return classes;
}
public Set<Class<?>> getAllAvailableClasses(){
Reflections reflections = new Reflections(new ConfigurationBuilder()
.setScanners(new SubTypesScanner(false /* don't exclude Object.class */), new ResourcesScanner())
.setUrls(urls));
Set<Class<?>> classes = reflections.getSubTypesOf(Object.class);
return classes;
}
public Map<String, Integer> getClassNames(String packageName){
Map<String, Integer> nameList = new HashMap<>();
Set<Class<?>> classes = getClassesInPackage(packageName);
if(packageName.equals("java.lang") && ! classes.contains(Object.class)) {
classes.add(Object.class);
}
for(Class c : classes){
nameList.put(c.getName(), c.getTypeParameters().length);
}
return nameList;
}
}

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