Compare commits
161 Commits
unify-test
...
bigRefacto
Author | SHA1 | Date | |
---|---|---|---|
95f48ffcb7 | |||
163f0f3047 | |||
1cf22d2602 | |||
d8ac25234f | |||
e00d76ce3b | |||
fec83c3a62 | |||
5a00b70ea8 | |||
6e91e5c683 | |||
e4908557f4 | |||
ed550b1097 | |||
5fa1cf11ef | |||
941a3bed66 | |||
653901ef32 | |||
2e03b5b10c | |||
670e3ed99f | |||
c8ece0a010 | |||
c27e1fa4e1 | |||
b3b25b7869 | |||
9240b0d163 | |||
a0a813f87c | |||
60b182b9b1 | |||
8e2d4e1c70 | |||
907ab2fcec | |||
eb27003515 | |||
71c801c19c | |||
ba750187ba | |||
ccf5df1f1e | |||
3de735ebe3 | |||
fd3d4e97a1 | |||
6deeb4105f | |||
9d4980d9a1 | |||
b83e2c10e3 | |||
4f10e789d4 | |||
8b9f0d6376 | |||
723eca8658 | |||
071f4cd9ca | |||
cdc6a3f2dd | |||
cc6156695d | |||
1b6af9ab7e | |||
0861f74ce7 | |||
3f919be1bf | |||
97bdfe1d3a | |||
7c7dbf3769 | |||
577faa88af | |||
8bdb7e7b13 | |||
eca187da79 | |||
a11dc1ab22 | |||
850af6a6ae | |||
ed1bb44089 | |||
592de5310e | |||
e4e3704c7b | |||
21bc3e5193 | |||
44368f2a2a | |||
aa94ce8ad9 | |||
d63c27579c | |||
b38340fc60 | |||
df0d02cdea | |||
6afee86066 | |||
900a487d8a | |||
e07df035ea | |||
47ec1dca5a | |||
e913bfa768 | |||
98997d686f | |||
5c97d80eb0 | |||
23384f413d | |||
a5662cdd9a | |||
28400c8bde | |||
b68004a214 | |||
8d72b58fcc | |||
e581050a61 | |||
1ec7a78b14 | |||
8ec1c5148b | |||
bf80361c1f | |||
a9d6e08a20 | |||
d55e6b3b75 | |||
a6287b1551 | |||
5500180c6b | |||
0c1ca3d200 | |||
f3d6fcb417 | |||
d1138540de | |||
647c9e6c21 | |||
6779f10b08 | |||
ac3f8ece0e | |||
f63346649b | |||
abdff6c8d2 | |||
691d31df5e | |||
2e421cccaa | |||
bd0b2e6058 | |||
0c9c8ef321 | |||
4b4087ae24 | |||
19989bfe11 | |||
f59a7d221e | |||
c1c12fa33c | |||
7fd03d505e | |||
4391adfb0f | |||
d0b6dbcd30 | |||
306af907c5 | |||
75eaee6644 | |||
0378c17e7d | |||
3e67da6e34 | |||
1d16b9f2b9 | |||
afd2c21ca8 | |||
74622550c2 | |||
bb75fca0d7 | |||
c82abcaae5 | |||
a3b4ea9b1c | |||
af5b23e31a | |||
084b54d295 | |||
e305c3cb55 | |||
835f0755da | |||
14b127390e | |||
0c1337f84b | |||
5c1015b51e | |||
c52da7951a | |||
6dc15acba4 | |||
6cbabee65a | |||
c18daad047 | |||
1eaeca1db5 | |||
09a6aec65d | |||
766e71bb3a | |||
802d7726d4 | |||
c68d773486 | |||
c0f5fd1e0a | |||
52b3498dfb | |||
7343ea1701 | |||
00bbd5279f | |||
6c783a18c7 | |||
8c195601d5 | |||
37f8f2e1e0 | |||
0903efda0d | |||
6e9eae38ca | |||
0138e4fe2d | |||
9741b5e14e | |||
c2030123d5 | |||
25fb7a2e28 | |||
d1637b8eb9 | |||
9abda637a1 | |||
82c0837d1f | |||
a41e9804a0 | |||
25c685c705 | |||
3ecb202a90 | |||
efdb58e67c | |||
eed8f32cb7 | |||
87d0a46ba5 | |||
5b75250fcf | |||
7f29b39195 | |||
7a4bc32974 | |||
dfddc44f29 | |||
347d86a379 | |||
d77f2176f2 | |||
4f39eccecb | |||
669e7f111f | |||
32d12677bf | |||
92b2f5c9cc | |||
c1e6526b43 | |||
0194e30206 | |||
3c36c61077 | |||
857d63322e | |||
b801e144c3 | |||
f6669f8c13 | |||
2b7aef5e87 |
6
.gitignore
vendored
@ -23,3 +23,9 @@ bin
|
||||
|
||||
#
|
||||
manually/
|
||||
|
||||
logFiles/**
|
||||
!logFiles/.gitkeep
|
||||
|
||||
src/main/java/de/dhbwstuttgart/parser/antlr/
|
||||
src/main/java/de/dhbwstuttgart/sat/asp/parser/antlr/
|
||||
|
@ -1,88 +0,0 @@
|
||||
<!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>
|
Before ![]() (image error) Size: 25 KiB |
Before ![]() (image error) Size: 80 KiB |
Before ![]() (image error) Size: 109 KiB |
@ -1,40 +0,0 @@
|
||||
<!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>
|
@ -1,40 +0,0 @@
|
||||
<!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>
|
Before ![]() (image error) Size: 32 KiB |
Before ![]() (image error) Size: 52 KiB |
Before ![]() (image error) Size: 61 KiB |
Before ![]() (image error) Size: 96 KiB |
Before ![]() (image error) Size: 93 KiB |
Before ![]() (image error) Size: 163 KiB |
Before ![]() (image error) Size: 163 KiB |
Before ![]() (image error) Size: 88 KiB |
Before ![]() (image error) Size: 50 KiB |
Before ![]() (image error) Size: 96 KiB |
Before ![]() (image error) Size: 102 KiB |
Before ![]() (image error) Size: 100 KiB |
Before ![]() (image error) Size: 76 KiB |
@ -1,34 +0,0 @@
|
||||
<!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>
|
Before ![]() (image error) Size: 150 KiB |
@ -1,24 +0,0 @@
|
||||
<!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>
|
Before ![]() (image error) Size: 112 KiB |
Before ![]() (image error) Size: 33 KiB |
25
doc/Generics/generics.tex
Normal file
@ -0,0 +1,25 @@
|
||||
\documentclass{article}
|
||||
|
||||
\begin{document}
|
||||
|
||||
\section{Generics sind notwendig}
|
||||
Generics können nicht ignoriert werden.
|
||||
Folgender Fall ist Typisierbar:
|
||||
|
||||
\begin{program}
|
||||
<T> T m1(T x){
|
||||
return m2(x);
|
||||
}
|
||||
|
||||
m2(x){
|
||||
m1(1);
|
||||
m2("Test");
|
||||
return m1(x);
|
||||
}
|
||||
\end{program}
|
||||
|
||||
Beim weglassen des Generics T wäre es aber nicht mehr möglich.
|
||||
Dann erhält jeder Constraint, welcher in Verbindung mit der Methode m1 steht
|
||||
den selben TPH.
|
||||
|
||||
\end{document}
|
@ -1 +1 @@
|
||||
|
||||
|
||||
|
@ -1,29 +1,29 @@
|
||||
/* Javadoc style sheet */
|
||||
|
||||
/* Define colors, fonts and other style attributes here to override the defaults */
|
||||
|
||||
/* Page background color */
|
||||
body { background-color: #FFFFFF }
|
||||
|
||||
/* Table colors */
|
||||
.TableHeadingColor { background: #CCCCFF } /* Dark mauve */
|
||||
.TableSubHeadingColor { background: #EEEEFF } /* Light mauve */
|
||||
.TableRowColor { background: #FFFFFF } /* White */
|
||||
|
||||
/* Font used in left-hand frame lists */
|
||||
.FrameTitleFont { font-size: 10pts; font-family: Helvetica, Arial, san-serif }
|
||||
.FrameHeadingFont { font-size: 10pts; font-family: Helvetica, Arial, san-serif }
|
||||
.FrameItemFont { font-size: 10pts; font-family: Helvetica, Arial, san-serif }
|
||||
|
||||
/* Example of smaller, sans-serif font in frames */
|
||||
/* .FrameItemFont { font-size: 10pt; font-family: Helvetica, Arial, sans-serif } */
|
||||
|
||||
/* Navigation bar fonts and colors */
|
||||
.NavBarCell1 { background-color:#EEEEFF;}/* Light mauve */
|
||||
.NavBarCell1Rev { background-color:#00008B;}/* Dark Blue */
|
||||
.NavBarFont1 { font-family: Arial, Helvetica, sans-serif; color:#000000;}
|
||||
.NavBarFont1Rev { font-family: Arial, Helvetica, sans-serif; color:#FFFFFF;}
|
||||
|
||||
.NavBarCell2 { font-family: Arial, Helvetica, sans-serif; background-color:#FFFFFF;}
|
||||
.NavBarCell3 { font-family: Arial, Helvetica, sans-serif; background-color:#FFFFFF;}
|
||||
|
||||
/* Javadoc style sheet */
|
||||
|
||||
/* Define colors, fonts and other style attributes here to override the defaults */
|
||||
|
||||
/* Page background color */
|
||||
body { background-color: #FFFFFF }
|
||||
|
||||
/* Table colors */
|
||||
.TableHeadingColor { background: #CCCCFF } /* Dark mauve */
|
||||
.TableSubHeadingColor { background: #EEEEFF } /* Light mauve */
|
||||
.TableRowColor { background: #FFFFFF } /* White */
|
||||
|
||||
/* Font used in left-hand frame lists */
|
||||
.FrameTitleFont { font-size: 10pts; font-family: Helvetica, Arial, san-serif }
|
||||
.FrameHeadingFont { font-size: 10pts; font-family: Helvetica, Arial, san-serif }
|
||||
.FrameItemFont { font-size: 10pts; font-family: Helvetica, Arial, san-serif }
|
||||
|
||||
/* Example of smaller, sans-serif font in frames */
|
||||
/* .FrameItemFont { font-size: 10pt; font-family: Helvetica, Arial, sans-serif } */
|
||||
|
||||
/* Navigation bar fonts and colors */
|
||||
.NavBarCell1 { background-color:#EEEEFF;}/* Light mauve */
|
||||
.NavBarCell1Rev { background-color:#00008B;}/* Dark Blue */
|
||||
.NavBarFont1 { font-family: Arial, Helvetica, sans-serif; color:#000000;}
|
||||
.NavBarFont1Rev { font-family: Arial, Helvetica, sans-serif; color:#FFFFFF;}
|
||||
|
||||
.NavBarCell2 { font-family: Arial, Helvetica, sans-serif; background-color:#FFFFFF;}
|
||||
.NavBarCell3 { font-family: Arial, Helvetica, sans-serif; background-color:#FFFFFF;}
|
||||
|
||||
|
@ -1,220 +1,220 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<editmodel:ClassDiagramEditModel xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:editmodel="editmodel.xmi" id="kirschmshsCompiler0" metadata="nsuml-1.4" initialized="true" showWireOptions="1">
|
||||
<children xsi:type="editmodel:ClassEditModel" location="448,178" size="371,67" targetConnections="//@children.11/@sourceConnections.0" id="kirschmshsCompiler761" runTimeClassModel="kirschmshsCompiler860">
|
||||
<children xsi:type="editmodel:CompartmentEditModel"/>
|
||||
<children xsi:type="editmodel:CompartmentEditModel" size="348,18">
|
||||
<children xsi:type="editmodel:MethodEditModel" id="kirschmshsCompiler860"/>
|
||||
</children>
|
||||
<children xsi:type="editmodel:CompartmentEditModel"/>
|
||||
<sourceConnections xsi:type="editmodel:GeneralizationEditModel" targetConnections="//@children.14/@sourceConnections.0 //@children.15/@sourceConnections.0 //@children.9/@sourceConnections.0" id="kirschmshsCompiler762" connectionRouterKind="GeneralizationManhattan" source="//@children.0" target="//@children.16" targetEnd="//@children.0/@sourceConnections.0/@children.1" sourceEnd="//@children.0/@sourceConnections.0/@children.0">
|
||||
<children xsi:type="editmodel:AssociationEndEditModel" location="185,0" anchorKind="FixedAtEdge" attachSource="true"/>
|
||||
<children xsi:type="editmodel:AssociationEndEditModel" location="201,67" anchorKind="FixedAtEdge"/>
|
||||
</sourceConnections>
|
||||
<classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" attributeSorter="Visibility" methodSorter="Visibility" innerClassSorter="Visibility" showPublicAttributes="true" showPackageAttributes="true" showPublicMethods="true" showPackageMethods="true" showPublicInnerClasses="true" showPackageInnerClasses="true"/>
|
||||
</children>
|
||||
<children xsi:type="editmodel:ClassEditModel" location="914,555" size="403,85" id="kirschmshsCompiler873" runTimeClassModel="kirschmshsCompiler881;kirschmshsCompiler874">
|
||||
<children xsi:type="editmodel:CompartmentEditModel"/>
|
||||
<children xsi:type="editmodel:CompartmentEditModel" size="380,36">
|
||||
<children xsi:type="editmodel:MethodEditModel" id="kirschmshsCompiler874"/>
|
||||
<children xsi:type="editmodel:MethodEditModel" id="kirschmshsCompiler881"/>
|
||||
</children>
|
||||
<children xsi:type="editmodel:CompartmentEditModel"/>
|
||||
<sourceConnections xsi:type="editmodel:GeneralizationEditModel" connectionRouterKind="Manual" source="//@children.1" target="//@children.11/@sourceConnections.0" targetEnd="//@children.1/@sourceConnections.0/@children.1" sourceEnd="//@children.1/@sourceConnections.0/@children.0">
|
||||
<children xsi:type="editmodel:AssociationEndEditModel" location="201,0" anchorKind="FixedAtEdge" attachSource="true"/>
|
||||
<children xsi:type="editmodel:AssociationEndEditModel"/>
|
||||
</sourceConnections>
|
||||
<classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" attributeSorter="Visibility" methodSorter="Visibility" innerClassSorter="Visibility" showPublicAttributes="true" showPackageAttributes="true" showPublicMethods="true" showPackageMethods="true" showPublicInnerClasses="true" showPackageInnerClasses="true"/>
|
||||
</children>
|
||||
<children xsi:type="editmodel:ClassEditModel" location="484,554" size="403,85" id="kirschmshsCompiler985" runTimeClassModel="kirschmshsCompiler993;kirschmshsCompiler986">
|
||||
<children xsi:type="editmodel:CompartmentEditModel"/>
|
||||
<children xsi:type="editmodel:CompartmentEditModel" size="380,36">
|
||||
<children xsi:type="editmodel:MethodEditModel" id="kirschmshsCompiler986"/>
|
||||
<children xsi:type="editmodel:MethodEditModel" id="kirschmshsCompiler993"/>
|
||||
</children>
|
||||
<children xsi:type="editmodel:CompartmentEditModel"/>
|
||||
<sourceConnections xsi:type="editmodel:GeneralizationEditModel" connectionRouterKind="Manual" source="//@children.2" target="//@children.11/@sourceConnections.0" targetEnd="//@children.2/@sourceConnections.0/@children.1" sourceEnd="//@children.2/@sourceConnections.0/@children.0">
|
||||
<children xsi:type="editmodel:AssociationEndEditModel" location="201,0" anchorKind="FixedAtEdge" attachSource="true"/>
|
||||
<children xsi:type="editmodel:AssociationEndEditModel"/>
|
||||
</sourceConnections>
|
||||
<classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" attributeSorter="Visibility" methodSorter="Visibility" innerClassSorter="Visibility" showPublicAttributes="true" showPackageAttributes="true" showPublicMethods="true" showPackageMethods="true" showPublicInnerClasses="true" showPackageInnerClasses="true"/>
|
||||
</children>
|
||||
<children xsi:type="editmodel:ClassEditModel" location="1345,559" size="403,85" id="kirschmshsCompiler1012" runTimeClassModel="kirschmshsCompiler1013;kirschmshsCompiler1020">
|
||||
<children xsi:type="editmodel:CompartmentEditModel"/>
|
||||
<children xsi:type="editmodel:CompartmentEditModel" size="380,36">
|
||||
<children xsi:type="editmodel:MethodEditModel" id="kirschmshsCompiler1013"/>
|
||||
<children xsi:type="editmodel:MethodEditModel" id="kirschmshsCompiler1020"/>
|
||||
</children>
|
||||
<children xsi:type="editmodel:CompartmentEditModel"/>
|
||||
<sourceConnections xsi:type="editmodel:GeneralizationEditModel" connectionRouterKind="Manual" source="//@children.3" target="//@children.11/@sourceConnections.0" targetEnd="//@children.3/@sourceConnections.0/@children.1" sourceEnd="//@children.3/@sourceConnections.0/@children.0">
|
||||
<children xsi:type="editmodel:AssociationEndEditModel" location="201,0" anchorKind="FixedAtEdge" attachSource="true"/>
|
||||
<children xsi:type="editmodel:AssociationEndEditModel"/>
|
||||
</sourceConnections>
|
||||
<classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" attributeSorter="Visibility" methodSorter="Visibility" innerClassSorter="Visibility" showPublicAttributes="true" showPackageAttributes="true" showPublicMethods="true" showPackageMethods="true" showPublicInnerClasses="true" showPackageInnerClasses="true"/>
|
||||
</children>
|
||||
<children xsi:type="editmodel:ClassEditModel" location="3194,502" size="403,67" id="kirschmshsCompiler670" runTimeClassModel="kirschmshsCompiler671">
|
||||
<children xsi:type="editmodel:CompartmentEditModel"/>
|
||||
<children xsi:type="editmodel:CompartmentEditModel" size="380,18">
|
||||
<children xsi:type="editmodel:MethodEditModel" id="kirschmshsCompiler671"/>
|
||||
</children>
|
||||
<children xsi:type="editmodel:CompartmentEditModel"/>
|
||||
<sourceConnections xsi:type="editmodel:GeneralizationEditModel" connectionRouterKind="Manual" source="//@children.4" target="//@children.13/@sourceConnections.0" targetEnd="//@children.4/@sourceConnections.0/@children.1" sourceEnd="//@children.4/@sourceConnections.0/@children.0">
|
||||
<children xsi:type="editmodel:AssociationEndEditModel" location="201,0" anchorKind="FixedAtEdge" attachSource="true"/>
|
||||
<children xsi:type="editmodel:AssociationEndEditModel"/>
|
||||
</sourceConnections>
|
||||
<classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" attributeSorter="Visibility" methodSorter="Visibility" innerClassSorter="Visibility" showPublicAttributes="true" showPackageAttributes="true" showPublicMethods="true" showPackageMethods="true" showPublicInnerClasses="true" showPackageInnerClasses="true"/>
|
||||
</children>
|
||||
<children xsi:type="editmodel:ClassEditModel" location="1365,425" size="76,29" id="kirschmshsCompiler765" runTimeClassModel="">
|
||||
<children xsi:type="editmodel:CompartmentEditModel"/>
|
||||
<children xsi:type="editmodel:CompartmentEditModel"/>
|
||||
<children xsi:type="editmodel:CompartmentEditModel"/>
|
||||
<sourceConnections xsi:type="editmodel:GeneralizationEditModel" id="kirschmshsCompiler766" connectionRouterKind="Manual" source="//@children.5" target="//@children.6/@sourceConnections.0" targetEnd="//@children.5/@sourceConnections.0/@children.1" sourceEnd="//@children.5/@sourceConnections.0/@children.0">
|
||||
<children xsi:type="editmodel:AssociationEndEditModel" location="38,0" anchorKind="FixedAtEdge" attachSource="true"/>
|
||||
<children xsi:type="editmodel:AssociationEndEditModel"/>
|
||||
</sourceConnections>
|
||||
<classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" attributeSorter="Visibility" methodSorter="Visibility" innerClassSorter="Visibility" showPublicAttributes="true" showPackageAttributes="true" showPublicMethods="true" showPackageMethods="true" showPublicInnerClasses="true" showPackageInnerClasses="true"/>
|
||||
</children>
|
||||
<children xsi:type="editmodel:ClassEditModel" location="963,417" size="86,29" id="kirschmshsCompiler783" runTimeClassModel="">
|
||||
<children xsi:type="editmodel:CompartmentEditModel"/>
|
||||
<children xsi:type="editmodel:CompartmentEditModel"/>
|
||||
<children xsi:type="editmodel:CompartmentEditModel"/>
|
||||
<sourceConnections xsi:type="editmodel:GeneralizationEditModel" targetConnections="//@children.5/@sourceConnections.0" id="kirschmshsCompiler784" connectionRouterKind="GeneralizationManhattan" source="//@children.6" target="//@children.15" targetEnd="//@children.6/@sourceConnections.0/@children.1" sourceEnd="//@children.6/@sourceConnections.0/@children.0">
|
||||
<children xsi:type="editmodel:AssociationEndEditModel" location="43,0" anchorKind="FixedAtEdge" attachSource="true"/>
|
||||
<children xsi:type="editmodel:AssociationEndEditModel" location="272,139" anchorKind="FixedAtEdge"/>
|
||||
</sourceConnections>
|
||||
<classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" attributeSorter="Visibility" methodSorter="Visibility" innerClassSorter="Visibility" showPublicAttributes="true" showPackageAttributes="true" showPublicMethods="true" showPackageMethods="true" showPublicInnerClasses="true" showPackageInnerClasses="true"/>
|
||||
</children>
|
||||
<children xsi:type="editmodel:ClassEditModel" location="2069,372" size="403,67" id="kirschmshsCompiler841" runTimeClassModel="kirschmshsCompiler842">
|
||||
<children xsi:type="editmodel:CompartmentEditModel"/>
|
||||
<children xsi:type="editmodel:CompartmentEditModel" size="380,18">
|
||||
<children xsi:type="editmodel:MethodEditModel" id="kirschmshsCompiler842"/>
|
||||
</children>
|
||||
<children xsi:type="editmodel:CompartmentEditModel"/>
|
||||
<sourceConnections xsi:type="editmodel:GeneralizationEditModel" connectionRouterKind="Manual" source="//@children.7" target="//@children.12/@sourceConnections.0" targetEnd="//@children.7/@sourceConnections.0/@children.1" sourceEnd="//@children.7/@sourceConnections.0/@children.0">
|
||||
<children xsi:type="editmodel:AssociationEndEditModel" location="201,0" anchorKind="FixedAtEdge" attachSource="true"/>
|
||||
<children xsi:type="editmodel:AssociationEndEditModel"/>
|
||||
</sourceConnections>
|
||||
<classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" attributeSorter="Visibility" methodSorter="Visibility" innerClassSorter="Visibility" showPublicAttributes="true" showPackageAttributes="true" showPublicMethods="true" showPackageMethods="true" showPublicInnerClasses="true" showPackageInnerClasses="true"/>
|
||||
</children>
|
||||
<children xsi:type="editmodel:ClassEditModel" location="2227,562" size="403,85" id="kirschmshsCompiler904" runTimeClassModel="kirschmshsCompiler905;kirschmshsCompiler912">
|
||||
<children xsi:type="editmodel:CompartmentEditModel"/>
|
||||
<children xsi:type="editmodel:CompartmentEditModel" size="380,36">
|
||||
<children xsi:type="editmodel:MethodEditModel" id="kirschmshsCompiler905"/>
|
||||
<children xsi:type="editmodel:MethodEditModel" id="kirschmshsCompiler912"/>
|
||||
</children>
|
||||
<children xsi:type="editmodel:CompartmentEditModel"/>
|
||||
<sourceConnections xsi:type="editmodel:GeneralizationEditModel" connectionRouterKind="Manual" source="//@children.8" target="//@children.11/@sourceConnections.0" targetEnd="//@children.8/@sourceConnections.0/@children.1" sourceEnd="//@children.8/@sourceConnections.0/@children.0">
|
||||
<children xsi:type="editmodel:AssociationEndEditModel" location="201,0" anchorKind="FixedAtEdge" attachSource="true"/>
|
||||
<children xsi:type="editmodel:AssociationEndEditModel"/>
|
||||
</sourceConnections>
|
||||
<classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" attributeSorter="Visibility" methodSorter="Visibility" innerClassSorter="Visibility" showPublicAttributes="true" showPackageAttributes="true" showPublicMethods="true" showPackageMethods="true" showPublicInnerClasses="true" showPackageInnerClasses="true"/>
|
||||
</children>
|
||||
<children xsi:type="editmodel:ClassEditModel" location="2965,229" size="403,67" targetConnections="//@children.13/@sourceConnections.0" id="kirschmshsCompiler653" runTimeClassModel="kirschmshsCompiler654">
|
||||
<children xsi:type="editmodel:CompartmentEditModel"/>
|
||||
<children xsi:type="editmodel:CompartmentEditModel" size="380,18">
|
||||
<children xsi:type="editmodel:MethodEditModel" id="kirschmshsCompiler654"/>
|
||||
</children>
|
||||
<children xsi:type="editmodel:CompartmentEditModel"/>
|
||||
<sourceConnections xsi:type="editmodel:GeneralizationEditModel" connectionRouterKind="Manual" source="//@children.9" target="//@children.0/@sourceConnections.0" targetEnd="//@children.9/@sourceConnections.0/@children.1" sourceEnd="//@children.9/@sourceConnections.0/@children.0">
|
||||
<children xsi:type="editmodel:AssociationEndEditModel" location="201,0" anchorKind="FixedAtEdge" attachSource="true"/>
|
||||
<children xsi:type="editmodel:AssociationEndEditModel"/>
|
||||
</sourceConnections>
|
||||
<classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" attributeSorter="Visibility" methodSorter="Visibility" innerClassSorter="Visibility" showPublicAttributes="true" showPackageAttributes="true" showPublicMethods="true" showPackageMethods="true" showPublicInnerClasses="true" showPackageInnerClasses="true"/>
|
||||
</children>
|
||||
<children xsi:type="editmodel:ClassEditModel" location="2502,372" size="403,67" id="kirschmshsCompiler822" runTimeClassModel="kirschmshsCompiler823">
|
||||
<children xsi:type="editmodel:CompartmentEditModel"/>
|
||||
<children xsi:type="editmodel:CompartmentEditModel" size="380,18">
|
||||
<children xsi:type="editmodel:MethodEditModel" id="kirschmshsCompiler823"/>
|
||||
</children>
|
||||
<children xsi:type="editmodel:CompartmentEditModel"/>
|
||||
<sourceConnections xsi:type="editmodel:GeneralizationEditModel" connectionRouterKind="Manual" source="//@children.10" target="//@children.12/@sourceConnections.0" targetEnd="//@children.10/@sourceConnections.0/@children.1" sourceEnd="//@children.10/@sourceConnections.0/@children.0">
|
||||
<children xsi:type="editmodel:AssociationEndEditModel" location="201,0" anchorKind="FixedAtEdge" attachSource="true"/>
|
||||
<children xsi:type="editmodel:AssociationEndEditModel"/>
|
||||
</sourceConnections>
|
||||
<classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" attributeSorter="Visibility" methodSorter="Visibility" innerClassSorter="Visibility" showPublicAttributes="true" showPackageAttributes="true" showPublicMethods="true" showPackageMethods="true" showPublicInnerClasses="true" showPackageInnerClasses="true"/>
|
||||
</children>
|
||||
<children xsi:type="editmodel:ClassEditModel" location="45,553" size="403,85" id="kirschmshsCompiler931" runTimeClassModel="kirschmshsCompiler939;kirschmshsCompiler932">
|
||||
<children xsi:type="editmodel:CompartmentEditModel"/>
|
||||
<children xsi:type="editmodel:CompartmentEditModel" size="380,36">
|
||||
<children xsi:type="editmodel:MethodEditModel" id="kirschmshsCompiler932"/>
|
||||
<children xsi:type="editmodel:MethodEditModel" id="kirschmshsCompiler939"/>
|
||||
</children>
|
||||
<children xsi:type="editmodel:CompartmentEditModel"/>
|
||||
<sourceConnections xsi:type="editmodel:GeneralizationEditModel" targetConnections="//@children.2/@sourceConnections.0 //@children.1/@sourceConnections.0 //@children.3/@sourceConnections.0 //@children.17/@sourceConnections.0 //@children.8/@sourceConnections.0" connectionRouterKind="GeneralizationManhattan" source="//@children.11" target="//@children.0" targetEnd="//@children.11/@sourceConnections.0/@children.1" sourceEnd="//@children.11/@sourceConnections.0/@children.0">
|
||||
<children xsi:type="editmodel:AssociationEndEditModel" location="201,0" anchorKind="FixedAtEdge" attachSource="true"/>
|
||||
<children xsi:type="editmodel:AssociationEndEditModel" location="185,67" anchorKind="FixedAtEdge"/>
|
||||
</sourceConnections>
|
||||
<classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" attributeSorter="Visibility" methodSorter="Visibility" innerClassSorter="Visibility" showPublicAttributes="true" showPackageAttributes="true" showPublicMethods="true" showPackageMethods="true" showPublicInnerClasses="true" showPackageInnerClasses="true"/>
|
||||
</children>
|
||||
<children xsi:type="editmodel:ClassEditModel" location="1636,372" size="403,67" id="kirschmshsCompiler803" runTimeClassModel="kirschmshsCompiler804">
|
||||
<children xsi:type="editmodel:CompartmentEditModel"/>
|
||||
<children xsi:type="editmodel:CompartmentEditModel" size="380,18">
|
||||
<children xsi:type="editmodel:MethodEditModel" id="kirschmshsCompiler804"/>
|
||||
</children>
|
||||
<children xsi:type="editmodel:CompartmentEditModel"/>
|
||||
<sourceConnections xsi:type="editmodel:GeneralizationEditModel" targetConnections="//@children.7/@sourceConnections.0 //@children.10/@sourceConnections.0" connectionRouterKind="GeneralizationManhattan" source="//@children.12" target="//@children.14" targetEnd="//@children.12/@sourceConnections.0/@children.1" sourceEnd="//@children.12/@sourceConnections.0/@children.0">
|
||||
<children xsi:type="editmodel:AssociationEndEditModel" location="201,0" anchorKind="FixedAtEdge" attachSource="true"/>
|
||||
<children xsi:type="editmodel:AssociationEndEditModel" location="42,29" anchorKind="FixedAtEdge"/>
|
||||
</sourceConnections>
|
||||
<classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" attributeSorter="Visibility" methodSorter="Visibility" innerClassSorter="Visibility" showPublicAttributes="true" showPackageAttributes="true" showPublicMethods="true" showPackageMethods="true" showPublicInnerClasses="true" showPackageInnerClasses="true"/>
|
||||
</children>
|
||||
<children xsi:type="editmodel:ClassEditModel" location="2715,508" size="403,67" id="kirschmshsCompiler692" runTimeClassModel="kirschmshsCompiler693">
|
||||
<children xsi:type="editmodel:CompartmentEditModel"/>
|
||||
<children xsi:type="editmodel:CompartmentEditModel" size="380,18">
|
||||
<children xsi:type="editmodel:MethodEditModel" id="kirschmshsCompiler693"/>
|
||||
</children>
|
||||
<children xsi:type="editmodel:CompartmentEditModel"/>
|
||||
<sourceConnections xsi:type="editmodel:GeneralizationEditModel" targetConnections="//@children.4/@sourceConnections.0" connectionRouterKind="GeneralizationManhattan" source="//@children.13" target="//@children.9" targetEnd="//@children.13/@sourceConnections.0/@children.1" sourceEnd="//@children.13/@sourceConnections.0/@children.0">
|
||||
<children xsi:type="editmodel:AssociationEndEditModel" location="201,0" anchorKind="FixedAtEdge" attachSource="true"/>
|
||||
<children xsi:type="editmodel:AssociationEndEditModel" location="201,67" anchorKind="FixedAtEdge"/>
|
||||
</sourceConnections>
|
||||
<classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" attributeSorter="Visibility" methodSorter="Visibility" innerClassSorter="Visibility" showPublicAttributes="true" showPackageAttributes="true" showPublicMethods="true" showPackageMethods="true" showPublicInnerClasses="true" showPackageInnerClasses="true"/>
|
||||
</children>
|
||||
<children xsi:type="editmodel:ClassEditModel" location="2223,234" size="84,29" targetConnections="//@children.12/@sourceConnections.0" id="kirschmshsCompiler801" runTimeClassModel="">
|
||||
<children xsi:type="editmodel:CompartmentEditModel"/>
|
||||
<children xsi:type="editmodel:CompartmentEditModel"/>
|
||||
<children xsi:type="editmodel:CompartmentEditModel"/>
|
||||
<sourceConnections xsi:type="editmodel:GeneralizationEditModel" connectionRouterKind="Manual" source="//@children.14" target="//@children.0/@sourceConnections.0" targetEnd="//@children.14/@sourceConnections.0/@children.1" sourceEnd="//@children.14/@sourceConnections.0/@children.0">
|
||||
<children xsi:type="editmodel:AssociationEndEditModel" location="42,0" anchorKind="FixedAtEdge" attachSource="true"/>
|
||||
<children xsi:type="editmodel:AssociationEndEditModel"/>
|
||||
</sourceConnections>
|
||||
<classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" attributeSorter="Visibility" methodSorter="Visibility" innerClassSorter="Visibility" showPublicAttributes="true" showPackageAttributes="true" showPublicMethods="true" showPackageMethods="true" showPublicInnerClasses="true" showPackageInnerClasses="true"/>
|
||||
</children>
|
||||
<children xsi:type="editmodel:ClassEditModel" location="940,191" size="545,139" targetConnections="//@children.6/@sourceConnections.0" id="kirschmshsCompiler711" runTimeClassModel="kirschmshsCompiler719;kirschmshsCompiler729;kirschmshsCompiler737;kirschmshsCompiler747;kirschmshsCompiler712">
|
||||
<children xsi:type="editmodel:CompartmentEditModel"/>
|
||||
<children xsi:type="editmodel:CompartmentEditModel" size="522,90">
|
||||
<children xsi:type="editmodel:MethodEditModel" id="kirschmshsCompiler712"/>
|
||||
<children xsi:type="editmodel:MethodEditModel" id="kirschmshsCompiler719"/>
|
||||
<children xsi:type="editmodel:MethodEditModel" id="kirschmshsCompiler729"/>
|
||||
<children xsi:type="editmodel:MethodEditModel" id="kirschmshsCompiler747"/>
|
||||
<children xsi:type="editmodel:MethodEditModel" id="kirschmshsCompiler737"/>
|
||||
</children>
|
||||
<children xsi:type="editmodel:CompartmentEditModel"/>
|
||||
<sourceConnections xsi:type="editmodel:GeneralizationEditModel" connectionRouterKind="Manual" source="//@children.15" target="//@children.0/@sourceConnections.0" targetEnd="//@children.15/@sourceConnections.0/@children.1" sourceEnd="//@children.15/@sourceConnections.0/@children.0">
|
||||
<children xsi:type="editmodel:AssociationEndEditModel" location="272,0" anchorKind="FixedAtEdge" attachSource="true"/>
|
||||
<children xsi:type="editmodel:AssociationEndEditModel"/>
|
||||
</sourceConnections>
|
||||
<classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" attributeSorter="Visibility" methodSorter="Visibility" innerClassSorter="Visibility" showPublicAttributes="true" showPackageAttributes="true" showPublicMethods="true" showPackageMethods="true" showPublicInnerClasses="true" showPackageInnerClasses="true"/>
|
||||
</children>
|
||||
<children xsi:type="editmodel:ClassEditModel" location="1023,50" size="403,67" targetConnections="//@children.0/@sourceConnections.0" id="kirschmshsCompiler635" runTimeClassModel="kirschmshsCompiler636">
|
||||
<children xsi:type="editmodel:CompartmentEditModel"/>
|
||||
<children xsi:type="editmodel:CompartmentEditModel" size="380,18">
|
||||
<children xsi:type="editmodel:MethodEditModel" id="kirschmshsCompiler636"/>
|
||||
</children>
|
||||
<children xsi:type="editmodel:CompartmentEditModel"/>
|
||||
<classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" attributeSorter="Visibility" methodSorter="Visibility" innerClassSorter="Visibility" showPublicAttributes="true" showPackageAttributes="true" showPublicMethods="true" showPackageMethods="true" showPublicInnerClasses="true" showPackageInnerClasses="true"/>
|
||||
</children>
|
||||
<children xsi:type="editmodel:ClassEditModel" location="1791,561" size="403,85" id="kirschmshsCompiler958" runTimeClassModel="kirschmshsCompiler959;kirschmshsCompiler966">
|
||||
<children xsi:type="editmodel:CompartmentEditModel"/>
|
||||
<children xsi:type="editmodel:CompartmentEditModel" size="380,36">
|
||||
<children xsi:type="editmodel:MethodEditModel" id="kirschmshsCompiler959"/>
|
||||
<children xsi:type="editmodel:MethodEditModel" id="kirschmshsCompiler966"/>
|
||||
</children>
|
||||
<children xsi:type="editmodel:CompartmentEditModel"/>
|
||||
<sourceConnections xsi:type="editmodel:GeneralizationEditModel" connectionRouterKind="Manual" source="//@children.17" target="//@children.11/@sourceConnections.0" targetEnd="//@children.17/@sourceConnections.0/@children.1" sourceEnd="//@children.17/@sourceConnections.0/@children.0">
|
||||
<children xsi:type="editmodel:AssociationEndEditModel" location="201,0" anchorKind="FixedAtEdge" attachSource="true"/>
|
||||
<children xsi:type="editmodel:AssociationEndEditModel"/>
|
||||
</sourceConnections>
|
||||
<classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" attributeSorter="Visibility" methodSorter="Visibility" innerClassSorter="Visibility" showPublicAttributes="true" showPackageAttributes="true" showPublicMethods="true" showPackageMethods="true" showPublicInnerClasses="true" showPackageInnerClasses="true"/>
|
||||
</children>
|
||||
<classDiagramPreferences xsi:type="editmodel:UMLClassDiagramPreference" attributeSorter="Natural" methodSorter="Natural" innerClassSorter="Natural" showPublicAttributes="true" showPackageAttributes="true" showPublicMethods="true" showPackageMethods="true" showPublicInnerClasses="true" showPackageInnerClasses="true" showInterfaceStereotype="true" showClassStereotype="true" showPackageStereotype="true"/>
|
||||
</editmodel:ClassDiagramEditModel>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<editmodel:ClassDiagramEditModel xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:editmodel="editmodel.xmi" id="kirschmshsCompiler0" metadata="nsuml-1.4" initialized="true" showWireOptions="1">
|
||||
<children xsi:type="editmodel:ClassEditModel" location="448,178" size="371,67" targetConnections="//@children.11/@sourceConnections.0" id="kirschmshsCompiler761" runTimeClassModel="kirschmshsCompiler860">
|
||||
<children xsi:type="editmodel:CompartmentEditModel"/>
|
||||
<children xsi:type="editmodel:CompartmentEditModel" size="348,18">
|
||||
<children xsi:type="editmodel:MethodEditModel" id="kirschmshsCompiler860"/>
|
||||
</children>
|
||||
<children xsi:type="editmodel:CompartmentEditModel"/>
|
||||
<sourceConnections xsi:type="editmodel:GeneralizationEditModel" targetConnections="//@children.14/@sourceConnections.0 //@children.15/@sourceConnections.0 //@children.9/@sourceConnections.0" id="kirschmshsCompiler762" connectionRouterKind="GeneralizationManhattan" source="//@children.0" target="//@children.16" targetEnd="//@children.0/@sourceConnections.0/@children.1" sourceEnd="//@children.0/@sourceConnections.0/@children.0">
|
||||
<children xsi:type="editmodel:AssociationEndEditModel" location="185,0" anchorKind="FixedAtEdge" attachSource="true"/>
|
||||
<children xsi:type="editmodel:AssociationEndEditModel" location="201,67" anchorKind="FixedAtEdge"/>
|
||||
</sourceConnections>
|
||||
<classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" attributeSorter="Visibility" methodSorter="Visibility" innerClassSorter="Visibility" showPublicAttributes="true" showPackageAttributes="true" showPublicMethods="true" showPackageMethods="true" showPublicInnerClasses="true" showPackageInnerClasses="true"/>
|
||||
</children>
|
||||
<children xsi:type="editmodel:ClassEditModel" location="914,555" size="403,85" id="kirschmshsCompiler873" runTimeClassModel="kirschmshsCompiler881;kirschmshsCompiler874">
|
||||
<children xsi:type="editmodel:CompartmentEditModel"/>
|
||||
<children xsi:type="editmodel:CompartmentEditModel" size="380,36">
|
||||
<children xsi:type="editmodel:MethodEditModel" id="kirschmshsCompiler874"/>
|
||||
<children xsi:type="editmodel:MethodEditModel" id="kirschmshsCompiler881"/>
|
||||
</children>
|
||||
<children xsi:type="editmodel:CompartmentEditModel"/>
|
||||
<sourceConnections xsi:type="editmodel:GeneralizationEditModel" connectionRouterKind="Manual" source="//@children.1" target="//@children.11/@sourceConnections.0" targetEnd="//@children.1/@sourceConnections.0/@children.1" sourceEnd="//@children.1/@sourceConnections.0/@children.0">
|
||||
<children xsi:type="editmodel:AssociationEndEditModel" location="201,0" anchorKind="FixedAtEdge" attachSource="true"/>
|
||||
<children xsi:type="editmodel:AssociationEndEditModel"/>
|
||||
</sourceConnections>
|
||||
<classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" attributeSorter="Visibility" methodSorter="Visibility" innerClassSorter="Visibility" showPublicAttributes="true" showPackageAttributes="true" showPublicMethods="true" showPackageMethods="true" showPublicInnerClasses="true" showPackageInnerClasses="true"/>
|
||||
</children>
|
||||
<children xsi:type="editmodel:ClassEditModel" location="484,554" size="403,85" id="kirschmshsCompiler985" runTimeClassModel="kirschmshsCompiler993;kirschmshsCompiler986">
|
||||
<children xsi:type="editmodel:CompartmentEditModel"/>
|
||||
<children xsi:type="editmodel:CompartmentEditModel" size="380,36">
|
||||
<children xsi:type="editmodel:MethodEditModel" id="kirschmshsCompiler986"/>
|
||||
<children xsi:type="editmodel:MethodEditModel" id="kirschmshsCompiler993"/>
|
||||
</children>
|
||||
<children xsi:type="editmodel:CompartmentEditModel"/>
|
||||
<sourceConnections xsi:type="editmodel:GeneralizationEditModel" connectionRouterKind="Manual" source="//@children.2" target="//@children.11/@sourceConnections.0" targetEnd="//@children.2/@sourceConnections.0/@children.1" sourceEnd="//@children.2/@sourceConnections.0/@children.0">
|
||||
<children xsi:type="editmodel:AssociationEndEditModel" location="201,0" anchorKind="FixedAtEdge" attachSource="true"/>
|
||||
<children xsi:type="editmodel:AssociationEndEditModel"/>
|
||||
</sourceConnections>
|
||||
<classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" attributeSorter="Visibility" methodSorter="Visibility" innerClassSorter="Visibility" showPublicAttributes="true" showPackageAttributes="true" showPublicMethods="true" showPackageMethods="true" showPublicInnerClasses="true" showPackageInnerClasses="true"/>
|
||||
</children>
|
||||
<children xsi:type="editmodel:ClassEditModel" location="1345,559" size="403,85" id="kirschmshsCompiler1012" runTimeClassModel="kirschmshsCompiler1013;kirschmshsCompiler1020">
|
||||
<children xsi:type="editmodel:CompartmentEditModel"/>
|
||||
<children xsi:type="editmodel:CompartmentEditModel" size="380,36">
|
||||
<children xsi:type="editmodel:MethodEditModel" id="kirschmshsCompiler1013"/>
|
||||
<children xsi:type="editmodel:MethodEditModel" id="kirschmshsCompiler1020"/>
|
||||
</children>
|
||||
<children xsi:type="editmodel:CompartmentEditModel"/>
|
||||
<sourceConnections xsi:type="editmodel:GeneralizationEditModel" connectionRouterKind="Manual" source="//@children.3" target="//@children.11/@sourceConnections.0" targetEnd="//@children.3/@sourceConnections.0/@children.1" sourceEnd="//@children.3/@sourceConnections.0/@children.0">
|
||||
<children xsi:type="editmodel:AssociationEndEditModel" location="201,0" anchorKind="FixedAtEdge" attachSource="true"/>
|
||||
<children xsi:type="editmodel:AssociationEndEditModel"/>
|
||||
</sourceConnections>
|
||||
<classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" attributeSorter="Visibility" methodSorter="Visibility" innerClassSorter="Visibility" showPublicAttributes="true" showPackageAttributes="true" showPublicMethods="true" showPackageMethods="true" showPublicInnerClasses="true" showPackageInnerClasses="true"/>
|
||||
</children>
|
||||
<children xsi:type="editmodel:ClassEditModel" location="3194,502" size="403,67" id="kirschmshsCompiler670" runTimeClassModel="kirschmshsCompiler671">
|
||||
<children xsi:type="editmodel:CompartmentEditModel"/>
|
||||
<children xsi:type="editmodel:CompartmentEditModel" size="380,18">
|
||||
<children xsi:type="editmodel:MethodEditModel" id="kirschmshsCompiler671"/>
|
||||
</children>
|
||||
<children xsi:type="editmodel:CompartmentEditModel"/>
|
||||
<sourceConnections xsi:type="editmodel:GeneralizationEditModel" connectionRouterKind="Manual" source="//@children.4" target="//@children.13/@sourceConnections.0" targetEnd="//@children.4/@sourceConnections.0/@children.1" sourceEnd="//@children.4/@sourceConnections.0/@children.0">
|
||||
<children xsi:type="editmodel:AssociationEndEditModel" location="201,0" anchorKind="FixedAtEdge" attachSource="true"/>
|
||||
<children xsi:type="editmodel:AssociationEndEditModel"/>
|
||||
</sourceConnections>
|
||||
<classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" attributeSorter="Visibility" methodSorter="Visibility" innerClassSorter="Visibility" showPublicAttributes="true" showPackageAttributes="true" showPublicMethods="true" showPackageMethods="true" showPublicInnerClasses="true" showPackageInnerClasses="true"/>
|
||||
</children>
|
||||
<children xsi:type="editmodel:ClassEditModel" location="1365,425" size="76,29" id="kirschmshsCompiler765" runTimeClassModel="">
|
||||
<children xsi:type="editmodel:CompartmentEditModel"/>
|
||||
<children xsi:type="editmodel:CompartmentEditModel"/>
|
||||
<children xsi:type="editmodel:CompartmentEditModel"/>
|
||||
<sourceConnections xsi:type="editmodel:GeneralizationEditModel" id="kirschmshsCompiler766" connectionRouterKind="Manual" source="//@children.5" target="//@children.6/@sourceConnections.0" targetEnd="//@children.5/@sourceConnections.0/@children.1" sourceEnd="//@children.5/@sourceConnections.0/@children.0">
|
||||
<children xsi:type="editmodel:AssociationEndEditModel" location="38,0" anchorKind="FixedAtEdge" attachSource="true"/>
|
||||
<children xsi:type="editmodel:AssociationEndEditModel"/>
|
||||
</sourceConnections>
|
||||
<classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" attributeSorter="Visibility" methodSorter="Visibility" innerClassSorter="Visibility" showPublicAttributes="true" showPackageAttributes="true" showPublicMethods="true" showPackageMethods="true" showPublicInnerClasses="true" showPackageInnerClasses="true"/>
|
||||
</children>
|
||||
<children xsi:type="editmodel:ClassEditModel" location="963,417" size="86,29" id="kirschmshsCompiler783" runTimeClassModel="">
|
||||
<children xsi:type="editmodel:CompartmentEditModel"/>
|
||||
<children xsi:type="editmodel:CompartmentEditModel"/>
|
||||
<children xsi:type="editmodel:CompartmentEditModel"/>
|
||||
<sourceConnections xsi:type="editmodel:GeneralizationEditModel" targetConnections="//@children.5/@sourceConnections.0" id="kirschmshsCompiler784" connectionRouterKind="GeneralizationManhattan" source="//@children.6" target="//@children.15" targetEnd="//@children.6/@sourceConnections.0/@children.1" sourceEnd="//@children.6/@sourceConnections.0/@children.0">
|
||||
<children xsi:type="editmodel:AssociationEndEditModel" location="43,0" anchorKind="FixedAtEdge" attachSource="true"/>
|
||||
<children xsi:type="editmodel:AssociationEndEditModel" location="272,139" anchorKind="FixedAtEdge"/>
|
||||
</sourceConnections>
|
||||
<classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" attributeSorter="Visibility" methodSorter="Visibility" innerClassSorter="Visibility" showPublicAttributes="true" showPackageAttributes="true" showPublicMethods="true" showPackageMethods="true" showPublicInnerClasses="true" showPackageInnerClasses="true"/>
|
||||
</children>
|
||||
<children xsi:type="editmodel:ClassEditModel" location="2069,372" size="403,67" id="kirschmshsCompiler841" runTimeClassModel="kirschmshsCompiler842">
|
||||
<children xsi:type="editmodel:CompartmentEditModel"/>
|
||||
<children xsi:type="editmodel:CompartmentEditModel" size="380,18">
|
||||
<children xsi:type="editmodel:MethodEditModel" id="kirschmshsCompiler842"/>
|
||||
</children>
|
||||
<children xsi:type="editmodel:CompartmentEditModel"/>
|
||||
<sourceConnections xsi:type="editmodel:GeneralizationEditModel" connectionRouterKind="Manual" source="//@children.7" target="//@children.12/@sourceConnections.0" targetEnd="//@children.7/@sourceConnections.0/@children.1" sourceEnd="//@children.7/@sourceConnections.0/@children.0">
|
||||
<children xsi:type="editmodel:AssociationEndEditModel" location="201,0" anchorKind="FixedAtEdge" attachSource="true"/>
|
||||
<children xsi:type="editmodel:AssociationEndEditModel"/>
|
||||
</sourceConnections>
|
||||
<classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" attributeSorter="Visibility" methodSorter="Visibility" innerClassSorter="Visibility" showPublicAttributes="true" showPackageAttributes="true" showPublicMethods="true" showPackageMethods="true" showPublicInnerClasses="true" showPackageInnerClasses="true"/>
|
||||
</children>
|
||||
<children xsi:type="editmodel:ClassEditModel" location="2227,562" size="403,85" id="kirschmshsCompiler904" runTimeClassModel="kirschmshsCompiler905;kirschmshsCompiler912">
|
||||
<children xsi:type="editmodel:CompartmentEditModel"/>
|
||||
<children xsi:type="editmodel:CompartmentEditModel" size="380,36">
|
||||
<children xsi:type="editmodel:MethodEditModel" id="kirschmshsCompiler905"/>
|
||||
<children xsi:type="editmodel:MethodEditModel" id="kirschmshsCompiler912"/>
|
||||
</children>
|
||||
<children xsi:type="editmodel:CompartmentEditModel"/>
|
||||
<sourceConnections xsi:type="editmodel:GeneralizationEditModel" connectionRouterKind="Manual" source="//@children.8" target="//@children.11/@sourceConnections.0" targetEnd="//@children.8/@sourceConnections.0/@children.1" sourceEnd="//@children.8/@sourceConnections.0/@children.0">
|
||||
<children xsi:type="editmodel:AssociationEndEditModel" location="201,0" anchorKind="FixedAtEdge" attachSource="true"/>
|
||||
<children xsi:type="editmodel:AssociationEndEditModel"/>
|
||||
</sourceConnections>
|
||||
<classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" attributeSorter="Visibility" methodSorter="Visibility" innerClassSorter="Visibility" showPublicAttributes="true" showPackageAttributes="true" showPublicMethods="true" showPackageMethods="true" showPublicInnerClasses="true" showPackageInnerClasses="true"/>
|
||||
</children>
|
||||
<children xsi:type="editmodel:ClassEditModel" location="2965,229" size="403,67" targetConnections="//@children.13/@sourceConnections.0" id="kirschmshsCompiler653" runTimeClassModel="kirschmshsCompiler654">
|
||||
<children xsi:type="editmodel:CompartmentEditModel"/>
|
||||
<children xsi:type="editmodel:CompartmentEditModel" size="380,18">
|
||||
<children xsi:type="editmodel:MethodEditModel" id="kirschmshsCompiler654"/>
|
||||
</children>
|
||||
<children xsi:type="editmodel:CompartmentEditModel"/>
|
||||
<sourceConnections xsi:type="editmodel:GeneralizationEditModel" connectionRouterKind="Manual" source="//@children.9" target="//@children.0/@sourceConnections.0" targetEnd="//@children.9/@sourceConnections.0/@children.1" sourceEnd="//@children.9/@sourceConnections.0/@children.0">
|
||||
<children xsi:type="editmodel:AssociationEndEditModel" location="201,0" anchorKind="FixedAtEdge" attachSource="true"/>
|
||||
<children xsi:type="editmodel:AssociationEndEditModel"/>
|
||||
</sourceConnections>
|
||||
<classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" attributeSorter="Visibility" methodSorter="Visibility" innerClassSorter="Visibility" showPublicAttributes="true" showPackageAttributes="true" showPublicMethods="true" showPackageMethods="true" showPublicInnerClasses="true" showPackageInnerClasses="true"/>
|
||||
</children>
|
||||
<children xsi:type="editmodel:ClassEditModel" location="2502,372" size="403,67" id="kirschmshsCompiler822" runTimeClassModel="kirschmshsCompiler823">
|
||||
<children xsi:type="editmodel:CompartmentEditModel"/>
|
||||
<children xsi:type="editmodel:CompartmentEditModel" size="380,18">
|
||||
<children xsi:type="editmodel:MethodEditModel" id="kirschmshsCompiler823"/>
|
||||
</children>
|
||||
<children xsi:type="editmodel:CompartmentEditModel"/>
|
||||
<sourceConnections xsi:type="editmodel:GeneralizationEditModel" connectionRouterKind="Manual" source="//@children.10" target="//@children.12/@sourceConnections.0" targetEnd="//@children.10/@sourceConnections.0/@children.1" sourceEnd="//@children.10/@sourceConnections.0/@children.0">
|
||||
<children xsi:type="editmodel:AssociationEndEditModel" location="201,0" anchorKind="FixedAtEdge" attachSource="true"/>
|
||||
<children xsi:type="editmodel:AssociationEndEditModel"/>
|
||||
</sourceConnections>
|
||||
<classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" attributeSorter="Visibility" methodSorter="Visibility" innerClassSorter="Visibility" showPublicAttributes="true" showPackageAttributes="true" showPublicMethods="true" showPackageMethods="true" showPublicInnerClasses="true" showPackageInnerClasses="true"/>
|
||||
</children>
|
||||
<children xsi:type="editmodel:ClassEditModel" location="45,553" size="403,85" id="kirschmshsCompiler931" runTimeClassModel="kirschmshsCompiler939;kirschmshsCompiler932">
|
||||
<children xsi:type="editmodel:CompartmentEditModel"/>
|
||||
<children xsi:type="editmodel:CompartmentEditModel" size="380,36">
|
||||
<children xsi:type="editmodel:MethodEditModel" id="kirschmshsCompiler932"/>
|
||||
<children xsi:type="editmodel:MethodEditModel" id="kirschmshsCompiler939"/>
|
||||
</children>
|
||||
<children xsi:type="editmodel:CompartmentEditModel"/>
|
||||
<sourceConnections xsi:type="editmodel:GeneralizationEditModel" targetConnections="//@children.2/@sourceConnections.0 //@children.1/@sourceConnections.0 //@children.3/@sourceConnections.0 //@children.17/@sourceConnections.0 //@children.8/@sourceConnections.0" connectionRouterKind="GeneralizationManhattan" source="//@children.11" target="//@children.0" targetEnd="//@children.11/@sourceConnections.0/@children.1" sourceEnd="//@children.11/@sourceConnections.0/@children.0">
|
||||
<children xsi:type="editmodel:AssociationEndEditModel" location="201,0" anchorKind="FixedAtEdge" attachSource="true"/>
|
||||
<children xsi:type="editmodel:AssociationEndEditModel" location="185,67" anchorKind="FixedAtEdge"/>
|
||||
</sourceConnections>
|
||||
<classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" attributeSorter="Visibility" methodSorter="Visibility" innerClassSorter="Visibility" showPublicAttributes="true" showPackageAttributes="true" showPublicMethods="true" showPackageMethods="true" showPublicInnerClasses="true" showPackageInnerClasses="true"/>
|
||||
</children>
|
||||
<children xsi:type="editmodel:ClassEditModel" location="1636,372" size="403,67" id="kirschmshsCompiler803" runTimeClassModel="kirschmshsCompiler804">
|
||||
<children xsi:type="editmodel:CompartmentEditModel"/>
|
||||
<children xsi:type="editmodel:CompartmentEditModel" size="380,18">
|
||||
<children xsi:type="editmodel:MethodEditModel" id="kirschmshsCompiler804"/>
|
||||
</children>
|
||||
<children xsi:type="editmodel:CompartmentEditModel"/>
|
||||
<sourceConnections xsi:type="editmodel:GeneralizationEditModel" targetConnections="//@children.7/@sourceConnections.0 //@children.10/@sourceConnections.0" connectionRouterKind="GeneralizationManhattan" source="//@children.12" target="//@children.14" targetEnd="//@children.12/@sourceConnections.0/@children.1" sourceEnd="//@children.12/@sourceConnections.0/@children.0">
|
||||
<children xsi:type="editmodel:AssociationEndEditModel" location="201,0" anchorKind="FixedAtEdge" attachSource="true"/>
|
||||
<children xsi:type="editmodel:AssociationEndEditModel" location="42,29" anchorKind="FixedAtEdge"/>
|
||||
</sourceConnections>
|
||||
<classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" attributeSorter="Visibility" methodSorter="Visibility" innerClassSorter="Visibility" showPublicAttributes="true" showPackageAttributes="true" showPublicMethods="true" showPackageMethods="true" showPublicInnerClasses="true" showPackageInnerClasses="true"/>
|
||||
</children>
|
||||
<children xsi:type="editmodel:ClassEditModel" location="2715,508" size="403,67" id="kirschmshsCompiler692" runTimeClassModel="kirschmshsCompiler693">
|
||||
<children xsi:type="editmodel:CompartmentEditModel"/>
|
||||
<children xsi:type="editmodel:CompartmentEditModel" size="380,18">
|
||||
<children xsi:type="editmodel:MethodEditModel" id="kirschmshsCompiler693"/>
|
||||
</children>
|
||||
<children xsi:type="editmodel:CompartmentEditModel"/>
|
||||
<sourceConnections xsi:type="editmodel:GeneralizationEditModel" targetConnections="//@children.4/@sourceConnections.0" connectionRouterKind="GeneralizationManhattan" source="//@children.13" target="//@children.9" targetEnd="//@children.13/@sourceConnections.0/@children.1" sourceEnd="//@children.13/@sourceConnections.0/@children.0">
|
||||
<children xsi:type="editmodel:AssociationEndEditModel" location="201,0" anchorKind="FixedAtEdge" attachSource="true"/>
|
||||
<children xsi:type="editmodel:AssociationEndEditModel" location="201,67" anchorKind="FixedAtEdge"/>
|
||||
</sourceConnections>
|
||||
<classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" attributeSorter="Visibility" methodSorter="Visibility" innerClassSorter="Visibility" showPublicAttributes="true" showPackageAttributes="true" showPublicMethods="true" showPackageMethods="true" showPublicInnerClasses="true" showPackageInnerClasses="true"/>
|
||||
</children>
|
||||
<children xsi:type="editmodel:ClassEditModel" location="2223,234" size="84,29" targetConnections="//@children.12/@sourceConnections.0" id="kirschmshsCompiler801" runTimeClassModel="">
|
||||
<children xsi:type="editmodel:CompartmentEditModel"/>
|
||||
<children xsi:type="editmodel:CompartmentEditModel"/>
|
||||
<children xsi:type="editmodel:CompartmentEditModel"/>
|
||||
<sourceConnections xsi:type="editmodel:GeneralizationEditModel" connectionRouterKind="Manual" source="//@children.14" target="//@children.0/@sourceConnections.0" targetEnd="//@children.14/@sourceConnections.0/@children.1" sourceEnd="//@children.14/@sourceConnections.0/@children.0">
|
||||
<children xsi:type="editmodel:AssociationEndEditModel" location="42,0" anchorKind="FixedAtEdge" attachSource="true"/>
|
||||
<children xsi:type="editmodel:AssociationEndEditModel"/>
|
||||
</sourceConnections>
|
||||
<classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" attributeSorter="Visibility" methodSorter="Visibility" innerClassSorter="Visibility" showPublicAttributes="true" showPackageAttributes="true" showPublicMethods="true" showPackageMethods="true" showPublicInnerClasses="true" showPackageInnerClasses="true"/>
|
||||
</children>
|
||||
<children xsi:type="editmodel:ClassEditModel" location="940,191" size="545,139" targetConnections="//@children.6/@sourceConnections.0" id="kirschmshsCompiler711" runTimeClassModel="kirschmshsCompiler719;kirschmshsCompiler729;kirschmshsCompiler737;kirschmshsCompiler747;kirschmshsCompiler712">
|
||||
<children xsi:type="editmodel:CompartmentEditModel"/>
|
||||
<children xsi:type="editmodel:CompartmentEditModel" size="522,90">
|
||||
<children xsi:type="editmodel:MethodEditModel" id="kirschmshsCompiler712"/>
|
||||
<children xsi:type="editmodel:MethodEditModel" id="kirschmshsCompiler719"/>
|
||||
<children xsi:type="editmodel:MethodEditModel" id="kirschmshsCompiler729"/>
|
||||
<children xsi:type="editmodel:MethodEditModel" id="kirschmshsCompiler747"/>
|
||||
<children xsi:type="editmodel:MethodEditModel" id="kirschmshsCompiler737"/>
|
||||
</children>
|
||||
<children xsi:type="editmodel:CompartmentEditModel"/>
|
||||
<sourceConnections xsi:type="editmodel:GeneralizationEditModel" connectionRouterKind="Manual" source="//@children.15" target="//@children.0/@sourceConnections.0" targetEnd="//@children.15/@sourceConnections.0/@children.1" sourceEnd="//@children.15/@sourceConnections.0/@children.0">
|
||||
<children xsi:type="editmodel:AssociationEndEditModel" location="272,0" anchorKind="FixedAtEdge" attachSource="true"/>
|
||||
<children xsi:type="editmodel:AssociationEndEditModel"/>
|
||||
</sourceConnections>
|
||||
<classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" attributeSorter="Visibility" methodSorter="Visibility" innerClassSorter="Visibility" showPublicAttributes="true" showPackageAttributes="true" showPublicMethods="true" showPackageMethods="true" showPublicInnerClasses="true" showPackageInnerClasses="true"/>
|
||||
</children>
|
||||
<children xsi:type="editmodel:ClassEditModel" location="1023,50" size="403,67" targetConnections="//@children.0/@sourceConnections.0" id="kirschmshsCompiler635" runTimeClassModel="kirschmshsCompiler636">
|
||||
<children xsi:type="editmodel:CompartmentEditModel"/>
|
||||
<children xsi:type="editmodel:CompartmentEditModel" size="380,18">
|
||||
<children xsi:type="editmodel:MethodEditModel" id="kirschmshsCompiler636"/>
|
||||
</children>
|
||||
<children xsi:type="editmodel:CompartmentEditModel"/>
|
||||
<classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" attributeSorter="Visibility" methodSorter="Visibility" innerClassSorter="Visibility" showPublicAttributes="true" showPackageAttributes="true" showPublicMethods="true" showPackageMethods="true" showPublicInnerClasses="true" showPackageInnerClasses="true"/>
|
||||
</children>
|
||||
<children xsi:type="editmodel:ClassEditModel" location="1791,561" size="403,85" id="kirschmshsCompiler958" runTimeClassModel="kirschmshsCompiler959;kirschmshsCompiler966">
|
||||
<children xsi:type="editmodel:CompartmentEditModel"/>
|
||||
<children xsi:type="editmodel:CompartmentEditModel" size="380,36">
|
||||
<children xsi:type="editmodel:MethodEditModel" id="kirschmshsCompiler959"/>
|
||||
<children xsi:type="editmodel:MethodEditModel" id="kirschmshsCompiler966"/>
|
||||
</children>
|
||||
<children xsi:type="editmodel:CompartmentEditModel"/>
|
||||
<sourceConnections xsi:type="editmodel:GeneralizationEditModel" connectionRouterKind="Manual" source="//@children.17" target="//@children.11/@sourceConnections.0" targetEnd="//@children.17/@sourceConnections.0/@children.1" sourceEnd="//@children.17/@sourceConnections.0/@children.0">
|
||||
<children xsi:type="editmodel:AssociationEndEditModel" location="201,0" anchorKind="FixedAtEdge" attachSource="true"/>
|
||||
<children xsi:type="editmodel:AssociationEndEditModel"/>
|
||||
</sourceConnections>
|
||||
<classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" attributeSorter="Visibility" methodSorter="Visibility" innerClassSorter="Visibility" showPublicAttributes="true" showPackageAttributes="true" showPublicMethods="true" showPackageMethods="true" showPublicInnerClasses="true" showPackageInnerClasses="true"/>
|
||||
</children>
|
||||
<classDiagramPreferences xsi:type="editmodel:UMLClassDiagramPreference" attributeSorter="Natural" methodSorter="Natural" innerClassSorter="Natural" showPublicAttributes="true" showPackageAttributes="true" showPublicMethods="true" showPackageMethods="true" showPublicInnerClasses="true" showPackageInnerClasses="true" showInterfaceStereotype="true" showClassStereotype="true" showPackageStereotype="true"/>
|
||||
</editmodel:ClassDiagramEditModel>
|
||||
|
Before (image error) Size: 669 KiB After (image error) Size: 663 KiB |
@ -1,458 +1,458 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 1.0//EN' 'http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd'>
|
||||
<svg xmlns:xlink="http://www.w3.org/1999/xlink" style="fill-opacity:1; color-rendering:auto; color-interpolation:auto; text-rendering:auto; stroke:black; stroke-linecap:square; stroke-miterlimit:10; shape-rendering:auto; stroke-opacity:1; fill:black; stroke-dasharray:none; font-weight:normal; stroke-width:1; font-family:'sansserif'; font-style:normal; stroke-linejoin:miter; font-size:12; stroke-dashoffset:0; image-rendering:auto;" xmlns="http://www.w3.org/2000/svg">
|
||||
<!--Generated by the Batik Graphics2D SVG Generator-->
|
||||
<defs id="genericDefs" />
|
||||
<g>
|
||||
<g style="fill:white; font-family:'Arial'; font-weight:bold; stroke:white;">
|
||||
<rect x="-45" y="-50" width="3602" style="stroke:none;" height="652" />
|
||||
<rect x="406" y="131" width="368" style="fill:rgb(191,191,191); stroke:none;" height="64" />
|
||||
<rect x="405" y="130" width="368" style="fill:rgb(127,127,127); stroke:none;" height="64" />
|
||||
<rect x="404" y="129" width="368" style="fill:rgb(63,63,63); stroke:none;" height="64" />
|
||||
<rect x="403" y="128" width="368" style="stroke:none;" height="64" />
|
||||
<rect x="403" y="128" width="367" style="fill:none; stroke:black;" height="63" />
|
||||
<line x1="403" x2="770" y1="154" style="fill:none; stroke:black;" y2="154" />
|
||||
<line x1="403" x2="770" y1="164" style="fill:none; stroke:black;" y2="164" />
|
||||
<rect x="413" y="169" width="348" style="stroke:none; font-weight:normal;" height="16" />
|
||||
<image x="413" y="169" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAiklEQVR42rVRgQ2A
|
||||
IAwDwiF+4k7hE/WTnbJP3CdYoyEoqJjoQsiAdrSbjTGap7CTjcMOcy3ofu6xtxIQ
|
||||
wpLyJkIerkUPBUqqfAmikXYlo+R66gSgA3XpiMKn3OZtPaEDcfm/vzHAElSNiP7W
|
||||
JZR/IKAtzArcttabo56KBzzDeHXGl6ZL0ItJf0BYALD3PkMWvNRAAAAAAElFTkSu
|
||||
QmCC" style="fill:black; stroke:black; font-weight:normal;" height="16" preserveAspectRatio="none" />
|
||||
<text x="432" y="182" style="fill:black; stroke:none; font-weight:normal;" xml:space="preserve"> if_codegen(in ClassFile, in CodeAttribute, in String, in boolean): void</text>
|
||||
<image x="557" y="133" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAABBElEQVR42q1SYZnD
|
||||
IAylWwVUQiTgYJFQCZmDOVjOwSREwiREQqdgSMBBFwajcLu7/bl8+fpR8l7egzCs
|
||||
6+peISqi6pogREIavob1XGC7WkOmhIbQZkYf7gf7dgRDF9BPobLJjtnJpgPAWH5Z
|
||||
6Z28Z+aTXHLvjNagdKUQHSNnP3IViHC8HW1nbNkI9GycDGgwHWr95GPs3J9h7b+t
|
||||
PxDa4+Z1Z8lsICAjmqtsDwVTIUCqspRDOxeXJbophmip5E/kCcHbLdlOIiyR5tmD
|
||||
Lwo2nTpgDaF0rWHtIWG6wSU5KzylO6i6amabw+vZzMWbpU3FcprMyYW4bTL2T42q
|
||||
9G/x4Vr/gfAAzgaEraDyPpwAAAAASUVORK5CYII=" style="fill:black; stroke:black;" height="16" preserveAspectRatio="none" />
|
||||
<text x="576" y="145" style="fill:black; stroke:none;" xml:space="preserve">RelOp</text>
|
||||
<rect x="872" y="508" width="400" style="fill:rgb(191,191,191); stroke:none;" height="82" />
|
||||
<rect x="871" y="507" width="400" style="fill:rgb(127,127,127); stroke:none;" height="82" />
|
||||
<rect x="870" y="506" width="400" style="fill:rgb(63,63,63); stroke:none;" height="82" />
|
||||
<rect x="869" y="505" width="400" style="stroke:none;" height="82" />
|
||||
<rect x="869" y="505" width="399" style="fill:none; stroke:black;" height="81" />
|
||||
<line x1="869" x2="1268" y1="531" style="fill:none; stroke:black;" y2="531" />
|
||||
<line x1="869" x2="1268" y1="541" style="fill:none; stroke:black;" y2="541" />
|
||||
<rect x="879" y="546" width="380" style="stroke:none; font-weight:normal;" height="16" />
|
||||
<image x="879" y="546" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAYUlEQVR42mP8//8/
|
||||
AymAiYFEMAg1sGAKOTQ4wNkHGg4Q0ABUneCggOAmOBxYcACnk9BUg0QcFIBCgyeU
|
||||
HjwgpAEYJgsWPACqgyCQyIEHaJ5GDyWgNLIv0VRjjwdMRfQNJQCIvyUFPaAxvQAA
|
||||
AABJRU5ErkJggg==" style="fill:black; stroke:black; font-weight:normal;" height="16" preserveAspectRatio="none" />
|
||||
<text x="898" y="559" style="fill:black; stroke:none; font-weight:normal;" xml:space="preserve"> codegen(in ClassFile, in CodeAttribute, in Expr, in boolean, in Menge): void</text>
|
||||
<rect x="879" y="564" width="380" style="stroke:none; font-weight:normal;" height="16" />
|
||||
<image x="879" y="564" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAYUlEQVR42mP8//8/
|
||||
AymAiYFEMAg1sGAKOTQ4wNkHGg4Q0ABUneCggOAmOBxYcACnk9BUg0QcFIBCgyeU
|
||||
HjwgpAEYJgsWPACqgyCQyIEHaJ5GDyWgNLIv0VRjjwdMRfQNJQCIvyUFPaAxvQAA
|
||||
AABJRU5ErkJggg==" style="fill:black; stroke:black; font-weight:normal;" height="16" preserveAspectRatio="none" />
|
||||
<text x="898" y="577" style="fill:black; stroke:none; font-weight:normal;" xml:space="preserve"> if_codegen(in ClassFile, in CodeAttribute, in String, in boolean): void</text>
|
||||
<image x="1032" y="510" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAA7ElEQVR42q2SXXUE
|
||||
IQyF09kVMBIiAQmRMBIioRIioRKQEgkjAQk4mF42wMzu6UN7ujl5APL3ceHjOA4a
|
||||
lj1nd7qYiqjo9eQ+V2KPAJdrGPVwtzxPljMbqc/ZvZ5L7zUngOScw2zSt+bqpUza
|
||||
YFtibvSObC8uWczzrER03u1+nS+sj8Yt5iVLPifTGLXQH+1/BcBoSCKBhzsPHibm
|
||||
WN7MjKjue6W1lgp3TZ+aVDhBJZy0rL3qtiVO/dLQa4oAHSHRE0RrT/O9O1J7SwQK
|
||||
v6b6iA4LpPg2W2eDQ0P4uoLkS+3nvxRsL1/t3bL+xr4BXAV0uUgPznkAAAAASUVO
|
||||
RK5CYII=" style="fill:black; stroke:black;" height="16" preserveAspectRatio="none" />
|
||||
<text x="1051" y="522" style="fill:black; stroke:none;" xml:space="preserve">EqualOp</text>
|
||||
<rect x="442" y="507" width="400" style="fill:rgb(191,191,191); stroke:none;" height="82" />
|
||||
<rect x="441" y="506" width="400" style="fill:rgb(127,127,127); stroke:none;" height="82" />
|
||||
<rect x="440" y="505" width="400" style="fill:rgb(63,63,63); stroke:none;" height="82" />
|
||||
<rect x="439" y="504" width="400" style="stroke:none;" height="82" />
|
||||
<rect x="439" y="504" width="399" style="fill:none; stroke:black;" height="81" />
|
||||
<line x1="439" x2="838" y1="530" style="fill:none; stroke:black;" y2="530" />
|
||||
<line x1="439" x2="838" y1="540" style="fill:none; stroke:black;" y2="540" />
|
||||
<rect x="449" y="545" width="380" style="stroke:none; font-weight:normal;" height="16" />
|
||||
<image x="449" y="545" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAYUlEQVR42mP8//8/
|
||||
AymAiYFEMAg1sGAKOTQ4wNkHGg4Q0ABUneCggOAmOBxYcACnk9BUg0QcFIBCgyeU
|
||||
HjwgpAEYJgsWPACqgyCQyIEHaJ5GDyWgNLIv0VRjjwdMRfQNJQCIvyUFPaAxvQAA
|
||||
AABJRU5ErkJggg==" style="fill:black; stroke:black; font-weight:normal;" height="16" preserveAspectRatio="none" />
|
||||
<text x="468" y="558" style="fill:black; stroke:none; font-weight:normal;" xml:space="preserve"> codegen(in ClassFile, in CodeAttribute, in Expr, in boolean, in Menge): void</text>
|
||||
<rect x="449" y="563" width="380" style="stroke:none; font-weight:normal;" height="16" />
|
||||
<image x="449" y="563" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAYUlEQVR42mP8//8/
|
||||
AymAiYFEMAg1sGAKOTQ4wNkHGg4Q0ABUneCggOAmOBxYcACnk9BUg0QcFIBCgyeU
|
||||
HjwgpAEYJgsWPACqgyCQyIEHaJ5GDyWgNLIv0VRjjwdMRfQNJQCIvyUFPaAxvQAA
|
||||
AABJRU5ErkJggg==" style="fill:black; stroke:black; font-weight:normal;" height="16" preserveAspectRatio="none" />
|
||||
<text x="468" y="576" style="fill:black; stroke:none; font-weight:normal;" xml:space="preserve"> if_codegen(in ClassFile, in CodeAttribute, in String, in boolean): void</text>
|
||||
<image x="606" y="509" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAA7ElEQVR42q2SXXUE
|
||||
IQyF09kVMBIiAQmRMBIioRIioRKQEgkjAQk4mF42wMzu6UN7ujl5APL3ceHjOA4a
|
||||
lj1nd7qYiqjo9eQ+V2KPAJdrGPVwtzxPljMbqc/ZvZ5L7zUngOScw2zSt+bqpUza
|
||||
YFtibvSObC8uWczzrER03u1+nS+sj8Yt5iVLPifTGLXQH+1/BcBoSCKBhzsPHibm
|
||||
WN7MjKjue6W1lgp3TZ+aVDhBJZy0rL3qtiVO/dLQa4oAHSHRE0RrT/O9O1J7SwQK
|
||||
v6b6iA4LpPg2W2eDQ0P4uoLkS+3nvxRsL1/t3bL+xr4BXAV0uUgPznkAAAAASUVO
|
||||
RK5CYII=" style="fill:black; stroke:black;" height="16" preserveAspectRatio="none" />
|
||||
<text x="625" y="521" style="fill:black; stroke:none;" xml:space="preserve">LessOp</text>
|
||||
<rect x="1303" y="512" width="400" style="fill:rgb(191,191,191); stroke:none;" height="82" />
|
||||
<rect x="1302" y="511" width="400" style="fill:rgb(127,127,127); stroke:none;" height="82" />
|
||||
<rect x="1301" y="510" width="400" style="fill:rgb(63,63,63); stroke:none;" height="82" />
|
||||
<rect x="1300" y="509" width="400" style="stroke:none;" height="82" />
|
||||
<rect x="1300" y="509" width="399" style="fill:none; stroke:black;" height="81" />
|
||||
<line x1="1300" x2="1699" y1="535" style="fill:none; stroke:black;" y2="535" />
|
||||
<line x1="1300" x2="1699" y1="545" style="fill:none; stroke:black;" y2="545" />
|
||||
<rect x="1310" y="550" width="380" style="stroke:none; font-weight:normal;" height="16" />
|
||||
<image x="1310" y="550" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAYUlEQVR42mP8//8/
|
||||
AymAiYFEMAg1sGAKOTQ4wNkHGg4Q0ABUneCggOAmOBxYcACnk9BUg0QcFIBCgyeU
|
||||
HjwgpAEYJgsWPACqgyCQyIEHaJ5GDyWgNLIv0VRjjwdMRfQNJQCIvyUFPaAxvQAA
|
||||
AABJRU5ErkJggg==" style="fill:black; stroke:black; font-weight:normal;" height="16" preserveAspectRatio="none" />
|
||||
<text x="1329" y="563" style="fill:black; stroke:none; font-weight:normal;" xml:space="preserve"> codegen(in ClassFile, in CodeAttribute, in Expr, in boolean, in Menge): void</text>
|
||||
<rect x="1310" y="568" width="380" style="stroke:none; font-weight:normal;" height="16" />
|
||||
<image x="1310" y="568" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAYUlEQVR42mP8//8/
|
||||
AymAiYFEMAg1sGAKOTQ4wNkHGg4Q0ABUneCggOAmOBxYcACnk9BUg0QcFIBCgyeU
|
||||
HjwgpAEYJgsWPACqgyCQyIEHaJ5GDyWgNLIv0VRjjwdMRfQNJQCIvyUFPaAxvQAA
|
||||
AABJRU5ErkJggg==" style="fill:black; stroke:black; font-weight:normal;" height="16" preserveAspectRatio="none" />
|
||||
<text x="1329" y="581" style="fill:black; stroke:none; font-weight:normal;" xml:space="preserve"> if_codegen(in ClassFile, in CodeAttribute, in String, in boolean): void</text>
|
||||
<image x="1452" y="514" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAA7ElEQVR42q2SXXUE
|
||||
IQyF09kVMBIiAQmRMBIioRIioRKQEgkjAQk4mF42wMzu6UN7ujl5APL3ceHjOA4a
|
||||
lj1nd7qYiqjo9eQ+V2KPAJdrGPVwtzxPljMbqc/ZvZ5L7zUngOScw2zSt+bqpUza
|
||||
YFtibvSObC8uWczzrER03u1+nS+sj8Yt5iVLPifTGLXQH+1/BcBoSCKBhzsPHibm
|
||||
WN7MjKjue6W1lgp3TZ+aVDhBJZy0rL3qtiVO/dLQa4oAHSHRE0RrT/O9O1J7SwQK
|
||||
v6b6iA4LpPg2W2eDQ0P4uoLkS+3nvxRsL1/t3bL+xr4BXAV0uUgPznkAAAAASUVO
|
||||
RK5CYII=" style="fill:black; stroke:black;" height="16" preserveAspectRatio="none" />
|
||||
<text x="1471" y="526" style="fill:black; stroke:none;" xml:space="preserve">NotEqualOp</text>
|
||||
<rect x="3152" y="455" width="400" style="fill:rgb(191,191,191); stroke:none;" height="64" />
|
||||
<rect x="3151" y="454" width="400" style="fill:rgb(127,127,127); stroke:none;" height="64" />
|
||||
<rect x="3150" y="453" width="400" style="fill:rgb(63,63,63); stroke:none;" height="64" />
|
||||
<rect x="3149" y="452" width="400" style="stroke:none;" height="64" />
|
||||
<rect x="3149" y="452" width="399" style="fill:none; stroke:black;" height="63" />
|
||||
<line x1="3149" x2="3548" y1="478" style="fill:none; stroke:black;" y2="478" />
|
||||
<line x1="3149" x2="3548" y1="488" style="fill:none; stroke:black;" y2="488" />
|
||||
<rect x="3159" y="493" width="380" style="stroke:none; font-weight:normal;" height="16" />
|
||||
<image x="3159" y="493" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAYUlEQVR42mP8//8/
|
||||
AymAiYFEMAg1sGAKOTQ4wNkHGg4Q0ABUneCggOAmOBxYcACnk9BUg0QcFIBCgyeU
|
||||
HjwgpAEYJgsWPACqgyCQyIEHaJ5GDyWgNLIv0VRjjwdMRfQNJQCIvyUFPaAxvQAA
|
||||
AABJRU5ErkJggg==" style="fill:black; stroke:black; font-weight:normal;" height="16" preserveAspectRatio="none" />
|
||||
<text x="3178" y="506" style="fill:black; stroke:none; font-weight:normal;" xml:space="preserve"> codegen(in ClassFile, in CodeAttribute, in Expr, in boolean, in Menge): void</text>
|
||||
<image x="3311" y="457" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAA7ElEQVR42q2SXXUE
|
||||
IQyF09kVMBIiAQmRMBIioRIioRKQEgkjAQk4mF42wMzu6UN7ujl5APL3ceHjOA4a
|
||||
lj1nd7qYiqjo9eQ+V2KPAJdrGPVwtzxPljMbqc/ZvZ5L7zUngOScw2zSt+bqpUza
|
||||
YFtibvSObC8uWczzrER03u1+nS+sj8Yt5iVLPifTGLXQH+1/BcBoSCKBhzsPHibm
|
||||
WN7MjKjue6W1lgp3TZ+aVDhBJZy0rL3qtiVO/dLQa4oAHSHRE0RrT/O9O1J7SwQK
|
||||
v6b6iA4LpPg2W2eDQ0P4uoLkS+3nvxRsL1/t3bL+xr4BXAV0uUgPznkAAAAASUVO
|
||||
RK5CYII=" style="fill:black; stroke:black;" height="16" preserveAspectRatio="none" />
|
||||
<text x="3330" y="469" style="fill:black; stroke:none;" xml:space="preserve">MinusOp</text>
|
||||
<rect x="1323" y="378" width="73" style="fill:rgb(191,191,191); stroke:none;" height="26" />
|
||||
<rect x="1322" y="377" width="73" style="fill:rgb(127,127,127); stroke:none;" height="26" />
|
||||
<rect x="1321" y="376" width="73" style="fill:rgb(63,63,63); stroke:none;" height="26" />
|
||||
<rect x="1320" y="375" width="73" style="stroke:none;" height="26" />
|
||||
<rect x="1320" y="375" width="72" style="fill:none; stroke:black;" height="25" />
|
||||
<image x="1330" y="380" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAA7ElEQVR42q2SXXUE
|
||||
IQyF09kVMBIiAQmRMBIioRIioRKQEgkjAQk4mF42wMzu6UN7ujl5APL3ceHjOA4a
|
||||
lj1nd7qYiqjo9eQ+V2KPAJdrGPVwtzxPljMbqc/ZvZ5L7zUngOScw2zSt+bqpUza
|
||||
YFtibvSObC8uWczzrER03u1+nS+sj8Yt5iVLPifTGLXQH+1/BcBoSCKBhzsPHibm
|
||||
WN7MjKjue6W1lgp3TZ+aVDhBJZy0rL3qtiVO/dLQa4oAHSHRE0RrT/O9O1J7SwQK
|
||||
v6b6iA4LpPg2W2eDQ0P4uoLkS+3nvxRsL1/t3bL+xr4BXAV0uUgPznkAAAAASUVO
|
||||
RK5CYII=" style="fill:black; stroke:black;" height="16" preserveAspectRatio="none" />
|
||||
<text x="1349" y="392" style="fill:black; stroke:none;" xml:space="preserve">OrOp</text>
|
||||
<rect x="921" y="370" width="83" style="fill:rgb(191,191,191); stroke:none;" height="26" />
|
||||
<rect x="920" y="369" width="83" style="fill:rgb(127,127,127); stroke:none;" height="26" />
|
||||
<rect x="919" y="368" width="83" style="fill:rgb(63,63,63); stroke:none;" height="26" />
|
||||
<rect x="918" y="367" width="83" style="stroke:none;" height="26" />
|
||||
<rect x="918" y="367" width="82" style="fill:none; stroke:black;" height="25" />
|
||||
<image x="928" y="372" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAA7ElEQVR42q2SXXUE
|
||||
IQyF09kVMBIiAQmRMBIioRIioRKQEgkjAQk4mF42wMzu6UN7ujl5APL3ceHjOA4a
|
||||
lj1nd7qYiqjo9eQ+V2KPAJdrGPVwtzxPljMbqc/ZvZ5L7zUngOScw2zSt+bqpUza
|
||||
YFtibvSObC8uWczzrER03u1+nS+sj8Yt5iVLPifTGLXQH+1/BcBoSCKBhzsPHibm
|
||||
WN7MjKjue6W1lgp3TZ+aVDhBJZy0rL3qtiVO/dLQa4oAHSHRE0RrT/O9O1J7SwQK
|
||||
v6b6iA4LpPg2W2eDQ0P4uoLkS+3nvxRsL1/t3bL+xr4BXAV0uUgPznkAAAAASUVO
|
||||
RK5CYII=" style="fill:black; stroke:black;" height="16" preserveAspectRatio="none" />
|
||||
<text x="947" y="384" style="fill:black; stroke:none;" xml:space="preserve">AndOp</text>
|
||||
<rect x="2027" y="325" width="400" style="fill:rgb(191,191,191); stroke:none;" height="64" />
|
||||
<rect x="2026" y="324" width="400" style="fill:rgb(127,127,127); stroke:none;" height="64" />
|
||||
<rect x="2025" y="323" width="400" style="fill:rgb(63,63,63); stroke:none;" height="64" />
|
||||
<rect x="2024" y="322" width="400" style="stroke:none;" height="64" />
|
||||
<rect x="2024" y="322" width="399" style="fill:none; stroke:black;" height="63" />
|
||||
<line x1="2024" x2="2423" y1="348" style="fill:none; stroke:black;" y2="348" />
|
||||
<line x1="2024" x2="2423" y1="358" style="fill:none; stroke:black;" y2="358" />
|
||||
<rect x="2034" y="363" width="380" style="stroke:none; font-weight:normal;" height="16" />
|
||||
<image x="2034" y="363" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAYUlEQVR42mP8//8/
|
||||
AymAiYFEMAg1sGAKOTQ4wNkHGg4Q0ABUneCggOAmOBxYcACnk9BUg0QcFIBCgyeU
|
||||
HjwgpAEYJgsWPACqgyCQyIEHaJ5GDyWgNLIv0VRjjwdMRfQNJQCIvyUFPaAxvQAA
|
||||
AABJRU5ErkJggg==" style="fill:black; stroke:black; font-weight:normal;" height="16" preserveAspectRatio="none" />
|
||||
<text x="2053" y="376" style="fill:black; stroke:none; font-weight:normal;" xml:space="preserve"> codegen(in ClassFile, in CodeAttribute, in Expr, in boolean, in Menge): void</text>
|
||||
<image x="2186" y="327" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAA7ElEQVR42q2SXXUE
|
||||
IQyF09kVMBIiAQmRMBIioRIioRKQEgkjAQk4mF42wMzu6UN7ujl5APL3ceHjOA4a
|
||||
lj1nd7qYiqjo9eQ+V2KPAJdrGPVwtzxPljMbqc/ZvZ5L7zUngOScw2zSt+bqpUza
|
||||
YFtibvSObC8uWczzrER03u1+nS+sj8Yt5iVLPifTGLXQH+1/BcBoSCKBhzsPHibm
|
||||
WN7MjKjue6W1lgp3TZ+aVDhBJZy0rL3qtiVO/dLQa4oAHSHRE0RrT/O9O1J7SwQK
|
||||
v6b6iA4LpPg2W2eDQ0P4uoLkS+3nvxRsL1/t3bL+xr4BXAV0uUgPznkAAAAASUVO
|
||||
RK5CYII=" style="fill:black; stroke:black;" height="16" preserveAspectRatio="none" />
|
||||
<text x="2205" y="339" style="fill:black; stroke:none;" xml:space="preserve">TimesOp</text>
|
||||
<rect x="2185" y="515" width="400" style="fill:rgb(191,191,191); stroke:none;" height="82" />
|
||||
<rect x="2184" y="514" width="400" style="fill:rgb(127,127,127); stroke:none;" height="82" />
|
||||
<rect x="2183" y="513" width="400" style="fill:rgb(63,63,63); stroke:none;" height="82" />
|
||||
<rect x="2182" y="512" width="400" style="stroke:none;" height="82" />
|
||||
<rect x="2182" y="512" width="399" style="fill:none; stroke:black;" height="81" />
|
||||
<line x1="2182" x2="2581" y1="538" style="fill:none; stroke:black;" y2="538" />
|
||||
<line x1="2182" x2="2581" y1="548" style="fill:none; stroke:black;" y2="548" />
|
||||
<rect x="2192" y="553" width="380" style="stroke:none; font-weight:normal;" height="16" />
|
||||
<image x="2192" y="553" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAYUlEQVR42mP8//8/
|
||||
AymAiYFEMAg1sGAKOTQ4wNkHGg4Q0ABUneCggOAmOBxYcACnk9BUg0QcFIBCgyeU
|
||||
HjwgpAEYJgsWPACqgyCQyIEHaJ5GDyWgNLIv0VRjjwdMRfQNJQCIvyUFPaAxvQAA
|
||||
AABJRU5ErkJggg==" style="fill:black; stroke:black; font-weight:normal;" height="16" preserveAspectRatio="none" />
|
||||
<text x="2211" y="566" style="fill:black; stroke:none; font-weight:normal;" xml:space="preserve"> codegen(in ClassFile, in CodeAttribute, in Expr, in boolean, in Menge): void</text>
|
||||
<rect x="2192" y="571" width="380" style="stroke:none; font-weight:normal;" height="16" />
|
||||
<image x="2192" y="571" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAYUlEQVR42mP8//8/
|
||||
AymAiYFEMAg1sGAKOTQ4wNkHGg4Q0ABUneCggOAmOBxYcACnk9BUg0QcFIBCgyeU
|
||||
HjwgpAEYJgsWPACqgyCQyIEHaJ5GDyWgNLIv0VRjjwdMRfQNJQCIvyUFPaAxvQAA
|
||||
AABJRU5ErkJggg==" style="fill:black; stroke:black; font-weight:normal;" height="16" preserveAspectRatio="none" />
|
||||
<text x="2211" y="584" style="fill:black; stroke:none; font-weight:normal;" xml:space="preserve"> if_codegen(in ClassFile, in CodeAttribute, in String, in boolean): void</text>
|
||||
<image x="2327" y="517" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAA7ElEQVR42q2SXXUE
|
||||
IQyF09kVMBIiAQmRMBIioRIioRKQEgkjAQk4mF42wMzu6UN7ujl5APL3ceHjOA4a
|
||||
lj1nd7qYiqjo9eQ+V2KPAJdrGPVwtzxPljMbqc/ZvZ5L7zUngOScw2zSt+bqpUza
|
||||
YFtibvSObC8uWczzrER03u1+nS+sj8Yt5iVLPifTGLXQH+1/BcBoSCKBhzsPHibm
|
||||
WN7MjKjue6W1lgp3TZ+aVDhBJZy0rL3qtiVO/dLQa4oAHSHRE0RrT/O9O1J7SwQK
|
||||
v6b6iA4LpPg2W2eDQ0P4uoLkS+3nvxRsL1/t3bL+xr4BXAV0uUgPznkAAAAASUVO
|
||||
RK5CYII=" style="fill:black; stroke:black;" height="16" preserveAspectRatio="none" />
|
||||
<text x="2346" y="529" style="fill:black; stroke:none;" xml:space="preserve">GreaterEquOp</text>
|
||||
<rect x="2923" y="182" width="400" style="fill:rgb(191,191,191); stroke:none;" height="64" />
|
||||
<rect x="2922" y="181" width="400" style="fill:rgb(127,127,127); stroke:none;" height="64" />
|
||||
<rect x="2921" y="180" width="400" style="fill:rgb(63,63,63); stroke:none;" height="64" />
|
||||
<rect x="2920" y="179" width="400" style="stroke:none;" height="64" />
|
||||
<rect x="2920" y="179" width="399" style="fill:none; stroke:black;" height="63" />
|
||||
<line x1="2920" x2="3319" y1="205" style="fill:none; stroke:black;" y2="205" />
|
||||
<line x1="2920" x2="3319" y1="215" style="fill:none; stroke:black;" y2="215" />
|
||||
<rect x="2930" y="220" width="380" style="stroke:none; font-weight:normal;" height="16" />
|
||||
<image x="2930" y="220" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAiklEQVR42rVRgQ2A
|
||||
IAwDwiF+4k7hE/WTnbJP3CdYoyEoqJjoQsiAdrSbjTGap7CTjcMOcy3ofu6xtxIQ
|
||||
wpLyJkIerkUPBUqqfAmikXYlo+R66gSgA3XpiMKn3OZtPaEDcfm/vzHAElSNiP7W
|
||||
JZR/IKAtzArcttabo56KBzzDeHXGl6ZL0ItJf0BYALD3PkMWvNRAAAAAAElFTkSu
|
||||
QmCC" style="fill:black; stroke:black; font-weight:normal;" height="16" preserveAspectRatio="none" />
|
||||
<text x="2949" y="233" style="fill:black; stroke:none; font-weight:normal;" xml:space="preserve"> codegen(in ClassFile, in CodeAttribute, in Expr, in boolean, in Menge): void</text>
|
||||
<image x="3088" y="184" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAABBElEQVR42q1SYZnD
|
||||
IAylWwVUQiTgYJFQCZmDOVjOwSREwiREQqdgSMBBFwajcLu7/bl8+fpR8l7egzCs
|
||||
6+peISqi6pogREIavob1XGC7WkOmhIbQZkYf7gf7dgRDF9BPobLJjtnJpgPAWH5Z
|
||||
6Z28Z+aTXHLvjNagdKUQHSNnP3IViHC8HW1nbNkI9GycDGgwHWr95GPs3J9h7b+t
|
||||
PxDa4+Z1Z8lsICAjmqtsDwVTIUCqspRDOxeXJbophmip5E/kCcHbLdlOIiyR5tmD
|
||||
Lwo2nTpgDaF0rWHtIWG6wSU5KzylO6i6amabw+vZzMWbpU3FcprMyYW4bTL2T42q
|
||||
9G/x4Vr/gfAAzgaEraDyPpwAAAAASUVORK5CYII=" style="fill:black; stroke:black;" height="16" preserveAspectRatio="none" />
|
||||
<text x="3107" y="196" style="fill:black; stroke:none;" xml:space="preserve">AddOp</text>
|
||||
<rect x="2460" y="325" width="400" style="fill:rgb(191,191,191); stroke:none;" height="64" />
|
||||
<rect x="2459" y="324" width="400" style="fill:rgb(127,127,127); stroke:none;" height="64" />
|
||||
<rect x="2458" y="323" width="400" style="fill:rgb(63,63,63); stroke:none;" height="64" />
|
||||
<rect x="2457" y="322" width="400" style="stroke:none;" height="64" />
|
||||
<rect x="2457" y="322" width="399" style="fill:none; stroke:black;" height="63" />
|
||||
<line x1="2457" x2="2856" y1="348" style="fill:none; stroke:black;" y2="348" />
|
||||
<line x1="2457" x2="2856" y1="358" style="fill:none; stroke:black;" y2="358" />
|
||||
<rect x="2467" y="363" width="380" style="stroke:none; font-weight:normal;" height="16" />
|
||||
<image x="2467" y="363" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAYUlEQVR42mP8//8/
|
||||
AymAiYFEMAg1sGAKOTQ4wNkHGg4Q0ABUneCggOAmOBxYcACnk9BUg0QcFIBCgyeU
|
||||
HjwgpAEYJgsWPACqgyCQyIEHaJ5GDyWgNLIv0VRjjwdMRfQNJQCIvyUFPaAxvQAA
|
||||
AABJRU5ErkJggg==" style="fill:black; stroke:black; font-weight:normal;" height="16" preserveAspectRatio="none" />
|
||||
<text x="2486" y="376" style="fill:black; stroke:none; font-weight:normal;" xml:space="preserve"> codegen(in ClassFile, in CodeAttribute, in Expr, in boolean, in Menge): void</text>
|
||||
<image x="2614" y="327" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAA7ElEQVR42q2SXXUE
|
||||
IQyF09kVMBIiAQmRMBIioRIioRKQEgkjAQk4mF42wMzu6UN7ujl5APL3ceHjOA4a
|
||||
lj1nd7qYiqjo9eQ+V2KPAJdrGPVwtzxPljMbqc/ZvZ5L7zUngOScw2zSt+bqpUza
|
||||
YFtibvSObC8uWczzrER03u1+nS+sj8Yt5iVLPifTGLXQH+1/BcBoSCKBhzsPHibm
|
||||
WN7MjKjue6W1lgp3TZ+aVDhBJZy0rL3qtiVO/dLQa4oAHSHRE0RrT/O9O1J7SwQK
|
||||
v6b6iA4LpPg2W2eDQ0P4uoLkS+3nvxRsL1/t3bL+xr4BXAV0uUgPznkAAAAASUVO
|
||||
RK5CYII=" style="fill:black; stroke:black;" height="16" preserveAspectRatio="none" />
|
||||
<text x="2633" y="339" style="fill:black; stroke:none;" xml:space="preserve">ModuloOp</text>
|
||||
<rect x="3" y="506" width="400" style="fill:rgb(191,191,191); stroke:none;" height="82" />
|
||||
<rect x="2" y="505" width="400" style="fill:rgb(127,127,127); stroke:none;" height="82" />
|
||||
<rect x="1" y="504" width="400" style="fill:rgb(63,63,63); stroke:none;" height="82" />
|
||||
<rect x="0" y="503" width="400" style="stroke:none;" height="82" />
|
||||
<rect x="0" y="503" width="399" style="fill:none; stroke:black;" height="81" />
|
||||
<line x1="0" x2="399" y1="529" style="fill:none; stroke:black;" y2="529" />
|
||||
<line x1="0" x2="399" y1="539" style="fill:none; stroke:black;" y2="539" />
|
||||
<rect x="10" y="544" width="380" style="stroke:none; font-weight:normal;" height="16" />
|
||||
<image x="10" y="544" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAYUlEQVR42mP8//8/
|
||||
AymAiYFEMAg1sGAKOTQ4wNkHGg4Q0ABUneCggOAmOBxYcACnk9BUg0QcFIBCgyeU
|
||||
HjwgpAEYJgsWPACqgyCQyIEHaJ5GDyWgNLIv0VRjjwdMRfQNJQCIvyUFPaAxvQAA
|
||||
AABJRU5ErkJggg==" style="fill:black; stroke:black; font-weight:normal;" height="16" preserveAspectRatio="none" />
|
||||
<text x="29" y="557" style="fill:black; stroke:none; font-weight:normal;" xml:space="preserve"> codegen(in ClassFile, in CodeAttribute, in Expr, in boolean, in Menge): void</text>
|
||||
<rect x="10" y="562" width="380" style="stroke:none; font-weight:normal;" height="16" />
|
||||
<image x="10" y="562" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAYUlEQVR42mP8//8/
|
||||
AymAiYFEMAg1sGAKOTQ4wNkHGg4Q0ABUneCggOAmOBxYcACnk9BUg0QcFIBCgyeU
|
||||
HjwgpAEYJgsWPACqgyCQyIEHaJ5GDyWgNLIv0VRjjwdMRfQNJQCIvyUFPaAxvQAA
|
||||
AABJRU5ErkJggg==" style="fill:black; stroke:black; font-weight:normal;" height="16" preserveAspectRatio="none" />
|
||||
<text x="29" y="575" style="fill:black; stroke:none; font-weight:normal;" xml:space="preserve"> if_codegen(in ClassFile, in CodeAttribute, in String, in boolean): void</text>
|
||||
<image x="157" y="508" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAA7ElEQVR42q2SXXUE
|
||||
IQyF09kVMBIiAQmRMBIioRIioRKQEgkjAQk4mF42wMzu6UN7ujl5APL3ceHjOA4a
|
||||
lj1nd7qYiqjo9eQ+V2KPAJdrGPVwtzxPljMbqc/ZvZ5L7zUngOScw2zSt+bqpUza
|
||||
YFtibvSObC8uWczzrER03u1+nS+sj8Yt5iVLPifTGLXQH+1/BcBoSCKBhzsPHibm
|
||||
WN7MjKjue6W1lgp3TZ+aVDhBJZy0rL3qtiVO/dLQa4oAHSHRE0RrT/O9O1J7SwQK
|
||||
v6b6iA4LpPg2W2eDQ0P4uoLkS+3nvxRsL1/t3bL+xr4BXAV0uUgPznkAAAAASUVO
|
||||
RK5CYII=" style="fill:black; stroke:black;" height="16" preserveAspectRatio="none" />
|
||||
<text x="176" y="520" style="fill:black; stroke:none;" xml:space="preserve">GreaterOp</text>
|
||||
<rect x="1594" y="325" width="400" style="fill:rgb(191,191,191); stroke:none;" height="64" />
|
||||
<rect x="1593" y="324" width="400" style="fill:rgb(127,127,127); stroke:none;" height="64" />
|
||||
<rect x="1592" y="323" width="400" style="fill:rgb(63,63,63); stroke:none;" height="64" />
|
||||
<rect x="1591" y="322" width="400" style="stroke:none;" height="64" />
|
||||
<rect x="1591" y="322" width="399" style="fill:none; stroke:black;" height="63" />
|
||||
<line x1="1591" x2="1990" y1="348" style="fill:none; stroke:black;" y2="348" />
|
||||
<line x1="1591" x2="1990" y1="358" style="fill:none; stroke:black;" y2="358" />
|
||||
<rect x="1601" y="363" width="380" style="stroke:none; font-weight:normal;" height="16" />
|
||||
<image x="1601" y="363" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAYUlEQVR42mP8//8/
|
||||
AymAiYFEMAg1sGAKOTQ4wNkHGg4Q0ABUneCggOAmOBxYcACnk9BUg0QcFIBCgyeU
|
||||
HjwgpAEYJgsWPACqgyCQyIEHaJ5GDyWgNLIv0VRjjwdMRfQNJQCIvyUFPaAxvQAA
|
||||
AABJRU5ErkJggg==" style="fill:black; stroke:black; font-weight:normal;" height="16" preserveAspectRatio="none" />
|
||||
<text x="1620" y="376" style="fill:black; stroke:none; font-weight:normal;" xml:space="preserve"> codegen(in ClassFile, in CodeAttribute, in Expr, in boolean, in Menge): void</text>
|
||||
<image x="1752" y="327" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAA7ElEQVR42q2SXXUE
|
||||
IQyF09kVMBIiAQmRMBIioRIioRKQEgkjAQk4mF42wMzu6UN7ujl5APL3ceHjOA4a
|
||||
lj1nd7qYiqjo9eQ+V2KPAJdrGPVwtzxPljMbqc/ZvZ5L7zUngOScw2zSt+bqpUza
|
||||
YFtibvSObC8uWczzrER03u1+nS+sj8Yt5iVLPifTGLXQH+1/BcBoSCKBhzsPHibm
|
||||
WN7MjKjue6W1lgp3TZ+aVDhBJZy0rL3qtiVO/dLQa4oAHSHRE0RrT/O9O1J7SwQK
|
||||
v6b6iA4LpPg2W2eDQ0P4uoLkS+3nvxRsL1/t3bL+xr4BXAV0uUgPznkAAAAASUVO
|
||||
RK5CYII=" style="fill:black; stroke:black;" height="16" preserveAspectRatio="none" />
|
||||
<text x="1771" y="339" style="fill:black; stroke:none;" xml:space="preserve">DivideOp</text>
|
||||
<rect x="2673" y="461" width="400" style="fill:rgb(191,191,191); stroke:none;" height="64" />
|
||||
<rect x="2672" y="460" width="400" style="fill:rgb(127,127,127); stroke:none;" height="64" />
|
||||
<rect x="2671" y="459" width="400" style="fill:rgb(63,63,63); stroke:none;" height="64" />
|
||||
<rect x="2670" y="458" width="400" style="stroke:none;" height="64" />
|
||||
<rect x="2670" y="458" width="399" style="fill:none; stroke:black;" height="63" />
|
||||
<line x1="2670" x2="3069" y1="484" style="fill:none; stroke:black;" y2="484" />
|
||||
<line x1="2670" x2="3069" y1="494" style="fill:none; stroke:black;" y2="494" />
|
||||
<rect x="2680" y="499" width="380" style="stroke:none; font-weight:normal;" height="16" />
|
||||
<image x="2680" y="499" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAYUlEQVR42mP8//8/
|
||||
AymAiYFEMAg1sGAKOTQ4wNkHGg4Q0ABUneCggOAmOBxYcACnk9BUg0QcFIBCgyeU
|
||||
HjwgpAEYJgsWPACqgyCQyIEHaJ5GDyWgNLIv0VRjjwdMRfQNJQCIvyUFPaAxvQAA
|
||||
AABJRU5ErkJggg==" style="fill:black; stroke:black; font-weight:normal;" height="16" preserveAspectRatio="none" />
|
||||
<text x="2699" y="512" style="fill:black; stroke:none; font-weight:normal;" xml:space="preserve"> codegen(in ClassFile, in CodeAttribute, in Expr, in boolean, in Menge): void</text>
|
||||
<image x="2837" y="463" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAA7ElEQVR42q2SXXUE
|
||||
IQyF09kVMBIiAQmRMBIioRIioRKQEgkjAQk4mF42wMzu6UN7ujl5APL3ceHjOA4a
|
||||
lj1nd7qYiqjo9eQ+V2KPAJdrGPVwtzxPljMbqc/ZvZ5L7zUngOScw2zSt+bqpUza
|
||||
YFtibvSObC8uWczzrER03u1+nS+sj8Yt5iVLPifTGLXQH+1/BcBoSCKBhzsPHibm
|
||||
WN7MjKjue6W1lgp3TZ+aVDhBJZy0rL3qtiVO/dLQa4oAHSHRE0RrT/O9O1J7SwQK
|
||||
v6b6iA4LpPg2W2eDQ0P4uoLkS+3nvxRsL1/t3bL+xr4BXAV0uUgPznkAAAAASUVO
|
||||
RK5CYII=" style="fill:black; stroke:black;" height="16" preserveAspectRatio="none" />
|
||||
<text x="2856" y="475" style="fill:black; stroke:none;" xml:space="preserve">PlusOp</text>
|
||||
<rect x="2181" y="187" width="81" style="fill:rgb(191,191,191); stroke:none;" height="26" />
|
||||
<rect x="2180" y="186" width="81" style="fill:rgb(127,127,127); stroke:none;" height="26" />
|
||||
<rect x="2179" y="185" width="81" style="fill:rgb(63,63,63); stroke:none;" height="26" />
|
||||
<rect x="2178" y="184" width="81" style="stroke:none;" height="26" />
|
||||
<rect x="2178" y="184" width="80" style="fill:none; stroke:black;" height="25" />
|
||||
<image x="2188" y="189" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAABBElEQVR42q1SYZnD
|
||||
IAylWwVUQiTgYJFQCZmDOVjOwSREwiREQqdgSMBBFwajcLu7/bl8+fpR8l7egzCs
|
||||
6+peISqi6pogREIavob1XGC7WkOmhIbQZkYf7gf7dgRDF9BPobLJjtnJpgPAWH5Z
|
||||
6Z28Z+aTXHLvjNagdKUQHSNnP3IViHC8HW1nbNkI9GycDGgwHWr95GPs3J9h7b+t
|
||||
PxDa4+Z1Z8lsICAjmqtsDwVTIUCqspRDOxeXJbophmip5E/kCcHbLdlOIiyR5tmD
|
||||
Lwo2nTpgDaF0rWHtIWG6wSU5KzylO6i6amabw+vZzMWbpU3FcprMyYW4bTL2T42q
|
||||
9G/x4Vr/gfAAzgaEraDyPpwAAAAASUVORK5CYII=" style="fill:black; stroke:black;" height="16" preserveAspectRatio="none" />
|
||||
<text x="2207" y="201" style="fill:black; stroke:none;" xml:space="preserve">MulOp</text>
|
||||
<rect x="898" y="144" width="542" style="fill:rgb(191,191,191); stroke:none;" height="136" />
|
||||
<rect x="897" y="143" width="542" style="fill:rgb(127,127,127); stroke:none;" height="136" />
|
||||
<rect x="896" y="142" width="542" style="fill:rgb(63,63,63); stroke:none;" height="136" />
|
||||
<rect x="895" y="141" width="542" style="stroke:none;" height="136" />
|
||||
<rect x="895" y="141" width="541" style="fill:none; stroke:black;" height="135" />
|
||||
<line x1="895" x2="1436" y1="167" style="fill:none; stroke:black;" y2="167" />
|
||||
<line x1="895" x2="1436" y1="177" style="fill:none; stroke:black;" y2="177" />
|
||||
<rect x="905" y="182" width="522" style="stroke:none; font-weight:normal;" height="16" />
|
||||
<image x="905" y="182" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAYUlEQVR42mP8//8/
|
||||
AymAiYFEMAg1sGAKOTQ4wNkHGg4Q0ABUneCggOAmOBxYcACnk9BUg0QcFIBCgyeU
|
||||
HjwgpAEYJgsWPACqgyCQyIEHaJ5GDyWgNLIv0VRjjwdMRfQNJQCIvyUFPaAxvQAA
|
||||
AABJRU5ErkJggg==" style="fill:black; stroke:black; font-weight:normal;" height="16" preserveAspectRatio="none" />
|
||||
<text x="924" y="195" style="fill:black; stroke:none; font-weight:normal;" xml:space="preserve"> codegen(in ClassFile, in CodeAttribute, in Expr, in boolean, in Menge): void</text>
|
||||
<rect x="905" y="200" width="522" style="stroke:none; font-weight:normal;" height="16" />
|
||||
<image x="905" y="200" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAYUlEQVR42mP8//8/
|
||||
AymAiYFEMAg1sGAKOTQ4wNkHGg4Q0ABUneCggOAmOBxYcACnk9BUg0QcFIBCgyeU
|
||||
HjwgpAEYJgsWPACqgyCQyIEHaJ5GDyWgNLIv0VRjjwdMRfQNJQCIvyUFPaAxvQAA
|
||||
AABJRU5ErkJggg==" style="fill:black; stroke:black; font-weight:normal;" height="16" preserveAspectRatio="none" />
|
||||
<text x="924" y="213" style="fill:black; stroke:none; font-weight:normal;" xml:space="preserve"> if_codegen(in ClassFile, in CodeAttribute, in boolean, in Expr, in Statement, in Statement, in Menge): void</text>
|
||||
<rect x="905" y="218" width="522" style="stroke:none; font-weight:normal;" height="16" />
|
||||
<image x="905" y="218" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAYUlEQVR42mP8//8/
|
||||
AymAiYFEMAg1sGAKOTQ4wNkHGg4Q0ABUneCggOAmOBxYcACnk9BUg0QcFIBCgyeU
|
||||
HjwgpAEYJgsWPACqgyCQyIEHaJ5GDyWgNLIv0VRjjwdMRfQNJQCIvyUFPaAxvQAA
|
||||
AABJRU5ErkJggg==" style="fill:black; stroke:black; font-weight:normal;" height="16" preserveAspectRatio="none" />
|
||||
<text x="924" y="231" style="fill:black; stroke:none; font-weight:normal;" xml:space="preserve"> loop_codegen(in ClassFile, in CodeAttribute, in Expr, in int, in boolean, in Menge): void</text>
|
||||
<rect x="905" y="236" width="522" style="stroke:none; font-weight:normal;" height="16" />
|
||||
<image x="905" y="236" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAjUlEQVR42rWR2w2A
|
||||
IAxFrXEQN5FNZJPiJozSUdikXiEhRNDGD5sSoJybPiBVnd6N6Mg7Y6nOk2WgWRVe
|
||||
ZLagGudaFptDEqJaki0AxKU2Ih5mcMHVswS5uGYwS097tz6WdBP0dIhe9k2i1MiH
|
||||
Kf0gSMkSYCYxJnDFr4iktoHBlPCMxtvrDRj8Qw/91vTQThWRPIE1rC5kAAAAAElF
|
||||
TkSuQmCC" style="fill:black; stroke:black; font-weight:normal;" height="16" preserveAspectRatio="none" />
|
||||
<text x="924" y="249" style="fill:black; stroke:none; font-weight:normal;" xml:space="preserve"> replace_index(in CodeAttribute, in Menge, in int, in int): void</text>
|
||||
<rect x="905" y="254" width="522" style="stroke:none; font-weight:normal;" height="16" />
|
||||
<image x="905" y="254" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAjUlEQVR42rWR2w2A
|
||||
IAxFrXEQN5FNZJPiJozSUdikXiEhRNDGD5sSoJybPiBVnd6N6Mg7Y6nOk2WgWRVe
|
||||
ZLagGudaFptDEqJaki0AxKU2Ih5mcMHVswS5uGYwS097tz6WdBP0dIhe9k2i1MiH
|
||||
Kf0gSMkSYCYxJnDFr4iktoHBlPCMxtvrDRj8Qw/91vTQThWRPIE1rC5kAAAAAElF
|
||||
TkSuQmCC" style="fill:black; stroke:black; font-weight:normal;" height="16" preserveAspectRatio="none" />
|
||||
<text x="924" y="267" style="fill:black; stroke:none; font-weight:normal;" xml:space="preserve"> build(in ClassFile, in CodeAttribute, in Expr, in Menge, in boolean, in boolean, in boolean, in Menge): void</text>
|
||||
<image x="1135" y="146" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAABBElEQVR42q1SYZnD
|
||||
IAylWwVUQiTgYJFQCZmDOVjOwSREwiREQqdgSMBBFwajcLu7/bl8+fpR8l7egzCs
|
||||
6+peISqi6pogREIavob1XGC7WkOmhIbQZkYf7gf7dgRDF9BPobLJjtnJpgPAWH5Z
|
||||
6Z28Z+aTXHLvjNagdKUQHSNnP3IViHC8HW1nbNkI9GycDGgwHWr95GPs3J9h7b+t
|
||||
PxDa4+Z1Z8lsICAjmqtsDwVTIUCqspRDOxeXJbophmip5E/kCcHbLdlOIiyR5tmD
|
||||
Lwo2nTpgDaF0rWHtIWG6wSU5KzylO6i6amabw+vZzMWbpU3FcprMyYW4bTL2T42q
|
||||
9G/x4Vr/gfAAzgaEraDyPpwAAAAASUVORK5CYII=" style="fill:black; stroke:black;" height="16" preserveAspectRatio="none" />
|
||||
<text x="1154" y="158" style="fill:black; stroke:none;" xml:space="preserve">LogOp</text>
|
||||
<rect x="981" y="3" width="400" style="fill:rgb(191,191,191); stroke:none;" height="64" />
|
||||
<rect x="980" y="2" width="400" style="fill:rgb(127,127,127); stroke:none;" height="64" />
|
||||
<rect x="979" y="1" width="400" style="fill:rgb(63,63,63); stroke:none;" height="64" />
|
||||
<rect x="978" y="0" width="400" style="stroke:none;" height="64" />
|
||||
<rect x="978" y="0" width="399" style="fill:none; stroke:black;" height="63" />
|
||||
<line x1="978" x2="1377" y1="26" style="fill:none; stroke:black;" y2="26" />
|
||||
<line x1="978" x2="1377" y1="36" style="fill:none; stroke:black;" y2="36" />
|
||||
<rect x="988" y="41" width="380" style="stroke:none; font-weight:normal;" height="16" />
|
||||
<image x="988" y="41" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAiklEQVR42rVRgQ2A
|
||||
IAwDwiF+4k7hE/WTnbJP3CdYoyEoqJjoQsiAdrSbjTGap7CTjcMOcy3ofu6xtxIQ
|
||||
wpLyJkIerkUPBUqqfAmikXYlo+R66gSgA3XpiMKn3OZtPaEDcfm/vzHAElSNiP7W
|
||||
JZR/IKAtzArcttabo56KBzzDeHXGl6ZL0ItJf0BYALD3PkMWvNRAAAAAAElFTkSu
|
||||
QmCC" style="fill:black; stroke:black; font-weight:normal;" height="16" preserveAspectRatio="none" />
|
||||
<text x="1007" y="54" style="fill:black; stroke:none; font-weight:normal;" xml:space="preserve"> codegen(in ClassFile, in CodeAttribute, in Expr, in boolean, in Menge): void</text>
|
||||
<image x="1140" y="5" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAABBElEQVR42q1SYZnD
|
||||
IAylWwVUQiTgYJFQCZmDOVjOwSREwiREQqdgSMBBFwajcLu7/bl8+fpR8l7egzCs
|
||||
6+peISqi6pogREIavob1XGC7WkOmhIbQZkYf7gf7dgRDF9BPobLJjtnJpgPAWH5Z
|
||||
6Z28Z+aTXHLvjNagdKUQHSNnP3IViHC8HW1nbNkI9GycDGgwHWr95GPs3J9h7b+t
|
||||
PxDa4+Z1Z8lsICAjmqtsDwVTIUCqspRDOxeXJbophmip5E/kCcHbLdlOIiyR5tmD
|
||||
Lwo2nTpgDaF0rWHtIWG6wSU5KzylO6i6amabw+vZzMWbpU3FcprMyYW4bTL2T42q
|
||||
9G/x4Vr/gfAAzgaEraDyPpwAAAAASUVORK5CYII=" style="fill:black; stroke:black;" height="16" preserveAspectRatio="none" />
|
||||
<text x="1159" y="17" style="fill:black; stroke:none;" xml:space="preserve">Operator</text>
|
||||
<rect x="1749" y="514" width="400" style="fill:rgb(191,191,191); stroke:none;" height="82" />
|
||||
<rect x="1748" y="513" width="400" style="fill:rgb(127,127,127); stroke:none;" height="82" />
|
||||
<rect x="1747" y="512" width="400" style="fill:rgb(63,63,63); stroke:none;" height="82" />
|
||||
<rect x="1746" y="511" width="400" style="stroke:none;" height="82" />
|
||||
<rect x="1746" y="511" width="399" style="fill:none; stroke:black;" height="81" />
|
||||
<line x1="1746" x2="2145" y1="537" style="fill:none; stroke:black;" y2="537" />
|
||||
<line x1="1746" x2="2145" y1="547" style="fill:none; stroke:black;" y2="547" />
|
||||
<rect x="1756" y="552" width="380" style="stroke:none; font-weight:normal;" height="16" />
|
||||
<image x="1756" y="552" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAYUlEQVR42mP8//8/
|
||||
AymAiYFEMAg1sGAKOTQ4wNkHGg4Q0ABUneCggOAmOBxYcACnk9BUg0QcFIBCgyeU
|
||||
HjwgpAEYJgsWPACqgyCQyIEHaJ5GDyWgNLIv0VRjjwdMRfQNJQCIvyUFPaAxvQAA
|
||||
AABJRU5ErkJggg==" style="fill:black; stroke:black; font-weight:normal;" height="16" preserveAspectRatio="none" />
|
||||
<text x="1775" y="565" style="fill:black; stroke:none; font-weight:normal;" xml:space="preserve"> codegen(in ClassFile, in CodeAttribute, in Expr, in boolean, in Menge): void</text>
|
||||
<rect x="1756" y="570" width="380" style="stroke:none; font-weight:normal;" height="16" />
|
||||
<image x="1756" y="570" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAYUlEQVR42mP8//8/
|
||||
AymAiYFEMAg1sGAKOTQ4wNkHGg4Q0ABUneCggOAmOBxYcACnk9BUg0QcFIBCgyeU
|
||||
HjwgpAEYJgsWPACqgyCQyIEHaJ5GDyWgNLIv0VRjjwdMRfQNJQCIvyUFPaAxvQAA
|
||||
AABJRU5ErkJggg==" style="fill:black; stroke:black; font-weight:normal;" height="16" preserveAspectRatio="none" />
|
||||
<text x="1775" y="583" style="fill:black; stroke:none; font-weight:normal;" xml:space="preserve"> if_codegen(in ClassFile, in CodeAttribute, in String, in boolean): void</text>
|
||||
<image x="1901" y="516" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAA7ElEQVR42q2SXXUE
|
||||
IQyF09kVMBIiAQmRMBIioRIioRKQEgkjAQk4mF42wMzu6UN7ujl5APL3ceHjOA4a
|
||||
lj1nd7qYiqjo9eQ+V2KPAJdrGPVwtzxPljMbqc/ZvZ5L7zUngOScw2zSt+bqpUza
|
||||
YFtibvSObC8uWczzrER03u1+nS+sj8Yt5iVLPifTGLXQH+1/BcBoSCKBhzsPHibm
|
||||
WN7MjKjue6W1lgp3TZ+aVDhBJZy0rL3qtiVO/dLQa4oAHSHRE0RrT/O9O1J7SwQK
|
||||
v6b6iA4LpPg2W2eDQ0P4uoLkS+3nvxRsL1/t3bL+xr4BXAV0uUgPznkAAAAASUVO
|
||||
RK5CYII=" style="fill:black; stroke:black;" height="16" preserveAspectRatio="none" />
|
||||
<text x="1920" y="528" style="fill:black; stroke:none;" xml:space="preserve">LessEquOp</text>
|
||||
<path d="M588 128 L588 108 L1179 108 L1179 67" style="fill:none; stroke:black;" />
|
||||
<polygon style="stroke:none;" points=" 1179 67 1185 91 1173 91" />
|
||||
<polygon style="fill:none; stroke:black;" points=" 1179 67 1185 91 1173 91" />
|
||||
<path d="M2220 184 L2220 108 L1179 108" style="fill:none; stroke:black;" />
|
||||
<path d="M1167 141 L1167 108 L1179 108" style="fill:none; stroke:black;" />
|
||||
<path d="M3121 179 L3121 108 L1179 108" style="fill:none; stroke:black;" />
|
||||
<path d="M201 503 L201 483 L588 483 L588 195" style="fill:none; stroke:black;" />
|
||||
<polygon style="stroke:none;" points=" 588 195 594 219 582 219" />
|
||||
<polygon style="fill:none; stroke:black;" points=" 588 195 594 219 582 219" />
|
||||
<path d="M640 504 L640 483 L588 483" style="fill:none; stroke:black;" />
|
||||
<path d="M1070 505 L1070 483 L588 483" style="fill:none; stroke:black;" />
|
||||
<path d="M1501 509 L1501 483 L588 483" style="fill:none; stroke:black;" />
|
||||
<path d="M1947 511 L1947 483 L588 483" style="fill:none; stroke:black;" />
|
||||
<path d="M2383 512 L2383 483 L588 483" style="fill:none; stroke:black;" />
|
||||
<path d="M3350 452 L3350 438 L3121 438" style="fill:none; stroke:black;" />
|
||||
<path d="M1358 375 L1358 347 L1167 347" style="fill:none; stroke:black;" />
|
||||
<path d="M961 367 L961 347 L1167 347 L1167 280" style="fill:none; stroke:black;" />
|
||||
<polygon style="stroke:none;" points=" 1167 280 1173 304 1161 304" />
|
||||
<polygon style="fill:none; stroke:black;" points=" 1167 280 1173 304 1161 304" />
|
||||
<path d="M2225 322 L2225 302 L2220 302" style="fill:none; stroke:black;" />
|
||||
<path d="M2871 458 L2871 438 L3121 438 L3121 246" style="fill:none; stroke:black;" />
|
||||
<polygon style="stroke:none;" points=" 3121 246 3127 270 3115 270" />
|
||||
<polygon style="fill:none; stroke:black;" points=" 3121 246 3127 270 3115 270" />
|
||||
<path d="M2658 322 L2658 302 L2220 302" style="fill:none; stroke:black;" />
|
||||
<path d="M1792 322 L1792 302 L2220 302 L2220 213" style="fill:none; stroke:black;" />
|
||||
<polygon style="stroke:none;" points=" 2220 213 2226 237 2214 237" />
|
||||
<polygon style="fill:none; stroke:black;" points=" 2220 213 2226 237 2214 237" />
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 1.0//EN' 'http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd'>
|
||||
<svg xmlns:xlink="http://www.w3.org/1999/xlink" style="fill-opacity:1; color-rendering:auto; color-interpolation:auto; text-rendering:auto; stroke:black; stroke-linecap:square; stroke-miterlimit:10; shape-rendering:auto; stroke-opacity:1; fill:black; stroke-dasharray:none; font-weight:normal; stroke-width:1; font-family:'sansserif'; font-style:normal; stroke-linejoin:miter; font-size:12; stroke-dashoffset:0; image-rendering:auto;" xmlns="http://www.w3.org/2000/svg">
|
||||
<!--Generated by the Batik Graphics2D SVG Generator-->
|
||||
<defs id="genericDefs" />
|
||||
<g>
|
||||
<g style="fill:white; font-family:'Arial'; font-weight:bold; stroke:white;">
|
||||
<rect x="-45" y="-50" width="3602" style="stroke:none;" height="652" />
|
||||
<rect x="406" y="131" width="368" style="fill:rgb(191,191,191); stroke:none;" height="64" />
|
||||
<rect x="405" y="130" width="368" style="fill:rgb(127,127,127); stroke:none;" height="64" />
|
||||
<rect x="404" y="129" width="368" style="fill:rgb(63,63,63); stroke:none;" height="64" />
|
||||
<rect x="403" y="128" width="368" style="stroke:none;" height="64" />
|
||||
<rect x="403" y="128" width="367" style="fill:none; stroke:black;" height="63" />
|
||||
<line x1="403" x2="770" y1="154" style="fill:none; stroke:black;" y2="154" />
|
||||
<line x1="403" x2="770" y1="164" style="fill:none; stroke:black;" y2="164" />
|
||||
<rect x="413" y="169" width="348" style="stroke:none; font-weight:normal;" height="16" />
|
||||
<image x="413" y="169" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAiklEQVR42rVRgQ2A
|
||||
IAwDwiF+4k7hE/WTnbJP3CdYoyEoqJjoQsiAdrSbjTGap7CTjcMOcy3ofu6xtxIQ
|
||||
wpLyJkIerkUPBUqqfAmikXYlo+R66gSgA3XpiMKn3OZtPaEDcfm/vzHAElSNiP7W
|
||||
JZR/IKAtzArcttabo56KBzzDeHXGl6ZL0ItJf0BYALD3PkMWvNRAAAAAAElFTkSu
|
||||
QmCC" style="fill:black; stroke:black; font-weight:normal;" height="16" preserveAspectRatio="none" />
|
||||
<text x="432" y="182" style="fill:black; stroke:none; font-weight:normal;" xml:space="preserve"> if_codegen(in ClassFile, in CodeAttribute, in String, in boolean): void</text>
|
||||
<image x="557" y="133" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAABBElEQVR42q1SYZnD
|
||||
IAylWwVUQiTgYJFQCZmDOVjOwSREwiREQqdgSMBBFwajcLu7/bl8+fpR8l7egzCs
|
||||
6+peISqi6pogREIavob1XGC7WkOmhIbQZkYf7gf7dgRDF9BPobLJjtnJpgPAWH5Z
|
||||
6Z28Z+aTXHLvjNagdKUQHSNnP3IViHC8HW1nbNkI9GycDGgwHWr95GPs3J9h7b+t
|
||||
PxDa4+Z1Z8lsICAjmqtsDwVTIUCqspRDOxeXJbophmip5E/kCcHbLdlOIiyR5tmD
|
||||
Lwo2nTpgDaF0rWHtIWG6wSU5KzylO6i6amabw+vZzMWbpU3FcprMyYW4bTL2T42q
|
||||
9G/x4Vr/gfAAzgaEraDyPpwAAAAASUVORK5CYII=" style="fill:black; stroke:black;" height="16" preserveAspectRatio="none" />
|
||||
<text x="576" y="145" style="fill:black; stroke:none;" xml:space="preserve">RelOp</text>
|
||||
<rect x="872" y="508" width="400" style="fill:rgb(191,191,191); stroke:none;" height="82" />
|
||||
<rect x="871" y="507" width="400" style="fill:rgb(127,127,127); stroke:none;" height="82" />
|
||||
<rect x="870" y="506" width="400" style="fill:rgb(63,63,63); stroke:none;" height="82" />
|
||||
<rect x="869" y="505" width="400" style="stroke:none;" height="82" />
|
||||
<rect x="869" y="505" width="399" style="fill:none; stroke:black;" height="81" />
|
||||
<line x1="869" x2="1268" y1="531" style="fill:none; stroke:black;" y2="531" />
|
||||
<line x1="869" x2="1268" y1="541" style="fill:none; stroke:black;" y2="541" />
|
||||
<rect x="879" y="546" width="380" style="stroke:none; font-weight:normal;" height="16" />
|
||||
<image x="879" y="546" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAYUlEQVR42mP8//8/
|
||||
AymAiYFEMAg1sGAKOTQ4wNkHGg4Q0ABUneCggOAmOBxYcACnk9BUg0QcFIBCgyeU
|
||||
HjwgpAEYJgsWPACqgyCQyIEHaJ5GDyWgNLIv0VRjjwdMRfQNJQCIvyUFPaAxvQAA
|
||||
AABJRU5ErkJggg==" style="fill:black; stroke:black; font-weight:normal;" height="16" preserveAspectRatio="none" />
|
||||
<text x="898" y="559" style="fill:black; stroke:none; font-weight:normal;" xml:space="preserve"> codegen(in ClassFile, in CodeAttribute, in Expr, in boolean, in Menge): void</text>
|
||||
<rect x="879" y="564" width="380" style="stroke:none; font-weight:normal;" height="16" />
|
||||
<image x="879" y="564" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAYUlEQVR42mP8//8/
|
||||
AymAiYFEMAg1sGAKOTQ4wNkHGg4Q0ABUneCggOAmOBxYcACnk9BUg0QcFIBCgyeU
|
||||
HjwgpAEYJgsWPACqgyCQyIEHaJ5GDyWgNLIv0VRjjwdMRfQNJQCIvyUFPaAxvQAA
|
||||
AABJRU5ErkJggg==" style="fill:black; stroke:black; font-weight:normal;" height="16" preserveAspectRatio="none" />
|
||||
<text x="898" y="577" style="fill:black; stroke:none; font-weight:normal;" xml:space="preserve"> if_codegen(in ClassFile, in CodeAttribute, in String, in boolean): void</text>
|
||||
<image x="1032" y="510" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAA7ElEQVR42q2SXXUE
|
||||
IQyF09kVMBIiAQmRMBIioRIioRKQEgkjAQk4mF42wMzu6UN7ujl5APL3ceHjOA4a
|
||||
lj1nd7qYiqjo9eQ+V2KPAJdrGPVwtzxPljMbqc/ZvZ5L7zUngOScw2zSt+bqpUza
|
||||
YFtibvSObC8uWczzrER03u1+nS+sj8Yt5iVLPifTGLXQH+1/BcBoSCKBhzsPHibm
|
||||
WN7MjKjue6W1lgp3TZ+aVDhBJZy0rL3qtiVO/dLQa4oAHSHRE0RrT/O9O1J7SwQK
|
||||
v6b6iA4LpPg2W2eDQ0P4uoLkS+3nvxRsL1/t3bL+xr4BXAV0uUgPznkAAAAASUVO
|
||||
RK5CYII=" style="fill:black; stroke:black;" height="16" preserveAspectRatio="none" />
|
||||
<text x="1051" y="522" style="fill:black; stroke:none;" xml:space="preserve">EqualOp</text>
|
||||
<rect x="442" y="507" width="400" style="fill:rgb(191,191,191); stroke:none;" height="82" />
|
||||
<rect x="441" y="506" width="400" style="fill:rgb(127,127,127); stroke:none;" height="82" />
|
||||
<rect x="440" y="505" width="400" style="fill:rgb(63,63,63); stroke:none;" height="82" />
|
||||
<rect x="439" y="504" width="400" style="stroke:none;" height="82" />
|
||||
<rect x="439" y="504" width="399" style="fill:none; stroke:black;" height="81" />
|
||||
<line x1="439" x2="838" y1="530" style="fill:none; stroke:black;" y2="530" />
|
||||
<line x1="439" x2="838" y1="540" style="fill:none; stroke:black;" y2="540" />
|
||||
<rect x="449" y="545" width="380" style="stroke:none; font-weight:normal;" height="16" />
|
||||
<image x="449" y="545" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAYUlEQVR42mP8//8/
|
||||
AymAiYFEMAg1sGAKOTQ4wNkHGg4Q0ABUneCggOAmOBxYcACnk9BUg0QcFIBCgyeU
|
||||
HjwgpAEYJgsWPACqgyCQyIEHaJ5GDyWgNLIv0VRjjwdMRfQNJQCIvyUFPaAxvQAA
|
||||
AABJRU5ErkJggg==" style="fill:black; stroke:black; font-weight:normal;" height="16" preserveAspectRatio="none" />
|
||||
<text x="468" y="558" style="fill:black; stroke:none; font-weight:normal;" xml:space="preserve"> codegen(in ClassFile, in CodeAttribute, in Expr, in boolean, in Menge): void</text>
|
||||
<rect x="449" y="563" width="380" style="stroke:none; font-weight:normal;" height="16" />
|
||||
<image x="449" y="563" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAYUlEQVR42mP8//8/
|
||||
AymAiYFEMAg1sGAKOTQ4wNkHGg4Q0ABUneCggOAmOBxYcACnk9BUg0QcFIBCgyeU
|
||||
HjwgpAEYJgsWPACqgyCQyIEHaJ5GDyWgNLIv0VRjjwdMRfQNJQCIvyUFPaAxvQAA
|
||||
AABJRU5ErkJggg==" style="fill:black; stroke:black; font-weight:normal;" height="16" preserveAspectRatio="none" />
|
||||
<text x="468" y="576" style="fill:black; stroke:none; font-weight:normal;" xml:space="preserve"> if_codegen(in ClassFile, in CodeAttribute, in String, in boolean): void</text>
|
||||
<image x="606" y="509" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAA7ElEQVR42q2SXXUE
|
||||
IQyF09kVMBIiAQmRMBIioRIioRKQEgkjAQk4mF42wMzu6UN7ujl5APL3ceHjOA4a
|
||||
lj1nd7qYiqjo9eQ+V2KPAJdrGPVwtzxPljMbqc/ZvZ5L7zUngOScw2zSt+bqpUza
|
||||
YFtibvSObC8uWczzrER03u1+nS+sj8Yt5iVLPifTGLXQH+1/BcBoSCKBhzsPHibm
|
||||
WN7MjKjue6W1lgp3TZ+aVDhBJZy0rL3qtiVO/dLQa4oAHSHRE0RrT/O9O1J7SwQK
|
||||
v6b6iA4LpPg2W2eDQ0P4uoLkS+3nvxRsL1/t3bL+xr4BXAV0uUgPznkAAAAASUVO
|
||||
RK5CYII=" style="fill:black; stroke:black;" height="16" preserveAspectRatio="none" />
|
||||
<text x="625" y="521" style="fill:black; stroke:none;" xml:space="preserve">LessOp</text>
|
||||
<rect x="1303" y="512" width="400" style="fill:rgb(191,191,191); stroke:none;" height="82" />
|
||||
<rect x="1302" y="511" width="400" style="fill:rgb(127,127,127); stroke:none;" height="82" />
|
||||
<rect x="1301" y="510" width="400" style="fill:rgb(63,63,63); stroke:none;" height="82" />
|
||||
<rect x="1300" y="509" width="400" style="stroke:none;" height="82" />
|
||||
<rect x="1300" y="509" width="399" style="fill:none; stroke:black;" height="81" />
|
||||
<line x1="1300" x2="1699" y1="535" style="fill:none; stroke:black;" y2="535" />
|
||||
<line x1="1300" x2="1699" y1="545" style="fill:none; stroke:black;" y2="545" />
|
||||
<rect x="1310" y="550" width="380" style="stroke:none; font-weight:normal;" height="16" />
|
||||
<image x="1310" y="550" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAYUlEQVR42mP8//8/
|
||||
AymAiYFEMAg1sGAKOTQ4wNkHGg4Q0ABUneCggOAmOBxYcACnk9BUg0QcFIBCgyeU
|
||||
HjwgpAEYJgsWPACqgyCQyIEHaJ5GDyWgNLIv0VRjjwdMRfQNJQCIvyUFPaAxvQAA
|
||||
AABJRU5ErkJggg==" style="fill:black; stroke:black; font-weight:normal;" height="16" preserveAspectRatio="none" />
|
||||
<text x="1329" y="563" style="fill:black; stroke:none; font-weight:normal;" xml:space="preserve"> codegen(in ClassFile, in CodeAttribute, in Expr, in boolean, in Menge): void</text>
|
||||
<rect x="1310" y="568" width="380" style="stroke:none; font-weight:normal;" height="16" />
|
||||
<image x="1310" y="568" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAYUlEQVR42mP8//8/
|
||||
AymAiYFEMAg1sGAKOTQ4wNkHGg4Q0ABUneCggOAmOBxYcACnk9BUg0QcFIBCgyeU
|
||||
HjwgpAEYJgsWPACqgyCQyIEHaJ5GDyWgNLIv0VRjjwdMRfQNJQCIvyUFPaAxvQAA
|
||||
AABJRU5ErkJggg==" style="fill:black; stroke:black; font-weight:normal;" height="16" preserveAspectRatio="none" />
|
||||
<text x="1329" y="581" style="fill:black; stroke:none; font-weight:normal;" xml:space="preserve"> if_codegen(in ClassFile, in CodeAttribute, in String, in boolean): void</text>
|
||||
<image x="1452" y="514" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAA7ElEQVR42q2SXXUE
|
||||
IQyF09kVMBIiAQmRMBIioRIioRKQEgkjAQk4mF42wMzu6UN7ujl5APL3ceHjOA4a
|
||||
lj1nd7qYiqjo9eQ+V2KPAJdrGPVwtzxPljMbqc/ZvZ5L7zUngOScw2zSt+bqpUza
|
||||
YFtibvSObC8uWczzrER03u1+nS+sj8Yt5iVLPifTGLXQH+1/BcBoSCKBhzsPHibm
|
||||
WN7MjKjue6W1lgp3TZ+aVDhBJZy0rL3qtiVO/dLQa4oAHSHRE0RrT/O9O1J7SwQK
|
||||
v6b6iA4LpPg2W2eDQ0P4uoLkS+3nvxRsL1/t3bL+xr4BXAV0uUgPznkAAAAASUVO
|
||||
RK5CYII=" style="fill:black; stroke:black;" height="16" preserveAspectRatio="none" />
|
||||
<text x="1471" y="526" style="fill:black; stroke:none;" xml:space="preserve">NotEqualOp</text>
|
||||
<rect x="3152" y="455" width="400" style="fill:rgb(191,191,191); stroke:none;" height="64" />
|
||||
<rect x="3151" y="454" width="400" style="fill:rgb(127,127,127); stroke:none;" height="64" />
|
||||
<rect x="3150" y="453" width="400" style="fill:rgb(63,63,63); stroke:none;" height="64" />
|
||||
<rect x="3149" y="452" width="400" style="stroke:none;" height="64" />
|
||||
<rect x="3149" y="452" width="399" style="fill:none; stroke:black;" height="63" />
|
||||
<line x1="3149" x2="3548" y1="478" style="fill:none; stroke:black;" y2="478" />
|
||||
<line x1="3149" x2="3548" y1="488" style="fill:none; stroke:black;" y2="488" />
|
||||
<rect x="3159" y="493" width="380" style="stroke:none; font-weight:normal;" height="16" />
|
||||
<image x="3159" y="493" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAYUlEQVR42mP8//8/
|
||||
AymAiYFEMAg1sGAKOTQ4wNkHGg4Q0ABUneCggOAmOBxYcACnk9BUg0QcFIBCgyeU
|
||||
HjwgpAEYJgsWPACqgyCQyIEHaJ5GDyWgNLIv0VRjjwdMRfQNJQCIvyUFPaAxvQAA
|
||||
AABJRU5ErkJggg==" style="fill:black; stroke:black; font-weight:normal;" height="16" preserveAspectRatio="none" />
|
||||
<text x="3178" y="506" style="fill:black; stroke:none; font-weight:normal;" xml:space="preserve"> codegen(in ClassFile, in CodeAttribute, in Expr, in boolean, in Menge): void</text>
|
||||
<image x="3311" y="457" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAA7ElEQVR42q2SXXUE
|
||||
IQyF09kVMBIiAQmRMBIioRIioRKQEgkjAQk4mF42wMzu6UN7ujl5APL3ceHjOA4a
|
||||
lj1nd7qYiqjo9eQ+V2KPAJdrGPVwtzxPljMbqc/ZvZ5L7zUngOScw2zSt+bqpUza
|
||||
YFtibvSObC8uWczzrER03u1+nS+sj8Yt5iVLPifTGLXQH+1/BcBoSCKBhzsPHibm
|
||||
WN7MjKjue6W1lgp3TZ+aVDhBJZy0rL3qtiVO/dLQa4oAHSHRE0RrT/O9O1J7SwQK
|
||||
v6b6iA4LpPg2W2eDQ0P4uoLkS+3nvxRsL1/t3bL+xr4BXAV0uUgPznkAAAAASUVO
|
||||
RK5CYII=" style="fill:black; stroke:black;" height="16" preserveAspectRatio="none" />
|
||||
<text x="3330" y="469" style="fill:black; stroke:none;" xml:space="preserve">MinusOp</text>
|
||||
<rect x="1323" y="378" width="73" style="fill:rgb(191,191,191); stroke:none;" height="26" />
|
||||
<rect x="1322" y="377" width="73" style="fill:rgb(127,127,127); stroke:none;" height="26" />
|
||||
<rect x="1321" y="376" width="73" style="fill:rgb(63,63,63); stroke:none;" height="26" />
|
||||
<rect x="1320" y="375" width="73" style="stroke:none;" height="26" />
|
||||
<rect x="1320" y="375" width="72" style="fill:none; stroke:black;" height="25" />
|
||||
<image x="1330" y="380" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAA7ElEQVR42q2SXXUE
|
||||
IQyF09kVMBIiAQmRMBIioRIioRKQEgkjAQk4mF42wMzu6UN7ujl5APL3ceHjOA4a
|
||||
lj1nd7qYiqjo9eQ+V2KPAJdrGPVwtzxPljMbqc/ZvZ5L7zUngOScw2zSt+bqpUza
|
||||
YFtibvSObC8uWczzrER03u1+nS+sj8Yt5iVLPifTGLXQH+1/BcBoSCKBhzsPHibm
|
||||
WN7MjKjue6W1lgp3TZ+aVDhBJZy0rL3qtiVO/dLQa4oAHSHRE0RrT/O9O1J7SwQK
|
||||
v6b6iA4LpPg2W2eDQ0P4uoLkS+3nvxRsL1/t3bL+xr4BXAV0uUgPznkAAAAASUVO
|
||||
RK5CYII=" style="fill:black; stroke:black;" height="16" preserveAspectRatio="none" />
|
||||
<text x="1349" y="392" style="fill:black; stroke:none;" xml:space="preserve">OrOp</text>
|
||||
<rect x="921" y="370" width="83" style="fill:rgb(191,191,191); stroke:none;" height="26" />
|
||||
<rect x="920" y="369" width="83" style="fill:rgb(127,127,127); stroke:none;" height="26" />
|
||||
<rect x="919" y="368" width="83" style="fill:rgb(63,63,63); stroke:none;" height="26" />
|
||||
<rect x="918" y="367" width="83" style="stroke:none;" height="26" />
|
||||
<rect x="918" y="367" width="82" style="fill:none; stroke:black;" height="25" />
|
||||
<image x="928" y="372" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAA7ElEQVR42q2SXXUE
|
||||
IQyF09kVMBIiAQmRMBIioRIioRKQEgkjAQk4mF42wMzu6UN7ujl5APL3ceHjOA4a
|
||||
lj1nd7qYiqjo9eQ+V2KPAJdrGPVwtzxPljMbqc/ZvZ5L7zUngOScw2zSt+bqpUza
|
||||
YFtibvSObC8uWczzrER03u1+nS+sj8Yt5iVLPifTGLXQH+1/BcBoSCKBhzsPHibm
|
||||
WN7MjKjue6W1lgp3TZ+aVDhBJZy0rL3qtiVO/dLQa4oAHSHRE0RrT/O9O1J7SwQK
|
||||
v6b6iA4LpPg2W2eDQ0P4uoLkS+3nvxRsL1/t3bL+xr4BXAV0uUgPznkAAAAASUVO
|
||||
RK5CYII=" style="fill:black; stroke:black;" height="16" preserveAspectRatio="none" />
|
||||
<text x="947" y="384" style="fill:black; stroke:none;" xml:space="preserve">AndOp</text>
|
||||
<rect x="2027" y="325" width="400" style="fill:rgb(191,191,191); stroke:none;" height="64" />
|
||||
<rect x="2026" y="324" width="400" style="fill:rgb(127,127,127); stroke:none;" height="64" />
|
||||
<rect x="2025" y="323" width="400" style="fill:rgb(63,63,63); stroke:none;" height="64" />
|
||||
<rect x="2024" y="322" width="400" style="stroke:none;" height="64" />
|
||||
<rect x="2024" y="322" width="399" style="fill:none; stroke:black;" height="63" />
|
||||
<line x1="2024" x2="2423" y1="348" style="fill:none; stroke:black;" y2="348" />
|
||||
<line x1="2024" x2="2423" y1="358" style="fill:none; stroke:black;" y2="358" />
|
||||
<rect x="2034" y="363" width="380" style="stroke:none; font-weight:normal;" height="16" />
|
||||
<image x="2034" y="363" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAYUlEQVR42mP8//8/
|
||||
AymAiYFEMAg1sGAKOTQ4wNkHGg4Q0ABUneCggOAmOBxYcACnk9BUg0QcFIBCgyeU
|
||||
HjwgpAEYJgsWPACqgyCQyIEHaJ5GDyWgNLIv0VRjjwdMRfQNJQCIvyUFPaAxvQAA
|
||||
AABJRU5ErkJggg==" style="fill:black; stroke:black; font-weight:normal;" height="16" preserveAspectRatio="none" />
|
||||
<text x="2053" y="376" style="fill:black; stroke:none; font-weight:normal;" xml:space="preserve"> codegen(in ClassFile, in CodeAttribute, in Expr, in boolean, in Menge): void</text>
|
||||
<image x="2186" y="327" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAA7ElEQVR42q2SXXUE
|
||||
IQyF09kVMBIiAQmRMBIioRIioRKQEgkjAQk4mF42wMzu6UN7ujl5APL3ceHjOA4a
|
||||
lj1nd7qYiqjo9eQ+V2KPAJdrGPVwtzxPljMbqc/ZvZ5L7zUngOScw2zSt+bqpUza
|
||||
YFtibvSObC8uWczzrER03u1+nS+sj8Yt5iVLPifTGLXQH+1/BcBoSCKBhzsPHibm
|
||||
WN7MjKjue6W1lgp3TZ+aVDhBJZy0rL3qtiVO/dLQa4oAHSHRE0RrT/O9O1J7SwQK
|
||||
v6b6iA4LpPg2W2eDQ0P4uoLkS+3nvxRsL1/t3bL+xr4BXAV0uUgPznkAAAAASUVO
|
||||
RK5CYII=" style="fill:black; stroke:black;" height="16" preserveAspectRatio="none" />
|
||||
<text x="2205" y="339" style="fill:black; stroke:none;" xml:space="preserve">TimesOp</text>
|
||||
<rect x="2185" y="515" width="400" style="fill:rgb(191,191,191); stroke:none;" height="82" />
|
||||
<rect x="2184" y="514" width="400" style="fill:rgb(127,127,127); stroke:none;" height="82" />
|
||||
<rect x="2183" y="513" width="400" style="fill:rgb(63,63,63); stroke:none;" height="82" />
|
||||
<rect x="2182" y="512" width="400" style="stroke:none;" height="82" />
|
||||
<rect x="2182" y="512" width="399" style="fill:none; stroke:black;" height="81" />
|
||||
<line x1="2182" x2="2581" y1="538" style="fill:none; stroke:black;" y2="538" />
|
||||
<line x1="2182" x2="2581" y1="548" style="fill:none; stroke:black;" y2="548" />
|
||||
<rect x="2192" y="553" width="380" style="stroke:none; font-weight:normal;" height="16" />
|
||||
<image x="2192" y="553" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAYUlEQVR42mP8//8/
|
||||
AymAiYFEMAg1sGAKOTQ4wNkHGg4Q0ABUneCggOAmOBxYcACnk9BUg0QcFIBCgyeU
|
||||
HjwgpAEYJgsWPACqgyCQyIEHaJ5GDyWgNLIv0VRjjwdMRfQNJQCIvyUFPaAxvQAA
|
||||
AABJRU5ErkJggg==" style="fill:black; stroke:black; font-weight:normal;" height="16" preserveAspectRatio="none" />
|
||||
<text x="2211" y="566" style="fill:black; stroke:none; font-weight:normal;" xml:space="preserve"> codegen(in ClassFile, in CodeAttribute, in Expr, in boolean, in Menge): void</text>
|
||||
<rect x="2192" y="571" width="380" style="stroke:none; font-weight:normal;" height="16" />
|
||||
<image x="2192" y="571" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAYUlEQVR42mP8//8/
|
||||
AymAiYFEMAg1sGAKOTQ4wNkHGg4Q0ABUneCggOAmOBxYcACnk9BUg0QcFIBCgyeU
|
||||
HjwgpAEYJgsWPACqgyCQyIEHaJ5GDyWgNLIv0VRjjwdMRfQNJQCIvyUFPaAxvQAA
|
||||
AABJRU5ErkJggg==" style="fill:black; stroke:black; font-weight:normal;" height="16" preserveAspectRatio="none" />
|
||||
<text x="2211" y="584" style="fill:black; stroke:none; font-weight:normal;" xml:space="preserve"> if_codegen(in ClassFile, in CodeAttribute, in String, in boolean): void</text>
|
||||
<image x="2327" y="517" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAA7ElEQVR42q2SXXUE
|
||||
IQyF09kVMBIiAQmRMBIioRIioRKQEgkjAQk4mF42wMzu6UN7ujl5APL3ceHjOA4a
|
||||
lj1nd7qYiqjo9eQ+V2KPAJdrGPVwtzxPljMbqc/ZvZ5L7zUngOScw2zSt+bqpUza
|
||||
YFtibvSObC8uWczzrER03u1+nS+sj8Yt5iVLPifTGLXQH+1/BcBoSCKBhzsPHibm
|
||||
WN7MjKjue6W1lgp3TZ+aVDhBJZy0rL3qtiVO/dLQa4oAHSHRE0RrT/O9O1J7SwQK
|
||||
v6b6iA4LpPg2W2eDQ0P4uoLkS+3nvxRsL1/t3bL+xr4BXAV0uUgPznkAAAAASUVO
|
||||
RK5CYII=" style="fill:black; stroke:black;" height="16" preserveAspectRatio="none" />
|
||||
<text x="2346" y="529" style="fill:black; stroke:none;" xml:space="preserve">GreaterEquOp</text>
|
||||
<rect x="2923" y="182" width="400" style="fill:rgb(191,191,191); stroke:none;" height="64" />
|
||||
<rect x="2922" y="181" width="400" style="fill:rgb(127,127,127); stroke:none;" height="64" />
|
||||
<rect x="2921" y="180" width="400" style="fill:rgb(63,63,63); stroke:none;" height="64" />
|
||||
<rect x="2920" y="179" width="400" style="stroke:none;" height="64" />
|
||||
<rect x="2920" y="179" width="399" style="fill:none; stroke:black;" height="63" />
|
||||
<line x1="2920" x2="3319" y1="205" style="fill:none; stroke:black;" y2="205" />
|
||||
<line x1="2920" x2="3319" y1="215" style="fill:none; stroke:black;" y2="215" />
|
||||
<rect x="2930" y="220" width="380" style="stroke:none; font-weight:normal;" height="16" />
|
||||
<image x="2930" y="220" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAiklEQVR42rVRgQ2A
|
||||
IAwDwiF+4k7hE/WTnbJP3CdYoyEoqJjoQsiAdrSbjTGap7CTjcMOcy3ofu6xtxIQ
|
||||
wpLyJkIerkUPBUqqfAmikXYlo+R66gSgA3XpiMKn3OZtPaEDcfm/vzHAElSNiP7W
|
||||
JZR/IKAtzArcttabo56KBzzDeHXGl6ZL0ItJf0BYALD3PkMWvNRAAAAAAElFTkSu
|
||||
QmCC" style="fill:black; stroke:black; font-weight:normal;" height="16" preserveAspectRatio="none" />
|
||||
<text x="2949" y="233" style="fill:black; stroke:none; font-weight:normal;" xml:space="preserve"> codegen(in ClassFile, in CodeAttribute, in Expr, in boolean, in Menge): void</text>
|
||||
<image x="3088" y="184" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAABBElEQVR42q1SYZnD
|
||||
IAylWwVUQiTgYJFQCZmDOVjOwSREwiREQqdgSMBBFwajcLu7/bl8+fpR8l7egzCs
|
||||
6+peISqi6pogREIavob1XGC7WkOmhIbQZkYf7gf7dgRDF9BPobLJjtnJpgPAWH5Z
|
||||
6Z28Z+aTXHLvjNagdKUQHSNnP3IViHC8HW1nbNkI9GycDGgwHWr95GPs3J9h7b+t
|
||||
PxDa4+Z1Z8lsICAjmqtsDwVTIUCqspRDOxeXJbophmip5E/kCcHbLdlOIiyR5tmD
|
||||
Lwo2nTpgDaF0rWHtIWG6wSU5KzylO6i6amabw+vZzMWbpU3FcprMyYW4bTL2T42q
|
||||
9G/x4Vr/gfAAzgaEraDyPpwAAAAASUVORK5CYII=" style="fill:black; stroke:black;" height="16" preserveAspectRatio="none" />
|
||||
<text x="3107" y="196" style="fill:black; stroke:none;" xml:space="preserve">AddOp</text>
|
||||
<rect x="2460" y="325" width="400" style="fill:rgb(191,191,191); stroke:none;" height="64" />
|
||||
<rect x="2459" y="324" width="400" style="fill:rgb(127,127,127); stroke:none;" height="64" />
|
||||
<rect x="2458" y="323" width="400" style="fill:rgb(63,63,63); stroke:none;" height="64" />
|
||||
<rect x="2457" y="322" width="400" style="stroke:none;" height="64" />
|
||||
<rect x="2457" y="322" width="399" style="fill:none; stroke:black;" height="63" />
|
||||
<line x1="2457" x2="2856" y1="348" style="fill:none; stroke:black;" y2="348" />
|
||||
<line x1="2457" x2="2856" y1="358" style="fill:none; stroke:black;" y2="358" />
|
||||
<rect x="2467" y="363" width="380" style="stroke:none; font-weight:normal;" height="16" />
|
||||
<image x="2467" y="363" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAYUlEQVR42mP8//8/
|
||||
AymAiYFEMAg1sGAKOTQ4wNkHGg4Q0ABUneCggOAmOBxYcACnk9BUg0QcFIBCgyeU
|
||||
HjwgpAEYJgsWPACqgyCQyIEHaJ5GDyWgNLIv0VRjjwdMRfQNJQCIvyUFPaAxvQAA
|
||||
AABJRU5ErkJggg==" style="fill:black; stroke:black; font-weight:normal;" height="16" preserveAspectRatio="none" />
|
||||
<text x="2486" y="376" style="fill:black; stroke:none; font-weight:normal;" xml:space="preserve"> codegen(in ClassFile, in CodeAttribute, in Expr, in boolean, in Menge): void</text>
|
||||
<image x="2614" y="327" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAA7ElEQVR42q2SXXUE
|
||||
IQyF09kVMBIiAQmRMBIioRIioRKQEgkjAQk4mF42wMzu6UN7ujl5APL3ceHjOA4a
|
||||
lj1nd7qYiqjo9eQ+V2KPAJdrGPVwtzxPljMbqc/ZvZ5L7zUngOScw2zSt+bqpUza
|
||||
YFtibvSObC8uWczzrER03u1+nS+sj8Yt5iVLPifTGLXQH+1/BcBoSCKBhzsPHibm
|
||||
WN7MjKjue6W1lgp3TZ+aVDhBJZy0rL3qtiVO/dLQa4oAHSHRE0RrT/O9O1J7SwQK
|
||||
v6b6iA4LpPg2W2eDQ0P4uoLkS+3nvxRsL1/t3bL+xr4BXAV0uUgPznkAAAAASUVO
|
||||
RK5CYII=" style="fill:black; stroke:black;" height="16" preserveAspectRatio="none" />
|
||||
<text x="2633" y="339" style="fill:black; stroke:none;" xml:space="preserve">ModuloOp</text>
|
||||
<rect x="3" y="506" width="400" style="fill:rgb(191,191,191); stroke:none;" height="82" />
|
||||
<rect x="2" y="505" width="400" style="fill:rgb(127,127,127); stroke:none;" height="82" />
|
||||
<rect x="1" y="504" width="400" style="fill:rgb(63,63,63); stroke:none;" height="82" />
|
||||
<rect x="0" y="503" width="400" style="stroke:none;" height="82" />
|
||||
<rect x="0" y="503" width="399" style="fill:none; stroke:black;" height="81" />
|
||||
<line x1="0" x2="399" y1="529" style="fill:none; stroke:black;" y2="529" />
|
||||
<line x1="0" x2="399" y1="539" style="fill:none; stroke:black;" y2="539" />
|
||||
<rect x="10" y="544" width="380" style="stroke:none; font-weight:normal;" height="16" />
|
||||
<image x="10" y="544" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAYUlEQVR42mP8//8/
|
||||
AymAiYFEMAg1sGAKOTQ4wNkHGg4Q0ABUneCggOAmOBxYcACnk9BUg0QcFIBCgyeU
|
||||
HjwgpAEYJgsWPACqgyCQyIEHaJ5GDyWgNLIv0VRjjwdMRfQNJQCIvyUFPaAxvQAA
|
||||
AABJRU5ErkJggg==" style="fill:black; stroke:black; font-weight:normal;" height="16" preserveAspectRatio="none" />
|
||||
<text x="29" y="557" style="fill:black; stroke:none; font-weight:normal;" xml:space="preserve"> codegen(in ClassFile, in CodeAttribute, in Expr, in boolean, in Menge): void</text>
|
||||
<rect x="10" y="562" width="380" style="stroke:none; font-weight:normal;" height="16" />
|
||||
<image x="10" y="562" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAYUlEQVR42mP8//8/
|
||||
AymAiYFEMAg1sGAKOTQ4wNkHGg4Q0ABUneCggOAmOBxYcACnk9BUg0QcFIBCgyeU
|
||||
HjwgpAEYJgsWPACqgyCQyIEHaJ5GDyWgNLIv0VRjjwdMRfQNJQCIvyUFPaAxvQAA
|
||||
AABJRU5ErkJggg==" style="fill:black; stroke:black; font-weight:normal;" height="16" preserveAspectRatio="none" />
|
||||
<text x="29" y="575" style="fill:black; stroke:none; font-weight:normal;" xml:space="preserve"> if_codegen(in ClassFile, in CodeAttribute, in String, in boolean): void</text>
|
||||
<image x="157" y="508" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAA7ElEQVR42q2SXXUE
|
||||
IQyF09kVMBIiAQmRMBIioRIioRKQEgkjAQk4mF42wMzu6UN7ujl5APL3ceHjOA4a
|
||||
lj1nd7qYiqjo9eQ+V2KPAJdrGPVwtzxPljMbqc/ZvZ5L7zUngOScw2zSt+bqpUza
|
||||
YFtibvSObC8uWczzrER03u1+nS+sj8Yt5iVLPifTGLXQH+1/BcBoSCKBhzsPHibm
|
||||
WN7MjKjue6W1lgp3TZ+aVDhBJZy0rL3qtiVO/dLQa4oAHSHRE0RrT/O9O1J7SwQK
|
||||
v6b6iA4LpPg2W2eDQ0P4uoLkS+3nvxRsL1/t3bL+xr4BXAV0uUgPznkAAAAASUVO
|
||||
RK5CYII=" style="fill:black; stroke:black;" height="16" preserveAspectRatio="none" />
|
||||
<text x="176" y="520" style="fill:black; stroke:none;" xml:space="preserve">GreaterOp</text>
|
||||
<rect x="1594" y="325" width="400" style="fill:rgb(191,191,191); stroke:none;" height="64" />
|
||||
<rect x="1593" y="324" width="400" style="fill:rgb(127,127,127); stroke:none;" height="64" />
|
||||
<rect x="1592" y="323" width="400" style="fill:rgb(63,63,63); stroke:none;" height="64" />
|
||||
<rect x="1591" y="322" width="400" style="stroke:none;" height="64" />
|
||||
<rect x="1591" y="322" width="399" style="fill:none; stroke:black;" height="63" />
|
||||
<line x1="1591" x2="1990" y1="348" style="fill:none; stroke:black;" y2="348" />
|
||||
<line x1="1591" x2="1990" y1="358" style="fill:none; stroke:black;" y2="358" />
|
||||
<rect x="1601" y="363" width="380" style="stroke:none; font-weight:normal;" height="16" />
|
||||
<image x="1601" y="363" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAYUlEQVR42mP8//8/
|
||||
AymAiYFEMAg1sGAKOTQ4wNkHGg4Q0ABUneCggOAmOBxYcACnk9BUg0QcFIBCgyeU
|
||||
HjwgpAEYJgsWPACqgyCQyIEHaJ5GDyWgNLIv0VRjjwdMRfQNJQCIvyUFPaAxvQAA
|
||||
AABJRU5ErkJggg==" style="fill:black; stroke:black; font-weight:normal;" height="16" preserveAspectRatio="none" />
|
||||
<text x="1620" y="376" style="fill:black; stroke:none; font-weight:normal;" xml:space="preserve"> codegen(in ClassFile, in CodeAttribute, in Expr, in boolean, in Menge): void</text>
|
||||
<image x="1752" y="327" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAA7ElEQVR42q2SXXUE
|
||||
IQyF09kVMBIiAQmRMBIioRIioRKQEgkjAQk4mF42wMzu6UN7ujl5APL3ceHjOA4a
|
||||
lj1nd7qYiqjo9eQ+V2KPAJdrGPVwtzxPljMbqc/ZvZ5L7zUngOScw2zSt+bqpUza
|
||||
YFtibvSObC8uWczzrER03u1+nS+sj8Yt5iVLPifTGLXQH+1/BcBoSCKBhzsPHibm
|
||||
WN7MjKjue6W1lgp3TZ+aVDhBJZy0rL3qtiVO/dLQa4oAHSHRE0RrT/O9O1J7SwQK
|
||||
v6b6iA4LpPg2W2eDQ0P4uoLkS+3nvxRsL1/t3bL+xr4BXAV0uUgPznkAAAAASUVO
|
||||
RK5CYII=" style="fill:black; stroke:black;" height="16" preserveAspectRatio="none" />
|
||||
<text x="1771" y="339" style="fill:black; stroke:none;" xml:space="preserve">DivideOp</text>
|
||||
<rect x="2673" y="461" width="400" style="fill:rgb(191,191,191); stroke:none;" height="64" />
|
||||
<rect x="2672" y="460" width="400" style="fill:rgb(127,127,127); stroke:none;" height="64" />
|
||||
<rect x="2671" y="459" width="400" style="fill:rgb(63,63,63); stroke:none;" height="64" />
|
||||
<rect x="2670" y="458" width="400" style="stroke:none;" height="64" />
|
||||
<rect x="2670" y="458" width="399" style="fill:none; stroke:black;" height="63" />
|
||||
<line x1="2670" x2="3069" y1="484" style="fill:none; stroke:black;" y2="484" />
|
||||
<line x1="2670" x2="3069" y1="494" style="fill:none; stroke:black;" y2="494" />
|
||||
<rect x="2680" y="499" width="380" style="stroke:none; font-weight:normal;" height="16" />
|
||||
<image x="2680" y="499" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAYUlEQVR42mP8//8/
|
||||
AymAiYFEMAg1sGAKOTQ4wNkHGg4Q0ABUneCggOAmOBxYcACnk9BUg0QcFIBCgyeU
|
||||
HjwgpAEYJgsWPACqgyCQyIEHaJ5GDyWgNLIv0VRjjwdMRfQNJQCIvyUFPaAxvQAA
|
||||
AABJRU5ErkJggg==" style="fill:black; stroke:black; font-weight:normal;" height="16" preserveAspectRatio="none" />
|
||||
<text x="2699" y="512" style="fill:black; stroke:none; font-weight:normal;" xml:space="preserve"> codegen(in ClassFile, in CodeAttribute, in Expr, in boolean, in Menge): void</text>
|
||||
<image x="2837" y="463" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAA7ElEQVR42q2SXXUE
|
||||
IQyF09kVMBIiAQmRMBIioRIioRKQEgkjAQk4mF42wMzu6UN7ujl5APL3ceHjOA4a
|
||||
lj1nd7qYiqjo9eQ+V2KPAJdrGPVwtzxPljMbqc/ZvZ5L7zUngOScw2zSt+bqpUza
|
||||
YFtibvSObC8uWczzrER03u1+nS+sj8Yt5iVLPifTGLXQH+1/BcBoSCKBhzsPHibm
|
||||
WN7MjKjue6W1lgp3TZ+aVDhBJZy0rL3qtiVO/dLQa4oAHSHRE0RrT/O9O1J7SwQK
|
||||
v6b6iA4LpPg2W2eDQ0P4uoLkS+3nvxRsL1/t3bL+xr4BXAV0uUgPznkAAAAASUVO
|
||||
RK5CYII=" style="fill:black; stroke:black;" height="16" preserveAspectRatio="none" />
|
||||
<text x="2856" y="475" style="fill:black; stroke:none;" xml:space="preserve">PlusOp</text>
|
||||
<rect x="2181" y="187" width="81" style="fill:rgb(191,191,191); stroke:none;" height="26" />
|
||||
<rect x="2180" y="186" width="81" style="fill:rgb(127,127,127); stroke:none;" height="26" />
|
||||
<rect x="2179" y="185" width="81" style="fill:rgb(63,63,63); stroke:none;" height="26" />
|
||||
<rect x="2178" y="184" width="81" style="stroke:none;" height="26" />
|
||||
<rect x="2178" y="184" width="80" style="fill:none; stroke:black;" height="25" />
|
||||
<image x="2188" y="189" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAABBElEQVR42q1SYZnD
|
||||
IAylWwVUQiTgYJFQCZmDOVjOwSREwiREQqdgSMBBFwajcLu7/bl8+fpR8l7egzCs
|
||||
6+peISqi6pogREIavob1XGC7WkOmhIbQZkYf7gf7dgRDF9BPobLJjtnJpgPAWH5Z
|
||||
6Z28Z+aTXHLvjNagdKUQHSNnP3IViHC8HW1nbNkI9GycDGgwHWr95GPs3J9h7b+t
|
||||
PxDa4+Z1Z8lsICAjmqtsDwVTIUCqspRDOxeXJbophmip5E/kCcHbLdlOIiyR5tmD
|
||||
Lwo2nTpgDaF0rWHtIWG6wSU5KzylO6i6amabw+vZzMWbpU3FcprMyYW4bTL2T42q
|
||||
9G/x4Vr/gfAAzgaEraDyPpwAAAAASUVORK5CYII=" style="fill:black; stroke:black;" height="16" preserveAspectRatio="none" />
|
||||
<text x="2207" y="201" style="fill:black; stroke:none;" xml:space="preserve">MulOp</text>
|
||||
<rect x="898" y="144" width="542" style="fill:rgb(191,191,191); stroke:none;" height="136" />
|
||||
<rect x="897" y="143" width="542" style="fill:rgb(127,127,127); stroke:none;" height="136" />
|
||||
<rect x="896" y="142" width="542" style="fill:rgb(63,63,63); stroke:none;" height="136" />
|
||||
<rect x="895" y="141" width="542" style="stroke:none;" height="136" />
|
||||
<rect x="895" y="141" width="541" style="fill:none; stroke:black;" height="135" />
|
||||
<line x1="895" x2="1436" y1="167" style="fill:none; stroke:black;" y2="167" />
|
||||
<line x1="895" x2="1436" y1="177" style="fill:none; stroke:black;" y2="177" />
|
||||
<rect x="905" y="182" width="522" style="stroke:none; font-weight:normal;" height="16" />
|
||||
<image x="905" y="182" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAYUlEQVR42mP8//8/
|
||||
AymAiYFEMAg1sGAKOTQ4wNkHGg4Q0ABUneCggOAmOBxYcACnk9BUg0QcFIBCgyeU
|
||||
HjwgpAEYJgsWPACqgyCQyIEHaJ5GDyWgNLIv0VRjjwdMRfQNJQCIvyUFPaAxvQAA
|
||||
AABJRU5ErkJggg==" style="fill:black; stroke:black; font-weight:normal;" height="16" preserveAspectRatio="none" />
|
||||
<text x="924" y="195" style="fill:black; stroke:none; font-weight:normal;" xml:space="preserve"> codegen(in ClassFile, in CodeAttribute, in Expr, in boolean, in Menge): void</text>
|
||||
<rect x="905" y="200" width="522" style="stroke:none; font-weight:normal;" height="16" />
|
||||
<image x="905" y="200" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAYUlEQVR42mP8//8/
|
||||
AymAiYFEMAg1sGAKOTQ4wNkHGg4Q0ABUneCggOAmOBxYcACnk9BUg0QcFIBCgyeU
|
||||
HjwgpAEYJgsWPACqgyCQyIEHaJ5GDyWgNLIv0VRjjwdMRfQNJQCIvyUFPaAxvQAA
|
||||
AABJRU5ErkJggg==" style="fill:black; stroke:black; font-weight:normal;" height="16" preserveAspectRatio="none" />
|
||||
<text x="924" y="213" style="fill:black; stroke:none; font-weight:normal;" xml:space="preserve"> if_codegen(in ClassFile, in CodeAttribute, in boolean, in Expr, in Statement, in Statement, in Menge): void</text>
|
||||
<rect x="905" y="218" width="522" style="stroke:none; font-weight:normal;" height="16" />
|
||||
<image x="905" y="218" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAYUlEQVR42mP8//8/
|
||||
AymAiYFEMAg1sGAKOTQ4wNkHGg4Q0ABUneCggOAmOBxYcACnk9BUg0QcFIBCgyeU
|
||||
HjwgpAEYJgsWPACqgyCQyIEHaJ5GDyWgNLIv0VRjjwdMRfQNJQCIvyUFPaAxvQAA
|
||||
AABJRU5ErkJggg==" style="fill:black; stroke:black; font-weight:normal;" height="16" preserveAspectRatio="none" />
|
||||
<text x="924" y="231" style="fill:black; stroke:none; font-weight:normal;" xml:space="preserve"> loop_codegen(in ClassFile, in CodeAttribute, in Expr, in int, in boolean, in Menge): void</text>
|
||||
<rect x="905" y="236" width="522" style="stroke:none; font-weight:normal;" height="16" />
|
||||
<image x="905" y="236" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAjUlEQVR42rWR2w2A
|
||||
IAxFrXEQN5FNZJPiJozSUdikXiEhRNDGD5sSoJybPiBVnd6N6Mg7Y6nOk2WgWRVe
|
||||
ZLagGudaFptDEqJaki0AxKU2Ih5mcMHVswS5uGYwS097tz6WdBP0dIhe9k2i1MiH
|
||||
Kf0gSMkSYCYxJnDFr4iktoHBlPCMxtvrDRj8Qw/91vTQThWRPIE1rC5kAAAAAElF
|
||||
TkSuQmCC" style="fill:black; stroke:black; font-weight:normal;" height="16" preserveAspectRatio="none" />
|
||||
<text x="924" y="249" style="fill:black; stroke:none; font-weight:normal;" xml:space="preserve"> replace_index(in CodeAttribute, in Menge, in int, in int): void</text>
|
||||
<rect x="905" y="254" width="522" style="stroke:none; font-weight:normal;" height="16" />
|
||||
<image x="905" y="254" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAjUlEQVR42rWR2w2A
|
||||
IAxFrXEQN5FNZJPiJozSUdikXiEhRNDGD5sSoJybPiBVnd6N6Mg7Y6nOk2WgWRVe
|
||||
ZLagGudaFptDEqJaki0AxKU2Ih5mcMHVswS5uGYwS097tz6WdBP0dIhe9k2i1MiH
|
||||
Kf0gSMkSYCYxJnDFr4iktoHBlPCMxtvrDRj8Qw/91vTQThWRPIE1rC5kAAAAAElF
|
||||
TkSuQmCC" style="fill:black; stroke:black; font-weight:normal;" height="16" preserveAspectRatio="none" />
|
||||
<text x="924" y="267" style="fill:black; stroke:none; font-weight:normal;" xml:space="preserve"> build(in ClassFile, in CodeAttribute, in Expr, in Menge, in boolean, in boolean, in boolean, in Menge): void</text>
|
||||
<image x="1135" y="146" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAABBElEQVR42q1SYZnD
|
||||
IAylWwVUQiTgYJFQCZmDOVjOwSREwiREQqdgSMBBFwajcLu7/bl8+fpR8l7egzCs
|
||||
6+peISqi6pogREIavob1XGC7WkOmhIbQZkYf7gf7dgRDF9BPobLJjtnJpgPAWH5Z
|
||||
6Z28Z+aTXHLvjNagdKUQHSNnP3IViHC8HW1nbNkI9GycDGgwHWr95GPs3J9h7b+t
|
||||
PxDa4+Z1Z8lsICAjmqtsDwVTIUCqspRDOxeXJbophmip5E/kCcHbLdlOIiyR5tmD
|
||||
Lwo2nTpgDaF0rWHtIWG6wSU5KzylO6i6amabw+vZzMWbpU3FcprMyYW4bTL2T42q
|
||||
9G/x4Vr/gfAAzgaEraDyPpwAAAAASUVORK5CYII=" style="fill:black; stroke:black;" height="16" preserveAspectRatio="none" />
|
||||
<text x="1154" y="158" style="fill:black; stroke:none;" xml:space="preserve">LogOp</text>
|
||||
<rect x="981" y="3" width="400" style="fill:rgb(191,191,191); stroke:none;" height="64" />
|
||||
<rect x="980" y="2" width="400" style="fill:rgb(127,127,127); stroke:none;" height="64" />
|
||||
<rect x="979" y="1" width="400" style="fill:rgb(63,63,63); stroke:none;" height="64" />
|
||||
<rect x="978" y="0" width="400" style="stroke:none;" height="64" />
|
||||
<rect x="978" y="0" width="399" style="fill:none; stroke:black;" height="63" />
|
||||
<line x1="978" x2="1377" y1="26" style="fill:none; stroke:black;" y2="26" />
|
||||
<line x1="978" x2="1377" y1="36" style="fill:none; stroke:black;" y2="36" />
|
||||
<rect x="988" y="41" width="380" style="stroke:none; font-weight:normal;" height="16" />
|
||||
<image x="988" y="41" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAiklEQVR42rVRgQ2A
|
||||
IAwDwiF+4k7hE/WTnbJP3CdYoyEoqJjoQsiAdrSbjTGap7CTjcMOcy3ofu6xtxIQ
|
||||
wpLyJkIerkUPBUqqfAmikXYlo+R66gSgA3XpiMKn3OZtPaEDcfm/vzHAElSNiP7W
|
||||
JZR/IKAtzArcttabo56KBzzDeHXGl6ZL0ItJf0BYALD3PkMWvNRAAAAAAElFTkSu
|
||||
QmCC" style="fill:black; stroke:black; font-weight:normal;" height="16" preserveAspectRatio="none" />
|
||||
<text x="1007" y="54" style="fill:black; stroke:none; font-weight:normal;" xml:space="preserve"> codegen(in ClassFile, in CodeAttribute, in Expr, in boolean, in Menge): void</text>
|
||||
<image x="1140" y="5" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAABBElEQVR42q1SYZnD
|
||||
IAylWwVUQiTgYJFQCZmDOVjOwSREwiREQqdgSMBBFwajcLu7/bl8+fpR8l7egzCs
|
||||
6+peISqi6pogREIavob1XGC7WkOmhIbQZkYf7gf7dgRDF9BPobLJjtnJpgPAWH5Z
|
||||
6Z28Z+aTXHLvjNagdKUQHSNnP3IViHC8HW1nbNkI9GycDGgwHWr95GPs3J9h7b+t
|
||||
PxDa4+Z1Z8lsICAjmqtsDwVTIUCqspRDOxeXJbophmip5E/kCcHbLdlOIiyR5tmD
|
||||
Lwo2nTpgDaF0rWHtIWG6wSU5KzylO6i6amabw+vZzMWbpU3FcprMyYW4bTL2T42q
|
||||
9G/x4Vr/gfAAzgaEraDyPpwAAAAASUVORK5CYII=" style="fill:black; stroke:black;" height="16" preserveAspectRatio="none" />
|
||||
<text x="1159" y="17" style="fill:black; stroke:none;" xml:space="preserve">Operator</text>
|
||||
<rect x="1749" y="514" width="400" style="fill:rgb(191,191,191); stroke:none;" height="82" />
|
||||
<rect x="1748" y="513" width="400" style="fill:rgb(127,127,127); stroke:none;" height="82" />
|
||||
<rect x="1747" y="512" width="400" style="fill:rgb(63,63,63); stroke:none;" height="82" />
|
||||
<rect x="1746" y="511" width="400" style="stroke:none;" height="82" />
|
||||
<rect x="1746" y="511" width="399" style="fill:none; stroke:black;" height="81" />
|
||||
<line x1="1746" x2="2145" y1="537" style="fill:none; stroke:black;" y2="537" />
|
||||
<line x1="1746" x2="2145" y1="547" style="fill:none; stroke:black;" y2="547" />
|
||||
<rect x="1756" y="552" width="380" style="stroke:none; font-weight:normal;" height="16" />
|
||||
<image x="1756" y="552" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAYUlEQVR42mP8//8/
|
||||
AymAiYFEMAg1sGAKOTQ4wNkHGg4Q0ABUneCggOAmOBxYcACnk9BUg0QcFIBCgyeU
|
||||
HjwgpAEYJgsWPACqgyCQyIEHaJ5GDyWgNLIv0VRjjwdMRfQNJQCIvyUFPaAxvQAA
|
||||
AABJRU5ErkJggg==" style="fill:black; stroke:black; font-weight:normal;" height="16" preserveAspectRatio="none" />
|
||||
<text x="1775" y="565" style="fill:black; stroke:none; font-weight:normal;" xml:space="preserve"> codegen(in ClassFile, in CodeAttribute, in Expr, in boolean, in Menge): void</text>
|
||||
<rect x="1756" y="570" width="380" style="stroke:none; font-weight:normal;" height="16" />
|
||||
<image x="1756" y="570" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAYUlEQVR42mP8//8/
|
||||
AymAiYFEMAg1sGAKOTQ4wNkHGg4Q0ABUneCggOAmOBxYcACnk9BUg0QcFIBCgyeU
|
||||
HjwgpAEYJgsWPACqgyCQyIEHaJ5GDyWgNLIv0VRjjwdMRfQNJQCIvyUFPaAxvQAA
|
||||
AABJRU5ErkJggg==" style="fill:black; stroke:black; font-weight:normal;" height="16" preserveAspectRatio="none" />
|
||||
<text x="1775" y="583" style="fill:black; stroke:none; font-weight:normal;" xml:space="preserve"> if_codegen(in ClassFile, in CodeAttribute, in String, in boolean): void</text>
|
||||
<image x="1901" y="516" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAA7ElEQVR42q2SXXUE
|
||||
IQyF09kVMBIiAQmRMBIioRIioRKQEgkjAQk4mF42wMzu6UN7ujl5APL3ceHjOA4a
|
||||
lj1nd7qYiqjo9eQ+V2KPAJdrGPVwtzxPljMbqc/ZvZ5L7zUngOScw2zSt+bqpUza
|
||||
YFtibvSObC8uWczzrER03u1+nS+sj8Yt5iVLPifTGLXQH+1/BcBoSCKBhzsPHibm
|
||||
WN7MjKjue6W1lgp3TZ+aVDhBJZy0rL3qtiVO/dLQa4oAHSHRE0RrT/O9O1J7SwQK
|
||||
v6b6iA4LpPg2W2eDQ0P4uoLkS+3nvxRsL1/t3bL+xr4BXAV0uUgPznkAAAAASUVO
|
||||
RK5CYII=" style="fill:black; stroke:black;" height="16" preserveAspectRatio="none" />
|
||||
<text x="1920" y="528" style="fill:black; stroke:none;" xml:space="preserve">LessEquOp</text>
|
||||
<path d="M588 128 L588 108 L1179 108 L1179 67" style="fill:none; stroke:black;" />
|
||||
<polygon style="stroke:none;" points=" 1179 67 1185 91 1173 91" />
|
||||
<polygon style="fill:none; stroke:black;" points=" 1179 67 1185 91 1173 91" />
|
||||
<path d="M2220 184 L2220 108 L1179 108" style="fill:none; stroke:black;" />
|
||||
<path d="M1167 141 L1167 108 L1179 108" style="fill:none; stroke:black;" />
|
||||
<path d="M3121 179 L3121 108 L1179 108" style="fill:none; stroke:black;" />
|
||||
<path d="M201 503 L201 483 L588 483 L588 195" style="fill:none; stroke:black;" />
|
||||
<polygon style="stroke:none;" points=" 588 195 594 219 582 219" />
|
||||
<polygon style="fill:none; stroke:black;" points=" 588 195 594 219 582 219" />
|
||||
<path d="M640 504 L640 483 L588 483" style="fill:none; stroke:black;" />
|
||||
<path d="M1070 505 L1070 483 L588 483" style="fill:none; stroke:black;" />
|
||||
<path d="M1501 509 L1501 483 L588 483" style="fill:none; stroke:black;" />
|
||||
<path d="M1947 511 L1947 483 L588 483" style="fill:none; stroke:black;" />
|
||||
<path d="M2383 512 L2383 483 L588 483" style="fill:none; stroke:black;" />
|
||||
<path d="M3350 452 L3350 438 L3121 438" style="fill:none; stroke:black;" />
|
||||
<path d="M1358 375 L1358 347 L1167 347" style="fill:none; stroke:black;" />
|
||||
<path d="M961 367 L961 347 L1167 347 L1167 280" style="fill:none; stroke:black;" />
|
||||
<polygon style="stroke:none;" points=" 1167 280 1173 304 1161 304" />
|
||||
<polygon style="fill:none; stroke:black;" points=" 1167 280 1173 304 1161 304" />
|
||||
<path d="M2225 322 L2225 302 L2220 302" style="fill:none; stroke:black;" />
|
||||
<path d="M2871 458 L2871 438 L3121 438 L3121 246" style="fill:none; stroke:black;" />
|
||||
<polygon style="stroke:none;" points=" 3121 246 3127 270 3115 270" />
|
||||
<polygon style="fill:none; stroke:black;" points=" 3121 246 3127 270 3115 270" />
|
||||
<path d="M2658 322 L2658 302 L2220 302" style="fill:none; stroke:black;" />
|
||||
<path d="M1792 322 L1792 302 L2220 302 L2220 213" style="fill:none; stroke:black;" />
|
||||
<polygon style="stroke:none;" points=" 2220 213 2226 237 2214 237" />
|
||||
<polygon style="fill:none; stroke:black;" points=" 2220 213 2226 237 2214 237" />
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
Before (image error) Size: 42 KiB After (image error) Size: 42 KiB |
Before (image error) Size: 195 KiB After (image error) Size: 193 KiB |
Before (image error) Size: 187 KiB After (image error) Size: 185 KiB |
0
logFiles/.gitkeep
Normal file
83
pom.xml
@ -7,20 +7,20 @@ http://maven.apache.org/maven-v4_0_0.xsd">
|
||||
<artifactId>JavaTXcompiler</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<version>0.2</version>
|
||||
<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>
|
||||
<version>4.11</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.antlr</groupId>
|
||||
<artifactId>antlr4</artifactId>
|
||||
<version>4.7</version>
|
||||
<version>4.8-1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-io</groupId>
|
||||
@ -63,10 +63,23 @@ http://maven.apache.org/maven-v4_0_0.xsd">
|
||||
<skipTests>true</skipTests>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<!-- plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>3.8.1</version>
|
||||
<configuration>
|
||||
<verbose>true</verbose>
|
||||
<fork>true</fork>
|
||||
<executable>/home/michael/programs/jdk/jdk8u232-b09/bin/javac</executable>
|
||||
<compilerVersion>1.8</compilerVersion>
|
||||
<source>1.8</source>
|
||||
<target>1.8</target>
|
||||
</configuration>
|
||||
</plugin -->
|
||||
<plugin>
|
||||
<groupId>org.antlr</groupId>
|
||||
<artifactId>antlr4-maven-plugin</artifactId>
|
||||
<version>4.7</version>
|
||||
<version>4.8-1</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>antlr</id>
|
||||
@ -75,28 +88,13 @@ http://maven.apache.org/maven-v4_0_0.xsd">
|
||||
</goals>
|
||||
<configuration>
|
||||
<sourceDirectory>src/main/antlr4/java8</sourceDirectory>
|
||||
<outputDirectory>${project.basedir}/target/generated-sources/antlr4/de/dhbwstuttgart/parser/antlr</outputDirectory>
|
||||
<outputDirectory>${project.basedir}/src/main/java/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/main/antlr4/sat</sourceDirectory>
|
||||
<outputDirectory>${project.basedir}/target/generated-sources/antlr4/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>
|
||||
@ -110,50 +108,18 @@ http://maven.apache.org/maven-v4_0_0.xsd">
|
||||
</execution>
|
||||
</executions>
|
||||
<configuration>
|
||||
<archive>
|
||||
<manifest>
|
||||
<mainClass>de.dhbwstuttgart.core.ConsoleInterface</mainClass>
|
||||
</manifest>
|
||||
</archive>
|
||||
<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.2</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>
|
||||
</plugins>
|
||||
</build>
|
||||
<pluginRepositories>
|
||||
<pluginRepository>
|
||||
<id>reficio</id>
|
||||
<url>http://repo.reficio.org/maven/</url>
|
||||
</pluginRepository>
|
||||
</pluginRepositories>
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>maven-repository</id>
|
||||
@ -161,9 +127,12 @@ http://maven.apache.org/maven-v4_0_0.xsd">
|
||||
</repository>
|
||||
</repositories>
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||
<maven.compiler.source>1.8</maven.compiler.source>
|
||||
<maven.compiler.target>1.8</maven.compiler.target>
|
||||
<tycho.version>0.23.0</tycho.version>
|
||||
<mainClass>de.dhbwstuttgart.core.ConsoleInterface</mainClass>
|
||||
</properties>
|
||||
<distributionManagement>
|
||||
<repository>
|
||||
|
@ -61,7 +61,7 @@ public class ArgumentVisitor implements StatementVisitor {
|
||||
assign.accept(bytecodeGenMethod);
|
||||
|
||||
if(argListMethCall.get(0))
|
||||
bytecodeGenMethod.doUnboxing(bytecodeGenMethod.getResolvedType(assign.getType()));
|
||||
bytecodeGenMethod.doUnboxing(bytecodeGenMethod.getResolver().getResolvedType(assign.getType()));
|
||||
argListMethCall.remove(0);
|
||||
}
|
||||
|
||||
@ -70,9 +70,9 @@ public class ArgumentVisitor implements StatementVisitor {
|
||||
binary.accept(bytecodeGenMethod);
|
||||
|
||||
if(argListMethCall.get(0)) {
|
||||
bytecodeGenMethod.doUnboxing(bytecodeGenMethod.getResolvedType(binary.getType()));
|
||||
bytecodeGenMethod.doUnboxing(bytecodeGenMethod.getResolver().getResolvedType(binary.getType()));
|
||||
} else {
|
||||
bytecodeGenMethod.doBoxing(bytecodeGenMethod.getResolvedType(binary.getType()));
|
||||
bytecodeGenMethod.doBoxing(bytecodeGenMethod.getResolver().getResolvedType(binary.getType()));
|
||||
}
|
||||
argListMethCall.remove(0);
|
||||
}
|
||||
@ -88,7 +88,7 @@ public class ArgumentVisitor implements StatementVisitor {
|
||||
castExpr.accept(bytecodeGenMethod);
|
||||
|
||||
if(argListMethCall.get(0))
|
||||
bytecodeGenMethod.doUnboxing(bytecodeGenMethod.getResolvedType(castExpr.getType()));
|
||||
bytecodeGenMethod.doUnboxing(bytecodeGenMethod.getResolver().getResolvedType(castExpr.getType()));
|
||||
argListMethCall.remove(0);
|
||||
}
|
||||
|
||||
@ -103,7 +103,7 @@ public class ArgumentVisitor implements StatementVisitor {
|
||||
fieldVar.accept(bytecodeGenMethod);
|
||||
|
||||
if(argListMethCall.get(0))
|
||||
bytecodeGenMethod.doUnboxing(bytecodeGenMethod.getResolvedType(fieldVar.getType()));
|
||||
bytecodeGenMethod.doUnboxing(bytecodeGenMethod.getResolver().getResolvedType(fieldVar.getType()));
|
||||
argListMethCall.remove(0);
|
||||
}
|
||||
|
||||
@ -124,7 +124,7 @@ public class ArgumentVisitor implements StatementVisitor {
|
||||
instanceOf.accept(bytecodeGenMethod);
|
||||
|
||||
if(argListMethCall.get(0))
|
||||
bytecodeGenMethod.doUnboxing(bytecodeGenMethod.getResolvedType(instanceOf.getType()));
|
||||
bytecodeGenMethod.doUnboxing(bytecodeGenMethod.getResolver().getResolvedType(instanceOf.getType()));
|
||||
argListMethCall.remove(0);
|
||||
}
|
||||
|
||||
@ -133,7 +133,7 @@ public class ArgumentVisitor implements StatementVisitor {
|
||||
localVar.accept(bytecodeGenMethod);
|
||||
if(!bytecodeGenMethod.isBinaryExp) {
|
||||
if(argListMethCall.get(0))
|
||||
bytecodeGenMethod.doUnboxing(bytecodeGenMethod.getResolvedType(localVar.getType()));
|
||||
bytecodeGenMethod.doUnboxing(bytecodeGenMethod.getResolver().getResolvedType(localVar.getType()));
|
||||
}
|
||||
argListMethCall.remove(0);
|
||||
}
|
||||
@ -149,7 +149,7 @@ public class ArgumentVisitor implements StatementVisitor {
|
||||
methodCall.accept(bytecodeGenMethod);
|
||||
|
||||
if(argListMethCall.get(0))
|
||||
bytecodeGenMethod.doUnboxing(bytecodeGenMethod.getResolvedType(methodCall.getType()));
|
||||
bytecodeGenMethod.doUnboxing(bytecodeGenMethod.getResolver().getResolvedType(methodCall.getType()));
|
||||
argListMethCall.remove(0);
|
||||
}
|
||||
|
||||
@ -158,7 +158,7 @@ public class ArgumentVisitor implements StatementVisitor {
|
||||
methodCall.accept(bytecodeGenMethod);
|
||||
|
||||
if(argListMethCall.get(0))
|
||||
bytecodeGenMethod.doUnboxing(bytecodeGenMethod.getResolvedType(methodCall.getType()));
|
||||
bytecodeGenMethod.doUnboxing(bytecodeGenMethod.getResolver().getResolvedType(methodCall.getType()));
|
||||
argListMethCall.remove(0);
|
||||
}
|
||||
|
||||
@ -197,7 +197,7 @@ public class ArgumentVisitor implements StatementVisitor {
|
||||
aThis.accept(bytecodeGenMethod);
|
||||
|
||||
if(argListMethCall.get(0))
|
||||
bytecodeGenMethod.doUnboxing(bytecodeGenMethod.getResolvedType(aThis.getType()));
|
||||
bytecodeGenMethod.doUnboxing(bytecodeGenMethod.getResolver().getResolvedType(aThis.getType()));
|
||||
argListMethCall.remove(0);
|
||||
}
|
||||
|
||||
@ -242,7 +242,7 @@ public class ArgumentVisitor implements StatementVisitor {
|
||||
unaryExpr.accept(bytecodeGenMethod);
|
||||
|
||||
if(argListMethCall.get(0))
|
||||
bytecodeGenMethod.doUnboxing(bytecodeGenMethod.getResolvedType(unaryExpr.getType()));
|
||||
bytecodeGenMethod.doUnboxing(bytecodeGenMethod.getResolver().getResolvedType(unaryExpr.getType()));
|
||||
argListMethCall.remove(0);
|
||||
}
|
||||
|
||||
@ -251,7 +251,7 @@ public class ArgumentVisitor implements StatementVisitor {
|
||||
literal.accept(bytecodeGenMethod);
|
||||
|
||||
if(argListMethCall.get(0))
|
||||
bytecodeGenMethod.doUnboxing(bytecodeGenMethod.getResolvedType(literal.getType()));
|
||||
bytecodeGenMethod.doUnboxing(bytecodeGenMethod.getResolver().getResolvedType(literal.getType()));
|
||||
argListMethCall.remove(0);
|
||||
}
|
||||
|
||||
|
@ -1,14 +1,14 @@
|
||||
package de.dhbwstuttgart.bytecode;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.NoSuchElementException;
|
||||
import java.util.Optional;
|
||||
|
||||
import de.dhbwstuttgart.parser.scope.JavaClassName;
|
||||
import org.objectweb.asm.ClassWriter;
|
||||
import org.objectweb.asm.FieldVisitor;
|
||||
import org.objectweb.asm.MethodVisitor;
|
||||
@ -16,17 +16,18 @@ import org.objectweb.asm.Opcodes;
|
||||
import org.objectweb.asm.Type;
|
||||
|
||||
import de.dhbwstuttgart.bytecode.Exception.BytecodeGeneratorError;
|
||||
import de.dhbwstuttgart.bytecode.constraint.TPHConstraint;
|
||||
import de.dhbwstuttgart.bytecode.descriptor.DescriptorToString;
|
||||
import de.dhbwstuttgart.bytecode.descriptor.TypeToDescriptor;
|
||||
import de.dhbwstuttgart.bytecode.signature.Signature;
|
||||
import de.dhbwstuttgart.bytecode.signature.TypeToSignature;
|
||||
import de.dhbwstuttgart.bytecode.signature.TypeToString;
|
||||
import de.dhbwstuttgart.bytecode.utilities.MethodAndTPH;
|
||||
import de.dhbwstuttgart.bytecode.genericsGeneratorTypes.GenericGenratorResultForSourceFile;
|
||||
import de.dhbwstuttgart.bytecode.genericsGeneratorTypes.GenericsGeneratorResult;
|
||||
import de.dhbwstuttgart.bytecode.genericsGeneratorTypes.GenericsGeneratorResultForClass;
|
||||
import de.dhbwstuttgart.bytecode.utilities.MethodUtility;
|
||||
import de.dhbwstuttgart.bytecode.utilities.NormalConstructor;
|
||||
import de.dhbwstuttgart.bytecode.utilities.NormalMethod;
|
||||
import de.dhbwstuttgart.bytecode.utilities.Simplify;
|
||||
import de.dhbwstuttgart.bytecode.utilities.SimplifyResult;
|
||||
import de.dhbwstuttgart.bytecode.utilities.Resolver;
|
||||
import de.dhbwstuttgart.exceptions.NotImplementedException;
|
||||
import de.dhbwstuttgart.parser.SyntaxTreeGenerator.AssignToLocal;
|
||||
import de.dhbwstuttgart.syntaxtree.ASTVisitor;
|
||||
@ -73,7 +74,6 @@ 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.GenericInsertPair;
|
||||
import de.dhbwstuttgart.typeinference.result.ResultSet;
|
||||
|
||||
public class BytecodeGen implements ASTVisitor {
|
||||
@ -83,12 +83,13 @@ public class BytecodeGen implements ASTVisitor {
|
||||
String type;
|
||||
|
||||
public static RefTypeOrTPHOrWildcardOrGeneric THISTYPE = null;
|
||||
String className;
|
||||
private JavaClassName className;
|
||||
private String pkgName;
|
||||
private boolean isInterface;
|
||||
private Collection<ResultSet> listOfResultSets;
|
||||
private ResultSet resultSet;
|
||||
private SourceFile sf;
|
||||
private String path;
|
||||
private File path;
|
||||
|
||||
private Optional<Constructor> fieldInitializations;
|
||||
|
||||
@ -96,7 +97,7 @@ public class BytecodeGen implements ASTVisitor {
|
||||
|
||||
private String superClass;
|
||||
|
||||
private ArrayList<String> tphsClass;
|
||||
private List<String> tphsClass;
|
||||
|
||||
// stores parameter, local vars and the next index on the local variable table,
|
||||
// which use for aload_i, astore_i,...
|
||||
@ -106,45 +107,39 @@ public class BytecodeGen implements ASTVisitor {
|
||||
|
||||
private int constructorPos = 0;
|
||||
|
||||
private final TPHExtractor tphExtractor = new TPHExtractor();
|
||||
private final ArrayList<GenericInsertPair> commonPairs = new ArrayList<>();
|
||||
|
||||
HashMap<String, RefTypeOrTPHOrWildcardOrGeneric> methodParamsAndTypes = new HashMap<>();
|
||||
byte[] bytecode;
|
||||
HashMap<String, byte[]> classFiles;
|
||||
HashMap<JavaClassName, byte[]> classFiles;
|
||||
|
||||
private final ArrayList<String> methodNameAndParamsT = new ArrayList<>();
|
||||
private final ArrayList<String> fieldNameAndParamsT = new ArrayList<>();
|
||||
|
||||
private HashMap<String, SimplifyResult> simplifyResults = new HashMap<>();
|
||||
private List<HashMap<String, SimplifyResult>> simplifyResultsList = new ArrayList<>();
|
||||
|
||||
private final ArrayList<String> fieldNameSignature = new ArrayList<>();
|
||||
|
||||
public List<HashMap<String, SimplifyResult>> getSimplifyResultsList() {
|
||||
return simplifyResultsList;
|
||||
}
|
||||
private List<GenericGenratorResultForSourceFile> simplifyResultsForAllSourceFiles;
|
||||
private GenericsGeneratorResultForClass generatedGenerics;
|
||||
|
||||
public void setSimplifyResultsList(List<HashMap<String, SimplifyResult>> simplifyResultsList) {
|
||||
this.simplifyResultsList = simplifyResultsList;
|
||||
}
|
||||
private Resolver resolver;
|
||||
private final ClassLoader classLoader;
|
||||
|
||||
public BytecodeGen(HashMap<String, byte[]> classFiles, Collection<ResultSet> listOfResultSets, SourceFile sf,
|
||||
String path) {
|
||||
public BytecodeGen(HashMap<JavaClassName, byte[]> classFiles, Collection<ResultSet> listOfResultSets, List<GenericGenratorResultForSourceFile> simplifyResultsForAllSourceFiles, SourceFile sf,
|
||||
File path, ClassLoader classLoader) {
|
||||
this.classFiles = classFiles;
|
||||
this.listOfResultSets = listOfResultSets;
|
||||
this.simplifyResultsForAllSourceFiles = simplifyResultsForAllSourceFiles;
|
||||
this.sf = sf;
|
||||
this.path = path;
|
||||
this.pkgName = sf.getPkgName();
|
||||
this.classLoader = classLoader;
|
||||
}
|
||||
|
||||
@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, sf, path);
|
||||
BytecodeGen classGen = new BytecodeGen(classFiles, listOfResultSets, simplifyResultsForAllSourceFiles, sf, path, classLoader);
|
||||
cl.accept(classGen);
|
||||
simplifyResultsList.add(classGen.getSimplifyResults());
|
||||
classGen.writeClass(cl.getClassName().toString());
|
||||
classGen.writeClass(cl.getClassName());
|
||||
}
|
||||
}
|
||||
|
||||
@ -152,24 +147,24 @@ public class BytecodeGen implements ASTVisitor {
|
||||
* 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
|
||||
* @param name name of the class with which the bytecode is to be associated
|
||||
*/
|
||||
private void writeClass(String name) {
|
||||
private void writeClass(JavaClassName name) {
|
||||
bytecode = cw.toByteArray();
|
||||
classFiles.put(name, bytecode);
|
||||
|
||||
}
|
||||
|
||||
public HashMap<String, byte[]> getClassFiles() {
|
||||
public HashMap<JavaClassName, byte[]> getClassFiles() {
|
||||
return classFiles;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void visit(ClassOrInterface classOrInterface) {
|
||||
|
||||
className = classOrInterface.getClassName().toString();
|
||||
className = classOrInterface.getClassName();
|
||||
|
||||
cw.visitSource(className + ".jav", null);
|
||||
cw.visitSource(className.getClassName() + ".jav", null);
|
||||
|
||||
isInterface = (classOrInterface.getModifiers() & 512) == 512;
|
||||
|
||||
@ -179,77 +174,36 @@ public class BytecodeGen implements ASTVisitor {
|
||||
fieldInitializations = classOrInterface.getfieldInitializations();
|
||||
|
||||
// resultSet = listOfResultSets.get(0);
|
||||
boolean isConsWithNoParamsVisited = false;
|
||||
boolean isVisited = false;
|
||||
List<ResultSet> listOfResultSetsList = new ArrayList<>(listOfResultSets);
|
||||
generatedGenerics = simplifyResultsForAllSourceFiles.stream().map(sr->sr.getSimplifyResultsByName(className)).findFirst().get();
|
||||
for (int i = 0; i < listOfResultSetsList.size(); i++) {
|
||||
//for (ResultSet rs : listOfResultSets) {
|
||||
superClass = classOrInterface.getSuperClass().acceptTV(new TypeToDescriptor());
|
||||
resultSet = listOfResultSetsList.get(i);
|
||||
tphExtractor.setResultSet(resultSet);
|
||||
resolver = new Resolver(resultSet);
|
||||
// tphExtractor.setResultSet(resultSet);
|
||||
|
||||
|
||||
// Nur einmal ausführen!!
|
||||
if (!isVisited) {
|
||||
classOrInterface.accept(tphExtractor);
|
||||
|
||||
getCommonTPHS(tphExtractor);
|
||||
|
||||
tphsClass = new ArrayList<>();
|
||||
for (String t : tphExtractor.allTPHS.keySet()) {
|
||||
if (!tphExtractor.allTPHS.get(t))
|
||||
tphsClass.add(t);
|
||||
}
|
||||
|
||||
String sig = null;
|
||||
/*
|
||||
* if class has generics then creates signature Signature looks like:
|
||||
* <E:Ljava/...>Superclass
|
||||
*/
|
||||
if (classOrInterface.getGenerics().iterator().hasNext() || !commonPairs.isEmpty()
|
||||
|| classOrInterface.getSuperClass().acceptTV(new TypeToSignature()).contains("<")
|
||||
|| !tphsClass.isEmpty()) {
|
||||
HashMap<TPHConstraint, HashSet<String>> constraints = Simplify
|
||||
.simplifyConstraintsClass(tphExtractor, tphsClass);
|
||||
ArrayList<TPHConstraint> consClass = new ArrayList<>();
|
||||
for (TPHConstraint cons : constraints.keySet()) {
|
||||
String right = null;
|
||||
boolean isToAdd = false;
|
||||
for (String tph : tphsClass) {
|
||||
if (cons.getLeft().equals(tph)) {
|
||||
|
||||
consClass.add(cons);
|
||||
try {
|
||||
right = getTPH(cons.getRight());
|
||||
isToAdd = true;
|
||||
} catch (NoSuchElementException e) {
|
||||
continue;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
if (isToAdd) {
|
||||
tphsClass.add(right);
|
||||
removeFromMethod(right);
|
||||
right = null;
|
||||
isToAdd = false;
|
||||
}
|
||||
// if(right != null) {
|
||||
// tphsClass.add(right);
|
||||
// removeFromMethod(right);
|
||||
// right = null;
|
||||
// }
|
||||
}
|
||||
|
||||
SimplifyResult sRes = new SimplifyResult(consClass, tphsClass, new HashMap<>());
|
||||
simplifyResults.put(className, sRes);
|
||||
|
||||
Signature signature = new Signature(classOrInterface, genericsAndBounds, commonPairs, tphsClass,
|
||||
consClass);
|
||||
sig = signature.toString();
|
||||
if (classOrInterface.getGenerics().iterator().hasNext() || classOrInterface.getSuperClass().acceptTV(new TypeToSignature()).contains("<")
|
||||
|| !generatedGenerics.getClassConstraints().isEmpty()) {
|
||||
|
||||
List<GenericsGeneratorResult> consClass = generatedGenerics.getClassConstraints();
|
||||
//
|
||||
Signature signature = new Signature(classOrInterface, genericsAndBounds, consClass);
|
||||
sig = signature.createSignatureForClassOrInterface();
|
||||
System.out.println("Signature: => " + sig);
|
||||
}
|
||||
|
||||
cw.visit(Opcodes.V1_8, acc, classOrInterface.getClassName().toString(), sig,
|
||||
cw.visit(Opcodes.V1_8, acc, classOrInterface.getClassName().toString().replace(".", "/"), sig,
|
||||
classOrInterface.getSuperClass().acceptTV(new TypeToDescriptor()), null);
|
||||
|
||||
isVisited = true;
|
||||
@ -260,12 +214,7 @@ public class BytecodeGen implements ASTVisitor {
|
||||
}
|
||||
|
||||
for (Constructor c : classOrInterface.getConstructors()) {
|
||||
// if(!isConsWithNoParamsVisited) {
|
||||
c.accept(this);
|
||||
// }
|
||||
|
||||
// if(!c.getParameterList().iterator().hasNext())
|
||||
// isConsWithNoParamsVisited = true;
|
||||
}
|
||||
|
||||
for (Method m : classOrInterface.getMethods()) {
|
||||
@ -276,69 +225,20 @@ public class BytecodeGen implements ASTVisitor {
|
||||
|
||||
}
|
||||
|
||||
private void removeFromMethod(String name) {
|
||||
for (MethodAndTPH m : tphExtractor.ListOfMethodsAndTph) {
|
||||
ArrayList<String> toRemove = new ArrayList<>();
|
||||
for (String tph : m.getTphs()) {
|
||||
if (tph.equals(name)) {
|
||||
toRemove.add(tph);
|
||||
}
|
||||
}
|
||||
|
||||
if (!toRemove.isEmpty()) {
|
||||
m.getTphs().removeAll(toRemove);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private String getTPH(String name) {
|
||||
for (String tph : tphExtractor.allTPHS.keySet()) {
|
||||
if (tph.equals(name))
|
||||
return tph;
|
||||
}
|
||||
throw new NoSuchElementException("TPH " + name + " does not exist");
|
||||
}
|
||||
|
||||
private void getCommonTPHS(TPHExtractor tphExtractor) {
|
||||
// Gemeinsame TPHs
|
||||
ArrayList<String> cTPHs = new ArrayList<>();
|
||||
// Alle TPHs der Felder speichern
|
||||
for (String tph : tphExtractor.allTPHS.keySet()) {
|
||||
if (!tphExtractor.allTPHS.get(tph))
|
||||
cTPHs.add(tph);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void visit(Constructor field) {
|
||||
System.out.println("ResultSet: ");
|
||||
resultSet.results.forEach(a -> {
|
||||
System.out.println(a.getLeft().toString() + " = " + a.getRight().toString());
|
||||
});
|
||||
System.out.println("---------------");
|
||||
|
||||
// stores generics and their bounds of method
|
||||
HashMap<String, String> genericsAndBoundsMethod = new HashMap<>();
|
||||
|
||||
field.getParameterList().accept(this);
|
||||
|
||||
String methParamTypes = field.name + "%%";
|
||||
String id = MethodUtility.createID(resolver, field);
|
||||
|
||||
Iterator<FormalParameter> itr = field.getParameterList().iterator();
|
||||
while (itr.hasNext()) {
|
||||
FormalParameter fp = itr.next();
|
||||
methParamTypes += resultSet.resolveType(fp.getType()).resolvedType.acceptTV(new TypeToDescriptor()) + ";";
|
||||
// methParamTypes += resultSet.resolveType(fp.getType()).resolvedType.acceptTV(new TypeToSignature())+";";
|
||||
}
|
||||
|
||||
if (methodNameAndParamsT.contains(methParamTypes)) {
|
||||
System.out.println("ignore - Method: " + field.name + " , paramsType: " + methParamTypes);
|
||||
if (methodNameAndParamsT.contains(id)) {
|
||||
return;
|
||||
}
|
||||
methodNameAndParamsT.add(methParamTypes);
|
||||
System.out.println("Method: " + field.name + " , paramsType: " + methParamTypes);
|
||||
methodNameAndParamsT.add(id);
|
||||
System.out.println("Constructor: " + field.name + " , paramsType: " + id);
|
||||
|
||||
String desc = null;
|
||||
boolean hasGen = false;
|
||||
@ -353,10 +253,11 @@ public class BytecodeGen implements ASTVisitor {
|
||||
}
|
||||
String sig = null;
|
||||
if (hasGen) {
|
||||
HashMap<TPHConstraint, HashSet<String>> constraints = Simplify.simplifyConstraints(field.name, tphExtractor,
|
||||
tphsClass);
|
||||
Signature signature = new Signature(field, genericsAndBounds, methodParamsAndTypes, resultSet, constraints);
|
||||
sig = signature.toString();
|
||||
List<GenericsGeneratorResult> constraints = generatedGenerics.getClassConstraints();
|
||||
Signature signature = new Signature(genericsAndBounds,
|
||||
methodParamsAndTypes, resultSet, constraints);
|
||||
|
||||
sig = signature.createSignatureForConstructor(field);
|
||||
}
|
||||
if (field.getParameterList().iterator().hasNext())
|
||||
System.out.println(field.getParameterList().iterator().next().getType().acceptTV(new TypeToDescriptor()));
|
||||
@ -372,7 +273,7 @@ public class BytecodeGen implements ASTVisitor {
|
||||
constructorPos += 1;
|
||||
|
||||
BytecodeGenMethod gen = new BytecodeGenMethod(className, superClass, resultSet, field, mv, paramsAndLocals, cw,
|
||||
genericsAndBoundsMethod, genericsAndBounds, isInterface, classFiles, sf, path, block, constructorPos);
|
||||
genericsAndBoundsMethod, genericsAndBounds, isInterface, classFiles, sf, path, block, constructorPos, classLoader);
|
||||
if (!field.getParameterList().iterator().hasNext()
|
||||
&& !(field.block.statements.get(field.block.statements.size() - 1) instanceof ReturnVoid)) {
|
||||
mv.visitInsn(Opcodes.RETURN);
|
||||
@ -387,24 +288,19 @@ public class BytecodeGen implements ASTVisitor {
|
||||
// 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 retType = resultSet.resolveType(method.getReturnType()).resolvedType.acceptTV(new TypeToSignature());
|
||||
String methParamTypes = retType + method.name + "%%";
|
||||
method.getParameterList().accept(this);
|
||||
|
||||
String id = MethodUtility.createID(resolver, method);
|
||||
|
||||
Iterator<FormalParameter> itr = method.getParameterList().iterator();
|
||||
while (itr.hasNext()) {
|
||||
FormalParameter fp = itr.next();
|
||||
methParamTypes += resultSet.resolveType(fp.getType()).resolvedType.acceptTV(new TypeToDescriptor()) + ";";
|
||||
// methParamTypes += resultSet.resolveType(fp.getType()).resolvedType.acceptTV(new TypeToSignature())+";";
|
||||
}
|
||||
|
||||
if (methodNameAndParamsT.contains(methParamTypes)) {
|
||||
if (methodNameAndParamsT.contains(id)) {
|
||||
return;
|
||||
}
|
||||
methodNameAndParamsT.add(methParamTypes);
|
||||
System.out.println("Method: " + method.name + " , paramsType: " + methParamTypes);
|
||||
methodNameAndParamsT.add(id);
|
||||
System.out.println("Method: " + method.name + " , paramsType: " + id);
|
||||
// stores generics and their bounds of method
|
||||
HashMap<String, String> genericsAndBoundsMethod = new HashMap<>();
|
||||
|
||||
method.getParameterList().accept(this);
|
||||
|
||||
String methDesc = null;
|
||||
|
||||
// Method getModifiers() ?
|
||||
@ -443,43 +339,27 @@ public class BytecodeGen implements ASTVisitor {
|
||||
// zwite operand muss weggelassen werden
|
||||
if (hasGen || resultSet.resolveType(method.getReturnType()).resolvedType.acceptTV(new TypeToString())
|
||||
.equals("TPH")) {
|
||||
System.out.println("ALL CONST: " + tphExtractor.allCons.size());
|
||||
tphExtractor.allCons.forEach(c -> System.out.println(c.toString()));
|
||||
System.out.println("----------------");
|
||||
HashMap<TPHConstraint, HashSet<String>> constraints = Simplify.simplifyConstraints(method.name,
|
||||
tphExtractor, tphsClass);
|
||||
// ArrayList<GenericInsertPair> pairs = simplifyPairs(method.name,tphExtractor.allPairs,tphExtractor.allCons);
|
||||
Signature signature = new Signature(method, genericsAndBoundsMethod, genericsAndBounds,
|
||||
methodParamsAndTypes, resultSet, constraints);
|
||||
sig = signature.toString();
|
||||
if (simplifyResults.containsKey(className)) {
|
||||
simplifyResults.get(className).getMethodsConstraints().put(methParamTypes, constraints);
|
||||
} else {
|
||||
SimplifyResult sRes = new SimplifyResult(new ArrayList<>(), new ArrayList<>(), new HashMap<>());
|
||||
sRes.getMethodsConstraints().put(methParamTypes, constraints);
|
||||
simplifyResults.put(className, sRes);
|
||||
}
|
||||
|
||||
|
||||
List<GenericsGeneratorResult> constraints = generatedGenerics.getMethodConstraintsByID(id);
|
||||
List<GenericsGeneratorResult> classConstraints = generatedGenerics.getClassConstraints();
|
||||
Signature signature = new Signature(genericsAndBoundsMethod, genericsAndBounds,
|
||||
methodParamsAndTypes, resultSet, constraints,classConstraints);
|
||||
sig = signature.createSignatureForMethod(method);
|
||||
}
|
||||
System.out.println(method.getName() + " ==> " + 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, superClass, resultSet, method, mv, paramsAndLocals, cw,
|
||||
genericsAndBoundsMethod, genericsAndBounds, isInterface, classFiles, sf, path);
|
||||
genericsAndBoundsMethod, genericsAndBounds, isInterface, classFiles, sf, path, classLoader);
|
||||
|
||||
mv.visitMaxs(0, 0);
|
||||
mv.visitEnd();
|
||||
}
|
||||
|
||||
public HashMap<String, SimplifyResult> getSimplifyResults() {
|
||||
return simplifyResults;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void visit(ParameterList formalParameters) {
|
||||
paramsAndLocals = new HashMap<>();
|
||||
@ -550,7 +430,7 @@ public class BytecodeGen implements ASTVisitor {
|
||||
}
|
||||
des += ";";
|
||||
System.out.println(des);
|
||||
String sig = resultSet.resolveType(field.getType()).resolvedType.acceptTV(new TypeToSignature());
|
||||
String sig = resultSet.resolveType(field.getType()).resolvedType.acceptTV(new TypeToSignature(generatedGenerics.getClassConstraints()));
|
||||
System.out.println(sig);
|
||||
if (sig.charAt(sig.length() - 1) != (";").charAt(0)) {
|
||||
sig += ";";
|
||||
|
@ -15,7 +15,10 @@ import de.dhbwstuttgart.bytecode.constraint.ExtendsConstraint;
|
||||
import de.dhbwstuttgart.bytecode.constraint.TPHConstraint;
|
||||
import de.dhbwstuttgart.bytecode.constraint.TPHConstraint.Relation;
|
||||
import de.dhbwstuttgart.bytecode.utilities.MethodAndTPH;
|
||||
import de.dhbwstuttgart.bytecode.utilities.MethodUtility;
|
||||
import de.dhbwstuttgart.bytecode.utilities.Resolver;
|
||||
import de.dhbwstuttgart.syntaxtree.AbstractASTWalker;
|
||||
import de.dhbwstuttgart.syntaxtree.ClassOrInterface;
|
||||
import de.dhbwstuttgart.syntaxtree.Constructor;
|
||||
import de.dhbwstuttgart.syntaxtree.Field;
|
||||
import de.dhbwstuttgart.syntaxtree.FormalParameter;
|
||||
@ -38,16 +41,18 @@ import de.dhbwstuttgart.typeinference.result.ResultSet;
|
||||
public class TPHExtractor extends AbstractASTWalker {
|
||||
// Alle TPHs der Felder werden iKopf der Klasse definiert
|
||||
// alle TPHs der Klasse: (TPH, is in Method?)
|
||||
final HashMap<String, Boolean> allTPHS = new HashMap<>();
|
||||
public final HashMap<String, Boolean> allTPHS = new HashMap<>();
|
||||
public final List<String> tphsClass = new ArrayList<>();
|
||||
MethodAndTPH methodAndTph;
|
||||
|
||||
Boolean inMethod = false;
|
||||
boolean inLocalOrParam = false;
|
||||
boolean inLocalOrParamOrReturn = false;
|
||||
|
||||
public final ArrayList<MethodAndTPH> ListOfMethodsAndTph = new ArrayList<>();
|
||||
final ArrayList<ResultPair<TypePlaceholder, TypePlaceholder>> allPairs = new ArrayList<>();
|
||||
public final ArrayList<TPHConstraint> allCons = new ArrayList<>();
|
||||
private ResultSet resultSet;
|
||||
private Resolver resolver;
|
||||
|
||||
public TPHExtractor() {
|
||||
|
||||
@ -55,16 +60,30 @@ public class TPHExtractor extends AbstractASTWalker {
|
||||
|
||||
public void setResultSet(ResultSet resultSet) {
|
||||
this.resultSet = resultSet;
|
||||
this.resolver = new Resolver(resultSet);
|
||||
}
|
||||
|
||||
public Resolver getResolver() {
|
||||
return resolver;
|
||||
}
|
||||
|
||||
// @Override
|
||||
// public void visit(ClassOrInterface classOrInterface) {
|
||||
// inMethod = false;
|
||||
// classOrInterface.getfieldInitializations().ifPresent(c->c.block.accept(this));
|
||||
// super.visit(classOrInterface);
|
||||
// inMethod = true;
|
||||
// }
|
||||
@Override
|
||||
public void visit(TypePlaceholder tph) {
|
||||
if (resultSet.resolveType(tph).resolvedType instanceof TypePlaceholder) {
|
||||
TypePlaceholder resolvedTPH = (TypePlaceholder) resultSet.resolveType(tph).resolvedType;
|
||||
if (inMethod) {
|
||||
methodAndTph.getTphs().add(resolvedTPH.getName());
|
||||
if (inLocalOrParam)
|
||||
if (inLocalOrParamOrReturn)
|
||||
methodAndTph.getLocalTphs().add(resolvedTPH.getName());
|
||||
}else {
|
||||
tphsClass.add(resolvedTPH.getName());
|
||||
}
|
||||
|
||||
allTPHS.put(resolvedTPH.getName(), inMethod);
|
||||
@ -98,7 +117,7 @@ public class TPHExtractor extends AbstractASTWalker {
|
||||
if (inMethod)
|
||||
methodAndTph.getPairs().add(ag);
|
||||
allPairs.add(ag);
|
||||
TPHConstraint con = new ExtendsConstraint(ag.getLeft().getName(), ag.getRight().getName(), Relation.EXTENDS);
|
||||
TPHConstraint con = new ExtendsConstraint(ag.getLeft().getName(), ag.getRight().getName());
|
||||
if(!containsConstraint(allCons,con))
|
||||
allCons.add(con);
|
||||
// }
|
||||
@ -111,7 +130,7 @@ public class TPHExtractor extends AbstractASTWalker {
|
||||
|
||||
private static boolean containsConstraint(ArrayList<TPHConstraint> allCons, TPHConstraint c) {
|
||||
for(TPHConstraint con:allCons) {
|
||||
if(c.getLeft().equals(con.getLeft()) && c.getRight().equals(c.getRight())) {
|
||||
if(c.getLeft().equals(con.getLeft()) && c.getRight().equals(con.getRight())) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@ -134,9 +153,11 @@ public class TPHExtractor extends AbstractASTWalker {
|
||||
public void visit(GenericRefType genericRefType) {
|
||||
String name = genericRefType.getParsedName();
|
||||
if (inMethod) {
|
||||
methodAndTph.getLocalTphs().add(name);
|
||||
if (inLocalOrParam)
|
||||
methodAndTph.getTphs().add(name);
|
||||
if (inLocalOrParamOrReturn)
|
||||
methodAndTph.getLocalTphs().add(name);
|
||||
}else {
|
||||
tphsClass.add(name);
|
||||
}
|
||||
allTPHS.put(name, inMethod);
|
||||
}
|
||||
@ -153,8 +174,17 @@ public class TPHExtractor extends AbstractASTWalker {
|
||||
@Override
|
||||
public void visit(Method method) {
|
||||
inMethod = true;
|
||||
methodAndTph = new MethodAndTPH(method.name);
|
||||
super.visit(method);
|
||||
String id = MethodUtility.createID(resolver,method);
|
||||
methodAndTph = new MethodAndTPH(id);
|
||||
|
||||
inLocalOrParamOrReturn = true;
|
||||
method.getReturnType().accept(this);
|
||||
method.getParameterList().accept(this);
|
||||
inLocalOrParamOrReturn = false;
|
||||
|
||||
if(method.block != null)
|
||||
method.block.accept(this);
|
||||
|
||||
inMethod = false;
|
||||
ListOfMethodsAndTph.add(methodAndTph);
|
||||
}
|
||||
@ -162,29 +192,32 @@ public class TPHExtractor extends AbstractASTWalker {
|
||||
@Override
|
||||
public void visit(Constructor cons) {
|
||||
inMethod = false;
|
||||
super.visit(cons);
|
||||
inMethod = true;
|
||||
//super.visit(cons);
|
||||
cons.getParameterList().accept(this);
|
||||
if(cons.block != null)
|
||||
cons.block.accept(this);
|
||||
inMethod = true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void visit(LocalVarDecl localVarDecl) {
|
||||
inLocalOrParam = true;
|
||||
// inLocalOrParamOrReturn = inMethod;
|
||||
super.visit(localVarDecl);
|
||||
inLocalOrParam = false;
|
||||
// inLocalOrParamOrReturn = false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void visit(LocalVar localVar) {
|
||||
inLocalOrParam = true;
|
||||
// inLocalOrParamOrReturn = inMethod;
|
||||
super.visit(localVar);
|
||||
inLocalOrParam = false;
|
||||
// inLocalOrParamOrReturn = false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void visit(ParameterList formalParameters) {
|
||||
inLocalOrParam = true;
|
||||
inLocalOrParamOrReturn = inMethod;
|
||||
super.visit(formalParameters);
|
||||
inLocalOrParam = false;
|
||||
inLocalOrParamOrReturn = false;
|
||||
}
|
||||
|
||||
}
|
@ -2,8 +2,8 @@ package de.dhbwstuttgart.bytecode.constraint;
|
||||
|
||||
public class EqualConstraint extends TPHConstraint {
|
||||
|
||||
public EqualConstraint(String left, String right, Relation rel) {
|
||||
super(left, right, rel);
|
||||
public EqualConstraint(String left, String right) {
|
||||
super(left, right, Relation.EQUAL);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -2,8 +2,8 @@ package de.dhbwstuttgart.bytecode.constraint;
|
||||
|
||||
public class ExtendsConstraint extends TPHConstraint {
|
||||
|
||||
public ExtendsConstraint(String left, String right, Relation rel) {
|
||||
super(left, right, rel);
|
||||
public ExtendsConstraint(String left, String right) {
|
||||
super(left, right, Relation.EXTENDS);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -44,6 +44,10 @@ public class TPHConstraint {
|
||||
return left.equals(tph)||right.equals(tph);
|
||||
}
|
||||
|
||||
public boolean equalConstraint(TPHConstraint constraint) {
|
||||
return rel == constraint.getRel() && left.equals(constraint.getLeft()) && right.equals(constraint.getRight());
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
if(rel == Relation.EXTENDS) {
|
||||
|
@ -3,29 +3,27 @@ package de.dhbwstuttgart.bytecode.descriptor;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
|
||||
import de.dhbwstuttgart.bytecode.utilities.*;
|
||||
import de.dhbwstuttgart.syntaxtree.statement.ArgumentList;
|
||||
import org.objectweb.asm.Type;
|
||||
|
||||
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{
|
||||
public class DescriptorToString implements DescriptorVisitor, CONSTANTS {
|
||||
ResultSet resultSet;
|
||||
|
||||
|
||||
public DescriptorToString() {
|
||||
}
|
||||
|
||||
public DescriptorToString(ResultSet resultSet) {
|
||||
this.resultSet = resultSet;
|
||||
}
|
||||
|
||||
private String addReturnType(String desc, RefTypeOrTPHOrWildcardOrGeneric returnType, ResultSet resultSet) {
|
||||
if(resultSet.resolveType(returnType).resolvedType.toString().equals("void")){
|
||||
if(resultSet.resolveType(returnType).resolvedType.toString().equals(CONSTANTS.VOID)){
|
||||
desc = desc + ")V";
|
||||
}else {
|
||||
desc = desc + ")" + "L"+resultSet.resolveType(returnType).resolvedType.acceptTV(new TypeToDescriptor())+ ";";
|
||||
@ -53,7 +51,7 @@ public class DescriptorToString implements DescriptorVisitor{
|
||||
}else {
|
||||
// desc += "L"+resultSet.resolveType(fp.getType()).resolvedType.acceptTV(new TypeToDescriptor())+ ";";
|
||||
String resType = resultSet.resolveType(fp.getType()).resolvedType.acceptTV(new TypeToDescriptor());
|
||||
if(resType.contains("TPH ")/*resType.subSequence(0, 4).equals("TPH ")*/) {
|
||||
if(resType.contains(CONSTANTS.TPH)/*resType.subSequence(0, 4).equals("TPH ")*/) {
|
||||
// Bound ist immer Object
|
||||
desc += "L"+Type.getInternalName(Object.class)+ ";";
|
||||
} else {
|
||||
@ -71,15 +69,15 @@ public class DescriptorToString implements DescriptorVisitor{
|
||||
}
|
||||
}
|
||||
//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 if(resultSet.resolveType(fp.getType()).resolvedType.acceptTV(new TypeToDescriptor()).contains(CONSTANTS.ANGLEBRACKET)){
|
||||
desc += "L"+resultSet.resolveType(fp.getType()).resolvedType.toString().replace(".", "$$").replace(CONSTANTS.ANGLEBRACKET, "$$$").replace(">", "$$$")+ ";";
|
||||
}
|
||||
else {
|
||||
desc += "L"+resultSet.resolveType(fp.getType()).resolvedType.acceptTV(new TypeToDescriptor())+ ";";
|
||||
}
|
||||
}
|
||||
|
||||
if(resultSet.resolveType(method.getReturnType()).resolvedType.toString().equals("void")) {
|
||||
if(resultSet.resolveType(method.getReturnType()).resolvedType.toString().equals(CONSTANTS.VOID)) {
|
||||
desc += ")V";
|
||||
}else {
|
||||
if(method.hasGen()) {
|
||||
@ -90,7 +88,7 @@ public class DescriptorToString implements DescriptorVisitor{
|
||||
desc += ")L"+method.getGenericsAndBounds().get(ret)+ ";";
|
||||
}else {
|
||||
String resType = resultSet.resolveType(method.getReturnType()).resolvedType.acceptTV(new TypeToDescriptor());
|
||||
if(resType.contains("TPH ")/*resType.subSequence(0, 4).equals("TPH ")*/) {
|
||||
if(resType.contains(CONSTANTS.TPH)/*resType.subSequence(0, 4).equals("TPH ")*/) {
|
||||
// desc += ")" + "L"+method.getGenericsAndBoundsMethod().get(resType.substring(4)+"$")+ ";";
|
||||
desc += ")" + "L"+Type.getInternalName(Object.class)+ ";";
|
||||
} else {
|
||||
@ -139,7 +137,7 @@ public class DescriptorToString implements DescriptorVisitor{
|
||||
}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 ")) {
|
||||
if(resType.subSequence(0, 4).equals(CONSTANTS.TPH)) {
|
||||
// Bound ist immer Object
|
||||
desc += "L"+Type.getInternalName(Object.class)+ ";";
|
||||
} else {
|
||||
@ -162,7 +160,7 @@ public class DescriptorToString implements DescriptorVisitor{
|
||||
while(itr.hasNext()) {
|
||||
FormalParameter fp = itr.next();
|
||||
String d = resultSet.resolveType(fp.getType()).resolvedType.acceptTV(new TypeToDescriptor());
|
||||
if(d.contains("TPH ") ||d.contains("<")) {
|
||||
if(d.contains(CONSTANTS.TPH) ||d.contains(CONSTANTS.ANGLEBRACKET)) {
|
||||
desc += "L"+Type.getInternalName(Object.class)+ ";";
|
||||
}else {
|
||||
desc = desc + "L"+ d + ";";
|
||||
@ -171,7 +169,7 @@ public class DescriptorToString implements DescriptorVisitor{
|
||||
|
||||
String retType = resultSet.resolveType(lambdaExpression.getReturnType()).resolvedType.acceptTV(new TypeToDescriptor());
|
||||
|
||||
if(retType.contains("TPH ")|| retType.contains("<")){
|
||||
if(retType.contains(CONSTANTS.TPH)|| retType.contains(CONSTANTS.ANGLEBRACKET)){
|
||||
desc += ")L"+Type.getInternalName(Object.class)+ ";";
|
||||
}else {
|
||||
desc = desc + ")"+"L"+retType+";";
|
||||
@ -187,7 +185,7 @@ public class DescriptorToString implements DescriptorVisitor{
|
||||
RefTypeOrTPHOrWildcardOrGeneric rt = itr.next();
|
||||
String d = resultSet.resolveType(rt).resolvedType.acceptTV(new TypeToDescriptor());
|
||||
|
||||
if(d.contains("TPH ") ||d.contains("<")) {
|
||||
if(d.contains(CONSTANTS.TPH) ||d.contains(CONSTANTS.ANGLEBRACKET)) {
|
||||
desc += "L"+Type.getInternalName(Object.class)+ ";";
|
||||
}else {
|
||||
desc += "L"+ d + ";";
|
||||
@ -196,7 +194,7 @@ public class DescriptorToString implements DescriptorVisitor{
|
||||
}
|
||||
String retType = resultSet.resolveType(samMethod.getReturnType()).resolvedType.acceptTV(new TypeToDescriptor());
|
||||
|
||||
if(retType.contains("TPH ")|| retType.contains("<")){
|
||||
if(retType.contains(CONSTANTS.TPH)|| retType.contains(CONSTANTS.ANGLEBRACKET)){
|
||||
desc += ")L"+Type.getInternalName(Object.class)+ ";";
|
||||
}else {
|
||||
desc = desc + ")"+"L"+retType+";";
|
||||
@ -210,7 +208,7 @@ public class DescriptorToString implements DescriptorVisitor{
|
||||
for(Expression e : methodFromMethodCall.getArgList().getArguments()) {
|
||||
String d = resultSet.resolveType(e.getType()).resolvedType.acceptTV(new TypeToDescriptor());
|
||||
|
||||
if(d.contains("TPH ") ||d.contains("<") || methodFromMethodCall.getReceiverName().contains("$$")) {
|
||||
if(d.contains(CONSTANTS.TPH) ||d.contains(CONSTANTS.ANGLEBRACKET) || methodFromMethodCall.getReceiverName().contains("$$")) {
|
||||
desc += "L"+Type.getInternalName(Object.class)+ ";";
|
||||
}else {
|
||||
if(methodFromMethodCall.getGenericsAndBoundsMethod().containsKey(d)) {
|
||||
@ -225,9 +223,9 @@ public class DescriptorToString implements DescriptorVisitor{
|
||||
}
|
||||
String retType = resultSet.resolveType(methodFromMethodCall.getReturnType()).resolvedType.acceptTV(new TypeToDescriptor());
|
||||
System.out.println("DescriptorToString retType = " + retType);
|
||||
if(retType.equals("void")) {
|
||||
if(retType.equals(CONSTANTS.VOID)) {
|
||||
desc += ")V";
|
||||
}else if(retType.contains("TPH ")|| retType.contains("<") || methodFromMethodCall.getReceiverName().contains("$$")){
|
||||
}else if(retType.contains(CONSTANTS.TPH)|| retType.contains(CONSTANTS.ANGLEBRACKET) || methodFromMethodCall.getReceiverName().contains("$$")){
|
||||
desc += ")L"+Type.getInternalName(Object.class)+ ";";
|
||||
}else {
|
||||
if(methodFromMethodCall.getGenericsAndBoundsMethod().containsKey(retType)) {
|
||||
@ -241,5 +239,21 @@ public class DescriptorToString implements DescriptorVisitor{
|
||||
// desc = addReturnType(desc, methodFromMethodCall.getReturnType(), resultSet);
|
||||
return desc;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String createDescForFunN(ArgumentList argumentList, String returnType) {
|
||||
Iterator<Expression> itr1 = argumentList.getArguments().iterator();
|
||||
String methDesc = "(";
|
||||
while(itr1.hasNext()) {
|
||||
methDesc += "L" + Type.getInternalName(Object.class) + ";";
|
||||
itr1.next();
|
||||
}
|
||||
if (returnType.equals(CONSTANTS.VOID)){
|
||||
methDesc += ")V";
|
||||
} else {
|
||||
methDesc += ")L" + Type.getInternalName(Object.class) + ";";
|
||||
}
|
||||
return methDesc;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -5,11 +5,13 @@ 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.statement.ArgumentList;
|
||||
|
||||
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);
|
||||
String visit(NormalMethod method);
|
||||
String visit(NormalConstructor constructor);
|
||||
String visit(Lambda lambdaExpression);
|
||||
String visit(SamMethod samMethod);
|
||||
String visit(MethodFromMethodCall methodFromMethodCall);
|
||||
String createDescForFunN(ArgumentList argumentList, String returnType);
|
||||
}
|
||||
|
@ -20,7 +20,8 @@ public class TypeToDescriptor implements TypeVisitor<String>{
|
||||
@Override
|
||||
public String visit(SuperWildcardType superWildcardType) {
|
||||
System.out.println("\nWILDCARD ="+superWildcardType.getInnerType().toString().replace(".", "/"));
|
||||
return superWildcardType.getInnerType().toString().replace(".", "/");
|
||||
//return superWildcardType.getInnerType().toString().replace(".", "/");
|
||||
return superWildcardType.getInnerType().acceptTV(new TypeToDescriptor());
|
||||
//throw new NotImplementedException();
|
||||
}
|
||||
|
||||
@ -32,7 +33,8 @@ public class TypeToDescriptor implements TypeVisitor<String>{
|
||||
@Override
|
||||
public String visit(ExtendsWildcardType extendsWildcardType) {
|
||||
System.out.println("\nWILDCARD extends ="+extendsWildcardType.getInnerType().toString().replace(".", "/"));
|
||||
return extendsWildcardType.getInnerType().toString().replace(".", "/");
|
||||
//return extendsWildcardType.getInnerType().toString().replace(".", "/");
|
||||
return extendsWildcardType.getInnerType().acceptTV(new TypeToDescriptor());
|
||||
//throw new NotImplementedException();
|
||||
}
|
||||
|
||||
|
53
src/main/java/de/dhbwstuttgart/bytecode/genericsGenerator/ConstraintsSimplierResult.java
Normal file
@ -0,0 +1,53 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
package de.dhbwstuttgart.bytecode.genericsGenerator;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import de.dhbwstuttgart.bytecode.genericsGeneratorTypes.NameReplacementResult;
|
||||
import de.dhbwstuttgart.bytecode.genericsGeneratorTypes.GenericsGeneratorResult;
|
||||
|
||||
/**
|
||||
* This class represents the result of the constraints simplifier.
|
||||
*
|
||||
* @author fayez
|
||||
*
|
||||
*/
|
||||
public class ConstraintsSimplierResult {
|
||||
private List<GenericsGeneratorResult> genericsGenResults;
|
||||
private List<NameReplacementResult> nameReplacementResults;
|
||||
/**
|
||||
* @param genericsGenResults
|
||||
*/
|
||||
public ConstraintsSimplierResult(List<GenericsGeneratorResult> genericsGenResults,
|
||||
List<NameReplacementResult> nameReplacementResults) {
|
||||
this.genericsGenResults = genericsGenResults;
|
||||
this.setNameReplacementResults(nameReplacementResults);
|
||||
}
|
||||
/**
|
||||
* @return the genericsGenResults
|
||||
*/
|
||||
public List<GenericsGeneratorResult> getGenericsGenResults() {
|
||||
return genericsGenResults;
|
||||
}
|
||||
/**
|
||||
* @param genericsGenResults the genericsGenResults to set
|
||||
*/
|
||||
public void setGenericsGenResults(List<GenericsGeneratorResult> genericsGenResults) {
|
||||
this.genericsGenResults = genericsGenResults;
|
||||
}
|
||||
/**
|
||||
* @return the nameReplacementResults
|
||||
*/
|
||||
public List<NameReplacementResult> getNameReplacementResults() {
|
||||
return nameReplacementResults;
|
||||
}
|
||||
/**
|
||||
* @param nameReplacementResults the nameReplacementResults to set
|
||||
*/
|
||||
public void setNameReplacementResults(List<NameReplacementResult> nameReplacementResults) {
|
||||
this.nameReplacementResults = nameReplacementResults;
|
||||
}
|
||||
|
||||
}
|
137
src/main/java/de/dhbwstuttgart/bytecode/genericsGenerator/ConstraintsSimplifier.java
Normal file
@ -0,0 +1,137 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
package de.dhbwstuttgart.bytecode.genericsGenerator;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import de.dhbwstuttgart.bytecode.TPHExtractor;
|
||||
import de.dhbwstuttgart.bytecode.constraint.TPHConstraint;
|
||||
import de.dhbwstuttgart.bytecode.genericsGeneratorTypes.*;
|
||||
|
||||
/**
|
||||
* @author fayez
|
||||
*
|
||||
*/
|
||||
public class ConstraintsSimplifier {
|
||||
public static ConstraintsSimplierResult simplifyConstraints(final TPHExtractor tphExtractor, final List<GenericsGeneratorResult> genericsGeneratorResults, final List<String> tphsClass) {
|
||||
|
||||
List<TPHConstraint> allCons = tphExtractor.allCons;
|
||||
List<TPHConstraint> equalCons = new ArrayList<>();
|
||||
|
||||
/* Step 1 */
|
||||
List<ConstraintsWithSameLeftSide> foundCons = GenericsGeneratorUtility.findConstraintsWithLeftSameLeftSide(allCons);
|
||||
if(!foundCons.isEmpty()) {
|
||||
List<TPHConstraint> equalCons2 = new ArrayList<>();
|
||||
GenericsGeneratorUtility.simplifyConstraintsWithSameLeftSide(foundCons,tphExtractor,tphsClass,equalCons2);
|
||||
equalCons.addAll(equalCons2);
|
||||
}
|
||||
|
||||
// if(!simpleCycles.isEmpty()) {
|
||||
// handleSimpleCycles(allCons, simpleCycles,tphExtractor);
|
||||
// equalCons.addAll(GenericsGeneratorUtility.getEqualConstraints(allCons));
|
||||
// }
|
||||
//
|
||||
List<Cycle> cycles = findCycles(allCons);
|
||||
|
||||
if(!cycles.isEmpty()) {
|
||||
handleCycle(genericsGeneratorResults, allCons, cycles,tphExtractor);
|
||||
}
|
||||
/* The right hand side of equal constraint is the new name in name replacement result */
|
||||
List<NameReplacementResult> nameReplacementResults = GenericsGeneratorUtility.createNameReplacementResultsFromEqualConstraints(equalCons);
|
||||
getEqualsFromNameReplacementResults(genericsGeneratorResults,nameReplacementResults);
|
||||
ConstraintsSimplierResult result = new ConstraintsSimplierResult(genericsGeneratorResults, nameReplacementResults);
|
||||
return result;
|
||||
}
|
||||
|
||||
private static void getEqualsFromNameReplacementResults(List<GenericsGeneratorResult> genericsGeneratorResults,
|
||||
List<NameReplacementResult> nameReplacementResults) {
|
||||
genericsGeneratorResults.forEach(g->{
|
||||
String tph = g.getConstraint().getLeft();
|
||||
if (!nameReplacementResults.isEmpty()) {
|
||||
collectAllEquals(nameReplacementResults, g, tph);
|
||||
}
|
||||
|
||||
if (!nameReplacementResults.isEmpty()) {
|
||||
collectAllEquals(nameReplacementResults, g);
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
private static void collectAllEquals(List<NameReplacementResult> nameReplacementResults, GenericsGeneratorResult g) {
|
||||
Set<String> equalsTPHs = g.getEqualsTPHs();
|
||||
Set<String> tphsToAdd = getAllEqualTphs(equalsTPHs, nameReplacementResults);
|
||||
while (!tphsToAdd.isEmpty()){
|
||||
equalsTPHs.addAll(tphsToAdd);
|
||||
tphsToAdd = getAllEqualTphs(equalsTPHs, nameReplacementResults);
|
||||
}
|
||||
}
|
||||
|
||||
private static Set<String> getAllEqualTphs(Set<String> equalsTPHs, List<NameReplacementResult> nameReplacementResults) {
|
||||
Set<String> tphsToAdd = new HashSet<>();
|
||||
equalsTPHs.forEach(e->{
|
||||
collectAllEquals(nameReplacementResults, tphsToAdd,e);
|
||||
});
|
||||
return tphsToAdd;
|
||||
}
|
||||
|
||||
public static void collectAllEquals(List<NameReplacementResult> nameReplacementResults, Set<String> tphsToAdd,
|
||||
String tph) {
|
||||
List<NameReplacementResult> toRemoveList = new ArrayList<>();
|
||||
Optional<NameReplacementResult> nameReplacementResult = nameReplacementResults.stream().filter(n->n.getName().equals(tph)).findFirst();
|
||||
nameReplacementResult.ifPresent(toRemove->{
|
||||
tphsToAdd.addAll(toRemove.getOldNames());
|
||||
toRemoveList.add(toRemove);
|
||||
});
|
||||
if(!toRemoveList.isEmpty()){
|
||||
nameReplacementResults.remove(toRemoveList.get(0));
|
||||
toRemoveList.clear();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param nameReplacementResults
|
||||
* @param g
|
||||
* @param tph
|
||||
*/
|
||||
public static void collectAllEquals(List<NameReplacementResult> nameReplacementResults, GenericsGeneratorResult g,
|
||||
String tph) {
|
||||
List<NameReplacementResult> toRemoveList = new ArrayList<>();
|
||||
Optional<NameReplacementResult> nameReplacementResult = nameReplacementResults.stream().filter(n->n.getName().equals(tph)).findFirst();
|
||||
nameReplacementResult.ifPresent(toRemove->{
|
||||
g.getEqualsTPHs().addAll(toRemove.getOldNames());
|
||||
toRemoveList.add(toRemove);
|
||||
});
|
||||
if(!toRemoveList.isEmpty()){
|
||||
nameReplacementResults.remove(toRemoveList.get(0));
|
||||
toRemoveList.clear();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param genericsGeneratorResults
|
||||
* @param allCons
|
||||
* @param cycles
|
||||
* @param tphExtractor
|
||||
*/
|
||||
public static void handleCycle(List<GenericsGeneratorResult> genericsGeneratorResults,
|
||||
List<TPHConstraint> allCons, List<Cycle> cycles, TPHExtractor tphExtractor) {
|
||||
GenericsGeneratorUtility.modifyRelationForConstraintsInCycle(cycles);
|
||||
List<NameReplacementResult> nameReplacementResults = GenericsGeneratorUtility.substituteTPHSFormCycle(allCons, cycles,tphExtractor);
|
||||
GenericsGeneratorUtility.createResults(genericsGeneratorResults,nameReplacementResults);
|
||||
GenericsGeneratorUtility.removeEqualConstraints(allCons);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param allCons
|
||||
* @return
|
||||
*/
|
||||
public static List<Cycle> findCycles(List<TPHConstraint> allCons) {
|
||||
/* find all cycles */
|
||||
CyclesFinder cyclesFinder = new CyclesFinder(allCons);
|
||||
List<Cycle> cycles = cyclesFinder.findCycles();
|
||||
return cycles;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,106 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
package de.dhbwstuttgart.bytecode.genericsGenerator;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
|
||||
import de.dhbwstuttgart.bytecode.constraint.TPHConstraint;
|
||||
import de.dhbwstuttgart.bytecode.constraint.TPHConstraint.Relation;
|
||||
import de.dhbwstuttgart.bytecode.genericsGeneratorTypes.Cycle;
|
||||
|
||||
/**
|
||||
* @author fayez
|
||||
*
|
||||
*/
|
||||
public class CyclesFinder {
|
||||
private final List<TPHConstraint> allCons;
|
||||
|
||||
public CyclesFinder(List<TPHConstraint> allCons) {
|
||||
this.allCons = allCons;
|
||||
}
|
||||
|
||||
public List<Cycle> findCycles() {
|
||||
List<TPHConstraint> vistedConstraints = new ArrayList<>(allCons.size());
|
||||
List<Cycle> cycles = new ArrayList<>();
|
||||
for (TPHConstraint constraint : allCons) {
|
||||
if(constraint.getRel()==Relation.EQUAL)
|
||||
continue;
|
||||
if (!vistedConstraints.contains(constraint)) {
|
||||
vistedConstraints.add(constraint);
|
||||
checkConstraint(constraint, vistedConstraints, cycles);
|
||||
}
|
||||
}
|
||||
return cycles;
|
||||
}
|
||||
|
||||
private void checkConstraint(TPHConstraint constraint, List<TPHConstraint> vistedConstraints,
|
||||
List<Cycle> cycles) {
|
||||
List<String> tphsInRelation = new LinkedList<>();
|
||||
List<TPHConstraint> maybeCycle = new ArrayList<>();
|
||||
maybeCycle.add(constraint);
|
||||
tphsInRelation.add(constraint.getLeft());
|
||||
tphsInRelation.add(constraint.getRight());
|
||||
Optional<TPHConstraint> nextConstraint = getConstraintInRelation(tphsInRelation, maybeCycle);
|
||||
while (nextConstraint.isPresent()) {
|
||||
if(containsInLongCycle(nextConstraint.get(), cycles)) {
|
||||
break;
|
||||
}
|
||||
if (isCycle(tphsInRelation)) {
|
||||
addAllToVisitedConstraints(vistedConstraints, maybeCycle);
|
||||
Cycle cycle = new Cycle(maybeCycle);
|
||||
cycles.add(cycle);
|
||||
return;
|
||||
}
|
||||
nextConstraint = getConstraintInRelation(tphsInRelation, maybeCycle);
|
||||
}
|
||||
|
||||
// addAllToVisitedConstraints(vistedConstraints, maybeCycle);
|
||||
}
|
||||
|
||||
private boolean containsInLongCycle(TPHConstraint c, List<Cycle> cycles) {
|
||||
for(Cycle cycle : cycles) {
|
||||
if(cycle.containConstraint(c))
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private void addAllToVisitedConstraints(List<TPHConstraint> vistedConstraints, List<TPHConstraint> maybeCycle) {
|
||||
for (TPHConstraint con : maybeCycle) {
|
||||
if (!vistedConstraints.contains(con))
|
||||
vistedConstraints.add(con);
|
||||
}
|
||||
}
|
||||
|
||||
private Optional<TPHConstraint> getConstraintInRelation(List<String> tphsInRelation,
|
||||
List<TPHConstraint> maybeCycle) {
|
||||
TPHConstraint constraint = getConstraintByLeftSide(tphsInRelation.get(tphsInRelation.size()-1),maybeCycle);
|
||||
Optional<TPHConstraint> nextConstraint = Optional.ofNullable(constraint);
|
||||
if(nextConstraint.isPresent()) {
|
||||
maybeCycle.add(constraint);
|
||||
tphsInRelation.add(constraint.getRight());
|
||||
}
|
||||
return nextConstraint;
|
||||
}
|
||||
|
||||
private TPHConstraint getConstraintByLeftSide(String left, List<TPHConstraint> maybeCycle) {
|
||||
for(TPHConstraint constraint : allCons) {
|
||||
if(constraint.getRel()==Relation.EQUAL)
|
||||
continue;
|
||||
if(maybeCycle.contains(constraint))
|
||||
continue;
|
||||
if(constraint.getLeft().equals(left))
|
||||
return constraint;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private boolean isCycle(List<String> tphsInRelation) {
|
||||
return tphsInRelation.get(0).equals(tphsInRelation.get(tphsInRelation.size() - 1));
|
||||
}
|
||||
|
||||
}
|
675
src/main/java/de/dhbwstuttgart/bytecode/genericsGenerator/GeneratedGenericsFinder.java
Normal file
@ -0,0 +1,675 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
package de.dhbwstuttgart.bytecode.genericsGenerator;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
|
||||
import de.dhbwstuttgart.bytecode.TPHExtractor;
|
||||
import de.dhbwstuttgart.bytecode.genericsGeneratorTypes.GenericGenratorResultForSourceFile;
|
||||
import de.dhbwstuttgart.bytecode.genericsGeneratorTypes.GenericsGeneratorResultForClass;
|
||||
import de.dhbwstuttgart.bytecode.genericsGeneratorTypes.MethodAndConstraints;
|
||||
import de.dhbwstuttgart.bytecode.utilities.MethodAndTPH;
|
||||
import de.dhbwstuttgart.bytecode.utilities.MethodUtility;
|
||||
import de.dhbwstuttgart.bytecode.utilities.Resolver;
|
||||
import de.dhbwstuttgart.parser.SyntaxTreeGenerator.AssignToLocal;
|
||||
import de.dhbwstuttgart.parser.scope.JavaClassName;
|
||||
import de.dhbwstuttgart.syntaxtree.ASTVisitor;
|
||||
import de.dhbwstuttgart.syntaxtree.ClassOrInterface;
|
||||
import de.dhbwstuttgart.syntaxtree.Constructor;
|
||||
import de.dhbwstuttgart.syntaxtree.Field;
|
||||
import de.dhbwstuttgart.syntaxtree.FormalParameter;
|
||||
import de.dhbwstuttgart.syntaxtree.GenericDeclarationList;
|
||||
import de.dhbwstuttgart.syntaxtree.GenericTypeVar;
|
||||
import de.dhbwstuttgart.syntaxtree.Method;
|
||||
import de.dhbwstuttgart.syntaxtree.ParameterList;
|
||||
import de.dhbwstuttgart.syntaxtree.SourceFile;
|
||||
import de.dhbwstuttgart.syntaxtree.statement.ArgumentList;
|
||||
import de.dhbwstuttgart.syntaxtree.statement.Assign;
|
||||
import de.dhbwstuttgart.syntaxtree.statement.AssignToField;
|
||||
import de.dhbwstuttgart.syntaxtree.statement.BinaryExpr;
|
||||
import de.dhbwstuttgart.syntaxtree.statement.Block;
|
||||
import de.dhbwstuttgart.syntaxtree.statement.CastExpr;
|
||||
import de.dhbwstuttgart.syntaxtree.statement.DoStmt;
|
||||
import de.dhbwstuttgart.syntaxtree.statement.EmptyStmt;
|
||||
import de.dhbwstuttgart.syntaxtree.statement.ExpressionReceiver;
|
||||
import de.dhbwstuttgart.syntaxtree.statement.FieldVar;
|
||||
import de.dhbwstuttgart.syntaxtree.statement.ForStmt;
|
||||
import de.dhbwstuttgart.syntaxtree.statement.IfStmt;
|
||||
import de.dhbwstuttgart.syntaxtree.statement.InstanceOf;
|
||||
import de.dhbwstuttgart.syntaxtree.statement.LambdaExpression;
|
||||
import de.dhbwstuttgart.syntaxtree.statement.Literal;
|
||||
import de.dhbwstuttgart.syntaxtree.statement.LocalVar;
|
||||
import de.dhbwstuttgart.syntaxtree.statement.LocalVarDecl;
|
||||
import de.dhbwstuttgart.syntaxtree.statement.MethodCall;
|
||||
import de.dhbwstuttgart.syntaxtree.statement.NewArray;
|
||||
import de.dhbwstuttgart.syntaxtree.statement.NewClass;
|
||||
import de.dhbwstuttgart.syntaxtree.statement.Return;
|
||||
import de.dhbwstuttgart.syntaxtree.statement.ReturnVoid;
|
||||
import de.dhbwstuttgart.syntaxtree.statement.StaticClassName;
|
||||
import de.dhbwstuttgart.syntaxtree.statement.Super;
|
||||
import de.dhbwstuttgart.syntaxtree.statement.SuperCall;
|
||||
import de.dhbwstuttgart.syntaxtree.statement.This;
|
||||
import de.dhbwstuttgart.syntaxtree.statement.UnaryExpr;
|
||||
import de.dhbwstuttgart.syntaxtree.statement.WhileStmt;
|
||||
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.typeinference.result.ResultSet;
|
||||
|
||||
/**
|
||||
* @author fayez
|
||||
*
|
||||
*/
|
||||
public class GeneratedGenericsFinder implements ASTVisitor {
|
||||
private final TPHExtractor tphExtractor = new TPHExtractor();
|
||||
private Collection<ResultSet> listOfResultSets;
|
||||
private SourceFile sf;
|
||||
private List<String> tphsClass;
|
||||
private GenericGenratorResultForSourceFile generatedGenericsForSF;//Ergebnis des GGenerics
|
||||
private ResultSet resultSet;
|
||||
private final List<String> methodNameAndParamsT = new ArrayList<>();
|
||||
|
||||
private String pkgName;
|
||||
private JavaClassName className;
|
||||
private Resolver resolver;
|
||||
|
||||
/**
|
||||
* @param sf
|
||||
* @param listOfResultSets
|
||||
*/
|
||||
public GeneratedGenericsFinder(SourceFile sf, Collection<ResultSet> listOfResultSets) {
|
||||
this.sf = sf;
|
||||
this.listOfResultSets = listOfResultSets;
|
||||
}
|
||||
|
||||
public GenericGenratorResultForSourceFile findGeneratedGenerics() {
|
||||
sf.accept(this);
|
||||
return generatedGenericsForSF;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see
|
||||
* de.dhbwstuttgart.syntaxtree.ASTVisitor#visit(de.dhbwstuttgart.syntaxtree.
|
||||
* SourceFile)
|
||||
*/
|
||||
@Override
|
||||
public void visit(SourceFile sourceFile) {
|
||||
pkgName = sf.getPkgName();
|
||||
generatedGenericsForSF = new GenericGenratorResultForSourceFile(pkgName);
|
||||
for (ClassOrInterface cl : sourceFile.getClasses()) {
|
||||
cl.accept(this);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see
|
||||
* de.dhbwstuttgart.syntaxtree.ASTVisitor#visit(de.dhbwstuttgart.syntaxtree.
|
||||
* ClassOrInterface)
|
||||
*/
|
||||
@Override
|
||||
public void visit(ClassOrInterface classOrInterface) {
|
||||
className = classOrInterface.getClassName();
|
||||
List<ResultSet> listOfResultSetsList = new ArrayList<>(listOfResultSets);
|
||||
|
||||
boolean isVisited = false;
|
||||
|
||||
ConstraintsSimplierResult simplifiedConstraints = null;
|
||||
GenericsGeneratorResultForClass ggResult = null;
|
||||
|
||||
for (int i = 0; i < listOfResultSetsList.size(); i++) {
|
||||
resultSet = listOfResultSetsList.get(i);
|
||||
tphExtractor.setResultSet(resultSet);
|
||||
resolver = new Resolver(resultSet);
|
||||
classOrInterface.accept(tphExtractor);
|
||||
tphsClass = tphExtractor.tphsClass;
|
||||
simplifiedConstraints = GenericsGenerator.simplifyConstraints(tphExtractor, tphsClass);
|
||||
if(!isVisited) {
|
||||
ggResult = GenericsGenerator.generateConstraints(className, tphExtractor, tphsClass,simplifiedConstraints);
|
||||
isVisited = true;
|
||||
}
|
||||
|
||||
for(Method m : classOrInterface.getMethods()) {
|
||||
addMethodConstraints(simplifiedConstraints, ggResult, m);
|
||||
|
||||
}
|
||||
|
||||
if(ggResult != null)
|
||||
generatedGenericsForSF.addGenericGeneratorResultClass(ggResult);
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @param simplifiedConstraints
|
||||
* @param ggResult
|
||||
* @param m
|
||||
*/
|
||||
public void addMethodConstraints(ConstraintsSimplierResult simplifiedConstraints,
|
||||
GenericsGeneratorResultForClass ggResult, Method m) {
|
||||
String id = MethodUtility.createID(resolver, m);
|
||||
boolean isInGGResult = (ggResult != null) && ggResult.contains(id);
|
||||
if(methodNameAndParamsT.contains(id) || isInGGResult)
|
||||
return;
|
||||
methodNameAndParamsT.add(id);
|
||||
Optional<MethodAndTPH> methodAndTPH = GenericsGeneratorUtility.getMethodAndTphs(tphExtractor.ListOfMethodsAndTph,id);
|
||||
methodAndTPH.ifPresent(mt->{
|
||||
MethodAndConstraints methodConstraints = GenericsGenerator.generateConstraintsForMethod(tphExtractor.allCons, mt , simplifiedConstraints, tphsClass);
|
||||
ggResult.getMethodsAndTheirConstraints().getMethodsAndConstraints().add(methodConstraints);
|
||||
});
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see
|
||||
* de.dhbwstuttgart.syntaxtree.ASTVisitor#visit(de.dhbwstuttgart.syntaxtree.
|
||||
* Method)
|
||||
*/
|
||||
@Override
|
||||
public void visit(Method method) {
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see
|
||||
* de.dhbwstuttgart.syntaxtree.ASTVisitor#visit(de.dhbwstuttgart.syntaxtree.
|
||||
* ParameterList)
|
||||
*/
|
||||
@Override
|
||||
public void visit(ParameterList formalParameters) {
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see
|
||||
* de.dhbwstuttgart.syntaxtree.ASTVisitor#visit(de.dhbwstuttgart.syntaxtree.
|
||||
* Constructor)
|
||||
*/
|
||||
@Override
|
||||
public void visit(Constructor field) {
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see de.dhbwstuttgart.syntaxtree.StatementVisitor#visit(de.dhbwstuttgart.
|
||||
* syntaxtree.statement.ArgumentList)
|
||||
*/
|
||||
@Override
|
||||
public void visit(ArgumentList argumentList) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see de.dhbwstuttgart.syntaxtree.StatementVisitor#visit(de.dhbwstuttgart.
|
||||
* syntaxtree.statement.LambdaExpression)
|
||||
*/
|
||||
@Override
|
||||
public void visit(LambdaExpression lambdaExpression) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see de.dhbwstuttgart.syntaxtree.StatementVisitor#visit(de.dhbwstuttgart.
|
||||
* syntaxtree.statement.Assign)
|
||||
*/
|
||||
@Override
|
||||
public void visit(Assign assign) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see de.dhbwstuttgart.syntaxtree.StatementVisitor#visit(de.dhbwstuttgart.
|
||||
* syntaxtree.statement.BinaryExpr)
|
||||
*/
|
||||
@Override
|
||||
public void visit(BinaryExpr binary) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see de.dhbwstuttgart.syntaxtree.StatementVisitor#visit(de.dhbwstuttgart.
|
||||
* syntaxtree.statement.Block)
|
||||
*/
|
||||
@Override
|
||||
public void visit(Block block) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see de.dhbwstuttgart.syntaxtree.StatementVisitor#visit(de.dhbwstuttgart.
|
||||
* syntaxtree.statement.CastExpr)
|
||||
*/
|
||||
@Override
|
||||
public void visit(CastExpr castExpr) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see de.dhbwstuttgart.syntaxtree.StatementVisitor#visit(de.dhbwstuttgart.
|
||||
* syntaxtree.statement.EmptyStmt)
|
||||
*/
|
||||
@Override
|
||||
public void visit(EmptyStmt emptyStmt) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see de.dhbwstuttgart.syntaxtree.StatementVisitor#visit(de.dhbwstuttgart.
|
||||
* syntaxtree.statement.FieldVar)
|
||||
*/
|
||||
@Override
|
||||
public void visit(FieldVar fieldVar) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see de.dhbwstuttgart.syntaxtree.StatementVisitor#visit(de.dhbwstuttgart.
|
||||
* syntaxtree.statement.ForStmt)
|
||||
*/
|
||||
@Override
|
||||
public void visit(ForStmt forStmt) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see de.dhbwstuttgart.syntaxtree.StatementVisitor#visit(de.dhbwstuttgart.
|
||||
* syntaxtree.statement.IfStmt)
|
||||
*/
|
||||
@Override
|
||||
public void visit(IfStmt ifStmt) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see de.dhbwstuttgart.syntaxtree.StatementVisitor#visit(de.dhbwstuttgart.
|
||||
* syntaxtree.statement.InstanceOf)
|
||||
*/
|
||||
@Override
|
||||
public void visit(InstanceOf instanceOf) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see de.dhbwstuttgart.syntaxtree.StatementVisitor#visit(de.dhbwstuttgart.
|
||||
* syntaxtree.statement.LocalVar)
|
||||
*/
|
||||
@Override
|
||||
public void visit(LocalVar localVar) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see de.dhbwstuttgart.syntaxtree.StatementVisitor#visit(de.dhbwstuttgart.
|
||||
* syntaxtree.statement.LocalVarDecl)
|
||||
*/
|
||||
@Override
|
||||
public void visit(LocalVarDecl localVarDecl) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see de.dhbwstuttgart.syntaxtree.StatementVisitor#visit(de.dhbwstuttgart.
|
||||
* syntaxtree.statement.MethodCall)
|
||||
*/
|
||||
@Override
|
||||
public void visit(MethodCall methodCall) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see de.dhbwstuttgart.syntaxtree.StatementVisitor#visit(de.dhbwstuttgart.
|
||||
* syntaxtree.statement.NewClass)
|
||||
*/
|
||||
@Override
|
||||
public void visit(NewClass methodCall) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see de.dhbwstuttgart.syntaxtree.StatementVisitor#visit(de.dhbwstuttgart.
|
||||
* syntaxtree.statement.NewArray)
|
||||
*/
|
||||
@Override
|
||||
public void visit(NewArray newArray) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see de.dhbwstuttgart.syntaxtree.StatementVisitor#visit(de.dhbwstuttgart.
|
||||
* syntaxtree.statement.Return)
|
||||
*/
|
||||
@Override
|
||||
public void visit(Return aReturn) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see de.dhbwstuttgart.syntaxtree.StatementVisitor#visit(de.dhbwstuttgart.
|
||||
* syntaxtree.statement.ReturnVoid)
|
||||
*/
|
||||
@Override
|
||||
public void visit(ReturnVoid aReturn) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see de.dhbwstuttgart.syntaxtree.StatementVisitor#visit(de.dhbwstuttgart.
|
||||
* syntaxtree.statement.StaticClassName)
|
||||
*/
|
||||
@Override
|
||||
public void visit(StaticClassName staticClassName) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see de.dhbwstuttgart.syntaxtree.StatementVisitor#visit(de.dhbwstuttgart.
|
||||
* syntaxtree.statement.Super)
|
||||
*/
|
||||
@Override
|
||||
public void visit(Super aSuper) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see de.dhbwstuttgart.syntaxtree.StatementVisitor#visit(de.dhbwstuttgart.
|
||||
* syntaxtree.statement.This)
|
||||
*/
|
||||
@Override
|
||||
public void visit(This aThis) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see de.dhbwstuttgart.syntaxtree.StatementVisitor#visit(de.dhbwstuttgart.
|
||||
* syntaxtree.statement.WhileStmt)
|
||||
*/
|
||||
@Override
|
||||
public void visit(WhileStmt whileStmt) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see de.dhbwstuttgart.syntaxtree.StatementVisitor#visit(de.dhbwstuttgart.
|
||||
* syntaxtree.statement.DoStmt)
|
||||
*/
|
||||
@Override
|
||||
public void visit(DoStmt whileStmt) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see de.dhbwstuttgart.syntaxtree.StatementVisitor#visit(de.dhbwstuttgart.
|
||||
* syntaxtree.statement.AssignToField)
|
||||
*/
|
||||
@Override
|
||||
public void visit(AssignToField assignLeftSide) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see
|
||||
* de.dhbwstuttgart.syntaxtree.StatementVisitor#visit(de.dhbwstuttgart.parser.
|
||||
* SyntaxTreeGenerator.AssignToLocal)
|
||||
*/
|
||||
@Override
|
||||
public void visit(AssignToLocal assignLeftSide) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see de.dhbwstuttgart.syntaxtree.StatementVisitor#visit(de.dhbwstuttgart.
|
||||
* syntaxtree.statement.SuperCall)
|
||||
*/
|
||||
@Override
|
||||
public void visit(SuperCall superCall) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see de.dhbwstuttgart.syntaxtree.StatementVisitor#visit(de.dhbwstuttgart.
|
||||
* syntaxtree.statement.ExpressionReceiver)
|
||||
*/
|
||||
@Override
|
||||
public void visit(ExpressionReceiver expressionReceiver) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see de.dhbwstuttgart.syntaxtree.StatementVisitor#visit(de.dhbwstuttgart.
|
||||
* syntaxtree.statement.UnaryExpr)
|
||||
*/
|
||||
@Override
|
||||
public void visit(UnaryExpr unaryExpr) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see de.dhbwstuttgart.syntaxtree.StatementVisitor#visit(de.dhbwstuttgart.
|
||||
* syntaxtree.statement.Literal)
|
||||
*/
|
||||
@Override
|
||||
public void visit(Literal literal) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see
|
||||
* de.dhbwstuttgart.syntaxtree.ASTVisitor#visit(de.dhbwstuttgart.syntaxtree.
|
||||
* GenericTypeVar)
|
||||
*/
|
||||
@Override
|
||||
public void visit(GenericTypeVar genericTypeVar) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see
|
||||
* de.dhbwstuttgart.syntaxtree.ASTVisitor#visit(de.dhbwstuttgart.syntaxtree.
|
||||
* FormalParameter)
|
||||
*/
|
||||
@Override
|
||||
public void visit(FormalParameter formalParameter) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see
|
||||
* de.dhbwstuttgart.syntaxtree.ASTVisitor#visit(de.dhbwstuttgart.syntaxtree.
|
||||
* GenericDeclarationList)
|
||||
*/
|
||||
@Override
|
||||
public void visit(GenericDeclarationList genericTypeVars) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see
|
||||
* de.dhbwstuttgart.syntaxtree.ASTVisitor#visit(de.dhbwstuttgart.syntaxtree.
|
||||
* Field)
|
||||
*/
|
||||
@Override
|
||||
public void visit(Field field) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see
|
||||
* de.dhbwstuttgart.syntaxtree.ASTVisitor#visit(de.dhbwstuttgart.syntaxtree.type
|
||||
* .RefType)
|
||||
*/
|
||||
@Override
|
||||
public void visit(RefType refType) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see
|
||||
* de.dhbwstuttgart.syntaxtree.ASTVisitor#visit(de.dhbwstuttgart.syntaxtree.type
|
||||
* .SuperWildcardType)
|
||||
*/
|
||||
@Override
|
||||
public void visit(SuperWildcardType superWildcardType) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see
|
||||
* de.dhbwstuttgart.syntaxtree.ASTVisitor#visit(de.dhbwstuttgart.syntaxtree.type
|
||||
* .TypePlaceholder)
|
||||
*/
|
||||
@Override
|
||||
public void visit(TypePlaceholder typePlaceholder) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see
|
||||
* de.dhbwstuttgart.syntaxtree.ASTVisitor#visit(de.dhbwstuttgart.syntaxtree.type
|
||||
* .ExtendsWildcardType)
|
||||
*/
|
||||
@Override
|
||||
public void visit(ExtendsWildcardType extendsWildcardType) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see
|
||||
* de.dhbwstuttgart.syntaxtree.ASTVisitor#visit(de.dhbwstuttgart.syntaxtree.type
|
||||
* .GenericRefType)
|
||||
*/
|
||||
@Override
|
||||
public void visit(GenericRefType genericRefType) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,256 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
package de.dhbwstuttgart.bytecode.genericsGenerator;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashSet;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
import java.util.Set;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import de.dhbwstuttgart.bytecode.genericsGeneratorTypes.*;
|
||||
import de.dhbwstuttgart.parser.scope.JavaClassName;
|
||||
import org.objectweb.asm.Type;
|
||||
|
||||
import de.dhbwstuttgart.bytecode.TPHExtractor;
|
||||
import de.dhbwstuttgart.bytecode.constraint.ExtendsConstraint;
|
||||
import de.dhbwstuttgart.bytecode.constraint.TPHConstraint;
|
||||
import de.dhbwstuttgart.bytecode.utilities.MethodAndTPH;
|
||||
|
||||
/**
|
||||
* @author fayez
|
||||
*
|
||||
*/
|
||||
public class GenericsGenerator {
|
||||
/*TODO: When generating generics for a class if we have the following:
|
||||
tphClass < tphMeth1 < tphMeth2
|
||||
then we have to convert tphMeth1, tphMeth2 to tph class and generate the following
|
||||
class constraints: tphClass < tphMeth1, tphMeth1 < tphMeth2, tphMeth2 < Object
|
||||
*/
|
||||
|
||||
public static GenericsGeneratorResultForClass generateConstraints(final JavaClassName className, final TPHExtractor tphExtractor,
|
||||
final List<String> tphsClass, final ConstraintsSimplierResult simplifiedConstraints) {
|
||||
|
||||
List<GenericsGeneratorResult> classConstraints = generateConstraintsForClass(tphExtractor,
|
||||
simplifiedConstraints, tphsClass);
|
||||
// GenericGeneratorResultsForAllMethods methodsAndConstraints = generateConstraintsForAllMethods(tphExtractor,
|
||||
// simplifiedConstraints, tphsClass);
|
||||
GenericGeneratorResultsForAllMethods methodsAndConstraints = new GenericGeneratorResultsForAllMethods(new ArrayList<>());
|
||||
|
||||
return new GenericsGeneratorResultForClass(className, classConstraints, methodsAndConstraints);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param tphExtractor
|
||||
* @param tphsClass
|
||||
* @return
|
||||
*/
|
||||
public static ConstraintsSimplierResult simplifyConstraints(final TPHExtractor tphExtractor,
|
||||
final List<String> tphsClass) {
|
||||
final List<GenericsGeneratorResult> genericsGeneratorResults = new ArrayList<>();
|
||||
|
||||
ConstraintsSimplierResult simplifiedConstraints = ConstraintsSimplifier.simplifyConstraints(tphExtractor,
|
||||
genericsGeneratorResults, tphsClass);
|
||||
return simplifiedConstraints;
|
||||
}
|
||||
|
||||
|
||||
private static List<GenericsGeneratorResult> generateConstraintsForClass(final TPHExtractor tphExtractor,
|
||||
final ConstraintsSimplierResult simplifiedConstraints, final List<String> tphsClass) {
|
||||
final List<GenericsGeneratorResult> constraints = new ArrayList<>();
|
||||
|
||||
if (tphsClass.isEmpty())
|
||||
return constraints;
|
||||
|
||||
final List<TPHConstraint> allCons = tphExtractor.allCons;
|
||||
|
||||
final Set<String> visitedTPHs = new HashSet<>();
|
||||
|
||||
final List<String> methodTPHs = tphExtractor.ListOfMethodsAndTph.stream().map(m -> m.getLocalTphs())
|
||||
.flatMap(l -> l.stream()).collect(Collectors.toList());
|
||||
|
||||
createConstraintsForClassTphs(simplifiedConstraints, tphsClass, constraints, allCons, visitedTPHs, methodTPHs);
|
||||
|
||||
GenericsGeneratorUtility.addTPHsToClassTPHs(constraints, tphsClass);
|
||||
GenericsGeneratorUtility.removeClassTPHsFromMethodTPHs(tphsClass, tphExtractor);
|
||||
|
||||
generateGGConstraintsForTPH(tphsClass, constraints, simplifiedConstraints);
|
||||
|
||||
return constraints;
|
||||
}
|
||||
|
||||
private static void createConstraintsForClassTphs(ConstraintsSimplierResult simplifiedConstraints, List<String> tphsClass, List<GenericsGeneratorResult> constraints, List<TPHConstraint> allCons, Set<String> visitedTPHs, List<String> methodTPHs) {
|
||||
List<String> classAndMethodTphs = new ArrayList<>(tphsClass);
|
||||
classAndMethodTphs.addAll(methodTPHs);
|
||||
|
||||
for (String tph : tphsClass) {
|
||||
|
||||
if (visitedTPHs.contains(tph))
|
||||
continue;
|
||||
|
||||
final LinkedList<String> tphsInRel = GenericsGeneratorUtility
|
||||
.createLinkedListForTPHsInRelationClass(allCons, tphsClass, methodTPHs, visitedTPHs, tph);
|
||||
|
||||
generateConstraintsForClassFromList(tphsInRel,simplifiedConstraints,classAndMethodTphs,constraints);
|
||||
}
|
||||
}
|
||||
|
||||
private static void generateConstraintsForClassFromList(LinkedList<String> tphsInRel, ConstraintsSimplierResult simplifiedConstraints, List<String> classAndMethodTphs, List<GenericsGeneratorResult> constraints) {
|
||||
|
||||
if(tphsInRel.isEmpty())
|
||||
return;
|
||||
|
||||
List<GenericsGeneratorResult> resultConstraints = new ArrayList<>();
|
||||
String subType = tphsInRel.getFirst();
|
||||
String superType = GenericsGeneratorUtility.getNextClassTph(classAndMethodTphs, tphsInRel);
|
||||
|
||||
int idxOfSuper = tphsInRel.indexOf(superType);
|
||||
int size = tphsInRel.size();
|
||||
while (size > 2 && idxOfSuper < size-1){
|
||||
GenericsGeneratorResult genericsGeneratorResult = getGenericsGeneratorResultForClass(simplifiedConstraints, subType, superType);
|
||||
constraints.add(genericsGeneratorResult);
|
||||
|
||||
tphsInRel = new LinkedList<>(tphsInRel.subList(idxOfSuper, size));
|
||||
subType = tphsInRel.getFirst();
|
||||
superType = GenericsGeneratorUtility.getNextClassTph(classAndMethodTphs, tphsInRel);
|
||||
|
||||
idxOfSuper = tphsInRel.indexOf(superType);
|
||||
size = tphsInRel.size();
|
||||
}
|
||||
GenericsGeneratorResult genericsGeneratorResult = getGenericsGeneratorResultForClass(simplifiedConstraints, subType, superType);
|
||||
constraints.add(genericsGeneratorResult);
|
||||
}
|
||||
|
||||
private static GenericsGeneratorResult getGenericsGeneratorResultForClass(ConstraintsSimplierResult simplifiedConstraints, String subType, String superType) {
|
||||
TPHConstraint constraint = new ExtendsConstraint(subType, superType);
|
||||
|
||||
Set<String> equalSet = GenericsGeneratorUtility
|
||||
.createEqualSet(simplifiedConstraints.getNameReplacementResults(), subType);
|
||||
|
||||
return new GenericsGeneratorResult(constraint, equalSet);
|
||||
}
|
||||
/* TODO Remove this methoda*/
|
||||
private static GenericsGeneratorResult generateGGResultForClass(LinkedList<String> tphsInRel,
|
||||
ConstraintsSimplierResult simplifiedConstraints, List<String> tphsClass) {
|
||||
String subType = tphsInRel.getFirst();
|
||||
|
||||
String superType = GenericsGeneratorUtility.getNextClassTph(tphsClass, tphsInRel);
|
||||
|
||||
TPHConstraint constraint = new ExtendsConstraint(subType, superType);
|
||||
|
||||
Set<String> equalSet = GenericsGeneratorUtility
|
||||
.createEqualSet(simplifiedConstraints.getNameReplacementResults(), subType);
|
||||
|
||||
return new GenericsGeneratorResult(constraint, equalSet);
|
||||
}
|
||||
|
||||
private static GenericGeneratorResultsForAllMethods generateConstraintsForAllMethods(
|
||||
final TPHExtractor tphExtractor, ConstraintsSimplierResult simplifiedConstraints, List<String> tphsClass) {
|
||||
|
||||
final List<MethodAndConstraints> methodsAndConstraints = new ArrayList<>();
|
||||
final GenericGeneratorResultsForAllMethods results = new GenericGeneratorResultsForAllMethods(
|
||||
methodsAndConstraints);
|
||||
tphExtractor.ListOfMethodsAndTph.forEach(m -> {
|
||||
MethodAndConstraints methAndCons = generateConstraintsForMethod(tphExtractor.allCons, m,
|
||||
simplifiedConstraints, tphsClass);
|
||||
methodsAndConstraints.add(methAndCons);
|
||||
});
|
||||
|
||||
return results;
|
||||
}
|
||||
|
||||
public static MethodAndConstraints generateConstraintsForMethod(final List<TPHConstraint> allCons,
|
||||
final MethodAndTPH m, final ConstraintsSimplierResult simplifiedConstraints, List<String> tphsClass) {
|
||||
final List<String> localTphs = m.getLocalTphs();
|
||||
|
||||
List<GenericsGeneratorResult> constraints = new ArrayList<>();
|
||||
MethodAndConstraints result = new MethodAndConstraints(m.getId(), constraints);
|
||||
|
||||
if (localTphs.isEmpty())
|
||||
return result;
|
||||
|
||||
if (localTphs.size() == 1 && tphsClass.isEmpty()) {
|
||||
generateGGConstraintsForTPH(localTphs, constraints, simplifiedConstraints);
|
||||
return result;
|
||||
}
|
||||
|
||||
final Set<String> visitedTPHs = new HashSet<>();
|
||||
|
||||
for (String tph : localTphs) {
|
||||
|
||||
if (visitedTPHs.contains(tph))
|
||||
continue;
|
||||
|
||||
final LinkedList<String> tphsInRel = GenericsGeneratorUtility.createLinkedListForTPHsInRelation(allCons,
|
||||
localTphs, tphsClass, visitedTPHs, tph);
|
||||
if (!tphsInRel.isEmpty()) {
|
||||
GenericsGeneratorUtility.removeNotLocalTphs(tphsInRel, localTphs, tphsClass);
|
||||
if (!GenericsGeneratorUtility.isInResult(tphsInRel.getFirst(), constraints)) {
|
||||
GenericsGeneratorResult constraint = generateGGResult(tphsInRel, simplifiedConstraints);
|
||||
constraints.add(constraint);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
generateGGConstraintsForTPH(localTphs, constraints, simplifiedConstraints);
|
||||
return result;
|
||||
}
|
||||
|
||||
private static void generateGGConstraintsForTPH(List<String> localTphs,
|
||||
final List<GenericsGeneratorResult> constraints, final ConstraintsSimplierResult simplifiedConstraints) {
|
||||
|
||||
localTphs.forEach(tph -> {
|
||||
boolean isInSimplifiedConstraints = GenericsGeneratorUtility.isTPHInGenericGeneratorResult(simplifiedConstraints.getGenericsGenResults(), tph);
|
||||
if (isInSimplifiedConstraints) {
|
||||
GenericsGeneratorResult ggResult = GenericsGeneratorUtility.getGenericGeneratorResult(simplifiedConstraints.getGenericsGenResults(), tph).get();
|
||||
// GenericsGeneratorUtility.removeGenericGeneratorResult(simplifiedConstraints.getGenericsGenResults(),ggResult);
|
||||
constraints.add(ggResult);
|
||||
} else {
|
||||
boolean isInConstraints = GenericsGeneratorUtility.isTPHInGenericGeneratorResult(constraints, tph);
|
||||
|
||||
if (!isInConstraints) {
|
||||
GenericsGeneratorResult ggResult = generateGGResult(tph, simplifiedConstraints.getNameReplacementResults());
|
||||
constraints.add(ggResult);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
private static GenericsGeneratorResult generateGGResult(String tph,
|
||||
List<NameReplacementResult> nameReplacementResults) {
|
||||
String superType = Type.getInternalName(Object.class);
|
||||
TPHConstraint constraint = new ExtendsConstraint(tph, superType);
|
||||
Set<String> equalSet = GenericsGeneratorUtility.createEqualSet(nameReplacementResults, tph);
|
||||
|
||||
return new GenericsGeneratorResult(constraint, equalSet);
|
||||
}
|
||||
|
||||
private static GenericsGeneratorResult generateGGResult(final LinkedList<String> tphsInRel,
|
||||
final ConstraintsSimplierResult simplifiedConstraints) {
|
||||
|
||||
String subType = tphsInRel.getFirst();
|
||||
|
||||
if (tphsInRel.size() == 1) {
|
||||
Optional<GenericsGeneratorResult> constraintFromSimplifiedCon = simplifiedConstraints
|
||||
.getGenericsGenResults().stream().filter(g -> g.getConstraint().getLeft().equals(subType))
|
||||
.findFirst();
|
||||
if (constraintFromSimplifiedCon.isPresent())
|
||||
return constraintFromSimplifiedCon.get();
|
||||
}
|
||||
|
||||
String superType = tphsInRel.size() > 1 ? tphsInRel.getLast() : Type.getInternalName(Object.class);
|
||||
|
||||
TPHConstraint constraint = new ExtendsConstraint(subType, superType);
|
||||
|
||||
Set<String> equalSet = GenericsGeneratorUtility
|
||||
.createEqualSet(simplifiedConstraints.getNameReplacementResults(), subType);
|
||||
|
||||
return new GenericsGeneratorResult(constraint, equalSet);
|
||||
}
|
||||
|
||||
}
|
571
src/main/java/de/dhbwstuttgart/bytecode/genericsGenerator/GenericsGeneratorUtility.java
Normal file
@ -0,0 +1,571 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
package de.dhbwstuttgart.bytecode.genericsGenerator;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashSet;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
import java.util.Set;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
import de.dhbwstuttgart.bytecode.genericsGeneratorTypes.*;
|
||||
import org.objectweb.asm.Type;
|
||||
|
||||
import de.dhbwstuttgart.bytecode.TPHExtractor;
|
||||
import de.dhbwstuttgart.bytecode.constraint.EqualConstraint;
|
||||
import de.dhbwstuttgart.bytecode.constraint.ExtendsConstraint;
|
||||
import de.dhbwstuttgart.bytecode.constraint.TPHConstraint;
|
||||
import de.dhbwstuttgart.bytecode.constraint.TPHConstraint.Relation;
|
||||
import de.dhbwstuttgart.bytecode.utilities.ConstraintsFinder;
|
||||
import de.dhbwstuttgart.bytecode.utilities.MethodAndTPH;
|
||||
import de.dhbwstuttgart.bytecode.utilities.NameReplacer;
|
||||
|
||||
/**
|
||||
* @author fayez
|
||||
*
|
||||
*/
|
||||
public class GenericsGeneratorUtility {
|
||||
/**
|
||||
* Returns a list of type placeholders names of a specified method
|
||||
*
|
||||
* @param methodID The id of the method ReturnTypeMethodName(ParameterTypes)
|
||||
* @param listOfMethodsAndTph List of all methods
|
||||
* @return a list of type placehoders names
|
||||
*/
|
||||
public static List<String> getMethodTPHS(String methodID, ArrayList<MethodAndTPH> listOfMethodsAndTph) {
|
||||
return listOfMethodsAndTph.stream().filter(mt->mt.getId().equals(methodID)).findAny().get().getTphs();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a reverse constraint of a specified constraint which is given by its left and right
|
||||
* side
|
||||
*
|
||||
* @param allCons List of all constraints
|
||||
* @param left The left side of the given constraint
|
||||
* @param right The right side of the given constraint
|
||||
* @return An Optional object which contains the reverse constraint if it is exist
|
||||
*/
|
||||
public static Optional<TPHConstraint> getReverseConstraint(List<TPHConstraint> allCons, String left, String right) {
|
||||
return allCons.stream().filter(c->{
|
||||
return c.getRight().equals(left) && c.getLeft().equals(right);
|
||||
}).findAny();
|
||||
}
|
||||
|
||||
/**
|
||||
* Substitutes the old name by the new name in all constraints
|
||||
*
|
||||
* @param allCons List of all constraints
|
||||
* @param oldName The name to be replaced
|
||||
* @param newName The new name
|
||||
*/
|
||||
public static void substituteTPH(List<TPHConstraint> allCons, String oldName, String newName) {
|
||||
allCons.stream()
|
||||
.filter(c->c.getRel()==Relation.EXTENDS)
|
||||
.forEach(c->{
|
||||
if(c.getLeft().equals(oldName))
|
||||
c.setLeft(newName);
|
||||
if(c.getRight().equals(oldName))
|
||||
c.setRight(newName);
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
public static List<ConstraintsWithSameLeftSide> findConstraintsWithLeftSameLeftSide(List<TPHConstraint> allCons) {
|
||||
// finder looks for constraints that have the same left hand side
|
||||
// and put them in a list
|
||||
ConstraintsFinder finder = new ConstraintsFinder(allCons);
|
||||
List<ConstraintsWithSameLeftSide> foundCons = finder.findConstraints();
|
||||
return foundCons;
|
||||
}
|
||||
|
||||
public static void simplifyConstraintsWithSameLeftSide(List<ConstraintsWithSameLeftSide> consWithSameLeftSide,
|
||||
List<TPHConstraint> allCons, List<String> methodTPHS) {
|
||||
List<TPHConstraint> eqCons = new ArrayList<>();
|
||||
|
||||
for (ConstraintsWithSameLeftSide list : consWithSameLeftSide) {
|
||||
NameReplacementResult replRes = modifyNames(allCons, methodTPHS, list);
|
||||
createEqualConstraintsForNames(replRes.getName(), replRes.getOldNames(),eqCons);
|
||||
|
||||
for (TPHConstraint c : allCons) {
|
||||
if (c.getRel() == Relation.EQUAL && replRes.getName().equals(c.getRight())) {
|
||||
eqCons.add(c);
|
||||
}
|
||||
}
|
||||
updateEqualCons(replRes, eqCons);
|
||||
|
||||
TPHConstraint c = list.getConstraints().get(0);
|
||||
allCons.removeAll(list.getConstraints());
|
||||
allCons.add(c);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static void simplifyConstraintsWithSameLeftSide(List<ConstraintsWithSameLeftSide> consWithSameLeftSide,
|
||||
TPHExtractor tphExtractor, List<String> tphsClass, List<TPHConstraint> equalCons) {
|
||||
List<TPHConstraint> allCons = tphExtractor.allCons;
|
||||
|
||||
for (ConstraintsWithSameLeftSide list : consWithSameLeftSide) {
|
||||
if(!stillWithSameLeftSide(list))
|
||||
continue;
|
||||
NameReplacementResult replRes = modifyNames(allCons, list, tphExtractor.ListOfMethodsAndTph,tphsClass);
|
||||
createEqualConstraintsForNames(replRes.getName(), replRes.getOldNames(),equalCons);
|
||||
|
||||
for (TPHConstraint c : allCons) {
|
||||
if (c.getRel() == Relation.EQUAL && replRes.getName().equals(c.getRight())) {
|
||||
equalCons.add(c);
|
||||
}
|
||||
}
|
||||
updateEqualCons(replRes, equalCons);
|
||||
|
||||
TPHConstraint c = list.getConstraints().get(0);
|
||||
allCons.removeAll(list.getConstraints());
|
||||
removeConstraintsWithSameLeftAndRightSide(allCons);
|
||||
allCons.add(c);
|
||||
removeDuplicate(allCons);
|
||||
}
|
||||
consWithSameLeftSide.clear();
|
||||
consWithSameLeftSide = findConstraintsWithLeftSameLeftSide(allCons);
|
||||
if(!consWithSameLeftSide.isEmpty())
|
||||
simplifyConstraintsWithSameLeftSide(consWithSameLeftSide,tphExtractor,tphsClass,equalCons);
|
||||
|
||||
}
|
||||
|
||||
private static void removeDuplicate(List<TPHConstraint> allCons) {
|
||||
List<TPHConstraint> visited = new ArrayList<>();
|
||||
List<Integer> toRemove = new ArrayList<>();
|
||||
checkForDuplicate(allCons, visited, toRemove);
|
||||
removeConstraintsByIndex(allCons, toRemove);
|
||||
}
|
||||
|
||||
private static void removeConstraintsByIndex(List<TPHConstraint> allCons, List<Integer> toRemove) {
|
||||
for(int index : toRemove)
|
||||
allCons.remove(index);
|
||||
}
|
||||
|
||||
private static void checkForDuplicate(List<TPHConstraint> allCons, List<TPHConstraint> visited, List<Integer> toRemove) {
|
||||
for(int i = 0;i<allCons.size();++i){
|
||||
markConstraintIfDuplicate(allCons, visited, toRemove, i);
|
||||
}
|
||||
}
|
||||
|
||||
private static void markConstraintIfDuplicate(List<TPHConstraint> allCons, List<TPHConstraint> visited, List<Integer> toRemove, int i) {
|
||||
TPHConstraint constraint = allCons.get(i);
|
||||
if(containsInList(visited,constraint.getLeft(),constraint.getRight())){
|
||||
toRemove.add(i);
|
||||
} else {
|
||||
visited.add(constraint);
|
||||
}
|
||||
}
|
||||
|
||||
private static boolean containsInList(List<TPHConstraint> allConstraints, String left, String right) {
|
||||
for(TPHConstraint constraint : allConstraints)
|
||||
if(constraint.getLeft().equals(left) && constraint.getRight().equals(right))
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
private static void addNewConstraintsWithSameLeftSide(ConstraintsWithSameLeftSide constraintsWithSameLeftSide, List<TPHConstraint> allCons) {
|
||||
allCons.forEach(c->{
|
||||
if (constraintsWithSameLeftSide.getConstraints().get(0).getLeft().equals(c.getLeft())){
|
||||
if(!constraintsWithSameLeftSide.getConstraints().contains(c))
|
||||
constraintsWithSameLeftSide.getConstraints().add(c);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private static void checkForNewConstraintsWithSameLeftSide(List<ConstraintsWithSameLeftSide> consWithSameLeftSide, List<TPHConstraint> allCons) {
|
||||
allCons.forEach(c->{
|
||||
Optional<ConstraintsWithSameLeftSide> constraintsWithSameLeftSide = getConstraintsWithSameLeftSide(consWithSameLeftSide, c.getLeft());
|
||||
constraintsWithSameLeftSide.ifPresent(cls->{
|
||||
if(!cls.getConstraints().contains(c))
|
||||
cls.getConstraints().add(c);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
private static Optional<ConstraintsWithSameLeftSide> getConstraintsWithSameLeftSide(List<ConstraintsWithSameLeftSide> consWithSameLeftSide, String left) {
|
||||
return consWithSameLeftSide.stream().filter(csl->isContainedInConsWithLeftSide(csl,left)).findAny();
|
||||
}
|
||||
|
||||
private static boolean isContainedInConsWithLeftSide(ConstraintsWithSameLeftSide csl, String left) {
|
||||
return csl.getConstraints().get(0).getLeft().equals(left);
|
||||
}
|
||||
|
||||
private static boolean stillWithSameLeftSide(ConstraintsWithSameLeftSide constraints) {
|
||||
removeUnvalidConstraints(constraints);
|
||||
return constraints.getConstraints().size()>1;
|
||||
}
|
||||
|
||||
private static void removeUnvalidConstraints(ConstraintsWithSameLeftSide constraints) {
|
||||
List<TPHConstraint> toRemove = new ArrayList<>();
|
||||
constraints.getConstraints().forEach(c->{
|
||||
if(c.getLeft().equals(c.getRight()))
|
||||
toRemove.add(c);
|
||||
});
|
||||
if(!toRemove.isEmpty())
|
||||
constraints.getConstraints().removeAll(toRemove);
|
||||
}
|
||||
|
||||
private static void removeConstraintsWithSameLeftAndRightSide(List<TPHConstraint> allCons) {
|
||||
List<TPHConstraint> toRemove = new ArrayList<>();
|
||||
allCons.forEach(c->{
|
||||
if(c.getLeft().equals(c.getRight()))
|
||||
toRemove.add(c);
|
||||
});
|
||||
allCons.removeAll(toRemove);
|
||||
}
|
||||
|
||||
private static void createEqualConstraintsForNames(String name, List<String> equalNames, List<TPHConstraint> eqCons) {
|
||||
// create an equal constraint for each value in repres
|
||||
for (String eName : equalNames) {
|
||||
EqualConstraint ec = new EqualConstraint(eName, name);
|
||||
eqCons.add(ec);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param allCons
|
||||
* @param methodTPHS
|
||||
* @param list
|
||||
* @return
|
||||
*/
|
||||
public static NameReplacementResult modifyNames(List<TPHConstraint> allCons, List<String> methodTPHS,
|
||||
ConstraintsWithSameLeftSide list) {
|
||||
// generate a new name and replace the right hand side for each constraint
|
||||
// in list with the new name
|
||||
NameReplacer replacer = new NameReplacer(list.getConstraints(), allCons, methodTPHS);
|
||||
// new name -> [all old names]
|
||||
NameReplacementResult replRes = replacer.replaceNames();
|
||||
return replRes;
|
||||
}
|
||||
|
||||
public static NameReplacementResult modifyNames(List<TPHConstraint> allCons, ConstraintsWithSameLeftSide list, List<MethodAndTPH> methodAndTPHs, List<String> tphsClass) {
|
||||
// generate a new name and replace the right hand side for each constraint
|
||||
// in list with the new name
|
||||
NameReplacer replacer = new NameReplacer(list.getConstraints(), allCons, methodAndTPHs, tphsClass);
|
||||
// new name -> [all old names]
|
||||
NameReplacementResult replRes = replacer.replaceNames();
|
||||
return replRes;
|
||||
}
|
||||
|
||||
public static void updateEqualCons(NameReplacementResult nameReplacementResult, List<TPHConstraint> eqCons) {
|
||||
List<String> oldNames = nameReplacementResult.getOldNames();
|
||||
String newName = nameReplacementResult.getName();
|
||||
for (TPHConstraint c : eqCons) {
|
||||
// if(oldNames.contains(c.getLeft()))
|
||||
// c.setLeft(newName);
|
||||
if (oldNames.contains(c.getRight()))
|
||||
c.setRight(newName);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static void modifyRelationForConstraintsInCycle(List<Cycle> cycles) {
|
||||
cycles.stream().map(lc->lc.getConstraints()).flatMap(e->e.stream()).forEach(c->c.setRel(Relation.EQUAL));
|
||||
}
|
||||
|
||||
public static List<NameReplacementResult> substituteTPHSFormCycle(List<TPHConstraint> allCons, List<Cycle> cycles, TPHExtractor tphExtractor) {
|
||||
List<NameReplacementResult> results = new ArrayList<>();
|
||||
cycles.forEach(lc->{
|
||||
Set<String> names = getNamesFromCycle(lc);
|
||||
String newName = names.stream().findFirst().get();
|
||||
|
||||
List<String> equalNames = new ArrayList<>(names);
|
||||
|
||||
Stream<ArrayList<String>> tphsOfMethods = tphExtractor.ListOfMethodsAndTph.stream().map(m->m.getTphs());
|
||||
Stream<ArrayList<String>> localTphsOfMethods = tphExtractor.ListOfMethodsAndTph.stream().map(m->m.getLocalTphs());
|
||||
|
||||
replaceOldNames(newName, equalNames, tphsOfMethods);
|
||||
replaceOldNames(newName, equalNames, localTphsOfMethods);
|
||||
|
||||
NameReplacementResult res = new NameReplacementResult(newName, equalNames);
|
||||
results.add(res);
|
||||
substituteAll(allCons,names,newName);
|
||||
});
|
||||
return results;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param newName
|
||||
* @param names
|
||||
* @param tphsOfMethods
|
||||
*/
|
||||
public static void replaceOldNames(final String newName, final List<String> names, Stream<ArrayList<String>> tphsOfMethods) {
|
||||
tphsOfMethods.forEach(tphsMethod->{
|
||||
if(tphsMethod.removeAll(names))
|
||||
tphsMethod.add(newName);
|
||||
});
|
||||
}
|
||||
|
||||
public static void substituteAll(List<TPHConstraint> allCons, Set<String> names, String newName) {
|
||||
allCons.stream()
|
||||
.filter(c-> c.getRel()==Relation.EXTENDS)
|
||||
.forEach(c->{
|
||||
if(names.contains(c.getLeft())) {
|
||||
c.setLeft(newName);
|
||||
} else if(names.contains(c.getRight())) {
|
||||
c.setRight(newName);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public static Set<String> getNamesFromCycle(Cycle lc) {
|
||||
Set<String> names = new HashSet<>();
|
||||
lc.getConstraints().forEach(c->names.add(c.getLeft()));
|
||||
return names;
|
||||
}
|
||||
|
||||
public static void createResults(List<GenericsGeneratorResult> genericsGeneratorResults,
|
||||
List<NameReplacementResult> nameReplacementResults) {
|
||||
nameReplacementResults.forEach(n->{
|
||||
Set<String> equals = new HashSet<>(n.getOldNames());
|
||||
TPHConstraint cons = new ExtendsConstraint(n.getName(), Type.getInternalName(Object.class));
|
||||
GenericsGeneratorResult ggRes = new GenericsGeneratorResult(cons, equals);
|
||||
genericsGeneratorResults.add(ggRes);
|
||||
});
|
||||
}
|
||||
|
||||
public static void removeEqualConstraints(List<TPHConstraint> allCons) {
|
||||
List<TPHConstraint> equalConstraints = getEqualConstraints(allCons);
|
||||
allCons.removeAll(equalConstraints);
|
||||
}
|
||||
|
||||
public static List<TPHConstraint> getEqualConstraints(List<TPHConstraint> allCons) {
|
||||
return allCons.stream().filter(c->c.getRel()==Relation.EQUAL).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
public static List<NameReplacementResult> createNameReplacementResultsFromEqualConstraints(
|
||||
List<TPHConstraint> equalCons) {
|
||||
List<NameReplacementResult> nameReplacementResults = new ArrayList<>();
|
||||
equalCons.forEach(c->{
|
||||
if(isInNameReplacementResults(nameReplacementResults,c.getRight())) {
|
||||
getNameReplacementByName(nameReplacementResults,c.getRight()).getOldNames().add(c.getLeft());
|
||||
} else {
|
||||
List<String> oldNames = new ArrayList<>();
|
||||
oldNames.add(c.getLeft());
|
||||
NameReplacementResult nrRes = new NameReplacementResult(c.getRight(), oldNames);
|
||||
nameReplacementResults.add(nrRes);
|
||||
}
|
||||
});
|
||||
return nameReplacementResults;
|
||||
}
|
||||
|
||||
private static NameReplacementResult getNameReplacementByName(List<NameReplacementResult> nameReplacementResults,
|
||||
String name) {
|
||||
return nameReplacementResults.stream().filter(n->n.getName().equals(name)).findFirst().get();
|
||||
}
|
||||
|
||||
public static boolean isInNameReplacementResults(List<NameReplacementResult> nameReplacementResults,String name){
|
||||
if(nameReplacementResults.isEmpty())
|
||||
return false;
|
||||
return nameReplacementResults.stream().map(r->r.getName()).filter(n->name.equals(n)).findFirst().isPresent();
|
||||
}
|
||||
|
||||
public static Optional<TPHConstraint> getConstraintByLeftSide(List<TPHConstraint> allCons, String tph) {
|
||||
return allCons.stream().filter(c->c.getLeft().equals(tph)).findFirst();
|
||||
}
|
||||
|
||||
public static Optional<TPHConstraint> getConstraintByRightSide(List<TPHConstraint> allCons, String tph) {
|
||||
return allCons.stream().filter(c->c.getRight().equals(tph)).findFirst();
|
||||
}
|
||||
|
||||
public static boolean isTPHInGenericGeneratorResult(final List<GenericsGeneratorResult> constraints, final String tph) {
|
||||
return constraints.stream().filter(g->g.getConstraint().getLeft().equals(tph)).findFirst().isPresent();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param allCons
|
||||
* @param tphsMethod
|
||||
* @param tphsClass
|
||||
* @param visitedTPHs
|
||||
* @param tph
|
||||
* @return
|
||||
*/
|
||||
public static LinkedList<String> createLinkedListForTPHsInRelation(final List<TPHConstraint> allCons,
|
||||
List<String> tphsMethod, List<String> tphsClass, final Set<String> visitedTPHs, String tph) {
|
||||
|
||||
final LinkedList<String> tphsInRel = new LinkedList<>();
|
||||
List<String> tphsList = new ArrayList<>(tphsMethod);
|
||||
tphsList.addAll(tphsClass);
|
||||
|
||||
boolean isNextSuperTypeFound = findNextSuperTyp(allCons,tphsList ,visitedTPHs, tph, tphsInRel);
|
||||
if(!isNextSuperTypeFound)
|
||||
findNextSubType(allCons, tphsList,visitedTPHs, tph, tphsInRel);
|
||||
return tphsInRel;
|
||||
}
|
||||
|
||||
public static boolean findNextSubType(List<TPHConstraint> allCons, List<String> tphsList, Set<String> visitedTPHs, String tph,
|
||||
LinkedList<String> tphsInRel) {
|
||||
Optional<TPHConstraint> con = getConstraintByRightSide(allCons, tph);
|
||||
while (con.isPresent()) {
|
||||
String left = con.get().getLeft();
|
||||
String right = con.get().getRight();
|
||||
|
||||
addTPHsToListFromLeft(tphsInRel, left, right);
|
||||
markAsVisited(visitedTPHs, left);
|
||||
|
||||
if(tphsList.contains(left))
|
||||
return true;
|
||||
|
||||
con = getConstraintByRightSide(allCons, left);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public static void addTPHsToListFromLeft(LinkedList<String> tphsInRel, String left, String right) {
|
||||
if (tphsInRel.isEmpty())
|
||||
tphsInRel.add(right);
|
||||
|
||||
tphsInRel.addFirst(left);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param allCons
|
||||
* @param tphsList
|
||||
* @param visitedTPHs
|
||||
* @param tph
|
||||
* @param tphsInRel
|
||||
* @return
|
||||
*/
|
||||
public static boolean findNextSuperTyp(final List<TPHConstraint> allCons, List<String> tphsList, final Set<String> visitedTPHs, String tph,
|
||||
final LinkedList<String> tphsInRel) {
|
||||
Optional<TPHConstraint> con = getConstraintByLeftSide(allCons, tph);
|
||||
|
||||
markAsVisited(visitedTPHs, tph);
|
||||
|
||||
while (con.isPresent()) {
|
||||
String left = con.get().getLeft();
|
||||
String right = con.get().getRight();
|
||||
addTPHsToList(tphsInRel, left, right);
|
||||
|
||||
if(tphsList.contains(right))
|
||||
return true;
|
||||
|
||||
markAsVisited(visitedTPHs, right);
|
||||
|
||||
con = getConstraintByLeftSide(allCons, right);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public static void markAsVisited(Set<String> visitedTPHs, String left) {
|
||||
visitedTPHs.add(left);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param visitedTPHs
|
||||
* @param right
|
||||
* @param left
|
||||
*/
|
||||
public static void markAsVisited(final Set<String> visitedTPHs, String left, String right) {
|
||||
visitedTPHs.add(left);
|
||||
visitedTPHs.add(right);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param tphsInRel
|
||||
* @param right
|
||||
* @param left
|
||||
*/
|
||||
public static void addTPHsToList(final LinkedList<String> tphsInRel, String left, String right) {
|
||||
if (tphsInRel.isEmpty())
|
||||
tphsInRel.add(left);
|
||||
tphsInRel.add(right);
|
||||
}
|
||||
|
||||
public static void removeNotLocalTphs(final LinkedList<String> tphsInRel, final List<String> localTphs,
|
||||
List<String> tphsClass) {
|
||||
|
||||
while (!localTphs.contains(tphsInRel.peek())) {
|
||||
tphsInRel.removeFirst();
|
||||
}
|
||||
|
||||
String last = tphsInRel.peekLast();
|
||||
while (!localTphs.contains(last) && !tphsClass.contains(last)) {
|
||||
tphsInRel.removeLast();
|
||||
last = tphsInRel.peekLast();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param nameReplacementResults
|
||||
* @param subType
|
||||
* @return
|
||||
*/
|
||||
public static Set<String> createEqualSet(final List<NameReplacementResult> nameReplacementResults, String subType) {
|
||||
Optional<NameReplacementResult> equals = nameReplacementResults.stream()
|
||||
.filter(n -> n.getName().equals(subType)).findFirst();
|
||||
|
||||
Set<String> equalSet = equals.isPresent() ? new HashSet<>(equals.get().getOldNames()) : new HashSet<>();
|
||||
return equalSet;
|
||||
}
|
||||
|
||||
public static String getNextClassTph(List<String> tphsClass, LinkedList<String> tphsInRel) {
|
||||
|
||||
for(int i = 1;i<tphsInRel.size();++i) {
|
||||
String next = tphsInRel.get(i);
|
||||
if(tphsClass.contains(next))
|
||||
return next;
|
||||
}
|
||||
|
||||
return tphsInRel.getLast();
|
||||
}
|
||||
|
||||
public static void addTPHsToClassTPHs(final List<GenericsGeneratorResult> constraints, final List<String> tphsClass) {
|
||||
|
||||
List<String> lefts = constraints.stream().map(r->r.getConstraint()).map(c->c.getLeft()).collect(Collectors.toList());
|
||||
List<String> rights = constraints.stream().map(r->r.getConstraint()).map(c->c.getRight()).collect(Collectors.toList());
|
||||
List<String> leftsAndRights = new ArrayList<>(lefts);
|
||||
leftsAndRights.addAll(rights);
|
||||
List<String> shouldBeClassTphs = leftsAndRights.stream().distinct().collect(Collectors.toList());
|
||||
|
||||
for(String tph : shouldBeClassTphs) {
|
||||
if(!tphsClass.contains(tph))
|
||||
tphsClass.add(tph);
|
||||
}
|
||||
}
|
||||
|
||||
public static void removeClassTPHsFromMethodTPHs(List<String> tphsClass, TPHExtractor tphExtractor) {
|
||||
|
||||
tphExtractor.ListOfMethodsAndTph.stream().map(m->m.getTphs()).forEach(tphs->{
|
||||
tphs.removeAll(tphsClass);
|
||||
});
|
||||
|
||||
tphExtractor.ListOfMethodsAndTph.stream().map(m->m.getLocalTphs()).forEach(tphs->{
|
||||
tphs.removeAll(tphsClass);
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
public static LinkedList<String> createLinkedListForTPHsInRelationClass(List<TPHConstraint> allCons,
|
||||
List<String> tphsClass, List<String> methodTPHs, Set<String> visitedTPHs, String tph) {
|
||||
final LinkedList<String> tphsInRel = new LinkedList<>();
|
||||
|
||||
boolean isNextSuperTypeFound = findNextSuperTyp(allCons,tphsClass ,visitedTPHs, tph, tphsInRel);
|
||||
if(!tphsInRel.isEmpty() && !isNextSuperTypeFound && !methodTPHs.contains(tphsInRel.getLast()))
|
||||
findNextSubType(allCons, tphsClass,visitedTPHs, tph, tphsInRel);
|
||||
return tphsInRel;
|
||||
}
|
||||
|
||||
public static boolean isInResult(String first, List<GenericsGeneratorResult> constraints) {
|
||||
return constraints.stream().map(r->r.getConstraint()).filter(c->c.getLeft().equals(first)).findFirst().isPresent();
|
||||
}
|
||||
|
||||
public static Optional<GenericsGeneratorResult> getGenericGeneratorResult(List<GenericsGeneratorResult> list,
|
||||
String tph) {
|
||||
return list.stream().filter(g->g.getConstraint().getLeft().equals(tph)).findFirst();
|
||||
}
|
||||
|
||||
public static void removeGenericGeneratorResult(List<GenericsGeneratorResult> genericsGenResults,
|
||||
GenericsGeneratorResult ggResult) {
|
||||
genericsGenResults.remove(ggResult);
|
||||
}
|
||||
|
||||
public static Optional<MethodAndTPH> getMethodAndTphs(ArrayList<MethodAndTPH> listOfMethodsAndTph, String id) {
|
||||
return listOfMethodsAndTph.stream().filter(m->m.getId().equals(id)).findFirst();
|
||||
}
|
||||
}
|
35
src/main/java/de/dhbwstuttgart/bytecode/genericsGeneratorTypes/ConstraintsWithSameLeftSide.java
Normal file
@ -0,0 +1,35 @@
|
||||
package de.dhbwstuttgart.bytecode.genericsGeneratorTypes;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import de.dhbwstuttgart.bytecode.constraint.TPHConstraint;
|
||||
|
||||
public class ConstraintsWithSameLeftSide {
|
||||
private List<TPHConstraint> constraints;
|
||||
|
||||
/**
|
||||
* @param constraints
|
||||
*/
|
||||
public ConstraintsWithSameLeftSide(List<TPHConstraint> constraints) {
|
||||
this.constraints = constraints;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the constraints
|
||||
*/
|
||||
public List<TPHConstraint> getConstraints() {
|
||||
return constraints;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param constraints the constraints to set
|
||||
*/
|
||||
public void setConstraints(List<TPHConstraint> constraints) {
|
||||
this.constraints = constraints;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "[" + constraints.toString() + "]";
|
||||
}
|
||||
}
|
@ -0,0 +1,46 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
package de.dhbwstuttgart.bytecode.genericsGeneratorTypes;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import de.dhbwstuttgart.bytecode.constraint.TPHConstraint;
|
||||
|
||||
/**
|
||||
* @author fayez
|
||||
*
|
||||
*/
|
||||
public class Cycle {
|
||||
private final List<TPHConstraint> constraints;
|
||||
|
||||
/**
|
||||
* @param constraints
|
||||
*/
|
||||
public Cycle(List<TPHConstraint> constraints) {
|
||||
this.constraints = constraints;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the constraints
|
||||
*/
|
||||
public List<TPHConstraint> getConstraints() {
|
||||
return constraints;
|
||||
}
|
||||
|
||||
public boolean containConstraint(TPHConstraint constraint) {
|
||||
for(TPHConstraint c : constraints) {
|
||||
if(c.equalConstraint(constraint))
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
constraints.forEach(c->sb.append(c.getLeft()+" -> "));
|
||||
sb.append(constraints.get(constraints.size()-1).getRight());
|
||||
return sb.toString();
|
||||
}
|
||||
}
|
33
src/main/java/de/dhbwstuttgart/bytecode/genericsGeneratorTypes/GenericGeneratorResultsForAllMethods.java
Normal file
@ -0,0 +1,33 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
package de.dhbwstuttgart.bytecode.genericsGeneratorTypes;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author fayez
|
||||
*
|
||||
*/
|
||||
public class GenericGeneratorResultsForAllMethods {
|
||||
private final List<MethodAndConstraints> methodsAndConstraints;
|
||||
|
||||
public GenericGeneratorResultsForAllMethods() {
|
||||
this(Collections.emptyList());
|
||||
}
|
||||
/**
|
||||
* @param methodsAndConstraints
|
||||
*/
|
||||
public GenericGeneratorResultsForAllMethods(List<MethodAndConstraints> methodsAndConstraints) {
|
||||
this.methodsAndConstraints = methodsAndConstraints;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the methodsAndConstraints
|
||||
*/
|
||||
public List<MethodAndConstraints> getMethodsAndConstraints() {
|
||||
return methodsAndConstraints;
|
||||
}
|
||||
|
||||
}
|
52
src/main/java/de/dhbwstuttgart/bytecode/genericsGeneratorTypes/GenericGenratorResultForSourceFile.java
Normal file
@ -0,0 +1,52 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
package de.dhbwstuttgart.bytecode.genericsGeneratorTypes;
|
||||
|
||||
import de.dhbwstuttgart.parser.scope.JavaClassName;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.NoSuchElementException;
|
||||
|
||||
/**
|
||||
* The simplify results of a source file (package)
|
||||
*
|
||||
* @author fayez
|
||||
*
|
||||
*/
|
||||
public class GenericGenratorResultForSourceFile {
|
||||
private String pkgName;
|
||||
private final List<GenericsGeneratorResultForClass> genericGeneratorResultForAllClasses = new ArrayList<>();
|
||||
|
||||
/**
|
||||
* @param pkgName
|
||||
*/
|
||||
public GenericGenratorResultForSourceFile(String pkgName) {
|
||||
this.pkgName = pkgName;
|
||||
}
|
||||
|
||||
public List<GenericsGeneratorResultForClass> getGenericGeneratorResultForAllClasses() {
|
||||
return genericGeneratorResultForAllClasses;
|
||||
}
|
||||
|
||||
/**
|
||||
* Appends the simplify results of a class to simplifyResForSF
|
||||
*
|
||||
* @param sResClass simplify results of a class to added
|
||||
*/
|
||||
public void addGenericGeneratorResultClass(GenericsGeneratorResultForClass sResClass) {
|
||||
genericGeneratorResultForAllClasses.add(sResClass);
|
||||
}
|
||||
|
||||
public GenericsGeneratorResultForClass getSimplifyResultsByName(JavaClassName name) {
|
||||
|
||||
if (this.pkgName.equals(name.getPackageName())) {
|
||||
return genericGeneratorResultForAllClasses.stream()
|
||||
.filter(sr -> sr.getClassName().equals(name))
|
||||
.findAny()
|
||||
.orElse(new GenericsGeneratorResultForClass(name));
|
||||
}
|
||||
return new GenericsGeneratorResultForClass(name);
|
||||
}
|
||||
}
|
55
src/main/java/de/dhbwstuttgart/bytecode/genericsGeneratorTypes/GenericsGeneratorResult.java
Normal file
@ -0,0 +1,55 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
package de.dhbwstuttgart.bytecode.genericsGeneratorTypes;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
import de.dhbwstuttgart.bytecode.constraint.TPHConstraint;
|
||||
|
||||
/**
|
||||
* @author fayez
|
||||
*
|
||||
*/
|
||||
public class GenericsGeneratorResult {
|
||||
private TPHConstraint constraint;
|
||||
/**
|
||||
* contains the names of all type placeholders which are equals to the left side of
|
||||
* the constraint {@link #constraint}.
|
||||
*/
|
||||
private Set<String> equalsTPHs;
|
||||
/**
|
||||
* @param constraint
|
||||
* @param equalsTPHs
|
||||
*/
|
||||
public GenericsGeneratorResult(TPHConstraint constraint, Set<String> equalsTPHs) {
|
||||
this.constraint = constraint;
|
||||
this.equalsTPHs = equalsTPHs;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the constraint
|
||||
*/
|
||||
public TPHConstraint getConstraint() {
|
||||
return constraint;
|
||||
}
|
||||
/**
|
||||
* @param constraint the constraint to set
|
||||
*/
|
||||
public void setConstraint(TPHConstraint constraint) {
|
||||
this.constraint = constraint;
|
||||
}
|
||||
/**
|
||||
* @return the equalsTPHs
|
||||
*/
|
||||
public Set<String> getEqualsTPHs() {
|
||||
return equalsTPHs;
|
||||
}
|
||||
/**
|
||||
* @param equalsTPHs the equalsTPHs to set
|
||||
*/
|
||||
public void setEqualsTPHs(Set<String> equalsTPHs) {
|
||||
this.equalsTPHs = equalsTPHs;
|
||||
}
|
||||
|
||||
}
|
76
src/main/java/de/dhbwstuttgart/bytecode/genericsGeneratorTypes/GenericsGeneratorResultForClass.java
Normal file
@ -0,0 +1,76 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
package de.dhbwstuttgart.bytecode.genericsGeneratorTypes;
|
||||
|
||||
import de.dhbwstuttgart.parser.scope.JavaClassName;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
|
||||
/**
|
||||
* @author fayez
|
||||
*
|
||||
*/
|
||||
public class GenericsGeneratorResultForClass {
|
||||
private final JavaClassName className;
|
||||
private final List<GenericsGeneratorResult> classConstraints;
|
||||
private final GenericGeneratorResultsForAllMethods methodsAndTheirConstraints;
|
||||
|
||||
public GenericsGeneratorResultForClass(JavaClassName className) {
|
||||
this(className, Collections.emptyList(), new GenericGeneratorResultsForAllMethods());
|
||||
}
|
||||
/**
|
||||
* @param className
|
||||
* @param classConstraints
|
||||
* @param methodsAndTheirConstraints
|
||||
*/
|
||||
public GenericsGeneratorResultForClass(JavaClassName className, List<GenericsGeneratorResult> classConstraints,
|
||||
GenericGeneratorResultsForAllMethods methodsAndTheirConstraints) {
|
||||
this.className = className;
|
||||
this.classConstraints = classConstraints;
|
||||
this.methodsAndTheirConstraints = methodsAndTheirConstraints;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the className
|
||||
*/
|
||||
public JavaClassName getClassName() {
|
||||
return className;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the classConstraints
|
||||
*/
|
||||
public List<GenericsGeneratorResult> getClassConstraints() {
|
||||
return classConstraints;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the methodsAndTheirConstraints
|
||||
*/
|
||||
public GenericGeneratorResultsForAllMethods getMethodsAndTheirConstraints() {
|
||||
return methodsAndTheirConstraints;
|
||||
}
|
||||
|
||||
public boolean contains(String id) {
|
||||
return methodsAndTheirConstraints.getMethodsAndConstraints().stream().map(mc -> mc.getMethodID())
|
||||
.anyMatch(i -> i.equals(id));
|
||||
}
|
||||
|
||||
public List<GenericsGeneratorResult> getMethodConstraintsByID(String id) {
|
||||
Optional<MethodAndConstraints> methodConstraints = methodsAndTheirConstraints.getMethodsAndConstraints()
|
||||
.stream()
|
||||
.filter(mc -> mc.getMethodID().equals(id))
|
||||
.findFirst();
|
||||
|
||||
if (methodConstraints.isPresent()) {
|
||||
return methodConstraints.get().getConstraints();
|
||||
} else {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
}
|
||||
}
|
36
src/main/java/de/dhbwstuttgart/bytecode/genericsGeneratorTypes/MethodAndConstraints.java
Normal file
@ -0,0 +1,36 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
package de.dhbwstuttgart.bytecode.genericsGeneratorTypes;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author fayez
|
||||
*
|
||||
*/
|
||||
public class MethodAndConstraints {
|
||||
private final String methodID;
|
||||
private final List<GenericsGeneratorResult> constraints;
|
||||
/**
|
||||
* @param methodID
|
||||
* @param constraints
|
||||
*/
|
||||
public MethodAndConstraints(String methodID, List<GenericsGeneratorResult> constraints) {
|
||||
this.methodID = methodID;
|
||||
this.constraints = constraints;
|
||||
}
|
||||
/**
|
||||
* @return the methodID
|
||||
*/
|
||||
public String getMethodID() {
|
||||
return methodID;
|
||||
}
|
||||
/**
|
||||
* @return the constraints
|
||||
*/
|
||||
public List<GenericsGeneratorResult> getConstraints() {
|
||||
return constraints;
|
||||
}
|
||||
|
||||
}
|
49
src/main/java/de/dhbwstuttgart/bytecode/genericsGeneratorTypes/NameReplacementResult.java
Normal file
@ -0,0 +1,49 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
package de.dhbwstuttgart.bytecode.genericsGeneratorTypes;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author fayez
|
||||
*
|
||||
*/
|
||||
public class NameReplacementResult {
|
||||
private String name;
|
||||
private List<String> oldNames;
|
||||
/**
|
||||
* @param name
|
||||
* @param oldNames
|
||||
*/
|
||||
public NameReplacementResult(String name, List<String> oldNames) {
|
||||
this.name = name;
|
||||
this.oldNames = oldNames;
|
||||
}
|
||||
/**
|
||||
* @return the name
|
||||
*/
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
/**
|
||||
* @param name the name to set
|
||||
*/
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
/**
|
||||
* @return the oldNames
|
||||
*/
|
||||
public List<String> getOldNames() {
|
||||
return oldNames;
|
||||
}
|
||||
/**
|
||||
* @param oldNames the oldNames to set
|
||||
*/
|
||||
public void setOldNames(List<String> oldNames) {
|
||||
this.oldNames = oldNames;
|
||||
};
|
||||
|
||||
|
||||
}
|
@ -1,488 +1,379 @@
|
||||
package de.dhbwstuttgart.bytecode.signature;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
import java.util.*;
|
||||
|
||||
import org.objectweb.asm.Type;
|
||||
import org.objectweb.asm.signature.SignatureVisitor;
|
||||
import org.objectweb.asm.signature.SignatureWriter;
|
||||
|
||||
import de.dhbwstuttgart.bytecode.constraint.ExtendsConstraint;
|
||||
import de.dhbwstuttgart.bytecode.constraint.TPHConstraint;
|
||||
import de.dhbwstuttgart.bytecode.constraint.TPHConstraint.Relation;
|
||||
import de.dhbwstuttgart.bytecode.descriptor.TypeToDescriptor;
|
||||
import de.dhbwstuttgart.bytecode.utilities.Simplify;
|
||||
import de.dhbwstuttgart.bytecode.genericsGeneratorTypes.GenericsGeneratorResult;
|
||||
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.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.WildcardType;
|
||||
import de.dhbwstuttgart.typeinference.result.GenericInsertPair;
|
||||
import de.dhbwstuttgart.typeinference.result.ResolvedType;
|
||||
import de.dhbwstuttgart.typeinference.result.ResultSet;
|
||||
|
||||
public class Signature {
|
||||
private static final char SUPER_CHAR = '-';
|
||||
private static final char EXTENDS_CHAR = '+';
|
||||
private static final String SPECIAL_CHAR_FOR_FUN = "$$";
|
||||
private static final String SPECIAL_CHAR = "$";
|
||||
private ClassOrInterface classOrInterface;
|
||||
private HashMap<String, String> genericsAndBounds;
|
||||
private HashMap<String, String> genericsAndBoundsMethod;
|
||||
private SignatureWriter sw;
|
||||
private final SignatureWriter sw = new SignatureWriter();;
|
||||
private Constructor constructor;
|
||||
private Method method;
|
||||
private HashMap<String,RefTypeOrTPHOrWildcardOrGeneric> methodParamsAndTypes;
|
||||
private HashMap<String, RefTypeOrTPHOrWildcardOrGeneric> methodParamsAndTypes;
|
||||
private ResultSet resultSet;
|
||||
private ArrayList<GenericInsertPair> commonPairs;
|
||||
private HashMap<TPHConstraint,HashSet<String>> methodConstraints;
|
||||
private ArrayList<String> tphsClass;
|
||||
private ArrayList<TPHConstraint> consClass;
|
||||
|
||||
public Signature(ClassOrInterface classOrInterface, HashMap<String, String> genericsAndBounds,
|
||||
ArrayList<GenericInsertPair> commonPairs, ArrayList<String> tphsClass, ArrayList<TPHConstraint> consClass) {
|
||||
this.classOrInterface = classOrInterface;
|
||||
this.genericsAndBounds = genericsAndBounds;
|
||||
this.commonPairs = commonPairs;
|
||||
this.tphsClass = tphsClass;
|
||||
this.consClass = consClass;
|
||||
sw = new SignatureWriter();
|
||||
createSignatureForClassOrInterface();
|
||||
}
|
||||
private Map<TPHConstraint, Set<String>> methodConstraints;
|
||||
private List<GenericsGeneratorResult> consClass;
|
||||
private List<GenericsGeneratorResult> constraints;
|
||||
|
||||
public Signature(Constructor constructor, HashMap<String, String> genericsAndBounds,
|
||||
HashMap<String,RefTypeOrTPHOrWildcardOrGeneric> methodParamsAndTypes,ResultSet resultSet,
|
||||
HashMap<TPHConstraint,HashSet<String>> methodConstraints) {
|
||||
this.constructor = constructor;
|
||||
// public Signature(ClassOrInterface classOrInterface, HashMap<String, String> genericsAndBounds,
|
||||
// List<TPHConstraint> consClass) {
|
||||
// this.classOrInterface = classOrInterface;
|
||||
// this.genericsAndBounds = genericsAndBounds;
|
||||
// this.consClass = consClass;
|
||||
// sw = new SignatureWriter();
|
||||
// createSignatureForClassOrInterface();
|
||||
// }
|
||||
|
||||
public Signature(HashMap<String, String> genericsAndBounds,
|
||||
HashMap<String, RefTypeOrTPHOrWildcardOrGeneric> methodParamsAndTypes, ResultSet resultSet,
|
||||
List<GenericsGeneratorResult> constraints) {
|
||||
//this.constructor = constructor;
|
||||
this.genericsAndBounds = genericsAndBounds;
|
||||
this.methodParamsAndTypes = methodParamsAndTypes;
|
||||
this.resultSet = resultSet;
|
||||
this.methodConstraints = methodConstraints;
|
||||
sw = new SignatureWriter();
|
||||
createSignatureForConsOrMethod(this.constructor,true);
|
||||
this.constraints = constraints;
|
||||
}
|
||||
|
||||
public Signature(Method method, HashMap<String, String> genericsAndBoundsMethod,HashMap<String, String> genericsAndBounds,
|
||||
HashMap<String, RefTypeOrTPHOrWildcardOrGeneric> methodParamsAndTypes, ResultSet resultSet,
|
||||
HashMap<TPHConstraint,HashSet<String>> methodConstraints) {
|
||||
this.method = method;
|
||||
public Signature(int numberOfParams) {
|
||||
createSignatureForFunN(numberOfParams);
|
||||
}
|
||||
|
||||
public Signature(int numberOfParams, String to, String[] paramTypes) {
|
||||
createSignatureForFunN(numberOfParams, to, paramTypes);
|
||||
}
|
||||
|
||||
public Signature(ClassOrInterface classOrInterface, HashMap<String, String> genericsAndBounds,
|
||||
List<GenericsGeneratorResult> consClass) {
|
||||
this.classOrInterface = classOrInterface;
|
||||
this.genericsAndBounds = genericsAndBounds;
|
||||
this.consClass = consClass;
|
||||
}
|
||||
|
||||
public Signature(HashMap<String, String> genericsAndBoundsMethod,
|
||||
HashMap<String, String> genericsAndBounds,
|
||||
HashMap<String, RefTypeOrTPHOrWildcardOrGeneric> methodParamsAndTypes, ResultSet resultSet,
|
||||
List<GenericsGeneratorResult> constraints,List<GenericsGeneratorResult> consClass) {
|
||||
this.genericsAndBoundsMethod = genericsAndBoundsMethod;
|
||||
this.genericsAndBounds = genericsAndBounds;
|
||||
this.methodParamsAndTypes = methodParamsAndTypes;
|
||||
this.resultSet = resultSet;
|
||||
this.methodConstraints = methodConstraints;
|
||||
sw = new SignatureWriter();
|
||||
createSignatureForConsOrMethod(this.method,false);
|
||||
this.constraints = constraints;
|
||||
this.consClass = consClass;
|
||||
}
|
||||
|
||||
public Signature(int numberOfParams) {
|
||||
sw = new SignatureWriter();
|
||||
createSignatureForFunN(numberOfParams);
|
||||
|
||||
public String createSignatureForConstructor(Constructor constructor) {
|
||||
visitParams();
|
||||
sw.visitReturnType().visitBaseType('V');
|
||||
return sw.toString();
|
||||
}
|
||||
|
||||
public String createSignatureForMethod(Method method) {
|
||||
defineGenerics(method);
|
||||
|
||||
String ret = resultSet.resolveType(method.getReturnType()).resolvedType.acceptTV(new TypeToSignature());
|
||||
|
||||
visitParams();
|
||||
visitReturnType(method, ret);
|
||||
return sw.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param method
|
||||
* @param ret
|
||||
*/
|
||||
private void visitReturnType(Method method, String ret) {
|
||||
if (ret.equals("V")) {
|
||||
sw.visitReturnType().visitBaseType('V');
|
||||
} else {
|
||||
RefTypeOrTPHOrWildcardOrGeneric returnType = method.getReturnType();
|
||||
SignatureVisitor sv = sw.visitReturnType();
|
||||
doVisitParamsOrReturn(returnType, sv);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private void visitParams() {
|
||||
for (String paramName : methodParamsAndTypes.keySet()) {
|
||||
RefTypeOrTPHOrWildcardOrGeneric t = methodParamsAndTypes.get(paramName);
|
||||
SignatureVisitor sv = sw.visitParameterType();
|
||||
doVisitParamsOrReturn(t, sv);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param method
|
||||
*/
|
||||
private void defineGenerics(Method method) {
|
||||
method.getGenerics().forEach(g -> {
|
||||
visitTypeVarsAndTheirBounds(g, genericsAndBoundsMethod);
|
||||
});
|
||||
defineGenericsFromConstraints(constraints,genericsAndBoundsMethod);
|
||||
}
|
||||
|
||||
private void createSignatureForFunN(int numberOfParams, String to, String[] paramTypes) {
|
||||
defineTypeVariablesForParametersOfFunN(numberOfParams);
|
||||
|
||||
sw.visitFormalTypeParameter("R");
|
||||
visitClassBound(to);
|
||||
// TODO: prüfe ob Return-Type = void,
|
||||
sw.visitSuperclass().visitClassType(Type.getInternalName(Object.class));
|
||||
sw.visitEnd();
|
||||
|
||||
}
|
||||
|
||||
private void createSignatureForFunN(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();
|
||||
}
|
||||
|
||||
defineTypeVariablesForParametersOfFunN(numberOfParams);
|
||||
|
||||
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.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()) {
|
||||
System.out.println("HAS GENERICS!!");
|
||||
GenericTypeVar g = itr.next();
|
||||
getBoundsOfTypeVar(g,genericsAndBoundsMethod);
|
||||
private void defineTypeVariablesForParametersOfFunN(int numberOfParams) {
|
||||
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();
|
||||
}
|
||||
|
||||
// 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
|
||||
if(!isConstructor) {
|
||||
String ret = resultSet.resolveType(method.getReturnType()).resolvedType.acceptTV(new TypeToSignature());
|
||||
ArrayList<TPHConstraint> allConsBeforeSimplify = new ArrayList<>();
|
||||
|
||||
HashMap<TPHConstraint,HashSet<String>> allConstraints = new HashMap<>();
|
||||
|
||||
if(ret.contains("<")) {
|
||||
allConsBeforeSimplify = getAllConstraints((RefType) resultSet.resolveType(method.getReturnType()).resolvedType);
|
||||
}
|
||||
|
||||
for(String paramName : methodParamsAndTypes.keySet()) {
|
||||
RefTypeOrTPHOrWildcardOrGeneric t = methodParamsAndTypes.get(paramName);
|
||||
String pT = t.acceptTV(new TypeToSignature());
|
||||
|
||||
if(pT.contains("<"))
|
||||
allConsBeforeSimplify = getAllConstraints((RefType) t);
|
||||
}
|
||||
boolean doSimplify = false;
|
||||
if(!allConsBeforeSimplify.isEmpty()) {
|
||||
addConstraintsToMap(allConstraints,allConsBeforeSimplify);
|
||||
doSimplify = true;
|
||||
}
|
||||
createTypeVars(allConstraints, doSimplify);
|
||||
|
||||
if(!ret.equals("V")) {
|
||||
if(ret.contains("$") && !ret.contains("$$") && !ret.contains("<")) {
|
||||
if(genericsAndBounds.containsKey(ret)) {
|
||||
genericsAndBoundsMethod.put(ret.substring(1), genericsAndBounds.get(ret.substring(1)));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
// 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 ||
|
||||
resultSet.resolveType(method.getReturnType()).resolvedType.acceptTV(new TypeToSignature()).equals("V")) {
|
||||
sw.visitReturnType().visitBaseType('V');
|
||||
}else {
|
||||
RefTypeOrTPHOrWildcardOrGeneric returnType = method.getReturnType();
|
||||
// return type deswegen ist false
|
||||
doVisitParamsOrReturn(returnType, false);
|
||||
}
|
||||
// sw.visitEnd();
|
||||
}
|
||||
|
||||
private void addConstraintsToMap(HashMap<TPHConstraint, HashSet<String>> allConstraints,
|
||||
ArrayList<TPHConstraint> allConsBeforeSimplify) {
|
||||
for(TPHConstraint tphCons : allConsBeforeSimplify) {
|
||||
allConstraints.put(tphCons, null);
|
||||
}
|
||||
}
|
||||
|
||||
private String getEqualTPH(HashMap<TPHConstraint, HashSet<String>> methodConstraints, String tph) {
|
||||
for(TPHConstraint cons : methodConstraints.keySet()) {
|
||||
if(methodConstraints.get(cons) != null) {
|
||||
if(methodConstraints.get(cons).contains(tph)) {
|
||||
return cons.getLeft();
|
||||
}
|
||||
}
|
||||
}
|
||||
return tph;
|
||||
}
|
||||
|
||||
private void createTypeVars(HashMap<TPHConstraint, HashSet<String>> allConstraints, boolean doSimplify) {
|
||||
allConstraints.putAll(methodConstraints);
|
||||
|
||||
HashMap<TPHConstraint, HashSet<String>> simplifiedConstraints;
|
||||
if(doSimplify) {
|
||||
simplifiedConstraints = Simplify.simplifyContraints(allConstraints);
|
||||
}else {
|
||||
simplifiedConstraints = allConstraints;
|
||||
}
|
||||
|
||||
for(TPHConstraint cons : simplifiedConstraints.keySet()) {
|
||||
// need subst.
|
||||
String sub = cons.getLeft()+"$";
|
||||
if(!genericsAndBoundsMethod.containsKey(sub) && !genericsAndBounds.containsKey(sub)) {
|
||||
sw.visitFormalTypeParameter(sub);
|
||||
String bound = cons.getRight();
|
||||
if(bound.equals(Type.getInternalName(Object.class))) {
|
||||
sw.visitClassBound().visitClassType(Type.getInternalName(Object.class));
|
||||
sw.visitClassBound().visitEnd();
|
||||
genericsAndBoundsMethod.put(sub, bound);
|
||||
} else {
|
||||
String boundName = bound+"$";
|
||||
sw.visitClassBound().visitTypeVariable(boundName);
|
||||
genericsAndBoundsMethod.put(sub, boundName);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
private ArrayList<TPHConstraint> getAllConstraints(RefType ref) {
|
||||
final ArrayList<TPHConstraint> res = new ArrayList<>();
|
||||
for(RefTypeOrTPHOrWildcardOrGeneric p : ref.getParaList()) {
|
||||
ResolvedType resType;
|
||||
if(p instanceof WildcardType) {
|
||||
resType = resultSet.resolveType(((WildcardType) p).getInnerType());
|
||||
}else {
|
||||
resType = resultSet.resolveType(p);
|
||||
}
|
||||
|
||||
RefTypeOrTPHOrWildcardOrGeneric resolved = resType.resolvedType;
|
||||
if(resolved instanceof TypePlaceholder) {
|
||||
//resType.getAdditionalGenerics().forEach(ag ->{
|
||||
resultSet.genIns.forEach(ag ->{
|
||||
TPHConstraint constr = new ExtendsConstraint(ag.getLeft().getName(), ag.getRight().getName(), Relation.EXTENDS);
|
||||
if(!contains(res,constr)) {
|
||||
res.add(constr);
|
||||
}
|
||||
});
|
||||
}
|
||||
if(resolved instanceof WildcardType) {
|
||||
WildcardType resWC = (WildcardType) resolved;
|
||||
ResolvedType resType2 = resultSet.resolveType(resWC.getInnerType());
|
||||
if(resType2.resolvedType instanceof TypePlaceholder) {
|
||||
//resType2.getAdditionalGenerics().forEach(ag ->{
|
||||
resultSet.genIns.forEach(ag ->{
|
||||
TPHConstraint constr = new ExtendsConstraint(ag.getLeft().getName(), ag.getRight().getName(), Relation.EXTENDS);
|
||||
if(!contains(res,constr)) {
|
||||
res.add(constr);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
System.out.println("RES GIP === " + res.size());
|
||||
return res;
|
||||
}
|
||||
private boolean contains(ArrayList<TPHConstraint> constraints, TPHConstraint constr) {
|
||||
for(int i=0; i<constraints.size();++i) {
|
||||
TPHConstraint p = constraints.get(i);
|
||||
if(constr.getLeft().equals(p.getLeft()) && constr.getRight().equals(p.getRight()))
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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
|
||||
*
|
||||
* @param t type of parameter or return type
|
||||
* @param sv true if t is type of parameter
|
||||
*/
|
||||
private void doVisitParamsOrReturn(RefTypeOrTPHOrWildcardOrGeneric t, boolean isParameterType) {
|
||||
private void doVisitParamsOrReturn(RefTypeOrTPHOrWildcardOrGeneric t, SignatureVisitor sv) {
|
||||
String type = t.acceptTV(new TypeToString());
|
||||
SignatureVisitor sv;
|
||||
if(isParameterType) {
|
||||
sv = sw.visitParameterType();
|
||||
}
|
||||
else {
|
||||
sv = sw.visitReturnType();
|
||||
}
|
||||
|
||||
switch (type) {
|
||||
case "RT":
|
||||
String sig = t.acceptTV(new TypeToSignature());
|
||||
String sig = t.acceptTV(new TypeToSignature(constraints));
|
||||
sv.visitClassType(sig.substring(1, sig.length()));
|
||||
break;
|
||||
case "GRT":
|
||||
GenericRefType g = (GenericRefType) t;
|
||||
// sv.visitTypeVariable(g.acceptTV(new TypeToSignature()).substring(1));
|
||||
sv.visitTypeVariable(g.acceptTV(new TypeToSignature()));
|
||||
sv.visitTypeVariable(g.acceptTV(new TypeToSignature(constraints)));
|
||||
break;
|
||||
case "TPH":
|
||||
RefTypeOrTPHOrWildcardOrGeneric r = resultSet.resolveType(t).resolvedType;
|
||||
// der Fall wenn die Type eine Interface ist, muss betrachtet werden
|
||||
// der Fall wenn der Typ eine Interface ist, muss betrachtet werden
|
||||
// Deswegen muss in ResutSet noch enthalten werden, ob die Type eine
|
||||
// Interface oder eine Klasse ist.
|
||||
|
||||
// das braucht man nicht es reicht: sv.visitTypeVariable(r.acceptTV(new TypeToSignature())
|
||||
//
|
||||
String sig2 = r.acceptTV(new TypeToSignature());
|
||||
if(r instanceof GenericRefType) {
|
||||
|
||||
// das braucht man nicht es reicht: sv.visitTypeVariable(r.acceptTV(new
|
||||
// TypeToSignature())
|
||||
//
|
||||
String sig2 = r.acceptTV(new TypeToSignature(constraints));
|
||||
if (r instanceof GenericRefType) {
|
||||
sv.visitTypeVariable(sig2);
|
||||
}else if(!(r instanceof TypePlaceholder)) {
|
||||
if(sig2.contains("$$")) {
|
||||
System.out.println(" Signature FUN$$: "+r);
|
||||
sv.visitInterface().visitClassType(sig2.substring(1, sig2.length()));
|
||||
} else if (!(r instanceof TypePlaceholder)) {
|
||||
if (sig2.contains(SPECIAL_CHAR_FOR_FUN)) {
|
||||
sv.visitInterface().visitClassType(sig2.substring(1));
|
||||
} else {
|
||||
// Kann zwischen GenericRefType und RefType nicht unterscheiden
|
||||
// Deswegen wird immer geprüft, ob der Name in Generic Maps liegt
|
||||
String n = sig2.substring(1, sig2.length()-1);
|
||||
String n = sig2.substring(1, sig2.length() - 1);
|
||||
// if(genericsAndBoundsMethod.containsKey(n) || genericsAndBounds.containsKey(n)) {
|
||||
// sv.visitTypeVariable(n);
|
||||
// } else {
|
||||
sv.visitClassType(n);
|
||||
sv.visitEnd();
|
||||
sv.visitClassType(n);
|
||||
sv.visitEnd();
|
||||
// }
|
||||
// sv.visitClassType(n);
|
||||
}
|
||||
|
||||
|
||||
} else {
|
||||
String eqTPH = getEqualTPH(methodConstraints, sig2.substring(1, sig2.length()-1))+"$";
|
||||
System.out.println(r.getClass()+" Signature TPH: "+r.acceptTV(new TypeToSignature()));
|
||||
sv.visitTypeVariable(eqTPH);
|
||||
String realName = sig2.substring(1, sig2.length() - 1);
|
||||
String toVisit = realName+SPECIAL_CHAR;
|
||||
if(!genericsAndBounds.containsKey(toVisit)) {
|
||||
Optional<GenericsGeneratorResult> equalTPH = getEqualTPHFromClassConstraints(consClass, realName);
|
||||
if(equalTPH.isPresent()){
|
||||
toVisit = equalTPH.get().getConstraint().getLeft() + SPECIAL_CHAR;
|
||||
} else {
|
||||
toVisit = getEqualTPH(constraints, realName) + SPECIAL_CHAR;
|
||||
}
|
||||
}
|
||||
sv.visitTypeVariable(toVisit);
|
||||
}
|
||||
|
||||
|
||||
break;
|
||||
|
||||
|
||||
case "SWC":
|
||||
System.out.println("SWC---Signature");
|
||||
SuperWildcardType swc = (SuperWildcardType) t;
|
||||
String sigInner = swc.getInnerType().acceptTV(new TypeToSignature());
|
||||
if(swc.getInnerType() instanceof TypePlaceholder) {
|
||||
sv.visitTypeArgument('-').visitTypeVariable(sigInner.substring(1, sigInner.length()));
|
||||
} else if(swc.getInnerType() instanceof RefType) {
|
||||
if(sigInner.contains("$$")) {
|
||||
sv.visitTypeArgument('-').visitInterface().visitClassType(sigInner.substring(1,sigInner.length()));
|
||||
}else {
|
||||
sv.visitTypeArgument('-').visitClassType(sigInner.substring(1,sigInner.length()));
|
||||
}
|
||||
}else {
|
||||
sv.visitTypeArgument('-').visitTypeVariable(sigInner.substring(1));
|
||||
}
|
||||
|
||||
String sigInner = swc.getInnerType().acceptTV(new TypeToSignature(constraints));
|
||||
int length = sigInner.length();
|
||||
visitWildCard(sv, sigInner, length, swc.getInnerType(), SUPER_CHAR);
|
||||
|
||||
break;
|
||||
|
||||
|
||||
case "EWC":
|
||||
System.out.println("EWC---Signature");
|
||||
ExtendsWildcardType ewc = (ExtendsWildcardType) t;
|
||||
String esigInner = ewc.getInnerType().acceptTV(new TypeToSignature());
|
||||
System.out.println(esigInner);
|
||||
if(ewc.getInnerType() instanceof TypePlaceholder) {
|
||||
sv.visitTypeArgument('+').visitTypeVariable(esigInner.substring(1, esigInner.length()));
|
||||
} else if(ewc.getInnerType() instanceof RefType) {
|
||||
if(esigInner.contains("$$")) {
|
||||
sv.visitTypeArgument('+').visitInterface().visitClassType(esigInner.substring(1,esigInner.length()));
|
||||
}else {
|
||||
// sv.visitClassType(esigInner.substring(1,esigInner.length()));
|
||||
sv.visitTypeArgument('+').visitClassType(esigInner.substring(1,esigInner.length()));
|
||||
}
|
||||
}else {
|
||||
sv.visitTypeArgument('+').visitTypeVariable(esigInner.substring(1));
|
||||
}
|
||||
|
||||
String esigInner = ewc.getInnerType().acceptTV(new TypeToSignature(constraints));
|
||||
int lengthEWCSig = esigInner.length();
|
||||
visitWildCard(sv, esigInner, lengthEWCSig, ewc.getInnerType(), EXTENDS_CHAR);
|
||||
|
||||
break;
|
||||
default:
|
||||
if(!isParameterType)
|
||||
sv.visitBaseType('V');
|
||||
// if (!sv)
|
||||
// sv.visitBaseType('V');
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private void visitWildCard(SignatureVisitor sv, String sigInner, int length, RefTypeOrTPHOrWildcardOrGeneric innerType, char superOrExtendsChar) {
|
||||
if (innerType instanceof TypePlaceholder) {
|
||||
sv.visitTypeArgument(superOrExtendsChar).visitTypeVariable(sigInner.substring(1, length));
|
||||
} else if (innerType instanceof RefType) {
|
||||
checkInnerSignatureOfWildCard(sv, sigInner, length, superOrExtendsChar);
|
||||
} else {
|
||||
sv.visitTypeArgument(superOrExtendsChar).visitTypeVariable(sigInner.substring(1));
|
||||
}
|
||||
}
|
||||
|
||||
private void checkInnerSignatureOfWildCard(SignatureVisitor sv, String sigInner, int length, char superOrExtendsChar) {
|
||||
if (sigInner.contains(SPECIAL_CHAR_FOR_FUN)) {
|
||||
sv.visitTypeArgument(superOrExtendsChar).visitInterface().visitClassType(sigInner.substring(1, length));
|
||||
} else {
|
||||
sv.visitTypeArgument(superOrExtendsChar).visitClassType(sigInner.substring(1, length));
|
||||
}
|
||||
}
|
||||
|
||||
private Optional<GenericsGeneratorResult> getEqualTPHFromClassConstraints(List<GenericsGeneratorResult> consClass, String tph) {
|
||||
return consClass.stream()
|
||||
.filter(c -> c.getConstraint().getLeft().equals(tph) || c.getEqualsTPHs().contains(tph))
|
||||
.findFirst();
|
||||
}
|
||||
|
||||
private String getEqualTPH(List<GenericsGeneratorResult> constraints2, String tph) {
|
||||
return constraints2.stream()
|
||||
.filter(c -> c.getConstraint().getLeft().equals(tph) || c.getEqualsTPHs().contains(tph))
|
||||
.findFirst().get().getConstraint().getLeft();
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates signature for class or interface with {@link SignatureWriter}
|
||||
* Signature looks like:
|
||||
* <typevaliables (K:Ljava/lang/Object "Bounds")>superclass
|
||||
* Signature looks like: <typevaliables (K:Ljava/lang/Object
|
||||
* "Bounds")>superclass
|
||||
*/
|
||||
private void createSignatureForClassOrInterface() {
|
||||
public String createSignatureForClassOrInterface() {
|
||||
defineTypeVariablesForClassOrInterface();
|
||||
|
||||
defineGenericsFromConstraints(consClass,genericsAndBounds);
|
||||
|
||||
String sClass = classOrInterface.getSuperClass().acceptTV(new TypeToSignature());
|
||||
sw.visitSuperclass().visitClassType(sClass.substring(1, sClass.length() - 1));
|
||||
sw.visitEnd();
|
||||
return sw.toString();
|
||||
}
|
||||
|
||||
private void defineTypeVariablesForClassOrInterface() {
|
||||
Iterator<GenericTypeVar> itr = classOrInterface.getGenerics().iterator();
|
||||
|
||||
while(itr.hasNext()) {
|
||||
while (itr.hasNext()) {
|
||||
GenericTypeVar g = itr.next();
|
||||
getBoundsOfTypeVar(g,genericsAndBounds);
|
||||
visitTypeVarsAndTheirBounds(g, genericsAndBounds);
|
||||
}
|
||||
|
||||
if(!consClass.isEmpty()) {
|
||||
ArrayList<String> types = new ArrayList<>();
|
||||
ArrayList<String> superTypes = new ArrayList<>();
|
||||
|
||||
for(TPHConstraint cons : consClass) {
|
||||
types.add(cons.getLeft());
|
||||
superTypes.add(cons.getRight());
|
||||
}
|
||||
|
||||
for(TPHConstraint cons : consClass) {
|
||||
String t = cons.getLeft()+"$";
|
||||
String bound = cons.getRight()+"$";
|
||||
sw.visitFormalTypeParameter(t);
|
||||
sw.visitClassBound().visitTypeVariable(bound);
|
||||
genericsAndBounds.put(t, bound);
|
||||
}
|
||||
|
||||
for(TPHConstraint cons : consClass) {
|
||||
if(!types.contains(cons.getRight()) && !genericsAndBounds.keySet().contains(cons.getRight()+"$")) {
|
||||
String t = cons.getRight()+"$";
|
||||
String bound = Type.getInternalName(Object.class);
|
||||
sw.visitFormalTypeParameter(t);
|
||||
sw.visitClassBound().visitClassType(bound);
|
||||
genericsAndBounds.put(t, bound);
|
||||
sw.visitClassBound().visitEnd();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
/*if(!commonPairs.isEmpty()) {
|
||||
ArrayList<TypePlaceholder> types = new ArrayList<>();
|
||||
ArrayList<TypePlaceholder> superTypes = new ArrayList<>();
|
||||
|
||||
for(GenericInsertPair p : commonPairs) {
|
||||
types.add(p.TA1);
|
||||
superTypes.add(p.TA2);
|
||||
}
|
||||
|
||||
for(GenericInsertPair p : commonPairs) {
|
||||
String t = p.TA1.getName()+"$";
|
||||
String bound = p.TA2.getName()+"$";
|
||||
sw.visitFormalTypeParameter(t);
|
||||
sw.visitClassBound().visitTypeVariable(bound);
|
||||
genericsAndBounds.put(t, bound);
|
||||
}
|
||||
|
||||
for(GenericInsertPair p : commonPairs) {
|
||||
if(!types.contains(p.TA2)) {
|
||||
String t = p.TA2.getName()+"$";
|
||||
String bound = Type.getInternalName(Object.class);
|
||||
sw.visitFormalTypeParameter(t);
|
||||
sw.visitClassBound().visitClassType(bound);
|
||||
genericsAndBounds.put(t, bound);
|
||||
sw.visitClassBound().visitEnd();
|
||||
}
|
||||
}
|
||||
}
|
||||
for(TypePlaceholder t : tphsClass) {
|
||||
String n = t.getName()+"$";
|
||||
String bound = Type.getInternalName(Object.class);
|
||||
sw.visitFormalTypeParameter(n);
|
||||
sw.visitClassBound().visitClassType(bound);
|
||||
genericsAndBounds.put(n, bound);
|
||||
sw.visitClassBound().visitEnd();
|
||||
}*/
|
||||
String sClass = classOrInterface.getSuperClass().acceptTV(new TypeToSignature());
|
||||
sw.visitSuperclass().visitClassType(sClass.substring(1, sClass.length()-1));
|
||||
sw.visitEnd();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param genericsAndBounds2
|
||||
*
|
||||
*/
|
||||
private void defineGenericsFromConstraints(List<GenericsGeneratorResult> constraints, HashMap<String,String> genericsAndBounds2) {
|
||||
constraints.forEach(c -> {
|
||||
String typeVariable = c.getConstraint().getLeft() + SPECIAL_CHAR;
|
||||
sw.visitFormalTypeParameter(typeVariable);
|
||||
|
||||
String bound = c.getConstraint().getRight();
|
||||
bound = checkBound(bound);
|
||||
genericsAndBounds2.put(typeVariable, bound);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* @param bound
|
||||
* @return
|
||||
*/
|
||||
private String checkBound(String bound) {
|
||||
if (bound.equals(Type.getInternalName(Object.class))) {
|
||||
visitClassBound(bound);
|
||||
} else {
|
||||
bound += SPECIAL_CHAR;
|
||||
sw.visitClassBound().visitTypeVariable(bound);
|
||||
}
|
||||
return bound;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param bound
|
||||
*/
|
||||
private void visitClassBound(String bound) {
|
||||
sw.visitClassBound().visitClassType(bound);
|
||||
sw.visitClassBound().visitEnd();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get bounds of type variable
|
||||
* @param g type variable
|
||||
* @param genAndBounds
|
||||
*
|
||||
* @param g type variable
|
||||
* @param genAndBounds
|
||||
*/
|
||||
private void getBoundsOfTypeVar(GenericTypeVar g, HashMap<String, String> genAndBounds) {
|
||||
private void visitTypeVarsAndTheirBounds(GenericTypeVar g, HashMap<String, String> genAndBounds) {
|
||||
sw.visitFormalTypeParameter(g.getName());
|
||||
|
||||
Iterator<? extends RefTypeOrTPHOrWildcardOrGeneric> bItr = g.getBounds().iterator();
|
||||
while(bItr.hasNext()) {
|
||||
RefTypeOrTPHOrWildcardOrGeneric b =bItr.next();
|
||||
|
||||
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 ...
|
||||
if(b instanceof GenericRefType) {
|
||||
if (b instanceof GenericRefType) {
|
||||
sw.visitClassBound().visitTypeVariable(boundDesc);
|
||||
} else {
|
||||
sw.visitClassBound().visitClassType(boundDesc);
|
||||
sw.visitClassBound().visitEnd();
|
||||
visitClassBound(boundDesc);
|
||||
}
|
||||
genAndBounds.put(g.getName(), boundDesc);
|
||||
}
|
||||
// sw.visitClassBound().visitEnd();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
if(sw == null)
|
||||
return super.toString();
|
||||
return sw.toString();
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,8 +1,11 @@
|
||||
package de.dhbwstuttgart.bytecode.signature;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
|
||||
import de.dhbwstuttgart.exceptions.NotImplementedException;
|
||||
import de.dhbwstuttgart.bytecode.genericsGeneratorTypes.GenericsGeneratorResult;
|
||||
import de.dhbwstuttgart.syntaxtree.type.ExtendsWildcardType;
|
||||
import de.dhbwstuttgart.syntaxtree.type.GenericRefType;
|
||||
import de.dhbwstuttgart.syntaxtree.type.RefType;
|
||||
@ -12,6 +15,15 @@ import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder;
|
||||
import de.dhbwstuttgart.syntaxtree.type.TypeVisitor;
|
||||
|
||||
public class TypeToSignature implements TypeVisitor<String> {
|
||||
private List<GenericsGeneratorResult> constraints;
|
||||
|
||||
public TypeToSignature() {
|
||||
this.constraints = new ArrayList<>();
|
||||
}
|
||||
|
||||
public TypeToSignature(List<GenericsGeneratorResult> constraints) {
|
||||
this.constraints = constraints;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String visit(RefType refType) {
|
||||
@ -33,7 +45,7 @@ public class TypeToSignature implements TypeVisitor<String> {
|
||||
// } else {
|
||||
// params += "L"+param.toString().replace(".", "/");
|
||||
// }
|
||||
params += param.acceptTV(new TypeToSignature());
|
||||
params += param.acceptTV(new TypeToSignature(constraints));
|
||||
|
||||
if(param instanceof TypePlaceholder)
|
||||
params += ";";
|
||||
@ -48,7 +60,7 @@ public class TypeToSignature implements TypeVisitor<String> {
|
||||
@Override
|
||||
public String visit(SuperWildcardType superWildcardType) {
|
||||
// throw new NotImplementedException();
|
||||
String sig = "-" + superWildcardType.getInnerType().acceptTV(new TypeToSignature());
|
||||
String sig = "-" + superWildcardType.getInnerType().acceptTV(new TypeToSignature(constraints));
|
||||
if(superWildcardType.getInnerType() instanceof TypePlaceholder)
|
||||
sig += ";";
|
||||
return sig;
|
||||
@ -57,13 +69,21 @@ public class TypeToSignature implements TypeVisitor<String> {
|
||||
@Override
|
||||
public String visit(TypePlaceholder typePlaceholder) {
|
||||
// return typePlaceholder.toString().replace(".", "/");
|
||||
return "T" + typePlaceholder.getName() + "$";
|
||||
String name = typePlaceholder.getName();
|
||||
|
||||
if(!constraints.isEmpty()){
|
||||
Optional<GenericsGeneratorResult> equalName = getEqualTPHFromClassConstraints(constraints, name);
|
||||
if(equalName.isPresent())
|
||||
name = equalName.get().getConstraint().getLeft();
|
||||
}
|
||||
|
||||
return "T" + name + "$";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String visit(ExtendsWildcardType extendsWildcardType) {
|
||||
// throw new NotImplementedException();
|
||||
String sig = "+" + extendsWildcardType.getInnerType().acceptTV(new TypeToSignature());
|
||||
String sig = "+" + extendsWildcardType.getInnerType().acceptTV(new TypeToSignature(constraints));
|
||||
if(extendsWildcardType.getInnerType() instanceof TypePlaceholder)
|
||||
sig += ";";
|
||||
return sig;
|
||||
@ -73,5 +93,10 @@ public class TypeToSignature implements TypeVisitor<String> {
|
||||
public String visit(GenericRefType genericRefType) {
|
||||
return genericRefType.getParsedName().replace(".", "/");
|
||||
}
|
||||
|
||||
|
||||
private Optional<GenericsGeneratorResult> getEqualTPHFromClassConstraints(List<GenericsGeneratorResult> listOfConstraints, String tph) {
|
||||
return listOfConstraints.stream()
|
||||
.filter(c -> c.getConstraint().getLeft().equals(tph) || c.getEqualsTPHs().contains(tph))
|
||||
.findFirst();
|
||||
}
|
||||
}
|
||||
|
50
src/main/java/de/dhbwstuttgart/bytecode/simplifyRes/GenericGenratorResultForSourceFile.java
Normal file
@ -0,0 +1,50 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
package de.dhbwstuttgart.bytecode.simplifyRes;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.NoSuchElementException;
|
||||
|
||||
/**
|
||||
* The simplify results of a source file (package)
|
||||
*
|
||||
* @author fayez
|
||||
*
|
||||
*/
|
||||
public class GenericGenratorResultForSourceFile {
|
||||
private String pkgName;
|
||||
private final List<GenericsGeneratorResultForClass> genericGeneratorResultForAllClasses = new ArrayList<>();
|
||||
|
||||
/**
|
||||
* @param pkgName
|
||||
*/
|
||||
public GenericGenratorResultForSourceFile(String pkgName) {
|
||||
this.pkgName = pkgName;
|
||||
}
|
||||
|
||||
public List<GenericsGeneratorResultForClass> getGenericGeneratorResultForAllClasses() {
|
||||
return genericGeneratorResultForAllClasses;
|
||||
}
|
||||
|
||||
/**
|
||||
* Appends the simplify results of a class to simplifyResForSF
|
||||
*
|
||||
* @param sResClass simplify results of a class to added
|
||||
*/
|
||||
public void addGenericGeneratorResultClass(GenericsGeneratorResultForClass sResClass) {
|
||||
genericGeneratorResultForAllClasses.add(sResClass);
|
||||
}
|
||||
|
||||
public GenericsGeneratorResultForClass getSimplifyResultsByName(String pkgName, String name) {
|
||||
for (int i = 0; i < genericGeneratorResultForAllClasses.size(); i++) {
|
||||
GenericsGeneratorResultForClass genericsGeneratorResult = genericGeneratorResultForAllClasses.get(i);
|
||||
if (genericsGeneratorResult.getClassName().equals(name)) {
|
||||
return genericsGeneratorResult;
|
||||
}
|
||||
}
|
||||
|
||||
return new GenericsGeneratorResultForClass(name);
|
||||
}
|
||||
}
|
75
src/main/java/de/dhbwstuttgart/bytecode/simplifyRes/GenericsGeneratorResultForClass.java
Normal file
@ -0,0 +1,75 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
package de.dhbwstuttgart.bytecode.simplifyRes;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import com.google.common.base.Optional;
|
||||
|
||||
import de.dhbwstuttgart.bytecode.genericsGeneratorTypes.GenericGeneratorResultsForAllMethods;
|
||||
import de.dhbwstuttgart.bytecode.genericsGeneratorTypes.GenericsGeneratorResult;
|
||||
import de.dhbwstuttgart.bytecode.genericsGeneratorTypes.MethodAndConstraints;
|
||||
|
||||
/**
|
||||
* @author fayez
|
||||
*
|
||||
*/
|
||||
public class GenericsGeneratorResultForClass {
|
||||
private final String className;
|
||||
private final List<GenericsGeneratorResult> classConstraints;
|
||||
private final GenericGeneratorResultsForAllMethods methodsAndTheirConstraints;
|
||||
|
||||
public GenericsGeneratorResultForClass(String className) {
|
||||
this(className, Collections.emptyList(), new GenericGeneratorResultsForAllMethods());
|
||||
}
|
||||
/**
|
||||
* @param className
|
||||
* @param classConstraints
|
||||
* @param methodsAndTheirConstraints
|
||||
*/
|
||||
public GenericsGeneratorResultForClass(String className, List<GenericsGeneratorResult> classConstraints,
|
||||
GenericGeneratorResultsForAllMethods methodsAndTheirConstraints) {
|
||||
this.className = className;
|
||||
this.classConstraints = classConstraints;
|
||||
this.methodsAndTheirConstraints = methodsAndTheirConstraints;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the className
|
||||
*/
|
||||
public String getClassName() {
|
||||
return className;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the classConstraints
|
||||
*/
|
||||
public List<GenericsGeneratorResult> getClassConstraints() {
|
||||
return classConstraints;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the methodsAndTheirConstraints
|
||||
*/
|
||||
public GenericGeneratorResultsForAllMethods getMethodsAndTheirConstraints() {
|
||||
return methodsAndTheirConstraints;
|
||||
}
|
||||
|
||||
public boolean contains(String id) {
|
||||
return methodsAndTheirConstraints.getMethodsAndConstraints().stream().map(mc -> mc.getMethodID())
|
||||
.anyMatch(i -> i.equals(id));
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public List<GenericsGeneratorResult> getMethodConstraintsByID(String id) {
|
||||
java.util.Optional<MethodAndConstraints> methodAndConstraints = methodsAndTheirConstraints.getMethodsAndConstraints().stream().filter(mc -> mc.getMethodID().equals(id))
|
||||
.findFirst();
|
||||
|
||||
return methodAndConstraints.isPresent() ? methodAndConstraints.get().getConstraints() : Collections.emptyList();
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,94 @@
|
||||
package de.dhbwstuttgart.bytecode.utilities;
|
||||
|
||||
import de.dhbwstuttgart.bytecode.signature.Signature;
|
||||
import de.dhbwstuttgart.syntaxtree.FormalParameter;
|
||||
import de.dhbwstuttgart.syntaxtree.statement.ArgumentList;
|
||||
import de.dhbwstuttgart.syntaxtree.statement.Expression;
|
||||
import de.dhbwstuttgart.syntaxtree.statement.LambdaExpression;
|
||||
import org.objectweb.asm.ClassWriter;
|
||||
import org.objectweb.asm.MethodVisitor;
|
||||
import org.objectweb.asm.Opcodes;
|
||||
import org.objectweb.asm.Type;
|
||||
import org.objectweb.asm.signature.SignatureVisitor;
|
||||
import org.objectweb.asm.signature.SignatureWriter;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.util.Iterator;
|
||||
|
||||
public class ByteCodeForFunNGenerator {
|
||||
|
||||
public static void generateBCForFunN(LambdaExpression lambdaExpression, String methDesc, File path) {
|
||||
ClassWriter classWriter = new ClassWriter(ClassWriter.COMPUTE_FRAMES | ClassWriter.COMPUTE_MAXS);
|
||||
|
||||
SignatureWriter methSig = new SignatureWriter();
|
||||
|
||||
int numberOfParams = 0;
|
||||
SignatureVisitor paramVisitor = methSig.visitParameterType();
|
||||
Iterator<FormalParameter> itr = lambdaExpression.params.iterator();
|
||||
while (itr.hasNext()) {
|
||||
numberOfParams++;
|
||||
// getBounds
|
||||
paramVisitor.visitTypeVariable(CONSTANTS.T + numberOfParams);
|
||||
itr.next();
|
||||
}
|
||||
methSig.visitReturnType().visitTypeVariable(CONSTANTS.R);
|
||||
// ")"+lam.getReturn.getBounds
|
||||
Signature sig = new Signature(numberOfParams);
|
||||
String name = CONSTANTS.FUN + numberOfParams + CONSTANTS.$$;
|
||||
classWriter.visit(Opcodes.V1_8, Opcodes.ACC_PUBLIC+Opcodes.ACC_INTERFACE + Opcodes.ACC_ABSTRACT, name, sig.toString(),
|
||||
Type.getInternalName(Object.class), null);
|
||||
MethodVisitor mvApply = classWriter.visitMethod(Opcodes.ACC_PUBLIC + Opcodes.ACC_ABSTRACT, "apply", methDesc,
|
||||
methSig.toString(), null);
|
||||
mvApply.visitEnd();
|
||||
writeClassFile(classWriter.toByteArray(), name, path);
|
||||
}
|
||||
|
||||
public static void generateBCForFunN(ArgumentList argumentList, String methDesc, File path) {
|
||||
ClassWriter classWriter = new ClassWriter(ClassWriter.COMPUTE_FRAMES | ClassWriter.COMPUTE_MAXS);
|
||||
|
||||
SignatureWriter methSig = new SignatureWriter();
|
||||
|
||||
int numberOfParams = 0;
|
||||
SignatureVisitor paramVisitor = methSig.visitParameterType();
|
||||
Iterator<Expression> itr1 = argumentList.getArguments().iterator();
|
||||
|
||||
while(itr1.hasNext()) {
|
||||
numberOfParams++;
|
||||
// getBounds
|
||||
paramVisitor.visitTypeVariable(CONSTANTS.T + numberOfParams);
|
||||
itr1.next();
|
||||
}
|
||||
|
||||
methSig.visitReturnType().visitTypeVariable(CONSTANTS.R);
|
||||
// ")"+lam.getReturn.getBounds
|
||||
Signature sig = new Signature(numberOfParams);
|
||||
String name = CONSTANTS.FUN + numberOfParams + CONSTANTS.$$;
|
||||
classWriter.visit(Opcodes.V1_8, Opcodes.ACC_PUBLIC+Opcodes.ACC_INTERFACE + Opcodes.ACC_ABSTRACT, name, sig.toString(),
|
||||
Type.getInternalName(Object.class), null);
|
||||
MethodVisitor mvApply = classWriter.visitMethod(Opcodes.ACC_PUBLIC + Opcodes.ACC_ABSTRACT, "apply", methDesc,
|
||||
methSig.toString(), null);
|
||||
mvApply.visitEnd();
|
||||
writeClassFile(classWriter.toByteArray(), name, path);
|
||||
}
|
||||
|
||||
|
||||
public static void writeClassFile(byte[] bytecode, String name, File path) {
|
||||
FileOutputStream output;
|
||||
try {
|
||||
System.out.println("generating " + name + ".class file...");
|
||||
output = new FileOutputStream(
|
||||
new File(path , name + CONSTANTS.EXTENSIONCLASS));
|
||||
output.write(bytecode);
|
||||
output.close();
|
||||
System.out.println(name + ".class file generated");
|
||||
} catch (FileNotFoundException e) {
|
||||
e.printStackTrace();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
@ -0,0 +1,22 @@
|
||||
package de.dhbwstuttgart.bytecode.utilities;
|
||||
|
||||
public interface CONSTANTS {
|
||||
|
||||
String VOID = "void";
|
||||
String TPH = "TPH ";
|
||||
String ANGLEBRACKET = "<";
|
||||
String FUN = "Fun";
|
||||
String EXTENSIONCLASS = ".class";
|
||||
String $$ = "$$";
|
||||
String T = "T";
|
||||
String R = "R";
|
||||
String DESUGAREDMETHODNAME = "lambda$new$";
|
||||
String REFTYPE_BYTE = "java/lang/Byte";
|
||||
String REFTYPE_SHORT = "java/lang/Short";
|
||||
String REFTYPE_INTEGER = "java/lang/Integer";
|
||||
String REFTYPE_LONG = "java/lang/Long";
|
||||
String REFTYPE_DOUBLE = "java/lang/Double";
|
||||
String REFTYPE_FLOAT = "java/lang/Float";
|
||||
String REFTYPE_STRING = "java/lang/String";
|
||||
String TO_STRING = "toString";
|
||||
}
|
@ -5,25 +5,27 @@ import java.util.List;
|
||||
|
||||
import de.dhbwstuttgart.bytecode.constraint.TPHConstraint;
|
||||
import de.dhbwstuttgart.bytecode.constraint.TPHConstraint.Relation;
|
||||
import de.dhbwstuttgart.bytecode.genericsGeneratorTypes.ConstraintsWithSameLeftSide;
|
||||
|
||||
public class ConstraintsFinder {
|
||||
private List<TPHConstraint> allConstaints;
|
||||
|
||||
public ConstraintsFinder(List<TPHConstraint> allConstaints) {
|
||||
super();
|
||||
this.allConstaints = allConstaints;
|
||||
}
|
||||
|
||||
public List<List<TPHConstraint>> findConstraints() {
|
||||
List<List<TPHConstraint>> result = new ArrayList<>();
|
||||
public List<ConstraintsWithSameLeftSide> findConstraints() {
|
||||
List<ConstraintsWithSameLeftSide> result = new ArrayList<>();
|
||||
|
||||
List<TPHConstraint> visitedCons = new ArrayList<>();
|
||||
for(TPHConstraint c : allConstaints) {
|
||||
if(c.getRel() == Relation.EXTENDS) {
|
||||
// get constraints with the same left side
|
||||
List<TPHConstraint> cons = getConstraints(c,visitedCons);
|
||||
if(cons.size()>1)
|
||||
result.add(cons);
|
||||
if(cons.size()>1) {
|
||||
ConstraintsWithSameLeftSide consWithSameLeftSide = new ConstraintsWithSameLeftSide(cons);
|
||||
result.add(consWithSameLeftSide);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,5 @@
|
||||
package de.dhbwstuttgart.bytecode.utilities;
|
||||
|
||||
import de.dhbwstuttgart.exceptions.NotImplementedException;
|
||||
import de.dhbwstuttgart.syntaxtree.statement.*;
|
||||
|
||||
import java.util.ArrayList;
|
||||
@ -19,7 +18,8 @@ public class KindOfLambda implements StatementVisitor{
|
||||
private boolean isInstanceCapturingLambda = false;
|
||||
private List<RefTypeOrTPHOrWildcardOrGeneric> argumentList = new ArrayList<>();
|
||||
private ArrayList<String> usedVars = new ArrayList<>();
|
||||
private boolean hasThis = false;
|
||||
private ArrayList<String> varsFromInnerLambdas = new ArrayList<>();
|
||||
private boolean thisUsed = false;
|
||||
private ArrayList<String> definedLocals = new ArrayList<>();
|
||||
|
||||
public KindOfLambda(LambdaExpression lambdaExpression) {
|
||||
@ -40,19 +40,20 @@ public class KindOfLambda implements StatementVisitor{
|
||||
return argumentList;
|
||||
}
|
||||
|
||||
public boolean isHasThis() {
|
||||
return hasThis;
|
||||
public boolean isThisUsed() {
|
||||
return thisUsed;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void visit(ArgumentList argumentList) {
|
||||
// TODO Auto-generated method stub
|
||||
argumentList.getArguments().forEach(a->a.accept(this));
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void visit(LambdaExpression lambdaExpression) {
|
||||
|
||||
lambdaExpression.params.getFormalparalist().forEach(p->varsFromInnerLambdas.add(p.getName()));
|
||||
lambdaExpression.methodBody.accept(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -111,9 +112,11 @@ public class KindOfLambda implements StatementVisitor{
|
||||
|
||||
@Override
|
||||
public void visit(LocalVar localVar) {
|
||||
if(!contain(params, localVar.name) && !definedLocals.contains(localVar.name)) {
|
||||
boolean addVar = !contain(params, localVar.name) && !definedLocals.contains(localVar.name) &&
|
||||
!varsFromInnerLambdas.contains(localVar.name) && !usedVars.contains(localVar.name);
|
||||
if(addVar) {
|
||||
argumentList.add(localVar.getType());
|
||||
if(hasThis) {
|
||||
if(thisUsed) {
|
||||
usedVars.add(1, localVar.name);
|
||||
} else {
|
||||
usedVars.add(0, localVar.name);
|
||||
@ -141,12 +144,13 @@ public class KindOfLambda implements StatementVisitor{
|
||||
@Override
|
||||
public void visit(MethodCall methodCall) {
|
||||
methodCall.receiver.accept(this);
|
||||
methodCall.arglist.accept(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void visit(NewClass methodCall) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
methodCall.receiver.accept(this);
|
||||
methodCall.arglist.accept(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -190,8 +194,8 @@ public class KindOfLambda implements StatementVisitor{
|
||||
|
||||
@Override
|
||||
public void visit(This aThis) {
|
||||
if(!hasThis) {
|
||||
hasThis = true;
|
||||
if(!thisUsed) {
|
||||
thisUsed = true;
|
||||
this.argumentList.add(0,aThis.getType());
|
||||
}
|
||||
if(!isInstanceCapturingLambda) {
|
||||
|
@ -9,7 +9,7 @@ import de.dhbwstuttgart.typeinference.result.ResultPair;
|
||||
|
||||
public class MethodAndTPH {
|
||||
|
||||
private String name;
|
||||
private String id;
|
||||
private final ArrayList<String> tphs = new ArrayList<>();
|
||||
//private final ArrayList<GenericInsertPair> pairs = new ArrayList<>();
|
||||
private final ArrayList<ResultPair<TypePlaceholder, TypePlaceholder>> pairs = new ArrayList<>();
|
||||
@ -17,7 +17,7 @@ public class MethodAndTPH {
|
||||
private final ArrayList<String> localTphs = new ArrayList<>();
|
||||
|
||||
public MethodAndTPH(String name) {
|
||||
this.name = name;
|
||||
this.id = name;
|
||||
}
|
||||
|
||||
public ArrayList<String> getTphs() {
|
||||
@ -31,8 +31,8 @@ public class MethodAndTPH {
|
||||
return pairs;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public ArrayList<String> getLocalTphs() {
|
||||
|
@ -3,44 +3,21 @@
|
||||
*/
|
||||
package de.dhbwstuttgart.bytecode.utilities;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
|
||||
import org.objectweb.asm.ClassWriter;
|
||||
import org.objectweb.asm.MethodVisitor;
|
||||
import org.objectweb.asm.Opcodes;
|
||||
import org.objectweb.asm.Type;
|
||||
import org.objectweb.asm.signature.SignatureVisitor;
|
||||
import org.objectweb.asm.signature.SignatureWriter;
|
||||
|
||||
import de.dhbwstuttgart.bytecode.Exception.NotInCurrentPackageException;
|
||||
import de.dhbwstuttgart.bytecode.descriptor.DescriptorToString;
|
||||
import de.dhbwstuttgart.bytecode.descriptor.TypeToDescriptor;
|
||||
import de.dhbwstuttgart.bytecode.signature.Signature;
|
||||
import de.dhbwstuttgart.bytecode.signature.TypeToSignature;
|
||||
import de.dhbwstuttgart.syntaxtree.ClassOrInterface;
|
||||
import de.dhbwstuttgart.syntaxtree.FormalParameter;
|
||||
import de.dhbwstuttgart.syntaxtree.GenericDeclarationList;
|
||||
import de.dhbwstuttgart.syntaxtree.GenericTypeVar;
|
||||
import de.dhbwstuttgart.syntaxtree.Method;
|
||||
import de.dhbwstuttgart.syntaxtree.SourceFile;
|
||||
import de.dhbwstuttgart.syntaxtree.*;
|
||||
import de.dhbwstuttgart.syntaxtree.statement.Expression;
|
||||
import de.dhbwstuttgart.syntaxtree.statement.LambdaExpression;
|
||||
import de.dhbwstuttgart.syntaxtree.statement.MethodCall;
|
||||
import de.dhbwstuttgart.syntaxtree.type.GenericRefType;
|
||||
import de.dhbwstuttgart.syntaxtree.type.RefTypeOrTPHOrWildcardOrGeneric;
|
||||
import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder;
|
||||
import de.dhbwstuttgart.typeinference.result.ResultSet;
|
||||
import javassist.NotFoundException;
|
||||
import org.objectweb.asm.MethodVisitor;
|
||||
import org.objectweb.asm.Opcodes;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* @author fayez
|
||||
@ -50,7 +27,7 @@ public class MethodCallHelper {
|
||||
private MethodCall methCall;
|
||||
private SourceFile sourceFile;
|
||||
private ResultSet resultSet;
|
||||
private String path;
|
||||
private File path;
|
||||
|
||||
/**
|
||||
* @param methCall
|
||||
@ -58,7 +35,7 @@ public class MethodCallHelper {
|
||||
* @param resultSet
|
||||
* @param path TODO
|
||||
*/
|
||||
public MethodCallHelper(MethodCall methCall, SourceFile sourceFile, ResultSet resultSet, String path) {
|
||||
public MethodCallHelper(MethodCall methCall, SourceFile sourceFile, ResultSet resultSet, File path) {
|
||||
this.methCall = methCall;
|
||||
this.sourceFile = sourceFile;
|
||||
this.resultSet = resultSet;
|
||||
@ -98,23 +75,62 @@ public class MethodCallHelper {
|
||||
public String getDesc(String className) throws NotInCurrentPackageException, NotFoundException {
|
||||
String name = methCall.name;
|
||||
ClassOrInterface clazz = getClassFromCurrPkg(className);
|
||||
|
||||
String retType = getResolvedType(methCall.getType());
|
||||
ArrayList<String> params = getTypes(methCall.arglist.getArguments());
|
||||
|
||||
Map<String, String> genAndBoundsClass = getGenericsAndBounds(clazz.getGenerics());
|
||||
modifyGenAndBounds(genAndBoundsClass);
|
||||
for (Method m : clazz.getMethods()) {
|
||||
if (name.equals(m.getName())) {
|
||||
Map<String, String> genAndBoundsMethod = getGenericsAndBoundsMethod(m.getGenerics());
|
||||
modifyGenAndBounds(genAndBoundsMethod);
|
||||
boolean hasGen = hasGen(m, genAndBoundsClass);
|
||||
NormalMethod nm = new NormalMethod(m, (HashMap<String, String>) genAndBoundsClass,
|
||||
(HashMap<String, String>) genAndBoundsMethod, hasGen);
|
||||
return nm.accept(new DescriptorToString(resultSet));
|
||||
if (name.equals(m.getName()) && retType.equals(getResolvedType(m.getReturnType()))) {
|
||||
ArrayList<String> paramsOfM = getTypes(m.getParameterList());
|
||||
if(areEquals(params,paramsOfM)) {
|
||||
Map<String, String> genAndBoundsMethod = getGenericsAndBoundsMethod(m.getGenerics());
|
||||
modifyGenAndBounds(genAndBoundsMethod);
|
||||
boolean hasGen = hasGen(m, genAndBoundsClass);
|
||||
NormalMethod nm = new NormalMethod(m, (HashMap<String, String>) genAndBoundsClass,
|
||||
(HashMap<String, String>) genAndBoundsMethod, hasGen);
|
||||
return nm.accept(new DescriptorToString(resultSet));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
throw new NotFoundException("Method " + name + " is not found");
|
||||
}
|
||||
|
||||
private boolean areEquals(ArrayList<String> params, ArrayList<String> paramsOfM) {
|
||||
if(params.size() != paramsOfM.size())
|
||||
return false;
|
||||
|
||||
for(String t : params) {
|
||||
for(String t2 : paramsOfM) {
|
||||
if(!t.equals(t2))
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
private ArrayList<String> getTypes(ParameterList parameterList) {
|
||||
Iterator<FormalParameter> itr = parameterList.iterator();
|
||||
ArrayList<String> typeList = new ArrayList<>();
|
||||
while (itr.hasNext()) {
|
||||
FormalParameter fp = itr.next();
|
||||
String t = getResolvedType(fp.getType());
|
||||
typeList.add(t);
|
||||
}
|
||||
|
||||
return typeList;
|
||||
}
|
||||
|
||||
private ArrayList<String> getTypes(List<Expression> arguments) {
|
||||
ArrayList<String> types = new ArrayList<>();
|
||||
for(int i = 0; i<arguments.size(); ++i) {
|
||||
String t = getResolvedType(arguments.get(i).getType());
|
||||
types.add(t);
|
||||
}
|
||||
return types;
|
||||
}
|
||||
|
||||
private boolean hasGen(Method m, Map<String, String> genericsAndBounds) {
|
||||
String retType = resultSet.resolveType(m.getReturnType()).resolvedType.acceptTV(new TypeToSignature());
|
||||
/*Prüfe, ob die Rückgabe-Type der Methode eine Type-Variable ist*/
|
||||
@ -204,52 +220,25 @@ public class MethodCallHelper {
|
||||
}
|
||||
}
|
||||
|
||||
public String generateBCForFunN() {
|
||||
ClassWriter classWriter = new ClassWriter(ClassWriter.COMPUTE_FRAMES | ClassWriter.COMPUTE_MAXS);
|
||||
|
||||
SignatureWriter methSig = new SignatureWriter();
|
||||
|
||||
int numberOfParams = 0;
|
||||
SignatureVisitor paramVisitor = methSig.visitParameterType();
|
||||
Iterator<Expression> itr1 = methCall.arglist.getArguments().iterator();
|
||||
String methDesc = "(";
|
||||
while(itr1.hasNext()) {
|
||||
numberOfParams++;
|
||||
// getBounds
|
||||
paramVisitor.visitTypeVariable("T" + numberOfParams);
|
||||
methDesc += "L" + Type.getInternalName(Object.class) + ";";
|
||||
itr1.next();
|
||||
}
|
||||
methDesc += ")L" + Type.getInternalName(Object.class) + ";";
|
||||
|
||||
methSig.visitReturnType().visitTypeVariable("R");
|
||||
// ")"+lam.getReturn.getBounds
|
||||
Signature sig = new Signature(numberOfParams);
|
||||
String name = "Fun" + numberOfParams + "$$";
|
||||
classWriter.visit(Opcodes.V1_8, Opcodes.ACC_PUBLIC+Opcodes.ACC_INTERFACE + Opcodes.ACC_ABSTRACT, name, sig.toString(),
|
||||
Type.getInternalName(Object.class), null);
|
||||
MethodVisitor mvApply = classWriter.visitMethod(Opcodes.ACC_PUBLIC + Opcodes.ACC_ABSTRACT, "apply", methDesc,
|
||||
methSig.toString(), null);
|
||||
mvApply.visitEnd();
|
||||
writeClassFile(classWriter.toByteArray(), name);
|
||||
return methDesc;
|
||||
public void generateBCForFunN(String methodDescriptor) {
|
||||
ByteCodeForFunNGenerator.generateBCForFunN(methCall.arglist,methodDescriptor,path);
|
||||
}
|
||||
|
||||
private void writeClassFile(byte[] bytecode, String name) {
|
||||
FileOutputStream output;
|
||||
try {
|
||||
System.out.println("generating " + name + ".class file...");
|
||||
output = new FileOutputStream(
|
||||
new File(path + name + ".class"));
|
||||
output.write(bytecode);
|
||||
output.close();
|
||||
System.out.println(name + ".class file generated");
|
||||
} catch (FileNotFoundException e) {
|
||||
e.printStackTrace();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
public String getDescriptorOfApplyMethod(String methodCallType) {
|
||||
return new DescriptorToString().createDescForFunN(methCall.arglist, methodCallType);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param methodCall
|
||||
*/
|
||||
public void createCheckCast(MethodCall methodCall, MethodVisitor mv) {
|
||||
String checkCast = getResolvedType(methodCall.getType());
|
||||
if(!checkCast.contains("TPH ")) {
|
||||
int pos = checkCast.length();
|
||||
if(checkCast.contains("<"))
|
||||
pos = checkCast.indexOf("<");
|
||||
mv.visitTypeInsn(Opcodes.CHECKCAST,checkCast.substring(0,pos));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,34 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
package de.dhbwstuttgart.bytecode.utilities;
|
||||
|
||||
import java.util.Iterator;
|
||||
|
||||
import de.dhbwstuttgart.syntaxtree.FormalParameter;
|
||||
import de.dhbwstuttgart.syntaxtree.Method;
|
||||
|
||||
/**
|
||||
* @author fayez
|
||||
*
|
||||
*/
|
||||
public class MethodUtility {
|
||||
/**
|
||||
* Creates an ID for a method
|
||||
*
|
||||
* @param resolver type Resolver
|
||||
* @param method for which the ID will be generated
|
||||
* @return ID for the given method.
|
||||
* ID = ReturntypeMethodname(Parametertypes)
|
||||
*/
|
||||
public static String createID(Resolver resolver, Method method) {
|
||||
String id = resolver.getResolvedType(method.getReturnType()) + method.name + "(";
|
||||
Iterator<FormalParameter> itr = method.getParameterList().iterator();
|
||||
while (itr.hasNext()) {
|
||||
FormalParameter fp = itr.next();
|
||||
id += resolver.getResolvedType(fp.getType());
|
||||
}
|
||||
id += ")";
|
||||
return id;
|
||||
}
|
||||
}
|
@ -4,13 +4,18 @@ import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
import de.dhbwstuttgart.bytecode.constraint.TPHConstraint;
|
||||
import de.dhbwstuttgart.bytecode.genericsGeneratorTypes.NameReplacementResult;
|
||||
import de.dhbwstuttgart.syntaxtree.factory.NameGenerator;
|
||||
|
||||
public class NameReplacer {
|
||||
//TODO rename
|
||||
private List<TPHConstraint> constraints;
|
||||
private List<TPHConstraint> allConstraints;
|
||||
private List<MethodAndTPH> methodAndTPHs;
|
||||
// TODO rename into tphClass
|
||||
private List<String> tphs;
|
||||
private List<String> localTphs;
|
||||
|
||||
@ -22,7 +27,98 @@ public class NameReplacer {
|
||||
this.localTphs = localTphs;
|
||||
}
|
||||
|
||||
public Map<String, List<String>> replaceNames() {
|
||||
public NameReplacer(List<TPHConstraint> constraints, List<TPHConstraint> allConstraints,List<String> tphs) {
|
||||
super();
|
||||
this.constraints = constraints;
|
||||
this.allConstraints = allConstraints;
|
||||
this.tphs = tphs;
|
||||
}
|
||||
|
||||
public NameReplacer(List<TPHConstraint> constraints, List<TPHConstraint> allConstraints) {
|
||||
this.constraints = constraints;
|
||||
this.allConstraints = allConstraints;
|
||||
}
|
||||
|
||||
public NameReplacer(List<TPHConstraint> constraints, List<TPHConstraint> allConstraints, List<MethodAndTPH> methodAndTPHs,
|
||||
List<String> tphsClass) {
|
||||
this.constraints = constraints;
|
||||
this.allConstraints = allConstraints;
|
||||
this.methodAndTPHs = methodAndTPHs;
|
||||
this.tphs = tphsClass;
|
||||
}
|
||||
|
||||
public NameReplacementResult replaceNames() {
|
||||
String newName = NameGenerator.makeNewName();
|
||||
List<String> names = new ArrayList<>();
|
||||
substituteRightSidesWithNewName(newName, names);
|
||||
|
||||
substituteNamesInAllConstraints(newName, names);
|
||||
Stream<ArrayList<String>> tphsOfMethods = methodAndTPHs.stream().map(m->m.getTphs());
|
||||
Stream<ArrayList<String>> localTphsOfMethods = methodAndTPHs.stream().map(m->m.getLocalTphs());
|
||||
|
||||
replaceOldNames(newName, names, tphsOfMethods);
|
||||
replaceOldNames(newName, names, localTphsOfMethods);
|
||||
|
||||
if(tphs.removeAll(names))
|
||||
tphs.add(newName);
|
||||
|
||||
NameReplacementResult res = new NameReplacementResult(newName, names);
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param newName
|
||||
* @param names
|
||||
* @param tphsOfMethods
|
||||
*/
|
||||
public void replaceOldNames(final String newName, final List<String> names, Stream<ArrayList<String>> tphsOfMethods) {
|
||||
tphsOfMethods.forEach(tphsMethod->{
|
||||
if(tphsMethod.removeAll(names))
|
||||
tphsMethod.add(newName);
|
||||
});
|
||||
}
|
||||
|
||||
public NameReplacementResult replaceNamesLocal() {
|
||||
String newName = NameGenerator.makeNewName();
|
||||
List<String> names = new ArrayList<>();
|
||||
substituteRightSidesWithNewName(newName, names);
|
||||
|
||||
substituteNamesInAllConstraints(newName, names);
|
||||
|
||||
tphs.removeAll(names);
|
||||
tphs.add(newName);
|
||||
|
||||
NameReplacementResult res = new NameReplacementResult(newName, names);
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param newName
|
||||
* @param names
|
||||
*/
|
||||
public void substituteNamesInAllConstraints(String newName, List<String> names) {
|
||||
for(TPHConstraint cons : allConstraints) {
|
||||
if(names.contains(cons.getLeft()))
|
||||
cons.setLeft(newName);
|
||||
if(names.contains(cons.getRight()))
|
||||
cons.setRight(newName);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param newName
|
||||
* @param names
|
||||
*/
|
||||
public void substituteRightSidesWithNewName(String newName, List<String> names) {
|
||||
for(TPHConstraint cons : constraints) {
|
||||
names.add(cons.getRight());
|
||||
cons.setRight(newName);
|
||||
}
|
||||
}
|
||||
|
||||
public Map<String, List<String>> replaceNamesWithLocals() {
|
||||
String newName = NameGenerator.makeNewName();
|
||||
ArrayList<String> names = new ArrayList<>();
|
||||
for(TPHConstraint cons : constraints) {
|
||||
|
@ -0,0 +1,28 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
package de.dhbwstuttgart.bytecode.utilities;
|
||||
|
||||
import de.dhbwstuttgart.bytecode.descriptor.TypeToDescriptor;
|
||||
import de.dhbwstuttgart.syntaxtree.type.RefTypeOrTPHOrWildcardOrGeneric;
|
||||
import de.dhbwstuttgart.typeinference.result.ResultSet;
|
||||
|
||||
/**
|
||||
* @author fayez
|
||||
*
|
||||
*/
|
||||
public class Resolver {
|
||||
|
||||
private ResultSet resultSet;
|
||||
|
||||
/**
|
||||
* @param resultSet
|
||||
*/
|
||||
public Resolver(ResultSet resultSet) {
|
||||
this.resultSet = resultSet;
|
||||
}
|
||||
|
||||
public String getResolvedType(RefTypeOrTPHOrWildcardOrGeneric type) {
|
||||
return resultSet.resolveType(type).resolvedType.acceptTV(new TypeToDescriptor());
|
||||
}
|
||||
}
|
@ -1,42 +0,0 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
package de.dhbwstuttgart.bytecode.utilities;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
|
||||
import de.dhbwstuttgart.bytecode.constraint.TPHConstraint;
|
||||
import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder;
|
||||
|
||||
/**
|
||||
* @author fayez
|
||||
*
|
||||
*/
|
||||
public class SimplifyResult {
|
||||
private final ArrayList<TPHConstraint> classConstraints;
|
||||
private final ArrayList<String> tphsClass;
|
||||
private final HashMap<String, HashMap<TPHConstraint, HashSet<String>>> methodsConstraints;
|
||||
|
||||
public SimplifyResult(ArrayList<TPHConstraint> classConstraints, ArrayList<String> tphsClass,
|
||||
HashMap<String, HashMap<TPHConstraint, HashSet<String>>> methodsConstraints) {
|
||||
super();
|
||||
this.classConstraints = classConstraints;
|
||||
this.tphsClass = tphsClass;
|
||||
this.methodsConstraints = methodsConstraints;
|
||||
}
|
||||
|
||||
public ArrayList<TPHConstraint> getClassConstraints() {
|
||||
return classConstraints;
|
||||
}
|
||||
|
||||
public HashMap<String, HashMap<TPHConstraint, HashSet<String>>> getMethodsConstraints() {
|
||||
return methodsConstraints;
|
||||
}
|
||||
|
||||
public ArrayList<String> getTphsClass() {
|
||||
return tphsClass;
|
||||
}
|
||||
|
||||
}
|
@ -2,6 +2,7 @@ package de.dhbwstuttgart.core;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.net.URL;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@ -9,8 +10,29 @@ 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);
|
||||
List<File> input = new ArrayList<>();
|
||||
List<File> classpath = new ArrayList<>();
|
||||
String outputPath = null;
|
||||
Iterator<String> it = Arrays.asList(args).iterator();
|
||||
while(it.hasNext()){
|
||||
String arg = it.next();
|
||||
if(arg.equals("-d")){
|
||||
outputPath = it.next();
|
||||
}else if(arg.startsWith("-d")) {
|
||||
outputPath = arg.substring(2);
|
||||
}else if(arg.equals("-cp") || arg.equals("-classpath")){
|
||||
String[] cps = it.next().split(":");
|
||||
for(String cp : cps){
|
||||
classpath.add(new File(cp));
|
||||
}
|
||||
}else{
|
||||
input.add(new File(arg));
|
||||
}
|
||||
}
|
||||
JavaTXCompiler compiler = new JavaTXCompiler(input, classpath);
|
||||
compiler.typeInference();
|
||||
compiler.generateBytecode(outputPath);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -4,18 +4,12 @@ import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.net.MalformedURLException;
|
||||
import java.net.URL;
|
||||
import java.net.URLClassLoader;
|
||||
import java.util.*;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
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 org.antlr.v4.runtime.tree.TerminalNode;
|
||||
|
||||
import de.dhbwstuttgart.exceptions.DebugException;
|
||||
import de.dhbwstuttgart.parser.JavaTXParser;
|
||||
@ -49,8 +43,7 @@ public class CompilationEnvironment {
|
||||
*
|
||||
*/
|
||||
//String bootClassPath = System.getProperty("sun.boot.class.path");
|
||||
// ClassLoader cl = ClassLoader.getPlatformClassLoader();
|
||||
ClassLoader cl = ClassLoader.getSystemClassLoader();
|
||||
// DirectoryClassLoader cl = DirectoryClassLoader.getPlatformClassLoader();
|
||||
String bootClassPath = System.getProperty("java.class.path");
|
||||
librarys = new ArrayList<>();
|
||||
for(String path : bootClassPath.split(File.pathSeparator)) {
|
||||
@ -67,13 +60,44 @@ public class CompilationEnvironment {
|
||||
this.packageCrawler = new PackageCrawler(librarys);
|
||||
}
|
||||
|
||||
public JavaClassRegistry getRegistry(File forSourceFile) throws ClassNotFoundException, IOException {
|
||||
public JavaClassRegistry getRegistry(File forSourceFile, ClassLoader classLoader) throws ClassNotFoundException, IOException {
|
||||
Map<String, Integer> allNames;
|
||||
CompilationUnitContext tree = JavaTXParser.parse(forSourceFile);
|
||||
allNames = GatherNames.getNames(tree, packageCrawler);
|
||||
allNames = GatherNames.getNames(tree, packageCrawler, classLoader);
|
||||
for(Class c : loadDefaultPackageClasses(forSourceFile, classLoader)){
|
||||
allNames.put(c.getName(), c.getTypeParameters().length);
|
||||
}
|
||||
return new JavaClassRegistry(allNames);
|
||||
}
|
||||
|
||||
public static List<Class> loadDefaultPackageClasses(File forSourceFile, ClassLoader classLoader) throws IOException, ClassNotFoundException {
|
||||
List<Class> ret = new ArrayList<>();
|
||||
String packageName = getPackageName(JavaTXParser.parse(forSourceFile));
|
||||
//Set classLoader to include default package for this specific source file
|
||||
File dir = new File(forSourceFile.getAbsoluteFile().getParent());
|
||||
String dirPath = dir.toString() + "/";
|
||||
if(packageName.length()>0)dirPath = dirPath.substring(0,dirPath.length() - packageName.length());
|
||||
String path = dirPath;
|
||||
ArrayList<File> defaultPath = Lists.newArrayList(new File(path));
|
||||
classLoader = new DirectoryClassLoader(defaultPath, classLoader);
|
||||
//Gather all names in the default package for this source file (classes that are imported by default)
|
||||
File [] files = dir.listFiles((dir1, name) -> name.endsWith(".class"));
|
||||
if(files != null)for (File classFile : files) {
|
||||
String className = classFile.getName().substring(0,classFile.getName().length()-6);
|
||||
ret.add(classLoader.loadClass(packageName + className));
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
private static String getPackageName(CompilationUnitContext forTree){
|
||||
String packageName = "";
|
||||
if(forTree.packageDeclaration() != null && forTree.packageDeclaration().Identifier() != null)
|
||||
for(TerminalNode subPackage : forTree.packageDeclaration().Identifier()){
|
||||
packageName += subPackage.toString() + ".";
|
||||
}
|
||||
return packageName;
|
||||
}
|
||||
|
||||
public List<ClassOrInterface> getAllAvailableClasses() {
|
||||
List<ClassOrInterface> ret = new ArrayList<>();
|
||||
for(Class c : new PackageCrawler(librarys).getAllAvailableClasses()){
|
||||
|
@ -0,0 +1,31 @@
|
||||
package de.dhbwstuttgart.environment;
|
||||
|
||||
import java.io.File;
|
||||
import java.net.MalformedURLException;
|
||||
import java.net.URL;
|
||||
import java.net.URLClassLoader;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
public class DirectoryClassLoader extends URLClassLoader {
|
||||
public DirectoryClassLoader(File directory, java.lang.ClassLoader parent) {
|
||||
super(generateURLArray(dirToURL(directory)), parent);
|
||||
}
|
||||
|
||||
public DirectoryClassLoader(List<File> directory, java.lang.ClassLoader parent) {
|
||||
super(directory.stream().map(DirectoryClassLoader::dirToURL).collect(Collectors.toList()).toArray(new URL[0]), parent);
|
||||
}
|
||||
|
||||
private static URL[] generateURLArray(URL url) {
|
||||
return new URL[]{url};
|
||||
}
|
||||
|
||||
private static URL dirToURL(File url){
|
||||
if(!url.isDirectory())throw new RuntimeException(url.toString() + " is not a directory");
|
||||
try {
|
||||
return url.toURI().toURL();
|
||||
} catch (MalformedURLException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
}
|
@ -26,11 +26,11 @@ public class PackageCrawler {
|
||||
|
||||
public Set<Class<?>> getClassesInPackage(String packageName){
|
||||
/*
|
||||
List<ClassLoader> classLoadersList = new LinkedList<ClassLoader>();
|
||||
List<DirectoryClassLoader> classLoadersList = new LinkedList<DirectoryClassLoader>();
|
||||
classLoadersList.add(Thread.currentThread().getContextClassLoader());
|
||||
classLoadersList.add(ClasspathHelper.staticClassLoader());
|
||||
classLoadersList.add(Thread.currentThread().getContextClassLoader().getParent());
|
||||
classLoadersList.add(ClassLoader.getSystemClassLoader());
|
||||
classLoadersList.add(DirectoryClassLoader.getSystemClassLoader());
|
||||
String bootClassPath = System.getProperty("sun.boot.class.path");
|
||||
ArrayList<URL> urlList = new ArrayList<>();
|
||||
for(String path : bootClassPath.split(";")) {
|
||||
@ -41,7 +41,7 @@ public class PackageCrawler {
|
||||
}
|
||||
}
|
||||
URL[] urls = urlList.toArray(new URL[0]);
|
||||
classLoadersList.add(new URLClassLoader(urls, ClassLoader.getSystemClassLoader()));
|
||||
classLoadersList.add(new URLClassLoader(urls, DirectoryClassLoader.getSystemClassLoader()));
|
||||
*/
|
||||
Reflections reflections = new Reflections(new ConfigurationBuilder()
|
||||
.setScanners(new SubTypesScanner(false /* don't exclude Object.class */), new ResourcesScanner())
|
||||
|
@ -22,16 +22,16 @@ public class FCGenerator {
|
||||
*
|
||||
* @param availableClasses - Alle geparsten Klassen
|
||||
*/
|
||||
public static Set<UnifyPair> toUnifyFC(Collection<ClassOrInterface> availableClasses) throws ClassNotFoundException {
|
||||
return toFC(availableClasses).stream().map(t -> UnifyTypeFactory.convert(t)).collect(Collectors.toSet());
|
||||
public static Set<UnifyPair> toUnifyFC(Collection<ClassOrInterface> availableClasses, ClassLoader classLoader) throws ClassNotFoundException {
|
||||
return toFC(availableClasses, classLoader).stream().map(t -> UnifyTypeFactory.convert(t)).collect(Collectors.toSet());
|
||||
}
|
||||
|
||||
public static Set<Pair> toFC(Collection<ClassOrInterface> availableClasses) throws ClassNotFoundException {
|
||||
public static Set<Pair> toFC(Collection<ClassOrInterface> availableClasses, ClassLoader classLoader) throws ClassNotFoundException {
|
||||
HashSet<Pair> pairs = new HashSet<>();
|
||||
//PL 2018-09-18: gtvs vor die for-Schleife gezogen, damit immer die gleichen Typeplaceholder eingesetzt werden.
|
||||
HashMap<String, RefTypeOrTPHOrWildcardOrGeneric> gtvs = new HashMap<>();
|
||||
for(ClassOrInterface cly : availableClasses){
|
||||
pairs.addAll(getSuperTypes(cly, availableClasses, gtvs));
|
||||
pairs.addAll(getSuperTypes(cly, availableClasses, gtvs, classLoader));
|
||||
}
|
||||
return pairs;
|
||||
}
|
||||
@ -48,8 +48,8 @@ public class FCGenerator {
|
||||
* @param forType
|
||||
* @return
|
||||
*/
|
||||
private static List<Pair> getSuperTypes(ClassOrInterface forType, Collection<ClassOrInterface> availableClasses) throws ClassNotFoundException {
|
||||
return getSuperTypes(forType, availableClasses, new HashMap<>());
|
||||
private static List<Pair> getSuperTypes(ClassOrInterface forType, Collection<ClassOrInterface> availableClasses, ClassLoader classLoader) throws ClassNotFoundException {
|
||||
return getSuperTypes(forType, availableClasses, new HashMap<>(), classLoader);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -61,7 +61,7 @@ public class FCGenerator {
|
||||
* @throws ClassNotFoundException
|
||||
*/
|
||||
private static List<Pair> getSuperTypes(ClassOrInterface forType, Collection<ClassOrInterface> availableClasses,
|
||||
HashMap<String, RefTypeOrTPHOrWildcardOrGeneric> gtvs) throws ClassNotFoundException {
|
||||
HashMap<String, RefTypeOrTPHOrWildcardOrGeneric> gtvs, ClassLoader classLoader) throws ClassNotFoundException {
|
||||
List<RefTypeOrTPHOrWildcardOrGeneric> params = new ArrayList<>();
|
||||
//Die GTVs, die in forType hinzukommen:
|
||||
HashMap<String, RefTypeOrTPHOrWildcardOrGeneric> newGTVs = new HashMap<>();
|
||||
@ -86,7 +86,7 @@ public class FCGenerator {
|
||||
ClassOrInterface superClass;
|
||||
if(!hasSuperclass.isPresent()) //Wenn es die Klasse in den available Klasses nicht gibt wird sie im Classpath gesucht. Ansonsten Exception
|
||||
{
|
||||
superClass = ASTFactory.createClass(ClassLoader.getSystemClassLoader().loadClass(superType.getName().toString()));
|
||||
superClass = ASTFactory.createClass(classLoader.loadClass(superType.getName().toString()));
|
||||
}else{
|
||||
superClass = hasSuperclass.get();
|
||||
}
|
||||
@ -120,7 +120,7 @@ public class FCGenerator {
|
||||
if(superClass.getClassName().equals(ASTFactory.createObjectClass().getClassName())){
|
||||
superTypes = Arrays.asList(new Pair(ASTFactory.createObjectType(), ASTFactory.createObjectType(), PairOperator.SMALLER));
|
||||
}else{
|
||||
superTypes = getSuperTypes(superClass, availableClasses, newGTVs);
|
||||
superTypes = getSuperTypes(superClass, availableClasses, newGTVs, classLoader);
|
||||
}
|
||||
|
||||
retList.add(ret);
|
||||
|
@ -17,6 +17,7 @@ import org.antlr.v4.runtime.Token;
|
||||
import org.antlr.v4.runtime.tree.TerminalNode;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
public class StatementGenerator {
|
||||
|
||||
@ -209,7 +210,12 @@ public class StatementGenerator {
|
||||
}else throw new NotImplementedException();
|
||||
|
||||
ArgumentList argumentList = convert(methodInvocationContext.argumentList());
|
||||
MethodCall ret = new MethodCall(TypePlaceholder.fresh(methodInvocationContext.getStart()), getReceiver(receiver), name, argumentList, methodInvocationContext.getStart());
|
||||
ArrayList<RefTypeOrTPHOrWildcardOrGeneric> argTypes = argumentList.getArguments().stream()
|
||||
.map(x -> TypePlaceholder.fresh(methodInvocationContext.getStart()))
|
||||
.collect(Collectors.toCollection(ArrayList::new));
|
||||
MethodCall ret = new MethodCall(TypePlaceholder.fresh(methodInvocationContext.getStart()),
|
||||
getReceiver(receiver), name, argumentList, TypePlaceholder.fresh(methodInvocationContext.getStart()),
|
||||
argTypes, methodInvocationContext.getStart());
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -279,9 +285,24 @@ public class StatementGenerator {
|
||||
}
|
||||
|
||||
|
||||
private Statement convert(Java8Parser.ClassInstanceCreationExpressionContext stmt) {
|
||||
//TODO
|
||||
throw new NotImplementedException();
|
||||
private Statement convert(Java8Parser.ClassInstanceCreationExpressionContext newExpression) {
|
||||
Java8Parser.TypeArgumentsContext genericArgs = null;
|
||||
if(newExpression.expressionName()!= null)throw new NotImplementedException();
|
||||
if(newExpression.typeArgumentsOrDiamond()!= null){
|
||||
if(newExpression.typeArgumentsOrDiamond().typeArguments()!=null){
|
||||
genericArgs = newExpression.typeArgumentsOrDiamond().typeArguments();
|
||||
}
|
||||
}
|
||||
if(newExpression.typeArguments()!= null)throw new NotImplementedException();
|
||||
|
||||
TerminalNode identifier = newExpression.Identifier(0);
|
||||
RefType newClass = (RefType) TypeGenerator.convertTypeName(identifier.getText(),genericArgs,identifier.getSymbol(),reg,generics);
|
||||
|
||||
ArgumentList args = convert(newExpression.argumentList());
|
||||
ArrayList<RefTypeOrTPHOrWildcardOrGeneric> argTypes = args.getArguments().stream()
|
||||
.map(x -> TypePlaceholder.fresh(newExpression.getStart()))
|
||||
.collect(Collectors.toCollection(ArrayList::new));
|
||||
return new NewClass(newClass, args, null, argTypes, newExpression.getStart());
|
||||
}
|
||||
|
||||
private Statement convert(Java8Parser.PreIncrementExpressionContext stmt) {
|
||||
@ -767,10 +788,14 @@ public class StatementGenerator {
|
||||
}else {
|
||||
Java8Parser.MethodInvocation_lf_primaryContext ctxt = e.methodInvocation_lf_primary();
|
||||
String methodName = ctxt.Identifier().toString();
|
||||
return new MethodCall(TypePlaceholder.fresh(e.getStart()), getReceiver(expr), methodName, convert(ctxt.argumentList()), e.getStart());
|
||||
ArrayList<RefTypeOrTPHOrWildcardOrGeneric> argTypes = ctxt.argumentList().expression().stream()
|
||||
.map(x -> TypePlaceholder.fresh(e.getStart()))
|
||||
.collect(Collectors.toCollection(ArrayList::new));
|
||||
return new MethodCall(TypePlaceholder.fresh(e.getStart()), getReceiver(expr), methodName,
|
||||
convert(ctxt.argumentList()), TypePlaceholder.fresh(e.getStart()), argTypes, e.getStart());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private Expression convert(Java8Parser.ArrayCreationExpressionContext expression) {
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
@ -821,7 +846,10 @@ public class StatementGenerator {
|
||||
RefType newClass = (RefType) TypeGenerator.convertTypeName(identifier.getText(),genericArgs,identifier.getSymbol(),reg,generics);
|
||||
|
||||
ArgumentList args = convert(newExpression.argumentList());
|
||||
return new NewClass(newClass, args, newExpression.getStart());
|
||||
ArrayList<RefTypeOrTPHOrWildcardOrGeneric> argTypes = args.getArguments().stream()
|
||||
.map(x -> TypePlaceholder.fresh(newExpression.getStart()))
|
||||
.collect(Collectors.toCollection(ArrayList::new));
|
||||
return new NewClass(newClass, args, null, argTypes, newExpression.getStart());
|
||||
}
|
||||
|
||||
private Expression convert(Java8Parser.LiteralContext literal) {
|
||||
@ -879,7 +907,12 @@ public class StatementGenerator {
|
||||
}
|
||||
|
||||
ArgumentList argumentList = convert(methodInvocationContext.argumentList());
|
||||
MethodCall ret = new MethodCall(TypePlaceholder.fresh(methodInvocationContext.getStart()), getReceiver(receiver), name, argumentList, methodInvocationContext.getStart());
|
||||
ArrayList<RefTypeOrTPHOrWildcardOrGeneric> argTypes = argumentList.getArguments().stream()
|
||||
.map(x -> TypePlaceholder.fresh(methodInvocationContext.getStart()))
|
||||
.collect(Collectors.toCollection(ArrayList::new));
|
||||
MethodCall ret = new MethodCall(TypePlaceholder.fresh(methodInvocationContext.getStart()),
|
||||
getReceiver(receiver), name, argumentList, TypePlaceholder.fresh(methodInvocationContext.getStart()),
|
||||
argTypes, methodInvocationContext.getStart());
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -19,6 +19,7 @@ import de.dhbwstuttgart.syntaxtree.type.RefTypeOrTPHOrWildcardOrGeneric;
|
||||
import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder;
|
||||
|
||||
import java.lang.reflect.Modifier;
|
||||
import java.net.URL;
|
||||
import java.sql.Ref;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
@ -35,7 +36,7 @@ public class SyntaxTreeGenerator{
|
||||
Set<JavaClassName> imports = new HashSet();
|
||||
private Map<String, RefTypeOrTPHOrWildcardOrGeneric> fields = new HashMap<>(); //PL 2018-11-01 fields eingefuegt, damit die fields immer die gleiche TPH bekommen
|
||||
|
||||
List<Statement> fieldInitializations = new ArrayList<>();
|
||||
List<Statement> fieldInitializations = new ArrayList<>(); //PL 2019-10-23: Muss für jede Klasse neu initilisiert werden
|
||||
|
||||
public SyntaxTreeGenerator(JavaClassRegistry reg, GenericsRegistry globalGenerics){
|
||||
//Die Generics müssen während des Bauens des AST erstellt werden,
|
||||
@ -74,10 +75,10 @@ public class SyntaxTreeGenerator{
|
||||
return ret;
|
||||
}
|
||||
|
||||
public SourceFile convert(Java8Parser.CompilationUnitContext ctx, PackageCrawler packageCrawler) throws ClassNotFoundException{
|
||||
public SourceFile convert(Java8Parser.CompilationUnitContext ctx, PackageCrawler packageCrawler, ClassLoader classLoader) throws ClassNotFoundException{
|
||||
if(ctx.packageDeclaration()!=null)this.pkgName = convert(ctx.packageDeclaration());
|
||||
List<ClassOrInterface> classes = new ArrayList<>();
|
||||
Map<String, Integer> imports = GatherNames.getImports(ctx, packageCrawler);
|
||||
Map<String, Integer> imports = GatherNames.getImports(ctx, packageCrawler, classLoader);
|
||||
this.imports = imports.keySet().stream().map(name -> reg.getName(name)).collect(Collectors.toSet());
|
||||
for(Java8Parser.TypeDeclarationContext typeDecl : ctx.typeDeclaration()){
|
||||
ClassOrInterface newClass;
|
||||
@ -159,6 +160,7 @@ public class SyntaxTreeGenerator{
|
||||
|
||||
private ClassOrInterface convertClass(Java8Parser.ClassDeclarationContext ctx) {
|
||||
ClassOrInterface newClass;
|
||||
fieldInitializations = new ArrayList<>(); //PL 2019-10-22: muss für jede Klasse neu initilisiert werden
|
||||
if(ctx.normalClassDeclaration() != null){
|
||||
newClass = convertNormal(ctx.normalClassDeclaration());
|
||||
}
|
||||
@ -358,7 +360,7 @@ public class SyntaxTreeGenerator{
|
||||
&& fieldDeclarationContext.unannTypeOrAuto().unannType() != null){
|
||||
fieldType = TypeGenerator.convert(fieldDeclarationContext.unannTypeOrAuto().unannType(), reg, generics);
|
||||
}else{
|
||||
fieldType = TypePlaceholder.fresh(fieldDeclarationContext.getStart());
|
||||
fieldType = TypePlaceholder.fresh(fieldDeclarationContext.variableDeclaratorList().getStart()); //PL 2019-12-06: variableDeclaratorList() eingefuegt, um als Token nicht die Modifier zu bekommen
|
||||
}
|
||||
for(Java8Parser.VariableDeclaratorContext varCtx : fieldDeclarationContext.variableDeclaratorList().variableDeclarator()){
|
||||
String fieldName = convert(varCtx.variableDeclaratorId());
|
||||
|
207
src/main/java/de/dhbwstuttgart/parser/antlr/Java8.tokens
Normal file
@ -0,0 +1,207 @@
|
||||
T__0=1
|
||||
ABSTRACT=2
|
||||
ASSERT=3
|
||||
BOOLEAN=4
|
||||
BREAK=5
|
||||
BYTE=6
|
||||
CASE=7
|
||||
CATCH=8
|
||||
CHAR=9
|
||||
CLASS=10
|
||||
CONST=11
|
||||
CONTINUE=12
|
||||
DEFAULT=13
|
||||
DO=14
|
||||
DOUBLE=15
|
||||
ELSE=16
|
||||
ENUM=17
|
||||
EXTENDS=18
|
||||
FINAL=19
|
||||
FINALLY=20
|
||||
FLOAT=21
|
||||
FOR=22
|
||||
IF=23
|
||||
GOTO=24
|
||||
IMPLEMENTS=25
|
||||
IMPORT=26
|
||||
INSTANCEOF=27
|
||||
INT=28
|
||||
INTERFACE=29
|
||||
LONG=30
|
||||
NATIVE=31
|
||||
NEW=32
|
||||
PACKAGE=33
|
||||
PRIVATE=34
|
||||
PROTECTED=35
|
||||
PUBLIC=36
|
||||
RETURN=37
|
||||
SHORT=38
|
||||
STATIC=39
|
||||
STRICTFP=40
|
||||
SUPER=41
|
||||
SWITCH=42
|
||||
SYNCHRONIZED=43
|
||||
THIS=44
|
||||
THROW=45
|
||||
THROWS=46
|
||||
TRANSIENT=47
|
||||
TRY=48
|
||||
VOID=49
|
||||
VOLATILE=50
|
||||
WHILE=51
|
||||
IntegerLiteral=52
|
||||
FloatingPointLiteral=53
|
||||
BooleanLiteral=54
|
||||
CharacterLiteral=55
|
||||
StringLiteral=56
|
||||
NullLiteral=57
|
||||
LPAREN=58
|
||||
RPAREN=59
|
||||
LBRACE=60
|
||||
RBRACE=61
|
||||
LBRACK=62
|
||||
RBRACK=63
|
||||
SEMI=64
|
||||
COMMA=65
|
||||
DOT=66
|
||||
ASSIGN=67
|
||||
GT=68
|
||||
LT=69
|
||||
BANG=70
|
||||
TILDE=71
|
||||
QUESTION=72
|
||||
COLON=73
|
||||
EQUAL=74
|
||||
LE=75
|
||||
GE=76
|
||||
NOTEQUAL=77
|
||||
AND=78
|
||||
OR=79
|
||||
INC=80
|
||||
DEC=81
|
||||
ADD=82
|
||||
SUB=83
|
||||
MUL=84
|
||||
DIV=85
|
||||
BITAND=86
|
||||
BITOR=87
|
||||
CARET=88
|
||||
MOD=89
|
||||
ARROW=90
|
||||
COLONCOLON=91
|
||||
ADD_ASSIGN=92
|
||||
SUB_ASSIGN=93
|
||||
MUL_ASSIGN=94
|
||||
DIV_ASSIGN=95
|
||||
AND_ASSIGN=96
|
||||
OR_ASSIGN=97
|
||||
XOR_ASSIGN=98
|
||||
MOD_ASSIGN=99
|
||||
LSHIFT_ASSIGN=100
|
||||
RSHIFT_ASSIGN=101
|
||||
URSHIFT_ASSIGN=102
|
||||
Identifier=103
|
||||
AT=104
|
||||
ELLIPSIS=105
|
||||
WS=106
|
||||
COMMENT=107
|
||||
LINE_COMMENT=108
|
||||
'var'=1
|
||||
'abstract'=2
|
||||
'assert'=3
|
||||
'boolean'=4
|
||||
'break'=5
|
||||
'byte'=6
|
||||
'case'=7
|
||||
'catch'=8
|
||||
'char'=9
|
||||
'class'=10
|
||||
'const'=11
|
||||
'continue'=12
|
||||
'default'=13
|
||||
'do'=14
|
||||
'double'=15
|
||||
'else'=16
|
||||
'enum'=17
|
||||
'extends'=18
|
||||
'final'=19
|
||||
'finally'=20
|
||||
'float'=21
|
||||
'for'=22
|
||||
'if'=23
|
||||
'goto'=24
|
||||
'implements'=25
|
||||
'import'=26
|
||||
'instanceof'=27
|
||||
'int'=28
|
||||
'interface'=29
|
||||
'long'=30
|
||||
'native'=31
|
||||
'new'=32
|
||||
'package'=33
|
||||
'private'=34
|
||||
'protected'=35
|
||||
'public'=36
|
||||
'return'=37
|
||||
'short'=38
|
||||
'static'=39
|
||||
'strictfp'=40
|
||||
'super'=41
|
||||
'switch'=42
|
||||
'synchronized'=43
|
||||
'this'=44
|
||||
'throw'=45
|
||||
'throws'=46
|
||||
'transient'=47
|
||||
'try'=48
|
||||
'void'=49
|
||||
'volatile'=50
|
||||
'while'=51
|
||||
'null'=57
|
||||
'('=58
|
||||
')'=59
|
||||
'{'=60
|
||||
'}'=61
|
||||
'['=62
|
||||
']'=63
|
||||
';'=64
|
||||
','=65
|
||||
'.'=66
|
||||
'='=67
|
||||
'>'=68
|
||||
'<'=69
|
||||
'!'=70
|
||||
'~'=71
|
||||
'?'=72
|
||||
':'=73
|
||||
'=='=74
|
||||
'<='=75
|
||||
'>='=76
|
||||
'!='=77
|
||||
'&&'=78
|
||||
'||'=79
|
||||
'++'=80
|
||||
'--'=81
|
||||
'+'=82
|
||||
'-'=83
|
||||
'*'=84
|
||||
'/'=85
|
||||
'&'=86
|
||||
'|'=87
|
||||
'^'=88
|
||||
'%'=89
|
||||
'->'=90
|
||||
'::'=91
|
||||
'+='=92
|
||||
'-='=93
|
||||
'*='=94
|
||||
'/='=95
|
||||
'&='=96
|
||||
'|='=97
|
||||
'^='=98
|
||||
'%='=99
|
||||
'<<='=100
|
||||
'>>='=101
|
||||
'>>>='=102
|
||||
'@'=104
|
||||
'...'=105
|
2895
src/main/java/de/dhbwstuttgart/parser/antlr/Java8BaseListener.java
Normal file
593
src/main/java/de/dhbwstuttgart/parser/antlr/Java8Lexer.java
Normal file
@ -0,0 +1,593 @@
|
||||
// Generated from Java8.g4 by ANTLR 4.7
|
||||
package de.dhbwstuttgart.parser.antlr;
|
||||
import org.antlr.v4.runtime.Lexer;
|
||||
import org.antlr.v4.runtime.CharStream;
|
||||
import org.antlr.v4.runtime.Token;
|
||||
import org.antlr.v4.runtime.TokenStream;
|
||||
import org.antlr.v4.runtime.*;
|
||||
import org.antlr.v4.runtime.atn.*;
|
||||
import org.antlr.v4.runtime.dfa.DFA;
|
||||
import org.antlr.v4.runtime.misc.*;
|
||||
|
||||
@SuppressWarnings({"all", "warnings", "unchecked", "unused", "cast"})
|
||||
public class Java8Lexer extends Lexer {
|
||||
static { RuntimeMetaData.checkVersion("4.7", RuntimeMetaData.VERSION); }
|
||||
|
||||
protected static final DFA[] _decisionToDFA;
|
||||
protected static final PredictionContextCache _sharedContextCache =
|
||||
new PredictionContextCache();
|
||||
public static final int
|
||||
T__0=1, ABSTRACT=2, ASSERT=3, BOOLEAN=4, BREAK=5, BYTE=6, CASE=7, CATCH=8,
|
||||
CHAR=9, CLASS=10, CONST=11, CONTINUE=12, DEFAULT=13, DO=14, DOUBLE=15,
|
||||
ELSE=16, ENUM=17, EXTENDS=18, FINAL=19, FINALLY=20, FLOAT=21, FOR=22,
|
||||
IF=23, GOTO=24, IMPLEMENTS=25, IMPORT=26, INSTANCEOF=27, INT=28, INTERFACE=29,
|
||||
LONG=30, NATIVE=31, NEW=32, PACKAGE=33, PRIVATE=34, PROTECTED=35, PUBLIC=36,
|
||||
RETURN=37, SHORT=38, STATIC=39, STRICTFP=40, SUPER=41, SWITCH=42, SYNCHRONIZED=43,
|
||||
THIS=44, THROW=45, THROWS=46, TRANSIENT=47, TRY=48, VOID=49, VOLATILE=50,
|
||||
WHILE=51, IntegerLiteral=52, FloatingPointLiteral=53, BooleanLiteral=54,
|
||||
CharacterLiteral=55, StringLiteral=56, NullLiteral=57, LPAREN=58, RPAREN=59,
|
||||
LBRACE=60, RBRACE=61, LBRACK=62, RBRACK=63, SEMI=64, COMMA=65, DOT=66,
|
||||
ASSIGN=67, GT=68, LT=69, BANG=70, TILDE=71, QUESTION=72, COLON=73, EQUAL=74,
|
||||
LE=75, GE=76, NOTEQUAL=77, AND=78, OR=79, INC=80, DEC=81, ADD=82, SUB=83,
|
||||
MUL=84, DIV=85, BITAND=86, BITOR=87, CARET=88, MOD=89, ARROW=90, COLONCOLON=91,
|
||||
ADD_ASSIGN=92, SUB_ASSIGN=93, MUL_ASSIGN=94, DIV_ASSIGN=95, AND_ASSIGN=96,
|
||||
OR_ASSIGN=97, XOR_ASSIGN=98, MOD_ASSIGN=99, LSHIFT_ASSIGN=100, RSHIFT_ASSIGN=101,
|
||||
URSHIFT_ASSIGN=102, Identifier=103, AT=104, ELLIPSIS=105, WS=106, COMMENT=107,
|
||||
LINE_COMMENT=108;
|
||||
public static String[] channelNames = {
|
||||
"DEFAULT_TOKEN_CHANNEL", "HIDDEN"
|
||||
};
|
||||
|
||||
public static String[] modeNames = {
|
||||
"DEFAULT_MODE"
|
||||
};
|
||||
|
||||
public static final String[] ruleNames = {
|
||||
"T__0", "ABSTRACT", "ASSERT", "BOOLEAN", "BREAK", "BYTE", "CASE", "CATCH",
|
||||
"CHAR", "CLASS", "CONST", "CONTINUE", "DEFAULT", "DO", "DOUBLE", "ELSE",
|
||||
"ENUM", "EXTENDS", "FINAL", "FINALLY", "FLOAT", "FOR", "IF", "GOTO", "IMPLEMENTS",
|
||||
"IMPORT", "INSTANCEOF", "INT", "INTERFACE", "LONG", "NATIVE", "NEW", "PACKAGE",
|
||||
"PRIVATE", "PROTECTED", "PUBLIC", "RETURN", "SHORT", "STATIC", "STRICTFP",
|
||||
"SUPER", "SWITCH", "SYNCHRONIZED", "THIS", "THROW", "THROWS", "TRANSIENT",
|
||||
"TRY", "VOID", "VOLATILE", "WHILE", "IntegerLiteral", "DecimalIntegerLiteral",
|
||||
"HexIntegerLiteral", "OctalIntegerLiteral", "BinaryIntegerLiteral", "IntegerTypeSuffix",
|
||||
"DecimalNumeral", "Digits", "Digit", "NonZeroDigit", "DigitsAndUnderscores",
|
||||
"DigitOrUnderscore", "Underscores", "HexNumeral", "HexDigits", "HexDigit",
|
||||
"HexDigitsAndUnderscores", "HexDigitOrUnderscore", "OctalNumeral", "OctalDigits",
|
||||
"OctalDigit", "OctalDigitsAndUnderscores", "OctalDigitOrUnderscore", "BinaryNumeral",
|
||||
"BinaryDigits", "BinaryDigit", "BinaryDigitsAndUnderscores", "BinaryDigitOrUnderscore",
|
||||
"FloatingPointLiteral", "DecimalFloatingPointLiteral", "ExponentPart",
|
||||
"ExponentIndicator", "SignedInteger", "Sign", "FloatTypeSuffix", "HexadecimalFloatingPointLiteral",
|
||||
"HexSignificand", "BinaryExponent", "BinaryExponentIndicator", "BooleanLiteral",
|
||||
"CharacterLiteral", "SingleCharacter", "StringLiteral", "StringCharacters",
|
||||
"StringCharacter", "EscapeSequence", "OctalEscape", "ZeroToThree", "UnicodeEscape",
|
||||
"NullLiteral", "LPAREN", "RPAREN", "LBRACE", "RBRACE", "LBRACK", "RBRACK",
|
||||
"SEMI", "COMMA", "DOT", "ASSIGN", "GT", "LT", "BANG", "TILDE", "QUESTION",
|
||||
"COLON", "EQUAL", "LE", "GE", "NOTEQUAL", "AND", "OR", "INC", "DEC", "ADD",
|
||||
"SUB", "MUL", "DIV", "BITAND", "BITOR", "CARET", "MOD", "ARROW", "COLONCOLON",
|
||||
"ADD_ASSIGN", "SUB_ASSIGN", "MUL_ASSIGN", "DIV_ASSIGN", "AND_ASSIGN",
|
||||
"OR_ASSIGN", "XOR_ASSIGN", "MOD_ASSIGN", "LSHIFT_ASSIGN", "RSHIFT_ASSIGN",
|
||||
"URSHIFT_ASSIGN", "Identifier", "JavaLetter", "JavaLetterOrDigit", "AT",
|
||||
"ELLIPSIS", "WS", "COMMENT", "LINE_COMMENT"
|
||||
};
|
||||
|
||||
private static final String[] _LITERAL_NAMES = {
|
||||
null, "'var'", "'abstract'", "'assert'", "'boolean'", "'break'", "'byte'",
|
||||
"'case'", "'catch'", "'char'", "'class'", "'const'", "'continue'", "'default'",
|
||||
"'do'", "'double'", "'else'", "'enum'", "'extends'", "'final'", "'finally'",
|
||||
"'float'", "'for'", "'if'", "'goto'", "'implements'", "'import'", "'instanceof'",
|
||||
"'int'", "'interface'", "'long'", "'native'", "'new'", "'package'", "'private'",
|
||||
"'protected'", "'public'", "'return'", "'short'", "'static'", "'strictfp'",
|
||||
"'super'", "'switch'", "'synchronized'", "'this'", "'throw'", "'throws'",
|
||||
"'transient'", "'try'", "'void'", "'volatile'", "'while'", null, null,
|
||||
null, null, null, "'null'", "'('", "')'", "'{'", "'}'", "'['", "']'",
|
||||
"';'", "','", "'.'", "'='", "'>'", "'<'", "'!'", "'~'", "'?'", "':'",
|
||||
"'=='", "'<='", "'>='", "'!='", "'&&'", "'||'", "'++'", "'--'", "'+'",
|
||||
"'-'", "'*'", "'/'", "'&'", "'|'", "'^'", "'%'", "'->'", "'::'", "'+='",
|
||||
"'-='", "'*='", "'/='", "'&='", "'|='", "'^='", "'%='", "'<<='", "'>>='",
|
||||
"'>>>='", null, "'@'", "'...'"
|
||||
};
|
||||
private static final String[] _SYMBOLIC_NAMES = {
|
||||
null, null, "ABSTRACT", "ASSERT", "BOOLEAN", "BREAK", "BYTE", "CASE",
|
||||
"CATCH", "CHAR", "CLASS", "CONST", "CONTINUE", "DEFAULT", "DO", "DOUBLE",
|
||||
"ELSE", "ENUM", "EXTENDS", "FINAL", "FINALLY", "FLOAT", "FOR", "IF", "GOTO",
|
||||
"IMPLEMENTS", "IMPORT", "INSTANCEOF", "INT", "INTERFACE", "LONG", "NATIVE",
|
||||
"NEW", "PACKAGE", "PRIVATE", "PROTECTED", "PUBLIC", "RETURN", "SHORT",
|
||||
"STATIC", "STRICTFP", "SUPER", "SWITCH", "SYNCHRONIZED", "THIS", "THROW",
|
||||
"THROWS", "TRANSIENT", "TRY", "VOID", "VOLATILE", "WHILE", "IntegerLiteral",
|
||||
"FloatingPointLiteral", "BooleanLiteral", "CharacterLiteral", "StringLiteral",
|
||||
"NullLiteral", "LPAREN", "RPAREN", "LBRACE", "RBRACE", "LBRACK", "RBRACK",
|
||||
"SEMI", "COMMA", "DOT", "ASSIGN", "GT", "LT", "BANG", "TILDE", "QUESTION",
|
||||
"COLON", "EQUAL", "LE", "GE", "NOTEQUAL", "AND", "OR", "INC", "DEC", "ADD",
|
||||
"SUB", "MUL", "DIV", "BITAND", "BITOR", "CARET", "MOD", "ARROW", "COLONCOLON",
|
||||
"ADD_ASSIGN", "SUB_ASSIGN", "MUL_ASSIGN", "DIV_ASSIGN", "AND_ASSIGN",
|
||||
"OR_ASSIGN", "XOR_ASSIGN", "MOD_ASSIGN", "LSHIFT_ASSIGN", "RSHIFT_ASSIGN",
|
||||
"URSHIFT_ASSIGN", "Identifier", "AT", "ELLIPSIS", "WS", "COMMENT", "LINE_COMMENT"
|
||||
};
|
||||
public static final Vocabulary VOCABULARY = new VocabularyImpl(_LITERAL_NAMES, _SYMBOLIC_NAMES);
|
||||
|
||||
/**
|
||||
* @deprecated Use {@link #VOCABULARY} instead.
|
||||
*/
|
||||
@Deprecated
|
||||
public static final String[] tokenNames;
|
||||
static {
|
||||
tokenNames = new String[_SYMBOLIC_NAMES.length];
|
||||
for (int i = 0; i < tokenNames.length; i++) {
|
||||
tokenNames[i] = VOCABULARY.getLiteralName(i);
|
||||
if (tokenNames[i] == null) {
|
||||
tokenNames[i] = VOCABULARY.getSymbolicName(i);
|
||||
}
|
||||
|
||||
if (tokenNames[i] == null) {
|
||||
tokenNames[i] = "<INVALID>";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
public String[] getTokenNames() {
|
||||
return tokenNames;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
public Vocabulary getVocabulary() {
|
||||
return VOCABULARY;
|
||||
}
|
||||
|
||||
|
||||
public Java8Lexer(CharStream input) {
|
||||
super(input);
|
||||
_interp = new LexerATNSimulator(this,_ATN,_decisionToDFA,_sharedContextCache);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getGrammarFileName() { return "Java8.g4"; }
|
||||
|
||||
@Override
|
||||
public String[] getRuleNames() { return ruleNames; }
|
||||
|
||||
@Override
|
||||
public String getSerializedATN() { return _serializedATN; }
|
||||
|
||||
@Override
|
||||
public String[] getChannelNames() { return channelNames; }
|
||||
|
||||
@Override
|
||||
public String[] getModeNames() { return modeNames; }
|
||||
|
||||
@Override
|
||||
public ATN getATN() { return _ATN; }
|
||||
|
||||
@Override
|
||||
public boolean sempred(RuleContext _localctx, int ruleIndex, int predIndex) {
|
||||
switch (ruleIndex) {
|
||||
case 147:
|
||||
return JavaLetter_sempred((RuleContext)_localctx, predIndex);
|
||||
case 148:
|
||||
return JavaLetterOrDigit_sempred((RuleContext)_localctx, predIndex);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
private boolean JavaLetter_sempred(RuleContext _localctx, int predIndex) {
|
||||
switch (predIndex) {
|
||||
case 0:
|
||||
return Character.isJavaIdentifierStart(_input.LA(-1));
|
||||
case 1:
|
||||
return Character.isJavaIdentifierStart(Character.toCodePoint((char)_input.LA(-2), (char)_input.LA(-1)));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
private boolean JavaLetterOrDigit_sempred(RuleContext _localctx, int predIndex) {
|
||||
switch (predIndex) {
|
||||
case 2:
|
||||
return Character.isJavaIdentifierPart(_input.LA(-1));
|
||||
case 3:
|
||||
return Character.isJavaIdentifierPart(Character.toCodePoint((char)_input.LA(-2), (char)_input.LA(-1)));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public static final String _serializedATN =
|
||||
"\3\u608b\ua72a\u8133\ub9ed\u417c\u3be7\u7786\u5964\2n\u044e\b\1\4\2\t"+
|
||||
"\2\4\3\t\3\4\4\t\4\4\5\t\5\4\6\t\6\4\7\t\7\4\b\t\b\4\t\t\t\4\n\t\n\4\13"+
|
||||
"\t\13\4\f\t\f\4\r\t\r\4\16\t\16\4\17\t\17\4\20\t\20\4\21\t\21\4\22\t\22"+
|
||||
"\4\23\t\23\4\24\t\24\4\25\t\25\4\26\t\26\4\27\t\27\4\30\t\30\4\31\t\31"+
|
||||
"\4\32\t\32\4\33\t\33\4\34\t\34\4\35\t\35\4\36\t\36\4\37\t\37\4 \t \4!"+
|
||||
"\t!\4\"\t\"\4#\t#\4$\t$\4%\t%\4&\t&\4\'\t\'\4(\t(\4)\t)\4*\t*\4+\t+\4"+
|
||||
",\t,\4-\t-\4.\t.\4/\t/\4\60\t\60\4\61\t\61\4\62\t\62\4\63\t\63\4\64\t"+
|
||||
"\64\4\65\t\65\4\66\t\66\4\67\t\67\48\t8\49\t9\4:\t:\4;\t;\4<\t<\4=\t="+
|
||||
"\4>\t>\4?\t?\4@\t@\4A\tA\4B\tB\4C\tC\4D\tD\4E\tE\4F\tF\4G\tG\4H\tH\4I"+
|
||||
"\tI\4J\tJ\4K\tK\4L\tL\4M\tM\4N\tN\4O\tO\4P\tP\4Q\tQ\4R\tR\4S\tS\4T\tT"+
|
||||
"\4U\tU\4V\tV\4W\tW\4X\tX\4Y\tY\4Z\tZ\4[\t[\4\\\t\\\4]\t]\4^\t^\4_\t_\4"+
|
||||
"`\t`\4a\ta\4b\tb\4c\tc\4d\td\4e\te\4f\tf\4g\tg\4h\th\4i\ti\4j\tj\4k\t"+
|
||||
"k\4l\tl\4m\tm\4n\tn\4o\to\4p\tp\4q\tq\4r\tr\4s\ts\4t\tt\4u\tu\4v\tv\4"+
|
||||
"w\tw\4x\tx\4y\ty\4z\tz\4{\t{\4|\t|\4}\t}\4~\t~\4\177\t\177\4\u0080\t\u0080"+
|
||||
"\4\u0081\t\u0081\4\u0082\t\u0082\4\u0083\t\u0083\4\u0084\t\u0084\4\u0085"+
|
||||
"\t\u0085\4\u0086\t\u0086\4\u0087\t\u0087\4\u0088\t\u0088\4\u0089\t\u0089"+
|
||||
"\4\u008a\t\u008a\4\u008b\t\u008b\4\u008c\t\u008c\4\u008d\t\u008d\4\u008e"+
|
||||
"\t\u008e\4\u008f\t\u008f\4\u0090\t\u0090\4\u0091\t\u0091\4\u0092\t\u0092"+
|
||||
"\4\u0093\t\u0093\4\u0094\t\u0094\4\u0095\t\u0095\4\u0096\t\u0096\4\u0097"+
|
||||
"\t\u0097\4\u0098\t\u0098\4\u0099\t\u0099\4\u009a\t\u009a\4\u009b\t\u009b"+
|
||||
"\3\2\3\2\3\2\3\2\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\4\3\4\3\4\3\4\3"+
|
||||
"\4\3\4\3\4\3\5\3\5\3\5\3\5\3\5\3\5\3\5\3\5\3\6\3\6\3\6\3\6\3\6\3\6\3\7"+
|
||||
"\3\7\3\7\3\7\3\7\3\b\3\b\3\b\3\b\3\b\3\t\3\t\3\t\3\t\3\t\3\t\3\n\3\n\3"+
|
||||
"\n\3\n\3\n\3\13\3\13\3\13\3\13\3\13\3\13\3\f\3\f\3\f\3\f\3\f\3\f\3\r\3"+
|
||||
"\r\3\r\3\r\3\r\3\r\3\r\3\r\3\r\3\16\3\16\3\16\3\16\3\16\3\16\3\16\3\16"+
|
||||
"\3\17\3\17\3\17\3\20\3\20\3\20\3\20\3\20\3\20\3\20\3\21\3\21\3\21\3\21"+
|
||||
"\3\21\3\22\3\22\3\22\3\22\3\22\3\23\3\23\3\23\3\23\3\23\3\23\3\23\3\23"+
|
||||
"\3\24\3\24\3\24\3\24\3\24\3\24\3\25\3\25\3\25\3\25\3\25\3\25\3\25\3\25"+
|
||||
"\3\26\3\26\3\26\3\26\3\26\3\26\3\27\3\27\3\27\3\27\3\30\3\30\3\30\3\31"+
|
||||
"\3\31\3\31\3\31\3\31\3\32\3\32\3\32\3\32\3\32\3\32\3\32\3\32\3\32\3\32"+
|
||||
"\3\32\3\33\3\33\3\33\3\33\3\33\3\33\3\33\3\34\3\34\3\34\3\34\3\34\3\34"+
|
||||
"\3\34\3\34\3\34\3\34\3\34\3\35\3\35\3\35\3\35\3\36\3\36\3\36\3\36\3\36"+
|
||||
"\3\36\3\36\3\36\3\36\3\36\3\37\3\37\3\37\3\37\3\37\3 \3 \3 \3 \3 \3 \3"+
|
||||
" \3!\3!\3!\3!\3\"\3\"\3\"\3\"\3\"\3\"\3\"\3\"\3#\3#\3#\3#\3#\3#\3#\3#"+
|
||||
"\3$\3$\3$\3$\3$\3$\3$\3$\3$\3$\3%\3%\3%\3%\3%\3%\3%\3&\3&\3&\3&\3&\3&"+
|
||||
"\3&\3\'\3\'\3\'\3\'\3\'\3\'\3(\3(\3(\3(\3(\3(\3(\3)\3)\3)\3)\3)\3)\3)"+
|
||||
"\3)\3)\3*\3*\3*\3*\3*\3*\3+\3+\3+\3+\3+\3+\3+\3,\3,\3,\3,\3,\3,\3,\3,"+
|
||||
"\3,\3,\3,\3,\3,\3-\3-\3-\3-\3-\3.\3.\3.\3.\3.\3.\3/\3/\3/\3/\3/\3/\3/"+
|
||||
"\3\60\3\60\3\60\3\60\3\60\3\60\3\60\3\60\3\60\3\60\3\61\3\61\3\61\3\61"+
|
||||
"\3\62\3\62\3\62\3\62\3\62\3\63\3\63\3\63\3\63\3\63\3\63\3\63\3\63\3\63"+
|
||||
"\3\64\3\64\3\64\3\64\3\64\3\64\3\65\3\65\3\65\3\65\5\65\u0293\n\65\3\66"+
|
||||
"\3\66\5\66\u0297\n\66\3\67\3\67\5\67\u029b\n\67\38\38\58\u029f\n8\39\3"+
|
||||
"9\59\u02a3\n9\3:\3:\3;\3;\3;\5;\u02aa\n;\3;\3;\3;\5;\u02af\n;\5;\u02b1"+
|
||||
"\n;\3<\3<\5<\u02b5\n<\3<\5<\u02b8\n<\3=\3=\5=\u02bc\n=\3>\3>\3?\6?\u02c1"+
|
||||
"\n?\r?\16?\u02c2\3@\3@\5@\u02c7\n@\3A\6A\u02ca\nA\rA\16A\u02cb\3B\3B\3"+
|
||||
"B\3B\3C\3C\5C\u02d4\nC\3C\5C\u02d7\nC\3D\3D\3E\6E\u02dc\nE\rE\16E\u02dd"+
|
||||
"\3F\3F\5F\u02e2\nF\3G\3G\5G\u02e6\nG\3G\3G\3H\3H\5H\u02ec\nH\3H\5H\u02ef"+
|
||||
"\nH\3I\3I\3J\6J\u02f4\nJ\rJ\16J\u02f5\3K\3K\5K\u02fa\nK\3L\3L\3L\3L\3"+
|
||||
"M\3M\5M\u0302\nM\3M\5M\u0305\nM\3N\3N\3O\6O\u030a\nO\rO\16O\u030b\3P\3"+
|
||||
"P\5P\u0310\nP\3Q\3Q\5Q\u0314\nQ\3R\3R\3R\5R\u0319\nR\3R\5R\u031c\nR\3"+
|
||||
"R\5R\u031f\nR\3R\3R\3R\5R\u0324\nR\3R\5R\u0327\nR\3R\3R\3R\5R\u032c\n"+
|
||||
"R\3R\3R\3R\5R\u0331\nR\3S\3S\3S\3T\3T\3U\5U\u0339\nU\3U\3U\3V\3V\3W\3"+
|
||||
"W\3X\3X\3X\5X\u0344\nX\3Y\3Y\5Y\u0348\nY\3Y\3Y\3Y\5Y\u034d\nY\3Y\3Y\5"+
|
||||
"Y\u0351\nY\3Z\3Z\3Z\3[\3[\3\\\3\\\3\\\3\\\3\\\3\\\3\\\3\\\3\\\5\\\u0361"+
|
||||
"\n\\\3]\3]\3]\3]\3]\3]\3]\3]\5]\u036b\n]\3^\3^\3_\3_\5_\u0371\n_\3_\3"+
|
||||
"_\3`\6`\u0376\n`\r`\16`\u0377\3a\3a\5a\u037c\na\3b\3b\3b\3b\5b\u0382\n"+
|
||||
"b\3c\3c\3c\3c\3c\3c\3c\3c\3c\3c\3c\5c\u038f\nc\3d\3d\3e\3e\3e\3e\3e\3"+
|
||||
"e\3e\3f\3f\3f\3f\3f\3g\3g\3h\3h\3i\3i\3j\3j\3k\3k\3l\3l\3m\3m\3n\3n\3"+
|
||||
"o\3o\3p\3p\3q\3q\3r\3r\3s\3s\3t\3t\3u\3u\3v\3v\3w\3w\3w\3x\3x\3x\3y\3"+
|
||||
"y\3y\3z\3z\3z\3{\3{\3{\3|\3|\3|\3}\3}\3}\3~\3~\3~\3\177\3\177\3\u0080"+
|
||||
"\3\u0080\3\u0081\3\u0081\3\u0082\3\u0082\3\u0083\3\u0083\3\u0084\3\u0084"+
|
||||
"\3\u0085\3\u0085\3\u0086\3\u0086\3\u0087\3\u0087\3\u0087\3\u0088\3\u0088"+
|
||||
"\3\u0088\3\u0089\3\u0089\3\u0089\3\u008a\3\u008a\3\u008a\3\u008b\3\u008b"+
|
||||
"\3\u008b\3\u008c\3\u008c\3\u008c\3\u008d\3\u008d\3\u008d\3\u008e\3\u008e"+
|
||||
"\3\u008e\3\u008f\3\u008f\3\u008f\3\u0090\3\u0090\3\u0090\3\u0091\3\u0091"+
|
||||
"\3\u0091\3\u0091\3\u0092\3\u0092\3\u0092\3\u0092\3\u0093\3\u0093\3\u0093"+
|
||||
"\3\u0093\3\u0093\3\u0094\3\u0094\7\u0094\u0414\n\u0094\f\u0094\16\u0094"+
|
||||
"\u0417\13\u0094\3\u0095\3\u0095\3\u0095\3\u0095\3\u0095\3\u0095\5\u0095"+
|
||||
"\u041f\n\u0095\3\u0096\3\u0096\3\u0096\3\u0096\3\u0096\3\u0096\5\u0096"+
|
||||
"\u0427\n\u0096\3\u0097\3\u0097\3\u0098\3\u0098\3\u0098\3\u0098\3\u0099"+
|
||||
"\6\u0099\u0430\n\u0099\r\u0099\16\u0099\u0431\3\u0099\3\u0099\3\u009a"+
|
||||
"\3\u009a\3\u009a\3\u009a\7\u009a\u043a\n\u009a\f\u009a\16\u009a\u043d"+
|
||||
"\13\u009a\3\u009a\3\u009a\3\u009a\3\u009a\3\u009a\3\u009b\3\u009b\3\u009b"+
|
||||
"\3\u009b\7\u009b\u0448\n\u009b\f\u009b\16\u009b\u044b\13\u009b\3\u009b"+
|
||||
"\3\u009b\3\u043b\2\u009c\3\3\5\4\7\5\t\6\13\7\r\b\17\t\21\n\23\13\25\f"+
|
||||
"\27\r\31\16\33\17\35\20\37\21!\22#\23%\24\'\25)\26+\27-\30/\31\61\32\63"+
|
||||
"\33\65\34\67\359\36;\37= ?!A\"C#E$G%I&K\'M(O)Q*S+U,W-Y.[/]\60_\61a\62"+
|
||||
"c\63e\64g\65i\66k\2m\2o\2q\2s\2u\2w\2y\2{\2}\2\177\2\u0081\2\u0083\2\u0085"+
|
||||
"\2\u0087\2\u0089\2\u008b\2\u008d\2\u008f\2\u0091\2\u0093\2\u0095\2\u0097"+
|
||||
"\2\u0099\2\u009b\2\u009d\2\u009f\2\u00a1\67\u00a3\2\u00a5\2\u00a7\2\u00a9"+
|
||||
"\2\u00ab\2\u00ad\2\u00af\2\u00b1\2\u00b3\2\u00b5\2\u00b78\u00b99\u00bb"+
|
||||
"\2\u00bd:\u00bf\2\u00c1\2\u00c3\2\u00c5\2\u00c7\2\u00c9\2\u00cb;\u00cd"+
|
||||
"<\u00cf=\u00d1>\u00d3?\u00d5@\u00d7A\u00d9B\u00dbC\u00ddD\u00dfE\u00e1"+
|
||||
"F\u00e3G\u00e5H\u00e7I\u00e9J\u00ebK\u00edL\u00efM\u00f1N\u00f3O\u00f5"+
|
||||
"P\u00f7Q\u00f9R\u00fbS\u00fdT\u00ffU\u0101V\u0103W\u0105X\u0107Y\u0109"+
|
||||
"Z\u010b[\u010d\\\u010f]\u0111^\u0113_\u0115`\u0117a\u0119b\u011bc\u011d"+
|
||||
"d\u011fe\u0121f\u0123g\u0125h\u0127i\u0129\2\u012b\2\u012dj\u012fk\u0131"+
|
||||
"l\u0133m\u0135n\3\2\30\4\2NNnn\3\2\63;\4\2ZZzz\5\2\62;CHch\3\2\629\4\2"+
|
||||
"DDdd\3\2\62\63\4\2GGgg\4\2--//\6\2FFHHffhh\4\2RRrr\4\2))^^\4\2$$^^\n\2"+
|
||||
"$$))^^ddhhppttvv\3\2\62\65\6\2&&C\\aac|\4\2\2\u0081\ud802\udc01\3\2\ud802"+
|
||||
"\udc01\3\2\udc02\ue001\7\2&&\62;C\\aac|\5\2\13\f\16\17\"\"\4\2\f\f\17"+
|
||||
"\17\2\u045c\2\3\3\2\2\2\2\5\3\2\2\2\2\7\3\2\2\2\2\t\3\2\2\2\2\13\3\2\2"+
|
||||
"\2\2\r\3\2\2\2\2\17\3\2\2\2\2\21\3\2\2\2\2\23\3\2\2\2\2\25\3\2\2\2\2\27"+
|
||||
"\3\2\2\2\2\31\3\2\2\2\2\33\3\2\2\2\2\35\3\2\2\2\2\37\3\2\2\2\2!\3\2\2"+
|
||||
"\2\2#\3\2\2\2\2%\3\2\2\2\2\'\3\2\2\2\2)\3\2\2\2\2+\3\2\2\2\2-\3\2\2\2"+
|
||||
"\2/\3\2\2\2\2\61\3\2\2\2\2\63\3\2\2\2\2\65\3\2\2\2\2\67\3\2\2\2\29\3\2"+
|
||||
"\2\2\2;\3\2\2\2\2=\3\2\2\2\2?\3\2\2\2\2A\3\2\2\2\2C\3\2\2\2\2E\3\2\2\2"+
|
||||
"\2G\3\2\2\2\2I\3\2\2\2\2K\3\2\2\2\2M\3\2\2\2\2O\3\2\2\2\2Q\3\2\2\2\2S"+
|
||||
"\3\2\2\2\2U\3\2\2\2\2W\3\2\2\2\2Y\3\2\2\2\2[\3\2\2\2\2]\3\2\2\2\2_\3\2"+
|
||||
"\2\2\2a\3\2\2\2\2c\3\2\2\2\2e\3\2\2\2\2g\3\2\2\2\2i\3\2\2\2\2\u00a1\3"+
|
||||
"\2\2\2\2\u00b7\3\2\2\2\2\u00b9\3\2\2\2\2\u00bd\3\2\2\2\2\u00cb\3\2\2\2"+
|
||||
"\2\u00cd\3\2\2\2\2\u00cf\3\2\2\2\2\u00d1\3\2\2\2\2\u00d3\3\2\2\2\2\u00d5"+
|
||||
"\3\2\2\2\2\u00d7\3\2\2\2\2\u00d9\3\2\2\2\2\u00db\3\2\2\2\2\u00dd\3\2\2"+
|
||||
"\2\2\u00df\3\2\2\2\2\u00e1\3\2\2\2\2\u00e3\3\2\2\2\2\u00e5\3\2\2\2\2\u00e7"+
|
||||
"\3\2\2\2\2\u00e9\3\2\2\2\2\u00eb\3\2\2\2\2\u00ed\3\2\2\2\2\u00ef\3\2\2"+
|
||||
"\2\2\u00f1\3\2\2\2\2\u00f3\3\2\2\2\2\u00f5\3\2\2\2\2\u00f7\3\2\2\2\2\u00f9"+
|
||||
"\3\2\2\2\2\u00fb\3\2\2\2\2\u00fd\3\2\2\2\2\u00ff\3\2\2\2\2\u0101\3\2\2"+
|
||||
"\2\2\u0103\3\2\2\2\2\u0105\3\2\2\2\2\u0107\3\2\2\2\2\u0109\3\2\2\2\2\u010b"+
|
||||
"\3\2\2\2\2\u010d\3\2\2\2\2\u010f\3\2\2\2\2\u0111\3\2\2\2\2\u0113\3\2\2"+
|
||||
"\2\2\u0115\3\2\2\2\2\u0117\3\2\2\2\2\u0119\3\2\2\2\2\u011b\3\2\2\2\2\u011d"+
|
||||
"\3\2\2\2\2\u011f\3\2\2\2\2\u0121\3\2\2\2\2\u0123\3\2\2\2\2\u0125\3\2\2"+
|
||||
"\2\2\u0127\3\2\2\2\2\u012d\3\2\2\2\2\u012f\3\2\2\2\2\u0131\3\2\2\2\2\u0133"+
|
||||
"\3\2\2\2\2\u0135\3\2\2\2\3\u0137\3\2\2\2\5\u013b\3\2\2\2\7\u0144\3\2\2"+
|
||||
"\2\t\u014b\3\2\2\2\13\u0153\3\2\2\2\r\u0159\3\2\2\2\17\u015e\3\2\2\2\21"+
|
||||
"\u0163\3\2\2\2\23\u0169\3\2\2\2\25\u016e\3\2\2\2\27\u0174\3\2\2\2\31\u017a"+
|
||||
"\3\2\2\2\33\u0183\3\2\2\2\35\u018b\3\2\2\2\37\u018e\3\2\2\2!\u0195\3\2"+
|
||||
"\2\2#\u019a\3\2\2\2%\u019f\3\2\2\2\'\u01a7\3\2\2\2)\u01ad\3\2\2\2+\u01b5"+
|
||||
"\3\2\2\2-\u01bb\3\2\2\2/\u01bf\3\2\2\2\61\u01c2\3\2\2\2\63\u01c7\3\2\2"+
|
||||
"\2\65\u01d2\3\2\2\2\67\u01d9\3\2\2\29\u01e4\3\2\2\2;\u01e8\3\2\2\2=\u01f2"+
|
||||
"\3\2\2\2?\u01f7\3\2\2\2A\u01fe\3\2\2\2C\u0202\3\2\2\2E\u020a\3\2\2\2G"+
|
||||
"\u0212\3\2\2\2I\u021c\3\2\2\2K\u0223\3\2\2\2M\u022a\3\2\2\2O\u0230\3\2"+
|
||||
"\2\2Q\u0237\3\2\2\2S\u0240\3\2\2\2U\u0246\3\2\2\2W\u024d\3\2\2\2Y\u025a"+
|
||||
"\3\2\2\2[\u025f\3\2\2\2]\u0265\3\2\2\2_\u026c\3\2\2\2a\u0276\3\2\2\2c"+
|
||||
"\u027a\3\2\2\2e\u027f\3\2\2\2g\u0288\3\2\2\2i\u0292\3\2\2\2k\u0294\3\2"+
|
||||
"\2\2m\u0298\3\2\2\2o\u029c\3\2\2\2q\u02a0\3\2\2\2s\u02a4\3\2\2\2u\u02b0"+
|
||||
"\3\2\2\2w\u02b2\3\2\2\2y\u02bb\3\2\2\2{\u02bd\3\2\2\2}\u02c0\3\2\2\2\177"+
|
||||
"\u02c6\3\2\2\2\u0081\u02c9\3\2\2\2\u0083\u02cd\3\2\2\2\u0085\u02d1\3\2"+
|
||||
"\2\2\u0087\u02d8\3\2\2\2\u0089\u02db\3\2\2\2\u008b\u02e1\3\2\2\2\u008d"+
|
||||
"\u02e3\3\2\2\2\u008f\u02e9\3\2\2\2\u0091\u02f0\3\2\2\2\u0093\u02f3\3\2"+
|
||||
"\2\2\u0095\u02f9\3\2\2\2\u0097\u02fb\3\2\2\2\u0099\u02ff\3\2\2\2\u009b"+
|
||||
"\u0306\3\2\2\2\u009d\u0309\3\2\2\2\u009f\u030f\3\2\2\2\u00a1\u0313\3\2"+
|
||||
"\2\2\u00a3\u0330\3\2\2\2\u00a5\u0332\3\2\2\2\u00a7\u0335\3\2\2\2\u00a9"+
|
||||
"\u0338\3\2\2\2\u00ab\u033c\3\2\2\2\u00ad\u033e\3\2\2\2\u00af\u0340\3\2"+
|
||||
"\2\2\u00b1\u0350\3\2\2\2\u00b3\u0352\3\2\2\2\u00b5\u0355\3\2\2\2\u00b7"+
|
||||
"\u0360\3\2\2\2\u00b9\u036a\3\2\2\2\u00bb\u036c\3\2\2\2\u00bd\u036e\3\2"+
|
||||
"\2\2\u00bf\u0375\3\2\2\2\u00c1\u037b\3\2\2\2\u00c3\u0381\3\2\2\2\u00c5"+
|
||||
"\u038e\3\2\2\2\u00c7\u0390\3\2\2\2\u00c9\u0392\3\2\2\2\u00cb\u0399\3\2"+
|
||||
"\2\2\u00cd\u039e\3\2\2\2\u00cf\u03a0\3\2\2\2\u00d1\u03a2\3\2\2\2\u00d3"+
|
||||
"\u03a4\3\2\2\2\u00d5\u03a6\3\2\2\2\u00d7\u03a8\3\2\2\2\u00d9\u03aa\3\2"+
|
||||
"\2\2\u00db\u03ac\3\2\2\2\u00dd\u03ae\3\2\2\2\u00df\u03b0\3\2\2\2\u00e1"+
|
||||
"\u03b2\3\2\2\2\u00e3\u03b4\3\2\2\2\u00e5\u03b6\3\2\2\2\u00e7\u03b8\3\2"+
|
||||
"\2\2\u00e9\u03ba\3\2\2\2\u00eb\u03bc\3\2\2\2\u00ed\u03be\3\2\2\2\u00ef"+
|
||||
"\u03c1\3\2\2\2\u00f1\u03c4\3\2\2\2\u00f3\u03c7\3\2\2\2\u00f5\u03ca\3\2"+
|
||||
"\2\2\u00f7\u03cd\3\2\2\2\u00f9\u03d0\3\2\2\2\u00fb\u03d3\3\2\2\2\u00fd"+
|
||||
"\u03d6\3\2\2\2\u00ff\u03d8\3\2\2\2\u0101\u03da\3\2\2\2\u0103\u03dc\3\2"+
|
||||
"\2\2\u0105\u03de\3\2\2\2\u0107\u03e0\3\2\2\2\u0109\u03e2\3\2\2\2\u010b"+
|
||||
"\u03e4\3\2\2\2\u010d\u03e6\3\2\2\2\u010f\u03e9\3\2\2\2\u0111\u03ec\3\2"+
|
||||
"\2\2\u0113\u03ef\3\2\2\2\u0115\u03f2\3\2\2\2\u0117\u03f5\3\2\2\2\u0119"+
|
||||
"\u03f8\3\2\2\2\u011b\u03fb\3\2\2\2\u011d\u03fe\3\2\2\2\u011f\u0401\3\2"+
|
||||
"\2\2\u0121\u0404\3\2\2\2\u0123\u0408\3\2\2\2\u0125\u040c\3\2\2\2\u0127"+
|
||||
"\u0411\3\2\2\2\u0129\u041e\3\2\2\2\u012b\u0426\3\2\2\2\u012d\u0428\3\2"+
|
||||
"\2\2\u012f\u042a\3\2\2\2\u0131\u042f\3\2\2\2\u0133\u0435\3\2\2\2\u0135"+
|
||||
"\u0443\3\2\2\2\u0137\u0138\7x\2\2\u0138\u0139\7c\2\2\u0139\u013a\7t\2"+
|
||||
"\2\u013a\4\3\2\2\2\u013b\u013c\7c\2\2\u013c\u013d\7d\2\2\u013d\u013e\7"+
|
||||
"u\2\2\u013e\u013f\7v\2\2\u013f\u0140\7t\2\2\u0140\u0141\7c\2\2\u0141\u0142"+
|
||||
"\7e\2\2\u0142\u0143\7v\2\2\u0143\6\3\2\2\2\u0144\u0145\7c\2\2\u0145\u0146"+
|
||||
"\7u\2\2\u0146\u0147\7u\2\2\u0147\u0148\7g\2\2\u0148\u0149\7t\2\2\u0149"+
|
||||
"\u014a\7v\2\2\u014a\b\3\2\2\2\u014b\u014c\7d\2\2\u014c\u014d\7q\2\2\u014d"+
|
||||
"\u014e\7q\2\2\u014e\u014f\7n\2\2\u014f\u0150\7g\2\2\u0150\u0151\7c\2\2"+
|
||||
"\u0151\u0152\7p\2\2\u0152\n\3\2\2\2\u0153\u0154\7d\2\2\u0154\u0155\7t"+
|
||||
"\2\2\u0155\u0156\7g\2\2\u0156\u0157\7c\2\2\u0157\u0158\7m\2\2\u0158\f"+
|
||||
"\3\2\2\2\u0159\u015a\7d\2\2\u015a\u015b\7{\2\2\u015b\u015c\7v\2\2\u015c"+
|
||||
"\u015d\7g\2\2\u015d\16\3\2\2\2\u015e\u015f\7e\2\2\u015f\u0160\7c\2\2\u0160"+
|
||||
"\u0161\7u\2\2\u0161\u0162\7g\2\2\u0162\20\3\2\2\2\u0163\u0164\7e\2\2\u0164"+
|
||||
"\u0165\7c\2\2\u0165\u0166\7v\2\2\u0166\u0167\7e\2\2\u0167\u0168\7j\2\2"+
|
||||
"\u0168\22\3\2\2\2\u0169\u016a\7e\2\2\u016a\u016b\7j\2\2\u016b\u016c\7"+
|
||||
"c\2\2\u016c\u016d\7t\2\2\u016d\24\3\2\2\2\u016e\u016f\7e\2\2\u016f\u0170"+
|
||||
"\7n\2\2\u0170\u0171\7c\2\2\u0171\u0172\7u\2\2\u0172\u0173\7u\2\2\u0173"+
|
||||
"\26\3\2\2\2\u0174\u0175\7e\2\2\u0175\u0176\7q\2\2\u0176\u0177\7p\2\2\u0177"+
|
||||
"\u0178\7u\2\2\u0178\u0179\7v\2\2\u0179\30\3\2\2\2\u017a\u017b\7e\2\2\u017b"+
|
||||
"\u017c\7q\2\2\u017c\u017d\7p\2\2\u017d\u017e\7v\2\2\u017e\u017f\7k\2\2"+
|
||||
"\u017f\u0180\7p\2\2\u0180\u0181\7w\2\2\u0181\u0182\7g\2\2\u0182\32\3\2"+
|
||||
"\2\2\u0183\u0184\7f\2\2\u0184\u0185\7g\2\2\u0185\u0186\7h\2\2\u0186\u0187"+
|
||||
"\7c\2\2\u0187\u0188\7w\2\2\u0188\u0189\7n\2\2\u0189\u018a\7v\2\2\u018a"+
|
||||
"\34\3\2\2\2\u018b\u018c\7f\2\2\u018c\u018d\7q\2\2\u018d\36\3\2\2\2\u018e"+
|
||||
"\u018f\7f\2\2\u018f\u0190\7q\2\2\u0190\u0191\7w\2\2\u0191\u0192\7d\2\2"+
|
||||
"\u0192\u0193\7n\2\2\u0193\u0194\7g\2\2\u0194 \3\2\2\2\u0195\u0196\7g\2"+
|
||||
"\2\u0196\u0197\7n\2\2\u0197\u0198\7u\2\2\u0198\u0199\7g\2\2\u0199\"\3"+
|
||||
"\2\2\2\u019a\u019b\7g\2\2\u019b\u019c\7p\2\2\u019c\u019d\7w\2\2\u019d"+
|
||||
"\u019e\7o\2\2\u019e$\3\2\2\2\u019f\u01a0\7g\2\2\u01a0\u01a1\7z\2\2\u01a1"+
|
||||
"\u01a2\7v\2\2\u01a2\u01a3\7g\2\2\u01a3\u01a4\7p\2\2\u01a4\u01a5\7f\2\2"+
|
||||
"\u01a5\u01a6\7u\2\2\u01a6&\3\2\2\2\u01a7\u01a8\7h\2\2\u01a8\u01a9\7k\2"+
|
||||
"\2\u01a9\u01aa\7p\2\2\u01aa\u01ab\7c\2\2\u01ab\u01ac\7n\2\2\u01ac(\3\2"+
|
||||
"\2\2\u01ad\u01ae\7h\2\2\u01ae\u01af\7k\2\2\u01af\u01b0\7p\2\2\u01b0\u01b1"+
|
||||
"\7c\2\2\u01b1\u01b2\7n\2\2\u01b2\u01b3\7n\2\2\u01b3\u01b4\7{\2\2\u01b4"+
|
||||
"*\3\2\2\2\u01b5\u01b6\7h\2\2\u01b6\u01b7\7n\2\2\u01b7\u01b8\7q\2\2\u01b8"+
|
||||
"\u01b9\7c\2\2\u01b9\u01ba\7v\2\2\u01ba,\3\2\2\2\u01bb\u01bc\7h\2\2\u01bc"+
|
||||
"\u01bd\7q\2\2\u01bd\u01be\7t\2\2\u01be.\3\2\2\2\u01bf\u01c0\7k\2\2\u01c0"+
|
||||
"\u01c1\7h\2\2\u01c1\60\3\2\2\2\u01c2\u01c3\7i\2\2\u01c3\u01c4\7q\2\2\u01c4"+
|
||||
"\u01c5\7v\2\2\u01c5\u01c6\7q\2\2\u01c6\62\3\2\2\2\u01c7\u01c8\7k\2\2\u01c8"+
|
||||
"\u01c9\7o\2\2\u01c9\u01ca\7r\2\2\u01ca\u01cb\7n\2\2\u01cb\u01cc\7g\2\2"+
|
||||
"\u01cc\u01cd\7o\2\2\u01cd\u01ce\7g\2\2\u01ce\u01cf\7p\2\2\u01cf\u01d0"+
|
||||
"\7v\2\2\u01d0\u01d1\7u\2\2\u01d1\64\3\2\2\2\u01d2\u01d3\7k\2\2\u01d3\u01d4"+
|
||||
"\7o\2\2\u01d4\u01d5\7r\2\2\u01d5\u01d6\7q\2\2\u01d6\u01d7\7t\2\2\u01d7"+
|
||||
"\u01d8\7v\2\2\u01d8\66\3\2\2\2\u01d9\u01da\7k\2\2\u01da\u01db\7p\2\2\u01db"+
|
||||
"\u01dc\7u\2\2\u01dc\u01dd\7v\2\2\u01dd\u01de\7c\2\2\u01de\u01df\7p\2\2"+
|
||||
"\u01df\u01e0\7e\2\2\u01e0\u01e1\7g\2\2\u01e1\u01e2\7q\2\2\u01e2\u01e3"+
|
||||
"\7h\2\2\u01e38\3\2\2\2\u01e4\u01e5\7k\2\2\u01e5\u01e6\7p\2\2\u01e6\u01e7"+
|
||||
"\7v\2\2\u01e7:\3\2\2\2\u01e8\u01e9\7k\2\2\u01e9\u01ea\7p\2\2\u01ea\u01eb"+
|
||||
"\7v\2\2\u01eb\u01ec\7g\2\2\u01ec\u01ed\7t\2\2\u01ed\u01ee\7h\2\2\u01ee"+
|
||||
"\u01ef\7c\2\2\u01ef\u01f0\7e\2\2\u01f0\u01f1\7g\2\2\u01f1<\3\2\2\2\u01f2"+
|
||||
"\u01f3\7n\2\2\u01f3\u01f4\7q\2\2\u01f4\u01f5\7p\2\2\u01f5\u01f6\7i\2\2"+
|
||||
"\u01f6>\3\2\2\2\u01f7\u01f8\7p\2\2\u01f8\u01f9\7c\2\2\u01f9\u01fa\7v\2"+
|
||||
"\2\u01fa\u01fb\7k\2\2\u01fb\u01fc\7x\2\2\u01fc\u01fd\7g\2\2\u01fd@\3\2"+
|
||||
"\2\2\u01fe\u01ff\7p\2\2\u01ff\u0200\7g\2\2\u0200\u0201\7y\2\2\u0201B\3"+
|
||||
"\2\2\2\u0202\u0203\7r\2\2\u0203\u0204\7c\2\2\u0204\u0205\7e\2\2\u0205"+
|
||||
"\u0206\7m\2\2\u0206\u0207\7c\2\2\u0207\u0208\7i\2\2\u0208\u0209\7g\2\2"+
|
||||
"\u0209D\3\2\2\2\u020a\u020b\7r\2\2\u020b\u020c\7t\2\2\u020c\u020d\7k\2"+
|
||||
"\2\u020d\u020e\7x\2\2\u020e\u020f\7c\2\2\u020f\u0210\7v\2\2\u0210\u0211"+
|
||||
"\7g\2\2\u0211F\3\2\2\2\u0212\u0213\7r\2\2\u0213\u0214\7t\2\2\u0214\u0215"+
|
||||
"\7q\2\2\u0215\u0216\7v\2\2\u0216\u0217\7g\2\2\u0217\u0218\7e\2\2\u0218"+
|
||||
"\u0219\7v\2\2\u0219\u021a\7g\2\2\u021a\u021b\7f\2\2\u021bH\3\2\2\2\u021c"+
|
||||
"\u021d\7r\2\2\u021d\u021e\7w\2\2\u021e\u021f\7d\2\2\u021f\u0220\7n\2\2"+
|
||||
"\u0220\u0221\7k\2\2\u0221\u0222\7e\2\2\u0222J\3\2\2\2\u0223\u0224\7t\2"+
|
||||
"\2\u0224\u0225\7g\2\2\u0225\u0226\7v\2\2\u0226\u0227\7w\2\2\u0227\u0228"+
|
||||
"\7t\2\2\u0228\u0229\7p\2\2\u0229L\3\2\2\2\u022a\u022b\7u\2\2\u022b\u022c"+
|
||||
"\7j\2\2\u022c\u022d\7q\2\2\u022d\u022e\7t\2\2\u022e\u022f\7v\2\2\u022f"+
|
||||
"N\3\2\2\2\u0230\u0231\7u\2\2\u0231\u0232\7v\2\2\u0232\u0233\7c\2\2\u0233"+
|
||||
"\u0234\7v\2\2\u0234\u0235\7k\2\2\u0235\u0236\7e\2\2\u0236P\3\2\2\2\u0237"+
|
||||
"\u0238\7u\2\2\u0238\u0239\7v\2\2\u0239\u023a\7t\2\2\u023a\u023b\7k\2\2"+
|
||||
"\u023b\u023c\7e\2\2\u023c\u023d\7v\2\2\u023d\u023e\7h\2\2\u023e\u023f"+
|
||||
"\7r\2\2\u023fR\3\2\2\2\u0240\u0241\7u\2\2\u0241\u0242\7w\2\2\u0242\u0243"+
|
||||
"\7r\2\2\u0243\u0244\7g\2\2\u0244\u0245\7t\2\2\u0245T\3\2\2\2\u0246\u0247"+
|
||||
"\7u\2\2\u0247\u0248\7y\2\2\u0248\u0249\7k\2\2\u0249\u024a\7v\2\2\u024a"+
|
||||
"\u024b\7e\2\2\u024b\u024c\7j\2\2\u024cV\3\2\2\2\u024d\u024e\7u\2\2\u024e"+
|
||||
"\u024f\7{\2\2\u024f\u0250\7p\2\2\u0250\u0251\7e\2\2\u0251\u0252\7j\2\2"+
|
||||
"\u0252\u0253\7t\2\2\u0253\u0254\7q\2\2\u0254\u0255\7p\2\2\u0255\u0256"+
|
||||
"\7k\2\2\u0256\u0257\7|\2\2\u0257\u0258\7g\2\2\u0258\u0259\7f\2\2\u0259"+
|
||||
"X\3\2\2\2\u025a\u025b\7v\2\2\u025b\u025c\7j\2\2\u025c\u025d\7k\2\2\u025d"+
|
||||
"\u025e\7u\2\2\u025eZ\3\2\2\2\u025f\u0260\7v\2\2\u0260\u0261\7j\2\2\u0261"+
|
||||
"\u0262\7t\2\2\u0262\u0263\7q\2\2\u0263\u0264\7y\2\2\u0264\\\3\2\2\2\u0265"+
|
||||
"\u0266\7v\2\2\u0266\u0267\7j\2\2\u0267\u0268\7t\2\2\u0268\u0269\7q\2\2"+
|
||||
"\u0269\u026a\7y\2\2\u026a\u026b\7u\2\2\u026b^\3\2\2\2\u026c\u026d\7v\2"+
|
||||
"\2\u026d\u026e\7t\2\2\u026e\u026f\7c\2\2\u026f\u0270\7p\2\2\u0270\u0271"+
|
||||
"\7u\2\2\u0271\u0272\7k\2\2\u0272\u0273\7g\2\2\u0273\u0274\7p\2\2\u0274"+
|
||||
"\u0275\7v\2\2\u0275`\3\2\2\2\u0276\u0277\7v\2\2\u0277\u0278\7t\2\2\u0278"+
|
||||
"\u0279\7{\2\2\u0279b\3\2\2\2\u027a\u027b\7x\2\2\u027b\u027c\7q\2\2\u027c"+
|
||||
"\u027d\7k\2\2\u027d\u027e\7f\2\2\u027ed\3\2\2\2\u027f\u0280\7x\2\2\u0280"+
|
||||
"\u0281\7q\2\2\u0281\u0282\7n\2\2\u0282\u0283\7c\2\2\u0283\u0284\7v\2\2"+
|
||||
"\u0284\u0285\7k\2\2\u0285\u0286\7n\2\2\u0286\u0287\7g\2\2\u0287f\3\2\2"+
|
||||
"\2\u0288\u0289\7y\2\2\u0289\u028a\7j\2\2\u028a\u028b\7k\2\2\u028b\u028c"+
|
||||
"\7n\2\2\u028c\u028d\7g\2\2\u028dh\3\2\2\2\u028e\u0293\5k\66\2\u028f\u0293"+
|
||||
"\5m\67\2\u0290\u0293\5o8\2\u0291\u0293\5q9\2\u0292\u028e\3\2\2\2\u0292"+
|
||||
"\u028f\3\2\2\2\u0292\u0290\3\2\2\2\u0292\u0291\3\2\2\2\u0293j\3\2\2\2"+
|
||||
"\u0294\u0296\5u;\2\u0295\u0297\5s:\2\u0296\u0295\3\2\2\2\u0296\u0297\3"+
|
||||
"\2\2\2\u0297l\3\2\2\2\u0298\u029a\5\u0083B\2\u0299\u029b\5s:\2\u029a\u0299"+
|
||||
"\3\2\2\2\u029a\u029b\3\2\2\2\u029bn\3\2\2\2\u029c\u029e\5\u008dG\2\u029d"+
|
||||
"\u029f\5s:\2\u029e\u029d\3\2\2\2\u029e\u029f\3\2\2\2\u029fp\3\2\2\2\u02a0"+
|
||||
"\u02a2\5\u0097L\2\u02a1\u02a3\5s:\2\u02a2\u02a1\3\2\2\2\u02a2\u02a3\3"+
|
||||
"\2\2\2\u02a3r\3\2\2\2\u02a4\u02a5\t\2\2\2\u02a5t\3\2\2\2\u02a6\u02b1\7"+
|
||||
"\62\2\2\u02a7\u02ae\5{>\2\u02a8\u02aa\5w<\2\u02a9\u02a8\3\2\2\2\u02a9"+
|
||||
"\u02aa\3\2\2\2\u02aa\u02af\3\2\2\2\u02ab\u02ac\5\u0081A\2\u02ac\u02ad"+
|
||||
"\5w<\2\u02ad\u02af\3\2\2\2\u02ae\u02a9\3\2\2\2\u02ae\u02ab\3\2\2\2\u02af"+
|
||||
"\u02b1\3\2\2\2\u02b0\u02a6\3\2\2\2\u02b0\u02a7\3\2\2\2\u02b1v\3\2\2\2"+
|
||||
"\u02b2\u02b7\5y=\2\u02b3\u02b5\5}?\2\u02b4\u02b3\3\2\2\2\u02b4\u02b5\3"+
|
||||
"\2\2\2\u02b5\u02b6\3\2\2\2\u02b6\u02b8\5y=\2\u02b7\u02b4\3\2\2\2\u02b7"+
|
||||
"\u02b8\3\2\2\2\u02b8x\3\2\2\2\u02b9\u02bc\7\62\2\2\u02ba\u02bc\5{>\2\u02bb"+
|
||||
"\u02b9\3\2\2\2\u02bb\u02ba\3\2\2\2\u02bcz\3\2\2\2\u02bd\u02be\t\3\2\2"+
|
||||
"\u02be|\3\2\2\2\u02bf\u02c1\5\177@\2\u02c0\u02bf\3\2\2\2\u02c1\u02c2\3"+
|
||||
"\2\2\2\u02c2\u02c0\3\2\2\2\u02c2\u02c3\3\2\2\2\u02c3~\3\2\2\2\u02c4\u02c7"+
|
||||
"\5y=\2\u02c5\u02c7\7a\2\2\u02c6\u02c4\3\2\2\2\u02c6\u02c5\3\2\2\2\u02c7"+
|
||||
"\u0080\3\2\2\2\u02c8\u02ca\7a\2\2\u02c9\u02c8\3\2\2\2\u02ca\u02cb\3\2"+
|
||||
"\2\2\u02cb\u02c9\3\2\2\2\u02cb\u02cc\3\2\2\2\u02cc\u0082\3\2\2\2\u02cd"+
|
||||
"\u02ce\7\62\2\2\u02ce\u02cf\t\4\2\2\u02cf\u02d0\5\u0085C\2\u02d0\u0084"+
|
||||
"\3\2\2\2\u02d1\u02d6\5\u0087D\2\u02d2\u02d4\5\u0089E\2\u02d3\u02d2\3\2"+
|
||||
"\2\2\u02d3\u02d4\3\2\2\2\u02d4\u02d5\3\2\2\2\u02d5\u02d7\5\u0087D\2\u02d6"+
|
||||
"\u02d3\3\2\2\2\u02d6\u02d7\3\2\2\2\u02d7\u0086\3\2\2\2\u02d8\u02d9\t\5"+
|
||||
"\2\2\u02d9\u0088\3\2\2\2\u02da\u02dc\5\u008bF\2\u02db\u02da\3\2\2\2\u02dc"+
|
||||
"\u02dd\3\2\2\2\u02dd\u02db\3\2\2\2\u02dd\u02de\3\2\2\2\u02de\u008a\3\2"+
|
||||
"\2\2\u02df\u02e2\5\u0087D\2\u02e0\u02e2\7a\2\2\u02e1\u02df\3\2\2\2\u02e1"+
|
||||
"\u02e0\3\2\2\2\u02e2\u008c\3\2\2\2\u02e3\u02e5\7\62\2\2\u02e4\u02e6\5"+
|
||||
"\u0081A\2\u02e5\u02e4\3\2\2\2\u02e5\u02e6\3\2\2\2\u02e6\u02e7\3\2\2\2"+
|
||||
"\u02e7\u02e8\5\u008fH\2\u02e8\u008e\3\2\2\2\u02e9\u02ee\5\u0091I\2\u02ea"+
|
||||
"\u02ec\5\u0093J\2\u02eb\u02ea\3\2\2\2\u02eb\u02ec\3\2\2\2\u02ec\u02ed"+
|
||||
"\3\2\2\2\u02ed\u02ef\5\u0091I\2\u02ee\u02eb\3\2\2\2\u02ee\u02ef\3\2\2"+
|
||||
"\2\u02ef\u0090\3\2\2\2\u02f0\u02f1\t\6\2\2\u02f1\u0092\3\2\2\2\u02f2\u02f4"+
|
||||
"\5\u0095K\2\u02f3\u02f2\3\2\2\2\u02f4\u02f5\3\2\2\2\u02f5\u02f3\3\2\2"+
|
||||
"\2\u02f5\u02f6\3\2\2\2\u02f6\u0094\3\2\2\2\u02f7\u02fa\5\u0091I\2\u02f8"+
|
||||
"\u02fa\7a\2\2\u02f9\u02f7\3\2\2\2\u02f9\u02f8\3\2\2\2\u02fa\u0096\3\2"+
|
||||
"\2\2\u02fb\u02fc\7\62\2\2\u02fc\u02fd\t\7\2\2\u02fd\u02fe\5\u0099M\2\u02fe"+
|
||||
"\u0098\3\2\2\2\u02ff\u0304\5\u009bN\2\u0300\u0302\5\u009dO\2\u0301\u0300"+
|
||||
"\3\2\2\2\u0301\u0302\3\2\2\2\u0302\u0303\3\2\2\2\u0303\u0305\5\u009bN"+
|
||||
"\2\u0304\u0301\3\2\2\2\u0304\u0305\3\2\2\2\u0305\u009a\3\2\2\2\u0306\u0307"+
|
||||
"\t\b\2\2\u0307\u009c\3\2\2\2\u0308\u030a\5\u009fP\2\u0309\u0308\3\2\2"+
|
||||
"\2\u030a\u030b\3\2\2\2\u030b\u0309\3\2\2\2\u030b\u030c\3\2\2\2\u030c\u009e"+
|
||||
"\3\2\2\2\u030d\u0310\5\u009bN\2\u030e\u0310\7a\2\2\u030f\u030d\3\2\2\2"+
|
||||
"\u030f\u030e\3\2\2\2\u0310\u00a0\3\2\2\2\u0311\u0314\5\u00a3R\2\u0312"+
|
||||
"\u0314\5\u00afX\2\u0313\u0311\3\2\2\2\u0313\u0312\3\2\2\2\u0314\u00a2"+
|
||||
"\3\2\2\2\u0315\u0316\5w<\2\u0316\u0318\7\60\2\2\u0317\u0319\5w<\2\u0318"+
|
||||
"\u0317\3\2\2\2\u0318\u0319\3\2\2\2\u0319\u031b\3\2\2\2\u031a\u031c\5\u00a5"+
|
||||
"S\2\u031b\u031a\3\2\2\2\u031b\u031c\3\2\2\2\u031c\u031e\3\2\2\2\u031d"+
|
||||
"\u031f\5\u00adW\2\u031e\u031d\3\2\2\2\u031e\u031f\3\2\2\2\u031f\u0331"+
|
||||
"\3\2\2\2\u0320\u0321\7\60\2\2\u0321\u0323\5w<\2\u0322\u0324\5\u00a5S\2"+
|
||||
"\u0323\u0322\3\2\2\2\u0323\u0324\3\2\2\2\u0324\u0326\3\2\2\2\u0325\u0327"+
|
||||
"\5\u00adW\2\u0326\u0325\3\2\2\2\u0326\u0327\3\2\2\2\u0327\u0331\3\2\2"+
|
||||
"\2\u0328\u0329\5w<\2\u0329\u032b\5\u00a5S\2\u032a\u032c\5\u00adW\2\u032b"+
|
||||
"\u032a\3\2\2\2\u032b\u032c\3\2\2\2\u032c\u0331\3\2\2\2\u032d\u032e\5w"+
|
||||
"<\2\u032e\u032f\5\u00adW\2\u032f\u0331\3\2\2\2\u0330\u0315\3\2\2\2\u0330"+
|
||||
"\u0320\3\2\2\2\u0330\u0328\3\2\2\2\u0330\u032d\3\2\2\2\u0331\u00a4\3\2"+
|
||||
"\2\2\u0332\u0333\5\u00a7T\2\u0333\u0334\5\u00a9U\2\u0334\u00a6\3\2\2\2"+
|
||||
"\u0335\u0336\t\t\2\2\u0336\u00a8\3\2\2\2\u0337\u0339\5\u00abV\2\u0338"+
|
||||
"\u0337\3\2\2\2\u0338\u0339\3\2\2\2\u0339\u033a\3\2\2\2\u033a\u033b\5w"+
|
||||
"<\2\u033b\u00aa\3\2\2\2\u033c\u033d\t\n\2\2\u033d\u00ac\3\2\2\2\u033e"+
|
||||
"\u033f\t\13\2\2\u033f\u00ae\3\2\2\2\u0340\u0341\5\u00b1Y\2\u0341\u0343"+
|
||||
"\5\u00b3Z\2\u0342\u0344\5\u00adW\2\u0343\u0342\3\2\2\2\u0343\u0344\3\2"+
|
||||
"\2\2\u0344\u00b0\3\2\2\2\u0345\u0347\5\u0083B\2\u0346\u0348\7\60\2\2\u0347"+
|
||||
"\u0346\3\2\2\2\u0347\u0348\3\2\2\2\u0348\u0351\3\2\2\2\u0349\u034a\7\62"+
|
||||
"\2\2\u034a\u034c\t\4\2\2\u034b\u034d\5\u0085C\2\u034c\u034b\3\2\2\2\u034c"+
|
||||
"\u034d\3\2\2\2\u034d\u034e\3\2\2\2\u034e\u034f\7\60\2\2\u034f\u0351\5"+
|
||||
"\u0085C\2\u0350\u0345\3\2\2\2\u0350\u0349\3\2\2\2\u0351\u00b2\3\2\2\2"+
|
||||
"\u0352\u0353\5\u00b5[\2\u0353\u0354\5\u00a9U\2\u0354\u00b4\3\2\2\2\u0355"+
|
||||
"\u0356\t\f\2\2\u0356\u00b6\3\2\2\2\u0357\u0358\7v\2\2\u0358\u0359\7t\2"+
|
||||
"\2\u0359\u035a\7w\2\2\u035a\u0361\7g\2\2\u035b\u035c\7h\2\2\u035c\u035d"+
|
||||
"\7c\2\2\u035d\u035e\7n\2\2\u035e\u035f\7u\2\2\u035f\u0361\7g\2\2\u0360"+
|
||||
"\u0357\3\2\2\2\u0360\u035b\3\2\2\2\u0361\u00b8\3\2\2\2\u0362\u0363\7)"+
|
||||
"\2\2\u0363\u0364\5\u00bb^\2\u0364\u0365\7)\2\2\u0365\u036b\3\2\2\2\u0366"+
|
||||
"\u0367\7)\2\2\u0367\u0368\5\u00c3b\2\u0368\u0369\7)\2\2\u0369\u036b\3"+
|
||||
"\2\2\2\u036a\u0362\3\2\2\2\u036a\u0366\3\2\2\2\u036b\u00ba\3\2\2\2\u036c"+
|
||||
"\u036d\n\r\2\2\u036d\u00bc\3\2\2\2\u036e\u0370\7$\2\2\u036f\u0371\5\u00bf"+
|
||||
"`\2\u0370\u036f\3\2\2\2\u0370\u0371\3\2\2\2\u0371\u0372\3\2\2\2\u0372"+
|
||||
"\u0373\7$\2\2\u0373\u00be\3\2\2\2\u0374\u0376\5\u00c1a\2\u0375\u0374\3"+
|
||||
"\2\2\2\u0376\u0377\3\2\2\2\u0377\u0375\3\2\2\2\u0377\u0378\3\2\2\2\u0378"+
|
||||
"\u00c0\3\2\2\2\u0379\u037c\n\16\2\2\u037a\u037c\5\u00c3b\2\u037b\u0379"+
|
||||
"\3\2\2\2\u037b\u037a\3\2\2\2\u037c\u00c2\3\2\2\2\u037d\u037e\7^\2\2\u037e"+
|
||||
"\u0382\t\17\2\2\u037f\u0382\5\u00c5c\2\u0380\u0382\5\u00c9e\2\u0381\u037d"+
|
||||
"\3\2\2\2\u0381\u037f\3\2\2\2\u0381\u0380\3\2\2\2\u0382\u00c4\3\2\2\2\u0383"+
|
||||
"\u0384\7^\2\2\u0384\u038f\5\u0091I\2\u0385\u0386\7^\2\2\u0386\u0387\5"+
|
||||
"\u0091I\2\u0387\u0388\5\u0091I\2\u0388\u038f\3\2\2\2\u0389\u038a\7^\2"+
|
||||
"\2\u038a\u038b\5\u00c7d\2\u038b\u038c\5\u0091I\2\u038c\u038d\5\u0091I"+
|
||||
"\2\u038d\u038f\3\2\2\2\u038e\u0383\3\2\2\2\u038e\u0385\3\2\2\2\u038e\u0389"+
|
||||
"\3\2\2\2\u038f\u00c6\3\2\2\2\u0390\u0391\t\20\2\2\u0391\u00c8\3\2\2\2"+
|
||||
"\u0392\u0393\7^\2\2\u0393\u0394\7w\2\2\u0394\u0395\5\u0087D\2\u0395\u0396"+
|
||||
"\5\u0087D\2\u0396\u0397\5\u0087D\2\u0397\u0398\5\u0087D\2\u0398\u00ca"+
|
||||
"\3\2\2\2\u0399\u039a\7p\2\2\u039a\u039b\7w\2\2\u039b\u039c\7n\2\2\u039c"+
|
||||
"\u039d\7n\2\2\u039d\u00cc\3\2\2\2\u039e\u039f\7*\2\2\u039f\u00ce\3\2\2"+
|
||||
"\2\u03a0\u03a1\7+\2\2\u03a1\u00d0\3\2\2\2\u03a2\u03a3\7}\2\2\u03a3\u00d2"+
|
||||
"\3\2\2\2\u03a4\u03a5\7\177\2\2\u03a5\u00d4\3\2\2\2\u03a6\u03a7\7]\2\2"+
|
||||
"\u03a7\u00d6\3\2\2\2\u03a8\u03a9\7_\2\2\u03a9\u00d8\3\2\2\2\u03aa\u03ab"+
|
||||
"\7=\2\2\u03ab\u00da\3\2\2\2\u03ac\u03ad\7.\2\2\u03ad\u00dc\3\2\2\2\u03ae"+
|
||||
"\u03af\7\60\2\2\u03af\u00de\3\2\2\2\u03b0\u03b1\7?\2\2\u03b1\u00e0\3\2"+
|
||||
"\2\2\u03b2\u03b3\7@\2\2\u03b3\u00e2\3\2\2\2\u03b4\u03b5\7>\2\2\u03b5\u00e4"+
|
||||
"\3\2\2\2\u03b6\u03b7\7#\2\2\u03b7\u00e6\3\2\2\2\u03b8\u03b9\7\u0080\2"+
|
||||
"\2\u03b9\u00e8\3\2\2\2\u03ba\u03bb\7A\2\2\u03bb\u00ea\3\2\2\2\u03bc\u03bd"+
|
||||
"\7<\2\2\u03bd\u00ec\3\2\2\2\u03be\u03bf\7?\2\2\u03bf\u03c0\7?\2\2\u03c0"+
|
||||
"\u00ee\3\2\2\2\u03c1\u03c2\7>\2\2\u03c2\u03c3\7?\2\2\u03c3\u00f0\3\2\2"+
|
||||
"\2\u03c4\u03c5\7@\2\2\u03c5\u03c6\7?\2\2\u03c6\u00f2\3\2\2\2\u03c7\u03c8"+
|
||||
"\7#\2\2\u03c8\u03c9\7?\2\2\u03c9\u00f4\3\2\2\2\u03ca\u03cb\7(\2\2\u03cb"+
|
||||
"\u03cc\7(\2\2\u03cc\u00f6\3\2\2\2\u03cd\u03ce\7~\2\2\u03ce\u03cf\7~\2"+
|
||||
"\2\u03cf\u00f8\3\2\2\2\u03d0\u03d1\7-\2\2\u03d1\u03d2\7-\2\2\u03d2\u00fa"+
|
||||
"\3\2\2\2\u03d3\u03d4\7/\2\2\u03d4\u03d5\7/\2\2\u03d5\u00fc\3\2\2\2\u03d6"+
|
||||
"\u03d7\7-\2\2\u03d7\u00fe\3\2\2\2\u03d8\u03d9\7/\2\2\u03d9\u0100\3\2\2"+
|
||||
"\2\u03da\u03db\7,\2\2\u03db\u0102\3\2\2\2\u03dc\u03dd\7\61\2\2\u03dd\u0104"+
|
||||
"\3\2\2\2\u03de\u03df\7(\2\2\u03df\u0106\3\2\2\2\u03e0\u03e1\7~\2\2\u03e1"+
|
||||
"\u0108\3\2\2\2\u03e2\u03e3\7`\2\2\u03e3\u010a\3\2\2\2\u03e4\u03e5\7\'"+
|
||||
"\2\2\u03e5\u010c\3\2\2\2\u03e6\u03e7\7/\2\2\u03e7\u03e8\7@\2\2\u03e8\u010e"+
|
||||
"\3\2\2\2\u03e9\u03ea\7<\2\2\u03ea\u03eb\7<\2\2\u03eb\u0110\3\2\2\2\u03ec"+
|
||||
"\u03ed\7-\2\2\u03ed\u03ee\7?\2\2\u03ee\u0112\3\2\2\2\u03ef\u03f0\7/\2"+
|
||||
"\2\u03f0\u03f1\7?\2\2\u03f1\u0114\3\2\2\2\u03f2\u03f3\7,\2\2\u03f3\u03f4"+
|
||||
"\7?\2\2\u03f4\u0116\3\2\2\2\u03f5\u03f6\7\61\2\2\u03f6\u03f7\7?\2\2\u03f7"+
|
||||
"\u0118\3\2\2\2\u03f8\u03f9\7(\2\2\u03f9\u03fa\7?\2\2\u03fa\u011a\3\2\2"+
|
||||
"\2\u03fb\u03fc\7~\2\2\u03fc\u03fd\7?\2\2\u03fd\u011c\3\2\2\2\u03fe\u03ff"+
|
||||
"\7`\2\2\u03ff\u0400\7?\2\2\u0400\u011e\3\2\2\2\u0401\u0402\7\'\2\2\u0402"+
|
||||
"\u0403\7?\2\2\u0403\u0120\3\2\2\2\u0404\u0405\7>\2\2\u0405\u0406\7>\2"+
|
||||
"\2\u0406\u0407\7?\2\2\u0407\u0122\3\2\2\2\u0408\u0409\7@\2\2\u0409\u040a"+
|
||||
"\7@\2\2\u040a\u040b\7?\2\2\u040b\u0124\3\2\2\2\u040c\u040d\7@\2\2\u040d"+
|
||||
"\u040e\7@\2\2\u040e\u040f\7@\2\2\u040f\u0410\7?\2\2\u0410\u0126\3\2\2"+
|
||||
"\2\u0411\u0415\5\u0129\u0095\2\u0412\u0414\5\u012b\u0096\2\u0413\u0412"+
|
||||
"\3\2\2\2\u0414\u0417\3\2\2\2\u0415\u0413\3\2\2\2\u0415\u0416\3\2\2\2\u0416"+
|
||||
"\u0128\3\2\2\2\u0417\u0415\3\2\2\2\u0418\u041f\t\21\2\2\u0419\u041a\n"+
|
||||
"\22\2\2\u041a\u041f\6\u0095\2\2\u041b\u041c\t\23\2\2\u041c\u041d\t\24"+
|
||||
"\2\2\u041d\u041f\6\u0095\3\2\u041e\u0418\3\2\2\2\u041e\u0419\3\2\2\2\u041e"+
|
||||
"\u041b\3\2\2\2\u041f\u012a\3\2\2\2\u0420\u0427\t\25\2\2\u0421\u0422\n"+
|
||||
"\22\2\2\u0422\u0427\6\u0096\4\2\u0423\u0424\t\23\2\2\u0424\u0425\t\24"+
|
||||
"\2\2\u0425\u0427\6\u0096\5\2\u0426\u0420\3\2\2\2\u0426\u0421\3\2\2\2\u0426"+
|
||||
"\u0423\3\2\2\2\u0427\u012c\3\2\2\2\u0428\u0429\7B\2\2\u0429\u012e\3\2"+
|
||||
"\2\2\u042a\u042b\7\60\2\2\u042b\u042c\7\60\2\2\u042c\u042d\7\60\2\2\u042d"+
|
||||
"\u0130\3\2\2\2\u042e\u0430\t\26\2\2\u042f\u042e\3\2\2\2\u0430\u0431\3"+
|
||||
"\2\2\2\u0431\u042f\3\2\2\2\u0431\u0432\3\2\2\2\u0432\u0433\3\2\2\2\u0433"+
|
||||
"\u0434\b\u0099\2\2\u0434\u0132\3\2\2\2\u0435\u0436\7\61\2\2\u0436\u0437"+
|
||||
"\7,\2\2\u0437\u043b\3\2\2\2\u0438\u043a\13\2\2\2\u0439\u0438\3\2\2\2\u043a"+
|
||||
"\u043d\3\2\2\2\u043b\u043c\3\2\2\2\u043b\u0439\3\2\2\2\u043c\u043e\3\2"+
|
||||
"\2\2\u043d\u043b\3\2\2\2\u043e\u043f\7,\2\2\u043f\u0440\7\61\2\2\u0440"+
|
||||
"\u0441\3\2\2\2\u0441\u0442\b\u009a\2\2\u0442\u0134\3\2\2\2\u0443\u0444"+
|
||||
"\7\61\2\2\u0444\u0445\7\61\2\2\u0445\u0449\3\2\2\2\u0446\u0448\n\27\2"+
|
||||
"\2\u0447\u0446\3\2\2\2\u0448\u044b\3\2\2\2\u0449\u0447\3\2\2\2\u0449\u044a"+
|
||||
"\3\2\2\2\u044a\u044c\3\2\2\2\u044b\u0449\3\2\2\2\u044c\u044d\b\u009b\2"+
|
||||
"\2\u044d\u0136\3\2\2\28\2\u0292\u0296\u029a\u029e\u02a2\u02a9\u02ae\u02b0"+
|
||||
"\u02b4\u02b7\u02bb\u02c2\u02c6\u02cb\u02d3\u02d6\u02dd\u02e1\u02e5\u02eb"+
|
||||
"\u02ee\u02f5\u02f9\u0301\u0304\u030b\u030f\u0313\u0318\u031b\u031e\u0323"+
|
||||
"\u0326\u032b\u0330\u0338\u0343\u0347\u034c\u0350\u0360\u036a\u0370\u0377"+
|
||||
"\u037b\u0381\u038e\u0415\u041e\u0426\u0431\u043b\u0449\3\b\2\2";
|
||||
public static final ATN _ATN =
|
||||
new ATNDeserializer().deserialize(_serializedATN.toCharArray());
|
||||
static {
|
||||
_decisionToDFA = new DFA[_ATN.getNumberOfDecisions()];
|
||||
for (int i = 0; i < _ATN.getNumberOfDecisions(); i++) {
|
||||
_decisionToDFA[i] = new DFA(_ATN.getDecisionState(i), i);
|
||||
}
|
||||
}
|
||||
}
|
207
src/main/java/de/dhbwstuttgart/parser/antlr/Java8Lexer.tokens
Normal file
@ -0,0 +1,207 @@
|
||||
T__0=1
|
||||
ABSTRACT=2
|
||||
ASSERT=3
|
||||
BOOLEAN=4
|
||||
BREAK=5
|
||||
BYTE=6
|
||||
CASE=7
|
||||
CATCH=8
|
||||
CHAR=9
|
||||
CLASS=10
|
||||
CONST=11
|
||||
CONTINUE=12
|
||||
DEFAULT=13
|
||||
DO=14
|
||||
DOUBLE=15
|
||||
ELSE=16
|
||||
ENUM=17
|
||||
EXTENDS=18
|
||||
FINAL=19
|
||||
FINALLY=20
|
||||
FLOAT=21
|
||||
FOR=22
|
||||
IF=23
|
||||
GOTO=24
|
||||
IMPLEMENTS=25
|
||||
IMPORT=26
|
||||
INSTANCEOF=27
|
||||
INT=28
|
||||
INTERFACE=29
|
||||
LONG=30
|
||||
NATIVE=31
|
||||
NEW=32
|
||||
PACKAGE=33
|
||||
PRIVATE=34
|
||||
PROTECTED=35
|
||||
PUBLIC=36
|
||||
RETURN=37
|
||||
SHORT=38
|
||||
STATIC=39
|
||||
STRICTFP=40
|
||||
SUPER=41
|
||||
SWITCH=42
|
||||
SYNCHRONIZED=43
|
||||
THIS=44
|
||||
THROW=45
|
||||
THROWS=46
|
||||
TRANSIENT=47
|
||||
TRY=48
|
||||
VOID=49
|
||||
VOLATILE=50
|
||||
WHILE=51
|
||||
IntegerLiteral=52
|
||||
FloatingPointLiteral=53
|
||||
BooleanLiteral=54
|
||||
CharacterLiteral=55
|
||||
StringLiteral=56
|
||||
NullLiteral=57
|
||||
LPAREN=58
|
||||
RPAREN=59
|
||||
LBRACE=60
|
||||
RBRACE=61
|
||||
LBRACK=62
|
||||
RBRACK=63
|
||||
SEMI=64
|
||||
COMMA=65
|
||||
DOT=66
|
||||
ASSIGN=67
|
||||
GT=68
|
||||
LT=69
|
||||
BANG=70
|
||||
TILDE=71
|
||||
QUESTION=72
|
||||
COLON=73
|
||||
EQUAL=74
|
||||
LE=75
|
||||
GE=76
|
||||
NOTEQUAL=77
|
||||
AND=78
|
||||
OR=79
|
||||
INC=80
|
||||
DEC=81
|
||||
ADD=82
|
||||
SUB=83
|
||||
MUL=84
|
||||
DIV=85
|
||||
BITAND=86
|
||||
BITOR=87
|
||||
CARET=88
|
||||
MOD=89
|
||||
ARROW=90
|
||||
COLONCOLON=91
|
||||
ADD_ASSIGN=92
|
||||
SUB_ASSIGN=93
|
||||
MUL_ASSIGN=94
|
||||
DIV_ASSIGN=95
|
||||
AND_ASSIGN=96
|
||||
OR_ASSIGN=97
|
||||
XOR_ASSIGN=98
|
||||
MOD_ASSIGN=99
|
||||
LSHIFT_ASSIGN=100
|
||||
RSHIFT_ASSIGN=101
|
||||
URSHIFT_ASSIGN=102
|
||||
Identifier=103
|
||||
AT=104
|
||||
ELLIPSIS=105
|
||||
WS=106
|
||||
COMMENT=107
|
||||
LINE_COMMENT=108
|
||||
'var'=1
|
||||
'abstract'=2
|
||||
'assert'=3
|
||||
'boolean'=4
|
||||
'break'=5
|
||||
'byte'=6
|
||||
'case'=7
|
||||
'catch'=8
|
||||
'char'=9
|
||||
'class'=10
|
||||
'const'=11
|
||||
'continue'=12
|
||||
'default'=13
|
||||
'do'=14
|
||||
'double'=15
|
||||
'else'=16
|
||||
'enum'=17
|
||||
'extends'=18
|
||||
'final'=19
|
||||
'finally'=20
|
||||
'float'=21
|
||||
'for'=22
|
||||
'if'=23
|
||||
'goto'=24
|
||||
'implements'=25
|
||||
'import'=26
|
||||
'instanceof'=27
|
||||
'int'=28
|
||||
'interface'=29
|
||||
'long'=30
|
||||
'native'=31
|
||||
'new'=32
|
||||
'package'=33
|
||||
'private'=34
|
||||
'protected'=35
|
||||
'public'=36
|
||||
'return'=37
|
||||
'short'=38
|
||||
'static'=39
|
||||
'strictfp'=40
|
||||
'super'=41
|
||||
'switch'=42
|
||||
'synchronized'=43
|
||||
'this'=44
|
||||
'throw'=45
|
||||
'throws'=46
|
||||
'transient'=47
|
||||
'try'=48
|
||||
'void'=49
|
||||
'volatile'=50
|
||||
'while'=51
|
||||
'null'=57
|
||||
'('=58
|
||||
')'=59
|
||||
'{'=60
|
||||
'}'=61
|
||||
'['=62
|
||||
']'=63
|
||||
';'=64
|
||||
','=65
|
||||
'.'=66
|
||||
'='=67
|
||||
'>'=68
|
||||
'<'=69
|
||||
'!'=70
|
||||
'~'=71
|
||||
'?'=72
|
||||
':'=73
|
||||
'=='=74
|
||||
'<='=75
|
||||
'>='=76
|
||||
'!='=77
|
||||
'&&'=78
|
||||
'||'=79
|
||||
'++'=80
|
||||
'--'=81
|
||||
'+'=82
|
||||
'-'=83
|
||||
'*'=84
|
||||
'/'=85
|
||||
'&'=86
|
||||
'|'=87
|
||||
'^'=88
|
||||
'%'=89
|
||||
'->'=90
|
||||
'::'=91
|
||||
'+='=92
|
||||
'-='=93
|
||||
'*='=94
|
||||
'/='=95
|
||||
'&='=96
|
||||
'|='=97
|
||||
'^='=98
|
||||
'%='=99
|
||||
'<<='=100
|
||||
'>>='=101
|
||||
'>>>='=102
|
||||
'@'=104
|
||||
'...'=105
|
2390
src/main/java/de/dhbwstuttgart/parser/antlr/Java8Listener.java
Normal file
18764
src/main/java/de/dhbwstuttgart/parser/antlr/Java8Parser.java
Normal file
@ -1,13 +1,13 @@
|
||||
package de.dhbwstuttgart.parser.scope;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.net.URL;
|
||||
import java.net.URLClassLoader;
|
||||
import java.util.*;
|
||||
|
||||
import de.dhbwstuttgart.parser.antlr.Java8BaseListener;
|
||||
import de.dhbwstuttgart.syntaxtree.AbstractASTWalker;
|
||||
import org.antlr.v4.runtime.tree.AbstractParseTreeVisitor;
|
||||
import org.antlr.v4.runtime.tree.ParseTreeWalker;
|
||||
import org.antlr.v4.runtime.tree.TerminalNode;
|
||||
|
||||
import de.dhbwstuttgart.environment.PackageCrawler;
|
||||
@ -15,7 +15,7 @@ import de.dhbwstuttgart.parser.antlr.Java8Parser;
|
||||
|
||||
public class GatherNames {
|
||||
|
||||
public static Map<String, Integer> getNames(Java8Parser.CompilationUnitContext ctx, PackageCrawler packages) throws ClassNotFoundException{
|
||||
public static Map<String, Integer> getNames(Java8Parser.CompilationUnitContext ctx, PackageCrawler packages, ClassLoader classLoader) throws ClassNotFoundException{
|
||||
Map<String, Integer> ret = new HashMap<>();
|
||||
String pkgName = getPackageName(ctx);
|
||||
String nameString = "";
|
||||
@ -64,14 +64,12 @@ public class GatherNames {
|
||||
}
|
||||
}
|
||||
}
|
||||
ret.putAll(getImports(ctx, packages));
|
||||
return ret;
|
||||
ret.putAll(getImports(ctx, packages, classLoader));
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
public static Map<String, Integer> getImports(Java8Parser.CompilationUnitContext ctx, PackageCrawler packages) throws ClassNotFoundException {
|
||||
public static Map<String, Integer> getImports(Java8Parser.CompilationUnitContext ctx, PackageCrawler packages, ClassLoader classLoader) throws ClassNotFoundException {
|
||||
Map<String, Integer> ret = new HashMap<>();
|
||||
ClassLoader classLoader = ClassLoader.getSystemClassLoader();
|
||||
//ret.putAll(packages.getClassNames("java.lang"));
|
||||
for(Java8Parser.ImportDeclarationContext importDeclCtx : ctx.importDeclaration()){
|
||||
if(importDeclCtx.singleTypeImportDeclaration() != null){
|
||||
|
@ -84,7 +84,15 @@ public class JavaClassName {
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return (packageName!=null ? packageName.toString() : "") + name;
|
||||
return (packageName!=null ? packageName.toString() + "." : "") + name;
|
||||
}
|
||||
|
||||
public String getPackageName() {
|
||||
return (packageName!=null ? packageName.toString() : "");
|
||||
}
|
||||
|
||||
public String getClassName(){
|
||||
return name;
|
||||
}
|
||||
}
|
||||
|
||||
@ -130,6 +138,9 @@ class PackageName{
|
||||
String ret = "";
|
||||
if(names == null)return "";
|
||||
for(String n : names)ret+=n+".";
|
||||
if (ret != null && ret.length() > 0 && ret.charAt(ret.length() - 1) == '.') {
|
||||
ret = ret.substring(0, ret.length() - 1);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
@ -1,8 +0,0 @@
|
||||
package de.dhbwstuttgart.sat.CNF;
|
||||
|
||||
public class CNF {
|
||||
/*
|
||||
Baut die CNF Datei.
|
||||
Hier muss man überlegen, in welchem Form die Constraints gebaut werden
|
||||
*/
|
||||
}
|
@ -1,12 +0,0 @@
|
||||
package de.dhbwstuttgart.sat.CNF;
|
||||
|
||||
import java.io.*;
|
||||
|
||||
/**
|
||||
* Schreibt CNFs in eine Datei im DIMACS CNF Format
|
||||
*/
|
||||
public class Writer {
|
||||
public Writer(FileWriter output){
|
||||
|
||||
}
|
||||
}
|
@ -1,40 +0,0 @@
|
||||
package de.dhbwstuttgart.sat.asp;
|
||||
|
||||
import de.dhbwstuttgart.parser.scope.JavaClassName;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
public class ASPStringConverter {
|
||||
private static final Map<String, String> replacements = new HashMap<>();
|
||||
static{
|
||||
replacements.put(".", "_DOT_");
|
||||
replacements.put("$", "_DOLLAR_");
|
||||
}
|
||||
|
||||
public static String toConstant(JavaClassName name){
|
||||
return toConstant(name.toString());
|
||||
}
|
||||
|
||||
public static String toConstant(String name){
|
||||
return "c" + replace(name);
|
||||
}
|
||||
|
||||
public static String fromConstant(String s){
|
||||
return unReplace(s).substring(1);
|
||||
}
|
||||
|
||||
private static String replace(String input){
|
||||
for(String toReplace : replacements.keySet()){
|
||||
input = input.replace(toReplace, replacements.get(toReplace));
|
||||
}
|
||||
return input;
|
||||
}
|
||||
|
||||
private static String unReplace(String input){
|
||||
for(String toReplace : replacements.keySet()){
|
||||
input = input.replace(replacements.get(toReplace), toReplace);
|
||||
}
|
||||
return input;
|
||||
}
|
||||
}
|
@ -1,52 +0,0 @@
|
||||
package de.dhbwstuttgart.sat.asp;
|
||||
|
||||
|
||||
import org.apache.commons.io.IOUtils;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
public class Clingo {
|
||||
private final List<File> input;
|
||||
private static final List<File> programFiles = new ArrayList<>();
|
||||
static{
|
||||
programFiles.add(new File("/home/janulrich/Sync/HiwiJob/ResearchPapers/MasterarbeitStadelmeier/asp/unifyWithoutWildcards/basis.lp"));
|
||||
programFiles.add(new File("/home/janulrich/Sync/HiwiJob/ResearchPapers/MasterarbeitStadelmeier/asp/unifyWithoutWildcards/finiteclosure.lp"));
|
||||
programFiles.add(new File("/home/janulrich/Sync/HiwiJob/ResearchPapers/MasterarbeitStadelmeier/asp/unifyWithoutWildcards/subst.lp"));
|
||||
programFiles.add(new File("/home/janulrich/Sync/HiwiJob/ResearchPapers/MasterarbeitStadelmeier/asp/unifyWithoutWildcards/reduce.lp"));
|
||||
programFiles.add(new File("/home/janulrich/Sync/HiwiJob/ResearchPapers/MasterarbeitStadelmeier/asp/unifyWithoutWildcards/unify.lp"));
|
||||
programFiles.add(new File("/home/janulrich/Sync/HiwiJob/ResearchPapers/MasterarbeitStadelmeier/asp/unifyWithoutWildcards/adapt.lp"));
|
||||
}
|
||||
|
||||
public Clingo(List<File> inputFiles){
|
||||
this.input = inputFiles;
|
||||
}
|
||||
|
||||
/*
|
||||
TODO: Clingo per Java Wrapper https://stackoverflow.com/questions/3356200/using-java-to-wrap-over-c
|
||||
*/
|
||||
public String runClingo() throws IOException, InterruptedException {
|
||||
String pathToClingo =
|
||||
"/home/janulrich/Sync/HiwiJob/ResearchPapers/MasterarbeitStadelmeier/asp/clingo-5.2.1-linux-x86_64/clingo";
|
||||
List<String> commands = new ArrayList<>();
|
||||
commands.add(pathToClingo);
|
||||
//commands.add("--outf=2"); //use JSON-Output
|
||||
commands.add("--outf=1"); //use JSON-Output
|
||||
for(File file : input){
|
||||
commands.add(file.getPath());
|
||||
}
|
||||
commands.addAll(programFiles.stream().map(f->f.getPath()).collect(Collectors.toList()));
|
||||
|
||||
Process clingo = new ProcessBuilder( commands.toArray(new String[0])).start();
|
||||
InputStream output = clingo.getInputStream();
|
||||
clingo.waitFor();
|
||||
String result = IOUtils.toString(output, StandardCharsets.UTF_8);
|
||||
return result;
|
||||
}
|
||||
}
|
@ -1,26 +0,0 @@
|
||||
package de.dhbwstuttgart.sat.asp.model;
|
||||
|
||||
public enum ASPGencayRule {
|
||||
ASP_PAIR_EQUALS_NAME("equals"),
|
||||
ASP_PAIR_SMALLER_NAME("sub"),
|
||||
ASP_PAIR_SMALLER_DOT_NAME("subEq"),
|
||||
ASP_PARAMLIST_NAME("paramEq"),
|
||||
ASP_FC_PARAMLIST_NAME("param"),
|
||||
ASP_PARAMLIST_END_POINTER("null"),
|
||||
ASP_TYPE("typeEq"),
|
||||
ASP_FCTYPE("type"),
|
||||
ASP_TYPE_VAR("var"),
|
||||
ASP_GENERIC_VAR("pph"),
|
||||
ASP_PARAMLIST_ORDER("paramOrder");
|
||||
|
||||
private final String text;
|
||||
|
||||
private ASPGencayRule(final String text) {
|
||||
this.text = text;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return text;
|
||||
}
|
||||
}
|
@ -1,23 +0,0 @@
|
||||
package de.dhbwstuttgart.sat.asp.model;
|
||||
|
||||
public enum ASPRule {
|
||||
ASP_PAIR_EQUALS_NAME("equals"),
|
||||
ASP_PAIR_SMALLER_NAME("smaller"),
|
||||
ASP_PAIR_SMALLER_DOT_NAME("smallerDot"),
|
||||
ASP_PARAMLIST_NAME("param"),
|
||||
ASP_PARAMLIST_END_POINTER("null"),
|
||||
ASP_TYPE("type"),
|
||||
ASP_FCTYPE("typeFC"),
|
||||
ASP_TYPE_VAR("typeVar");
|
||||
|
||||
private final String text;
|
||||
|
||||
private ASPRule(final String text) {
|
||||
this.text = text;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return text;
|
||||
}
|
||||
}
|