Merge branch 'bigRefactoring' into simplifyRes

# Conflicts:
#	src/main/java/de/dhbwstuttgart/bytecode/utilities/SimplifyResult.java
#	src/main/java/de/dhbwstuttgart/core/JavaTXCompiler.java
This commit is contained in:
Michael Uhl 2019-07-29 16:21:25 +02:00
commit 5b75250fcf
44 changed files with 21746 additions and 21629 deletions

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@

View File

@ -1,29 +1,29 @@
/* Javadoc style sheet */ /* Javadoc style sheet */
/* Define colors, fonts and other style attributes here to override the defaults */ /* Define colors, fonts and other style attributes here to override the defaults */
/* Page background color */ /* Page background color */
body { background-color: #FFFFFF } body { background-color: #FFFFFF }
/* Table colors */ /* Table colors */
.TableHeadingColor { background: #CCCCFF } /* Dark mauve */ .TableHeadingColor { background: #CCCCFF } /* Dark mauve */
.TableSubHeadingColor { background: #EEEEFF } /* Light mauve */ .TableSubHeadingColor { background: #EEEEFF } /* Light mauve */
.TableRowColor { background: #FFFFFF } /* White */ .TableRowColor { background: #FFFFFF } /* White */
/* Font used in left-hand frame lists */ /* Font used in left-hand frame lists */
.FrameTitleFont { font-size: 10pts; font-family: Helvetica, Arial, san-serif } .FrameTitleFont { font-size: 10pts; font-family: Helvetica, Arial, san-serif }
.FrameHeadingFont { 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 } .FrameItemFont { font-size: 10pts; font-family: Helvetica, Arial, san-serif }
/* Example of smaller, sans-serif font in frames */ /* Example of smaller, sans-serif font in frames */
/* .FrameItemFont { font-size: 10pt; font-family: Helvetica, Arial, sans-serif } */ /* .FrameItemFont { font-size: 10pt; font-family: Helvetica, Arial, sans-serif } */
/* Navigation bar fonts and colors */ /* Navigation bar fonts and colors */
.NavBarCell1 { background-color:#EEEEFF;}/* Light mauve */ .NavBarCell1 { background-color:#EEEEFF;}/* Light mauve */
.NavBarCell1Rev { background-color:#00008B;}/* Dark Blue */ .NavBarCell1Rev { background-color:#00008B;}/* Dark Blue */
.NavBarFont1 { font-family: Arial, Helvetica, sans-serif; color:#000000;} .NavBarFont1 { font-family: Arial, Helvetica, sans-serif; color:#000000;}
.NavBarFont1Rev { font-family: Arial, Helvetica, sans-serif; color:#FFFFFF;} .NavBarFont1Rev { font-family: Arial, Helvetica, sans-serif; color:#FFFFFF;}
.NavBarCell2 { font-family: Arial, Helvetica, sans-serif; background-color:#FFFFFF;} .NavBarCell2 { font-family: Arial, Helvetica, sans-serif; background-color:#FFFFFF;}
.NavBarCell3 { font-family: Arial, Helvetica, sans-serif; background-color:#FFFFFF;} .NavBarCell3 { font-family: Arial, Helvetica, sans-serif; background-color:#FFFFFF;}

View File

@ -1,220 +1,220 @@
<?xml version="1.0" encoding="UTF-8"?> <?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"> <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: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"/>
<children xsi:type="editmodel:CompartmentEditModel" size="348,18"> <children xsi:type="editmodel:CompartmentEditModel" size="348,18">
<children xsi:type="editmodel:MethodEditModel" id="kirschmshsCompiler860"/> <children xsi:type="editmodel:MethodEditModel" id="kirschmshsCompiler860"/>
</children> </children>
<children xsi:type="editmodel:CompartmentEditModel"/> <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"> <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="185,0" anchorKind="FixedAtEdge" attachSource="true"/>
<children xsi:type="editmodel:AssociationEndEditModel" location="201,67" anchorKind="FixedAtEdge"/> <children xsi:type="editmodel:AssociationEndEditModel" location="201,67" anchorKind="FixedAtEdge"/>
</sourceConnections> </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"/> <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>
<children xsi:type="editmodel:ClassEditModel" location="914,555" size="403,85" id="kirschmshsCompiler873" runTimeClassModel="kirschmshsCompiler881;kirschmshsCompiler874"> <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"/>
<children xsi:type="editmodel:CompartmentEditModel" size="380,36"> <children xsi:type="editmodel:CompartmentEditModel" size="380,36">
<children xsi:type="editmodel:MethodEditModel" id="kirschmshsCompiler874"/> <children xsi:type="editmodel:MethodEditModel" id="kirschmshsCompiler874"/>
<children xsi:type="editmodel:MethodEditModel" id="kirschmshsCompiler881"/> <children xsi:type="editmodel:MethodEditModel" id="kirschmshsCompiler881"/>
</children> </children>
<children xsi:type="editmodel:CompartmentEditModel"/> <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"> <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" location="201,0" anchorKind="FixedAtEdge" attachSource="true"/>
<children xsi:type="editmodel:AssociationEndEditModel"/> <children xsi:type="editmodel:AssociationEndEditModel"/>
</sourceConnections> </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"/> <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>
<children xsi:type="editmodel:ClassEditModel" location="484,554" size="403,85" id="kirschmshsCompiler985" runTimeClassModel="kirschmshsCompiler993;kirschmshsCompiler986"> <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"/>
<children xsi:type="editmodel:CompartmentEditModel" size="380,36"> <children xsi:type="editmodel:CompartmentEditModel" size="380,36">
<children xsi:type="editmodel:MethodEditModel" id="kirschmshsCompiler986"/> <children xsi:type="editmodel:MethodEditModel" id="kirschmshsCompiler986"/>
<children xsi:type="editmodel:MethodEditModel" id="kirschmshsCompiler993"/> <children xsi:type="editmodel:MethodEditModel" id="kirschmshsCompiler993"/>
</children> </children>
<children xsi:type="editmodel:CompartmentEditModel"/> <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"> <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" location="201,0" anchorKind="FixedAtEdge" attachSource="true"/>
<children xsi:type="editmodel:AssociationEndEditModel"/> <children xsi:type="editmodel:AssociationEndEditModel"/>
</sourceConnections> </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"/> <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>
<children xsi:type="editmodel:ClassEditModel" location="1345,559" size="403,85" id="kirschmshsCompiler1012" runTimeClassModel="kirschmshsCompiler1013;kirschmshsCompiler1020"> <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"/>
<children xsi:type="editmodel:CompartmentEditModel" size="380,36"> <children xsi:type="editmodel:CompartmentEditModel" size="380,36">
<children xsi:type="editmodel:MethodEditModel" id="kirschmshsCompiler1013"/> <children xsi:type="editmodel:MethodEditModel" id="kirschmshsCompiler1013"/>
<children xsi:type="editmodel:MethodEditModel" id="kirschmshsCompiler1020"/> <children xsi:type="editmodel:MethodEditModel" id="kirschmshsCompiler1020"/>
</children> </children>
<children xsi:type="editmodel:CompartmentEditModel"/> <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"> <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" location="201,0" anchorKind="FixedAtEdge" attachSource="true"/>
<children xsi:type="editmodel:AssociationEndEditModel"/> <children xsi:type="editmodel:AssociationEndEditModel"/>
</sourceConnections> </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"/> <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>
<children xsi:type="editmodel:ClassEditModel" location="3194,502" size="403,67" id="kirschmshsCompiler670" runTimeClassModel="kirschmshsCompiler671"> <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"/>
<children xsi:type="editmodel:CompartmentEditModel" size="380,18"> <children xsi:type="editmodel:CompartmentEditModel" size="380,18">
<children xsi:type="editmodel:MethodEditModel" id="kirschmshsCompiler671"/> <children xsi:type="editmodel:MethodEditModel" id="kirschmshsCompiler671"/>
</children> </children>
<children xsi:type="editmodel:CompartmentEditModel"/> <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"> <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" location="201,0" anchorKind="FixedAtEdge" attachSource="true"/>
<children xsi:type="editmodel:AssociationEndEditModel"/> <children xsi:type="editmodel:AssociationEndEditModel"/>
</sourceConnections> </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"/> <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>
<children xsi:type="editmodel:ClassEditModel" location="1365,425" size="76,29" id="kirschmshsCompiler765" runTimeClassModel=""> <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"/> <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"> <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" location="38,0" anchorKind="FixedAtEdge" attachSource="true"/>
<children xsi:type="editmodel:AssociationEndEditModel"/> <children xsi:type="editmodel:AssociationEndEditModel"/>
</sourceConnections> </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"/> <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>
<children xsi:type="editmodel:ClassEditModel" location="963,417" size="86,29" id="kirschmshsCompiler783" runTimeClassModel=""> <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"/> <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"> <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="43,0" anchorKind="FixedAtEdge" attachSource="true"/>
<children xsi:type="editmodel:AssociationEndEditModel" location="272,139" anchorKind="FixedAtEdge"/> <children xsi:type="editmodel:AssociationEndEditModel" location="272,139" anchorKind="FixedAtEdge"/>
</sourceConnections> </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"/> <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>
<children xsi:type="editmodel:ClassEditModel" location="2069,372" size="403,67" id="kirschmshsCompiler841" runTimeClassModel="kirschmshsCompiler842"> <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"/>
<children xsi:type="editmodel:CompartmentEditModel" size="380,18"> <children xsi:type="editmodel:CompartmentEditModel" size="380,18">
<children xsi:type="editmodel:MethodEditModel" id="kirschmshsCompiler842"/> <children xsi:type="editmodel:MethodEditModel" id="kirschmshsCompiler842"/>
</children> </children>
<children xsi:type="editmodel:CompartmentEditModel"/> <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"> <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" location="201,0" anchorKind="FixedAtEdge" attachSource="true"/>
<children xsi:type="editmodel:AssociationEndEditModel"/> <children xsi:type="editmodel:AssociationEndEditModel"/>
</sourceConnections> </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"/> <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>
<children xsi:type="editmodel:ClassEditModel" location="2227,562" size="403,85" id="kirschmshsCompiler904" runTimeClassModel="kirschmshsCompiler905;kirschmshsCompiler912"> <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"/>
<children xsi:type="editmodel:CompartmentEditModel" size="380,36"> <children xsi:type="editmodel:CompartmentEditModel" size="380,36">
<children xsi:type="editmodel:MethodEditModel" id="kirschmshsCompiler905"/> <children xsi:type="editmodel:MethodEditModel" id="kirschmshsCompiler905"/>
<children xsi:type="editmodel:MethodEditModel" id="kirschmshsCompiler912"/> <children xsi:type="editmodel:MethodEditModel" id="kirschmshsCompiler912"/>
</children> </children>
<children xsi:type="editmodel:CompartmentEditModel"/> <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"> <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" location="201,0" anchorKind="FixedAtEdge" attachSource="true"/>
<children xsi:type="editmodel:AssociationEndEditModel"/> <children xsi:type="editmodel:AssociationEndEditModel"/>
</sourceConnections> </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"/> <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>
<children xsi:type="editmodel:ClassEditModel" location="2965,229" size="403,67" targetConnections="//@children.13/@sourceConnections.0" id="kirschmshsCompiler653" runTimeClassModel="kirschmshsCompiler654"> <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"/>
<children xsi:type="editmodel:CompartmentEditModel" size="380,18"> <children xsi:type="editmodel:CompartmentEditModel" size="380,18">
<children xsi:type="editmodel:MethodEditModel" id="kirschmshsCompiler654"/> <children xsi:type="editmodel:MethodEditModel" id="kirschmshsCompiler654"/>
</children> </children>
<children xsi:type="editmodel:CompartmentEditModel"/> <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"> <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" location="201,0" anchorKind="FixedAtEdge" attachSource="true"/>
<children xsi:type="editmodel:AssociationEndEditModel"/> <children xsi:type="editmodel:AssociationEndEditModel"/>
</sourceConnections> </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"/> <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>
<children xsi:type="editmodel:ClassEditModel" location="2502,372" size="403,67" id="kirschmshsCompiler822" runTimeClassModel="kirschmshsCompiler823"> <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"/>
<children xsi:type="editmodel:CompartmentEditModel" size="380,18"> <children xsi:type="editmodel:CompartmentEditModel" size="380,18">
<children xsi:type="editmodel:MethodEditModel" id="kirschmshsCompiler823"/> <children xsi:type="editmodel:MethodEditModel" id="kirschmshsCompiler823"/>
</children> </children>
<children xsi:type="editmodel:CompartmentEditModel"/> <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"> <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" location="201,0" anchorKind="FixedAtEdge" attachSource="true"/>
<children xsi:type="editmodel:AssociationEndEditModel"/> <children xsi:type="editmodel:AssociationEndEditModel"/>
</sourceConnections> </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"/> <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>
<children xsi:type="editmodel:ClassEditModel" location="45,553" size="403,85" id="kirschmshsCompiler931" runTimeClassModel="kirschmshsCompiler939;kirschmshsCompiler932"> <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"/>
<children xsi:type="editmodel:CompartmentEditModel" size="380,36"> <children xsi:type="editmodel:CompartmentEditModel" size="380,36">
<children xsi:type="editmodel:MethodEditModel" id="kirschmshsCompiler932"/> <children xsi:type="editmodel:MethodEditModel" id="kirschmshsCompiler932"/>
<children xsi:type="editmodel:MethodEditModel" id="kirschmshsCompiler939"/> <children xsi:type="editmodel:MethodEditModel" id="kirschmshsCompiler939"/>
</children> </children>
<children xsi:type="editmodel:CompartmentEditModel"/> <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"> <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="201,0" anchorKind="FixedAtEdge" attachSource="true"/>
<children xsi:type="editmodel:AssociationEndEditModel" location="185,67" anchorKind="FixedAtEdge"/> <children xsi:type="editmodel:AssociationEndEditModel" location="185,67" anchorKind="FixedAtEdge"/>
</sourceConnections> </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"/> <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>
<children xsi:type="editmodel:ClassEditModel" location="1636,372" size="403,67" id="kirschmshsCompiler803" runTimeClassModel="kirschmshsCompiler804"> <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"/>
<children xsi:type="editmodel:CompartmentEditModel" size="380,18"> <children xsi:type="editmodel:CompartmentEditModel" size="380,18">
<children xsi:type="editmodel:MethodEditModel" id="kirschmshsCompiler804"/> <children xsi:type="editmodel:MethodEditModel" id="kirschmshsCompiler804"/>
</children> </children>
<children xsi:type="editmodel:CompartmentEditModel"/> <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"> <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="201,0" anchorKind="FixedAtEdge" attachSource="true"/>
<children xsi:type="editmodel:AssociationEndEditModel" location="42,29" anchorKind="FixedAtEdge"/> <children xsi:type="editmodel:AssociationEndEditModel" location="42,29" anchorKind="FixedAtEdge"/>
</sourceConnections> </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"/> <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>
<children xsi:type="editmodel:ClassEditModel" location="2715,508" size="403,67" id="kirschmshsCompiler692" runTimeClassModel="kirschmshsCompiler693"> <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"/>
<children xsi:type="editmodel:CompartmentEditModel" size="380,18"> <children xsi:type="editmodel:CompartmentEditModel" size="380,18">
<children xsi:type="editmodel:MethodEditModel" id="kirschmshsCompiler693"/> <children xsi:type="editmodel:MethodEditModel" id="kirschmshsCompiler693"/>
</children> </children>
<children xsi:type="editmodel:CompartmentEditModel"/> <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"> <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,0" anchorKind="FixedAtEdge" attachSource="true"/>
<children xsi:type="editmodel:AssociationEndEditModel" location="201,67" anchorKind="FixedAtEdge"/> <children xsi:type="editmodel:AssociationEndEditModel" location="201,67" anchorKind="FixedAtEdge"/>
</sourceConnections> </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"/> <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>
<children xsi:type="editmodel:ClassEditModel" location="2223,234" size="84,29" targetConnections="//@children.12/@sourceConnections.0" id="kirschmshsCompiler801" runTimeClassModel=""> <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"/> <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"> <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" location="42,0" anchorKind="FixedAtEdge" attachSource="true"/>
<children xsi:type="editmodel:AssociationEndEditModel"/> <children xsi:type="editmodel:AssociationEndEditModel"/>
</sourceConnections> </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"/> <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>
<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: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"/>
<children xsi:type="editmodel:CompartmentEditModel" size="522,90"> <children xsi:type="editmodel:CompartmentEditModel" size="522,90">
<children xsi:type="editmodel:MethodEditModel" id="kirschmshsCompiler712"/> <children xsi:type="editmodel:MethodEditModel" id="kirschmshsCompiler712"/>
<children xsi:type="editmodel:MethodEditModel" id="kirschmshsCompiler719"/> <children xsi:type="editmodel:MethodEditModel" id="kirschmshsCompiler719"/>
<children xsi:type="editmodel:MethodEditModel" id="kirschmshsCompiler729"/> <children xsi:type="editmodel:MethodEditModel" id="kirschmshsCompiler729"/>
<children xsi:type="editmodel:MethodEditModel" id="kirschmshsCompiler747"/> <children xsi:type="editmodel:MethodEditModel" id="kirschmshsCompiler747"/>
<children xsi:type="editmodel:MethodEditModel" id="kirschmshsCompiler737"/> <children xsi:type="editmodel:MethodEditModel" id="kirschmshsCompiler737"/>
</children> </children>
<children xsi:type="editmodel:CompartmentEditModel"/> <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"> <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" location="272,0" anchorKind="FixedAtEdge" attachSource="true"/>
<children xsi:type="editmodel:AssociationEndEditModel"/> <children xsi:type="editmodel:AssociationEndEditModel"/>
</sourceConnections> </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"/> <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>
<children xsi:type="editmodel:ClassEditModel" location="1023,50" size="403,67" targetConnections="//@children.0/@sourceConnections.0" id="kirschmshsCompiler635" runTimeClassModel="kirschmshsCompiler636"> <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"/>
<children xsi:type="editmodel:CompartmentEditModel" size="380,18"> <children xsi:type="editmodel:CompartmentEditModel" size="380,18">
<children xsi:type="editmodel:MethodEditModel" id="kirschmshsCompiler636"/> <children xsi:type="editmodel:MethodEditModel" id="kirschmshsCompiler636"/>
</children> </children>
<children xsi:type="editmodel:CompartmentEditModel"/> <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"/> <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>
<children xsi:type="editmodel:ClassEditModel" location="1791,561" size="403,85" id="kirschmshsCompiler958" runTimeClassModel="kirschmshsCompiler959;kirschmshsCompiler966"> <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"/>
<children xsi:type="editmodel:CompartmentEditModel" size="380,36"> <children xsi:type="editmodel:CompartmentEditModel" size="380,36">
<children xsi:type="editmodel:MethodEditModel" id="kirschmshsCompiler959"/> <children xsi:type="editmodel:MethodEditModel" id="kirschmshsCompiler959"/>
<children xsi:type="editmodel:MethodEditModel" id="kirschmshsCompiler966"/> <children xsi:type="editmodel:MethodEditModel" id="kirschmshsCompiler966"/>
</children> </children>
<children xsi:type="editmodel:CompartmentEditModel"/> <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"> <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" location="201,0" anchorKind="FixedAtEdge" attachSource="true"/>
<children xsi:type="editmodel:AssociationEndEditModel"/> <children xsi:type="editmodel:AssociationEndEditModel"/>
</sourceConnections> </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"/> <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>
<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"/> <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> </editmodel:ClassDiagramEditModel>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

Before

Width:  |  Height:  |  Size: 669 KiB

After

Width:  |  Height:  |  Size: 663 KiB

View File

@ -1,458 +1,458 @@
<?xml version="1.0" encoding="UTF-8"?> <?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'> <!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:&apos;sansserif&apos;; font-style:normal; stroke-linejoin:miter; font-size:12; stroke-dashoffset:0; image-rendering:auto;" xmlns="http://www.w3.org/2000/svg"> <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:&apos;sansserif&apos;; 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--> <!--Generated by the Batik Graphics2D SVG Generator-->
<defs id="genericDefs" /> <defs id="genericDefs" />
<g> <g>
<g style="fill:white; font-family:&apos;Arial&apos;; font-weight:bold; stroke:white;"> <g style="fill:white; font-family:&apos;Arial&apos;; font-weight:bold; stroke:white;">
<rect x="-45" y="-50" width="3602" style="stroke:none;" height="652" /> <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="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="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="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="368" style="stroke:none;" height="64" />
<rect x="403" y="128" width="367" style="fill:none; stroke:black;" height="63" /> <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="154" style="fill:none; stroke:black;" y2="154" />
<line x1="403" x2="770" y1="164" style="fill:none; stroke:black;" y2="164" /> <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" /> <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 <image x="413" y="169" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAiklEQVR42rVRgQ2A
IAwDwiF+4k7hE/WTnbJP3CdYoyEoqJjoQsiAdrSbjTGap7CTjcMOcy3ofu6xtxIQ IAwDwiF+4k7hE/WTnbJP3CdYoyEoqJjoQsiAdrSbjTGap7CTjcMOcy3ofu6xtxIQ
wpLyJkIerkUPBUqqfAmikXYlo+R66gSgA3XpiMKn3OZtPaEDcfm/vzHAElSNiP7W wpLyJkIerkUPBUqqfAmikXYlo+R66gSgA3XpiMKn3OZtPaEDcfm/vzHAElSNiP7W
JZR/IKAtzArcttabo56KBzzDeHXGl6ZL0ItJf0BYALD3PkMWvNRAAAAAAElFTkSu JZR/IKAtzArcttabo56KBzzDeHXGl6ZL0ItJf0BYALD3PkMWvNRAAAAAAElFTkSu
QmCC" style="fill:black; stroke:black; font-weight:normal;" height="16" preserveAspectRatio="none" /> 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> <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 <image x="557" y="133" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAABBElEQVR42q1SYZnD
IAylWwVUQiTgYJFQCZmDOVjOwSREwiREQqdgSMBBFwajcLu7/bl8+fpR8l7egzCs IAylWwVUQiTgYJFQCZmDOVjOwSREwiREQqdgSMBBFwajcLu7/bl8+fpR8l7egzCs
6+peISqi6pogREIavob1XGC7WkOmhIbQZkYf7gf7dgRDF9BPobLJjtnJpgPAWH5Z 6+peISqi6pogREIavob1XGC7WkOmhIbQZkYf7gf7dgRDF9BPobLJjtnJpgPAWH5Z
6Z28Z+aTXHLvjNagdKUQHSNnP3IViHC8HW1nbNkI9GycDGgwHWr95GPs3J9h7b+t 6Z28Z+aTXHLvjNagdKUQHSNnP3IViHC8HW1nbNkI9GycDGgwHWr95GPs3J9h7b+t
PxDa4+Z1Z8lsICAjmqtsDwVTIUCqspRDOxeXJbophmip5E/kCcHbLdlOIiyR5tmD PxDa4+Z1Z8lsICAjmqtsDwVTIUCqspRDOxeXJbophmip5E/kCcHbLdlOIiyR5tmD
Lwo2nTpgDaF0rWHtIWG6wSU5KzylO6i6amabw+vZzMWbpU3FcprMyYW4bTL2T42q Lwo2nTpgDaF0rWHtIWG6wSU5KzylO6i6amabw+vZzMWbpU3FcprMyYW4bTL2T42q
9G/x4Vr/gfAAzgaEraDyPpwAAAAASUVORK5CYII=" style="fill:black; stroke:black;" height="16" preserveAspectRatio="none" /> 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> <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="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="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="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="400" style="stroke:none;" height="82" />
<rect x="869" y="505" width="399" style="fill:none; stroke:black;" height="81" /> <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="531" style="fill:none; stroke:black;" y2="531" />
<line x1="869" x2="1268" y1="541" style="fill:none; stroke:black;" y2="541" /> <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" /> <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/ <image x="879" y="546" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAYUlEQVR42mP8//8/
AymAiYFEMAg1sGAKOTQ4wNkHGg4Q0ABUneCggOAmOBxYcACnk9BUg0QcFIBCgyeU AymAiYFEMAg1sGAKOTQ4wNkHGg4Q0ABUneCggOAmOBxYcACnk9BUg0QcFIBCgyeU
HjwgpAEYJgsWPACqgyCQyIEHaJ5GDyWgNLIv0VRjjwdMRfQNJQCIvyUFPaAxvQAA HjwgpAEYJgsWPACqgyCQyIEHaJ5GDyWgNLIv0VRjjwdMRfQNJQCIvyUFPaAxvQAA
AABJRU5ErkJggg==" style="fill:black; stroke:black; font-weight:normal;" height="16" preserveAspectRatio="none" /> 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> <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" /> <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/ <image x="879" y="564" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAYUlEQVR42mP8//8/
AymAiYFEMAg1sGAKOTQ4wNkHGg4Q0ABUneCggOAmOBxYcACnk9BUg0QcFIBCgyeU AymAiYFEMAg1sGAKOTQ4wNkHGg4Q0ABUneCggOAmOBxYcACnk9BUg0QcFIBCgyeU
HjwgpAEYJgsWPACqgyCQyIEHaJ5GDyWgNLIv0VRjjwdMRfQNJQCIvyUFPaAxvQAA HjwgpAEYJgsWPACqgyCQyIEHaJ5GDyWgNLIv0VRjjwdMRfQNJQCIvyUFPaAxvQAA
AABJRU5ErkJggg==" style="fill:black; stroke:black; font-weight:normal;" height="16" preserveAspectRatio="none" /> 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> <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 <image x="1032" y="510" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAA7ElEQVR42q2SXXUE
IQyF09kVMBIiAQmRMBIioRIioRKQEgkjAQk4mF42wMzu6UN7ujl5APL3ceHjOA4a IQyF09kVMBIiAQmRMBIioRIioRKQEgkjAQk4mF42wMzu6UN7ujl5APL3ceHjOA4a
lj1nd7qYiqjo9eQ+V2KPAJdrGPVwtzxPljMbqc/ZvZ5L7zUngOScw2zSt+bqpUza lj1nd7qYiqjo9eQ+V2KPAJdrGPVwtzxPljMbqc/ZvZ5L7zUngOScw2zSt+bqpUza
YFtibvSObC8uWczzrER03u1+nS+sj8Yt5iVLPifTGLXQH+1/BcBoSCKBhzsPHibm YFtibvSObC8uWczzrER03u1+nS+sj8Yt5iVLPifTGLXQH+1/BcBoSCKBhzsPHibm
WN7MjKjue6W1lgp3TZ+aVDhBJZy0rL3qtiVO/dLQa4oAHSHRE0RrT/O9O1J7SwQK WN7MjKjue6W1lgp3TZ+aVDhBJZy0rL3qtiVO/dLQa4oAHSHRE0RrT/O9O1J7SwQK
v6b6iA4LpPg2W2eDQ0P4uoLkS+3nvxRsL1/t3bL+xr4BXAV0uUgPznkAAAAASUVO v6b6iA4LpPg2W2eDQ0P4uoLkS+3nvxRsL1/t3bL+xr4BXAV0uUgPznkAAAAASUVO
RK5CYII=" style="fill:black; stroke:black;" height="16" preserveAspectRatio="none" /> 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> <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="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="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="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="400" style="stroke:none;" height="82" />
<rect x="439" y="504" width="399" style="fill:none; stroke:black;" height="81" /> <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="530" style="fill:none; stroke:black;" y2="530" />
<line x1="439" x2="838" y1="540" style="fill:none; stroke:black;" y2="540" /> <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" /> <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/ <image x="449" y="545" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAYUlEQVR42mP8//8/
AymAiYFEMAg1sGAKOTQ4wNkHGg4Q0ABUneCggOAmOBxYcACnk9BUg0QcFIBCgyeU AymAiYFEMAg1sGAKOTQ4wNkHGg4Q0ABUneCggOAmOBxYcACnk9BUg0QcFIBCgyeU
HjwgpAEYJgsWPACqgyCQyIEHaJ5GDyWgNLIv0VRjjwdMRfQNJQCIvyUFPaAxvQAA HjwgpAEYJgsWPACqgyCQyIEHaJ5GDyWgNLIv0VRjjwdMRfQNJQCIvyUFPaAxvQAA
AABJRU5ErkJggg==" style="fill:black; stroke:black; font-weight:normal;" height="16" preserveAspectRatio="none" /> 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> <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" /> <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/ <image x="449" y="563" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAYUlEQVR42mP8//8/
AymAiYFEMAg1sGAKOTQ4wNkHGg4Q0ABUneCggOAmOBxYcACnk9BUg0QcFIBCgyeU AymAiYFEMAg1sGAKOTQ4wNkHGg4Q0ABUneCggOAmOBxYcACnk9BUg0QcFIBCgyeU
HjwgpAEYJgsWPACqgyCQyIEHaJ5GDyWgNLIv0VRjjwdMRfQNJQCIvyUFPaAxvQAA HjwgpAEYJgsWPACqgyCQyIEHaJ5GDyWgNLIv0VRjjwdMRfQNJQCIvyUFPaAxvQAA
AABJRU5ErkJggg==" style="fill:black; stroke:black; font-weight:normal;" height="16" preserveAspectRatio="none" /> 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> <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 <image x="606" y="509" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAA7ElEQVR42q2SXXUE
IQyF09kVMBIiAQmRMBIioRIioRKQEgkjAQk4mF42wMzu6UN7ujl5APL3ceHjOA4a IQyF09kVMBIiAQmRMBIioRIioRKQEgkjAQk4mF42wMzu6UN7ujl5APL3ceHjOA4a
lj1nd7qYiqjo9eQ+V2KPAJdrGPVwtzxPljMbqc/ZvZ5L7zUngOScw2zSt+bqpUza lj1nd7qYiqjo9eQ+V2KPAJdrGPVwtzxPljMbqc/ZvZ5L7zUngOScw2zSt+bqpUza
YFtibvSObC8uWczzrER03u1+nS+sj8Yt5iVLPifTGLXQH+1/BcBoSCKBhzsPHibm YFtibvSObC8uWczzrER03u1+nS+sj8Yt5iVLPifTGLXQH+1/BcBoSCKBhzsPHibm
WN7MjKjue6W1lgp3TZ+aVDhBJZy0rL3qtiVO/dLQa4oAHSHRE0RrT/O9O1J7SwQK WN7MjKjue6W1lgp3TZ+aVDhBJZy0rL3qtiVO/dLQa4oAHSHRE0RrT/O9O1J7SwQK
v6b6iA4LpPg2W2eDQ0P4uoLkS+3nvxRsL1/t3bL+xr4BXAV0uUgPznkAAAAASUVO v6b6iA4LpPg2W2eDQ0P4uoLkS+3nvxRsL1/t3bL+xr4BXAV0uUgPznkAAAAASUVO
RK5CYII=" style="fill:black; stroke:black;" height="16" preserveAspectRatio="none" /> 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> <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="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="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="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="400" style="stroke:none;" height="82" />
<rect x="1300" y="509" width="399" style="fill:none; stroke:black;" height="81" /> <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="535" style="fill:none; stroke:black;" y2="535" />
<line x1="1300" x2="1699" y1="545" style="fill:none; stroke:black;" y2="545" /> <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" /> <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/ <image x="1310" y="550" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAYUlEQVR42mP8//8/
AymAiYFEMAg1sGAKOTQ4wNkHGg4Q0ABUneCggOAmOBxYcACnk9BUg0QcFIBCgyeU AymAiYFEMAg1sGAKOTQ4wNkHGg4Q0ABUneCggOAmOBxYcACnk9BUg0QcFIBCgyeU
HjwgpAEYJgsWPACqgyCQyIEHaJ5GDyWgNLIv0VRjjwdMRfQNJQCIvyUFPaAxvQAA HjwgpAEYJgsWPACqgyCQyIEHaJ5GDyWgNLIv0VRjjwdMRfQNJQCIvyUFPaAxvQAA
AABJRU5ErkJggg==" style="fill:black; stroke:black; font-weight:normal;" height="16" preserveAspectRatio="none" /> 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> <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" /> <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/ <image x="1310" y="568" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAYUlEQVR42mP8//8/
AymAiYFEMAg1sGAKOTQ4wNkHGg4Q0ABUneCggOAmOBxYcACnk9BUg0QcFIBCgyeU AymAiYFEMAg1sGAKOTQ4wNkHGg4Q0ABUneCggOAmOBxYcACnk9BUg0QcFIBCgyeU
HjwgpAEYJgsWPACqgyCQyIEHaJ5GDyWgNLIv0VRjjwdMRfQNJQCIvyUFPaAxvQAA HjwgpAEYJgsWPACqgyCQyIEHaJ5GDyWgNLIv0VRjjwdMRfQNJQCIvyUFPaAxvQAA
AABJRU5ErkJggg==" style="fill:black; stroke:black; font-weight:normal;" height="16" preserveAspectRatio="none" /> 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> <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 <image x="1452" y="514" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAA7ElEQVR42q2SXXUE
IQyF09kVMBIiAQmRMBIioRIioRKQEgkjAQk4mF42wMzu6UN7ujl5APL3ceHjOA4a IQyF09kVMBIiAQmRMBIioRIioRKQEgkjAQk4mF42wMzu6UN7ujl5APL3ceHjOA4a
lj1nd7qYiqjo9eQ+V2KPAJdrGPVwtzxPljMbqc/ZvZ5L7zUngOScw2zSt+bqpUza lj1nd7qYiqjo9eQ+V2KPAJdrGPVwtzxPljMbqc/ZvZ5L7zUngOScw2zSt+bqpUza
YFtibvSObC8uWczzrER03u1+nS+sj8Yt5iVLPifTGLXQH+1/BcBoSCKBhzsPHibm YFtibvSObC8uWczzrER03u1+nS+sj8Yt5iVLPifTGLXQH+1/BcBoSCKBhzsPHibm
WN7MjKjue6W1lgp3TZ+aVDhBJZy0rL3qtiVO/dLQa4oAHSHRE0RrT/O9O1J7SwQK WN7MjKjue6W1lgp3TZ+aVDhBJZy0rL3qtiVO/dLQa4oAHSHRE0RrT/O9O1J7SwQK
v6b6iA4LpPg2W2eDQ0P4uoLkS+3nvxRsL1/t3bL+xr4BXAV0uUgPznkAAAAASUVO v6b6iA4LpPg2W2eDQ0P4uoLkS+3nvxRsL1/t3bL+xr4BXAV0uUgPznkAAAAASUVO
RK5CYII=" style="fill:black; stroke:black;" height="16" preserveAspectRatio="none" /> 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> <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="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="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="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="400" style="stroke:none;" height="64" />
<rect x="3149" y="452" width="399" style="fill:none; stroke:black;" height="63" /> <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="478" style="fill:none; stroke:black;" y2="478" />
<line x1="3149" x2="3548" y1="488" style="fill:none; stroke:black;" y2="488" /> <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" /> <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/ <image x="3159" y="493" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAYUlEQVR42mP8//8/
AymAiYFEMAg1sGAKOTQ4wNkHGg4Q0ABUneCggOAmOBxYcACnk9BUg0QcFIBCgyeU AymAiYFEMAg1sGAKOTQ4wNkHGg4Q0ABUneCggOAmOBxYcACnk9BUg0QcFIBCgyeU
HjwgpAEYJgsWPACqgyCQyIEHaJ5GDyWgNLIv0VRjjwdMRfQNJQCIvyUFPaAxvQAA HjwgpAEYJgsWPACqgyCQyIEHaJ5GDyWgNLIv0VRjjwdMRfQNJQCIvyUFPaAxvQAA
AABJRU5ErkJggg==" style="fill:black; stroke:black; font-weight:normal;" height="16" preserveAspectRatio="none" /> 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> <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 <image x="3311" y="457" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAA7ElEQVR42q2SXXUE
IQyF09kVMBIiAQmRMBIioRIioRKQEgkjAQk4mF42wMzu6UN7ujl5APL3ceHjOA4a IQyF09kVMBIiAQmRMBIioRIioRKQEgkjAQk4mF42wMzu6UN7ujl5APL3ceHjOA4a
lj1nd7qYiqjo9eQ+V2KPAJdrGPVwtzxPljMbqc/ZvZ5L7zUngOScw2zSt+bqpUza lj1nd7qYiqjo9eQ+V2KPAJdrGPVwtzxPljMbqc/ZvZ5L7zUngOScw2zSt+bqpUza
YFtibvSObC8uWczzrER03u1+nS+sj8Yt5iVLPifTGLXQH+1/BcBoSCKBhzsPHibm YFtibvSObC8uWczzrER03u1+nS+sj8Yt5iVLPifTGLXQH+1/BcBoSCKBhzsPHibm
WN7MjKjue6W1lgp3TZ+aVDhBJZy0rL3qtiVO/dLQa4oAHSHRE0RrT/O9O1J7SwQK WN7MjKjue6W1lgp3TZ+aVDhBJZy0rL3qtiVO/dLQa4oAHSHRE0RrT/O9O1J7SwQK
v6b6iA4LpPg2W2eDQ0P4uoLkS+3nvxRsL1/t3bL+xr4BXAV0uUgPznkAAAAASUVO v6b6iA4LpPg2W2eDQ0P4uoLkS+3nvxRsL1/t3bL+xr4BXAV0uUgPznkAAAAASUVO
RK5CYII=" style="fill:black; stroke:black;" height="16" preserveAspectRatio="none" /> 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> <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="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="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="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="73" style="stroke:none;" height="26" />
<rect x="1320" y="375" width="72" style="fill:none; stroke:black;" height="25" /> <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 <image x="1330" y="380" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAA7ElEQVR42q2SXXUE
IQyF09kVMBIiAQmRMBIioRIioRKQEgkjAQk4mF42wMzu6UN7ujl5APL3ceHjOA4a IQyF09kVMBIiAQmRMBIioRIioRKQEgkjAQk4mF42wMzu6UN7ujl5APL3ceHjOA4a
lj1nd7qYiqjo9eQ+V2KPAJdrGPVwtzxPljMbqc/ZvZ5L7zUngOScw2zSt+bqpUza lj1nd7qYiqjo9eQ+V2KPAJdrGPVwtzxPljMbqc/ZvZ5L7zUngOScw2zSt+bqpUza
YFtibvSObC8uWczzrER03u1+nS+sj8Yt5iVLPifTGLXQH+1/BcBoSCKBhzsPHibm YFtibvSObC8uWczzrER03u1+nS+sj8Yt5iVLPifTGLXQH+1/BcBoSCKBhzsPHibm
WN7MjKjue6W1lgp3TZ+aVDhBJZy0rL3qtiVO/dLQa4oAHSHRE0RrT/O9O1J7SwQK WN7MjKjue6W1lgp3TZ+aVDhBJZy0rL3qtiVO/dLQa4oAHSHRE0RrT/O9O1J7SwQK
v6b6iA4LpPg2W2eDQ0P4uoLkS+3nvxRsL1/t3bL+xr4BXAV0uUgPznkAAAAASUVO v6b6iA4LpPg2W2eDQ0P4uoLkS+3nvxRsL1/t3bL+xr4BXAV0uUgPznkAAAAASUVO
RK5CYII=" style="fill:black; stroke:black;" height="16" preserveAspectRatio="none" /> 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> <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="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="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="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="83" style="stroke:none;" height="26" />
<rect x="918" y="367" width="82" style="fill:none; stroke:black;" height="25" /> <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 <image x="928" y="372" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAA7ElEQVR42q2SXXUE
IQyF09kVMBIiAQmRMBIioRIioRKQEgkjAQk4mF42wMzu6UN7ujl5APL3ceHjOA4a IQyF09kVMBIiAQmRMBIioRIioRKQEgkjAQk4mF42wMzu6UN7ujl5APL3ceHjOA4a
lj1nd7qYiqjo9eQ+V2KPAJdrGPVwtzxPljMbqc/ZvZ5L7zUngOScw2zSt+bqpUza lj1nd7qYiqjo9eQ+V2KPAJdrGPVwtzxPljMbqc/ZvZ5L7zUngOScw2zSt+bqpUza
YFtibvSObC8uWczzrER03u1+nS+sj8Yt5iVLPifTGLXQH+1/BcBoSCKBhzsPHibm YFtibvSObC8uWczzrER03u1+nS+sj8Yt5iVLPifTGLXQH+1/BcBoSCKBhzsPHibm
WN7MjKjue6W1lgp3TZ+aVDhBJZy0rL3qtiVO/dLQa4oAHSHRE0RrT/O9O1J7SwQK WN7MjKjue6W1lgp3TZ+aVDhBJZy0rL3qtiVO/dLQa4oAHSHRE0RrT/O9O1J7SwQK
v6b6iA4LpPg2W2eDQ0P4uoLkS+3nvxRsL1/t3bL+xr4BXAV0uUgPznkAAAAASUVO v6b6iA4LpPg2W2eDQ0P4uoLkS+3nvxRsL1/t3bL+xr4BXAV0uUgPznkAAAAASUVO
RK5CYII=" style="fill:black; stroke:black;" height="16" preserveAspectRatio="none" /> 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> <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="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="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="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="400" style="stroke:none;" height="64" />
<rect x="2024" y="322" width="399" style="fill:none; stroke:black;" height="63" /> <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="348" style="fill:none; stroke:black;" y2="348" />
<line x1="2024" x2="2423" y1="358" style="fill:none; stroke:black;" y2="358" /> <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" /> <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/ <image x="2034" y="363" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAYUlEQVR42mP8//8/
AymAiYFEMAg1sGAKOTQ4wNkHGg4Q0ABUneCggOAmOBxYcACnk9BUg0QcFIBCgyeU AymAiYFEMAg1sGAKOTQ4wNkHGg4Q0ABUneCggOAmOBxYcACnk9BUg0QcFIBCgyeU
HjwgpAEYJgsWPACqgyCQyIEHaJ5GDyWgNLIv0VRjjwdMRfQNJQCIvyUFPaAxvQAA HjwgpAEYJgsWPACqgyCQyIEHaJ5GDyWgNLIv0VRjjwdMRfQNJQCIvyUFPaAxvQAA
AABJRU5ErkJggg==" style="fill:black; stroke:black; font-weight:normal;" height="16" preserveAspectRatio="none" /> 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> <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 <image x="2186" y="327" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAA7ElEQVR42q2SXXUE
IQyF09kVMBIiAQmRMBIioRIioRKQEgkjAQk4mF42wMzu6UN7ujl5APL3ceHjOA4a IQyF09kVMBIiAQmRMBIioRIioRKQEgkjAQk4mF42wMzu6UN7ujl5APL3ceHjOA4a
lj1nd7qYiqjo9eQ+V2KPAJdrGPVwtzxPljMbqc/ZvZ5L7zUngOScw2zSt+bqpUza lj1nd7qYiqjo9eQ+V2KPAJdrGPVwtzxPljMbqc/ZvZ5L7zUngOScw2zSt+bqpUza
YFtibvSObC8uWczzrER03u1+nS+sj8Yt5iVLPifTGLXQH+1/BcBoSCKBhzsPHibm YFtibvSObC8uWczzrER03u1+nS+sj8Yt5iVLPifTGLXQH+1/BcBoSCKBhzsPHibm
WN7MjKjue6W1lgp3TZ+aVDhBJZy0rL3qtiVO/dLQa4oAHSHRE0RrT/O9O1J7SwQK WN7MjKjue6W1lgp3TZ+aVDhBJZy0rL3qtiVO/dLQa4oAHSHRE0RrT/O9O1J7SwQK
v6b6iA4LpPg2W2eDQ0P4uoLkS+3nvxRsL1/t3bL+xr4BXAV0uUgPznkAAAAASUVO v6b6iA4LpPg2W2eDQ0P4uoLkS+3nvxRsL1/t3bL+xr4BXAV0uUgPznkAAAAASUVO
RK5CYII=" style="fill:black; stroke:black;" height="16" preserveAspectRatio="none" /> 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> <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="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="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="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="400" style="stroke:none;" height="82" />
<rect x="2182" y="512" width="399" style="fill:none; stroke:black;" height="81" /> <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="538" style="fill:none; stroke:black;" y2="538" />
<line x1="2182" x2="2581" y1="548" style="fill:none; stroke:black;" y2="548" /> <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" /> <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/ <image x="2192" y="553" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAYUlEQVR42mP8//8/
AymAiYFEMAg1sGAKOTQ4wNkHGg4Q0ABUneCggOAmOBxYcACnk9BUg0QcFIBCgyeU AymAiYFEMAg1sGAKOTQ4wNkHGg4Q0ABUneCggOAmOBxYcACnk9BUg0QcFIBCgyeU
HjwgpAEYJgsWPACqgyCQyIEHaJ5GDyWgNLIv0VRjjwdMRfQNJQCIvyUFPaAxvQAA HjwgpAEYJgsWPACqgyCQyIEHaJ5GDyWgNLIv0VRjjwdMRfQNJQCIvyUFPaAxvQAA
AABJRU5ErkJggg==" style="fill:black; stroke:black; font-weight:normal;" height="16" preserveAspectRatio="none" /> 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> <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" /> <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/ <image x="2192" y="571" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAYUlEQVR42mP8//8/
AymAiYFEMAg1sGAKOTQ4wNkHGg4Q0ABUneCggOAmOBxYcACnk9BUg0QcFIBCgyeU AymAiYFEMAg1sGAKOTQ4wNkHGg4Q0ABUneCggOAmOBxYcACnk9BUg0QcFIBCgyeU
HjwgpAEYJgsWPACqgyCQyIEHaJ5GDyWgNLIv0VRjjwdMRfQNJQCIvyUFPaAxvQAA HjwgpAEYJgsWPACqgyCQyIEHaJ5GDyWgNLIv0VRjjwdMRfQNJQCIvyUFPaAxvQAA
AABJRU5ErkJggg==" style="fill:black; stroke:black; font-weight:normal;" height="16" preserveAspectRatio="none" /> 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> <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 <image x="2327" y="517" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAA7ElEQVR42q2SXXUE
IQyF09kVMBIiAQmRMBIioRIioRKQEgkjAQk4mF42wMzu6UN7ujl5APL3ceHjOA4a IQyF09kVMBIiAQmRMBIioRIioRKQEgkjAQk4mF42wMzu6UN7ujl5APL3ceHjOA4a
lj1nd7qYiqjo9eQ+V2KPAJdrGPVwtzxPljMbqc/ZvZ5L7zUngOScw2zSt+bqpUza lj1nd7qYiqjo9eQ+V2KPAJdrGPVwtzxPljMbqc/ZvZ5L7zUngOScw2zSt+bqpUza
YFtibvSObC8uWczzrER03u1+nS+sj8Yt5iVLPifTGLXQH+1/BcBoSCKBhzsPHibm YFtibvSObC8uWczzrER03u1+nS+sj8Yt5iVLPifTGLXQH+1/BcBoSCKBhzsPHibm
WN7MjKjue6W1lgp3TZ+aVDhBJZy0rL3qtiVO/dLQa4oAHSHRE0RrT/O9O1J7SwQK WN7MjKjue6W1lgp3TZ+aVDhBJZy0rL3qtiVO/dLQa4oAHSHRE0RrT/O9O1J7SwQK
v6b6iA4LpPg2W2eDQ0P4uoLkS+3nvxRsL1/t3bL+xr4BXAV0uUgPznkAAAAASUVO v6b6iA4LpPg2W2eDQ0P4uoLkS+3nvxRsL1/t3bL+xr4BXAV0uUgPznkAAAAASUVO
RK5CYII=" style="fill:black; stroke:black;" height="16" preserveAspectRatio="none" /> 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> <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="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="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="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="400" style="stroke:none;" height="64" />
<rect x="2920" y="179" width="399" style="fill:none; stroke:black;" height="63" /> <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="205" style="fill:none; stroke:black;" y2="205" />
<line x1="2920" x2="3319" y1="215" style="fill:none; stroke:black;" y2="215" /> <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" /> <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 <image x="2930" y="220" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAiklEQVR42rVRgQ2A
IAwDwiF+4k7hE/WTnbJP3CdYoyEoqJjoQsiAdrSbjTGap7CTjcMOcy3ofu6xtxIQ IAwDwiF+4k7hE/WTnbJP3CdYoyEoqJjoQsiAdrSbjTGap7CTjcMOcy3ofu6xtxIQ
wpLyJkIerkUPBUqqfAmikXYlo+R66gSgA3XpiMKn3OZtPaEDcfm/vzHAElSNiP7W wpLyJkIerkUPBUqqfAmikXYlo+R66gSgA3XpiMKn3OZtPaEDcfm/vzHAElSNiP7W
JZR/IKAtzArcttabo56KBzzDeHXGl6ZL0ItJf0BYALD3PkMWvNRAAAAAAElFTkSu JZR/IKAtzArcttabo56KBzzDeHXGl6ZL0ItJf0BYALD3PkMWvNRAAAAAAElFTkSu
QmCC" style="fill:black; stroke:black; font-weight:normal;" height="16" preserveAspectRatio="none" /> 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> <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 <image x="3088" y="184" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAABBElEQVR42q1SYZnD
IAylWwVUQiTgYJFQCZmDOVjOwSREwiREQqdgSMBBFwajcLu7/bl8+fpR8l7egzCs IAylWwVUQiTgYJFQCZmDOVjOwSREwiREQqdgSMBBFwajcLu7/bl8+fpR8l7egzCs
6+peISqi6pogREIavob1XGC7WkOmhIbQZkYf7gf7dgRDF9BPobLJjtnJpgPAWH5Z 6+peISqi6pogREIavob1XGC7WkOmhIbQZkYf7gf7dgRDF9BPobLJjtnJpgPAWH5Z
6Z28Z+aTXHLvjNagdKUQHSNnP3IViHC8HW1nbNkI9GycDGgwHWr95GPs3J9h7b+t 6Z28Z+aTXHLvjNagdKUQHSNnP3IViHC8HW1nbNkI9GycDGgwHWr95GPs3J9h7b+t
PxDa4+Z1Z8lsICAjmqtsDwVTIUCqspRDOxeXJbophmip5E/kCcHbLdlOIiyR5tmD PxDa4+Z1Z8lsICAjmqtsDwVTIUCqspRDOxeXJbophmip5E/kCcHbLdlOIiyR5tmD
Lwo2nTpgDaF0rWHtIWG6wSU5KzylO6i6amabw+vZzMWbpU3FcprMyYW4bTL2T42q Lwo2nTpgDaF0rWHtIWG6wSU5KzylO6i6amabw+vZzMWbpU3FcprMyYW4bTL2T42q
9G/x4Vr/gfAAzgaEraDyPpwAAAAASUVORK5CYII=" style="fill:black; stroke:black;" height="16" preserveAspectRatio="none" /> 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> <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="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="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="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="400" style="stroke:none;" height="64" />
<rect x="2457" y="322" width="399" style="fill:none; stroke:black;" height="63" /> <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="348" style="fill:none; stroke:black;" y2="348" />
<line x1="2457" x2="2856" y1="358" style="fill:none; stroke:black;" y2="358" /> <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" /> <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/ <image x="2467" y="363" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAYUlEQVR42mP8//8/
AymAiYFEMAg1sGAKOTQ4wNkHGg4Q0ABUneCggOAmOBxYcACnk9BUg0QcFIBCgyeU AymAiYFEMAg1sGAKOTQ4wNkHGg4Q0ABUneCggOAmOBxYcACnk9BUg0QcFIBCgyeU
HjwgpAEYJgsWPACqgyCQyIEHaJ5GDyWgNLIv0VRjjwdMRfQNJQCIvyUFPaAxvQAA HjwgpAEYJgsWPACqgyCQyIEHaJ5GDyWgNLIv0VRjjwdMRfQNJQCIvyUFPaAxvQAA
AABJRU5ErkJggg==" style="fill:black; stroke:black; font-weight:normal;" height="16" preserveAspectRatio="none" /> 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> <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 <image x="2614" y="327" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAA7ElEQVR42q2SXXUE
IQyF09kVMBIiAQmRMBIioRIioRKQEgkjAQk4mF42wMzu6UN7ujl5APL3ceHjOA4a IQyF09kVMBIiAQmRMBIioRIioRKQEgkjAQk4mF42wMzu6UN7ujl5APL3ceHjOA4a
lj1nd7qYiqjo9eQ+V2KPAJdrGPVwtzxPljMbqc/ZvZ5L7zUngOScw2zSt+bqpUza lj1nd7qYiqjo9eQ+V2KPAJdrGPVwtzxPljMbqc/ZvZ5L7zUngOScw2zSt+bqpUza
YFtibvSObC8uWczzrER03u1+nS+sj8Yt5iVLPifTGLXQH+1/BcBoSCKBhzsPHibm YFtibvSObC8uWczzrER03u1+nS+sj8Yt5iVLPifTGLXQH+1/BcBoSCKBhzsPHibm
WN7MjKjue6W1lgp3TZ+aVDhBJZy0rL3qtiVO/dLQa4oAHSHRE0RrT/O9O1J7SwQK WN7MjKjue6W1lgp3TZ+aVDhBJZy0rL3qtiVO/dLQa4oAHSHRE0RrT/O9O1J7SwQK
v6b6iA4LpPg2W2eDQ0P4uoLkS+3nvxRsL1/t3bL+xr4BXAV0uUgPznkAAAAASUVO v6b6iA4LpPg2W2eDQ0P4uoLkS+3nvxRsL1/t3bL+xr4BXAV0uUgPznkAAAAASUVO
RK5CYII=" style="fill:black; stroke:black;" height="16" preserveAspectRatio="none" /> 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> <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="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="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="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="400" style="stroke:none;" height="82" />
<rect x="0" y="503" width="399" style="fill:none; stroke:black;" height="81" /> <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="529" style="fill:none; stroke:black;" y2="529" />
<line x1="0" x2="399" y1="539" style="fill:none; stroke:black;" y2="539" /> <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" /> <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/ <image x="10" y="544" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAYUlEQVR42mP8//8/
AymAiYFEMAg1sGAKOTQ4wNkHGg4Q0ABUneCggOAmOBxYcACnk9BUg0QcFIBCgyeU AymAiYFEMAg1sGAKOTQ4wNkHGg4Q0ABUneCggOAmOBxYcACnk9BUg0QcFIBCgyeU
HjwgpAEYJgsWPACqgyCQyIEHaJ5GDyWgNLIv0VRjjwdMRfQNJQCIvyUFPaAxvQAA HjwgpAEYJgsWPACqgyCQyIEHaJ5GDyWgNLIv0VRjjwdMRfQNJQCIvyUFPaAxvQAA
AABJRU5ErkJggg==" style="fill:black; stroke:black; font-weight:normal;" height="16" preserveAspectRatio="none" /> 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> <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" /> <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/ <image x="10" y="562" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAYUlEQVR42mP8//8/
AymAiYFEMAg1sGAKOTQ4wNkHGg4Q0ABUneCggOAmOBxYcACnk9BUg0QcFIBCgyeU AymAiYFEMAg1sGAKOTQ4wNkHGg4Q0ABUneCggOAmOBxYcACnk9BUg0QcFIBCgyeU
HjwgpAEYJgsWPACqgyCQyIEHaJ5GDyWgNLIv0VRjjwdMRfQNJQCIvyUFPaAxvQAA HjwgpAEYJgsWPACqgyCQyIEHaJ5GDyWgNLIv0VRjjwdMRfQNJQCIvyUFPaAxvQAA
AABJRU5ErkJggg==" style="fill:black; stroke:black; font-weight:normal;" height="16" preserveAspectRatio="none" /> 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> <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 <image x="157" y="508" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAA7ElEQVR42q2SXXUE
IQyF09kVMBIiAQmRMBIioRIioRKQEgkjAQk4mF42wMzu6UN7ujl5APL3ceHjOA4a IQyF09kVMBIiAQmRMBIioRIioRKQEgkjAQk4mF42wMzu6UN7ujl5APL3ceHjOA4a
lj1nd7qYiqjo9eQ+V2KPAJdrGPVwtzxPljMbqc/ZvZ5L7zUngOScw2zSt+bqpUza lj1nd7qYiqjo9eQ+V2KPAJdrGPVwtzxPljMbqc/ZvZ5L7zUngOScw2zSt+bqpUza
YFtibvSObC8uWczzrER03u1+nS+sj8Yt5iVLPifTGLXQH+1/BcBoSCKBhzsPHibm YFtibvSObC8uWczzrER03u1+nS+sj8Yt5iVLPifTGLXQH+1/BcBoSCKBhzsPHibm
WN7MjKjue6W1lgp3TZ+aVDhBJZy0rL3qtiVO/dLQa4oAHSHRE0RrT/O9O1J7SwQK WN7MjKjue6W1lgp3TZ+aVDhBJZy0rL3qtiVO/dLQa4oAHSHRE0RrT/O9O1J7SwQK
v6b6iA4LpPg2W2eDQ0P4uoLkS+3nvxRsL1/t3bL+xr4BXAV0uUgPznkAAAAASUVO v6b6iA4LpPg2W2eDQ0P4uoLkS+3nvxRsL1/t3bL+xr4BXAV0uUgPznkAAAAASUVO
RK5CYII=" style="fill:black; stroke:black;" height="16" preserveAspectRatio="none" /> 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> <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="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="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="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="400" style="stroke:none;" height="64" />
<rect x="1591" y="322" width="399" style="fill:none; stroke:black;" height="63" /> <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="348" style="fill:none; stroke:black;" y2="348" />
<line x1="1591" x2="1990" y1="358" style="fill:none; stroke:black;" y2="358" /> <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" /> <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/ <image x="1601" y="363" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAYUlEQVR42mP8//8/
AymAiYFEMAg1sGAKOTQ4wNkHGg4Q0ABUneCggOAmOBxYcACnk9BUg0QcFIBCgyeU AymAiYFEMAg1sGAKOTQ4wNkHGg4Q0ABUneCggOAmOBxYcACnk9BUg0QcFIBCgyeU
HjwgpAEYJgsWPACqgyCQyIEHaJ5GDyWgNLIv0VRjjwdMRfQNJQCIvyUFPaAxvQAA HjwgpAEYJgsWPACqgyCQyIEHaJ5GDyWgNLIv0VRjjwdMRfQNJQCIvyUFPaAxvQAA
AABJRU5ErkJggg==" style="fill:black; stroke:black; font-weight:normal;" height="16" preserveAspectRatio="none" /> 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> <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 <image x="1752" y="327" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAA7ElEQVR42q2SXXUE
IQyF09kVMBIiAQmRMBIioRIioRKQEgkjAQk4mF42wMzu6UN7ujl5APL3ceHjOA4a IQyF09kVMBIiAQmRMBIioRIioRKQEgkjAQk4mF42wMzu6UN7ujl5APL3ceHjOA4a
lj1nd7qYiqjo9eQ+V2KPAJdrGPVwtzxPljMbqc/ZvZ5L7zUngOScw2zSt+bqpUza lj1nd7qYiqjo9eQ+V2KPAJdrGPVwtzxPljMbqc/ZvZ5L7zUngOScw2zSt+bqpUza
YFtibvSObC8uWczzrER03u1+nS+sj8Yt5iVLPifTGLXQH+1/BcBoSCKBhzsPHibm YFtibvSObC8uWczzrER03u1+nS+sj8Yt5iVLPifTGLXQH+1/BcBoSCKBhzsPHibm
WN7MjKjue6W1lgp3TZ+aVDhBJZy0rL3qtiVO/dLQa4oAHSHRE0RrT/O9O1J7SwQK WN7MjKjue6W1lgp3TZ+aVDhBJZy0rL3qtiVO/dLQa4oAHSHRE0RrT/O9O1J7SwQK
v6b6iA4LpPg2W2eDQ0P4uoLkS+3nvxRsL1/t3bL+xr4BXAV0uUgPznkAAAAASUVO v6b6iA4LpPg2W2eDQ0P4uoLkS+3nvxRsL1/t3bL+xr4BXAV0uUgPznkAAAAASUVO
RK5CYII=" style="fill:black; stroke:black;" height="16" preserveAspectRatio="none" /> 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> <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="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="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="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="400" style="stroke:none;" height="64" />
<rect x="2670" y="458" width="399" style="fill:none; stroke:black;" height="63" /> <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="484" style="fill:none; stroke:black;" y2="484" />
<line x1="2670" x2="3069" y1="494" style="fill:none; stroke:black;" y2="494" /> <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" /> <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/ <image x="2680" y="499" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAYUlEQVR42mP8//8/
AymAiYFEMAg1sGAKOTQ4wNkHGg4Q0ABUneCggOAmOBxYcACnk9BUg0QcFIBCgyeU AymAiYFEMAg1sGAKOTQ4wNkHGg4Q0ABUneCggOAmOBxYcACnk9BUg0QcFIBCgyeU
HjwgpAEYJgsWPACqgyCQyIEHaJ5GDyWgNLIv0VRjjwdMRfQNJQCIvyUFPaAxvQAA HjwgpAEYJgsWPACqgyCQyIEHaJ5GDyWgNLIv0VRjjwdMRfQNJQCIvyUFPaAxvQAA
AABJRU5ErkJggg==" style="fill:black; stroke:black; font-weight:normal;" height="16" preserveAspectRatio="none" /> 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> <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 <image x="2837" y="463" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAA7ElEQVR42q2SXXUE
IQyF09kVMBIiAQmRMBIioRIioRKQEgkjAQk4mF42wMzu6UN7ujl5APL3ceHjOA4a IQyF09kVMBIiAQmRMBIioRIioRKQEgkjAQk4mF42wMzu6UN7ujl5APL3ceHjOA4a
lj1nd7qYiqjo9eQ+V2KPAJdrGPVwtzxPljMbqc/ZvZ5L7zUngOScw2zSt+bqpUza lj1nd7qYiqjo9eQ+V2KPAJdrGPVwtzxPljMbqc/ZvZ5L7zUngOScw2zSt+bqpUza
YFtibvSObC8uWczzrER03u1+nS+sj8Yt5iVLPifTGLXQH+1/BcBoSCKBhzsPHibm YFtibvSObC8uWczzrER03u1+nS+sj8Yt5iVLPifTGLXQH+1/BcBoSCKBhzsPHibm
WN7MjKjue6W1lgp3TZ+aVDhBJZy0rL3qtiVO/dLQa4oAHSHRE0RrT/O9O1J7SwQK WN7MjKjue6W1lgp3TZ+aVDhBJZy0rL3qtiVO/dLQa4oAHSHRE0RrT/O9O1J7SwQK
v6b6iA4LpPg2W2eDQ0P4uoLkS+3nvxRsL1/t3bL+xr4BXAV0uUgPznkAAAAASUVO v6b6iA4LpPg2W2eDQ0P4uoLkS+3nvxRsL1/t3bL+xr4BXAV0uUgPznkAAAAASUVO
RK5CYII=" style="fill:black; stroke:black;" height="16" preserveAspectRatio="none" /> 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> <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="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="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="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="81" style="stroke:none;" height="26" />
<rect x="2178" y="184" width="80" style="fill:none; stroke:black;" height="25" /> <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 <image x="2188" y="189" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAABBElEQVR42q1SYZnD
IAylWwVUQiTgYJFQCZmDOVjOwSREwiREQqdgSMBBFwajcLu7/bl8+fpR8l7egzCs IAylWwVUQiTgYJFQCZmDOVjOwSREwiREQqdgSMBBFwajcLu7/bl8+fpR8l7egzCs
6+peISqi6pogREIavob1XGC7WkOmhIbQZkYf7gf7dgRDF9BPobLJjtnJpgPAWH5Z 6+peISqi6pogREIavob1XGC7WkOmhIbQZkYf7gf7dgRDF9BPobLJjtnJpgPAWH5Z
6Z28Z+aTXHLvjNagdKUQHSNnP3IViHC8HW1nbNkI9GycDGgwHWr95GPs3J9h7b+t 6Z28Z+aTXHLvjNagdKUQHSNnP3IViHC8HW1nbNkI9GycDGgwHWr95GPs3J9h7b+t
PxDa4+Z1Z8lsICAjmqtsDwVTIUCqspRDOxeXJbophmip5E/kCcHbLdlOIiyR5tmD PxDa4+Z1Z8lsICAjmqtsDwVTIUCqspRDOxeXJbophmip5E/kCcHbLdlOIiyR5tmD
Lwo2nTpgDaF0rWHtIWG6wSU5KzylO6i6amabw+vZzMWbpU3FcprMyYW4bTL2T42q Lwo2nTpgDaF0rWHtIWG6wSU5KzylO6i6amabw+vZzMWbpU3FcprMyYW4bTL2T42q
9G/x4Vr/gfAAzgaEraDyPpwAAAAASUVORK5CYII=" style="fill:black; stroke:black;" height="16" preserveAspectRatio="none" /> 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> <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="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="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="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="542" style="stroke:none;" height="136" />
<rect x="895" y="141" width="541" style="fill:none; stroke:black;" height="135" /> <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="167" style="fill:none; stroke:black;" y2="167" />
<line x1="895" x2="1436" y1="177" style="fill:none; stroke:black;" y2="177" /> <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" /> <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/ <image x="905" y="182" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAYUlEQVR42mP8//8/
AymAiYFEMAg1sGAKOTQ4wNkHGg4Q0ABUneCggOAmOBxYcACnk9BUg0QcFIBCgyeU AymAiYFEMAg1sGAKOTQ4wNkHGg4Q0ABUneCggOAmOBxYcACnk9BUg0QcFIBCgyeU
HjwgpAEYJgsWPACqgyCQyIEHaJ5GDyWgNLIv0VRjjwdMRfQNJQCIvyUFPaAxvQAA HjwgpAEYJgsWPACqgyCQyIEHaJ5GDyWgNLIv0VRjjwdMRfQNJQCIvyUFPaAxvQAA
AABJRU5ErkJggg==" style="fill:black; stroke:black; font-weight:normal;" height="16" preserveAspectRatio="none" /> 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> <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" /> <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/ <image x="905" y="200" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAYUlEQVR42mP8//8/
AymAiYFEMAg1sGAKOTQ4wNkHGg4Q0ABUneCggOAmOBxYcACnk9BUg0QcFIBCgyeU AymAiYFEMAg1sGAKOTQ4wNkHGg4Q0ABUneCggOAmOBxYcACnk9BUg0QcFIBCgyeU
HjwgpAEYJgsWPACqgyCQyIEHaJ5GDyWgNLIv0VRjjwdMRfQNJQCIvyUFPaAxvQAA HjwgpAEYJgsWPACqgyCQyIEHaJ5GDyWgNLIv0VRjjwdMRfQNJQCIvyUFPaAxvQAA
AABJRU5ErkJggg==" style="fill:black; stroke:black; font-weight:normal;" height="16" preserveAspectRatio="none" /> 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> <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" /> <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/ <image x="905" y="218" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAYUlEQVR42mP8//8/
AymAiYFEMAg1sGAKOTQ4wNkHGg4Q0ABUneCggOAmOBxYcACnk9BUg0QcFIBCgyeU AymAiYFEMAg1sGAKOTQ4wNkHGg4Q0ABUneCggOAmOBxYcACnk9BUg0QcFIBCgyeU
HjwgpAEYJgsWPACqgyCQyIEHaJ5GDyWgNLIv0VRjjwdMRfQNJQCIvyUFPaAxvQAA HjwgpAEYJgsWPACqgyCQyIEHaJ5GDyWgNLIv0VRjjwdMRfQNJQCIvyUFPaAxvQAA
AABJRU5ErkJggg==" style="fill:black; stroke:black; font-weight:normal;" height="16" preserveAspectRatio="none" /> 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> <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" /> <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 <image x="905" y="236" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAjUlEQVR42rWR2w2A
IAxFrXEQN5FNZJPiJozSUdikXiEhRNDGD5sSoJybPiBVnd6N6Mg7Y6nOk2WgWRVe IAxFrXEQN5FNZJPiJozSUdikXiEhRNDGD5sSoJybPiBVnd6N6Mg7Y6nOk2WgWRVe
ZLagGudaFptDEqJaki0AxKU2Ih5mcMHVswS5uGYwS097tz6WdBP0dIhe9k2i1MiH ZLagGudaFptDEqJaki0AxKU2Ih5mcMHVswS5uGYwS097tz6WdBP0dIhe9k2i1MiH
Kf0gSMkSYCYxJnDFr4iktoHBlPCMxtvrDRj8Qw/91vTQThWRPIE1rC5kAAAAAElF Kf0gSMkSYCYxJnDFr4iktoHBlPCMxtvrDRj8Qw/91vTQThWRPIE1rC5kAAAAAElF
TkSuQmCC" style="fill:black; stroke:black; font-weight:normal;" height="16" preserveAspectRatio="none" /> 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> <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" /> <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 <image x="905" y="254" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAjUlEQVR42rWR2w2A
IAxFrXEQN5FNZJPiJozSUdikXiEhRNDGD5sSoJybPiBVnd6N6Mg7Y6nOk2WgWRVe IAxFrXEQN5FNZJPiJozSUdikXiEhRNDGD5sSoJybPiBVnd6N6Mg7Y6nOk2WgWRVe
ZLagGudaFptDEqJaki0AxKU2Ih5mcMHVswS5uGYwS097tz6WdBP0dIhe9k2i1MiH ZLagGudaFptDEqJaki0AxKU2Ih5mcMHVswS5uGYwS097tz6WdBP0dIhe9k2i1MiH
Kf0gSMkSYCYxJnDFr4iktoHBlPCMxtvrDRj8Qw/91vTQThWRPIE1rC5kAAAAAElF Kf0gSMkSYCYxJnDFr4iktoHBlPCMxtvrDRj8Qw/91vTQThWRPIE1rC5kAAAAAElF
TkSuQmCC" style="fill:black; stroke:black; font-weight:normal;" height="16" preserveAspectRatio="none" /> 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> <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 <image x="1135" y="146" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAABBElEQVR42q1SYZnD
IAylWwVUQiTgYJFQCZmDOVjOwSREwiREQqdgSMBBFwajcLu7/bl8+fpR8l7egzCs IAylWwVUQiTgYJFQCZmDOVjOwSREwiREQqdgSMBBFwajcLu7/bl8+fpR8l7egzCs
6+peISqi6pogREIavob1XGC7WkOmhIbQZkYf7gf7dgRDF9BPobLJjtnJpgPAWH5Z 6+peISqi6pogREIavob1XGC7WkOmhIbQZkYf7gf7dgRDF9BPobLJjtnJpgPAWH5Z
6Z28Z+aTXHLvjNagdKUQHSNnP3IViHC8HW1nbNkI9GycDGgwHWr95GPs3J9h7b+t 6Z28Z+aTXHLvjNagdKUQHSNnP3IViHC8HW1nbNkI9GycDGgwHWr95GPs3J9h7b+t
PxDa4+Z1Z8lsICAjmqtsDwVTIUCqspRDOxeXJbophmip5E/kCcHbLdlOIiyR5tmD PxDa4+Z1Z8lsICAjmqtsDwVTIUCqspRDOxeXJbophmip5E/kCcHbLdlOIiyR5tmD
Lwo2nTpgDaF0rWHtIWG6wSU5KzylO6i6amabw+vZzMWbpU3FcprMyYW4bTL2T42q Lwo2nTpgDaF0rWHtIWG6wSU5KzylO6i6amabw+vZzMWbpU3FcprMyYW4bTL2T42q
9G/x4Vr/gfAAzgaEraDyPpwAAAAASUVORK5CYII=" style="fill:black; stroke:black;" height="16" preserveAspectRatio="none" /> 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> <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="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="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="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="400" style="stroke:none;" height="64" />
<rect x="978" y="0" width="399" style="fill:none; stroke:black;" height="63" /> <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="26" style="fill:none; stroke:black;" y2="26" />
<line x1="978" x2="1377" y1="36" style="fill:none; stroke:black;" y2="36" /> <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" /> <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 <image x="988" y="41" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAiklEQVR42rVRgQ2A
IAwDwiF+4k7hE/WTnbJP3CdYoyEoqJjoQsiAdrSbjTGap7CTjcMOcy3ofu6xtxIQ IAwDwiF+4k7hE/WTnbJP3CdYoyEoqJjoQsiAdrSbjTGap7CTjcMOcy3ofu6xtxIQ
wpLyJkIerkUPBUqqfAmikXYlo+R66gSgA3XpiMKn3OZtPaEDcfm/vzHAElSNiP7W wpLyJkIerkUPBUqqfAmikXYlo+R66gSgA3XpiMKn3OZtPaEDcfm/vzHAElSNiP7W
JZR/IKAtzArcttabo56KBzzDeHXGl6ZL0ItJf0BYALD3PkMWvNRAAAAAAElFTkSu JZR/IKAtzArcttabo56KBzzDeHXGl6ZL0ItJf0BYALD3PkMWvNRAAAAAAElFTkSu
QmCC" style="fill:black; stroke:black; font-weight:normal;" height="16" preserveAspectRatio="none" /> 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> <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 <image x="1140" y="5" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAABBElEQVR42q1SYZnD
IAylWwVUQiTgYJFQCZmDOVjOwSREwiREQqdgSMBBFwajcLu7/bl8+fpR8l7egzCs IAylWwVUQiTgYJFQCZmDOVjOwSREwiREQqdgSMBBFwajcLu7/bl8+fpR8l7egzCs
6+peISqi6pogREIavob1XGC7WkOmhIbQZkYf7gf7dgRDF9BPobLJjtnJpgPAWH5Z 6+peISqi6pogREIavob1XGC7WkOmhIbQZkYf7gf7dgRDF9BPobLJjtnJpgPAWH5Z
6Z28Z+aTXHLvjNagdKUQHSNnP3IViHC8HW1nbNkI9GycDGgwHWr95GPs3J9h7b+t 6Z28Z+aTXHLvjNagdKUQHSNnP3IViHC8HW1nbNkI9GycDGgwHWr95GPs3J9h7b+t
PxDa4+Z1Z8lsICAjmqtsDwVTIUCqspRDOxeXJbophmip5E/kCcHbLdlOIiyR5tmD PxDa4+Z1Z8lsICAjmqtsDwVTIUCqspRDOxeXJbophmip5E/kCcHbLdlOIiyR5tmD
Lwo2nTpgDaF0rWHtIWG6wSU5KzylO6i6amabw+vZzMWbpU3FcprMyYW4bTL2T42q Lwo2nTpgDaF0rWHtIWG6wSU5KzylO6i6amabw+vZzMWbpU3FcprMyYW4bTL2T42q
9G/x4Vr/gfAAzgaEraDyPpwAAAAASUVORK5CYII=" style="fill:black; stroke:black;" height="16" preserveAspectRatio="none" /> 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> <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="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="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="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="400" style="stroke:none;" height="82" />
<rect x="1746" y="511" width="399" style="fill:none; stroke:black;" height="81" /> <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="537" style="fill:none; stroke:black;" y2="537" />
<line x1="1746" x2="2145" y1="547" style="fill:none; stroke:black;" y2="547" /> <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" /> <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/ <image x="1756" y="552" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAYUlEQVR42mP8//8/
AymAiYFEMAg1sGAKOTQ4wNkHGg4Q0ABUneCggOAmOBxYcACnk9BUg0QcFIBCgyeU AymAiYFEMAg1sGAKOTQ4wNkHGg4Q0ABUneCggOAmOBxYcACnk9BUg0QcFIBCgyeU
HjwgpAEYJgsWPACqgyCQyIEHaJ5GDyWgNLIv0VRjjwdMRfQNJQCIvyUFPaAxvQAA HjwgpAEYJgsWPACqgyCQyIEHaJ5GDyWgNLIv0VRjjwdMRfQNJQCIvyUFPaAxvQAA
AABJRU5ErkJggg==" style="fill:black; stroke:black; font-weight:normal;" height="16" preserveAspectRatio="none" /> 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> <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" /> <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/ <image x="1756" y="570" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAYUlEQVR42mP8//8/
AymAiYFEMAg1sGAKOTQ4wNkHGg4Q0ABUneCggOAmOBxYcACnk9BUg0QcFIBCgyeU AymAiYFEMAg1sGAKOTQ4wNkHGg4Q0ABUneCggOAmOBxYcACnk9BUg0QcFIBCgyeU
HjwgpAEYJgsWPACqgyCQyIEHaJ5GDyWgNLIv0VRjjwdMRfQNJQCIvyUFPaAxvQAA HjwgpAEYJgsWPACqgyCQyIEHaJ5GDyWgNLIv0VRjjwdMRfQNJQCIvyUFPaAxvQAA
AABJRU5ErkJggg==" style="fill:black; stroke:black; font-weight:normal;" height="16" preserveAspectRatio="none" /> 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> <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 <image x="1901" y="516" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAA7ElEQVR42q2SXXUE
IQyF09kVMBIiAQmRMBIioRIioRKQEgkjAQk4mF42wMzu6UN7ujl5APL3ceHjOA4a IQyF09kVMBIiAQmRMBIioRIioRKQEgkjAQk4mF42wMzu6UN7ujl5APL3ceHjOA4a
lj1nd7qYiqjo9eQ+V2KPAJdrGPVwtzxPljMbqc/ZvZ5L7zUngOScw2zSt+bqpUza lj1nd7qYiqjo9eQ+V2KPAJdrGPVwtzxPljMbqc/ZvZ5L7zUngOScw2zSt+bqpUza
YFtibvSObC8uWczzrER03u1+nS+sj8Yt5iVLPifTGLXQH+1/BcBoSCKBhzsPHibm YFtibvSObC8uWczzrER03u1+nS+sj8Yt5iVLPifTGLXQH+1/BcBoSCKBhzsPHibm
WN7MjKjue6W1lgp3TZ+aVDhBJZy0rL3qtiVO/dLQa4oAHSHRE0RrT/O9O1J7SwQK WN7MjKjue6W1lgp3TZ+aVDhBJZy0rL3qtiVO/dLQa4oAHSHRE0RrT/O9O1J7SwQK
v6b6iA4LpPg2W2eDQ0P4uoLkS+3nvxRsL1/t3bL+xr4BXAV0uUgPznkAAAAASUVO v6b6iA4LpPg2W2eDQ0P4uoLkS+3nvxRsL1/t3bL+xr4BXAV0uUgPznkAAAAASUVO
RK5CYII=" style="fill:black; stroke:black;" height="16" preserveAspectRatio="none" /> 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> <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;" /> <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="stroke:none;" points=" 1179 67 1185 91 1173 91" />
<polygon style="fill:none; stroke:black;" 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="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="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="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;" /> <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="stroke:none;" points=" 588 195 594 219 582 219" />
<polygon style="fill:none; stroke:black;" 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="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="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="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="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="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="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="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;" /> <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="stroke:none;" points=" 1167 280 1173 304 1161 304" />
<polygon style="fill:none; stroke:black;" 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="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;" /> <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="stroke:none;" points=" 3121 246 3127 270 3115 270" />
<polygon style="fill:none; stroke:black;" 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="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;" /> <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="stroke:none;" points=" 2220 213 2226 237 2214 237" />
<polygon style="fill:none; stroke:black;" points=" 2220 213 2226 237 2214 237" /> <polygon style="fill:none; stroke:black;" points=" 2220 213 2226 237 2214 237" />
</g> </g>
</g> </g>
</svg> </svg>

Before

Width:  |  Height:  |  Size: 42 KiB

After

Width:  |  Height:  |  Size: 42 KiB

File diff suppressed because it is too large Load Diff

Before

Width:  |  Height:  |  Size: 195 KiB

After

Width:  |  Height:  |  Size: 193 KiB

File diff suppressed because it is too large Load Diff

Before

Width:  |  Height:  |  Size: 187 KiB

After

Width:  |  Height:  |  Size: 185 KiB

File diff suppressed because it is too large Load Diff

View File

@ -3,8 +3,11 @@
*/ */
package de.dhbwstuttgart.bytecode.simplifyRes; package de.dhbwstuttgart.bytecode.simplifyRes;
import java.util.Collections;
import java.util.List; import java.util.List;
import com.google.common.collect.Collections2;
/** /**
* @author fayez * @author fayez
* *
@ -12,7 +15,9 @@ import java.util.List;
public class GenericGeneratorResultsForAllMethods { public class GenericGeneratorResultsForAllMethods {
private final List<MethodAndConstraints> methodsAndConstraints; private final List<MethodAndConstraints> methodsAndConstraints;
public GenericGeneratorResultsForAllMethods() {
this(Collections.emptyList());
}
/** /**
* @param methodsAndConstraints * @param methodsAndConstraints
*/ */

View File

@ -40,9 +40,11 @@ public class GenericGenratorResultForSourceFile {
public GenericsGeneratorResultForClass getSimplifyResultsByName(String pkgName, String name) { public GenericsGeneratorResultForClass getSimplifyResultsByName(String pkgName, String name) {
if (this.pkgName.equals(pkgName)) { if (this.pkgName.equals(pkgName)) {
return genericGeneratorResultForAllClasses.stream().filter(sr -> sr.getClassName().equals(name)).findAny() return genericGeneratorResultForAllClasses
.orElseThrow(() -> new NoSuchElementException( .stream()
"Simplify results for the class " + pkgName + "." + name + " are not found")); .filter(sr -> sr.getClassName().equals(name))
.findAny()
.orElse(new GenericsGeneratorResultForClass(name));
} }
throw new NoSuchElementException("Simplify results for the class " + pkgName + "." + name + " are not found"); throw new NoSuchElementException("Simplify results for the class " + pkgName + "." + name + " are not found");
} }

View File

@ -3,6 +3,7 @@
*/ */
package de.dhbwstuttgart.bytecode.simplifyRes; package de.dhbwstuttgart.bytecode.simplifyRes;
import java.util.Collections;
import java.util.List; import java.util.List;
/** /**
@ -14,6 +15,9 @@ public class GenericsGeneratorResultForClass {
private final List<GenericsGeneratorResult> classConstraints; private final List<GenericsGeneratorResult> classConstraints;
private final GenericGeneratorResultsForAllMethods methodsAndTheirConstraints; private final GenericGeneratorResultsForAllMethods methodsAndTheirConstraints;
public GenericsGeneratorResultForClass(String className) {
this(className, Collections.emptyList(), new GenericGeneratorResultsForAllMethods());
}
/** /**
* @param className * @param className
* @param classConstraints * @param classConstraints
@ -52,6 +56,9 @@ public class GenericsGeneratorResultForClass {
.anyMatch(i -> i.equals(id)); .anyMatch(i -> i.equals(id));
} }
public List<GenericsGeneratorResult> getMethodConstraintsByID(String id) { public List<GenericsGeneratorResult> getMethodConstraintsByID(String id) {
return methodsAndTheirConstraints.getMethodsAndConstraints().stream().filter(mc -> mc.getMethodID().equals(id)) return methodsAndTheirConstraints.getMethodsAndConstraints().stream().filter(mc -> mc.getMethodID().equals(id))
.findFirst().get().getConstraints(); .findFirst().get().getConstraints();

View File

@ -59,43 +59,64 @@ import org.apache.commons.io.output.NullOutputStream;
public class JavaTXCompiler { public class JavaTXCompiler {
final CompilationEnvironment environment; public static JavaTXCompiler INSTANCE;
Boolean resultmodel = true; final CompilationEnvironment environment;
public final Map<File, SourceFile> sourceFiles = new HashMap<>(); Boolean resultmodel = true;
Boolean log = true; // gibt an ob ein Log-File nach public final Map<File, SourceFile> sourceFiles = new HashMap<>();
// System.getProperty("user.dir")+"src/test/java/logFiles" geschrieben werden Boolean log = true; //gibt an ob ein Log-File nach System.getProperty("user.dir")+"src/test/java/logFiles" geschrieben werden soll?
// soll? public volatile UnifyTaskModel usedTasks = new UnifyTaskModel();
public volatile UnifyTaskModel usedTasks = new UnifyTaskModel();
/**
* Äußerste Liste der Source-Files.
* Danach Liste der Klassen in Source File.
* Danach Map Klassenname
*/
private List<List<HashMap<String, SimplifyResult>>> simplifyResultsSF = new ArrayList<>();
public JavaTXCompiler(File sourceFile) throws IOException, ClassNotFoundException {
this(Arrays.asList(sourceFile));
INSTANCE = this;
}
public JavaTXCompiler(File sourceFile) throws IOException, ClassNotFoundException { public JavaTXCompiler(File sourceFile, Boolean log) throws IOException, ClassNotFoundException {
this(Arrays.asList(sourceFile)); this(sourceFile);
} this.log = log;
INSTANCE = this;
}
public JavaTXCompiler(List<File> sources) throws IOException, ClassNotFoundException {
environment = new CompilationEnvironment(sources);
for (File s : sources) {
sourceFiles.put(s, parse(s));
}
INSTANCE = this;
}
public JavaTXCompiler(File sourceFile, Boolean log) throws IOException, ClassNotFoundException { public ConstraintSet<Pair> getConstraints() throws ClassNotFoundException {
this(sourceFile); List<ClassOrInterface> allClasses = new ArrayList<>();//environment.getAllAvailableClasses();
this.log = log; for (SourceFile sf : sourceFiles.values()) {
} allClasses.addAll(sf.getClasses());
}
List<ClassOrInterface> importedClasses = new ArrayList<>();
//Alle Importierten Klassen in allen geparsten Sourcefiles kommen ins FC
for (File forSourceFile : sourceFiles.keySet())
for (JavaClassName name : sourceFiles.get(forSourceFile).getImports()) {
//TODO: Hier werden imports von eigenen (.jav) Klassen nicht beachtet
ClassOrInterface importedClass = ASTFactory.createClass(
ClassLoader.getSystemClassLoader().loadClass(name.toString()));
importedClasses.add(importedClass);
}
allClasses.addAll(importedClasses);
public JavaTXCompiler(List<File> sources) throws IOException, ClassNotFoundException { return new TYPE(sourceFiles.values(), allClasses).getConstraints();
environment = new CompilationEnvironment(sources); }
for (File s : sources) {
sourceFiles.put(s, parse(s));
}
}
public ConstraintSet<Pair> getConstraints() throws ClassNotFoundException { public List<ClassOrInterface> getAvailableClasses(SourceFile forSourceFile) throws ClassNotFoundException {
List<ClassOrInterface> allClasses = new ArrayList<>();// environment.getAllAvailableClasses(); //PL 2018-09-18: List durch Set ersetzt, damit die Klassen nur einmal hinzugefuegt werden
for (SourceFile sf : sourceFiles.values()) { //List<ClassOrInterface> allClasses = new ArrayList<>();//environment.getAllAvailableClasses();
allClasses.addAll(sf.getClasses()); Set<ClassOrInterface> allClasses = new HashSet<>();
}
List<ClassOrInterface> importedClasses = new ArrayList<>(); /* PL 2018-09-19 geloescht werden bereits in typeInference hinzugefuegt
// Alle Importierten Klassen in allen geparsten Sourcefiles kommen ins FC
for (File forSourceFile : sourceFiles.keySet())
for (JavaClassName name : sourceFiles.get(forSourceFile).getImports()) {
// TODO: Hier werden imports von eigenen (.jav) Klassen nicht beachtet
ClassOrInterface importedClass = ASTFactory
.createClass(ClassLoader.getSystemClassLoader().loadClass(name.toString()));
importedClasses.add(importedClass);
} }
allClasses.addAll(importedClasses); allClasses.addAll(importedClasses);
@ -711,6 +732,20 @@ public class JavaTXCompiler {
return ret; return ret;
} }
public void generateBytecodForFile(String path, HashMap<String, byte[]> classFiles, SourceFile sf,
List<ResultSet> typeinferenceResult) throws IOException {
try {
List<GenericGenratorResultForSourceFile> genericResults = getGeneratedGenericResultsForAllSourceFiles(typeinferenceResult);
BytecodeGen bytecodeGen = new BytecodeGen(classFiles,typeinferenceResult, genericResults, sf,path);
bytecodeGen.visit(sf);
this.writeClassFile(bytecodeGen.getClassFiles(), path);
} catch (ClassNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
public List<GenericGenratorResultForSourceFile> getGeneratedGenericResultsForAllSourceFiles() public List<GenericGenratorResultForSourceFile> getGeneratedGenericResultsForAllSourceFiles()
throws ClassNotFoundException { throws ClassNotFoundException {
List<GenericGenratorResultForSourceFile> result = new ArrayList<>(); List<GenericGenratorResultForSourceFile> result = new ArrayList<>();

View File

@ -2,6 +2,10 @@ package de.dhbwstuttgart.syntaxtree;
import org.antlr.v4.runtime.Token; import org.antlr.v4.runtime.Token;
import com.google.common.collect.Lists;
import de.dhbwstuttgart.parser.NullToken;
import java.util.*; import java.util.*;
@ -15,11 +19,21 @@ public class GenericDeclarationList extends SyntaxTreeNode implements Iterable<G
private Token offsetOfLastElement; private Token offsetOfLastElement;
private List<GenericTypeVar> gtvs = new ArrayList<>(); private List<GenericTypeVar> gtvs = new ArrayList<>();
public GenericDeclarationList(List<GenericTypeVar> values, Token endOffset) { @SuppressWarnings("unchecked")
public GenericDeclarationList(Iterable<? extends GenericTypeVar> values, Token endOffset) {
super(endOffset);
gtvs = isListOfGenericTypeVar(values) ? (List<GenericTypeVar>)values : Lists.newArrayList(values);
this.offsetOfLastElement = endOffset;
}
public GenericDeclarationList(ArrayList<GenericTypeVar> values, Token endOffset) {
super(endOffset); super(endOffset);
gtvs = values; gtvs = values;
this.offsetOfLastElement = endOffset; this.offsetOfLastElement = endOffset; }
private boolean isListOfGenericTypeVar(Iterable<? extends GenericTypeVar> values) {
return values instanceof List && ((List<?>)values).size() > 0 && ((List<?>)values).get(0) instanceof GenericTypeVar;
} }
@Override @Override

View File

@ -1,24 +1,24 @@
package de.dhbwstuttgart.syntaxtree.statement; package de.dhbwstuttgart.syntaxtree.statement;
import java.util.List; import java.util.List;
import de.dhbwstuttgart.syntaxtree.StatementVisitor; import de.dhbwstuttgart.syntaxtree.StatementVisitor;
import de.dhbwstuttgart.syntaxtree.type.RefTypeOrTPHOrWildcardOrGeneric; import de.dhbwstuttgart.syntaxtree.type.RefTypeOrTPHOrWildcardOrGeneric;
import de.dhbwstuttgart.typeinference.assumptions.TypeInferenceBlockInformation; import de.dhbwstuttgart.typeinference.assumptions.TypeInferenceBlockInformation;
import de.dhbwstuttgart.typeinference.constraints.ConstraintSet; import de.dhbwstuttgart.typeinference.constraints.ConstraintSet;
import de.dhbwstuttgart.exceptions.NotImplementedException; import de.dhbwstuttgart.exceptions.NotImplementedException;
public class NewArray extends Expression public class NewArray extends Expression
{ {
public NewArray(int offset,int variableLength) public NewArray(int offset,int variableLength)
{ {
super(null,null); super(null,null);
} }
private RefTypeOrTPHOrWildcardOrGeneric type; private RefTypeOrTPHOrWildcardOrGeneric type;
public List<Expression> expr; public List<Expression> expr;
@Override @Override
public void accept(StatementVisitor visitor) { public void accept(StatementVisitor visitor) {
visitor.visit(this); visitor.visit(this);
} }
} }

View File

@ -1,11 +1,37 @@
package de.dhbwstuttgart.typedeployment; package de.dhbwstuttgart.typedeployment;
import de.dhbwstuttgart.bytecode.Exception.BytecodeGeneratorError;
import de.dhbwstuttgart.bytecode.constraint.TPHConstraint;
import de.dhbwstuttgart.bytecode.descriptor.TypeToDescriptor;
import de.dhbwstuttgart.bytecode.simplifyRes.GenericGenratorResultForSourceFile;
import de.dhbwstuttgart.bytecode.simplifyRes.GenericsGeneratorResult;
import de.dhbwstuttgart.bytecode.simplifyRes.GenericsGeneratorResultForClass;
import de.dhbwstuttgart.bytecode.utilities.MethodUtility;
import de.dhbwstuttgart.bytecode.utilities.Resolver;
import de.dhbwstuttgart.core.JavaTXCompiler;
import de.dhbwstuttgart.parser.NullToken;
import de.dhbwstuttgart.syntaxtree.*; import de.dhbwstuttgart.syntaxtree.*;
import de.dhbwstuttgart.syntaxtree.statement.NewArray;
import de.dhbwstuttgart.syntaxtree.type.*; import de.dhbwstuttgart.syntaxtree.type.*;
import de.dhbwstuttgart.typeinference.result.*; import de.dhbwstuttgart.typeinference.result.*;
import org.antlr.v4.runtime.Token;
import org.antlr.v4.parse.ANTLRParser.action_return;
import org.antlr.v4.parse.ANTLRParser.block_return;
import org.antlr.v4.parse.ANTLRParser.labeledAlt_return;
import org.antlr.v4.parse.ANTLRParser.parserRule_return;
import org.antlr.v4.runtime.Token;
import org.objectweb.asm.Type;
import org.stringtemplate.v4.compiler.STParser.ifstat_return;
import java.io.File;
import java.io.IOException;
import java.io.Serializable;
import java.util.*; import java.util.*;
import java.util.Map.Entry;
import java.util.stream.Collectors;
import javax.print.DocFlavor.STRING;
import javax.security.auth.kerberos.KerberosKey;
/** /**
* TODO: * TODO:
@ -29,62 +55,90 @@ public class TypeInsertFactory {
public static TypeInsert createInsertPoints(RefTypeOrTPHOrWildcardOrGeneric type, Token offset, ClassOrInterface cl, Method m, public static TypeInsert createInsertPoints(RefTypeOrTPHOrWildcardOrGeneric type, Token offset, ClassOrInterface cl, Method m,
ResultSet resultSet) { ResultSet resultSet) {
ResolvedType resolvedType = resultSet.resolveType(type);
TypeInsertPoint insertPoint = new TypeInsertPoint(offset, try {
new TypeToInsertString(resolvedType.resolvedType).insert); ResolvedType resolvedType = resultSet.resolveType(type);
return new TypeInsert(insertPoint, new HashSet<>(), resolvedType.getResultPair()); TypeInsertPoint insertPoint = new TypeInsertPoint(offset,
new TypeToInsertString(resolvedType.resolvedType).insert);
List<GenericGenratorResultForSourceFile> simplifyResults = JavaTXCompiler.INSTANCE.getGeneratedGenericResultsForAllSourceFiles();
for (GenericGenratorResultForSourceFile simplifyResultsEntries : simplifyResults) {
GenericsGeneratorResultForClass genericResultsForClass = simplifyResultsEntries.getSimplifyResultsByName("", cl.getClassName().toString());
return new TypeInsert(insertPoint, createGenericInsert(genericResultsForClass, cl, m, resultSet), resolvedType.getResultPair());
}
return new TypeInsert(insertPoint, new HashSet<>(), resolvedType.getResultPair());
} catch (ClassNotFoundException e) {
e.printStackTrace();
return null;
}
} }
private static TypeInsertPoint createGenericInsert(Set<GenericInsertPair> toInsert, ClassOrInterface cl, Method m){ private static synchronized Set<TypeInsertPoint> createGenericInsert(GenericsGeneratorResultForClass genericResult, ClassOrInterface cl, Method m, ResultSet resultSet){
//Momentan wird Methode ignoriert. Parameter werden immer als Klassenparameter angefügt: Set<TypeInsertPoint> result = createGenericClassInserts(genericResult, cl);
//Offset zum Einstzen bestimmen:
Token offset; for (Method method : cl.getMethods()) {
String insert = ""; Resolver resolver = new Resolver(resultSet);
String end; List<GenericsGeneratorResult> methodConstraints = genericResult.getMethodConstraintsByID(MethodUtility.createID(resolver, method));
if(cl.getGenerics().iterator().hasNext()){ createMethodConstraints(method, methodConstraints);
//offset = cl.getGenerics().iterator().next().getOffset();
offset = cl.getGenerics().getOffset();
end=",";
}else{
offset = cl.getGenerics().getOffset();
insert += "<";
end = ">";
} }
//Alle einzusetzenden Generics und deren Bounds bestimmen: return result;
HashMap<TypePlaceholder, HashSet<TypePlaceholder>> genericsAndBounds = new HashMap<>();
for(GenericInsertPair p : toInsert){
if(!genericsAndBounds.containsKey(p.TA1)){
genericsAndBounds.put((TypePlaceholder) p.TA1, new HashSet<>());
}
if(p.TA2 != null){
genericsAndBounds.get(p.TA1).add((TypePlaceholder) p.TA2);
if(!genericsAndBounds.containsKey(p.TA2)){
genericsAndBounds.put((TypePlaceholder) p.TA2, new HashSet<>());
}
}
}
//String zum Einsetzen (Generics mit bounds) generieren:
Iterator<TypePlaceholder> it = genericsAndBounds.keySet().iterator();
if(! it.hasNext())return new TypeInsertPoint(offset, "");
while(it.hasNext()){
TypePlaceholder tph = it.next();
insert += tph.getName();
Set<TypePlaceholder> bounds = genericsAndBounds.get(tph);
if(bounds.size() > 0){
insert += " extends ";
Iterator<TypePlaceholder> boundIt = bounds.iterator();
while(boundIt.hasNext()){
TypePlaceholder bound = boundIt.next();
insert += bound.getName();
if(boundIt.hasNext())insert += " & ";
}
}
if(it.hasNext())insert+=",";
}
return new TypeInsertPoint(offset, insert + end);
} }
private static Set<TypeInsertPoint> createMethodConstraints(Method method, List<GenericsGeneratorResult> constraints) {
Set<TypeInsertPoint> result = new HashSet<>();
Token offset = new GenericDeclarationList(method.getGenerics(), new NullToken()).getOffset();
if (constraints.size() == 0) {
result.add(new TypeInsertPoint(offset, ""));
return result;
}
String insert = " <";
for (GenericsGeneratorResult genericInsertConstraint : constraints) {
if (genericInsertConstraint.getConstraint().getRight().equals(Type.getInternalName(Object.class))) {
insert += genericInsertConstraint.getConstraint().getLeft();
} else {
insert += genericInsertConstraint.getConstraint().getLeft() + " extends " + genericInsertConstraint.getConstraint().getRight() + ", ";
}
}
insert = insert.substring(0, insert.length() -2);
insert += ">";
result.add(new TypeInsertPoint(offset, insert));
return result;
}
private static Set<TypeInsertPoint> createGenericClassInserts(GenericsGeneratorResultForClass genericResult, ClassOrInterface cl) {
Set<TypeInsertPoint> result = new HashSet<>();
Token offset = cl.getGenerics().getOffset();
List<GenericsGeneratorResult> classConstraints = genericResult.getClassConstraints();
if (classConstraints.size() == 0) {
result.add(new TypeInsertPoint(offset, ""));
return result;
}
String insert = " <";
for (GenericsGeneratorResult genericInsertConstraint : classConstraints) {
if (genericInsertConstraint.getConstraint().getRight().equals(Type.getInternalName(Object.class))) {
insert += genericInsertConstraint.getConstraint().getLeft();
} else {
insert += genericInsertConstraint.getConstraint().getLeft() + " extends " + genericInsertConstraint.getConstraint().getRight() + ", ";
}
}
insert = insert.substring(0, insert.length() -2);
insert += ">";
result.add(new TypeInsertPoint(offset, insert));
return result;
}
} }
class TypeToInsertString implements ResultSetVisitor{ class TypeToInsertString implements ResultSetVisitor{

View File

@ -1,73 +1,73 @@
package de.dhbwstuttgart.typedeployment; package de.dhbwstuttgart.typedeployment;
import de.dhbwstuttgart.exceptions.NotImplementedException; import de.dhbwstuttgart.exceptions.NotImplementedException;
import de.dhbwstuttgart.syntaxtree.*; import de.dhbwstuttgart.syntaxtree.*;
import de.dhbwstuttgart.syntaxtree.statement.JavaInternalExpression; import de.dhbwstuttgart.syntaxtree.statement.JavaInternalExpression;
import de.dhbwstuttgart.syntaxtree.statement.LambdaExpression; import de.dhbwstuttgart.syntaxtree.statement.LambdaExpression;
import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder;
import de.dhbwstuttgart.typeinference.result.ResultSet; import de.dhbwstuttgart.typeinference.result.ResultSet;
import java.util.HashSet; import java.util.HashSet;
import java.util.Set; import java.util.Set;
public class TypeInsertPlacer extends AbstractASTWalker{ public class TypeInsertPlacer extends AbstractASTWalker{
Set<TypeInsert> inserts = new HashSet<>(); Set<TypeInsert> inserts = new HashSet<>();
private ResultSet withResults; private ResultSet withResults;
public Set<TypeInsert> getTypeInserts(SourceFile forSourceFile, ResultSet withResults){ public Set<TypeInsert> getTypeInserts(SourceFile forSourceFile, ResultSet withResults){
this.withResults = withResults; this.withResults = withResults;
forSourceFile.accept(this); forSourceFile.accept(this);
return inserts; return inserts;
} }
@Override @Override
public void visit(ClassOrInterface classOrInterface) { public void visit(ClassOrInterface classOrInterface) {
TypeInsertPlacerClass cl = new TypeInsertPlacerClass(classOrInterface, withResults); TypeInsertPlacerClass cl = new TypeInsertPlacerClass(classOrInterface, withResults);
this.inserts.addAll(cl.inserts); this.inserts.addAll(cl.inserts);
} }
} }
class TypeInsertPlacerClass extends AbstractASTWalker{ class TypeInsertPlacerClass extends AbstractASTWalker{
protected final ResultSet results; protected final ResultSet results;
protected final ClassOrInterface cl; protected final ClassOrInterface cl;
public final Set<TypeInsert> inserts = new HashSet<>(); public final Set<TypeInsert> inserts = new HashSet<>();
private Method method; private Method method;
TypeInsertPlacerClass(ClassOrInterface forClass, ResultSet withResults){ TypeInsertPlacerClass(ClassOrInterface forClass, ResultSet withResults){
this.cl = forClass; this.cl = forClass;
this.method = null; this.method = null;
this.results = withResults; this.results = withResults;
forClass.accept(this); forClass.accept(this);
} }
@Override @Override
public void visit(Method method) { public void visit(Method method) {
this.method = method; this.method = method;
if(method.getReturnType() instanceof TypePlaceholder) if(method.getReturnType() instanceof TypePlaceholder)
inserts.add(TypeInsertFactory.createInsertPoints( inserts.add(TypeInsertFactory.createInsertPoints(
method.getReturnType(), method.getReturnType().getOffset(), cl, method, results)); method.getReturnType(), method.getReturnType().getOffset(), cl, method, results));
super.visit(method); super.visit(method);
} }
@Override @Override
public void visit(Field field) { public void visit(Field field) {
if(field.getType() instanceof TypePlaceholder){ if(field.getType() instanceof TypePlaceholder){
inserts.add(TypeInsertFactory.createInsertPoints( inserts.add(TypeInsertFactory.createInsertPoints(
field.getType(), field.getType().getOffset(), cl, method, results)); field.getType(), field.getType().getOffset(), cl, method, results));
} }
super.visit(field); super.visit(field);
} }
@Override @Override
public void visit(FormalParameter param) { public void visit(FormalParameter param) {
if(param.getType() instanceof TypePlaceholder) if(param.getType() instanceof TypePlaceholder)
inserts.add(TypeInsertFactory.createInsertPoints( inserts.add(TypeInsertFactory.createInsertPoints(
param.getType(), param.getType().getOffset(), cl, method, results)); param.getType(), param.getType().getOffset(), cl, method, results));
super.visit(param); super.visit(param);
} }
@Override @Override
public void visit(LambdaExpression lambdaExpression) { public void visit(LambdaExpression lambdaExpression) {
//Lambda-Ausdrücke brauchen keine Typeinsetzungen //Lambda-Ausdrücke brauchen keine Typeinsetzungen
} }
} }

View File

@ -1,59 +1,59 @@
package de.dhbwstuttgart.typedeployment; package de.dhbwstuttgart.typedeployment;
import org.antlr.v4.runtime.Token; import org.antlr.v4.runtime.Token;
import de.dhbwstuttgart.typeinference.unify.model.ReferenceType; import de.dhbwstuttgart.typeinference.unify.model.ReferenceType;
import java.time.OffsetDateTime; import java.time.OffsetDateTime;
import java.util.List; import java.util.List;
import java.util.stream.Collectors; import java.util.stream.Collectors;
public class TypeInsertPoint { public class TypeInsertPoint {
public Token point; public Token point;
private String insertString; private String insertString;
private int extraOffset = 0; private int extraOffset = 0;
public TypeInsertPoint(Token point, String toInsert){ public TypeInsertPoint(Token point, String toInsert){
this.point = point; this.point = point;
this.insertString = (toInsert.endsWith(" ")) ? toInsert : toInsert + " " ; this.insertString = (toInsert.endsWith(" ")) ? toInsert : toInsert + " " ;
} }
public String insert(String intoSource, List<TypeInsertPoint> additionalOffset){ public String insert(String intoSource, List<TypeInsertPoint> additionalOffset){
int offset = additionalOffset.stream().filter((token -> int offset = additionalOffset.stream().filter((token ->
//token.point.getLine() != point.getLine() && token.point.getCharPositionInLine() <= point.getCharPositionInLine())) //token.point.getLine() != point.getLine() && token.point.getCharPositionInLine() <= point.getCharPositionInLine()))
token.point.getStartIndex() <= point.getStartIndex())) token.point.getStartIndex() <= point.getStartIndex()))
.mapToInt((typeInsertPoint -> typeInsertPoint.insertString.length())).sum(); .mapToInt((typeInsertPoint -> typeInsertPoint.insertString.length())).sum();
return new StringBuilder(intoSource).insert(point.getStartIndex()+offset+extraOffset, insertString).toString(); return new StringBuilder(intoSource).insert(point.getStartIndex()+offset+extraOffset, insertString).toString();
} }
public String getInsertString() { public String getInsertString() {
return insertString; return insertString;
} }
public void addExtraOffset(int toAdd) { public void addExtraOffset(int toAdd) {
this.extraOffset += toAdd; this.extraOffset += toAdd;
} }
public int getPositionInCode() { public int getPositionInCode() {
return point.getStartIndex() + extraOffset; return point.getStartIndex() + extraOffset;
} }
/* PL 2018-06-19 /* PL 2018-06-19
* Zwei TypeInsertPoint's sind gleich, wenn ihre point's gleich sind * Zwei TypeInsertPoint's sind gleich, wenn ihre point's gleich sind
* eingefuegt damit man TypeReplaceMarker vergleichen kann * eingefuegt damit man TypeReplaceMarker vergleichen kann
* @see java.lang.Object#equals(java.lang.Object) * @see java.lang.Object#equals(java.lang.Object)
*/ */
public boolean equals(Object obj) { public boolean equals(Object obj) {
if(!(obj instanceof TypeInsertPoint)) { if(!(obj instanceof TypeInsertPoint)) {
return false; return false;
} }
else { else {
return ((TypeInsertPoint)obj).point.equals(this.point) && return ((TypeInsertPoint)obj).point.equals(this.point) &&
((TypeInsertPoint)obj).insertString.equals(this.insertString); ((TypeInsertPoint)obj).insertString.equals(this.insertString);
} }
} }
public String toString() { public String toString() {
return point.toString() + " " + insertString.toString(); return point.toString() + " " + insertString.toString();
} }
} }

View File

@ -1,62 +1,62 @@
package de.dhbwstuttgart.typeinference.result; package de.dhbwstuttgart.typeinference.result;
import de.dhbwstuttgart.syntaxtree.type.RefTypeOrTPHOrWildcardOrGeneric; import de.dhbwstuttgart.syntaxtree.type.RefTypeOrTPHOrWildcardOrGeneric;
/** /**
* Paare, welche das Unifikationsergebnis darstellen * Paare, welche das Unifikationsergebnis darstellen
*/ */
public abstract class ResultPair<A extends RefTypeOrTPHOrWildcardOrGeneric,B extends RefTypeOrTPHOrWildcardOrGeneric> { public abstract class ResultPair<A extends RefTypeOrTPHOrWildcardOrGeneric,B extends RefTypeOrTPHOrWildcardOrGeneric> {
private final A left; private final A left;
private final B right; private final B right;
public abstract void accept(ResultPairVisitor visitor); public abstract void accept(ResultPairVisitor visitor);
public ResultPair(A left, B right){ public ResultPair(A left, B right){
this.left = left; this.left = left;
this.right = right; this.right = right;
} }
public A getLeft() { public A getLeft() {
return left; return left;
} }
public B getRight() { public B getRight() {
return right; return right;
} }
public String toString() { public String toString() {
return "(" + left.toString() + ", " + right.toString() + ")"; return "(" + left.toString() + ", " + right.toString() + ")";
} }
@Override @Override
public int hashCode() { public int hashCode() {
final int prime = 31; final int prime = 31;
int result = 1; int result = 1;
result = prime * result + ((left == null) ? 0 : left.getOffset().hashCode()); result = prime * result + ((left == null) ? 0 : left.getOffset().hashCode());
result = prime * result + ((right == null) ? 0 : right.getOffset().hashCode()); result = prime * result + ((right == null) ? 0 : right.getOffset().hashCode());
return result; return result;
} }
@Override @Override
public boolean equals(Object obj) { public boolean equals(Object obj) {
if (this == obj) if (this == obj)
return true; return true;
if (obj == null) if (obj == null)
return false; return false;
if (getClass() != obj.getClass()) if (getClass() != obj.getClass())
return false; return false;
ResultPair<?,?> other = (ResultPair<?,?>) obj; ResultPair<?,?> other = (ResultPair<?,?>) obj;
if (left == null) { if (left == null) {
if (other.left != null) if (other.left != null)
return false; return false;
} else if (!left.getOffset().equals(other.left.getOffset())) } else if (!left.getOffset().equals(other.left.getOffset()))
return false; return false;
if (right == null) { if (right == null) {
if (other.right != null) if (other.right != null)
return false; return false;
} else if (!right.getOffset().equals(other.right.getOffset())) } else if (!right.getOffset().equals(other.right.getOffset()))
return false; return false;
return true; return true;
} }
} }

View File

@ -1,309 +1,309 @@
package de.dhbwstuttgart.typeinference.result; package de.dhbwstuttgart.typeinference.result;
import java.util.HashSet; import java.util.HashSet;
import java.util.Set; import java.util.Set;
import de.dhbwstuttgart.exceptions.NotImplementedException; import de.dhbwstuttgart.exceptions.NotImplementedException;
import de.dhbwstuttgart.syntaxtree.type.ExtendsWildcardType; import de.dhbwstuttgart.syntaxtree.type.ExtendsWildcardType;
import de.dhbwstuttgart.syntaxtree.type.GenericRefType; import de.dhbwstuttgart.syntaxtree.type.GenericRefType;
import de.dhbwstuttgart.syntaxtree.type.RefType; import de.dhbwstuttgart.syntaxtree.type.RefType;
import de.dhbwstuttgart.syntaxtree.type.RefTypeOrTPHOrWildcardOrGeneric; import de.dhbwstuttgart.syntaxtree.type.RefTypeOrTPHOrWildcardOrGeneric;
import de.dhbwstuttgart.syntaxtree.type.SuperWildcardType; import de.dhbwstuttgart.syntaxtree.type.SuperWildcardType;
import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder;
@SuppressWarnings("rawtypes") @SuppressWarnings("rawtypes")
public class ResultSet { public class ResultSet {
public final Set<ResultPair> results; public final Set<ResultPair> results;
public Set<ResultPair<TypePlaceholder, TypePlaceholder>> genIns; public Set<ResultPair<TypePlaceholder, TypePlaceholder>> genIns;
public ResultSet(Set<ResultPair> set){ public ResultSet(Set<ResultPair> set){
this.results = set; this.results = set;
this.genIns = new HashSet<>(); this.genIns = new HashSet<>();
results.forEach(x -> { if (x instanceof PairTPHsmallerTPH) { this.genIns.add(x);}} ); results.forEach(x -> { if (x instanceof PairTPHsmallerTPH) { this.genIns.add(x);}} );
} }
public boolean contains(ResultPair toCheck) { public boolean contains(ResultPair toCheck) {
return this.results.contains(toCheck); return this.results.contains(toCheck);
} }
public void remove(ResultPair toCheck) { public void remove(ResultPair toCheck) {
results.remove(toCheck); results.remove(toCheck);
} }
public ResolvedType resolveType(RefTypeOrTPHOrWildcardOrGeneric type) { public ResolvedType resolveType(RefTypeOrTPHOrWildcardOrGeneric type) {
if(type instanceof TypePlaceholder) if(type instanceof TypePlaceholder)
return new Resolver(this).resolve((TypePlaceholder)type); return new Resolver(this).resolve((TypePlaceholder)type);
if(type instanceof GenericRefType)return new ResolvedType(type, new HashSet<>()); if(type instanceof GenericRefType)return new ResolvedType(type, new HashSet<>());
if(type instanceof RefType) { if(type instanceof RefType) {
RelatedTypeWalker related = new RelatedTypeWalker(null, this); RelatedTypeWalker related = new RelatedTypeWalker(null, this);
type.accept(related); type.accept(related);
return new ResolvedType(type, related.relatedTPHs); return new ResolvedType(type, related.relatedTPHs);
} else { } else {
throw new NotImplementedException(); throw new NotImplementedException();
//return new ResolvedType(type,new HashSet<>()); //return new ResolvedType(type,new HashSet<>());
} }
} }
public String toString() { public String toString() {
return results.toString(); return results.toString();
} }
@Override @Override
public boolean equals(Object o) { public boolean equals(Object o) {
if (o instanceof ResultSet) { if (o instanceof ResultSet) {
ResultSet other = (ResultSet)o; ResultSet other = (ResultSet)o;
return this.results.equals(other.results); return this.results.equals(other.results);
} else { } else {
return false; return false;
} }
} }
@Override @Override
public int hashCode() { public int hashCode() {
return results.hashCode(); return results.hashCode();
} }
} }
class Resolver implements ResultSetVisitor { class Resolver implements ResultSetVisitor {
private final ResultSet result; private final ResultSet result;
private TypePlaceholder toResolve; private TypePlaceholder toResolve;
private RefTypeOrTPHOrWildcardOrGeneric resolved; private RefTypeOrTPHOrWildcardOrGeneric resolved;
private final Set<GenericInsertPair> additionalTPHs = new HashSet<>(); private final Set<GenericInsertPair> additionalTPHs = new HashSet<>();
private ResultPair<?,?> currentPair; private ResultPair<?,?> currentPair;
public Resolver(ResultSet resultPairs){ public Resolver(ResultSet resultPairs){
this.result = resultPairs; this.result = resultPairs;
} }
public ResolvedType resolve(TypePlaceholder tph){ public ResolvedType resolve(TypePlaceholder tph){
toResolve = tph; toResolve = tph;
resolved = null; resolved = null;
System.out.println(tph.toString()); System.out.println(tph.toString());
for(ResultPair<?,?> resultPair : result.results) { for(ResultPair<?,?> resultPair : result.results) {
if(resultPair instanceof PairTPHEqualTPH && ((PairTPHEqualTPH) resultPair).getLeft().equals(toResolve)){ if(resultPair instanceof PairTPHEqualTPH && ((PairTPHEqualTPH) resultPair).getLeft().equals(toResolve)){
currentPair = resultPair; currentPair = resultPair;
return resolve(((PairTPHEqualTPH) resultPair).getRight()); return resolve(((PairTPHEqualTPH) resultPair).getRight());
} }
} }
for(ResultPair<?,?> resultPair : result.results){ for(ResultPair<?,?> resultPair : result.results){
currentPair = resultPair; currentPair = resultPair;
resultPair.accept(this); resultPair.accept(this);
} }
if(resolved==null){//TPH kommt nicht im Result vor: if(resolved==null){//TPH kommt nicht im Result vor:
resolved = tph; resolved = tph;
} }
ResolvedType result = new ResolvedType(resolved, additionalTPHs);//resolved; ResolvedType result = new ResolvedType(resolved, additionalTPHs);//resolved;
result.setResultPair(currentPair); result.setResultPair(currentPair);
return result; return result;
} }
@Override @Override
public void visit(PairTPHsmallerTPH p) { public void visit(PairTPHsmallerTPH p) {
currentPair = p; currentPair = p;
if(p.left.equals(toResolve)){ if(p.left.equals(toResolve)){
additionalTPHs.add(new GenericInsertPair(p.left, p.right)); additionalTPHs.add(new GenericInsertPair(p.left, p.right));
additionalTPHs.addAll(new RelatedTypeWalker(p.right, result).relatedTPHs); additionalTPHs.addAll(new RelatedTypeWalker(p.right, result).relatedTPHs);
} }
if(p.right.equals(toResolve)) if(p.right.equals(toResolve))
additionalTPHs.addAll(new RelatedTypeWalker(p.left, result).relatedTPHs); additionalTPHs.addAll(new RelatedTypeWalker(p.left, result).relatedTPHs);
} }
@Override @Override
public void visit(PairTPHequalRefTypeOrWildcardType p) { public void visit(PairTPHequalRefTypeOrWildcardType p) {
currentPair = p; currentPair = p;
if(p.left.equals(toResolve)){ if(p.left.equals(toResolve)){
resolved = p.right; resolved = p.right;
RelatedTypeWalker related = new RelatedTypeWalker(null, result); RelatedTypeWalker related = new RelatedTypeWalker(null, result);
p.right.accept(related); p.right.accept(related);
additionalTPHs.addAll(related.relatedTPHs); additionalTPHs.addAll(related.relatedTPHs);
} }
} }
@Override @Override
public void visit(PairTPHEqualTPH p) { public void visit(PairTPHEqualTPH p) {
//Do nothing. Dieser Fall wird in der resolve-Methode abgefangen //Do nothing. Dieser Fall wird in der resolve-Methode abgefangen
} }
@Override @Override
public void visit(RefType refType) { public void visit(RefType refType) {
} }
@Override @Override
public void visit(GenericRefType genericRefType) { public void visit(GenericRefType genericRefType) {
} }
@Override @Override
public void visit(SuperWildcardType superWildcardType) { public void visit(SuperWildcardType superWildcardType) {
} }
@Override @Override
public void visit(TypePlaceholder typePlaceholder) { public void visit(TypePlaceholder typePlaceholder) {
} }
@Override @Override
public void visit(ExtendsWildcardType extendsWildcardType) { public void visit(ExtendsWildcardType extendsWildcardType) {
} }
} }
/** /**
* Sucht aus dem Result Set den Sub/supertyp für einen TPH * Sucht aus dem Result Set den Sub/supertyp für einen TPH
*/ */
@SuppressWarnings("rawtypes") @SuppressWarnings("rawtypes")
class TPHResolver implements ResultSetVisitor { class TPHResolver implements ResultSetVisitor {
private final TypePlaceholder tph; private final TypePlaceholder tph;
Set<GenericInsertPair> resolved = new HashSet<>(); Set<GenericInsertPair> resolved = new HashSet<>();
private final ResultSet resultSet; private final ResultSet resultSet;
TPHResolver(TypePlaceholder tph, ResultSet resultSet){ TPHResolver(TypePlaceholder tph, ResultSet resultSet){
this.resultSet = resultSet; this.resultSet = resultSet;
this.tph = tph; this.tph = tph;
for(ResultPair p : resultSet.results){ for(ResultPair p : resultSet.results){
p.accept(this); p.accept(this);
} }
if(resolved.size() == 0){ if(resolved.size() == 0){
resolved.add(new GenericInsertPair(tph, null)); resolved.add(new GenericInsertPair(tph, null));
} }
} }
@Override @Override
public void visit(PairTPHsmallerTPH p) { public void visit(PairTPHsmallerTPH p) {
if(p.left.equals(tph) || p.right.equals(tph)){ if(p.left.equals(tph) || p.right.equals(tph)){
resolved.add(new GenericInsertPair(p.left, p.right)); resolved.add(new GenericInsertPair(p.left, p.right));
} }
} }
@Override @Override
public void visit(PairTPHequalRefTypeOrWildcardType p) { public void visit(PairTPHequalRefTypeOrWildcardType p) {
TypePlaceholder otherSide = null; TypePlaceholder otherSide = null;
if(p.right.equals(tph)){ if(p.right.equals(tph)){
otherSide = p.left; otherSide = p.left;
} }
if(otherSide != null){ if(otherSide != null){
Set<ResultPair> newResultSet = new HashSet<>(this.resultSet.results); Set<ResultPair> newResultSet = new HashSet<>(this.resultSet.results);
newResultSet.remove(p); newResultSet.remove(p);
resolved.addAll(new TPHResolver(otherSide, new ResultSet(newResultSet)).resolved); resolved.addAll(new TPHResolver(otherSide, new ResultSet(newResultSet)).resolved);
} }
} }
@Override @Override
public void visit(PairTPHEqualTPH p) { public void visit(PairTPHEqualTPH p) {
//ignorieren. Wird vom Resolver behandelt //ignorieren. Wird vom Resolver behandelt
} }
@Override @Override
public void visit(RefType refType) { public void visit(RefType refType) {
} }
@Override @Override
public void visit(GenericRefType genericRefType) { public void visit(GenericRefType genericRefType) {
} }
@Override @Override
public void visit(SuperWildcardType superWildcardType) { public void visit(SuperWildcardType superWildcardType) {
} }
@Override @Override
public void visit(TypePlaceholder typePlaceholder) { public void visit(TypePlaceholder typePlaceholder) {
} }
@Override @Override
public void visit(ExtendsWildcardType extendsWildcardType) { public void visit(ExtendsWildcardType extendsWildcardType) {
} }
} }
@SuppressWarnings("rawtypes") @SuppressWarnings("rawtypes")
class RelatedTypeWalker implements ResultSetVisitor { class RelatedTypeWalker implements ResultSetVisitor {
final Set<GenericInsertPair> relatedTPHs = new HashSet<>(); final Set<GenericInsertPair> relatedTPHs = new HashSet<>();
private final TypePlaceholder toResolve; private final TypePlaceholder toResolve;
private final ResultSet resultSet; private final ResultSet resultSet;
/** /**
* Läuft über das resultSet und speichert alle TPHs, welche mit start in Verbindung stehen * Läuft über das resultSet und speichert alle TPHs, welche mit start in Verbindung stehen
* @param start - kann null sein, wenn der Walker für einen RefType benutzt wird * @param start - kann null sein, wenn der Walker für einen RefType benutzt wird
* @param resultSet * @param resultSet
*/ */
RelatedTypeWalker(TypePlaceholder start, ResultSet resultSet){ RelatedTypeWalker(TypePlaceholder start, ResultSet resultSet){
this.toResolve = start; this.toResolve = start;
this.resultSet = resultSet; this.resultSet = resultSet;
int resolved = 0; int resolved = 0;
do{ do{
resolved = relatedTPHs.size(); resolved = relatedTPHs.size();
for(ResultPair p : resultSet.results){ for(ResultPair p : resultSet.results){
p.accept(this); p.accept(this);
p.accept(this); p.accept(this);
} }
}while(resolved - relatedTPHs.size() > 0); }while(resolved - relatedTPHs.size() > 0);
} }
@Override @Override
public void visit(PairTPHsmallerTPH p) { public void visit(PairTPHsmallerTPH p) {
if(p.getRight().equals(toResolve)){ if(p.getRight().equals(toResolve)){
relatedTPHs.addAll(new TPHResolver(p.right, resultSet).resolved); relatedTPHs.addAll(new TPHResolver(p.right, resultSet).resolved);
//relatedTPHs.addAll(new RelatedTypeWalker(p.right, resultSet).relatedTPHs); //relatedTPHs.addAll(new RelatedTypeWalker(p.right, resultSet).relatedTPHs);
} }
if(p.getLeft().equals(toResolve)){ if(p.getLeft().equals(toResolve)){
relatedTPHs.addAll(new TPHResolver(p.left, resultSet).resolved); relatedTPHs.addAll(new TPHResolver(p.left, resultSet).resolved);
//relatedTPHs.addAll(new RelatedTypeWalker(p.left, resultSet).relatedTPHs); //relatedTPHs.addAll(new RelatedTypeWalker(p.left, resultSet).relatedTPHs);
} }
} }
@Override @Override
public void visit(PairTPHequalRefTypeOrWildcardType p) { public void visit(PairTPHequalRefTypeOrWildcardType p) {
if(p.getLeft().equals(toResolve)){ if(p.getLeft().equals(toResolve)){
p.getRight().accept(this); p.getRight().accept(this);
} }
} }
@Override @Override
public void visit(PairTPHEqualTPH p) { public void visit(PairTPHEqualTPH p) {
//Kann ignoriert werden. Diese Fälle werden vom Resolver behandelt //Kann ignoriert werden. Diese Fälle werden vom Resolver behandelt
} }
/* /*
Die folgenden Funktionen fügen alle TPHs an die relatedTPHs an, denen sie begegnen: Die folgenden Funktionen fügen alle TPHs an die relatedTPHs an, denen sie begegnen:
Das wird verwendet, wenn alle relatedTPHs aus den Parametern eines RefTypes angefügt werden sollen Das wird verwendet, wenn alle relatedTPHs aus den Parametern eines RefTypes angefügt werden sollen
*/ */
@Override @Override
public void visit(RefType refType) { public void visit(RefType refType) {
for(RefTypeOrTPHOrWildcardOrGeneric param : refType.getParaList()){ for(RefTypeOrTPHOrWildcardOrGeneric param : refType.getParaList()){
param.accept(this); param.accept(this);
} }
} }
@Override @Override
public void visit(SuperWildcardType superWildcardType) { public void visit(SuperWildcardType superWildcardType) {
superWildcardType.getInnerType().accept(this); superWildcardType.getInnerType().accept(this);
} }
@Override @Override
public void visit(TypePlaceholder typePlaceholder) { public void visit(TypePlaceholder typePlaceholder) {
relatedTPHs.addAll(new TPHResolver(typePlaceholder, resultSet).resolved); relatedTPHs.addAll(new TPHResolver(typePlaceholder, resultSet).resolved);
} }
@Override @Override
public void visit(ExtendsWildcardType extendsWildcardType) { public void visit(ExtendsWildcardType extendsWildcardType) {
extendsWildcardType.getInnerType().accept(this); extendsWildcardType.getInnerType().accept(this);
} }
@Override @Override
public void visit(GenericRefType genericRefType) { public void visit(GenericRefType genericRefType) {
} }
} }

View File

@ -1,23 +1,23 @@
package de.dhbwstuttgart.typeinference.unify; package de.dhbwstuttgart.typeinference.unify;
import java.util.List; import java.util.List;
import java.util.Set; import java.util.Set;
import com.google.common.collect.Sets; import com.google.common.collect.Sets;
import de.dhbwstuttgart.typeinference.unify.interfaces.ISetOperations; import de.dhbwstuttgart.typeinference.unify.interfaces.ISetOperations;
/** /**
* Implements set operations using google guava. * Implements set operations using google guava.
* @author DH10STF * @author DH10STF
* *
*/ */
public class GuavaSetOperations implements ISetOperations { public class GuavaSetOperations implements ISetOperations {
@Override @Override
public <B> Set<List<B>> cartesianProduct(List<? extends Set<? extends B>> sets) { public <B> Set<List<B>> cartesianProduct(List<? extends Set<? extends B>> sets) {
// Wraps the call to google guava // Wraps the call to google guava
return Sets.cartesianProduct(sets); return Sets.cartesianProduct(sets);
} }
} }

View File

@ -1,108 +1,108 @@
package de.dhbwstuttgart.typeinference.unify; package de.dhbwstuttgart.typeinference.unify;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashSet; import java.util.HashSet;
import java.util.Iterator; import java.util.Iterator;
import java.util.Optional; import java.util.Optional;
import java.util.Set; import java.util.Set;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import de.dhbwstuttgart.typeinference.unify.interfaces.IUnify; import de.dhbwstuttgart.typeinference.unify.interfaces.IUnify;
import de.dhbwstuttgart.typeinference.unify.model.PairOperator; import de.dhbwstuttgart.typeinference.unify.model.PairOperator;
import de.dhbwstuttgart.typeinference.unify.model.PlaceholderType; import de.dhbwstuttgart.typeinference.unify.model.PlaceholderType;
import de.dhbwstuttgart.typeinference.unify.model.TypeParams; import de.dhbwstuttgart.typeinference.unify.model.TypeParams;
import de.dhbwstuttgart.typeinference.unify.model.Unifier; import de.dhbwstuttgart.typeinference.unify.model.Unifier;
import de.dhbwstuttgart.typeinference.unify.model.UnifyPair; import de.dhbwstuttgart.typeinference.unify.model.UnifyPair;
import de.dhbwstuttgart.typeinference.unify.model.UnifyType; import de.dhbwstuttgart.typeinference.unify.model.UnifyType;
/** /**
* Implementation of the Martelli-Montanari unification algorithm. * Implementation of the Martelli-Montanari unification algorithm.
* @author Florian Steurer * @author Florian Steurer
*/ */
public class MartelliMontanariUnify implements IUnify { public class MartelliMontanariUnify implements IUnify {
@Override @Override
public Optional<Unifier> unify(Set<UnifyType> terms) { public Optional<Unifier> unify(Set<UnifyType> terms) {
// Sets with less than 2 terms are trivially unified // Sets with less than 2 terms are trivially unified
if(terms.size() < 2) if(terms.size() < 2)
return Optional.of(Unifier.identity()); return Optional.of(Unifier.identity());
// For the the set of terms {t1,...,tn}, // For the the set of terms {t1,...,tn},
// build a list of equations {(t1 = t2), (t2 = t3), (t3 = t4), ....} // build a list of equations {(t1 = t2), (t2 = t3), (t3 = t4), ....}
ArrayList<UnifyPair> termsList = new ArrayList<UnifyPair>(); ArrayList<UnifyPair> termsList = new ArrayList<UnifyPair>();
Iterator<UnifyType> iter = terms.iterator(); Iterator<UnifyType> iter = terms.iterator();
UnifyType prev = iter.next(); UnifyType prev = iter.next();
while(iter.hasNext()) { while(iter.hasNext()) {
UnifyType next = iter.next(); UnifyType next = iter.next();
termsList.add(new UnifyPair(prev, next, PairOperator.EQUALSDOT)); termsList.add(new UnifyPair(prev, next, PairOperator.EQUALSDOT));
prev = next; prev = next;
} }
// Start with the identity unifier. Substitutions will be added later. // Start with the identity unifier. Substitutions will be added later.
Unifier mgu = Unifier.identity(); Unifier mgu = Unifier.identity();
// Apply rules while possible // Apply rules while possible
int idx = 0; int idx = 0;
while(idx < termsList.size()) { while(idx < termsList.size()) {
UnifyPair pair = termsList.get(idx); UnifyPair pair = termsList.get(idx);
UnifyType rhsType = pair.getRhsType(); UnifyType rhsType = pair.getRhsType();
UnifyType lhsType = pair.getLhsType(); UnifyType lhsType = pair.getLhsType();
TypeParams rhsTypeParams = rhsType.getTypeParams(); TypeParams rhsTypeParams = rhsType.getTypeParams();
TypeParams lhsTypeParams = lhsType.getTypeParams(); TypeParams lhsTypeParams = lhsType.getTypeParams();
// REDUCE - Rule // REDUCE - Rule
if(!(rhsType instanceof PlaceholderType) && !(lhsType instanceof PlaceholderType)) { if(!(rhsType instanceof PlaceholderType) && !(lhsType instanceof PlaceholderType)) {
Set<UnifyPair> result = new HashSet<>(); Set<UnifyPair> result = new HashSet<>();
// f<...> = g<...> with f != g are not unifiable // f<...> = g<...> with f != g are not unifiable
if(!rhsType.getName().equals(lhsType.getName())) if(!rhsType.getName().equals(lhsType.getName()))
return Optional.empty(); // conflict return Optional.empty(); // conflict
// f<t1,...,tn> = f<s1,...,sm> are not unifiable // f<t1,...,tn> = f<s1,...,sm> are not unifiable
if(rhsTypeParams.size() != lhsTypeParams.size()) if(rhsTypeParams.size() != lhsTypeParams.size())
return Optional.empty(); // conflict return Optional.empty(); // conflict
// f = g is not unifiable (cannot be f = f because erase rule would have been applied) // f = g is not unifiable (cannot be f = f because erase rule would have been applied)
//if(rhsTypeParams.size() == 0) //if(rhsTypeParams.size() == 0)
//return Optional.empty(); //return Optional.empty();
// Unpack the arguments // Unpack the arguments
for(int i = 0; i < rhsTypeParams.size(); i++) for(int i = 0; i < rhsTypeParams.size(); i++)
result.add(new UnifyPair(rhsTypeParams.get(i), lhsTypeParams.get(i), PairOperator.EQUALSDOT)); result.add(new UnifyPair(rhsTypeParams.get(i), lhsTypeParams.get(i), PairOperator.EQUALSDOT));
termsList.remove(idx); termsList.remove(idx);
termsList.addAll(result); termsList.addAll(result);
continue; continue;
} }
// DELETE - Rule // DELETE - Rule
if(pair.getRhsType().equals(pair.getLhsType())) { if(pair.getRhsType().equals(pair.getLhsType())) {
termsList.remove(idx); termsList.remove(idx);
continue; continue;
} }
// SWAP - Rule // SWAP - Rule
if(!(lhsType instanceof PlaceholderType) && (rhsType instanceof PlaceholderType)) { if(!(lhsType instanceof PlaceholderType) && (rhsType instanceof PlaceholderType)) {
termsList.remove(idx); termsList.remove(idx);
termsList.add(new UnifyPair(rhsType, lhsType, PairOperator.EQUALSDOT)); termsList.add(new UnifyPair(rhsType, lhsType, PairOperator.EQUALSDOT));
continue; continue;
} }
// OCCURS-CHECK // OCCURS-CHECK
if(pair.getLhsType() instanceof PlaceholderType if(pair.getLhsType() instanceof PlaceholderType
&& pair.getRhsType().getTypeParams().occurs((PlaceholderType) pair.getLhsType())) && pair.getRhsType().getTypeParams().occurs((PlaceholderType) pair.getLhsType()))
return Optional.empty(); return Optional.empty();
// SUBST - Rule // SUBST - Rule
if(lhsType instanceof PlaceholderType) { if(lhsType instanceof PlaceholderType) {
mgu.add((PlaceholderType) lhsType, rhsType); mgu.add((PlaceholderType) lhsType, rhsType);
//PL 2018-04-01 nach checken, ob es richtig ist, dass keine Substitutionen uebergeben werden muessen. //PL 2018-04-01 nach checken, ob es richtig ist, dass keine Substitutionen uebergeben werden muessen.
termsList = termsList.stream().map(x -> mgu.apply(x)).collect(Collectors.toCollection(ArrayList::new)); termsList = termsList.stream().map(x -> mgu.apply(x)).collect(Collectors.toCollection(ArrayList::new));
idx = idx+1 == termsList.size() ? 0 : idx+1; idx = idx+1 == termsList.size() ? 0 : idx+1;
continue; continue;
} }
idx++; idx++;
} }
return Optional.of(mgu); return Optional.of(mgu);
} }
} }

View File

@ -1,91 +1,91 @@
package de.dhbwstuttgart.typeinference.unify; package de.dhbwstuttgart.typeinference.unify;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashSet; import java.util.HashSet;
import java.util.Iterator; import java.util.Iterator;
import java.util.Optional; import java.util.Optional;
import java.util.Set; import java.util.Set;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import de.dhbwstuttgart.typeinference.unify.interfaces.IMatch; import de.dhbwstuttgart.typeinference.unify.interfaces.IMatch;
import de.dhbwstuttgart.typeinference.unify.model.PairOperator; import de.dhbwstuttgart.typeinference.unify.model.PairOperator;
import de.dhbwstuttgart.typeinference.unify.model.PlaceholderType; import de.dhbwstuttgart.typeinference.unify.model.PlaceholderType;
import de.dhbwstuttgart.typeinference.unify.model.TypeParams; import de.dhbwstuttgart.typeinference.unify.model.TypeParams;
import de.dhbwstuttgart.typeinference.unify.model.Unifier; import de.dhbwstuttgart.typeinference.unify.model.Unifier;
import de.dhbwstuttgart.typeinference.unify.model.UnifyPair; import de.dhbwstuttgart.typeinference.unify.model.UnifyPair;
import de.dhbwstuttgart.typeinference.unify.model.UnifyType; import de.dhbwstuttgart.typeinference.unify.model.UnifyType;
/** /**
* Implementation of match derived from unification algorithm. * Implementation of match derived from unification algorithm.
* @author Martin Pluemicke * @author Martin Pluemicke
*/ */
public class Match implements IMatch { public class Match implements IMatch {
@Override @Override
//A<X> =. A<Integer> ==> True //A<X> =. A<Integer> ==> True
//A<Integer> =. A<X> ==> False //A<Integer> =. A<X> ==> False
public Optional<Unifier> match(ArrayList<UnifyPair> termsList) { public Optional<Unifier> match(ArrayList<UnifyPair> termsList) {
// Start with the identity unifier. Substitutions will be added later. // Start with the identity unifier. Substitutions will be added later.
Unifier mgu = Unifier.identity(); Unifier mgu = Unifier.identity();
// Apply rules while possible // Apply rules while possible
int idx = 0; int idx = 0;
while(idx < termsList.size()) { while(idx < termsList.size()) {
UnifyPair pair = termsList.get(idx); UnifyPair pair = termsList.get(idx);
UnifyType rhsType = pair.getRhsType(); UnifyType rhsType = pair.getRhsType();
UnifyType lhsType = pair.getLhsType(); UnifyType lhsType = pair.getLhsType();
TypeParams rhsTypeParams = rhsType.getTypeParams(); TypeParams rhsTypeParams = rhsType.getTypeParams();
TypeParams lhsTypeParams = lhsType.getTypeParams(); TypeParams lhsTypeParams = lhsType.getTypeParams();
// REDUCE - Rule // REDUCE - Rule
if(!(rhsType instanceof PlaceholderType) && !(lhsType instanceof PlaceholderType)) { if(!(rhsType instanceof PlaceholderType) && !(lhsType instanceof PlaceholderType)) {
Set<UnifyPair> result = new HashSet<>(); Set<UnifyPair> result = new HashSet<>();
// f<...> = g<...> with f != g are not unifiable // f<...> = g<...> with f != g are not unifiable
if(!rhsType.getName().equals(lhsType.getName())) if(!rhsType.getName().equals(lhsType.getName()))
return Optional.empty(); // conflict return Optional.empty(); // conflict
// f<t1,...,tn> = f<s1,...,sm> are not unifiable // f<t1,...,tn> = f<s1,...,sm> are not unifiable
if(rhsTypeParams.size() != lhsTypeParams.size()) if(rhsTypeParams.size() != lhsTypeParams.size())
return Optional.empty(); // conflict return Optional.empty(); // conflict
// f = g is not unifiable (cannot be f = f because erase rule would have been applied) // f = g is not unifiable (cannot be f = f because erase rule would have been applied)
//if(rhsTypeParams.size() == 0) //if(rhsTypeParams.size() == 0)
//return Optional.empty(); //return Optional.empty();
// Unpack the arguments // Unpack the arguments
for(int i = 0; i < rhsTypeParams.size(); i++) for(int i = 0; i < rhsTypeParams.size(); i++)
result.add(new UnifyPair(lhsTypeParams.get(i), rhsTypeParams.get(i), PairOperator.EQUALSDOT)); result.add(new UnifyPair(lhsTypeParams.get(i), rhsTypeParams.get(i), PairOperator.EQUALSDOT));
termsList.remove(idx); termsList.remove(idx);
termsList.addAll(result); termsList.addAll(result);
continue; continue;
} }
// DELETE - Rule // DELETE - Rule
if(pair.getRhsType().equals(pair.getLhsType())) { if(pair.getRhsType().equals(pair.getLhsType())) {
termsList.remove(idx); termsList.remove(idx);
continue; continue;
} }
// SWAP - Rule // SWAP - Rule
if(!(lhsType instanceof PlaceholderType) && (rhsType instanceof PlaceholderType)) { if(!(lhsType instanceof PlaceholderType) && (rhsType instanceof PlaceholderType)) {
return Optional.empty(); // conflict return Optional.empty(); // conflict
} }
// OCCURS-CHECK // OCCURS-CHECK
//deleted //deleted
// SUBST - Rule // SUBST - Rule
if(lhsType instanceof PlaceholderType) { if(lhsType instanceof PlaceholderType) {
mgu.add((PlaceholderType) lhsType, rhsType); mgu.add((PlaceholderType) lhsType, rhsType);
termsList = termsList.stream().map(mgu::applyleft).collect(Collectors.toCollection(ArrayList::new)); termsList = termsList.stream().map(mgu::applyleft).collect(Collectors.toCollection(ArrayList::new));
idx = idx+1 == termsList.size() ? 0 : idx+1; idx = idx+1 == termsList.size() ? 0 : idx+1;
continue; continue;
} }
idx++; idx++;
} }
return Optional.of(mgu); return Optional.of(mgu);
} }
} }

File diff suppressed because it is too large Load Diff

View File

@ -1,121 +1,121 @@
package de.dhbwstuttgart.typeinference.unify; package de.dhbwstuttgart.typeinference.unify;
import java.io.FileWriter; import java.io.FileWriter;
import java.io.IOException; import java.io.IOException;
import java.io.Writer; import java.io.Writer;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Set; import java.util.Set;
import java.util.concurrent.ForkJoinPool; import java.util.concurrent.ForkJoinPool;
import de.dhbwstuttgart.core.JavaTXCompiler; import de.dhbwstuttgart.core.JavaTXCompiler;
import de.dhbwstuttgart.typeinference.constraints.Constraint; import de.dhbwstuttgart.typeinference.constraints.Constraint;
import de.dhbwstuttgart.typeinference.constraints.ConstraintSet; import de.dhbwstuttgart.typeinference.constraints.ConstraintSet;
import de.dhbwstuttgart.typeinference.constraints.Pair; import de.dhbwstuttgart.typeinference.constraints.Pair;
import de.dhbwstuttgart.typeinference.unify.interfaces.IFiniteClosure; import de.dhbwstuttgart.typeinference.unify.interfaces.IFiniteClosure;
import de.dhbwstuttgart.typeinference.unify.model.FiniteClosure; import de.dhbwstuttgart.typeinference.unify.model.FiniteClosure;
import de.dhbwstuttgart.typeinference.unify.model.UnifyPair; import de.dhbwstuttgart.typeinference.unify.model.UnifyPair;
public class TypeUnify { public class TypeUnify {
/** /**
* unify parallel ohne result modell * unify parallel ohne result modell
* @param undConstrains * @param undConstrains
* @param oderConstraints * @param oderConstraints
* @param fc * @param fc
* @param logFile * @param logFile
* @param log * @param log
* @param cons * @param cons
* @return * @return
*/ */
public Set<Set<UnifyPair>> unify(Set<UnifyPair> undConstrains, List<Set<Set<UnifyPair>>> oderConstraints, IFiniteClosure fc, Writer logFile, Boolean log, UnifyResultModel ret, UnifyTaskModel usedTasks) { public Set<Set<UnifyPair>> unify(Set<UnifyPair> undConstrains, List<Set<Set<UnifyPair>>> oderConstraints, IFiniteClosure fc, Writer logFile, Boolean log, UnifyResultModel ret, UnifyTaskModel usedTasks) {
TypeUnifyTask unifyTask = new TypeUnifyTask(undConstrains, oderConstraints, fc, true, logFile, log, 0, ret, usedTasks); TypeUnifyTask unifyTask = new TypeUnifyTask(undConstrains, oderConstraints, fc, true, logFile, log, 0, ret, usedTasks);
ForkJoinPool pool = new ForkJoinPool(); ForkJoinPool pool = new ForkJoinPool();
pool.invoke(unifyTask); pool.invoke(unifyTask);
Set<Set<UnifyPair>> res = unifyTask.join(); Set<Set<UnifyPair>> res = unifyTask.join();
try { try {
logFile.write("\nnoShortendElements: " + unifyTask.noShortendElements + "\n"); logFile.write("\nnoShortendElements: " + unifyTask.noShortendElements + "\n");
logFile.flush(); logFile.flush();
} }
catch (IOException e) { catch (IOException e) {
System.err.println("no log-File"); System.err.println("no log-File");
} }
return res; return res;
} }
/** /**
* unify asynchron mit Rückgabe UnifyResultModel ohne dass alle results gesammelt sind * unify asynchron mit Rückgabe UnifyResultModel ohne dass alle results gesammelt sind
* @param undConstrains * @param undConstrains
* @param oderConstraints * @param oderConstraints
* @param fc * @param fc
* @param logFile * @param logFile
* @param log * @param log
* @param cons * @param cons
* @param ret * @param ret
* @return * @return
*/ */
public UnifyResultModel unifyAsync(Set<UnifyPair> undConstrains, List<Set<Set<UnifyPair>>> oderConstraints, IFiniteClosure fc, Writer logFile, Boolean log, UnifyResultModel ret, UnifyTaskModel usedTasks) { public UnifyResultModel unifyAsync(Set<UnifyPair> undConstrains, List<Set<Set<UnifyPair>>> oderConstraints, IFiniteClosure fc, Writer logFile, Boolean log, UnifyResultModel ret, UnifyTaskModel usedTasks) {
TypeUnifyTask unifyTask = new TypeUnifyTask(undConstrains, oderConstraints, fc, true, logFile, log, 0, ret, usedTasks); TypeUnifyTask unifyTask = new TypeUnifyTask(undConstrains, oderConstraints, fc, true, logFile, log, 0, ret, usedTasks);
ForkJoinPool pool = new ForkJoinPool(); ForkJoinPool pool = new ForkJoinPool();
pool.invoke(unifyTask); pool.invoke(unifyTask);
return ret; return ret;
} }
/** /**
* unify parallel mit Rückgabe UnifyResultModel nachdem alle results gesammelt sind * unify parallel mit Rückgabe UnifyResultModel nachdem alle results gesammelt sind
* @param undConstrains * @param undConstrains
* @param oderConstraints * @param oderConstraints
* @param fc * @param fc
* @param logFile * @param logFile
* @param log * @param log
* @param cons * @param cons
* @param ret * @param ret
* @return * @return
*/ */
public UnifyResultModel unifyParallel(Set<UnifyPair> undConstrains, List<Set<Set<UnifyPair>>> oderConstraints, IFiniteClosure fc, Writer logFile, Boolean log, UnifyResultModel ret, UnifyTaskModel usedTasks) { public UnifyResultModel unifyParallel(Set<UnifyPair> undConstrains, List<Set<Set<UnifyPair>>> oderConstraints, IFiniteClosure fc, Writer logFile, Boolean log, UnifyResultModel ret, UnifyTaskModel usedTasks) {
TypeUnifyTask unifyTask = new TypeUnifyTask(undConstrains, oderConstraints, fc, true, logFile, log, 0, ret, usedTasks); TypeUnifyTask unifyTask = new TypeUnifyTask(undConstrains, oderConstraints, fc, true, logFile, log, 0, ret, usedTasks);
ForkJoinPool pool = new ForkJoinPool(); ForkJoinPool pool = new ForkJoinPool();
pool.invoke(unifyTask); pool.invoke(unifyTask);
Set<Set<UnifyPair>> res = unifyTask.join(); Set<Set<UnifyPair>> res = unifyTask.join();
try { try {
logFile.write("\nnoShortendElements: " + unifyTask.noShortendElements +"\n"); logFile.write("\nnoShortendElements: " + unifyTask.noShortendElements +"\n");
logFile.flush(); logFile.flush();
} }
catch (IOException e) { catch (IOException e) {
System.err.println("no log-File"); System.err.println("no log-File");
} }
return ret; return ret;
} }
/* /*
public Set<Set<UnifyPair>> unifySequential(Set<UnifyPair> eq, IFiniteClosure fc, FileWriter logFile, Boolean log) { public Set<Set<UnifyPair>> unifySequential(Set<UnifyPair> eq, IFiniteClosure fc, FileWriter logFile, Boolean log) {
TypeUnifyTask unifyTask = new TypeUnifyTask(eq, fc, false, logFile, log); TypeUnifyTask unifyTask = new TypeUnifyTask(eq, fc, false, logFile, log);
Set<Set<UnifyPair>> res = unifyTask.compute(); Set<Set<UnifyPair>> res = unifyTask.compute();
return res; return res;
} }
*/ */
/** /**
* unify sequentiell mit oderconstraints * unify sequentiell mit oderconstraints
* @param undConstrains * @param undConstrains
* @param oderConstraints * @param oderConstraints
* @param fc * @param fc
* @param logFile * @param logFile
* @param log * @param log
* @param cons * @param cons
* @return * @return
*/ */
public Set<Set<UnifyPair>> unifyOderConstraints(Set<UnifyPair> undConstrains, List<Set<Set<UnifyPair>>> oderConstraints, IFiniteClosure fc, Writer logFile, Boolean log, UnifyResultModel ret, UnifyTaskModel usedTasks) { public Set<Set<UnifyPair>> unifyOderConstraints(Set<UnifyPair> undConstrains, List<Set<Set<UnifyPair>>> oderConstraints, IFiniteClosure fc, Writer logFile, Boolean log, UnifyResultModel ret, UnifyTaskModel usedTasks) {
TypeUnifyTask unifyTask = new TypeUnifyTask(undConstrains, oderConstraints, fc, false, logFile, log, 0, ret, usedTasks); TypeUnifyTask unifyTask = new TypeUnifyTask(undConstrains, oderConstraints, fc, false, logFile, log, 0, ret, usedTasks);
Set<Set<UnifyPair>> res = unifyTask.compute(); Set<Set<UnifyPair>> res = unifyTask.compute();
try { try {
logFile.write("\nnoShortendElements: " + unifyTask.noShortendElements +"\n"); logFile.write("\nnoShortendElements: " + unifyTask.noShortendElements +"\n");
logFile.flush(); logFile.flush();
} }
catch (IOException e) { catch (IOException e) {
System.err.println("no log-File"); System.err.println("no log-File");
} }
return res; return res;
} }
} }

View File

@ -1,68 +1,68 @@
package de.dhbwstuttgart.typeinference.unify.interfaces; package de.dhbwstuttgart.typeinference.unify.interfaces;
import java.util.Optional;
import java.util.Set;
import de.dhbwstuttgart.typeinference.unify.model.ExtendsType;
import de.dhbwstuttgart.typeinference.unify.model.FunNType;
import de.dhbwstuttgart.typeinference.unify.model.PairOperator;
import de.dhbwstuttgart.typeinference.unify.model.PlaceholderType;
import de.dhbwstuttgart.typeinference.unify.model.ReferenceType;
import de.dhbwstuttgart.typeinference.unify.model.SuperType;
import de.dhbwstuttgart.typeinference.unify.model.UnifyType;
/**
*
* @author Florian Steurer
*/
public interface IFiniteClosure {
public void setLogTrue();
/**
* Returns all types of the finite closure that are subtypes of the argument.
* @return The set of subtypes of the argument.
*/
public Set<UnifyType> smaller(UnifyType type, Set<UnifyType> fBounded);
/**
* Returns all types of the finite closure that are supertypes of the argument.
* @return The set of supertypes of the argument.
*/
public Set<UnifyType> greater(UnifyType type, Set<UnifyType> fBounded);
/**
* Wo passt Type rein?
* @param type
* @return
*/
public Set<UnifyType> grArg(UnifyType type, Set<UnifyType> fBounded);
/**
* Was passt in Type rein?
* @param type
* @return
*/
public Set<UnifyType> smArg(UnifyType type, Set<UnifyType> fBounded);
public Set<UnifyType> grArg(ReferenceType type, Set<UnifyType> fBounded);
public Set<UnifyType> smArg(ReferenceType type, Set<UnifyType> fBounded);
public Set<UnifyType> grArg(ExtendsType type, Set<UnifyType> fBounded);
public Set<UnifyType> smArg(ExtendsType type, Set<UnifyType> fBounded);
public Set<UnifyType> grArg(SuperType type, Set<UnifyType> fBounded);
public Set<UnifyType> smArg(SuperType type, Set<UnifyType> fBounded);
public Set<UnifyType> grArg(PlaceholderType type, Set<UnifyType> fBounded); import java.util.Optional;
public Set<UnifyType> smArg(PlaceholderType type, Set<UnifyType> fBounded); import java.util.Set;
import de.dhbwstuttgart.typeinference.unify.model.ExtendsType;
import de.dhbwstuttgart.typeinference.unify.model.FunNType;
import de.dhbwstuttgart.typeinference.unify.model.PairOperator;
import de.dhbwstuttgart.typeinference.unify.model.PlaceholderType;
import de.dhbwstuttgart.typeinference.unify.model.ReferenceType;
import de.dhbwstuttgart.typeinference.unify.model.SuperType;
import de.dhbwstuttgart.typeinference.unify.model.UnifyType;
/**
*
* @author Florian Steurer
*/
public interface IFiniteClosure {
public void setLogTrue();
/**
* Returns all types of the finite closure that are subtypes of the argument.
* @return The set of subtypes of the argument.
*/
public Set<UnifyType> smaller(UnifyType type, Set<UnifyType> fBounded);
/**
* Returns all types of the finite closure that are supertypes of the argument.
* @return The set of supertypes of the argument.
*/
public Set<UnifyType> greater(UnifyType type, Set<UnifyType> fBounded);
/**
* Wo passt Type rein?
* @param type
* @return
*/
public Set<UnifyType> grArg(UnifyType type, Set<UnifyType> fBounded);
/**
* Was passt in Type rein?
* @param type
* @return
*/
public Set<UnifyType> smArg(UnifyType type, Set<UnifyType> fBounded);
public Set<UnifyType> grArg(ReferenceType type, Set<UnifyType> fBounded);
public Set<UnifyType> smArg(ReferenceType type, Set<UnifyType> fBounded);
public Set<UnifyType> grArg(ExtendsType type, Set<UnifyType> fBounded);
public Set<UnifyType> smArg(ExtendsType type, Set<UnifyType> fBounded);
public Set<UnifyType> grArg(SuperType type, Set<UnifyType> fBounded);
public Set<UnifyType> smArg(SuperType type, Set<UnifyType> fBounded);
public Set<UnifyType> grArg(PlaceholderType type, Set<UnifyType> fBounded);
public Set<UnifyType> smArg(PlaceholderType type, Set<UnifyType> fBounded);
public Set<UnifyType> grArg(FunNType type, Set<UnifyType> fBounded);
public Set<UnifyType> smArg(FunNType type, Set<UnifyType> fBounded);
public Optional<UnifyType> getLeftHandedType(String typeName);
public Set<UnifyType> getAncestors(UnifyType t);
public Set<UnifyType> getChildren(UnifyType t);
public Set<UnifyType> getAllTypesByName(String typeName);
public Set<UnifyType> grArg(FunNType type, Set<UnifyType> fBounded);
public Set<UnifyType> smArg(FunNType type, Set<UnifyType> fBounded);
public Optional<UnifyType> getLeftHandedType(String typeName);
public Set<UnifyType> getAncestors(UnifyType t);
public Set<UnifyType> getChildren(UnifyType t);
public Set<UnifyType> getAllTypesByName(String typeName);
public int compare(UnifyType rhsType, UnifyType rhsType2, PairOperator pairop); public int compare(UnifyType rhsType, UnifyType rhsType2, PairOperator pairop);
} }

View File

@ -1,29 +1,29 @@
package de.dhbwstuttgart.typeinference.unify.interfaces; package de.dhbwstuttgart.typeinference.unify.interfaces;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
import java.util.Optional; import java.util.Optional;
import java.util.Set; import java.util.Set;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import de.dhbwstuttgart.typeinference.unify.model.UnifyType; import de.dhbwstuttgart.typeinference.unify.model.UnifyType;
import de.dhbwstuttgart.typeinference.unify.model.Unifier; import de.dhbwstuttgart.typeinference.unify.model.Unifier;
import de.dhbwstuttgart.typeinference.unify.model.UnifyPair; import de.dhbwstuttgart.typeinference.unify.model.UnifyPair;
/** /**
* Match * Match
* @author Martin Pluemicke * @author Martin Pluemicke
* abgeleitet aus IUnify.java * abgeleitet aus IUnify.java
*/ */
public interface IMatch { public interface IMatch {
/** /**
* Finds the most general matcher sigma of the set {t1 =. t1',...,tn =. tn'} so that * Finds the most general matcher sigma of the set {t1 =. t1',...,tn =. tn'} so that
* sigma(t1) = t1' , ... sigma(tn) = tn'. * sigma(t1) = t1' , ... sigma(tn) = tn'.
* @param terms The set of terms to be matched * @param terms The set of terms to be matched
* @return An optional of the most general matcher if it exists or an empty optional if there is no matcher. * @return An optional of the most general matcher if it exists or an empty optional if there is no matcher.
*/ */
public Optional<Unifier> match(ArrayList<UnifyPair> termsList); public Optional<Unifier> match(ArrayList<UnifyPair> termsList);
} }

View File

@ -1,102 +1,102 @@
package de.dhbwstuttgart.typeinference.unify.interfaces; package de.dhbwstuttgart.typeinference.unify.interfaces;
import java.util.List; import java.util.List;
import java.util.Optional; import java.util.Optional;
import java.util.Set; import java.util.Set;
import de.dhbwstuttgart.typeinference.unify.model.UnifyPair; import de.dhbwstuttgart.typeinference.unify.model.UnifyPair;
/** /**
* Contains the inference rules that are applied to the set Eq. * Contains the inference rules that are applied to the set Eq.
* @author Florian Steurer * @author Florian Steurer
*/ */
public interface IRuleSet { public interface IRuleSet {
public Optional<UnifyPair> reduceUp(UnifyPair pair); public Optional<UnifyPair> reduceUp(UnifyPair pair);
public Optional<UnifyPair> reduceLow(UnifyPair pair); public Optional<UnifyPair> reduceLow(UnifyPair pair);
public Optional<UnifyPair> reduceUpLow(UnifyPair pair); public Optional<UnifyPair> reduceUpLow(UnifyPair pair);
public Optional<Set<UnifyPair>> reduceExt(UnifyPair pair, IFiniteClosure fc); public Optional<Set<UnifyPair>> reduceExt(UnifyPair pair, IFiniteClosure fc);
public Optional<Set<UnifyPair>> reduceSup(UnifyPair pair, IFiniteClosure fc); public Optional<Set<UnifyPair>> reduceSup(UnifyPair pair, IFiniteClosure fc);
public Optional<Set<UnifyPair>> reduceEq(UnifyPair pair); public Optional<Set<UnifyPair>> reduceEq(UnifyPair pair);
public Optional<Set<UnifyPair>> reduce1(UnifyPair pair, IFiniteClosure fc); public Optional<Set<UnifyPair>> reduce1(UnifyPair pair, IFiniteClosure fc);
public Optional<Set<UnifyPair>> reduce2(UnifyPair pair); public Optional<Set<UnifyPair>> reduce2(UnifyPair pair);
/* /*
* Missing Reduce-Rules for Wildcards * Missing Reduce-Rules for Wildcards
*/ */
public Optional<UnifyPair> reduceWildcardLow(UnifyPair pair); public Optional<UnifyPair> reduceWildcardLow(UnifyPair pair);
public Optional<UnifyPair> reduceWildcardLowRight(UnifyPair pair); public Optional<UnifyPair> reduceWildcardLowRight(UnifyPair pair);
public Optional<UnifyPair> reduceWildcardUp(UnifyPair pair); public Optional<UnifyPair> reduceWildcardUp(UnifyPair pair);
public Optional<UnifyPair> reduceWildcardUpRight(UnifyPair pair); public Optional<UnifyPair> reduceWildcardUpRight(UnifyPair pair);
/* /*
* vgl. JAVA_BSP/Wildcard6.java * vgl. JAVA_BSP/Wildcard6.java
public Optional<UnifyPair> reduceWildcardLowUp(UnifyPair pair); public Optional<UnifyPair> reduceWildcardLowUp(UnifyPair pair);
public Optional<UnifyPair> reduceWildcardUpLow(UnifyPair pair); public Optional<UnifyPair> reduceWildcardUpLow(UnifyPair pair);
public Optional<UnifyPair> reduceWildcardLeft(UnifyPair pair); public Optional<UnifyPair> reduceWildcardLeft(UnifyPair pair);
*/ */
/* /*
* Additional Rules which replace cases of the cartesian product * Additional Rules which replace cases of the cartesian product
*/ */
/** /**
* Rule that replaces the fourth case of the cartesian product where (a <.? Theta) * Rule that replaces the fourth case of the cartesian product where (a <.? Theta)
*/ */
public Optional<UnifyPair> reduceTph(UnifyPair pair); public Optional<UnifyPair> reduceTph(UnifyPair pair);
/** /**
* Rule that replaces the sixth case of the cartesian product where (? ext Theta <.? a) * Rule that replaces the sixth case of the cartesian product where (? ext Theta <.? a)
*/ */
public Optional<Set<UnifyPair>> reduceTphExt(UnifyPair pair); public Optional<Set<UnifyPair>> reduceTphExt(UnifyPair pair);
/** /**
* Rule that replaces the fourth case of the cartesian product where (? sup Theta <.? a) * Rule that replaces the fourth case of the cartesian product where (? sup Theta <.? a)
*/ */
public Optional<Set<UnifyPair>> reduceTphSup(UnifyPair pair); public Optional<Set<UnifyPair>> reduceTphSup(UnifyPair pair);
/* /*
* FunN Rules * FunN Rules
*/ */
public Optional<Set<UnifyPair>> reduceFunN(UnifyPair pair); public Optional<Set<UnifyPair>> reduceFunN(UnifyPair pair);
public Optional<Set<UnifyPair>> greaterFunN(UnifyPair pair); public Optional<Set<UnifyPair>> greaterFunN(UnifyPair pair);
public Optional<Set<UnifyPair>> smallerFunN(UnifyPair pair); public Optional<Set<UnifyPair>> smallerFunN(UnifyPair pair);
/** /**
* Checks whether the erase1-Rule applies to the pair. * Checks whether the erase1-Rule applies to the pair.
* @return True if the pair is erasable, false otherwise. * @return True if the pair is erasable, false otherwise.
*/ */
public boolean erase1(UnifyPair pair, IFiniteClosure fc); public boolean erase1(UnifyPair pair, IFiniteClosure fc);
/** /**
* Checks whether the erase2-Rule applies to the pair. * Checks whether the erase2-Rule applies to the pair.
* @return True if the pair is erasable, false otherwise. * @return True if the pair is erasable, false otherwise.
*/ */
public boolean erase2(UnifyPair pair, IFiniteClosure fc); public boolean erase2(UnifyPair pair, IFiniteClosure fc);
/** /**
* Checks whether the erase3-Rule applies to the pair. * Checks whether the erase3-Rule applies to the pair.
* @return True if the pair is erasable, false otherwise. * @return True if the pair is erasable, false otherwise.
*/ */
public boolean erase3(UnifyPair pair); public boolean erase3(UnifyPair pair);
public Optional<UnifyPair> swap(UnifyPair pair); public Optional<UnifyPair> swap(UnifyPair pair);
public Optional<UnifyPair> adapt(UnifyPair pair, IFiniteClosure fc); public Optional<UnifyPair> adapt(UnifyPair pair, IFiniteClosure fc);
public Optional<UnifyPair> adaptExt(UnifyPair pair, IFiniteClosure fc); public Optional<UnifyPair> adaptExt(UnifyPair pair, IFiniteClosure fc);
public Optional<UnifyPair> adaptSup(UnifyPair pair, IFiniteClosure fc); public Optional<UnifyPair> adaptSup(UnifyPair pair, IFiniteClosure fc);
/** /**
* Applies the subst-Rule to a set of pairs (usually Eq'). * Applies the subst-Rule to a set of pairs (usually Eq').
* @param pairs The set of pairs where the subst rule should apply. * @param pairs The set of pairs where the subst rule should apply.
* @return An optional of the modified set, if there were any substitutions. An empty optional if there were no substitutions. * @return An optional of the modified set, if there were any substitutions. An empty optional if there were no substitutions.
*/ */
public Optional<Set<UnifyPair>> subst(Set<UnifyPair> pairs, List<Set<Set<UnifyPair>>> oderConstraints); public Optional<Set<UnifyPair>> subst(Set<UnifyPair> pairs, List<Set<Set<UnifyPair>>> oderConstraints);
/** /**
* Applies the subst-Rule to a set of pairs (usually Eq'). * Applies the subst-Rule to a set of pairs (usually Eq').
* @param pairs The set of pairs where the subst rule should apply. * @param pairs The set of pairs where the subst rule should apply.
* @return An optional of the modified set, if there were any substitutions. An empty optional if there were no substitutions. * @return An optional of the modified set, if there were any substitutions. An empty optional if there were no substitutions.
*/ */
public Optional<Set<UnifyPair>> subst(Set<UnifyPair> pairs); public Optional<Set<UnifyPair>> subst(Set<UnifyPair> pairs);
} }

View File

@ -1,16 +1,16 @@
package de.dhbwstuttgart.typeinference.unify.interfaces; package de.dhbwstuttgart.typeinference.unify.interfaces;
import java.util.List; import java.util.List;
import java.util.Set; import java.util.Set;
/** /**
* Contains operations on sets. * Contains operations on sets.
* @author Florian Steurer * @author Florian Steurer
*/ */
public interface ISetOperations { public interface ISetOperations {
/** /**
* Calculates the cartesian product of the sets. * Calculates the cartesian product of the sets.
* @return The cartesian product * @return The cartesian product
*/ */
<B> Set<List<B>> cartesianProduct(List<? extends Set<? extends B>> sets); <B> Set<List<B>> cartesianProduct(List<? extends Set<? extends B>> sets);
} }

View File

@ -1,35 +1,35 @@
package de.dhbwstuttgart.typeinference.unify.interfaces; package de.dhbwstuttgart.typeinference.unify.interfaces;
import java.util.Arrays; import java.util.Arrays;
import java.util.Optional; import java.util.Optional;
import java.util.Set; import java.util.Set;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import de.dhbwstuttgart.typeinference.unify.model.UnifyType; import de.dhbwstuttgart.typeinference.unify.model.UnifyType;
import de.dhbwstuttgart.typeinference.unify.model.Unifier; import de.dhbwstuttgart.typeinference.unify.model.Unifier;
/** /**
* Standard unification algorithm (e.g. Robinson, Paterson-Wegman, Martelli-Montanari) * Standard unification algorithm (e.g. Robinson, Paterson-Wegman, Martelli-Montanari)
* @author Florian Steurer * @author Florian Steurer
*/ */
public interface IUnify { public interface IUnify {
/** /**
* Finds the most general unifier sigma of the set {t1 =. t1',...,tn =. tn'} so that * Finds the most general unifier sigma of the set {t1 =. t1',...,tn =. tn'} so that
* sigma(t1) = sigma(t1') , ... sigma(tn) = sigma(tn'). * sigma(t1) = sigma(t1') , ... sigma(tn) = sigma(tn').
* @param terms The set of terms to be unified * @param terms The set of terms to be unified
* @return An optional of the most general unifier if it exists or an empty optional if there is no unifier. * @return An optional of the most general unifier if it exists or an empty optional if there is no unifier.
*/ */
public Optional<Unifier> unify(Set<UnifyType> terms); public Optional<Unifier> unify(Set<UnifyType> terms);
/** /**
* Finds the most general unifier sigma of the set {t1 =. t1',...,tn =. tn'} so that * Finds the most general unifier sigma of the set {t1 =. t1',...,tn =. tn'} so that
* sigma(t1) = sigma(t1') , ... sigma(tn) = sigma(tn'). * sigma(t1) = sigma(t1') , ... sigma(tn) = sigma(tn').
* @param terms The set of terms to be unified * @param terms The set of terms to be unified
* @return An optional of the most general unifier if it exists or an empty optional if there is no unifier. * @return An optional of the most general unifier if it exists or an empty optional if there is no unifier.
*/ */
default public Optional<Unifier> unify(UnifyType... terms) { default public Optional<Unifier> unify(UnifyType... terms) {
return unify(Arrays.stream(terms).collect(Collectors.toSet())); return unify(Arrays.stream(terms).collect(Collectors.toSet()));
} }
} }

View File

@ -1,96 +1,96 @@
package de.dhbwstuttgart.typeinference.unify.model; package de.dhbwstuttgart.typeinference.unify.model;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collection; import java.util.Collection;
import java.util.HashMap; import java.util.HashMap;
import java.util.Set; import java.util.Set;
import de.dhbwstuttgart.typeinference.unify.interfaces.IFiniteClosure; import de.dhbwstuttgart.typeinference.unify.interfaces.IFiniteClosure;
import de.dhbwstuttgart.typeinference.unify.interfaces.UnifyTypeVisitor; import de.dhbwstuttgart.typeinference.unify.interfaces.UnifyTypeVisitor;
/** /**
* An extends wildcard type "? extends T". * An extends wildcard type "? extends T".
*/ */
public final class ExtendsType extends WildcardType { public final class ExtendsType extends WildcardType {
public <T> UnifyType accept(UnifyTypeVisitor<T> visitor, T ht) { public <T> UnifyType accept(UnifyTypeVisitor<T> visitor, T ht) {
return visitor.visit(this, ht); return visitor.visit(this, ht);
} }
/** /**
* Creates a new extends wildcard type. * Creates a new extends wildcard type.
* @param extendedType The extended type e.g. Integer in "? extends Integer" * @param extendedType The extended type e.g. Integer in "? extends Integer"
*/ */
public ExtendsType(UnifyType extendedType) { public ExtendsType(UnifyType extendedType) {
super("? extends " + extendedType.getName(), extendedType); super("? extends " + extendedType.getName(), extendedType);
if (extendedType instanceof ExtendsType) { if (extendedType instanceof ExtendsType) {
System.out.print(""); System.out.print("");
} }
} }
/** /**
* The extended type e.g. Integer in "? extends Integer" * The extended type e.g. Integer in "? extends Integer"
*/ */
public UnifyType getExtendedType() { public UnifyType getExtendedType() {
return wildcardedType; return wildcardedType;
} }
/** /**
* Sets the type parameters of the wildcarded type and returns a new extendstype that extends that type. * Sets the type parameters of the wildcarded type and returns a new extendstype that extends that type.
*/ */
@Override @Override
public UnifyType setTypeParams(TypeParams newTp) { public UnifyType setTypeParams(TypeParams newTp) {
UnifyType newType = wildcardedType.setTypeParams(newTp); UnifyType newType = wildcardedType.setTypeParams(newTp);
if(newType == wildcardedType) if(newType == wildcardedType)
return this; // Reduced the amount of objects created return this; // Reduced the amount of objects created
return new ExtendsType(wildcardedType.setTypeParams(newTp)); return new ExtendsType(wildcardedType.setTypeParams(newTp));
} }
@Override @Override
Set<UnifyType> smArg(IFiniteClosure fc, Set<UnifyType> fBounded) { Set<UnifyType> smArg(IFiniteClosure fc, Set<UnifyType> fBounded) {
return fc.smArg(this, fBounded); return fc.smArg(this, fBounded);
} }
@Override @Override
Set<UnifyType> grArg(IFiniteClosure fc, Set<UnifyType> fBounded) { Set<UnifyType> grArg(IFiniteClosure fc, Set<UnifyType> fBounded) {
return fc.grArg(this, fBounded); return fc.grArg(this, fBounded);
} }
@Override @Override
UnifyType apply(Unifier unif) { UnifyType apply(Unifier unif) {
UnifyType newType = wildcardedType.apply(unif); UnifyType newType = wildcardedType.apply(unif);
if(newType.hashCode() == wildcardedType.hashCode() && newType.equals(wildcardedType)) if(newType.hashCode() == wildcardedType.hashCode() && newType.equals(wildcardedType))
return this; // Reduced the amount of objects created return this; // Reduced the amount of objects created
return new ExtendsType(newType); return new ExtendsType(newType);
} }
@Override @Override
public int hashCode() { public int hashCode() {
/* /*
* It is important that the prime that is added is different to the prime added in hashCode() of SuperType. * It is important that the prime that is added is different to the prime added in hashCode() of SuperType.
* Otherwise ? extends T and ? super T have the same hashCode() for every Type T. * Otherwise ? extends T and ? super T have the same hashCode() for every Type T.
*/ */
return wildcardedType.hashCode() + 229; return wildcardedType.hashCode() + 229;
} }
@Override @Override
public boolean equals(Object obj) { public boolean equals(Object obj) {
if(!(obj instanceof ExtendsType)) if(!(obj instanceof ExtendsType))
return false; return false;
if(obj.hashCode() != this.hashCode()) if(obj.hashCode() != this.hashCode())
return false; return false;
ExtendsType other = (ExtendsType) obj; ExtendsType other = (ExtendsType) obj;
return other.getWildcardedType().equals(wildcardedType); return other.getWildcardedType().equals(wildcardedType);
} }
@Override @Override
public String toString() { public String toString() {
return "? extends " + wildcardedType; return "? extends " + wildcardedType;
} }
} }

View File

@ -1,103 +1,103 @@
package de.dhbwstuttgart.typeinference.unify.model; package de.dhbwstuttgart.typeinference.unify.model;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
import java.util.HashMap; import java.util.HashMap;
import java.util.Set; import java.util.Set;
import de.dhbwstuttgart.typeinference.unify.interfaces.IFiniteClosure; import de.dhbwstuttgart.typeinference.unify.interfaces.IFiniteClosure;
import de.dhbwstuttgart.typeinference.unify.interfaces.UnifyTypeVisitor; import de.dhbwstuttgart.typeinference.unify.interfaces.UnifyTypeVisitor;
/** /**
* A real function type in java. * A real function type in java.
* @author Florian Steurer * @author Florian Steurer
*/ */
public class FunNType extends UnifyType { public class FunNType extends UnifyType {
public <T> UnifyType accept(UnifyTypeVisitor<T> visitor, T ht) { public <T> UnifyType accept(UnifyTypeVisitor<T> visitor, T ht) {
return visitor.visit(this, ht); return visitor.visit(this, ht);
} }
/** /**
* Creates a FunN-Type with the specified TypeParameters. * Creates a FunN-Type with the specified TypeParameters.
*/ */
protected FunNType(TypeParams p) { protected FunNType(TypeParams p) {
super("Fun"+(p.size()-1)+"$$", p); super("Fun"+(p.size()-1)+"$$", p);
} }
/** /**
* Creates a new FunNType. * Creates a new FunNType.
* @param tp The parameters of the type. * @param tp The parameters of the type.
* @return A FunNType. * @return A FunNType.
* @throws IllegalArgumentException is thrown when there are to few type parameters or there are wildcard-types. * @throws IllegalArgumentException is thrown when there are to few type parameters or there are wildcard-types.
*/ */
public static FunNType getFunNType(TypeParams tp) throws IllegalArgumentException { public static FunNType getFunNType(TypeParams tp) throws IllegalArgumentException {
if(tp.size() == 0) if(tp.size() == 0)
throw new IllegalArgumentException("FunNTypes need at least one type parameter"); throw new IllegalArgumentException("FunNTypes need at least one type parameter");
for(UnifyType t : tp) for(UnifyType t : tp)
if(t instanceof WildcardType) if(t instanceof WildcardType)
throw new IllegalArgumentException("Invalid TypeParams for a FunNType: " + tp); throw new IllegalArgumentException("Invalid TypeParams for a FunNType: " + tp);
return new FunNType(tp); return new FunNType(tp);
} }
/** /**
* Returns the degree of the function type, e.g. 2 for FunN<Integer, Integer, Integer>. * Returns the degree of the function type, e.g. 2 for FunN<Integer, Integer, Integer>.
*/ */
public int getN() { public int getN() {
return typeParams.size()-1; return typeParams.size()-1;
} }
@Override @Override
public UnifyType setTypeParams(TypeParams newTp) { public UnifyType setTypeParams(TypeParams newTp) {
if(newTp.hashCode() == typeParams.hashCode() && newTp.equals(typeParams)) if(newTp.hashCode() == typeParams.hashCode() && newTp.equals(typeParams))
return this; return this;
return getFunNType(newTp); return getFunNType(newTp);
} }
@Override @Override
Set<UnifyType> smArg(IFiniteClosure fc, Set<UnifyType> fBounded) { Set<UnifyType> smArg(IFiniteClosure fc, Set<UnifyType> fBounded) {
return fc.smArg(this, fBounded); return fc.smArg(this, fBounded);
} }
@Override @Override
Set<UnifyType> grArg(IFiniteClosure fc, Set<UnifyType> fBounded) { Set<UnifyType> grArg(IFiniteClosure fc, Set<UnifyType> fBounded) {
return fc.grArg(this, fBounded); return fc.grArg(this, fBounded);
} }
@Override @Override
UnifyType apply(Unifier unif) { UnifyType apply(Unifier unif) {
// TODO this bypasses the validation of the type parameters. // TODO this bypasses the validation of the type parameters.
// Wildcard types can be unified into FunNTypes. // Wildcard types can be unified into FunNTypes.
TypeParams newParams = typeParams.apply(unif); TypeParams newParams = typeParams.apply(unif);
if(newParams.hashCode() == typeParams.hashCode() && newParams.equals(typeParams)) if(newParams.hashCode() == typeParams.hashCode() && newParams.equals(typeParams))
return this; return this;
return new FunNType(newParams); return new FunNType(newParams);
} }
@Override @Override
public Boolean wrongWildcard() { public Boolean wrongWildcard() {
return (new ArrayList<UnifyType>(Arrays.asList(getTypeParams() return (new ArrayList<UnifyType>(Arrays.asList(getTypeParams()
.get())).stream().filter(x -> (x instanceof WildcardType)).findFirst().isPresent()); .get())).stream().filter(x -> (x instanceof WildcardType)).findFirst().isPresent());
} }
@Override @Override
public int hashCode() { public int hashCode() {
return 181 + typeParams.hashCode(); return 181 + typeParams.hashCode();
} }
@Override @Override
public boolean equals(Object obj) { public boolean equals(Object obj) {
if(!(obj instanceof FunNType)) if(!(obj instanceof FunNType))
return false; return false;
if(obj.hashCode() != this.hashCode()) if(obj.hashCode() != this.hashCode())
return false; return false;
FunNType other = (FunNType) obj; FunNType other = (FunNType) obj;
return other.getTypeParams().equals(typeParams); return other.getTypeParams().equals(typeParams);
} }
} }

View File

@ -1,100 +1,100 @@
package de.dhbwstuttgart.typeinference.unify.model; package de.dhbwstuttgart.typeinference.unify.model;
import java.util.HashSet; import java.util.HashSet;
import java.util.Set; import java.util.Set;
import java.util.stream.Collectors; import java.util.stream.Collectors;
/** /**
* A node of a directed graph. * A node of a directed graph.
* @author Florian Steurer * @author Florian Steurer
* *
* @param <T> The type of the content of the node. * @param <T> The type of the content of the node.
*/ */
class Node<T> { class Node<T> {
/** /**
* The content of the node. * The content of the node.
*/ */
private T content; private T content;
/** /**
* The set of predecessors * The set of predecessors
*/ */
private HashSet<Node<T>> predecessors = new HashSet<>(); private HashSet<Node<T>> predecessors = new HashSet<>();
/** /**
* The set of descendants * The set of descendants
*/ */
private HashSet<Node<T>> descendants = new HashSet<>(); private HashSet<Node<T>> descendants = new HashSet<>();
/** /**
* Creates a node containing the specified content. * Creates a node containing the specified content.
*/ */
public Node(T content) { public Node(T content) {
this.content = content; this.content = content;
} }
/** /**
* Adds a directed edge from this node to the descendant (this -> descendant) * Adds a directed edge from this node to the descendant (this -> descendant)
*/ */
public void addDescendant(Node<T> descendant) { public void addDescendant(Node<T> descendant) {
if(descendants.contains(descendant)) if(descendants.contains(descendant))
return; return;
descendants.add(descendant); descendants.add(descendant);
descendant.addPredecessor(this); descendant.addPredecessor(this);
} }
/** /**
* Adds a directed edge from the predecessor to this node (predecessor -> this) * Adds a directed edge from the predecessor to this node (predecessor -> this)
*/ */
public void addPredecessor(Node<T> predecessor) { public void addPredecessor(Node<T> predecessor) {
if(predecessors.contains(predecessor)) if(predecessors.contains(predecessor))
return; return;
predecessors.add(predecessor); predecessors.add(predecessor);
predecessor.addDescendant(this); predecessor.addDescendant(this);
} }
/** /**
* The content of this node. * The content of this node.
*/ */
public T getContent() { public T getContent() {
return content; return content;
} }
/** /**
* Returns all predecessors (nodes that have a directed edge to this node) * Returns all predecessors (nodes that have a directed edge to this node)
*/ */
public Set<Node<T>> getPredecessors() { public Set<Node<T>> getPredecessors() {
return predecessors; return predecessors;
} }
/** /**
* Returns all descendants. All nodes M, where there is a edge from this node to the node M. * Returns all descendants. All nodes M, where there is a edge from this node to the node M.
* @return * @return
*/ */
public Set<Node<T>> getDescendants() { public Set<Node<T>> getDescendants() {
return descendants; return descendants;
} }
/** /**
* Retrieves the content of all descendants. * Retrieves the content of all descendants.
*/ */
public Set<T> getContentOfDescendants() { public Set<T> getContentOfDescendants() {
return descendants.stream().map(x -> x.getContent()).collect(Collectors.toSet()); return descendants.stream().map(x -> x.getContent()).collect(Collectors.toSet());
} }
/** /**
* Retrieves the content of all predecessors. * Retrieves the content of all predecessors.
*/ */
public Set<T> getContentOfPredecessors() { public Set<T> getContentOfPredecessors() {
return predecessors.stream().map(x -> x.getContent()).collect(Collectors.toSet()); return predecessors.stream().map(x -> x.getContent()).collect(Collectors.toSet());
} }
@Override @Override
public String toString() { public String toString() {
return "Elem: Node(" + content.toString() + ")\nPrec: " + getContentOfPredecessors().toString() return "Elem: Node(" + content.toString() + ")\nPrec: " + getContentOfPredecessors().toString()
+ "\nDesc: " + getContentOfDescendants().toString() + "\n\n"; + "\nDesc: " + getContentOfDescendants().toString() + "\n\n";
} }
} }

View File

@ -1,195 +1,195 @@
package de.dhbwstuttgart.typeinference.unify.model; package de.dhbwstuttgart.typeinference.unify.model;
import java.io.File; import java.io.File;
import java.io.FileWriter; import java.io.FileWriter;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collection; import java.util.Collection;
import java.util.HashMap; import java.util.HashMap;
import java.util.HashSet; import java.util.HashSet;
import java.util.Random; import java.util.Random;
import java.util.Set; import java.util.Set;
import de.dhbwstuttgart.typeinference.unify.distributeVariance; import de.dhbwstuttgart.typeinference.unify.distributeVariance;
import de.dhbwstuttgart.typeinference.unify.interfaces.IFiniteClosure; import de.dhbwstuttgart.typeinference.unify.interfaces.IFiniteClosure;
import de.dhbwstuttgart.typeinference.unify.interfaces.UnifyTypeVisitor; import de.dhbwstuttgart.typeinference.unify.interfaces.UnifyTypeVisitor;
/** /**
* An unbounded placeholder type. * An unbounded placeholder type.
* @author Florian Steurer * @author Florian Steurer
*/ */
public final class PlaceholderType extends UnifyType{ public final class PlaceholderType extends UnifyType{
/** /**
* Static list containing the names of all existing placeholders. * Static list containing the names of all existing placeholders.
* Used for generating fresh placeholders. * Used for generating fresh placeholders.
*/ */
public static final ArrayList<String> EXISTING_PLACEHOLDERS = new ArrayList<String>(); public static final ArrayList<String> EXISTING_PLACEHOLDERS = new ArrayList<String>();
/** /**
* Prefix of auto-generated placeholder names. * Prefix of auto-generated placeholder names.
*/ */
protected static String nextName = "gen_"; protected static String nextName = "gen_";
/** /**
* Random number generator used to generate fresh placeholder name. * Random number generator used to generate fresh placeholder name.
*/ */
protected static Random rnd = new Random(43558747548978L); protected static Random rnd = new Random(43558747548978L);
/** /**
* True if this object was auto-generated, false if this object was user-generated. * True if this object was auto-generated, false if this object was user-generated.
*/ */
private final boolean IsGenerated; private final boolean IsGenerated;
/** /**
* isWildcardable gibt an, ob ein Wildcardtyp dem PlaceholderType zugeordnet werden darf * isWildcardable gibt an, ob ein Wildcardtyp dem PlaceholderType zugeordnet werden darf
*/ */
private boolean wildcardable = true; private boolean wildcardable = true;
/** /**
* is innerType gibt an, ob der Type des PlaceholderType innerhalb eines Typkonstruktorsverwendet wird * is innerType gibt an, ob der Type des PlaceholderType innerhalb eines Typkonstruktorsverwendet wird
*/ */
private boolean innerType = false; private boolean innerType = false;
/** /**
* variance shows the variance of the pair * variance shows the variance of the pair
* -1: contravariant * -1: contravariant
* 1 covariant * 1 covariant
* 0 invariant * 0 invariant
* PL 2018-03-21 * PL 2018-03-21
*/ */
private int variance = 0; private int variance = 0;
/** /**
* Creates a new placeholder type with the specified name. * Creates a new placeholder type with the specified name.
*/ */
public PlaceholderType(String name) { public PlaceholderType(String name) {
super(name, new TypeParams()); super(name, new TypeParams());
EXISTING_PLACEHOLDERS.add(name); // Add to list of existing placeholder names EXISTING_PLACEHOLDERS.add(name); // Add to list of existing placeholder names
IsGenerated = false; // This type is user generated IsGenerated = false; // This type is user generated
} }
/** /**
* Creates a new placeholdertype * Creates a new placeholdertype
* @param isGenerated true if this placeholder is auto-generated, false if it is user-generated. * @param isGenerated true if this placeholder is auto-generated, false if it is user-generated.
*/ */
protected PlaceholderType(String name, boolean isGenerated) { protected PlaceholderType(String name, boolean isGenerated) {
super(name, new TypeParams()); super(name, new TypeParams());
EXISTING_PLACEHOLDERS.add(name); // Add to list of existing placeholder names EXISTING_PLACEHOLDERS.add(name); // Add to list of existing placeholder names
IsGenerated = isGenerated; IsGenerated = isGenerated;
} }
public <T> UnifyType accept(UnifyTypeVisitor<T> visitor, T ht) { public <T> UnifyType accept(UnifyTypeVisitor<T> visitor, T ht) {
return visitor.visit(this, ht); return visitor.visit(this, ht);
} }
/** /**
* Creates a fresh placeholder type with a name that does so far not exist. * Creates a fresh placeholder type with a name that does so far not exist.
* A user could later instantiate a type using the same name that is equivalent to this type. * A user could later instantiate a type using the same name that is equivalent to this type.
* @return A fresh placeholder type. * @return A fresh placeholder type.
*/ */
public synchronized static PlaceholderType freshPlaceholder() { public synchronized static PlaceholderType freshPlaceholder() {
String name = nextName + (char) (rnd.nextInt(22) + 97); // Returns random char between 'a' and 'z' String name = nextName + (char) (rnd.nextInt(22) + 97); // Returns random char between 'a' and 'z'
// Add random chars while the name is in use. // Add random chars while the name is in use.
while(EXISTING_PLACEHOLDERS.contains(name)) { while(EXISTING_PLACEHOLDERS.contains(name)) {
name += (char) (rnd.nextInt(22) + 97); // Returns random char between 'a' and 'z' name += (char) (rnd.nextInt(22) + 97); // Returns random char between 'a' and 'z'
} }
return new PlaceholderType(name, true); return new PlaceholderType(name, true);
} }
/** /**
* True if this placeholder is auto-generated, false if it is user-generated. * True if this placeholder is auto-generated, false if it is user-generated.
*/ */
public boolean isGenerated() { public boolean isGenerated() {
return IsGenerated; return IsGenerated;
} }
public void setVariance(int v) { public void setVariance(int v) {
variance = v; variance = v;
} }
public int getVariance() { public int getVariance() {
return variance; return variance;
} }
public void reversVariance() { public void reversVariance() {
if (variance == 1) { if (variance == 1) {
setVariance(-1); setVariance(-1);
} else { } else {
if (variance == -1) { if (variance == -1) {
setVariance(1); setVariance(1);
}} }}
} }
public Boolean isWildcardable() { public Boolean isWildcardable() {
return wildcardable; return wildcardable;
} }
public void disableWildcardtable() { public void disableWildcardtable() {
wildcardable = false; wildcardable = false;
} }
public void enableWildcardtable() { public void enableWildcardtable() {
wildcardable = true; wildcardable = true;
} }
public void setWildcardtable(Boolean wildcardable) { public void setWildcardtable(Boolean wildcardable) {
this.wildcardable = wildcardable; this.wildcardable = wildcardable;
} }
public Boolean isInnerType() { public Boolean isInnerType() {
return innerType; return innerType;
} }
public void setInnerType(Boolean innerType) { public void setInnerType(Boolean innerType) {
this.innerType = innerType; this.innerType = innerType;
} }
@Override @Override
Set<UnifyType> smArg(IFiniteClosure fc, Set<UnifyType> fBounded) { Set<UnifyType> smArg(IFiniteClosure fc, Set<UnifyType> fBounded) {
return fc.smArg(this, fBounded); return fc.smArg(this, fBounded);
} }
@Override @Override
Set<UnifyType> grArg(IFiniteClosure fc, Set<UnifyType> fBounded) { Set<UnifyType> grArg(IFiniteClosure fc, Set<UnifyType> fBounded) {
return fc.grArg(this, fBounded); return fc.grArg(this, fBounded);
} }
@Override @Override
public UnifyType setTypeParams(TypeParams newTp) { public UnifyType setTypeParams(TypeParams newTp) {
return this; // Placeholders never have params. return this; // Placeholders never have params.
} }
@Override @Override
public int hashCode() { public int hashCode() {
return typeName.hashCode(); return typeName.hashCode();
} }
@Override @Override
UnifyType apply(Unifier unif) { UnifyType apply(Unifier unif) {
if(unif.hasSubstitute(this)) { if(unif.hasSubstitute(this)) {
UnifyType ret = unif.getSubstitute(this); UnifyType ret = unif.getSubstitute(this);
//PL 2018-05-17 Auskommentierung muesste korrekt sein, //PL 2018-05-17 Auskommentierung muesste korrekt sein,
//bereits in JavaTXComplier Variancen gesetzt werden. //bereits in JavaTXComplier Variancen gesetzt werden.
//ret.accept(new distributeVariance(), this.getVariance()); //ret.accept(new distributeVariance(), this.getVariance());
return ret; return ret;
} }
return this; return this;
} }
@Override @Override
public boolean equals(Object obj) { public boolean equals(Object obj) {
if(!(obj instanceof PlaceholderType)) if(!(obj instanceof PlaceholderType))
return false; return false;
return ((PlaceholderType) obj).getName().equals(typeName); return ((PlaceholderType) obj).getName().equals(typeName);
} }
@Override @Override
public Collection<PlaceholderType> getInvolvedPlaceholderTypes() { public Collection<PlaceholderType> getInvolvedPlaceholderTypes() {
ArrayList<PlaceholderType> ret = new ArrayList<>(); ArrayList<PlaceholderType> ret = new ArrayList<>();
ret.add(this); ret.add(this);
return ret; return ret;
} }
} }

View File

@ -1,100 +1,100 @@
package de.dhbwstuttgart.typeinference.unify.model; package de.dhbwstuttgart.typeinference.unify.model;
import java.util.HashMap; import java.util.HashMap;
import java.util.Set; import java.util.Set;
import de.dhbwstuttgart.typeinference.unify.interfaces.IFiniteClosure; import de.dhbwstuttgart.typeinference.unify.interfaces.IFiniteClosure;
import de.dhbwstuttgart.typeinference.unify.interfaces.UnifyTypeVisitor; import de.dhbwstuttgart.typeinference.unify.interfaces.UnifyTypeVisitor;
/** /**
* A reference type e.q. Integer or List<T>. * A reference type e.q. Integer or List<T>.
* @author Florian Steurer * @author Florian Steurer
* *
*/ */
public class ReferenceType extends UnifyType { public class ReferenceType extends UnifyType {
/** /**
* The buffered hashCode * The buffered hashCode
*/ */
private final int hashCode; private final int hashCode;
/** /**
* gibt an, ob der ReferenceType eine generische Typvariable ist * gibt an, ob der ReferenceType eine generische Typvariable ist
*/ */
private final boolean genericTypeVar; private final boolean genericTypeVar;
public <T> UnifyType accept(UnifyTypeVisitor<T> visitor, T ht) { public <T> UnifyType accept(UnifyTypeVisitor<T> visitor, T ht) {
return visitor.visit(this, ht); return visitor.visit(this, ht);
} }
public ReferenceType(String name, Boolean genericTypeVar) { public ReferenceType(String name, Boolean genericTypeVar) {
super(name, new TypeParams()); super(name, new TypeParams());
hashCode = 31 + 17 * typeName.hashCode() + 17 * typeParams.hashCode(); hashCode = 31 + 17 * typeName.hashCode() + 17 * typeParams.hashCode();
this.genericTypeVar = genericTypeVar; this.genericTypeVar = genericTypeVar;
} }
public ReferenceType(String name, UnifyType... params) { public ReferenceType(String name, UnifyType... params) {
super(name, new TypeParams(params)); super(name, new TypeParams(params));
hashCode = 31 + 17 * typeName.hashCode() + 17 * typeParams.hashCode(); hashCode = 31 + 17 * typeName.hashCode() + 17 * typeParams.hashCode();
genericTypeVar = false; genericTypeVar = false;
} }
public ReferenceType(String name, TypeParams params) { public ReferenceType(String name, TypeParams params) {
super(name, params); super(name, params);
hashCode = 31 + 17 * typeName.hashCode() + 17 * typeParams.hashCode(); hashCode = 31 + 17 * typeName.hashCode() + 17 * typeParams.hashCode();
genericTypeVar = false; genericTypeVar = false;
} }
public boolean isGenTypeVar () { public boolean isGenTypeVar () {
return genericTypeVar; return genericTypeVar;
} }
@Override @Override
Set<UnifyType> smArg(IFiniteClosure fc, Set<UnifyType> fBounded) { Set<UnifyType> smArg(IFiniteClosure fc, Set<UnifyType> fBounded) {
return fc.smArg(this, fBounded); return fc.smArg(this, fBounded);
} }
@Override @Override
Set<UnifyType> grArg(IFiniteClosure fc, Set<UnifyType> fBounded) { Set<UnifyType> grArg(IFiniteClosure fc, Set<UnifyType> fBounded) {
return fc.grArg(this, fBounded); return fc.grArg(this, fBounded);
} }
@Override @Override
UnifyType apply(Unifier unif) { UnifyType apply(Unifier unif) {
TypeParams newParams = typeParams.apply(unif); TypeParams newParams = typeParams.apply(unif);
if(newParams.hashCode() == typeParams.hashCode() && newParams.equals(typeParams)) if(newParams.hashCode() == typeParams.hashCode() && newParams.equals(typeParams))
return this; return this;
return new ReferenceType(typeName, newParams); return new ReferenceType(typeName, newParams);
} }
@Override @Override
public UnifyType setTypeParams(TypeParams newTp) { public UnifyType setTypeParams(TypeParams newTp) {
if(newTp.hashCode() == typeParams.hashCode() && newTp.equals(typeParams)) if(newTp.hashCode() == typeParams.hashCode() && newTp.equals(typeParams))
return this; // reduced the amount of objects created return this; // reduced the amount of objects created
return new ReferenceType(typeName, newTp); return new ReferenceType(typeName, newTp);
} }
@Override @Override
public int hashCode() { public int hashCode() {
return hashCode; return hashCode;
} }
@Override @Override
public boolean equals(Object obj) { public boolean equals(Object obj) {
if(!(obj instanceof ReferenceType)) if(!(obj instanceof ReferenceType))
return false; return false;
if(obj.hashCode() != this.hashCode()) if(obj.hashCode() != this.hashCode())
return false; return false;
ReferenceType other = (ReferenceType) obj; ReferenceType other = (ReferenceType) obj;
if(!other.getName().equals(typeName)) if(!other.getName().equals(typeName))
return false; return false;
return other.getTypeParams().equals(typeParams); return other.getTypeParams().equals(typeParams);
} }
} }

View File

@ -1,88 +1,88 @@
package de.dhbwstuttgart.typeinference.unify.model; package de.dhbwstuttgart.typeinference.unify.model;
import java.util.HashMap; import java.util.HashMap;
import java.util.Set; import java.util.Set;
import de.dhbwstuttgart.typeinference.unify.interfaces.IFiniteClosure; import de.dhbwstuttgart.typeinference.unify.interfaces.IFiniteClosure;
import de.dhbwstuttgart.typeinference.unify.interfaces.UnifyTypeVisitor; import de.dhbwstuttgart.typeinference.unify.interfaces.UnifyTypeVisitor;
/** /**
* A super wildcard type e.g. ? super Integer. * A super wildcard type e.g. ? super Integer.
* @author Florian Steurer * @author Florian Steurer
*/ */
public final class SuperType extends WildcardType { public final class SuperType extends WildcardType {
public <T> UnifyType accept(UnifyTypeVisitor<T> visitor, T ht) { public <T> UnifyType accept(UnifyTypeVisitor<T> visitor, T ht) {
return visitor.visit(this, ht); return visitor.visit(this, ht);
} }
/** /**
* Creates a new instance "? extends superedType" * Creates a new instance "? extends superedType"
* @param superedType The type that is supered e.g. Integer in "? super Integer" * @param superedType The type that is supered e.g. Integer in "? super Integer"
*/ */
public SuperType(UnifyType superedType) { public SuperType(UnifyType superedType) {
super("? super " + superedType.getName(), superedType); super("? super " + superedType.getName(), superedType);
} }
/** /**
* The type that is supered e.g. Integer in "? super Integer" * The type that is supered e.g. Integer in "? super Integer"
*/ */
public UnifyType getSuperedType() { public UnifyType getSuperedType() {
return wildcardedType; return wildcardedType;
} }
@Override @Override
public String toString() { public String toString() {
return "? super " + wildcardedType; return "? super " + wildcardedType;
} }
/** /**
* Sets the type parameters of the wildcarded type and returns a new supertype that supers that type. * Sets the type parameters of the wildcarded type and returns a new supertype that supers that type.
*/ */
@Override @Override
public UnifyType setTypeParams(TypeParams newTp) { public UnifyType setTypeParams(TypeParams newTp) {
UnifyType newType = wildcardedType.setTypeParams(newTp); UnifyType newType = wildcardedType.setTypeParams(newTp);
if(newType == wildcardedType) if(newType == wildcardedType)
return this; // Reduced the amount of objects created return this; // Reduced the amount of objects created
return new SuperType(wildcardedType.setTypeParams(newTp)); return new SuperType(wildcardedType.setTypeParams(newTp));
} }
@Override @Override
Set<UnifyType> smArg(IFiniteClosure fc, Set<UnifyType> fBounded) { Set<UnifyType> smArg(IFiniteClosure fc, Set<UnifyType> fBounded) {
return fc.smArg(this, fBounded); return fc.smArg(this, fBounded);
} }
@Override @Override
Set<UnifyType> grArg(IFiniteClosure fc, Set<UnifyType> fBounded) { Set<UnifyType> grArg(IFiniteClosure fc, Set<UnifyType> fBounded) {
return fc.grArg(this, fBounded); return fc.grArg(this, fBounded);
} }
@Override @Override
UnifyType apply(Unifier unif) { UnifyType apply(Unifier unif) {
UnifyType newType = wildcardedType.apply(unif); UnifyType newType = wildcardedType.apply(unif);
if(newType.hashCode() == wildcardedType.hashCode() && newType.equals(wildcardedType)) if(newType.hashCode() == wildcardedType.hashCode() && newType.equals(wildcardedType))
return this; // Reduced the amount of objects created return this; // Reduced the amount of objects created
return new SuperType(newType); return new SuperType(newType);
} }
@Override @Override
public int hashCode() { public int hashCode() {
/* /*
* It is important that the prime that is added is different to the prime added in hashCode() of ExtendsType. * It is important that the prime that is added is different to the prime added in hashCode() of ExtendsType.
* Otherwise ? extends T and ? super T have the same hashCode() for every Type T. * Otherwise ? extends T and ? super T have the same hashCode() for every Type T.
*/ */
return wildcardedType.hashCode() + 3917; return wildcardedType.hashCode() + 3917;
} }
@Override @Override
public boolean equals(Object obj) { public boolean equals(Object obj) {
if(!(obj instanceof SuperType)) if(!(obj instanceof SuperType))
return false; return false;
if(obj.hashCode() != this.hashCode()) if(obj.hashCode() != this.hashCode())
return false; return false;
SuperType other = (SuperType) obj; SuperType other = (SuperType) obj;
return other.getSuperedType().equals(wildcardedType); return other.getSuperedType().equals(wildcardedType);
} }
} }

View File

@ -1,191 +1,191 @@
package de.dhbwstuttgart.typeinference.unify.model; package de.dhbwstuttgart.typeinference.unify.model;
import java.util.*; import java.util.*;
/** /**
* The generic or non-generic parameters of a type e.g. <T> for List<T> * The generic or non-generic parameters of a type e.g. <T> for List<T>
* @author Florian Steurer * @author Florian Steurer
*/ */
public final class TypeParams implements Iterable<UnifyType>{ public final class TypeParams implements Iterable<UnifyType>{
/** /**
* The array which backs the type parameters. * The array which backs the type parameters.
*/ */
private final UnifyType[] typeParams; private final UnifyType[] typeParams;
/** /**
* Hashcode calculation is expensive and must be cached. * Hashcode calculation is expensive and must be cached.
*/ */
private final int hashCode; private final int hashCode;
/** /**
* Creates a new set of type parameters. * Creates a new set of type parameters.
* @param types The type parameters. * @param types The type parameters.
*/ */
public TypeParams(List<UnifyType> types){ public TypeParams(List<UnifyType> types){
typeParams = new UnifyType[types.size()]; typeParams = new UnifyType[types.size()];
for(int i=0;i<types.size();i++){ for(int i=0;i<types.size();i++){
typeParams[i] = types.get(i); typeParams[i] = types.get(i);
if(types.get(i)==null)throw new NullPointerException(); if(types.get(i)==null)throw new NullPointerException();
} }
// Hashcode calculation is expensive and must be cached. // Hashcode calculation is expensive and must be cached.
hashCode = Arrays.deepHashCode(typeParams); hashCode = Arrays.deepHashCode(typeParams);
} }
/** /**
* Creates a new set of type parameters. * Creates a new set of type parameters.
* @param types The type parameters. * @param types The type parameters.
*/ */
public TypeParams(UnifyType... types) { public TypeParams(UnifyType... types) {
typeParams = types; typeParams = types;
// Hashcode calculation is expensive and must be cached. // Hashcode calculation is expensive and must be cached.
hashCode = Arrays.deepHashCode(typeParams); hashCode = Arrays.deepHashCode(typeParams);
} }
/** /**
* True if every parameter in this object is a placeholder type, false otherwise. * True if every parameter in this object is a placeholder type, false otherwise.
*/ */
public boolean arePlaceholders() { public boolean arePlaceholders() {
return Arrays.stream(typeParams).allMatch(x -> x instanceof PlaceholderType); return Arrays.stream(typeParams).allMatch(x -> x instanceof PlaceholderType);
} }
/** /**
* Returns the number of the type parameters in this object. * Returns the number of the type parameters in this object.
* @return number of type parameters, always positive (including 0). * @return number of type parameters, always positive (including 0).
*/ */
public int size() { public int size() {
return typeParams.length; return typeParams.length;
} }
/** /**
* Returns true if this object has size() of zero, false otherwise. * Returns true if this object has size() of zero, false otherwise.
*/ */
public boolean empty() { public boolean empty() {
return typeParams.length == 0; return typeParams.length == 0;
} }
/** /**
* Applies a unifier to every parameter in this object. * Applies a unifier to every parameter in this object.
* @param unif The applied unifier. * @param unif The applied unifier.
* @return A new type parameter object, where the unifier was applied to every parameter. * @return A new type parameter object, where the unifier was applied to every parameter.
*/ */
public TypeParams apply(Unifier unif) { public TypeParams apply(Unifier unif) {
UnifyType[] newParams = new UnifyType[typeParams.length]; UnifyType[] newParams = new UnifyType[typeParams.length];
// If true, a type was modified and a new typeparams object has to be created. // If true, a type was modified and a new typeparams object has to be created.
// Otherwise it is enough to return this object, since it is immutable // Otherwise it is enough to return this object, since it is immutable
// This reduced the needed TypeParams-Instances for the lambda14-Test from // This reduced the needed TypeParams-Instances for the lambda14-Test from
// 130.000 to 30.000 without a decrease in speed. // 130.000 to 30.000 without a decrease in speed.
boolean isNew = false; boolean isNew = false;
for(int i = 0; i < typeParams.length; i++) { for(int i = 0; i < typeParams.length; i++) {
UnifyType newType = typeParams[i].apply(unif); UnifyType newType = typeParams[i].apply(unif);
newParams[i] = newType; newParams[i] = newType;
if(!isNew && (newType.hashCode() != typeParams[i].hashCode() || !newType.equals(typeParams[i]))) if(!isNew && (newType.hashCode() != typeParams[i].hashCode() || !newType.equals(typeParams[i])))
isNew = true; isNew = true;
} }
if(!isNew) if(!isNew)
return this; return this;
return new TypeParams(newParams); return new TypeParams(newParams);
} }
/** /**
* True if the PlaceholderType t is a parameter of this object, or if any parameter * True if the PlaceholderType t is a parameter of this object, or if any parameter
* contains t (arbitrary depth of recursion), false otherwise. * contains t (arbitrary depth of recursion), false otherwise.
*/ */
public boolean occurs(PlaceholderType t) { public boolean occurs(PlaceholderType t) {
for(UnifyType p : typeParams) for(UnifyType p : typeParams)
if(p instanceof PlaceholderType) {//PL 2018-01-31 dangeling else Problem { ... } eingefuegt. if(p instanceof PlaceholderType) {//PL 2018-01-31 dangeling else Problem { ... } eingefuegt.
if(p.equals(t)) if(p.equals(t))
return true; return true;
} }
else { else {
if(p.getTypeParams().occurs(t)) if(p.getTypeParams().occurs(t))
return true; } return true; }
return false; return false;
} }
/** /**
* Returns the i-th parameter of this object. * Returns the i-th parameter of this object.
*/ */
public UnifyType get(int i) { public UnifyType get(int i) {
return typeParams[i]; return typeParams[i];
} }
/** /**
* Returns the parameters of this object. * Returns the parameters of this object.
* PL 2018-03-17 * PL 2018-03-17
*/ */
public UnifyType[] get() { public UnifyType[] get() {
return typeParams; return typeParams;
} }
/** /**
* Sets the the type t as the i-th parameter and returns a new object * Sets the the type t as the i-th parameter and returns a new object
* that equals this object, except for the i-th type. * that equals this object, except for the i-th type.
*/ */
public TypeParams set(UnifyType t, int idx) { public TypeParams set(UnifyType t, int idx) {
// Reduce the creation of new objects for less memory // Reduce the creation of new objects for less memory
// Reduced the needed instances of TypeParams in the lambda14-Test from // Reduced the needed instances of TypeParams in the lambda14-Test from
// 150.000 to 130.000 // 150.000 to 130.000
if(t.hashCode() == typeParams[idx].hashCode() && t.equals(typeParams[idx])) if(t.hashCode() == typeParams[idx].hashCode() && t.equals(typeParams[idx]))
return this; return this;
UnifyType[] newparams = Arrays.copyOf(typeParams, typeParams.length); UnifyType[] newparams = Arrays.copyOf(typeParams, typeParams.length);
newparams[idx] = t; newparams[idx] = t;
return new TypeParams(newparams); return new TypeParams(newparams);
} }
@Override @Override
public Iterator<UnifyType> iterator() { public Iterator<UnifyType> iterator() {
return Arrays.stream(typeParams).iterator(); return Arrays.stream(typeParams).iterator();
} }
@Override @Override
public int hashCode() { public int hashCode() {
return hashCode; return hashCode;
} }
@Override @Override
public boolean equals(Object obj) { public boolean equals(Object obj) {
if(!(obj instanceof TypeParams)) if(!(obj instanceof TypeParams))
return false; return false;
if(obj.hashCode() != this.hashCode()) if(obj.hashCode() != this.hashCode())
return false; return false;
TypeParams other = (TypeParams) obj; TypeParams other = (TypeParams) obj;
if(other.size() != this.size()) if(other.size() != this.size())
return false; return false;
for(int i = 0; i < this.size(); i++){ for(int i = 0; i < this.size(); i++){
//if(this.get(i) == null) //if(this.get(i) == null)
//System.out.print("s"); //System.out.print("s");
} }
for(int i = 0; i < this.size(); i++) for(int i = 0; i < this.size(); i++)
if(!(this.get(i).equals(other.get(i)))) if(!(this.get(i).equals(other.get(i))))
return false; return false;
return true; return true;
} }
@Override @Override
public String toString() { public String toString() {
String res = ""; String res = "";
for(UnifyType t : typeParams) for(UnifyType t : typeParams)
res += t + ","; res += t + ",";
return "<" + res.substring(0, res.length()-1) + ">"; return "<" + res.substring(0, res.length()-1) + ">";
} }
public Collection<? extends PlaceholderType> getInvolvedPlaceholderTypes() { public Collection<? extends PlaceholderType> getInvolvedPlaceholderTypes() {
ArrayList<PlaceholderType> ret = new ArrayList<>(); ArrayList<PlaceholderType> ret = new ArrayList<>();
for(UnifyType t : typeParams){ for(UnifyType t : typeParams){
ret.addAll(t.getInvolvedPlaceholderTypes()); ret.addAll(t.getInvolvedPlaceholderTypes());
} }
return ret; return ret;
} }
} }

View File

@ -1,189 +1,189 @@
package de.dhbwstuttgart.typeinference.unify.model; package de.dhbwstuttgart.typeinference.unify.model;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.Map.Entry;
import java.util.Set;
import java.util.function.Function;
/**
* A set of substitutions (s -> t) that is an applicable function to types and pairs.
* @author Florian Steurer
*/
public class Unifier implements Function<UnifyType, UnifyType>, Iterable<Entry<PlaceholderType, UnifyType>> {
/**
* The set of substitutions that unify a type-term
*/
private HashMap<PlaceholderType, UnifyType> substitutions = new HashMap<>();
/** import java.util.HashMap;
* Creates a new instance with a single substitution (source -> target). import java.util.HashSet;
* @param The type that is replaced import java.util.Iterator;
* @param The type that replaces import java.util.Map.Entry;
import java.util.Set;
import java.util.function.Function;
/**
* A set of substitutions (s -> t) that is an applicable function to types and pairs.
* @author Florian Steurer
*/
public class Unifier implements Function<UnifyType, UnifyType>, Iterable<Entry<PlaceholderType, UnifyType>> {
/**
* The set of substitutions that unify a type-term
*/
private HashMap<PlaceholderType, UnifyType> substitutions = new HashMap<>();
/**
* Creates a new instance with a single substitution (source -> target).
* @param The type that is replaced
* @param The type that replaces
*/ */
public Unifier(PlaceholderType source, UnifyType target) { public Unifier(PlaceholderType source, UnifyType target) {
substitutions.put(source, target); substitutions.put(source, target);
} }
/** /**
* Identity function as an "unifier". * Identity function as an "unifier".
*/ */
protected Unifier() { protected Unifier() {
} }
/** /**
* Creates an unifier that is the identity function (thus has no substitutions). * Creates an unifier that is the identity function (thus has no substitutions).
*/
public static Unifier identity() {
return new Unifier();
}
/**
* Adds a substitution to the unifier from (source -> target)
* @param The type that is replaced
* @param The type that replaces
*/ */
public static Unifier identity() {
return new Unifier();
}
/**
* Adds a substitution to the unifier from (source -> target)
* @param The type that is replaced
* @param The type that replaces
*/
public void add(PlaceholderType source, UnifyType target) { public void add(PlaceholderType source, UnifyType target) {
Unifier tempU = new Unifier(source, target); Unifier tempU = new Unifier(source, target);
// Every new substitution must be applied to previously added substitutions // Every new substitution must be applied to previously added substitutions
// otherwise the unifier needs to be applied multiple times to unify two terms // otherwise the unifier needs to be applied multiple times to unify two terms
for(PlaceholderType pt : substitutions.keySet()) for(PlaceholderType pt : substitutions.keySet())
substitutions.put(pt, substitutions.get(pt).apply(tempU)); substitutions.put(pt, substitutions.get(pt).apply(tempU));
substitutions.put(source, target); substitutions.put(source, target);
} }
@Override @Override
public UnifyType apply(UnifyType t) { public UnifyType apply(UnifyType t) {
return t.apply(this); return t.apply(this);
} }
/** /**
* Applies the unifier to the two terms of the pair. * Applies the unifier to the two terms of the pair.
* @return A new pair where the left and right-hand side are applied * @return A new pair where the left and right-hand side are applied
*/ */
public UnifyPair apply(UnifyPair p) { public UnifyPair apply(UnifyPair p) {
UnifyType newLhs = this.apply(p.getLhsType()); UnifyType newLhs = this.apply(p.getLhsType());
UnifyType newRhs = this.apply(p.getRhsType()); UnifyType newRhs = this.apply(p.getRhsType());
return new UnifyPair(newLhs, newRhs, p.getPairOp()); return new UnifyPair(newLhs, newRhs, p.getPairOp());
} }
/** /**
* Applies the unifier to the two terms of the pair. * Applies the unifier to the two terms of the pair.
* works only for single subsitution * works only for single subsitution
* @return A new pair where the left and right-hand side are applied * @return A new pair where the left and right-hand side are applied
*/ */
public UnifyPair apply(UnifyPair thisAsPair, UnifyPair p) { public UnifyPair apply(UnifyPair thisAsPair, UnifyPair p) {
UnifyType newLhs = this.apply(p.getLhsType()); UnifyType newLhs = this.apply(p.getLhsType());
UnifyType newRhs = this.apply(p.getRhsType()); UnifyType newRhs = this.apply(p.getRhsType());
//Varianceweitergabe wird nicht benoetigt. //Varianceweitergabe wird nicht benoetigt.
//PlaceholderType lhsph = (PlaceholderType)thisAsPair.getLhsType(); //PlaceholderType lhsph = (PlaceholderType)thisAsPair.getLhsType();
//if (lhsph.getVariance() != 0) { //if (lhsph.getVariance() != 0) {
// if (p.getLhsType().equals(lhsph)) { // if (p.getLhsType().equals(lhsph)) {
// if (p.getRhsType() instanceof PlaceholderType) { // if (p.getRhsType() instanceof PlaceholderType) {
// ((PlaceholderType)p.getRhsType()).setVariance(lhsph.getVariance()); // ((PlaceholderType)p.getRhsType()).setVariance(lhsph.getVariance());
// } // }
// } // }
// if (p.getRhsType().equals(lhsph)) { // if (p.getRhsType().equals(lhsph)) {
// if (p.getLhsType() instanceof PlaceholderType) { // if (p.getLhsType() instanceof PlaceholderType) {
// ((PlaceholderType)p.getLhsType()).setVariance(lhsph.getVariance()); // ((PlaceholderType)p.getLhsType()).setVariance(lhsph.getVariance());
// } // }
// } // }
//} //}
if (!(p.getLhsType().equals(newLhs)) || !(p.getRhsType().equals(newRhs))) {//Die Anwendung von this hat was veraendert PL 2018-04-01 if (!(p.getLhsType().equals(newLhs)) || !(p.getRhsType().equals(newRhs))) {//Die Anwendung von this hat was veraendert PL 2018-04-01
Set<UnifyPair> suniUnifyPair = new HashSet<>(); Set<UnifyPair> suniUnifyPair = new HashSet<>();
suniUnifyPair.addAll(thisAsPair.getAllSubstitutions()); suniUnifyPair.addAll(thisAsPair.getAllSubstitutions());
suniUnifyPair.add(thisAsPair); suniUnifyPair.add(thisAsPair);
if (p.getLhsType() instanceof PlaceholderType //&& newLhs instanceof PlaceholderType entfernt PL 2018-04-13 if (p.getLhsType() instanceof PlaceholderType //&& newLhs instanceof PlaceholderType entfernt PL 2018-04-13
&& p.getPairOp() == PairOperator.EQUALSDOT) { && p.getPairOp() == PairOperator.EQUALSDOT) {
suniUnifyPair.add(p); //p koennte auch subsitution sein suniUnifyPair.add(p); //p koennte auch subsitution sein
} }
return new UnifyPair(newLhs, newRhs, p.getPairOp(), suniUnifyPair, p); return new UnifyPair(newLhs, newRhs, p.getPairOp(), suniUnifyPair, p);
} }
return new UnifyPair(newLhs, newRhs, p.getPairOp(), p.getSubstitution(), p.getBasePair(), p.getfBounded()); return new UnifyPair(newLhs, newRhs, p.getPairOp(), p.getSubstitution(), p.getBasePair(), p.getfBounded());
} }
/** /**
* Applies the unifier to the left terms of the pair. * Applies the unifier to the left terms of the pair.
* @return A new pair where the left and right-hand side are applied * @return A new pair where the left and right-hand side are applied
*/ */
public UnifyPair applyleft(UnifyPair p) { public UnifyPair applyleft(UnifyPair p) {
return new UnifyPair(this.apply(p.getLhsType()), p.getRhsType(), p.getPairOp()); return new UnifyPair(this.apply(p.getLhsType()), p.getRhsType(), p.getPairOp());
} }
/** /**
* True if the typevariable t will be substituted if the unifier is applied. * True if the typevariable t will be substituted if the unifier is applied.
* false otherwise. * false otherwise.
*/ */
public boolean hasSubstitute(PlaceholderType t) { public boolean hasSubstitute(PlaceholderType t) {
return substitutions.containsKey(t); return substitutions.containsKey(t);
} }
/** /**
* Returns the type that will replace the typevariable t if the unifier is applied. * Returns the type that will replace the typevariable t if the unifier is applied.
*/ */
public UnifyType getSubstitute(PlaceholderType t) { public UnifyType getSubstitute(PlaceholderType t) {
return substitutions.get(t); return substitutions.get(t);
} }
/** /**
* The number of substitutions in the unifier. If zero, this is the identity function. * The number of substitutions in the unifier. If zero, this is the identity function.
*/ */
public int size() { public int size() {
return substitutions.size(); return substitutions.size();
} }
/** /**
* Garantuees that if there is a substitutions (a -> b) in this unifier, * Garantuees that if there is a substitutions (a -> b) in this unifier,
* a is not an element of the targetParams. Substitutions that do not * a is not an element of the targetParams. Substitutions that do not
* satisfy this condition, are swapped. * satisfy this condition, are swapped.
*/ */
public void swapPlaceholderSubstitutions(Iterable<UnifyType> targetParams) { public void swapPlaceholderSubstitutions(Iterable<UnifyType> targetParams) {
for(UnifyType tph : targetParams) { for(UnifyType tph : targetParams) {
if(!(tph instanceof PlaceholderType)) if(!(tph instanceof PlaceholderType))
continue; continue;
// Swap a substitutions (a -> b) if a is an element of the target params. // Swap a substitutions (a -> b) if a is an element of the target params.
if(substitutions.containsKey(tph)) { if(substitutions.containsKey(tph)) {
if((substitutions.get(tph) instanceof PlaceholderType)) { if((substitutions.get(tph) instanceof PlaceholderType)) {
PlaceholderType newLhs = (PlaceholderType) substitutions.get(tph); PlaceholderType newLhs = (PlaceholderType) substitutions.get(tph);
substitutions.remove(tph); substitutions.remove(tph);
substitutions.put(newLhs, tph); substitutions.put(newLhs, tph);
} }
} }
} }
} }
public void swapPlaceholderSubstitutionsReverse(Iterable<UnifyType> sourceParams) { public void swapPlaceholderSubstitutionsReverse(Iterable<UnifyType> sourceParams) {
for(UnifyType tph : sourceParams) { for(UnifyType tph : sourceParams) {
if(!(tph instanceof PlaceholderType)) if(!(tph instanceof PlaceholderType))
continue; continue;
if(substitutions.containsValue(tph)) { if(substitutions.containsValue(tph)) {
UnifyType key = substitutions.values().stream().filter(x -> x.equals(tph)).findAny().get(); UnifyType key = substitutions.values().stream().filter(x -> x.equals(tph)).findAny().get();
if(key instanceof PlaceholderType) { if(key instanceof PlaceholderType) {
PlaceholderType newLhs = (PlaceholderType) tph; PlaceholderType newLhs = (PlaceholderType) tph;
substitutions.remove(key); substitutions.remove(key);
substitutions.put(newLhs, key); substitutions.put(newLhs, key);
} }
} }
} }
} }
@Override @Override
public String toString() { public String toString() {
String result = "{ "; String result = "{ ";
for(Entry<PlaceholderType, UnifyType> entry : substitutions.entrySet()) for(Entry<PlaceholderType, UnifyType> entry : substitutions.entrySet())
result += "(" + entry.getKey() + " -> " + entry.getValue() + "), "; result += "(" + entry.getKey() + " -> " + entry.getValue() + "), ";
if(!substitutions.isEmpty()) if(!substitutions.isEmpty())
result = result.substring(0, result.length()-2); result = result.substring(0, result.length()-2);
result += " }"; result += " }";
return result; return result;
} }
@Override @Override
public Iterator<Entry<PlaceholderType, UnifyType>> iterator() { public Iterator<Entry<PlaceholderType, UnifyType>> iterator() {
return substitutions.entrySet().iterator(); return substitutions.entrySet().iterator();
} }
} }

View File

@ -1,256 +1,256 @@
package de.dhbwstuttgart.typeinference.unify.model; package de.dhbwstuttgart.typeinference.unify.model;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collection; import java.util.Collection;
import java.util.HashSet; import java.util.HashSet;
import java.util.List; import java.util.List;
import java.util.Optional; import java.util.Optional;
import java.util.Set; import java.util.Set;
/** /**
* A pair which contains two types and an operator, e.q. (Integer <. a). * A pair which contains two types and an operator, e.q. (Integer <. a).
* @author Florian Steurer * @author Florian Steurer
*/ */
public class UnifyPair { public class UnifyPair {
/** /**
* The type on the left hand side of the pair. * The type on the left hand side of the pair.
*/ */
private final UnifyType lhs; private final UnifyType lhs;
/** /**
* The type on the right hand side of the pair. * The type on the right hand side of the pair.
*/ */
private final UnifyType rhs; private final UnifyType rhs;
/** /**
* The operator that determines the relation between the left and right hand side type. * The operator that determines the relation between the left and right hand side type.
*/ */
private PairOperator pairOp; private PairOperator pairOp;
/** wieder loesecn wird nicht mehr benoetigt PL 2018-03-31 /** wieder loesecn wird nicht mehr benoetigt PL 2018-03-31
* variance shows the variance of the pair * variance shows the variance of the pair
* -1: contravariant * -1: contravariant
* 1 covariant * 1 covariant
* 0 invariant * 0 invariant
* PL 2018-03-21 * PL 2018-03-21
*/ */
private byte variance = 0; private byte variance = 0;
private boolean undefinedPair = false; private boolean undefinedPair = false;
/** /**
* Unifier/substitute that generated this pair * Unifier/substitute that generated this pair
* PL 2018-03-15 * PL 2018-03-15
*/ */
private Set<UnifyPair> substitution; private Set<UnifyPair> substitution;
/** /**
* Base on which the the unifier is applied * Base on which the the unifier is applied
* PL 2018-03-15 * PL 2018-03-15
*/ */
private UnifyPair basePair; private UnifyPair basePair;
/** /**
* For pairs a <. Theta generated in the rule reduceTphSup * For pairs a <. Theta generated in the rule reduceTphSup
* to store the f-Bouned Elements to avoid endless recursion * to store the f-Bouned Elements to avoid endless recursion
* PL 2018-03-15 * PL 2018-03-15
*/ */
private Set<UnifyType> fBounded = new HashSet<>(); private Set<UnifyType> fBounded = new HashSet<>();
private final int hashCode; private final int hashCode;
/** /**
* Creates a new instance of the pair. * Creates a new instance of the pair.
* @param lhs The type on the left hand side of the pair. * @param lhs The type on the left hand side of the pair.
* @param rhs The type on the right hand side of the pair. * @param rhs The type on the right hand side of the pair.
* @param op The operator that determines the relation between the left and right hand side type. * @param op The operator that determines the relation between the left and right hand side type.
*/ */
public UnifyPair(UnifyType lhs, UnifyType rhs, PairOperator op) { public UnifyPair(UnifyType lhs, UnifyType rhs, PairOperator op) {
this.lhs = lhs; this.lhs = lhs;
this.rhs = rhs; this.rhs = rhs;
pairOp = op; pairOp = op;
substitution = new HashSet<>(); substitution = new HashSet<>();
// Caching hashcode // Caching hashcode
hashCode = 17 + 31 * lhs.hashCode() + 31 * rhs.hashCode() + 31 * pairOp.hashCode(); hashCode = 17 + 31 * lhs.hashCode() + 31 * rhs.hashCode() + 31 * pairOp.hashCode();
} }
public UnifyPair(UnifyType lhs, UnifyType rhs, PairOperator op, Set<UnifyPair> uni, UnifyPair base) { public UnifyPair(UnifyType lhs, UnifyType rhs, PairOperator op, Set<UnifyPair> uni, UnifyPair base) {
this.lhs = lhs; this.lhs = lhs;
this.rhs = rhs; this.rhs = rhs;
pairOp = op; pairOp = op;
substitution = uni; substitution = uni;
basePair = base; basePair = base;
this.variance = variance; this.variance = variance;
// Caching hashcode // Caching hashcode
hashCode = 17 + 31 * lhs.hashCode() + 31 * rhs.hashCode() + 31 * pairOp.hashCode(); hashCode = 17 + 31 * lhs.hashCode() + 31 * rhs.hashCode() + 31 * pairOp.hashCode();
} }
public UnifyPair(UnifyType lhs, UnifyType rhs, PairOperator op, Set<UnifyPair> uni, UnifyPair base, Set<UnifyType> fBounded) { public UnifyPair(UnifyType lhs, UnifyType rhs, PairOperator op, Set<UnifyPair> uni, UnifyPair base, Set<UnifyType> fBounded) {
this(lhs, rhs, op, uni, base); this(lhs, rhs, op, uni, base);
this.fBounded = fBounded; this.fBounded = fBounded;
} }
/** /**
* Returns the type on the left hand side of the pair. * Returns the type on the left hand side of the pair.
*/ */
public UnifyType getLhsType() { public UnifyType getLhsType() {
return lhs; return lhs;
} }
/** /**
* Returns the type on the right hand side of the pair. * Returns the type on the right hand side of the pair.
*/ */
public UnifyType getRhsType() { public UnifyType getRhsType() {
return rhs; return rhs;
} }
/** /**
* Returns the operator that determines the relation between the left and right hand side type. * Returns the operator that determines the relation between the left and right hand side type.
*/ */
public PairOperator getPairOp() { public PairOperator getPairOp() {
return pairOp; return pairOp;
} }
public void setPairOp(PairOperator po) { public void setPairOp(PairOperator po) {
pairOp = po; pairOp = po;
} }
public void addSubstitutions(Set<UnifyPair> sup) { public void addSubstitutions(Set<UnifyPair> sup) {
substitution.addAll(sup); substitution.addAll(sup);
} }
public byte getVariance() { public byte getVariance() {
return variance; return variance;
} }
public void setVariance(byte v) { public void setVariance(byte v) {
variance = v; variance = v;
} }
public void setUndefinedPair() { public void setUndefinedPair() {
undefinedPair = true; undefinedPair = true;
} }
public Set<UnifyPair> getSubstitution() { public Set<UnifyPair> getSubstitution() {
return new HashSet<>(substitution); return new HashSet<>(substitution);
} }
public UnifyPair getBasePair() { public UnifyPair getBasePair() {
return basePair; return basePair;
} }
public boolean isUndefinedPair() { public boolean isUndefinedPair() {
return undefinedPair; return undefinedPair;
} }
public Set<UnifyPair> getAllSubstitutions () { public Set<UnifyPair> getAllSubstitutions () {
Set<UnifyPair> ret = new HashSet<>(); Set<UnifyPair> ret = new HashSet<>();
ret.addAll(new ArrayList<>(getSubstitution())); ret.addAll(new ArrayList<>(getSubstitution()));
if (basePair != null) { if (basePair != null) {
ret.addAll(new ArrayList<>(basePair.getAllSubstitutions())); ret.addAll(new ArrayList<>(basePair.getAllSubstitutions()));
} }
return ret; return ret;
} }
public Set<UnifyPair> getAllBases () { public Set<UnifyPair> getAllBases () {
Set<UnifyPair> ret = new HashSet<>(); Set<UnifyPair> ret = new HashSet<>();
if (basePair != null) { if (basePair != null) {
ret.add(getBasePair()); ret.add(getBasePair());
ret.addAll(basePair.getAllBases()); ret.addAll(basePair.getAllBases());
} }
return ret; return ret;
} }
public UnifyPair getGroundBasePair () { public UnifyPair getGroundBasePair () {
if (basePair == null) { if (basePair == null) {
return this; return this;
} }
if (basePair.getBasePair() == null) { if (basePair.getBasePair() == null) {
return basePair; return basePair;
} }
else { else {
return basePair.getGroundBasePair(); return basePair.getGroundBasePair();
} }
} }
/** /**
* wenn in einem Paar bestehend aus 2 Typvariablen eine nicht wildcardtable ist, * wenn in einem Paar bestehend aus 2 Typvariablen eine nicht wildcardtable ist,
* so beide auf nicht wildcardtable setzen * so beide auf nicht wildcardtable setzen
*/ */
public void disableCondWildcards() { public void disableCondWildcards() {
if (lhs instanceof PlaceholderType && rhs instanceof PlaceholderType if (lhs instanceof PlaceholderType && rhs instanceof PlaceholderType
&& (!((PlaceholderType)lhs).isWildcardable() || !((PlaceholderType)rhs).isWildcardable())) && (!((PlaceholderType)lhs).isWildcardable() || !((PlaceholderType)rhs).isWildcardable()))
{ {
((PlaceholderType)lhs).disableWildcardtable(); ((PlaceholderType)lhs).disableWildcardtable();
((PlaceholderType)rhs).disableWildcardtable(); ((PlaceholderType)rhs).disableWildcardtable();
} }
} }
public Boolean wrongWildcard() { public Boolean wrongWildcard() {
return lhs.wrongWildcard() || rhs.wrongWildcard(); return lhs.wrongWildcard() || rhs.wrongWildcard();
} }
public Set<UnifyType> getfBounded() { public Set<UnifyType> getfBounded() {
return this.fBounded; return this.fBounded;
} }
@Override @Override
public boolean equals(Object obj) { public boolean equals(Object obj) {
if(!(obj instanceof UnifyPair)) if(!(obj instanceof UnifyPair))
return false; return false;
if(obj.hashCode() != this.hashCode()) if(obj.hashCode() != this.hashCode())
return false; return false;
UnifyPair other = (UnifyPair) obj; UnifyPair other = (UnifyPair) obj;
if (isUndefinedPair()) { if (isUndefinedPair()) {
if (other.getBasePair() != basePair || (other.getBasePair() == null && basePair == null)) { if (other.getBasePair() != basePair || (other.getBasePair() == null && basePair == null)) {
return false; return false;
} }
if (!other.getBasePair().equals(basePair) || if (!other.getBasePair().equals(basePair) ||
!other.getAllSubstitutions().equals(getAllSubstitutions())) { !other.getAllSubstitutions().equals(getAllSubstitutions())) {
return false; return false;
} }
} }
return other.getPairOp() == pairOp return other.getPairOp() == pairOp
&& other.getLhsType().equals(lhs) && other.getLhsType().equals(lhs)
&& other.getRhsType().equals(rhs); && other.getRhsType().equals(rhs);
} }
@Override @Override
public int hashCode() { public int hashCode() {
return hashCode; return hashCode;
} }
@Override @Override
public String toString() { public String toString() {
String ret = ""; String ret = "";
if (lhs instanceof PlaceholderType) { if (lhs instanceof PlaceholderType) {
ret = new Integer(((PlaceholderType)lhs).getVariance()).toString() + " " + ((PlaceholderType)lhs).isInnerType() ret = new Integer(((PlaceholderType)lhs).getVariance()).toString() + " " + ((PlaceholderType)lhs).isInnerType()
+ " " + ((PlaceholderType)lhs).isWildcardable(); + " " + ((PlaceholderType)lhs).isWildcardable();
} }
if (rhs instanceof PlaceholderType) { if (rhs instanceof PlaceholderType) {
ret = ret + ", " + new Integer(((PlaceholderType)rhs).getVariance()).toString() + " " + ((PlaceholderType)rhs).isInnerType() ret = ret + ", " + new Integer(((PlaceholderType)rhs).getVariance()).toString() + " " + ((PlaceholderType)rhs).isInnerType()
+ " " + ((PlaceholderType)rhs).isWildcardable(); + " " + ((PlaceholderType)rhs).isWildcardable();
} }
return "(" + lhs + " " + pairOp + " " + rhs + ", " + ret + ")"; //+ ", [" + getfBounded().toString()+ "])"; return "(" + lhs + " " + pairOp + " " + rhs + ", " + ret + ")"; //+ ", [" + getfBounded().toString()+ "])";
} }
/* /*
public List<? extends PlaceholderType> getInvolvedPlaceholderTypes() { public List<? extends PlaceholderType> getInvolvedPlaceholderTypes() {
ArrayList<PlaceholderType> ret = new ArrayList<>(); ArrayList<PlaceholderType> ret = new ArrayList<>();
ret.addAll(lhs.getInvolvedPlaceholderTypes()); ret.addAll(lhs.getInvolvedPlaceholderTypes());
ret.addAll(rhs.getInvolvedPlaceholderTypes()); ret.addAll(rhs.getInvolvedPlaceholderTypes());
return ret; return ret;
} }
*/ */
} }

View File

@ -1,119 +1,119 @@
package de.dhbwstuttgart.typeinference.unify.model; package de.dhbwstuttgart.typeinference.unify.model;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collection; import java.util.Collection;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Set; import java.util.Set;
import de.dhbwstuttgart.syntaxtree.StatementVisitor; import de.dhbwstuttgart.syntaxtree.StatementVisitor;
import de.dhbwstuttgart.typeinference.unify.interfaces.IFiniteClosure; import de.dhbwstuttgart.typeinference.unify.interfaces.IFiniteClosure;
import de.dhbwstuttgart.typeinference.unify.interfaces.UnifyTypeVisitor; import de.dhbwstuttgart.typeinference.unify.interfaces.UnifyTypeVisitor;
/** /**
* Represents a java type. * Represents a java type.
* @author Florian Steurer * @author Florian Steurer
*/ */
public abstract class UnifyType { public abstract class UnifyType {
/** /**
* The name of the type e.q. "Integer", "? extends Integer" or "List" for (List<T>) * The name of the type e.q. "Integer", "? extends Integer" or "List" for (List<T>)
*/ */
protected final String typeName; protected final String typeName;
/** /**
* The type parameters of the type. * The type parameters of the type.
*/ */
protected final TypeParams typeParams; protected final TypeParams typeParams;
/** /**
* Creates a new instance * Creates a new instance
* @param name Name of the type (e.q. List for List<T>, Integer or ? extends Integer) * @param name Name of the type (e.q. List for List<T>, Integer or ? extends Integer)
* @param typeParams Parameters of the type (e.q. <T> for List<T>) * @param typeParams Parameters of the type (e.q. <T> for List<T>)
*/ */
protected UnifyType(String name, TypeParams p) { protected UnifyType(String name, TypeParams p) {
typeName = name; typeName = name;
typeParams = p; typeParams = p;
} }
abstract public <T> UnifyType accept(UnifyTypeVisitor<T> visitor, T ht); abstract public <T> UnifyType accept(UnifyTypeVisitor<T> visitor, T ht);
/** /**
* Returns the name of the type. * Returns the name of the type.
* @return The name e.q. List for List<T>, Integer or ? extends Integer * @return The name e.q. List for List<T>, Integer or ? extends Integer
*/ */
public String getName() { public String getName() {
return typeName; return typeName;
} }
/** /**
* The parameters of the type. * The parameters of the type.
* @return Parameters of the type, e.q. <T> for List<T>. * @return Parameters of the type, e.q. <T> for List<T>.
*/ */
public TypeParams getTypeParams() { public TypeParams getTypeParams() {
return typeParams; return typeParams;
} }
/** /**
* Returns a new type that equals this type except for the type parameters. * Returns a new type that equals this type except for the type parameters.
* @param newTp The type params of the new type. * @param newTp The type params of the new type.
* @return A new type object. * @return A new type object.
*/ */
public abstract UnifyType setTypeParams(TypeParams newTp); public abstract UnifyType setTypeParams(TypeParams newTp);
/** /**
* Implementation of the visitor-pattern. Returns the set of smArg * Implementation of the visitor-pattern. Returns the set of smArg
* by calling the most specific overload in the FC. * by calling the most specific overload in the FC.
* @param fc The FC that is called. * @param fc The FC that is called.
* @return The set that is smArg(this) * @return The set that is smArg(this)
*/ */
abstract Set<UnifyType> smArg(IFiniteClosure fc, Set<UnifyType> fBounded); abstract Set<UnifyType> smArg(IFiniteClosure fc, Set<UnifyType> fBounded);
/** /**
* Implementation of the visitor-pattern. Returns the set of grArg * Implementation of the visitor-pattern. Returns the set of grArg
* by calling the most specific overload in the FC. * by calling the most specific overload in the FC.
* @param fc The FC that is called. * @param fc The FC that is called.
* @return The set that is grArg(this) * @return The set that is grArg(this)
*/ */
abstract Set<UnifyType> grArg(IFiniteClosure fc, Set<UnifyType> fBounded); abstract Set<UnifyType> grArg(IFiniteClosure fc, Set<UnifyType> fBounded);
/** /**
* Applies a unifier to this object. * Applies a unifier to this object.
* @param unif The unifier * @param unif The unifier
* @return A UnifyType, that may or may not be a new object, that has its subtypes substituted. * @return A UnifyType, that may or may not be a new object, that has its subtypes substituted.
*/ */
abstract UnifyType apply(Unifier unif); abstract UnifyType apply(Unifier unif);
@Override @Override
public String toString() { public String toString() {
String params = ""; String params = "";
if(typeParams.size() != 0) { if(typeParams.size() != 0) {
for(UnifyType param : typeParams) for(UnifyType param : typeParams)
params += param.toString() + ","; params += param.toString() + ",";
params = "<" + params.substring(0, params.length()-1) + ">"; params = "<" + params.substring(0, params.length()-1) + ">";
} }
return typeName + params; return typeName + params;
} }
public Collection<PlaceholderType> getInvolvedPlaceholderTypes() { public Collection<PlaceholderType> getInvolvedPlaceholderTypes() {
ArrayList<PlaceholderType> ret = new ArrayList<>(); ArrayList<PlaceholderType> ret = new ArrayList<>();
ret.addAll(typeParams.getInvolvedPlaceholderTypes()); ret.addAll(typeParams.getInvolvedPlaceholderTypes());
return ret; return ret;
} }
public Boolean wrongWildcard() {//default public Boolean wrongWildcard() {//default
return false; return false;
} }
@Override @Override
public int hashCode() { public int hashCode() {
return this.toString().hashCode(); return this.toString().hashCode();
} }
@Override @Override
public boolean equals(Object obj) { public boolean equals(Object obj) {
return this.toString().equals(obj.toString()); return this.toString().equals(obj.toString());
} }
} }

View File

@ -1,72 +1,72 @@
package de.dhbwstuttgart.typeinference.unify.model; package de.dhbwstuttgart.typeinference.unify.model;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collection; import java.util.Collection;
/** /**
* A wildcard type that is either a ExtendsType or a SuperType. * A wildcard type that is either a ExtendsType or a SuperType.
* @author Florian Steurer * @author Florian Steurer
*/ */
public abstract class WildcardType extends UnifyType { public abstract class WildcardType extends UnifyType {
/** /**
* The wildcarded type, e.q. Integer for ? extends Integer. Never a wildcard type itself. * The wildcarded type, e.q. Integer for ? extends Integer. Never a wildcard type itself.
*/ */
protected UnifyType wildcardedType; protected UnifyType wildcardedType;
/** /**
* Creates a new instance. * Creates a new instance.
* @param name The name of the type, e.q. ? extends Integer * @param name The name of the type, e.q. ? extends Integer
* @param wildcardedType The wildcarded type, e.q. Integer for ? extends Integer. Never a wildcard type itself. * @param wildcardedType The wildcarded type, e.q. Integer for ? extends Integer. Never a wildcard type itself.
*/ */
protected WildcardType(String name, UnifyType wildcardedType) { protected WildcardType(String name, UnifyType wildcardedType) {
super(name, wildcardedType.getTypeParams()); super(name, wildcardedType.getTypeParams());
this.wildcardedType = wildcardedType; this.wildcardedType = wildcardedType;
} }
/** /**
* Returns the wildcarded type, e.q. Integer for ? extends Integer. * Returns the wildcarded type, e.q. Integer for ? extends Integer.
* @return The wildcarded type. Never a wildcard type itself. * @return The wildcarded type. Never a wildcard type itself.
*/ */
public UnifyType getWildcardedType() { public UnifyType getWildcardedType() {
return wildcardedType; return wildcardedType;
} }
/** /**
* Returns the type parameters of the WILDCARDED TYPE. * Returns the type parameters of the WILDCARDED TYPE.
*/ */
@Override @Override
public TypeParams getTypeParams() { public TypeParams getTypeParams() {
return wildcardedType.getTypeParams(); return wildcardedType.getTypeParams();
} }
@Override @Override
public Boolean wrongWildcard () {//This is an error public Boolean wrongWildcard () {//This is an error
return (wildcardedType instanceof WildcardType); return (wildcardedType instanceof WildcardType);
} }
@Override @Override
public int hashCode() { public int hashCode() {
return wildcardedType.hashCode() + getName().hashCode() + 17; return wildcardedType.hashCode() + getName().hashCode() + 17;
} }
@Override @Override
public boolean equals(Object obj) { public boolean equals(Object obj) {
if(!(obj instanceof WildcardType)) if(!(obj instanceof WildcardType))
return false; return false;
if(obj.hashCode() != this.hashCode()) if(obj.hashCode() != this.hashCode())
return false; return false;
WildcardType other = (WildcardType) obj; WildcardType other = (WildcardType) obj;
return other.getWildcardedType().equals(wildcardedType); return other.getWildcardedType().equals(wildcardedType);
} }
@Override @Override
public Collection<PlaceholderType> getInvolvedPlaceholderTypes() { public Collection<PlaceholderType> getInvolvedPlaceholderTypes() {
ArrayList<PlaceholderType> ret = new ArrayList<>(); ArrayList<PlaceholderType> ret = new ArrayList<>();
ret.addAll(wildcardedType.getInvolvedPlaceholderTypes()); ret.addAll(wildcardedType.getInvolvedPlaceholderTypes());
return ret; return ret;
} }
} }