Merge branch 'bigRefactoring' into simplifyRes
# Conflicts: # src/main/java/de/dhbwstuttgart/bytecode/utilities/SimplifyResult.java # src/main/java/de/dhbwstuttgart/core/JavaTXCompiler.java
@ -1 +1 @@
|
||||
|
||||
|
||||
|
@ -1,29 +1,29 @@
|
||||
/* Javadoc style sheet */
|
||||
|
||||
/* Define colors, fonts and other style attributes here to override the defaults */
|
||||
|
||||
/* Page background color */
|
||||
body { background-color: #FFFFFF }
|
||||
|
||||
/* Table colors */
|
||||
.TableHeadingColor { background: #CCCCFF } /* Dark mauve */
|
||||
.TableSubHeadingColor { background: #EEEEFF } /* Light mauve */
|
||||
.TableRowColor { background: #FFFFFF } /* White */
|
||||
|
||||
/* Font used in left-hand frame lists */
|
||||
.FrameTitleFont { font-size: 10pts; font-family: Helvetica, Arial, san-serif }
|
||||
.FrameHeadingFont { font-size: 10pts; font-family: Helvetica, Arial, san-serif }
|
||||
.FrameItemFont { font-size: 10pts; font-family: Helvetica, Arial, san-serif }
|
||||
|
||||
/* Example of smaller, sans-serif font in frames */
|
||||
/* .FrameItemFont { font-size: 10pt; font-family: Helvetica, Arial, sans-serif } */
|
||||
|
||||
/* Navigation bar fonts and colors */
|
||||
.NavBarCell1 { background-color:#EEEEFF;}/* Light mauve */
|
||||
.NavBarCell1Rev { background-color:#00008B;}/* Dark Blue */
|
||||
.NavBarFont1 { font-family: Arial, Helvetica, sans-serif; color:#000000;}
|
||||
.NavBarFont1Rev { font-family: Arial, Helvetica, sans-serif; color:#FFFFFF;}
|
||||
|
||||
.NavBarCell2 { font-family: Arial, Helvetica, sans-serif; background-color:#FFFFFF;}
|
||||
.NavBarCell3 { font-family: Arial, Helvetica, sans-serif; background-color:#FFFFFF;}
|
||||
|
||||
/* Javadoc style sheet */
|
||||
|
||||
/* Define colors, fonts and other style attributes here to override the defaults */
|
||||
|
||||
/* Page background color */
|
||||
body { background-color: #FFFFFF }
|
||||
|
||||
/* Table colors */
|
||||
.TableHeadingColor { background: #CCCCFF } /* Dark mauve */
|
||||
.TableSubHeadingColor { background: #EEEEFF } /* Light mauve */
|
||||
.TableRowColor { background: #FFFFFF } /* White */
|
||||
|
||||
/* Font used in left-hand frame lists */
|
||||
.FrameTitleFont { font-size: 10pts; font-family: Helvetica, Arial, san-serif }
|
||||
.FrameHeadingFont { font-size: 10pts; font-family: Helvetica, Arial, san-serif }
|
||||
.FrameItemFont { font-size: 10pts; font-family: Helvetica, Arial, san-serif }
|
||||
|
||||
/* Example of smaller, sans-serif font in frames */
|
||||
/* .FrameItemFont { font-size: 10pt; font-family: Helvetica, Arial, sans-serif } */
|
||||
|
||||
/* Navigation bar fonts and colors */
|
||||
.NavBarCell1 { background-color:#EEEEFF;}/* Light mauve */
|
||||
.NavBarCell1Rev { background-color:#00008B;}/* Dark Blue */
|
||||
.NavBarFont1 { font-family: Arial, Helvetica, sans-serif; color:#000000;}
|
||||
.NavBarFont1Rev { font-family: Arial, Helvetica, sans-serif; color:#FFFFFF;}
|
||||
|
||||
.NavBarCell2 { font-family: Arial, Helvetica, sans-serif; background-color:#FFFFFF;}
|
||||
.NavBarCell3 { font-family: Arial, Helvetica, sans-serif; background-color:#FFFFFF;}
|
||||
|
||||
|
@ -1,220 +1,220 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<editmodel:ClassDiagramEditModel xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:editmodel="editmodel.xmi" id="kirschmshsCompiler0" metadata="nsuml-1.4" initialized="true" showWireOptions="1">
|
||||
<children xsi:type="editmodel:ClassEditModel" location="448,178" size="371,67" targetConnections="//@children.11/@sourceConnections.0" id="kirschmshsCompiler761" runTimeClassModel="kirschmshsCompiler860">
|
||||
<children xsi:type="editmodel:CompartmentEditModel"/>
|
||||
<children xsi:type="editmodel:CompartmentEditModel" size="348,18">
|
||||
<children xsi:type="editmodel:MethodEditModel" id="kirschmshsCompiler860"/>
|
||||
</children>
|
||||
<children xsi:type="editmodel:CompartmentEditModel"/>
|
||||
<sourceConnections xsi:type="editmodel:GeneralizationEditModel" targetConnections="//@children.14/@sourceConnections.0 //@children.15/@sourceConnections.0 //@children.9/@sourceConnections.0" id="kirschmshsCompiler762" connectionRouterKind="GeneralizationManhattan" source="//@children.0" target="//@children.16" targetEnd="//@children.0/@sourceConnections.0/@children.1" sourceEnd="//@children.0/@sourceConnections.0/@children.0">
|
||||
<children xsi:type="editmodel:AssociationEndEditModel" location="185,0" anchorKind="FixedAtEdge" attachSource="true"/>
|
||||
<children xsi:type="editmodel:AssociationEndEditModel" location="201,67" anchorKind="FixedAtEdge"/>
|
||||
</sourceConnections>
|
||||
<classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" attributeSorter="Visibility" methodSorter="Visibility" innerClassSorter="Visibility" showPublicAttributes="true" showPackageAttributes="true" showPublicMethods="true" showPackageMethods="true" showPublicInnerClasses="true" showPackageInnerClasses="true"/>
|
||||
</children>
|
||||
<children xsi:type="editmodel:ClassEditModel" location="914,555" size="403,85" id="kirschmshsCompiler873" runTimeClassModel="kirschmshsCompiler881;kirschmshsCompiler874">
|
||||
<children xsi:type="editmodel:CompartmentEditModel"/>
|
||||
<children xsi:type="editmodel:CompartmentEditModel" size="380,36">
|
||||
<children xsi:type="editmodel:MethodEditModel" id="kirschmshsCompiler874"/>
|
||||
<children xsi:type="editmodel:MethodEditModel" id="kirschmshsCompiler881"/>
|
||||
</children>
|
||||
<children xsi:type="editmodel:CompartmentEditModel"/>
|
||||
<sourceConnections xsi:type="editmodel:GeneralizationEditModel" connectionRouterKind="Manual" source="//@children.1" target="//@children.11/@sourceConnections.0" targetEnd="//@children.1/@sourceConnections.0/@children.1" sourceEnd="//@children.1/@sourceConnections.0/@children.0">
|
||||
<children xsi:type="editmodel:AssociationEndEditModel" location="201,0" anchorKind="FixedAtEdge" attachSource="true"/>
|
||||
<children xsi:type="editmodel:AssociationEndEditModel"/>
|
||||
</sourceConnections>
|
||||
<classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" attributeSorter="Visibility" methodSorter="Visibility" innerClassSorter="Visibility" showPublicAttributes="true" showPackageAttributes="true" showPublicMethods="true" showPackageMethods="true" showPublicInnerClasses="true" showPackageInnerClasses="true"/>
|
||||
</children>
|
||||
<children xsi:type="editmodel:ClassEditModel" location="484,554" size="403,85" id="kirschmshsCompiler985" runTimeClassModel="kirschmshsCompiler993;kirschmshsCompiler986">
|
||||
<children xsi:type="editmodel:CompartmentEditModel"/>
|
||||
<children xsi:type="editmodel:CompartmentEditModel" size="380,36">
|
||||
<children xsi:type="editmodel:MethodEditModel" id="kirschmshsCompiler986"/>
|
||||
<children xsi:type="editmodel:MethodEditModel" id="kirschmshsCompiler993"/>
|
||||
</children>
|
||||
<children xsi:type="editmodel:CompartmentEditModel"/>
|
||||
<sourceConnections xsi:type="editmodel:GeneralizationEditModel" connectionRouterKind="Manual" source="//@children.2" target="//@children.11/@sourceConnections.0" targetEnd="//@children.2/@sourceConnections.0/@children.1" sourceEnd="//@children.2/@sourceConnections.0/@children.0">
|
||||
<children xsi:type="editmodel:AssociationEndEditModel" location="201,0" anchorKind="FixedAtEdge" attachSource="true"/>
|
||||
<children xsi:type="editmodel:AssociationEndEditModel"/>
|
||||
</sourceConnections>
|
||||
<classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" attributeSorter="Visibility" methodSorter="Visibility" innerClassSorter="Visibility" showPublicAttributes="true" showPackageAttributes="true" showPublicMethods="true" showPackageMethods="true" showPublicInnerClasses="true" showPackageInnerClasses="true"/>
|
||||
</children>
|
||||
<children xsi:type="editmodel:ClassEditModel" location="1345,559" size="403,85" id="kirschmshsCompiler1012" runTimeClassModel="kirschmshsCompiler1013;kirschmshsCompiler1020">
|
||||
<children xsi:type="editmodel:CompartmentEditModel"/>
|
||||
<children xsi:type="editmodel:CompartmentEditModel" size="380,36">
|
||||
<children xsi:type="editmodel:MethodEditModel" id="kirschmshsCompiler1013"/>
|
||||
<children xsi:type="editmodel:MethodEditModel" id="kirschmshsCompiler1020"/>
|
||||
</children>
|
||||
<children xsi:type="editmodel:CompartmentEditModel"/>
|
||||
<sourceConnections xsi:type="editmodel:GeneralizationEditModel" connectionRouterKind="Manual" source="//@children.3" target="//@children.11/@sourceConnections.0" targetEnd="//@children.3/@sourceConnections.0/@children.1" sourceEnd="//@children.3/@sourceConnections.0/@children.0">
|
||||
<children xsi:type="editmodel:AssociationEndEditModel" location="201,0" anchorKind="FixedAtEdge" attachSource="true"/>
|
||||
<children xsi:type="editmodel:AssociationEndEditModel"/>
|
||||
</sourceConnections>
|
||||
<classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" attributeSorter="Visibility" methodSorter="Visibility" innerClassSorter="Visibility" showPublicAttributes="true" showPackageAttributes="true" showPublicMethods="true" showPackageMethods="true" showPublicInnerClasses="true" showPackageInnerClasses="true"/>
|
||||
</children>
|
||||
<children xsi:type="editmodel:ClassEditModel" location="3194,502" size="403,67" id="kirschmshsCompiler670" runTimeClassModel="kirschmshsCompiler671">
|
||||
<children xsi:type="editmodel:CompartmentEditModel"/>
|
||||
<children xsi:type="editmodel:CompartmentEditModel" size="380,18">
|
||||
<children xsi:type="editmodel:MethodEditModel" id="kirschmshsCompiler671"/>
|
||||
</children>
|
||||
<children xsi:type="editmodel:CompartmentEditModel"/>
|
||||
<sourceConnections xsi:type="editmodel:GeneralizationEditModel" connectionRouterKind="Manual" source="//@children.4" target="//@children.13/@sourceConnections.0" targetEnd="//@children.4/@sourceConnections.0/@children.1" sourceEnd="//@children.4/@sourceConnections.0/@children.0">
|
||||
<children xsi:type="editmodel:AssociationEndEditModel" location="201,0" anchorKind="FixedAtEdge" attachSource="true"/>
|
||||
<children xsi:type="editmodel:AssociationEndEditModel"/>
|
||||
</sourceConnections>
|
||||
<classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" attributeSorter="Visibility" methodSorter="Visibility" innerClassSorter="Visibility" showPublicAttributes="true" showPackageAttributes="true" showPublicMethods="true" showPackageMethods="true" showPublicInnerClasses="true" showPackageInnerClasses="true"/>
|
||||
</children>
|
||||
<children xsi:type="editmodel:ClassEditModel" location="1365,425" size="76,29" id="kirschmshsCompiler765" runTimeClassModel="">
|
||||
<children xsi:type="editmodel:CompartmentEditModel"/>
|
||||
<children xsi:type="editmodel:CompartmentEditModel"/>
|
||||
<children xsi:type="editmodel:CompartmentEditModel"/>
|
||||
<sourceConnections xsi:type="editmodel:GeneralizationEditModel" id="kirschmshsCompiler766" connectionRouterKind="Manual" source="//@children.5" target="//@children.6/@sourceConnections.0" targetEnd="//@children.5/@sourceConnections.0/@children.1" sourceEnd="//@children.5/@sourceConnections.0/@children.0">
|
||||
<children xsi:type="editmodel:AssociationEndEditModel" location="38,0" anchorKind="FixedAtEdge" attachSource="true"/>
|
||||
<children xsi:type="editmodel:AssociationEndEditModel"/>
|
||||
</sourceConnections>
|
||||
<classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" attributeSorter="Visibility" methodSorter="Visibility" innerClassSorter="Visibility" showPublicAttributes="true" showPackageAttributes="true" showPublicMethods="true" showPackageMethods="true" showPublicInnerClasses="true" showPackageInnerClasses="true"/>
|
||||
</children>
|
||||
<children xsi:type="editmodel:ClassEditModel" location="963,417" size="86,29" id="kirschmshsCompiler783" runTimeClassModel="">
|
||||
<children xsi:type="editmodel:CompartmentEditModel"/>
|
||||
<children xsi:type="editmodel:CompartmentEditModel"/>
|
||||
<children xsi:type="editmodel:CompartmentEditModel"/>
|
||||
<sourceConnections xsi:type="editmodel:GeneralizationEditModel" targetConnections="//@children.5/@sourceConnections.0" id="kirschmshsCompiler784" connectionRouterKind="GeneralizationManhattan" source="//@children.6" target="//@children.15" targetEnd="//@children.6/@sourceConnections.0/@children.1" sourceEnd="//@children.6/@sourceConnections.0/@children.0">
|
||||
<children xsi:type="editmodel:AssociationEndEditModel" location="43,0" anchorKind="FixedAtEdge" attachSource="true"/>
|
||||
<children xsi:type="editmodel:AssociationEndEditModel" location="272,139" anchorKind="FixedAtEdge"/>
|
||||
</sourceConnections>
|
||||
<classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" attributeSorter="Visibility" methodSorter="Visibility" innerClassSorter="Visibility" showPublicAttributes="true" showPackageAttributes="true" showPublicMethods="true" showPackageMethods="true" showPublicInnerClasses="true" showPackageInnerClasses="true"/>
|
||||
</children>
|
||||
<children xsi:type="editmodel:ClassEditModel" location="2069,372" size="403,67" id="kirschmshsCompiler841" runTimeClassModel="kirschmshsCompiler842">
|
||||
<children xsi:type="editmodel:CompartmentEditModel"/>
|
||||
<children xsi:type="editmodel:CompartmentEditModel" size="380,18">
|
||||
<children xsi:type="editmodel:MethodEditModel" id="kirschmshsCompiler842"/>
|
||||
</children>
|
||||
<children xsi:type="editmodel:CompartmentEditModel"/>
|
||||
<sourceConnections xsi:type="editmodel:GeneralizationEditModel" connectionRouterKind="Manual" source="//@children.7" target="//@children.12/@sourceConnections.0" targetEnd="//@children.7/@sourceConnections.0/@children.1" sourceEnd="//@children.7/@sourceConnections.0/@children.0">
|
||||
<children xsi:type="editmodel:AssociationEndEditModel" location="201,0" anchorKind="FixedAtEdge" attachSource="true"/>
|
||||
<children xsi:type="editmodel:AssociationEndEditModel"/>
|
||||
</sourceConnections>
|
||||
<classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" attributeSorter="Visibility" methodSorter="Visibility" innerClassSorter="Visibility" showPublicAttributes="true" showPackageAttributes="true" showPublicMethods="true" showPackageMethods="true" showPublicInnerClasses="true" showPackageInnerClasses="true"/>
|
||||
</children>
|
||||
<children xsi:type="editmodel:ClassEditModel" location="2227,562" size="403,85" id="kirschmshsCompiler904" runTimeClassModel="kirschmshsCompiler905;kirschmshsCompiler912">
|
||||
<children xsi:type="editmodel:CompartmentEditModel"/>
|
||||
<children xsi:type="editmodel:CompartmentEditModel" size="380,36">
|
||||
<children xsi:type="editmodel:MethodEditModel" id="kirschmshsCompiler905"/>
|
||||
<children xsi:type="editmodel:MethodEditModel" id="kirschmshsCompiler912"/>
|
||||
</children>
|
||||
<children xsi:type="editmodel:CompartmentEditModel"/>
|
||||
<sourceConnections xsi:type="editmodel:GeneralizationEditModel" connectionRouterKind="Manual" source="//@children.8" target="//@children.11/@sourceConnections.0" targetEnd="//@children.8/@sourceConnections.0/@children.1" sourceEnd="//@children.8/@sourceConnections.0/@children.0">
|
||||
<children xsi:type="editmodel:AssociationEndEditModel" location="201,0" anchorKind="FixedAtEdge" attachSource="true"/>
|
||||
<children xsi:type="editmodel:AssociationEndEditModel"/>
|
||||
</sourceConnections>
|
||||
<classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" attributeSorter="Visibility" methodSorter="Visibility" innerClassSorter="Visibility" showPublicAttributes="true" showPackageAttributes="true" showPublicMethods="true" showPackageMethods="true" showPublicInnerClasses="true" showPackageInnerClasses="true"/>
|
||||
</children>
|
||||
<children xsi:type="editmodel:ClassEditModel" location="2965,229" size="403,67" targetConnections="//@children.13/@sourceConnections.0" id="kirschmshsCompiler653" runTimeClassModel="kirschmshsCompiler654">
|
||||
<children xsi:type="editmodel:CompartmentEditModel"/>
|
||||
<children xsi:type="editmodel:CompartmentEditModel" size="380,18">
|
||||
<children xsi:type="editmodel:MethodEditModel" id="kirschmshsCompiler654"/>
|
||||
</children>
|
||||
<children xsi:type="editmodel:CompartmentEditModel"/>
|
||||
<sourceConnections xsi:type="editmodel:GeneralizationEditModel" connectionRouterKind="Manual" source="//@children.9" target="//@children.0/@sourceConnections.0" targetEnd="//@children.9/@sourceConnections.0/@children.1" sourceEnd="//@children.9/@sourceConnections.0/@children.0">
|
||||
<children xsi:type="editmodel:AssociationEndEditModel" location="201,0" anchorKind="FixedAtEdge" attachSource="true"/>
|
||||
<children xsi:type="editmodel:AssociationEndEditModel"/>
|
||||
</sourceConnections>
|
||||
<classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" attributeSorter="Visibility" methodSorter="Visibility" innerClassSorter="Visibility" showPublicAttributes="true" showPackageAttributes="true" showPublicMethods="true" showPackageMethods="true" showPublicInnerClasses="true" showPackageInnerClasses="true"/>
|
||||
</children>
|
||||
<children xsi:type="editmodel:ClassEditModel" location="2502,372" size="403,67" id="kirschmshsCompiler822" runTimeClassModel="kirschmshsCompiler823">
|
||||
<children xsi:type="editmodel:CompartmentEditModel"/>
|
||||
<children xsi:type="editmodel:CompartmentEditModel" size="380,18">
|
||||
<children xsi:type="editmodel:MethodEditModel" id="kirschmshsCompiler823"/>
|
||||
</children>
|
||||
<children xsi:type="editmodel:CompartmentEditModel"/>
|
||||
<sourceConnections xsi:type="editmodel:GeneralizationEditModel" connectionRouterKind="Manual" source="//@children.10" target="//@children.12/@sourceConnections.0" targetEnd="//@children.10/@sourceConnections.0/@children.1" sourceEnd="//@children.10/@sourceConnections.0/@children.0">
|
||||
<children xsi:type="editmodel:AssociationEndEditModel" location="201,0" anchorKind="FixedAtEdge" attachSource="true"/>
|
||||
<children xsi:type="editmodel:AssociationEndEditModel"/>
|
||||
</sourceConnections>
|
||||
<classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" attributeSorter="Visibility" methodSorter="Visibility" innerClassSorter="Visibility" showPublicAttributes="true" showPackageAttributes="true" showPublicMethods="true" showPackageMethods="true" showPublicInnerClasses="true" showPackageInnerClasses="true"/>
|
||||
</children>
|
||||
<children xsi:type="editmodel:ClassEditModel" location="45,553" size="403,85" id="kirschmshsCompiler931" runTimeClassModel="kirschmshsCompiler939;kirschmshsCompiler932">
|
||||
<children xsi:type="editmodel:CompartmentEditModel"/>
|
||||
<children xsi:type="editmodel:CompartmentEditModel" size="380,36">
|
||||
<children xsi:type="editmodel:MethodEditModel" id="kirschmshsCompiler932"/>
|
||||
<children xsi:type="editmodel:MethodEditModel" id="kirschmshsCompiler939"/>
|
||||
</children>
|
||||
<children xsi:type="editmodel:CompartmentEditModel"/>
|
||||
<sourceConnections xsi:type="editmodel:GeneralizationEditModel" targetConnections="//@children.2/@sourceConnections.0 //@children.1/@sourceConnections.0 //@children.3/@sourceConnections.0 //@children.17/@sourceConnections.0 //@children.8/@sourceConnections.0" connectionRouterKind="GeneralizationManhattan" source="//@children.11" target="//@children.0" targetEnd="//@children.11/@sourceConnections.0/@children.1" sourceEnd="//@children.11/@sourceConnections.0/@children.0">
|
||||
<children xsi:type="editmodel:AssociationEndEditModel" location="201,0" anchorKind="FixedAtEdge" attachSource="true"/>
|
||||
<children xsi:type="editmodel:AssociationEndEditModel" location="185,67" anchorKind="FixedAtEdge"/>
|
||||
</sourceConnections>
|
||||
<classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" attributeSorter="Visibility" methodSorter="Visibility" innerClassSorter="Visibility" showPublicAttributes="true" showPackageAttributes="true" showPublicMethods="true" showPackageMethods="true" showPublicInnerClasses="true" showPackageInnerClasses="true"/>
|
||||
</children>
|
||||
<children xsi:type="editmodel:ClassEditModel" location="1636,372" size="403,67" id="kirschmshsCompiler803" runTimeClassModel="kirschmshsCompiler804">
|
||||
<children xsi:type="editmodel:CompartmentEditModel"/>
|
||||
<children xsi:type="editmodel:CompartmentEditModel" size="380,18">
|
||||
<children xsi:type="editmodel:MethodEditModel" id="kirschmshsCompiler804"/>
|
||||
</children>
|
||||
<children xsi:type="editmodel:CompartmentEditModel"/>
|
||||
<sourceConnections xsi:type="editmodel:GeneralizationEditModel" targetConnections="//@children.7/@sourceConnections.0 //@children.10/@sourceConnections.0" connectionRouterKind="GeneralizationManhattan" source="//@children.12" target="//@children.14" targetEnd="//@children.12/@sourceConnections.0/@children.1" sourceEnd="//@children.12/@sourceConnections.0/@children.0">
|
||||
<children xsi:type="editmodel:AssociationEndEditModel" location="201,0" anchorKind="FixedAtEdge" attachSource="true"/>
|
||||
<children xsi:type="editmodel:AssociationEndEditModel" location="42,29" anchorKind="FixedAtEdge"/>
|
||||
</sourceConnections>
|
||||
<classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" attributeSorter="Visibility" methodSorter="Visibility" innerClassSorter="Visibility" showPublicAttributes="true" showPackageAttributes="true" showPublicMethods="true" showPackageMethods="true" showPublicInnerClasses="true" showPackageInnerClasses="true"/>
|
||||
</children>
|
||||
<children xsi:type="editmodel:ClassEditModel" location="2715,508" size="403,67" id="kirschmshsCompiler692" runTimeClassModel="kirschmshsCompiler693">
|
||||
<children xsi:type="editmodel:CompartmentEditModel"/>
|
||||
<children xsi:type="editmodel:CompartmentEditModel" size="380,18">
|
||||
<children xsi:type="editmodel:MethodEditModel" id="kirschmshsCompiler693"/>
|
||||
</children>
|
||||
<children xsi:type="editmodel:CompartmentEditModel"/>
|
||||
<sourceConnections xsi:type="editmodel:GeneralizationEditModel" targetConnections="//@children.4/@sourceConnections.0" connectionRouterKind="GeneralizationManhattan" source="//@children.13" target="//@children.9" targetEnd="//@children.13/@sourceConnections.0/@children.1" sourceEnd="//@children.13/@sourceConnections.0/@children.0">
|
||||
<children xsi:type="editmodel:AssociationEndEditModel" location="201,0" anchorKind="FixedAtEdge" attachSource="true"/>
|
||||
<children xsi:type="editmodel:AssociationEndEditModel" location="201,67" anchorKind="FixedAtEdge"/>
|
||||
</sourceConnections>
|
||||
<classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" attributeSorter="Visibility" methodSorter="Visibility" innerClassSorter="Visibility" showPublicAttributes="true" showPackageAttributes="true" showPublicMethods="true" showPackageMethods="true" showPublicInnerClasses="true" showPackageInnerClasses="true"/>
|
||||
</children>
|
||||
<children xsi:type="editmodel:ClassEditModel" location="2223,234" size="84,29" targetConnections="//@children.12/@sourceConnections.0" id="kirschmshsCompiler801" runTimeClassModel="">
|
||||
<children xsi:type="editmodel:CompartmentEditModel"/>
|
||||
<children xsi:type="editmodel:CompartmentEditModel"/>
|
||||
<children xsi:type="editmodel:CompartmentEditModel"/>
|
||||
<sourceConnections xsi:type="editmodel:GeneralizationEditModel" connectionRouterKind="Manual" source="//@children.14" target="//@children.0/@sourceConnections.0" targetEnd="//@children.14/@sourceConnections.0/@children.1" sourceEnd="//@children.14/@sourceConnections.0/@children.0">
|
||||
<children xsi:type="editmodel:AssociationEndEditModel" location="42,0" anchorKind="FixedAtEdge" attachSource="true"/>
|
||||
<children xsi:type="editmodel:AssociationEndEditModel"/>
|
||||
</sourceConnections>
|
||||
<classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" attributeSorter="Visibility" methodSorter="Visibility" innerClassSorter="Visibility" showPublicAttributes="true" showPackageAttributes="true" showPublicMethods="true" showPackageMethods="true" showPublicInnerClasses="true" showPackageInnerClasses="true"/>
|
||||
</children>
|
||||
<children xsi:type="editmodel:ClassEditModel" location="940,191" size="545,139" targetConnections="//@children.6/@sourceConnections.0" id="kirschmshsCompiler711" runTimeClassModel="kirschmshsCompiler719;kirschmshsCompiler729;kirschmshsCompiler737;kirschmshsCompiler747;kirschmshsCompiler712">
|
||||
<children xsi:type="editmodel:CompartmentEditModel"/>
|
||||
<children xsi:type="editmodel:CompartmentEditModel" size="522,90">
|
||||
<children xsi:type="editmodel:MethodEditModel" id="kirschmshsCompiler712"/>
|
||||
<children xsi:type="editmodel:MethodEditModel" id="kirschmshsCompiler719"/>
|
||||
<children xsi:type="editmodel:MethodEditModel" id="kirschmshsCompiler729"/>
|
||||
<children xsi:type="editmodel:MethodEditModel" id="kirschmshsCompiler747"/>
|
||||
<children xsi:type="editmodel:MethodEditModel" id="kirschmshsCompiler737"/>
|
||||
</children>
|
||||
<children xsi:type="editmodel:CompartmentEditModel"/>
|
||||
<sourceConnections xsi:type="editmodel:GeneralizationEditModel" connectionRouterKind="Manual" source="//@children.15" target="//@children.0/@sourceConnections.0" targetEnd="//@children.15/@sourceConnections.0/@children.1" sourceEnd="//@children.15/@sourceConnections.0/@children.0">
|
||||
<children xsi:type="editmodel:AssociationEndEditModel" location="272,0" anchorKind="FixedAtEdge" attachSource="true"/>
|
||||
<children xsi:type="editmodel:AssociationEndEditModel"/>
|
||||
</sourceConnections>
|
||||
<classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" attributeSorter="Visibility" methodSorter="Visibility" innerClassSorter="Visibility" showPublicAttributes="true" showPackageAttributes="true" showPublicMethods="true" showPackageMethods="true" showPublicInnerClasses="true" showPackageInnerClasses="true"/>
|
||||
</children>
|
||||
<children xsi:type="editmodel:ClassEditModel" location="1023,50" size="403,67" targetConnections="//@children.0/@sourceConnections.0" id="kirschmshsCompiler635" runTimeClassModel="kirschmshsCompiler636">
|
||||
<children xsi:type="editmodel:CompartmentEditModel"/>
|
||||
<children xsi:type="editmodel:CompartmentEditModel" size="380,18">
|
||||
<children xsi:type="editmodel:MethodEditModel" id="kirschmshsCompiler636"/>
|
||||
</children>
|
||||
<children xsi:type="editmodel:CompartmentEditModel"/>
|
||||
<classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" attributeSorter="Visibility" methodSorter="Visibility" innerClassSorter="Visibility" showPublicAttributes="true" showPackageAttributes="true" showPublicMethods="true" showPackageMethods="true" showPublicInnerClasses="true" showPackageInnerClasses="true"/>
|
||||
</children>
|
||||
<children xsi:type="editmodel:ClassEditModel" location="1791,561" size="403,85" id="kirschmshsCompiler958" runTimeClassModel="kirschmshsCompiler959;kirschmshsCompiler966">
|
||||
<children xsi:type="editmodel:CompartmentEditModel"/>
|
||||
<children xsi:type="editmodel:CompartmentEditModel" size="380,36">
|
||||
<children xsi:type="editmodel:MethodEditModel" id="kirschmshsCompiler959"/>
|
||||
<children xsi:type="editmodel:MethodEditModel" id="kirschmshsCompiler966"/>
|
||||
</children>
|
||||
<children xsi:type="editmodel:CompartmentEditModel"/>
|
||||
<sourceConnections xsi:type="editmodel:GeneralizationEditModel" connectionRouterKind="Manual" source="//@children.17" target="//@children.11/@sourceConnections.0" targetEnd="//@children.17/@sourceConnections.0/@children.1" sourceEnd="//@children.17/@sourceConnections.0/@children.0">
|
||||
<children xsi:type="editmodel:AssociationEndEditModel" location="201,0" anchorKind="FixedAtEdge" attachSource="true"/>
|
||||
<children xsi:type="editmodel:AssociationEndEditModel"/>
|
||||
</sourceConnections>
|
||||
<classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" attributeSorter="Visibility" methodSorter="Visibility" innerClassSorter="Visibility" showPublicAttributes="true" showPackageAttributes="true" showPublicMethods="true" showPackageMethods="true" showPublicInnerClasses="true" showPackageInnerClasses="true"/>
|
||||
</children>
|
||||
<classDiagramPreferences xsi:type="editmodel:UMLClassDiagramPreference" attributeSorter="Natural" methodSorter="Natural" innerClassSorter="Natural" showPublicAttributes="true" showPackageAttributes="true" showPublicMethods="true" showPackageMethods="true" showPublicInnerClasses="true" showPackageInnerClasses="true" showInterfaceStereotype="true" showClassStereotype="true" showPackageStereotype="true"/>
|
||||
</editmodel:ClassDiagramEditModel>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<editmodel:ClassDiagramEditModel xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:editmodel="editmodel.xmi" id="kirschmshsCompiler0" metadata="nsuml-1.4" initialized="true" showWireOptions="1">
|
||||
<children xsi:type="editmodel:ClassEditModel" location="448,178" size="371,67" targetConnections="//@children.11/@sourceConnections.0" id="kirschmshsCompiler761" runTimeClassModel="kirschmshsCompiler860">
|
||||
<children xsi:type="editmodel:CompartmentEditModel"/>
|
||||
<children xsi:type="editmodel:CompartmentEditModel" size="348,18">
|
||||
<children xsi:type="editmodel:MethodEditModel" id="kirschmshsCompiler860"/>
|
||||
</children>
|
||||
<children xsi:type="editmodel:CompartmentEditModel"/>
|
||||
<sourceConnections xsi:type="editmodel:GeneralizationEditModel" targetConnections="//@children.14/@sourceConnections.0 //@children.15/@sourceConnections.0 //@children.9/@sourceConnections.0" id="kirschmshsCompiler762" connectionRouterKind="GeneralizationManhattan" source="//@children.0" target="//@children.16" targetEnd="//@children.0/@sourceConnections.0/@children.1" sourceEnd="//@children.0/@sourceConnections.0/@children.0">
|
||||
<children xsi:type="editmodel:AssociationEndEditModel" location="185,0" anchorKind="FixedAtEdge" attachSource="true"/>
|
||||
<children xsi:type="editmodel:AssociationEndEditModel" location="201,67" anchorKind="FixedAtEdge"/>
|
||||
</sourceConnections>
|
||||
<classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" attributeSorter="Visibility" methodSorter="Visibility" innerClassSorter="Visibility" showPublicAttributes="true" showPackageAttributes="true" showPublicMethods="true" showPackageMethods="true" showPublicInnerClasses="true" showPackageInnerClasses="true"/>
|
||||
</children>
|
||||
<children xsi:type="editmodel:ClassEditModel" location="914,555" size="403,85" id="kirschmshsCompiler873" runTimeClassModel="kirschmshsCompiler881;kirschmshsCompiler874">
|
||||
<children xsi:type="editmodel:CompartmentEditModel"/>
|
||||
<children xsi:type="editmodel:CompartmentEditModel" size="380,36">
|
||||
<children xsi:type="editmodel:MethodEditModel" id="kirschmshsCompiler874"/>
|
||||
<children xsi:type="editmodel:MethodEditModel" id="kirschmshsCompiler881"/>
|
||||
</children>
|
||||
<children xsi:type="editmodel:CompartmentEditModel"/>
|
||||
<sourceConnections xsi:type="editmodel:GeneralizationEditModel" connectionRouterKind="Manual" source="//@children.1" target="//@children.11/@sourceConnections.0" targetEnd="//@children.1/@sourceConnections.0/@children.1" sourceEnd="//@children.1/@sourceConnections.0/@children.0">
|
||||
<children xsi:type="editmodel:AssociationEndEditModel" location="201,0" anchorKind="FixedAtEdge" attachSource="true"/>
|
||||
<children xsi:type="editmodel:AssociationEndEditModel"/>
|
||||
</sourceConnections>
|
||||
<classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" attributeSorter="Visibility" methodSorter="Visibility" innerClassSorter="Visibility" showPublicAttributes="true" showPackageAttributes="true" showPublicMethods="true" showPackageMethods="true" showPublicInnerClasses="true" showPackageInnerClasses="true"/>
|
||||
</children>
|
||||
<children xsi:type="editmodel:ClassEditModel" location="484,554" size="403,85" id="kirschmshsCompiler985" runTimeClassModel="kirschmshsCompiler993;kirschmshsCompiler986">
|
||||
<children xsi:type="editmodel:CompartmentEditModel"/>
|
||||
<children xsi:type="editmodel:CompartmentEditModel" size="380,36">
|
||||
<children xsi:type="editmodel:MethodEditModel" id="kirschmshsCompiler986"/>
|
||||
<children xsi:type="editmodel:MethodEditModel" id="kirschmshsCompiler993"/>
|
||||
</children>
|
||||
<children xsi:type="editmodel:CompartmentEditModel"/>
|
||||
<sourceConnections xsi:type="editmodel:GeneralizationEditModel" connectionRouterKind="Manual" source="//@children.2" target="//@children.11/@sourceConnections.0" targetEnd="//@children.2/@sourceConnections.0/@children.1" sourceEnd="//@children.2/@sourceConnections.0/@children.0">
|
||||
<children xsi:type="editmodel:AssociationEndEditModel" location="201,0" anchorKind="FixedAtEdge" attachSource="true"/>
|
||||
<children xsi:type="editmodel:AssociationEndEditModel"/>
|
||||
</sourceConnections>
|
||||
<classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" attributeSorter="Visibility" methodSorter="Visibility" innerClassSorter="Visibility" showPublicAttributes="true" showPackageAttributes="true" showPublicMethods="true" showPackageMethods="true" showPublicInnerClasses="true" showPackageInnerClasses="true"/>
|
||||
</children>
|
||||
<children xsi:type="editmodel:ClassEditModel" location="1345,559" size="403,85" id="kirschmshsCompiler1012" runTimeClassModel="kirschmshsCompiler1013;kirschmshsCompiler1020">
|
||||
<children xsi:type="editmodel:CompartmentEditModel"/>
|
||||
<children xsi:type="editmodel:CompartmentEditModel" size="380,36">
|
||||
<children xsi:type="editmodel:MethodEditModel" id="kirschmshsCompiler1013"/>
|
||||
<children xsi:type="editmodel:MethodEditModel" id="kirschmshsCompiler1020"/>
|
||||
</children>
|
||||
<children xsi:type="editmodel:CompartmentEditModel"/>
|
||||
<sourceConnections xsi:type="editmodel:GeneralizationEditModel" connectionRouterKind="Manual" source="//@children.3" target="//@children.11/@sourceConnections.0" targetEnd="//@children.3/@sourceConnections.0/@children.1" sourceEnd="//@children.3/@sourceConnections.0/@children.0">
|
||||
<children xsi:type="editmodel:AssociationEndEditModel" location="201,0" anchorKind="FixedAtEdge" attachSource="true"/>
|
||||
<children xsi:type="editmodel:AssociationEndEditModel"/>
|
||||
</sourceConnections>
|
||||
<classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" attributeSorter="Visibility" methodSorter="Visibility" innerClassSorter="Visibility" showPublicAttributes="true" showPackageAttributes="true" showPublicMethods="true" showPackageMethods="true" showPublicInnerClasses="true" showPackageInnerClasses="true"/>
|
||||
</children>
|
||||
<children xsi:type="editmodel:ClassEditModel" location="3194,502" size="403,67" id="kirschmshsCompiler670" runTimeClassModel="kirschmshsCompiler671">
|
||||
<children xsi:type="editmodel:CompartmentEditModel"/>
|
||||
<children xsi:type="editmodel:CompartmentEditModel" size="380,18">
|
||||
<children xsi:type="editmodel:MethodEditModel" id="kirschmshsCompiler671"/>
|
||||
</children>
|
||||
<children xsi:type="editmodel:CompartmentEditModel"/>
|
||||
<sourceConnections xsi:type="editmodel:GeneralizationEditModel" connectionRouterKind="Manual" source="//@children.4" target="//@children.13/@sourceConnections.0" targetEnd="//@children.4/@sourceConnections.0/@children.1" sourceEnd="//@children.4/@sourceConnections.0/@children.0">
|
||||
<children xsi:type="editmodel:AssociationEndEditModel" location="201,0" anchorKind="FixedAtEdge" attachSource="true"/>
|
||||
<children xsi:type="editmodel:AssociationEndEditModel"/>
|
||||
</sourceConnections>
|
||||
<classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" attributeSorter="Visibility" methodSorter="Visibility" innerClassSorter="Visibility" showPublicAttributes="true" showPackageAttributes="true" showPublicMethods="true" showPackageMethods="true" showPublicInnerClasses="true" showPackageInnerClasses="true"/>
|
||||
</children>
|
||||
<children xsi:type="editmodel:ClassEditModel" location="1365,425" size="76,29" id="kirschmshsCompiler765" runTimeClassModel="">
|
||||
<children xsi:type="editmodel:CompartmentEditModel"/>
|
||||
<children xsi:type="editmodel:CompartmentEditModel"/>
|
||||
<children xsi:type="editmodel:CompartmentEditModel"/>
|
||||
<sourceConnections xsi:type="editmodel:GeneralizationEditModel" id="kirschmshsCompiler766" connectionRouterKind="Manual" source="//@children.5" target="//@children.6/@sourceConnections.0" targetEnd="//@children.5/@sourceConnections.0/@children.1" sourceEnd="//@children.5/@sourceConnections.0/@children.0">
|
||||
<children xsi:type="editmodel:AssociationEndEditModel" location="38,0" anchorKind="FixedAtEdge" attachSource="true"/>
|
||||
<children xsi:type="editmodel:AssociationEndEditModel"/>
|
||||
</sourceConnections>
|
||||
<classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" attributeSorter="Visibility" methodSorter="Visibility" innerClassSorter="Visibility" showPublicAttributes="true" showPackageAttributes="true" showPublicMethods="true" showPackageMethods="true" showPublicInnerClasses="true" showPackageInnerClasses="true"/>
|
||||
</children>
|
||||
<children xsi:type="editmodel:ClassEditModel" location="963,417" size="86,29" id="kirschmshsCompiler783" runTimeClassModel="">
|
||||
<children xsi:type="editmodel:CompartmentEditModel"/>
|
||||
<children xsi:type="editmodel:CompartmentEditModel"/>
|
||||
<children xsi:type="editmodel:CompartmentEditModel"/>
|
||||
<sourceConnections xsi:type="editmodel:GeneralizationEditModel" targetConnections="//@children.5/@sourceConnections.0" id="kirschmshsCompiler784" connectionRouterKind="GeneralizationManhattan" source="//@children.6" target="//@children.15" targetEnd="//@children.6/@sourceConnections.0/@children.1" sourceEnd="//@children.6/@sourceConnections.0/@children.0">
|
||||
<children xsi:type="editmodel:AssociationEndEditModel" location="43,0" anchorKind="FixedAtEdge" attachSource="true"/>
|
||||
<children xsi:type="editmodel:AssociationEndEditModel" location="272,139" anchorKind="FixedAtEdge"/>
|
||||
</sourceConnections>
|
||||
<classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" attributeSorter="Visibility" methodSorter="Visibility" innerClassSorter="Visibility" showPublicAttributes="true" showPackageAttributes="true" showPublicMethods="true" showPackageMethods="true" showPublicInnerClasses="true" showPackageInnerClasses="true"/>
|
||||
</children>
|
||||
<children xsi:type="editmodel:ClassEditModel" location="2069,372" size="403,67" id="kirschmshsCompiler841" runTimeClassModel="kirschmshsCompiler842">
|
||||
<children xsi:type="editmodel:CompartmentEditModel"/>
|
||||
<children xsi:type="editmodel:CompartmentEditModel" size="380,18">
|
||||
<children xsi:type="editmodel:MethodEditModel" id="kirschmshsCompiler842"/>
|
||||
</children>
|
||||
<children xsi:type="editmodel:CompartmentEditModel"/>
|
||||
<sourceConnections xsi:type="editmodel:GeneralizationEditModel" connectionRouterKind="Manual" source="//@children.7" target="//@children.12/@sourceConnections.0" targetEnd="//@children.7/@sourceConnections.0/@children.1" sourceEnd="//@children.7/@sourceConnections.0/@children.0">
|
||||
<children xsi:type="editmodel:AssociationEndEditModel" location="201,0" anchorKind="FixedAtEdge" attachSource="true"/>
|
||||
<children xsi:type="editmodel:AssociationEndEditModel"/>
|
||||
</sourceConnections>
|
||||
<classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" attributeSorter="Visibility" methodSorter="Visibility" innerClassSorter="Visibility" showPublicAttributes="true" showPackageAttributes="true" showPublicMethods="true" showPackageMethods="true" showPublicInnerClasses="true" showPackageInnerClasses="true"/>
|
||||
</children>
|
||||
<children xsi:type="editmodel:ClassEditModel" location="2227,562" size="403,85" id="kirschmshsCompiler904" runTimeClassModel="kirschmshsCompiler905;kirschmshsCompiler912">
|
||||
<children xsi:type="editmodel:CompartmentEditModel"/>
|
||||
<children xsi:type="editmodel:CompartmentEditModel" size="380,36">
|
||||
<children xsi:type="editmodel:MethodEditModel" id="kirschmshsCompiler905"/>
|
||||
<children xsi:type="editmodel:MethodEditModel" id="kirschmshsCompiler912"/>
|
||||
</children>
|
||||
<children xsi:type="editmodel:CompartmentEditModel"/>
|
||||
<sourceConnections xsi:type="editmodel:GeneralizationEditModel" connectionRouterKind="Manual" source="//@children.8" target="//@children.11/@sourceConnections.0" targetEnd="//@children.8/@sourceConnections.0/@children.1" sourceEnd="//@children.8/@sourceConnections.0/@children.0">
|
||||
<children xsi:type="editmodel:AssociationEndEditModel" location="201,0" anchorKind="FixedAtEdge" attachSource="true"/>
|
||||
<children xsi:type="editmodel:AssociationEndEditModel"/>
|
||||
</sourceConnections>
|
||||
<classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" attributeSorter="Visibility" methodSorter="Visibility" innerClassSorter="Visibility" showPublicAttributes="true" showPackageAttributes="true" showPublicMethods="true" showPackageMethods="true" showPublicInnerClasses="true" showPackageInnerClasses="true"/>
|
||||
</children>
|
||||
<children xsi:type="editmodel:ClassEditModel" location="2965,229" size="403,67" targetConnections="//@children.13/@sourceConnections.0" id="kirschmshsCompiler653" runTimeClassModel="kirschmshsCompiler654">
|
||||
<children xsi:type="editmodel:CompartmentEditModel"/>
|
||||
<children xsi:type="editmodel:CompartmentEditModel" size="380,18">
|
||||
<children xsi:type="editmodel:MethodEditModel" id="kirschmshsCompiler654"/>
|
||||
</children>
|
||||
<children xsi:type="editmodel:CompartmentEditModel"/>
|
||||
<sourceConnections xsi:type="editmodel:GeneralizationEditModel" connectionRouterKind="Manual" source="//@children.9" target="//@children.0/@sourceConnections.0" targetEnd="//@children.9/@sourceConnections.0/@children.1" sourceEnd="//@children.9/@sourceConnections.0/@children.0">
|
||||
<children xsi:type="editmodel:AssociationEndEditModel" location="201,0" anchorKind="FixedAtEdge" attachSource="true"/>
|
||||
<children xsi:type="editmodel:AssociationEndEditModel"/>
|
||||
</sourceConnections>
|
||||
<classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" attributeSorter="Visibility" methodSorter="Visibility" innerClassSorter="Visibility" showPublicAttributes="true" showPackageAttributes="true" showPublicMethods="true" showPackageMethods="true" showPublicInnerClasses="true" showPackageInnerClasses="true"/>
|
||||
</children>
|
||||
<children xsi:type="editmodel:ClassEditModel" location="2502,372" size="403,67" id="kirschmshsCompiler822" runTimeClassModel="kirschmshsCompiler823">
|
||||
<children xsi:type="editmodel:CompartmentEditModel"/>
|
||||
<children xsi:type="editmodel:CompartmentEditModel" size="380,18">
|
||||
<children xsi:type="editmodel:MethodEditModel" id="kirschmshsCompiler823"/>
|
||||
</children>
|
||||
<children xsi:type="editmodel:CompartmentEditModel"/>
|
||||
<sourceConnections xsi:type="editmodel:GeneralizationEditModel" connectionRouterKind="Manual" source="//@children.10" target="//@children.12/@sourceConnections.0" targetEnd="//@children.10/@sourceConnections.0/@children.1" sourceEnd="//@children.10/@sourceConnections.0/@children.0">
|
||||
<children xsi:type="editmodel:AssociationEndEditModel" location="201,0" anchorKind="FixedAtEdge" attachSource="true"/>
|
||||
<children xsi:type="editmodel:AssociationEndEditModel"/>
|
||||
</sourceConnections>
|
||||
<classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" attributeSorter="Visibility" methodSorter="Visibility" innerClassSorter="Visibility" showPublicAttributes="true" showPackageAttributes="true" showPublicMethods="true" showPackageMethods="true" showPublicInnerClasses="true" showPackageInnerClasses="true"/>
|
||||
</children>
|
||||
<children xsi:type="editmodel:ClassEditModel" location="45,553" size="403,85" id="kirschmshsCompiler931" runTimeClassModel="kirschmshsCompiler939;kirschmshsCompiler932">
|
||||
<children xsi:type="editmodel:CompartmentEditModel"/>
|
||||
<children xsi:type="editmodel:CompartmentEditModel" size="380,36">
|
||||
<children xsi:type="editmodel:MethodEditModel" id="kirschmshsCompiler932"/>
|
||||
<children xsi:type="editmodel:MethodEditModel" id="kirschmshsCompiler939"/>
|
||||
</children>
|
||||
<children xsi:type="editmodel:CompartmentEditModel"/>
|
||||
<sourceConnections xsi:type="editmodel:GeneralizationEditModel" targetConnections="//@children.2/@sourceConnections.0 //@children.1/@sourceConnections.0 //@children.3/@sourceConnections.0 //@children.17/@sourceConnections.0 //@children.8/@sourceConnections.0" connectionRouterKind="GeneralizationManhattan" source="//@children.11" target="//@children.0" targetEnd="//@children.11/@sourceConnections.0/@children.1" sourceEnd="//@children.11/@sourceConnections.0/@children.0">
|
||||
<children xsi:type="editmodel:AssociationEndEditModel" location="201,0" anchorKind="FixedAtEdge" attachSource="true"/>
|
||||
<children xsi:type="editmodel:AssociationEndEditModel" location="185,67" anchorKind="FixedAtEdge"/>
|
||||
</sourceConnections>
|
||||
<classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" attributeSorter="Visibility" methodSorter="Visibility" innerClassSorter="Visibility" showPublicAttributes="true" showPackageAttributes="true" showPublicMethods="true" showPackageMethods="true" showPublicInnerClasses="true" showPackageInnerClasses="true"/>
|
||||
</children>
|
||||
<children xsi:type="editmodel:ClassEditModel" location="1636,372" size="403,67" id="kirschmshsCompiler803" runTimeClassModel="kirschmshsCompiler804">
|
||||
<children xsi:type="editmodel:CompartmentEditModel"/>
|
||||
<children xsi:type="editmodel:CompartmentEditModel" size="380,18">
|
||||
<children xsi:type="editmodel:MethodEditModel" id="kirschmshsCompiler804"/>
|
||||
</children>
|
||||
<children xsi:type="editmodel:CompartmentEditModel"/>
|
||||
<sourceConnections xsi:type="editmodel:GeneralizationEditModel" targetConnections="//@children.7/@sourceConnections.0 //@children.10/@sourceConnections.0" connectionRouterKind="GeneralizationManhattan" source="//@children.12" target="//@children.14" targetEnd="//@children.12/@sourceConnections.0/@children.1" sourceEnd="//@children.12/@sourceConnections.0/@children.0">
|
||||
<children xsi:type="editmodel:AssociationEndEditModel" location="201,0" anchorKind="FixedAtEdge" attachSource="true"/>
|
||||
<children xsi:type="editmodel:AssociationEndEditModel" location="42,29" anchorKind="FixedAtEdge"/>
|
||||
</sourceConnections>
|
||||
<classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" attributeSorter="Visibility" methodSorter="Visibility" innerClassSorter="Visibility" showPublicAttributes="true" showPackageAttributes="true" showPublicMethods="true" showPackageMethods="true" showPublicInnerClasses="true" showPackageInnerClasses="true"/>
|
||||
</children>
|
||||
<children xsi:type="editmodel:ClassEditModel" location="2715,508" size="403,67" id="kirschmshsCompiler692" runTimeClassModel="kirschmshsCompiler693">
|
||||
<children xsi:type="editmodel:CompartmentEditModel"/>
|
||||
<children xsi:type="editmodel:CompartmentEditModel" size="380,18">
|
||||
<children xsi:type="editmodel:MethodEditModel" id="kirschmshsCompiler693"/>
|
||||
</children>
|
||||
<children xsi:type="editmodel:CompartmentEditModel"/>
|
||||
<sourceConnections xsi:type="editmodel:GeneralizationEditModel" targetConnections="//@children.4/@sourceConnections.0" connectionRouterKind="GeneralizationManhattan" source="//@children.13" target="//@children.9" targetEnd="//@children.13/@sourceConnections.0/@children.1" sourceEnd="//@children.13/@sourceConnections.0/@children.0">
|
||||
<children xsi:type="editmodel:AssociationEndEditModel" location="201,0" anchorKind="FixedAtEdge" attachSource="true"/>
|
||||
<children xsi:type="editmodel:AssociationEndEditModel" location="201,67" anchorKind="FixedAtEdge"/>
|
||||
</sourceConnections>
|
||||
<classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" attributeSorter="Visibility" methodSorter="Visibility" innerClassSorter="Visibility" showPublicAttributes="true" showPackageAttributes="true" showPublicMethods="true" showPackageMethods="true" showPublicInnerClasses="true" showPackageInnerClasses="true"/>
|
||||
</children>
|
||||
<children xsi:type="editmodel:ClassEditModel" location="2223,234" size="84,29" targetConnections="//@children.12/@sourceConnections.0" id="kirschmshsCompiler801" runTimeClassModel="">
|
||||
<children xsi:type="editmodel:CompartmentEditModel"/>
|
||||
<children xsi:type="editmodel:CompartmentEditModel"/>
|
||||
<children xsi:type="editmodel:CompartmentEditModel"/>
|
||||
<sourceConnections xsi:type="editmodel:GeneralizationEditModel" connectionRouterKind="Manual" source="//@children.14" target="//@children.0/@sourceConnections.0" targetEnd="//@children.14/@sourceConnections.0/@children.1" sourceEnd="//@children.14/@sourceConnections.0/@children.0">
|
||||
<children xsi:type="editmodel:AssociationEndEditModel" location="42,0" anchorKind="FixedAtEdge" attachSource="true"/>
|
||||
<children xsi:type="editmodel:AssociationEndEditModel"/>
|
||||
</sourceConnections>
|
||||
<classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" attributeSorter="Visibility" methodSorter="Visibility" innerClassSorter="Visibility" showPublicAttributes="true" showPackageAttributes="true" showPublicMethods="true" showPackageMethods="true" showPublicInnerClasses="true" showPackageInnerClasses="true"/>
|
||||
</children>
|
||||
<children xsi:type="editmodel:ClassEditModel" location="940,191" size="545,139" targetConnections="//@children.6/@sourceConnections.0" id="kirschmshsCompiler711" runTimeClassModel="kirschmshsCompiler719;kirschmshsCompiler729;kirschmshsCompiler737;kirschmshsCompiler747;kirschmshsCompiler712">
|
||||
<children xsi:type="editmodel:CompartmentEditModel"/>
|
||||
<children xsi:type="editmodel:CompartmentEditModel" size="522,90">
|
||||
<children xsi:type="editmodel:MethodEditModel" id="kirschmshsCompiler712"/>
|
||||
<children xsi:type="editmodel:MethodEditModel" id="kirschmshsCompiler719"/>
|
||||
<children xsi:type="editmodel:MethodEditModel" id="kirschmshsCompiler729"/>
|
||||
<children xsi:type="editmodel:MethodEditModel" id="kirschmshsCompiler747"/>
|
||||
<children xsi:type="editmodel:MethodEditModel" id="kirschmshsCompiler737"/>
|
||||
</children>
|
||||
<children xsi:type="editmodel:CompartmentEditModel"/>
|
||||
<sourceConnections xsi:type="editmodel:GeneralizationEditModel" connectionRouterKind="Manual" source="//@children.15" target="//@children.0/@sourceConnections.0" targetEnd="//@children.15/@sourceConnections.0/@children.1" sourceEnd="//@children.15/@sourceConnections.0/@children.0">
|
||||
<children xsi:type="editmodel:AssociationEndEditModel" location="272,0" anchorKind="FixedAtEdge" attachSource="true"/>
|
||||
<children xsi:type="editmodel:AssociationEndEditModel"/>
|
||||
</sourceConnections>
|
||||
<classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" attributeSorter="Visibility" methodSorter="Visibility" innerClassSorter="Visibility" showPublicAttributes="true" showPackageAttributes="true" showPublicMethods="true" showPackageMethods="true" showPublicInnerClasses="true" showPackageInnerClasses="true"/>
|
||||
</children>
|
||||
<children xsi:type="editmodel:ClassEditModel" location="1023,50" size="403,67" targetConnections="//@children.0/@sourceConnections.0" id="kirschmshsCompiler635" runTimeClassModel="kirschmshsCompiler636">
|
||||
<children xsi:type="editmodel:CompartmentEditModel"/>
|
||||
<children xsi:type="editmodel:CompartmentEditModel" size="380,18">
|
||||
<children xsi:type="editmodel:MethodEditModel" id="kirschmshsCompiler636"/>
|
||||
</children>
|
||||
<children xsi:type="editmodel:CompartmentEditModel"/>
|
||||
<classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" attributeSorter="Visibility" methodSorter="Visibility" innerClassSorter="Visibility" showPublicAttributes="true" showPackageAttributes="true" showPublicMethods="true" showPackageMethods="true" showPublicInnerClasses="true" showPackageInnerClasses="true"/>
|
||||
</children>
|
||||
<children xsi:type="editmodel:ClassEditModel" location="1791,561" size="403,85" id="kirschmshsCompiler958" runTimeClassModel="kirschmshsCompiler959;kirschmshsCompiler966">
|
||||
<children xsi:type="editmodel:CompartmentEditModel"/>
|
||||
<children xsi:type="editmodel:CompartmentEditModel" size="380,36">
|
||||
<children xsi:type="editmodel:MethodEditModel" id="kirschmshsCompiler959"/>
|
||||
<children xsi:type="editmodel:MethodEditModel" id="kirschmshsCompiler966"/>
|
||||
</children>
|
||||
<children xsi:type="editmodel:CompartmentEditModel"/>
|
||||
<sourceConnections xsi:type="editmodel:GeneralizationEditModel" connectionRouterKind="Manual" source="//@children.17" target="//@children.11/@sourceConnections.0" targetEnd="//@children.17/@sourceConnections.0/@children.1" sourceEnd="//@children.17/@sourceConnections.0/@children.0">
|
||||
<children xsi:type="editmodel:AssociationEndEditModel" location="201,0" anchorKind="FixedAtEdge" attachSource="true"/>
|
||||
<children xsi:type="editmodel:AssociationEndEditModel"/>
|
||||
</sourceConnections>
|
||||
<classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" attributeSorter="Visibility" methodSorter="Visibility" innerClassSorter="Visibility" showPublicAttributes="true" showPackageAttributes="true" showPublicMethods="true" showPackageMethods="true" showPublicInnerClasses="true" showPackageInnerClasses="true"/>
|
||||
</children>
|
||||
<classDiagramPreferences xsi:type="editmodel:UMLClassDiagramPreference" attributeSorter="Natural" methodSorter="Natural" innerClassSorter="Natural" showPublicAttributes="true" showPackageAttributes="true" showPublicMethods="true" showPackageMethods="true" showPublicInnerClasses="true" showPackageInnerClasses="true" showInterfaceStereotype="true" showClassStereotype="true" showPackageStereotype="true"/>
|
||||
</editmodel:ClassDiagramEditModel>
|
||||
|
Before Width: | Height: | Size: 669 KiB After Width: | Height: | Size: 663 KiB |
@ -1,458 +1,458 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 1.0//EN' 'http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd'>
|
||||
<svg xmlns:xlink="http://www.w3.org/1999/xlink" style="fill-opacity:1; color-rendering:auto; color-interpolation:auto; text-rendering:auto; stroke:black; stroke-linecap:square; stroke-miterlimit:10; shape-rendering:auto; stroke-opacity:1; fill:black; stroke-dasharray:none; font-weight:normal; stroke-width:1; font-family:'sansserif'; font-style:normal; stroke-linejoin:miter; font-size:12; stroke-dashoffset:0; image-rendering:auto;" xmlns="http://www.w3.org/2000/svg">
|
||||
<!--Generated by the Batik Graphics2D SVG Generator-->
|
||||
<defs id="genericDefs" />
|
||||
<g>
|
||||
<g style="fill:white; font-family:'Arial'; font-weight:bold; stroke:white;">
|
||||
<rect x="-45" y="-50" width="3602" style="stroke:none;" height="652" />
|
||||
<rect x="406" y="131" width="368" style="fill:rgb(191,191,191); stroke:none;" height="64" />
|
||||
<rect x="405" y="130" width="368" style="fill:rgb(127,127,127); stroke:none;" height="64" />
|
||||
<rect x="404" y="129" width="368" style="fill:rgb(63,63,63); stroke:none;" height="64" />
|
||||
<rect x="403" y="128" width="368" style="stroke:none;" height="64" />
|
||||
<rect x="403" y="128" width="367" style="fill:none; stroke:black;" height="63" />
|
||||
<line x1="403" x2="770" y1="154" style="fill:none; stroke:black;" y2="154" />
|
||||
<line x1="403" x2="770" y1="164" style="fill:none; stroke:black;" y2="164" />
|
||||
<rect x="413" y="169" width="348" style="stroke:none; font-weight:normal;" height="16" />
|
||||
<image x="413" y="169" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAiklEQVR42rVRgQ2A
|
||||
IAwDwiF+4k7hE/WTnbJP3CdYoyEoqJjoQsiAdrSbjTGap7CTjcMOcy3ofu6xtxIQ
|
||||
wpLyJkIerkUPBUqqfAmikXYlo+R66gSgA3XpiMKn3OZtPaEDcfm/vzHAElSNiP7W
|
||||
JZR/IKAtzArcttabo56KBzzDeHXGl6ZL0ItJf0BYALD3PkMWvNRAAAAAAElFTkSu
|
||||
QmCC" style="fill:black; stroke:black; font-weight:normal;" height="16" preserveAspectRatio="none" />
|
||||
<text x="432" y="182" style="fill:black; stroke:none; font-weight:normal;" xml:space="preserve"> if_codegen(in ClassFile, in CodeAttribute, in String, in boolean): void</text>
|
||||
<image x="557" y="133" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAABBElEQVR42q1SYZnD
|
||||
IAylWwVUQiTgYJFQCZmDOVjOwSREwiREQqdgSMBBFwajcLu7/bl8+fpR8l7egzCs
|
||||
6+peISqi6pogREIavob1XGC7WkOmhIbQZkYf7gf7dgRDF9BPobLJjtnJpgPAWH5Z
|
||||
6Z28Z+aTXHLvjNagdKUQHSNnP3IViHC8HW1nbNkI9GycDGgwHWr95GPs3J9h7b+t
|
||||
PxDa4+Z1Z8lsICAjmqtsDwVTIUCqspRDOxeXJbophmip5E/kCcHbLdlOIiyR5tmD
|
||||
Lwo2nTpgDaF0rWHtIWG6wSU5KzylO6i6amabw+vZzMWbpU3FcprMyYW4bTL2T42q
|
||||
9G/x4Vr/gfAAzgaEraDyPpwAAAAASUVORK5CYII=" style="fill:black; stroke:black;" height="16" preserveAspectRatio="none" />
|
||||
<text x="576" y="145" style="fill:black; stroke:none;" xml:space="preserve">RelOp</text>
|
||||
<rect x="872" y="508" width="400" style="fill:rgb(191,191,191); stroke:none;" height="82" />
|
||||
<rect x="871" y="507" width="400" style="fill:rgb(127,127,127); stroke:none;" height="82" />
|
||||
<rect x="870" y="506" width="400" style="fill:rgb(63,63,63); stroke:none;" height="82" />
|
||||
<rect x="869" y="505" width="400" style="stroke:none;" height="82" />
|
||||
<rect x="869" y="505" width="399" style="fill:none; stroke:black;" height="81" />
|
||||
<line x1="869" x2="1268" y1="531" style="fill:none; stroke:black;" y2="531" />
|
||||
<line x1="869" x2="1268" y1="541" style="fill:none; stroke:black;" y2="541" />
|
||||
<rect x="879" y="546" width="380" style="stroke:none; font-weight:normal;" height="16" />
|
||||
<image x="879" y="546" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAYUlEQVR42mP8//8/
|
||||
AymAiYFEMAg1sGAKOTQ4wNkHGg4Q0ABUneCggOAmOBxYcACnk9BUg0QcFIBCgyeU
|
||||
HjwgpAEYJgsWPACqgyCQyIEHaJ5GDyWgNLIv0VRjjwdMRfQNJQCIvyUFPaAxvQAA
|
||||
AABJRU5ErkJggg==" style="fill:black; stroke:black; font-weight:normal;" height="16" preserveAspectRatio="none" />
|
||||
<text x="898" y="559" style="fill:black; stroke:none; font-weight:normal;" xml:space="preserve"> codegen(in ClassFile, in CodeAttribute, in Expr, in boolean, in Menge): void</text>
|
||||
<rect x="879" y="564" width="380" style="stroke:none; font-weight:normal;" height="16" />
|
||||
<image x="879" y="564" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAYUlEQVR42mP8//8/
|
||||
AymAiYFEMAg1sGAKOTQ4wNkHGg4Q0ABUneCggOAmOBxYcACnk9BUg0QcFIBCgyeU
|
||||
HjwgpAEYJgsWPACqgyCQyIEHaJ5GDyWgNLIv0VRjjwdMRfQNJQCIvyUFPaAxvQAA
|
||||
AABJRU5ErkJggg==" style="fill:black; stroke:black; font-weight:normal;" height="16" preserveAspectRatio="none" />
|
||||
<text x="898" y="577" style="fill:black; stroke:none; font-weight:normal;" xml:space="preserve"> if_codegen(in ClassFile, in CodeAttribute, in String, in boolean): void</text>
|
||||
<image x="1032" y="510" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAA7ElEQVR42q2SXXUE
|
||||
IQyF09kVMBIiAQmRMBIioRIioRKQEgkjAQk4mF42wMzu6UN7ujl5APL3ceHjOA4a
|
||||
lj1nd7qYiqjo9eQ+V2KPAJdrGPVwtzxPljMbqc/ZvZ5L7zUngOScw2zSt+bqpUza
|
||||
YFtibvSObC8uWczzrER03u1+nS+sj8Yt5iVLPifTGLXQH+1/BcBoSCKBhzsPHibm
|
||||
WN7MjKjue6W1lgp3TZ+aVDhBJZy0rL3qtiVO/dLQa4oAHSHRE0RrT/O9O1J7SwQK
|
||||
v6b6iA4LpPg2W2eDQ0P4uoLkS+3nvxRsL1/t3bL+xr4BXAV0uUgPznkAAAAASUVO
|
||||
RK5CYII=" style="fill:black; stroke:black;" height="16" preserveAspectRatio="none" />
|
||||
<text x="1051" y="522" style="fill:black; stroke:none;" xml:space="preserve">EqualOp</text>
|
||||
<rect x="442" y="507" width="400" style="fill:rgb(191,191,191); stroke:none;" height="82" />
|
||||
<rect x="441" y="506" width="400" style="fill:rgb(127,127,127); stroke:none;" height="82" />
|
||||
<rect x="440" y="505" width="400" style="fill:rgb(63,63,63); stroke:none;" height="82" />
|
||||
<rect x="439" y="504" width="400" style="stroke:none;" height="82" />
|
||||
<rect x="439" y="504" width="399" style="fill:none; stroke:black;" height="81" />
|
||||
<line x1="439" x2="838" y1="530" style="fill:none; stroke:black;" y2="530" />
|
||||
<line x1="439" x2="838" y1="540" style="fill:none; stroke:black;" y2="540" />
|
||||
<rect x="449" y="545" width="380" style="stroke:none; font-weight:normal;" height="16" />
|
||||
<image x="449" y="545" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAYUlEQVR42mP8//8/
|
||||
AymAiYFEMAg1sGAKOTQ4wNkHGg4Q0ABUneCggOAmOBxYcACnk9BUg0QcFIBCgyeU
|
||||
HjwgpAEYJgsWPACqgyCQyIEHaJ5GDyWgNLIv0VRjjwdMRfQNJQCIvyUFPaAxvQAA
|
||||
AABJRU5ErkJggg==" style="fill:black; stroke:black; font-weight:normal;" height="16" preserveAspectRatio="none" />
|
||||
<text x="468" y="558" style="fill:black; stroke:none; font-weight:normal;" xml:space="preserve"> codegen(in ClassFile, in CodeAttribute, in Expr, in boolean, in Menge): void</text>
|
||||
<rect x="449" y="563" width="380" style="stroke:none; font-weight:normal;" height="16" />
|
||||
<image x="449" y="563" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAYUlEQVR42mP8//8/
|
||||
AymAiYFEMAg1sGAKOTQ4wNkHGg4Q0ABUneCggOAmOBxYcACnk9BUg0QcFIBCgyeU
|
||||
HjwgpAEYJgsWPACqgyCQyIEHaJ5GDyWgNLIv0VRjjwdMRfQNJQCIvyUFPaAxvQAA
|
||||
AABJRU5ErkJggg==" style="fill:black; stroke:black; font-weight:normal;" height="16" preserveAspectRatio="none" />
|
||||
<text x="468" y="576" style="fill:black; stroke:none; font-weight:normal;" xml:space="preserve"> if_codegen(in ClassFile, in CodeAttribute, in String, in boolean): void</text>
|
||||
<image x="606" y="509" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAA7ElEQVR42q2SXXUE
|
||||
IQyF09kVMBIiAQmRMBIioRIioRKQEgkjAQk4mF42wMzu6UN7ujl5APL3ceHjOA4a
|
||||
lj1nd7qYiqjo9eQ+V2KPAJdrGPVwtzxPljMbqc/ZvZ5L7zUngOScw2zSt+bqpUza
|
||||
YFtibvSObC8uWczzrER03u1+nS+sj8Yt5iVLPifTGLXQH+1/BcBoSCKBhzsPHibm
|
||||
WN7MjKjue6W1lgp3TZ+aVDhBJZy0rL3qtiVO/dLQa4oAHSHRE0RrT/O9O1J7SwQK
|
||||
v6b6iA4LpPg2W2eDQ0P4uoLkS+3nvxRsL1/t3bL+xr4BXAV0uUgPznkAAAAASUVO
|
||||
RK5CYII=" style="fill:black; stroke:black;" height="16" preserveAspectRatio="none" />
|
||||
<text x="625" y="521" style="fill:black; stroke:none;" xml:space="preserve">LessOp</text>
|
||||
<rect x="1303" y="512" width="400" style="fill:rgb(191,191,191); stroke:none;" height="82" />
|
||||
<rect x="1302" y="511" width="400" style="fill:rgb(127,127,127); stroke:none;" height="82" />
|
||||
<rect x="1301" y="510" width="400" style="fill:rgb(63,63,63); stroke:none;" height="82" />
|
||||
<rect x="1300" y="509" width="400" style="stroke:none;" height="82" />
|
||||
<rect x="1300" y="509" width="399" style="fill:none; stroke:black;" height="81" />
|
||||
<line x1="1300" x2="1699" y1="535" style="fill:none; stroke:black;" y2="535" />
|
||||
<line x1="1300" x2="1699" y1="545" style="fill:none; stroke:black;" y2="545" />
|
||||
<rect x="1310" y="550" width="380" style="stroke:none; font-weight:normal;" height="16" />
|
||||
<image x="1310" y="550" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAYUlEQVR42mP8//8/
|
||||
AymAiYFEMAg1sGAKOTQ4wNkHGg4Q0ABUneCggOAmOBxYcACnk9BUg0QcFIBCgyeU
|
||||
HjwgpAEYJgsWPACqgyCQyIEHaJ5GDyWgNLIv0VRjjwdMRfQNJQCIvyUFPaAxvQAA
|
||||
AABJRU5ErkJggg==" style="fill:black; stroke:black; font-weight:normal;" height="16" preserveAspectRatio="none" />
|
||||
<text x="1329" y="563" style="fill:black; stroke:none; font-weight:normal;" xml:space="preserve"> codegen(in ClassFile, in CodeAttribute, in Expr, in boolean, in Menge): void</text>
|
||||
<rect x="1310" y="568" width="380" style="stroke:none; font-weight:normal;" height="16" />
|
||||
<image x="1310" y="568" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAYUlEQVR42mP8//8/
|
||||
AymAiYFEMAg1sGAKOTQ4wNkHGg4Q0ABUneCggOAmOBxYcACnk9BUg0QcFIBCgyeU
|
||||
HjwgpAEYJgsWPACqgyCQyIEHaJ5GDyWgNLIv0VRjjwdMRfQNJQCIvyUFPaAxvQAA
|
||||
AABJRU5ErkJggg==" style="fill:black; stroke:black; font-weight:normal;" height="16" preserveAspectRatio="none" />
|
||||
<text x="1329" y="581" style="fill:black; stroke:none; font-weight:normal;" xml:space="preserve"> if_codegen(in ClassFile, in CodeAttribute, in String, in boolean): void</text>
|
||||
<image x="1452" y="514" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAA7ElEQVR42q2SXXUE
|
||||
IQyF09kVMBIiAQmRMBIioRIioRKQEgkjAQk4mF42wMzu6UN7ujl5APL3ceHjOA4a
|
||||
lj1nd7qYiqjo9eQ+V2KPAJdrGPVwtzxPljMbqc/ZvZ5L7zUngOScw2zSt+bqpUza
|
||||
YFtibvSObC8uWczzrER03u1+nS+sj8Yt5iVLPifTGLXQH+1/BcBoSCKBhzsPHibm
|
||||
WN7MjKjue6W1lgp3TZ+aVDhBJZy0rL3qtiVO/dLQa4oAHSHRE0RrT/O9O1J7SwQK
|
||||
v6b6iA4LpPg2W2eDQ0P4uoLkS+3nvxRsL1/t3bL+xr4BXAV0uUgPznkAAAAASUVO
|
||||
RK5CYII=" style="fill:black; stroke:black;" height="16" preserveAspectRatio="none" />
|
||||
<text x="1471" y="526" style="fill:black; stroke:none;" xml:space="preserve">NotEqualOp</text>
|
||||
<rect x="3152" y="455" width="400" style="fill:rgb(191,191,191); stroke:none;" height="64" />
|
||||
<rect x="3151" y="454" width="400" style="fill:rgb(127,127,127); stroke:none;" height="64" />
|
||||
<rect x="3150" y="453" width="400" style="fill:rgb(63,63,63); stroke:none;" height="64" />
|
||||
<rect x="3149" y="452" width="400" style="stroke:none;" height="64" />
|
||||
<rect x="3149" y="452" width="399" style="fill:none; stroke:black;" height="63" />
|
||||
<line x1="3149" x2="3548" y1="478" style="fill:none; stroke:black;" y2="478" />
|
||||
<line x1="3149" x2="3548" y1="488" style="fill:none; stroke:black;" y2="488" />
|
||||
<rect x="3159" y="493" width="380" style="stroke:none; font-weight:normal;" height="16" />
|
||||
<image x="3159" y="493" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAYUlEQVR42mP8//8/
|
||||
AymAiYFEMAg1sGAKOTQ4wNkHGg4Q0ABUneCggOAmOBxYcACnk9BUg0QcFIBCgyeU
|
||||
HjwgpAEYJgsWPACqgyCQyIEHaJ5GDyWgNLIv0VRjjwdMRfQNJQCIvyUFPaAxvQAA
|
||||
AABJRU5ErkJggg==" style="fill:black; stroke:black; font-weight:normal;" height="16" preserveAspectRatio="none" />
|
||||
<text x="3178" y="506" style="fill:black; stroke:none; font-weight:normal;" xml:space="preserve"> codegen(in ClassFile, in CodeAttribute, in Expr, in boolean, in Menge): void</text>
|
||||
<image x="3311" y="457" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAA7ElEQVR42q2SXXUE
|
||||
IQyF09kVMBIiAQmRMBIioRIioRKQEgkjAQk4mF42wMzu6UN7ujl5APL3ceHjOA4a
|
||||
lj1nd7qYiqjo9eQ+V2KPAJdrGPVwtzxPljMbqc/ZvZ5L7zUngOScw2zSt+bqpUza
|
||||
YFtibvSObC8uWczzrER03u1+nS+sj8Yt5iVLPifTGLXQH+1/BcBoSCKBhzsPHibm
|
||||
WN7MjKjue6W1lgp3TZ+aVDhBJZy0rL3qtiVO/dLQa4oAHSHRE0RrT/O9O1J7SwQK
|
||||
v6b6iA4LpPg2W2eDQ0P4uoLkS+3nvxRsL1/t3bL+xr4BXAV0uUgPznkAAAAASUVO
|
||||
RK5CYII=" style="fill:black; stroke:black;" height="16" preserveAspectRatio="none" />
|
||||
<text x="3330" y="469" style="fill:black; stroke:none;" xml:space="preserve">MinusOp</text>
|
||||
<rect x="1323" y="378" width="73" style="fill:rgb(191,191,191); stroke:none;" height="26" />
|
||||
<rect x="1322" y="377" width="73" style="fill:rgb(127,127,127); stroke:none;" height="26" />
|
||||
<rect x="1321" y="376" width="73" style="fill:rgb(63,63,63); stroke:none;" height="26" />
|
||||
<rect x="1320" y="375" width="73" style="stroke:none;" height="26" />
|
||||
<rect x="1320" y="375" width="72" style="fill:none; stroke:black;" height="25" />
|
||||
<image x="1330" y="380" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAA7ElEQVR42q2SXXUE
|
||||
IQyF09kVMBIiAQmRMBIioRIioRKQEgkjAQk4mF42wMzu6UN7ujl5APL3ceHjOA4a
|
||||
lj1nd7qYiqjo9eQ+V2KPAJdrGPVwtzxPljMbqc/ZvZ5L7zUngOScw2zSt+bqpUza
|
||||
YFtibvSObC8uWczzrER03u1+nS+sj8Yt5iVLPifTGLXQH+1/BcBoSCKBhzsPHibm
|
||||
WN7MjKjue6W1lgp3TZ+aVDhBJZy0rL3qtiVO/dLQa4oAHSHRE0RrT/O9O1J7SwQK
|
||||
v6b6iA4LpPg2W2eDQ0P4uoLkS+3nvxRsL1/t3bL+xr4BXAV0uUgPznkAAAAASUVO
|
||||
RK5CYII=" style="fill:black; stroke:black;" height="16" preserveAspectRatio="none" />
|
||||
<text x="1349" y="392" style="fill:black; stroke:none;" xml:space="preserve">OrOp</text>
|
||||
<rect x="921" y="370" width="83" style="fill:rgb(191,191,191); stroke:none;" height="26" />
|
||||
<rect x="920" y="369" width="83" style="fill:rgb(127,127,127); stroke:none;" height="26" />
|
||||
<rect x="919" y="368" width="83" style="fill:rgb(63,63,63); stroke:none;" height="26" />
|
||||
<rect x="918" y="367" width="83" style="stroke:none;" height="26" />
|
||||
<rect x="918" y="367" width="82" style="fill:none; stroke:black;" height="25" />
|
||||
<image x="928" y="372" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAA7ElEQVR42q2SXXUE
|
||||
IQyF09kVMBIiAQmRMBIioRIioRKQEgkjAQk4mF42wMzu6UN7ujl5APL3ceHjOA4a
|
||||
lj1nd7qYiqjo9eQ+V2KPAJdrGPVwtzxPljMbqc/ZvZ5L7zUngOScw2zSt+bqpUza
|
||||
YFtibvSObC8uWczzrER03u1+nS+sj8Yt5iVLPifTGLXQH+1/BcBoSCKBhzsPHibm
|
||||
WN7MjKjue6W1lgp3TZ+aVDhBJZy0rL3qtiVO/dLQa4oAHSHRE0RrT/O9O1J7SwQK
|
||||
v6b6iA4LpPg2W2eDQ0P4uoLkS+3nvxRsL1/t3bL+xr4BXAV0uUgPznkAAAAASUVO
|
||||
RK5CYII=" style="fill:black; stroke:black;" height="16" preserveAspectRatio="none" />
|
||||
<text x="947" y="384" style="fill:black; stroke:none;" xml:space="preserve">AndOp</text>
|
||||
<rect x="2027" y="325" width="400" style="fill:rgb(191,191,191); stroke:none;" height="64" />
|
||||
<rect x="2026" y="324" width="400" style="fill:rgb(127,127,127); stroke:none;" height="64" />
|
||||
<rect x="2025" y="323" width="400" style="fill:rgb(63,63,63); stroke:none;" height="64" />
|
||||
<rect x="2024" y="322" width="400" style="stroke:none;" height="64" />
|
||||
<rect x="2024" y="322" width="399" style="fill:none; stroke:black;" height="63" />
|
||||
<line x1="2024" x2="2423" y1="348" style="fill:none; stroke:black;" y2="348" />
|
||||
<line x1="2024" x2="2423" y1="358" style="fill:none; stroke:black;" y2="358" />
|
||||
<rect x="2034" y="363" width="380" style="stroke:none; font-weight:normal;" height="16" />
|
||||
<image x="2034" y="363" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAYUlEQVR42mP8//8/
|
||||
AymAiYFEMAg1sGAKOTQ4wNkHGg4Q0ABUneCggOAmOBxYcACnk9BUg0QcFIBCgyeU
|
||||
HjwgpAEYJgsWPACqgyCQyIEHaJ5GDyWgNLIv0VRjjwdMRfQNJQCIvyUFPaAxvQAA
|
||||
AABJRU5ErkJggg==" style="fill:black; stroke:black; font-weight:normal;" height="16" preserveAspectRatio="none" />
|
||||
<text x="2053" y="376" style="fill:black; stroke:none; font-weight:normal;" xml:space="preserve"> codegen(in ClassFile, in CodeAttribute, in Expr, in boolean, in Menge): void</text>
|
||||
<image x="2186" y="327" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAA7ElEQVR42q2SXXUE
|
||||
IQyF09kVMBIiAQmRMBIioRIioRKQEgkjAQk4mF42wMzu6UN7ujl5APL3ceHjOA4a
|
||||
lj1nd7qYiqjo9eQ+V2KPAJdrGPVwtzxPljMbqc/ZvZ5L7zUngOScw2zSt+bqpUza
|
||||
YFtibvSObC8uWczzrER03u1+nS+sj8Yt5iVLPifTGLXQH+1/BcBoSCKBhzsPHibm
|
||||
WN7MjKjue6W1lgp3TZ+aVDhBJZy0rL3qtiVO/dLQa4oAHSHRE0RrT/O9O1J7SwQK
|
||||
v6b6iA4LpPg2W2eDQ0P4uoLkS+3nvxRsL1/t3bL+xr4BXAV0uUgPznkAAAAASUVO
|
||||
RK5CYII=" style="fill:black; stroke:black;" height="16" preserveAspectRatio="none" />
|
||||
<text x="2205" y="339" style="fill:black; stroke:none;" xml:space="preserve">TimesOp</text>
|
||||
<rect x="2185" y="515" width="400" style="fill:rgb(191,191,191); stroke:none;" height="82" />
|
||||
<rect x="2184" y="514" width="400" style="fill:rgb(127,127,127); stroke:none;" height="82" />
|
||||
<rect x="2183" y="513" width="400" style="fill:rgb(63,63,63); stroke:none;" height="82" />
|
||||
<rect x="2182" y="512" width="400" style="stroke:none;" height="82" />
|
||||
<rect x="2182" y="512" width="399" style="fill:none; stroke:black;" height="81" />
|
||||
<line x1="2182" x2="2581" y1="538" style="fill:none; stroke:black;" y2="538" />
|
||||
<line x1="2182" x2="2581" y1="548" style="fill:none; stroke:black;" y2="548" />
|
||||
<rect x="2192" y="553" width="380" style="stroke:none; font-weight:normal;" height="16" />
|
||||
<image x="2192" y="553" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAYUlEQVR42mP8//8/
|
||||
AymAiYFEMAg1sGAKOTQ4wNkHGg4Q0ABUneCggOAmOBxYcACnk9BUg0QcFIBCgyeU
|
||||
HjwgpAEYJgsWPACqgyCQyIEHaJ5GDyWgNLIv0VRjjwdMRfQNJQCIvyUFPaAxvQAA
|
||||
AABJRU5ErkJggg==" style="fill:black; stroke:black; font-weight:normal;" height="16" preserveAspectRatio="none" />
|
||||
<text x="2211" y="566" style="fill:black; stroke:none; font-weight:normal;" xml:space="preserve"> codegen(in ClassFile, in CodeAttribute, in Expr, in boolean, in Menge): void</text>
|
||||
<rect x="2192" y="571" width="380" style="stroke:none; font-weight:normal;" height="16" />
|
||||
<image x="2192" y="571" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAYUlEQVR42mP8//8/
|
||||
AymAiYFEMAg1sGAKOTQ4wNkHGg4Q0ABUneCggOAmOBxYcACnk9BUg0QcFIBCgyeU
|
||||
HjwgpAEYJgsWPACqgyCQyIEHaJ5GDyWgNLIv0VRjjwdMRfQNJQCIvyUFPaAxvQAA
|
||||
AABJRU5ErkJggg==" style="fill:black; stroke:black; font-weight:normal;" height="16" preserveAspectRatio="none" />
|
||||
<text x="2211" y="584" style="fill:black; stroke:none; font-weight:normal;" xml:space="preserve"> if_codegen(in ClassFile, in CodeAttribute, in String, in boolean): void</text>
|
||||
<image x="2327" y="517" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAA7ElEQVR42q2SXXUE
|
||||
IQyF09kVMBIiAQmRMBIioRIioRKQEgkjAQk4mF42wMzu6UN7ujl5APL3ceHjOA4a
|
||||
lj1nd7qYiqjo9eQ+V2KPAJdrGPVwtzxPljMbqc/ZvZ5L7zUngOScw2zSt+bqpUza
|
||||
YFtibvSObC8uWczzrER03u1+nS+sj8Yt5iVLPifTGLXQH+1/BcBoSCKBhzsPHibm
|
||||
WN7MjKjue6W1lgp3TZ+aVDhBJZy0rL3qtiVO/dLQa4oAHSHRE0RrT/O9O1J7SwQK
|
||||
v6b6iA4LpPg2W2eDQ0P4uoLkS+3nvxRsL1/t3bL+xr4BXAV0uUgPznkAAAAASUVO
|
||||
RK5CYII=" style="fill:black; stroke:black;" height="16" preserveAspectRatio="none" />
|
||||
<text x="2346" y="529" style="fill:black; stroke:none;" xml:space="preserve">GreaterEquOp</text>
|
||||
<rect x="2923" y="182" width="400" style="fill:rgb(191,191,191); stroke:none;" height="64" />
|
||||
<rect x="2922" y="181" width="400" style="fill:rgb(127,127,127); stroke:none;" height="64" />
|
||||
<rect x="2921" y="180" width="400" style="fill:rgb(63,63,63); stroke:none;" height="64" />
|
||||
<rect x="2920" y="179" width="400" style="stroke:none;" height="64" />
|
||||
<rect x="2920" y="179" width="399" style="fill:none; stroke:black;" height="63" />
|
||||
<line x1="2920" x2="3319" y1="205" style="fill:none; stroke:black;" y2="205" />
|
||||
<line x1="2920" x2="3319" y1="215" style="fill:none; stroke:black;" y2="215" />
|
||||
<rect x="2930" y="220" width="380" style="stroke:none; font-weight:normal;" height="16" />
|
||||
<image x="2930" y="220" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAiklEQVR42rVRgQ2A
|
||||
IAwDwiF+4k7hE/WTnbJP3CdYoyEoqJjoQsiAdrSbjTGap7CTjcMOcy3ofu6xtxIQ
|
||||
wpLyJkIerkUPBUqqfAmikXYlo+R66gSgA3XpiMKn3OZtPaEDcfm/vzHAElSNiP7W
|
||||
JZR/IKAtzArcttabo56KBzzDeHXGl6ZL0ItJf0BYALD3PkMWvNRAAAAAAElFTkSu
|
||||
QmCC" style="fill:black; stroke:black; font-weight:normal;" height="16" preserveAspectRatio="none" />
|
||||
<text x="2949" y="233" style="fill:black; stroke:none; font-weight:normal;" xml:space="preserve"> codegen(in ClassFile, in CodeAttribute, in Expr, in boolean, in Menge): void</text>
|
||||
<image x="3088" y="184" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAABBElEQVR42q1SYZnD
|
||||
IAylWwVUQiTgYJFQCZmDOVjOwSREwiREQqdgSMBBFwajcLu7/bl8+fpR8l7egzCs
|
||||
6+peISqi6pogREIavob1XGC7WkOmhIbQZkYf7gf7dgRDF9BPobLJjtnJpgPAWH5Z
|
||||
6Z28Z+aTXHLvjNagdKUQHSNnP3IViHC8HW1nbNkI9GycDGgwHWr95GPs3J9h7b+t
|
||||
PxDa4+Z1Z8lsICAjmqtsDwVTIUCqspRDOxeXJbophmip5E/kCcHbLdlOIiyR5tmD
|
||||
Lwo2nTpgDaF0rWHtIWG6wSU5KzylO6i6amabw+vZzMWbpU3FcprMyYW4bTL2T42q
|
||||
9G/x4Vr/gfAAzgaEraDyPpwAAAAASUVORK5CYII=" style="fill:black; stroke:black;" height="16" preserveAspectRatio="none" />
|
||||
<text x="3107" y="196" style="fill:black; stroke:none;" xml:space="preserve">AddOp</text>
|
||||
<rect x="2460" y="325" width="400" style="fill:rgb(191,191,191); stroke:none;" height="64" />
|
||||
<rect x="2459" y="324" width="400" style="fill:rgb(127,127,127); stroke:none;" height="64" />
|
||||
<rect x="2458" y="323" width="400" style="fill:rgb(63,63,63); stroke:none;" height="64" />
|
||||
<rect x="2457" y="322" width="400" style="stroke:none;" height="64" />
|
||||
<rect x="2457" y="322" width="399" style="fill:none; stroke:black;" height="63" />
|
||||
<line x1="2457" x2="2856" y1="348" style="fill:none; stroke:black;" y2="348" />
|
||||
<line x1="2457" x2="2856" y1="358" style="fill:none; stroke:black;" y2="358" />
|
||||
<rect x="2467" y="363" width="380" style="stroke:none; font-weight:normal;" height="16" />
|
||||
<image x="2467" y="363" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAYUlEQVR42mP8//8/
|
||||
AymAiYFEMAg1sGAKOTQ4wNkHGg4Q0ABUneCggOAmOBxYcACnk9BUg0QcFIBCgyeU
|
||||
HjwgpAEYJgsWPACqgyCQyIEHaJ5GDyWgNLIv0VRjjwdMRfQNJQCIvyUFPaAxvQAA
|
||||
AABJRU5ErkJggg==" style="fill:black; stroke:black; font-weight:normal;" height="16" preserveAspectRatio="none" />
|
||||
<text x="2486" y="376" style="fill:black; stroke:none; font-weight:normal;" xml:space="preserve"> codegen(in ClassFile, in CodeAttribute, in Expr, in boolean, in Menge): void</text>
|
||||
<image x="2614" y="327" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAA7ElEQVR42q2SXXUE
|
||||
IQyF09kVMBIiAQmRMBIioRIioRKQEgkjAQk4mF42wMzu6UN7ujl5APL3ceHjOA4a
|
||||
lj1nd7qYiqjo9eQ+V2KPAJdrGPVwtzxPljMbqc/ZvZ5L7zUngOScw2zSt+bqpUza
|
||||
YFtibvSObC8uWczzrER03u1+nS+sj8Yt5iVLPifTGLXQH+1/BcBoSCKBhzsPHibm
|
||||
WN7MjKjue6W1lgp3TZ+aVDhBJZy0rL3qtiVO/dLQa4oAHSHRE0RrT/O9O1J7SwQK
|
||||
v6b6iA4LpPg2W2eDQ0P4uoLkS+3nvxRsL1/t3bL+xr4BXAV0uUgPznkAAAAASUVO
|
||||
RK5CYII=" style="fill:black; stroke:black;" height="16" preserveAspectRatio="none" />
|
||||
<text x="2633" y="339" style="fill:black; stroke:none;" xml:space="preserve">ModuloOp</text>
|
||||
<rect x="3" y="506" width="400" style="fill:rgb(191,191,191); stroke:none;" height="82" />
|
||||
<rect x="2" y="505" width="400" style="fill:rgb(127,127,127); stroke:none;" height="82" />
|
||||
<rect x="1" y="504" width="400" style="fill:rgb(63,63,63); stroke:none;" height="82" />
|
||||
<rect x="0" y="503" width="400" style="stroke:none;" height="82" />
|
||||
<rect x="0" y="503" width="399" style="fill:none; stroke:black;" height="81" />
|
||||
<line x1="0" x2="399" y1="529" style="fill:none; stroke:black;" y2="529" />
|
||||
<line x1="0" x2="399" y1="539" style="fill:none; stroke:black;" y2="539" />
|
||||
<rect x="10" y="544" width="380" style="stroke:none; font-weight:normal;" height="16" />
|
||||
<image x="10" y="544" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAYUlEQVR42mP8//8/
|
||||
AymAiYFEMAg1sGAKOTQ4wNkHGg4Q0ABUneCggOAmOBxYcACnk9BUg0QcFIBCgyeU
|
||||
HjwgpAEYJgsWPACqgyCQyIEHaJ5GDyWgNLIv0VRjjwdMRfQNJQCIvyUFPaAxvQAA
|
||||
AABJRU5ErkJggg==" style="fill:black; stroke:black; font-weight:normal;" height="16" preserveAspectRatio="none" />
|
||||
<text x="29" y="557" style="fill:black; stroke:none; font-weight:normal;" xml:space="preserve"> codegen(in ClassFile, in CodeAttribute, in Expr, in boolean, in Menge): void</text>
|
||||
<rect x="10" y="562" width="380" style="stroke:none; font-weight:normal;" height="16" />
|
||||
<image x="10" y="562" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAYUlEQVR42mP8//8/
|
||||
AymAiYFEMAg1sGAKOTQ4wNkHGg4Q0ABUneCggOAmOBxYcACnk9BUg0QcFIBCgyeU
|
||||
HjwgpAEYJgsWPACqgyCQyIEHaJ5GDyWgNLIv0VRjjwdMRfQNJQCIvyUFPaAxvQAA
|
||||
AABJRU5ErkJggg==" style="fill:black; stroke:black; font-weight:normal;" height="16" preserveAspectRatio="none" />
|
||||
<text x="29" y="575" style="fill:black; stroke:none; font-weight:normal;" xml:space="preserve"> if_codegen(in ClassFile, in CodeAttribute, in String, in boolean): void</text>
|
||||
<image x="157" y="508" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAA7ElEQVR42q2SXXUE
|
||||
IQyF09kVMBIiAQmRMBIioRIioRKQEgkjAQk4mF42wMzu6UN7ujl5APL3ceHjOA4a
|
||||
lj1nd7qYiqjo9eQ+V2KPAJdrGPVwtzxPljMbqc/ZvZ5L7zUngOScw2zSt+bqpUza
|
||||
YFtibvSObC8uWczzrER03u1+nS+sj8Yt5iVLPifTGLXQH+1/BcBoSCKBhzsPHibm
|
||||
WN7MjKjue6W1lgp3TZ+aVDhBJZy0rL3qtiVO/dLQa4oAHSHRE0RrT/O9O1J7SwQK
|
||||
v6b6iA4LpPg2W2eDQ0P4uoLkS+3nvxRsL1/t3bL+xr4BXAV0uUgPznkAAAAASUVO
|
||||
RK5CYII=" style="fill:black; stroke:black;" height="16" preserveAspectRatio="none" />
|
||||
<text x="176" y="520" style="fill:black; stroke:none;" xml:space="preserve">GreaterOp</text>
|
||||
<rect x="1594" y="325" width="400" style="fill:rgb(191,191,191); stroke:none;" height="64" />
|
||||
<rect x="1593" y="324" width="400" style="fill:rgb(127,127,127); stroke:none;" height="64" />
|
||||
<rect x="1592" y="323" width="400" style="fill:rgb(63,63,63); stroke:none;" height="64" />
|
||||
<rect x="1591" y="322" width="400" style="stroke:none;" height="64" />
|
||||
<rect x="1591" y="322" width="399" style="fill:none; stroke:black;" height="63" />
|
||||
<line x1="1591" x2="1990" y1="348" style="fill:none; stroke:black;" y2="348" />
|
||||
<line x1="1591" x2="1990" y1="358" style="fill:none; stroke:black;" y2="358" />
|
||||
<rect x="1601" y="363" width="380" style="stroke:none; font-weight:normal;" height="16" />
|
||||
<image x="1601" y="363" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAYUlEQVR42mP8//8/
|
||||
AymAiYFEMAg1sGAKOTQ4wNkHGg4Q0ABUneCggOAmOBxYcACnk9BUg0QcFIBCgyeU
|
||||
HjwgpAEYJgsWPACqgyCQyIEHaJ5GDyWgNLIv0VRjjwdMRfQNJQCIvyUFPaAxvQAA
|
||||
AABJRU5ErkJggg==" style="fill:black; stroke:black; font-weight:normal;" height="16" preserveAspectRatio="none" />
|
||||
<text x="1620" y="376" style="fill:black; stroke:none; font-weight:normal;" xml:space="preserve"> codegen(in ClassFile, in CodeAttribute, in Expr, in boolean, in Menge): void</text>
|
||||
<image x="1752" y="327" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAA7ElEQVR42q2SXXUE
|
||||
IQyF09kVMBIiAQmRMBIioRIioRKQEgkjAQk4mF42wMzu6UN7ujl5APL3ceHjOA4a
|
||||
lj1nd7qYiqjo9eQ+V2KPAJdrGPVwtzxPljMbqc/ZvZ5L7zUngOScw2zSt+bqpUza
|
||||
YFtibvSObC8uWczzrER03u1+nS+sj8Yt5iVLPifTGLXQH+1/BcBoSCKBhzsPHibm
|
||||
WN7MjKjue6W1lgp3TZ+aVDhBJZy0rL3qtiVO/dLQa4oAHSHRE0RrT/O9O1J7SwQK
|
||||
v6b6iA4LpPg2W2eDQ0P4uoLkS+3nvxRsL1/t3bL+xr4BXAV0uUgPznkAAAAASUVO
|
||||
RK5CYII=" style="fill:black; stroke:black;" height="16" preserveAspectRatio="none" />
|
||||
<text x="1771" y="339" style="fill:black; stroke:none;" xml:space="preserve">DivideOp</text>
|
||||
<rect x="2673" y="461" width="400" style="fill:rgb(191,191,191); stroke:none;" height="64" />
|
||||
<rect x="2672" y="460" width="400" style="fill:rgb(127,127,127); stroke:none;" height="64" />
|
||||
<rect x="2671" y="459" width="400" style="fill:rgb(63,63,63); stroke:none;" height="64" />
|
||||
<rect x="2670" y="458" width="400" style="stroke:none;" height="64" />
|
||||
<rect x="2670" y="458" width="399" style="fill:none; stroke:black;" height="63" />
|
||||
<line x1="2670" x2="3069" y1="484" style="fill:none; stroke:black;" y2="484" />
|
||||
<line x1="2670" x2="3069" y1="494" style="fill:none; stroke:black;" y2="494" />
|
||||
<rect x="2680" y="499" width="380" style="stroke:none; font-weight:normal;" height="16" />
|
||||
<image x="2680" y="499" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAYUlEQVR42mP8//8/
|
||||
AymAiYFEMAg1sGAKOTQ4wNkHGg4Q0ABUneCggOAmOBxYcACnk9BUg0QcFIBCgyeU
|
||||
HjwgpAEYJgsWPACqgyCQyIEHaJ5GDyWgNLIv0VRjjwdMRfQNJQCIvyUFPaAxvQAA
|
||||
AABJRU5ErkJggg==" style="fill:black; stroke:black; font-weight:normal;" height="16" preserveAspectRatio="none" />
|
||||
<text x="2699" y="512" style="fill:black; stroke:none; font-weight:normal;" xml:space="preserve"> codegen(in ClassFile, in CodeAttribute, in Expr, in boolean, in Menge): void</text>
|
||||
<image x="2837" y="463" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAA7ElEQVR42q2SXXUE
|
||||
IQyF09kVMBIiAQmRMBIioRIioRKQEgkjAQk4mF42wMzu6UN7ujl5APL3ceHjOA4a
|
||||
lj1nd7qYiqjo9eQ+V2KPAJdrGPVwtzxPljMbqc/ZvZ5L7zUngOScw2zSt+bqpUza
|
||||
YFtibvSObC8uWczzrER03u1+nS+sj8Yt5iVLPifTGLXQH+1/BcBoSCKBhzsPHibm
|
||||
WN7MjKjue6W1lgp3TZ+aVDhBJZy0rL3qtiVO/dLQa4oAHSHRE0RrT/O9O1J7SwQK
|
||||
v6b6iA4LpPg2W2eDQ0P4uoLkS+3nvxRsL1/t3bL+xr4BXAV0uUgPznkAAAAASUVO
|
||||
RK5CYII=" style="fill:black; stroke:black;" height="16" preserveAspectRatio="none" />
|
||||
<text x="2856" y="475" style="fill:black; stroke:none;" xml:space="preserve">PlusOp</text>
|
||||
<rect x="2181" y="187" width="81" style="fill:rgb(191,191,191); stroke:none;" height="26" />
|
||||
<rect x="2180" y="186" width="81" style="fill:rgb(127,127,127); stroke:none;" height="26" />
|
||||
<rect x="2179" y="185" width="81" style="fill:rgb(63,63,63); stroke:none;" height="26" />
|
||||
<rect x="2178" y="184" width="81" style="stroke:none;" height="26" />
|
||||
<rect x="2178" y="184" width="80" style="fill:none; stroke:black;" height="25" />
|
||||
<image x="2188" y="189" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAABBElEQVR42q1SYZnD
|
||||
IAylWwVUQiTgYJFQCZmDOVjOwSREwiREQqdgSMBBFwajcLu7/bl8+fpR8l7egzCs
|
||||
6+peISqi6pogREIavob1XGC7WkOmhIbQZkYf7gf7dgRDF9BPobLJjtnJpgPAWH5Z
|
||||
6Z28Z+aTXHLvjNagdKUQHSNnP3IViHC8HW1nbNkI9GycDGgwHWr95GPs3J9h7b+t
|
||||
PxDa4+Z1Z8lsICAjmqtsDwVTIUCqspRDOxeXJbophmip5E/kCcHbLdlOIiyR5tmD
|
||||
Lwo2nTpgDaF0rWHtIWG6wSU5KzylO6i6amabw+vZzMWbpU3FcprMyYW4bTL2T42q
|
||||
9G/x4Vr/gfAAzgaEraDyPpwAAAAASUVORK5CYII=" style="fill:black; stroke:black;" height="16" preserveAspectRatio="none" />
|
||||
<text x="2207" y="201" style="fill:black; stroke:none;" xml:space="preserve">MulOp</text>
|
||||
<rect x="898" y="144" width="542" style="fill:rgb(191,191,191); stroke:none;" height="136" />
|
||||
<rect x="897" y="143" width="542" style="fill:rgb(127,127,127); stroke:none;" height="136" />
|
||||
<rect x="896" y="142" width="542" style="fill:rgb(63,63,63); stroke:none;" height="136" />
|
||||
<rect x="895" y="141" width="542" style="stroke:none;" height="136" />
|
||||
<rect x="895" y="141" width="541" style="fill:none; stroke:black;" height="135" />
|
||||
<line x1="895" x2="1436" y1="167" style="fill:none; stroke:black;" y2="167" />
|
||||
<line x1="895" x2="1436" y1="177" style="fill:none; stroke:black;" y2="177" />
|
||||
<rect x="905" y="182" width="522" style="stroke:none; font-weight:normal;" height="16" />
|
||||
<image x="905" y="182" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAYUlEQVR42mP8//8/
|
||||
AymAiYFEMAg1sGAKOTQ4wNkHGg4Q0ABUneCggOAmOBxYcACnk9BUg0QcFIBCgyeU
|
||||
HjwgpAEYJgsWPACqgyCQyIEHaJ5GDyWgNLIv0VRjjwdMRfQNJQCIvyUFPaAxvQAA
|
||||
AABJRU5ErkJggg==" style="fill:black; stroke:black; font-weight:normal;" height="16" preserveAspectRatio="none" />
|
||||
<text x="924" y="195" style="fill:black; stroke:none; font-weight:normal;" xml:space="preserve"> codegen(in ClassFile, in CodeAttribute, in Expr, in boolean, in Menge): void</text>
|
||||
<rect x="905" y="200" width="522" style="stroke:none; font-weight:normal;" height="16" />
|
||||
<image x="905" y="200" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAYUlEQVR42mP8//8/
|
||||
AymAiYFEMAg1sGAKOTQ4wNkHGg4Q0ABUneCggOAmOBxYcACnk9BUg0QcFIBCgyeU
|
||||
HjwgpAEYJgsWPACqgyCQyIEHaJ5GDyWgNLIv0VRjjwdMRfQNJQCIvyUFPaAxvQAA
|
||||
AABJRU5ErkJggg==" style="fill:black; stroke:black; font-weight:normal;" height="16" preserveAspectRatio="none" />
|
||||
<text x="924" y="213" style="fill:black; stroke:none; font-weight:normal;" xml:space="preserve"> if_codegen(in ClassFile, in CodeAttribute, in boolean, in Expr, in Statement, in Statement, in Menge): void</text>
|
||||
<rect x="905" y="218" width="522" style="stroke:none; font-weight:normal;" height="16" />
|
||||
<image x="905" y="218" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAYUlEQVR42mP8//8/
|
||||
AymAiYFEMAg1sGAKOTQ4wNkHGg4Q0ABUneCggOAmOBxYcACnk9BUg0QcFIBCgyeU
|
||||
HjwgpAEYJgsWPACqgyCQyIEHaJ5GDyWgNLIv0VRjjwdMRfQNJQCIvyUFPaAxvQAA
|
||||
AABJRU5ErkJggg==" style="fill:black; stroke:black; font-weight:normal;" height="16" preserveAspectRatio="none" />
|
||||
<text x="924" y="231" style="fill:black; stroke:none; font-weight:normal;" xml:space="preserve"> loop_codegen(in ClassFile, in CodeAttribute, in Expr, in int, in boolean, in Menge): void</text>
|
||||
<rect x="905" y="236" width="522" style="stroke:none; font-weight:normal;" height="16" />
|
||||
<image x="905" y="236" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAjUlEQVR42rWR2w2A
|
||||
IAxFrXEQN5FNZJPiJozSUdikXiEhRNDGD5sSoJybPiBVnd6N6Mg7Y6nOk2WgWRVe
|
||||
ZLagGudaFptDEqJaki0AxKU2Ih5mcMHVswS5uGYwS097tz6WdBP0dIhe9k2i1MiH
|
||||
Kf0gSMkSYCYxJnDFr4iktoHBlPCMxtvrDRj8Qw/91vTQThWRPIE1rC5kAAAAAElF
|
||||
TkSuQmCC" style="fill:black; stroke:black; font-weight:normal;" height="16" preserveAspectRatio="none" />
|
||||
<text x="924" y="249" style="fill:black; stroke:none; font-weight:normal;" xml:space="preserve"> replace_index(in CodeAttribute, in Menge, in int, in int): void</text>
|
||||
<rect x="905" y="254" width="522" style="stroke:none; font-weight:normal;" height="16" />
|
||||
<image x="905" y="254" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAjUlEQVR42rWR2w2A
|
||||
IAxFrXEQN5FNZJPiJozSUdikXiEhRNDGD5sSoJybPiBVnd6N6Mg7Y6nOk2WgWRVe
|
||||
ZLagGudaFptDEqJaki0AxKU2Ih5mcMHVswS5uGYwS097tz6WdBP0dIhe9k2i1MiH
|
||||
Kf0gSMkSYCYxJnDFr4iktoHBlPCMxtvrDRj8Qw/91vTQThWRPIE1rC5kAAAAAElF
|
||||
TkSuQmCC" style="fill:black; stroke:black; font-weight:normal;" height="16" preserveAspectRatio="none" />
|
||||
<text x="924" y="267" style="fill:black; stroke:none; font-weight:normal;" xml:space="preserve"> build(in ClassFile, in CodeAttribute, in Expr, in Menge, in boolean, in boolean, in boolean, in Menge): void</text>
|
||||
<image x="1135" y="146" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAABBElEQVR42q1SYZnD
|
||||
IAylWwVUQiTgYJFQCZmDOVjOwSREwiREQqdgSMBBFwajcLu7/bl8+fpR8l7egzCs
|
||||
6+peISqi6pogREIavob1XGC7WkOmhIbQZkYf7gf7dgRDF9BPobLJjtnJpgPAWH5Z
|
||||
6Z28Z+aTXHLvjNagdKUQHSNnP3IViHC8HW1nbNkI9GycDGgwHWr95GPs3J9h7b+t
|
||||
PxDa4+Z1Z8lsICAjmqtsDwVTIUCqspRDOxeXJbophmip5E/kCcHbLdlOIiyR5tmD
|
||||
Lwo2nTpgDaF0rWHtIWG6wSU5KzylO6i6amabw+vZzMWbpU3FcprMyYW4bTL2T42q
|
||||
9G/x4Vr/gfAAzgaEraDyPpwAAAAASUVORK5CYII=" style="fill:black; stroke:black;" height="16" preserveAspectRatio="none" />
|
||||
<text x="1154" y="158" style="fill:black; stroke:none;" xml:space="preserve">LogOp</text>
|
||||
<rect x="981" y="3" width="400" style="fill:rgb(191,191,191); stroke:none;" height="64" />
|
||||
<rect x="980" y="2" width="400" style="fill:rgb(127,127,127); stroke:none;" height="64" />
|
||||
<rect x="979" y="1" width="400" style="fill:rgb(63,63,63); stroke:none;" height="64" />
|
||||
<rect x="978" y="0" width="400" style="stroke:none;" height="64" />
|
||||
<rect x="978" y="0" width="399" style="fill:none; stroke:black;" height="63" />
|
||||
<line x1="978" x2="1377" y1="26" style="fill:none; stroke:black;" y2="26" />
|
||||
<line x1="978" x2="1377" y1="36" style="fill:none; stroke:black;" y2="36" />
|
||||
<rect x="988" y="41" width="380" style="stroke:none; font-weight:normal;" height="16" />
|
||||
<image x="988" y="41" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAiklEQVR42rVRgQ2A
|
||||
IAwDwiF+4k7hE/WTnbJP3CdYoyEoqJjoQsiAdrSbjTGap7CTjcMOcy3ofu6xtxIQ
|
||||
wpLyJkIerkUPBUqqfAmikXYlo+R66gSgA3XpiMKn3OZtPaEDcfm/vzHAElSNiP7W
|
||||
JZR/IKAtzArcttabo56KBzzDeHXGl6ZL0ItJf0BYALD3PkMWvNRAAAAAAElFTkSu
|
||||
QmCC" style="fill:black; stroke:black; font-weight:normal;" height="16" preserveAspectRatio="none" />
|
||||
<text x="1007" y="54" style="fill:black; stroke:none; font-weight:normal;" xml:space="preserve"> codegen(in ClassFile, in CodeAttribute, in Expr, in boolean, in Menge): void</text>
|
||||
<image x="1140" y="5" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAABBElEQVR42q1SYZnD
|
||||
IAylWwVUQiTgYJFQCZmDOVjOwSREwiREQqdgSMBBFwajcLu7/bl8+fpR8l7egzCs
|
||||
6+peISqi6pogREIavob1XGC7WkOmhIbQZkYf7gf7dgRDF9BPobLJjtnJpgPAWH5Z
|
||||
6Z28Z+aTXHLvjNagdKUQHSNnP3IViHC8HW1nbNkI9GycDGgwHWr95GPs3J9h7b+t
|
||||
PxDa4+Z1Z8lsICAjmqtsDwVTIUCqspRDOxeXJbophmip5E/kCcHbLdlOIiyR5tmD
|
||||
Lwo2nTpgDaF0rWHtIWG6wSU5KzylO6i6amabw+vZzMWbpU3FcprMyYW4bTL2T42q
|
||||
9G/x4Vr/gfAAzgaEraDyPpwAAAAASUVORK5CYII=" style="fill:black; stroke:black;" height="16" preserveAspectRatio="none" />
|
||||
<text x="1159" y="17" style="fill:black; stroke:none;" xml:space="preserve">Operator</text>
|
||||
<rect x="1749" y="514" width="400" style="fill:rgb(191,191,191); stroke:none;" height="82" />
|
||||
<rect x="1748" y="513" width="400" style="fill:rgb(127,127,127); stroke:none;" height="82" />
|
||||
<rect x="1747" y="512" width="400" style="fill:rgb(63,63,63); stroke:none;" height="82" />
|
||||
<rect x="1746" y="511" width="400" style="stroke:none;" height="82" />
|
||||
<rect x="1746" y="511" width="399" style="fill:none; stroke:black;" height="81" />
|
||||
<line x1="1746" x2="2145" y1="537" style="fill:none; stroke:black;" y2="537" />
|
||||
<line x1="1746" x2="2145" y1="547" style="fill:none; stroke:black;" y2="547" />
|
||||
<rect x="1756" y="552" width="380" style="stroke:none; font-weight:normal;" height="16" />
|
||||
<image x="1756" y="552" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAYUlEQVR42mP8//8/
|
||||
AymAiYFEMAg1sGAKOTQ4wNkHGg4Q0ABUneCggOAmOBxYcACnk9BUg0QcFIBCgyeU
|
||||
HjwgpAEYJgsWPACqgyCQyIEHaJ5GDyWgNLIv0VRjjwdMRfQNJQCIvyUFPaAxvQAA
|
||||
AABJRU5ErkJggg==" style="fill:black; stroke:black; font-weight:normal;" height="16" preserveAspectRatio="none" />
|
||||
<text x="1775" y="565" style="fill:black; stroke:none; font-weight:normal;" xml:space="preserve"> codegen(in ClassFile, in CodeAttribute, in Expr, in boolean, in Menge): void</text>
|
||||
<rect x="1756" y="570" width="380" style="stroke:none; font-weight:normal;" height="16" />
|
||||
<image x="1756" y="570" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAYUlEQVR42mP8//8/
|
||||
AymAiYFEMAg1sGAKOTQ4wNkHGg4Q0ABUneCggOAmOBxYcACnk9BUg0QcFIBCgyeU
|
||||
HjwgpAEYJgsWPACqgyCQyIEHaJ5GDyWgNLIv0VRjjwdMRfQNJQCIvyUFPaAxvQAA
|
||||
AABJRU5ErkJggg==" style="fill:black; stroke:black; font-weight:normal;" height="16" preserveAspectRatio="none" />
|
||||
<text x="1775" y="583" style="fill:black; stroke:none; font-weight:normal;" xml:space="preserve"> if_codegen(in ClassFile, in CodeAttribute, in String, in boolean): void</text>
|
||||
<image x="1901" y="516" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAA7ElEQVR42q2SXXUE
|
||||
IQyF09kVMBIiAQmRMBIioRIioRKQEgkjAQk4mF42wMzu6UN7ujl5APL3ceHjOA4a
|
||||
lj1nd7qYiqjo9eQ+V2KPAJdrGPVwtzxPljMbqc/ZvZ5L7zUngOScw2zSt+bqpUza
|
||||
YFtibvSObC8uWczzrER03u1+nS+sj8Yt5iVLPifTGLXQH+1/BcBoSCKBhzsPHibm
|
||||
WN7MjKjue6W1lgp3TZ+aVDhBJZy0rL3qtiVO/dLQa4oAHSHRE0RrT/O9O1J7SwQK
|
||||
v6b6iA4LpPg2W2eDQ0P4uoLkS+3nvxRsL1/t3bL+xr4BXAV0uUgPznkAAAAASUVO
|
||||
RK5CYII=" style="fill:black; stroke:black;" height="16" preserveAspectRatio="none" />
|
||||
<text x="1920" y="528" style="fill:black; stroke:none;" xml:space="preserve">LessEquOp</text>
|
||||
<path d="M588 128 L588 108 L1179 108 L1179 67" style="fill:none; stroke:black;" />
|
||||
<polygon style="stroke:none;" points=" 1179 67 1185 91 1173 91" />
|
||||
<polygon style="fill:none; stroke:black;" points=" 1179 67 1185 91 1173 91" />
|
||||
<path d="M2220 184 L2220 108 L1179 108" style="fill:none; stroke:black;" />
|
||||
<path d="M1167 141 L1167 108 L1179 108" style="fill:none; stroke:black;" />
|
||||
<path d="M3121 179 L3121 108 L1179 108" style="fill:none; stroke:black;" />
|
||||
<path d="M201 503 L201 483 L588 483 L588 195" style="fill:none; stroke:black;" />
|
||||
<polygon style="stroke:none;" points=" 588 195 594 219 582 219" />
|
||||
<polygon style="fill:none; stroke:black;" points=" 588 195 594 219 582 219" />
|
||||
<path d="M640 504 L640 483 L588 483" style="fill:none; stroke:black;" />
|
||||
<path d="M1070 505 L1070 483 L588 483" style="fill:none; stroke:black;" />
|
||||
<path d="M1501 509 L1501 483 L588 483" style="fill:none; stroke:black;" />
|
||||
<path d="M1947 511 L1947 483 L588 483" style="fill:none; stroke:black;" />
|
||||
<path d="M2383 512 L2383 483 L588 483" style="fill:none; stroke:black;" />
|
||||
<path d="M3350 452 L3350 438 L3121 438" style="fill:none; stroke:black;" />
|
||||
<path d="M1358 375 L1358 347 L1167 347" style="fill:none; stroke:black;" />
|
||||
<path d="M961 367 L961 347 L1167 347 L1167 280" style="fill:none; stroke:black;" />
|
||||
<polygon style="stroke:none;" points=" 1167 280 1173 304 1161 304" />
|
||||
<polygon style="fill:none; stroke:black;" points=" 1167 280 1173 304 1161 304" />
|
||||
<path d="M2225 322 L2225 302 L2220 302" style="fill:none; stroke:black;" />
|
||||
<path d="M2871 458 L2871 438 L3121 438 L3121 246" style="fill:none; stroke:black;" />
|
||||
<polygon style="stroke:none;" points=" 3121 246 3127 270 3115 270" />
|
||||
<polygon style="fill:none; stroke:black;" points=" 3121 246 3127 270 3115 270" />
|
||||
<path d="M2658 322 L2658 302 L2220 302" style="fill:none; stroke:black;" />
|
||||
<path d="M1792 322 L1792 302 L2220 302 L2220 213" style="fill:none; stroke:black;" />
|
||||
<polygon style="stroke:none;" points=" 2220 213 2226 237 2214 237" />
|
||||
<polygon style="fill:none; stroke:black;" points=" 2220 213 2226 237 2214 237" />
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 1.0//EN' 'http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd'>
|
||||
<svg xmlns:xlink="http://www.w3.org/1999/xlink" style="fill-opacity:1; color-rendering:auto; color-interpolation:auto; text-rendering:auto; stroke:black; stroke-linecap:square; stroke-miterlimit:10; shape-rendering:auto; stroke-opacity:1; fill:black; stroke-dasharray:none; font-weight:normal; stroke-width:1; font-family:'sansserif'; font-style:normal; stroke-linejoin:miter; font-size:12; stroke-dashoffset:0; image-rendering:auto;" xmlns="http://www.w3.org/2000/svg">
|
||||
<!--Generated by the Batik Graphics2D SVG Generator-->
|
||||
<defs id="genericDefs" />
|
||||
<g>
|
||||
<g style="fill:white; font-family:'Arial'; font-weight:bold; stroke:white;">
|
||||
<rect x="-45" y="-50" width="3602" style="stroke:none;" height="652" />
|
||||
<rect x="406" y="131" width="368" style="fill:rgb(191,191,191); stroke:none;" height="64" />
|
||||
<rect x="405" y="130" width="368" style="fill:rgb(127,127,127); stroke:none;" height="64" />
|
||||
<rect x="404" y="129" width="368" style="fill:rgb(63,63,63); stroke:none;" height="64" />
|
||||
<rect x="403" y="128" width="368" style="stroke:none;" height="64" />
|
||||
<rect x="403" y="128" width="367" style="fill:none; stroke:black;" height="63" />
|
||||
<line x1="403" x2="770" y1="154" style="fill:none; stroke:black;" y2="154" />
|
||||
<line x1="403" x2="770" y1="164" style="fill:none; stroke:black;" y2="164" />
|
||||
<rect x="413" y="169" width="348" style="stroke:none; font-weight:normal;" height="16" />
|
||||
<image x="413" y="169" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAiklEQVR42rVRgQ2A
|
||||
IAwDwiF+4k7hE/WTnbJP3CdYoyEoqJjoQsiAdrSbjTGap7CTjcMOcy3ofu6xtxIQ
|
||||
wpLyJkIerkUPBUqqfAmikXYlo+R66gSgA3XpiMKn3OZtPaEDcfm/vzHAElSNiP7W
|
||||
JZR/IKAtzArcttabo56KBzzDeHXGl6ZL0ItJf0BYALD3PkMWvNRAAAAAAElFTkSu
|
||||
QmCC" style="fill:black; stroke:black; font-weight:normal;" height="16" preserveAspectRatio="none" />
|
||||
<text x="432" y="182" style="fill:black; stroke:none; font-weight:normal;" xml:space="preserve"> if_codegen(in ClassFile, in CodeAttribute, in String, in boolean): void</text>
|
||||
<image x="557" y="133" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAABBElEQVR42q1SYZnD
|
||||
IAylWwVUQiTgYJFQCZmDOVjOwSREwiREQqdgSMBBFwajcLu7/bl8+fpR8l7egzCs
|
||||
6+peISqi6pogREIavob1XGC7WkOmhIbQZkYf7gf7dgRDF9BPobLJjtnJpgPAWH5Z
|
||||
6Z28Z+aTXHLvjNagdKUQHSNnP3IViHC8HW1nbNkI9GycDGgwHWr95GPs3J9h7b+t
|
||||
PxDa4+Z1Z8lsICAjmqtsDwVTIUCqspRDOxeXJbophmip5E/kCcHbLdlOIiyR5tmD
|
||||
Lwo2nTpgDaF0rWHtIWG6wSU5KzylO6i6amabw+vZzMWbpU3FcprMyYW4bTL2T42q
|
||||
9G/x4Vr/gfAAzgaEraDyPpwAAAAASUVORK5CYII=" style="fill:black; stroke:black;" height="16" preserveAspectRatio="none" />
|
||||
<text x="576" y="145" style="fill:black; stroke:none;" xml:space="preserve">RelOp</text>
|
||||
<rect x="872" y="508" width="400" style="fill:rgb(191,191,191); stroke:none;" height="82" />
|
||||
<rect x="871" y="507" width="400" style="fill:rgb(127,127,127); stroke:none;" height="82" />
|
||||
<rect x="870" y="506" width="400" style="fill:rgb(63,63,63); stroke:none;" height="82" />
|
||||
<rect x="869" y="505" width="400" style="stroke:none;" height="82" />
|
||||
<rect x="869" y="505" width="399" style="fill:none; stroke:black;" height="81" />
|
||||
<line x1="869" x2="1268" y1="531" style="fill:none; stroke:black;" y2="531" />
|
||||
<line x1="869" x2="1268" y1="541" style="fill:none; stroke:black;" y2="541" />
|
||||
<rect x="879" y="546" width="380" style="stroke:none; font-weight:normal;" height="16" />
|
||||
<image x="879" y="546" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAYUlEQVR42mP8//8/
|
||||
AymAiYFEMAg1sGAKOTQ4wNkHGg4Q0ABUneCggOAmOBxYcACnk9BUg0QcFIBCgyeU
|
||||
HjwgpAEYJgsWPACqgyCQyIEHaJ5GDyWgNLIv0VRjjwdMRfQNJQCIvyUFPaAxvQAA
|
||||
AABJRU5ErkJggg==" style="fill:black; stroke:black; font-weight:normal;" height="16" preserveAspectRatio="none" />
|
||||
<text x="898" y="559" style="fill:black; stroke:none; font-weight:normal;" xml:space="preserve"> codegen(in ClassFile, in CodeAttribute, in Expr, in boolean, in Menge): void</text>
|
||||
<rect x="879" y="564" width="380" style="stroke:none; font-weight:normal;" height="16" />
|
||||
<image x="879" y="564" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAYUlEQVR42mP8//8/
|
||||
AymAiYFEMAg1sGAKOTQ4wNkHGg4Q0ABUneCggOAmOBxYcACnk9BUg0QcFIBCgyeU
|
||||
HjwgpAEYJgsWPACqgyCQyIEHaJ5GDyWgNLIv0VRjjwdMRfQNJQCIvyUFPaAxvQAA
|
||||
AABJRU5ErkJggg==" style="fill:black; stroke:black; font-weight:normal;" height="16" preserveAspectRatio="none" />
|
||||
<text x="898" y="577" style="fill:black; stroke:none; font-weight:normal;" xml:space="preserve"> if_codegen(in ClassFile, in CodeAttribute, in String, in boolean): void</text>
|
||||
<image x="1032" y="510" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAA7ElEQVR42q2SXXUE
|
||||
IQyF09kVMBIiAQmRMBIioRIioRKQEgkjAQk4mF42wMzu6UN7ujl5APL3ceHjOA4a
|
||||
lj1nd7qYiqjo9eQ+V2KPAJdrGPVwtzxPljMbqc/ZvZ5L7zUngOScw2zSt+bqpUza
|
||||
YFtibvSObC8uWczzrER03u1+nS+sj8Yt5iVLPifTGLXQH+1/BcBoSCKBhzsPHibm
|
||||
WN7MjKjue6W1lgp3TZ+aVDhBJZy0rL3qtiVO/dLQa4oAHSHRE0RrT/O9O1J7SwQK
|
||||
v6b6iA4LpPg2W2eDQ0P4uoLkS+3nvxRsL1/t3bL+xr4BXAV0uUgPznkAAAAASUVO
|
||||
RK5CYII=" style="fill:black; stroke:black;" height="16" preserveAspectRatio="none" />
|
||||
<text x="1051" y="522" style="fill:black; stroke:none;" xml:space="preserve">EqualOp</text>
|
||||
<rect x="442" y="507" width="400" style="fill:rgb(191,191,191); stroke:none;" height="82" />
|
||||
<rect x="441" y="506" width="400" style="fill:rgb(127,127,127); stroke:none;" height="82" />
|
||||
<rect x="440" y="505" width="400" style="fill:rgb(63,63,63); stroke:none;" height="82" />
|
||||
<rect x="439" y="504" width="400" style="stroke:none;" height="82" />
|
||||
<rect x="439" y="504" width="399" style="fill:none; stroke:black;" height="81" />
|
||||
<line x1="439" x2="838" y1="530" style="fill:none; stroke:black;" y2="530" />
|
||||
<line x1="439" x2="838" y1="540" style="fill:none; stroke:black;" y2="540" />
|
||||
<rect x="449" y="545" width="380" style="stroke:none; font-weight:normal;" height="16" />
|
||||
<image x="449" y="545" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAYUlEQVR42mP8//8/
|
||||
AymAiYFEMAg1sGAKOTQ4wNkHGg4Q0ABUneCggOAmOBxYcACnk9BUg0QcFIBCgyeU
|
||||
HjwgpAEYJgsWPACqgyCQyIEHaJ5GDyWgNLIv0VRjjwdMRfQNJQCIvyUFPaAxvQAA
|
||||
AABJRU5ErkJggg==" style="fill:black; stroke:black; font-weight:normal;" height="16" preserveAspectRatio="none" />
|
||||
<text x="468" y="558" style="fill:black; stroke:none; font-weight:normal;" xml:space="preserve"> codegen(in ClassFile, in CodeAttribute, in Expr, in boolean, in Menge): void</text>
|
||||
<rect x="449" y="563" width="380" style="stroke:none; font-weight:normal;" height="16" />
|
||||
<image x="449" y="563" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAYUlEQVR42mP8//8/
|
||||
AymAiYFEMAg1sGAKOTQ4wNkHGg4Q0ABUneCggOAmOBxYcACnk9BUg0QcFIBCgyeU
|
||||
HjwgpAEYJgsWPACqgyCQyIEHaJ5GDyWgNLIv0VRjjwdMRfQNJQCIvyUFPaAxvQAA
|
||||
AABJRU5ErkJggg==" style="fill:black; stroke:black; font-weight:normal;" height="16" preserveAspectRatio="none" />
|
||||
<text x="468" y="576" style="fill:black; stroke:none; font-weight:normal;" xml:space="preserve"> if_codegen(in ClassFile, in CodeAttribute, in String, in boolean): void</text>
|
||||
<image x="606" y="509" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAA7ElEQVR42q2SXXUE
|
||||
IQyF09kVMBIiAQmRMBIioRIioRKQEgkjAQk4mF42wMzu6UN7ujl5APL3ceHjOA4a
|
||||
lj1nd7qYiqjo9eQ+V2KPAJdrGPVwtzxPljMbqc/ZvZ5L7zUngOScw2zSt+bqpUza
|
||||
YFtibvSObC8uWczzrER03u1+nS+sj8Yt5iVLPifTGLXQH+1/BcBoSCKBhzsPHibm
|
||||
WN7MjKjue6W1lgp3TZ+aVDhBJZy0rL3qtiVO/dLQa4oAHSHRE0RrT/O9O1J7SwQK
|
||||
v6b6iA4LpPg2W2eDQ0P4uoLkS+3nvxRsL1/t3bL+xr4BXAV0uUgPznkAAAAASUVO
|
||||
RK5CYII=" style="fill:black; stroke:black;" height="16" preserveAspectRatio="none" />
|
||||
<text x="625" y="521" style="fill:black; stroke:none;" xml:space="preserve">LessOp</text>
|
||||
<rect x="1303" y="512" width="400" style="fill:rgb(191,191,191); stroke:none;" height="82" />
|
||||
<rect x="1302" y="511" width="400" style="fill:rgb(127,127,127); stroke:none;" height="82" />
|
||||
<rect x="1301" y="510" width="400" style="fill:rgb(63,63,63); stroke:none;" height="82" />
|
||||
<rect x="1300" y="509" width="400" style="stroke:none;" height="82" />
|
||||
<rect x="1300" y="509" width="399" style="fill:none; stroke:black;" height="81" />
|
||||
<line x1="1300" x2="1699" y1="535" style="fill:none; stroke:black;" y2="535" />
|
||||
<line x1="1300" x2="1699" y1="545" style="fill:none; stroke:black;" y2="545" />
|
||||
<rect x="1310" y="550" width="380" style="stroke:none; font-weight:normal;" height="16" />
|
||||
<image x="1310" y="550" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAYUlEQVR42mP8//8/
|
||||
AymAiYFEMAg1sGAKOTQ4wNkHGg4Q0ABUneCggOAmOBxYcACnk9BUg0QcFIBCgyeU
|
||||
HjwgpAEYJgsWPACqgyCQyIEHaJ5GDyWgNLIv0VRjjwdMRfQNJQCIvyUFPaAxvQAA
|
||||
AABJRU5ErkJggg==" style="fill:black; stroke:black; font-weight:normal;" height="16" preserveAspectRatio="none" />
|
||||
<text x="1329" y="563" style="fill:black; stroke:none; font-weight:normal;" xml:space="preserve"> codegen(in ClassFile, in CodeAttribute, in Expr, in boolean, in Menge): void</text>
|
||||
<rect x="1310" y="568" width="380" style="stroke:none; font-weight:normal;" height="16" />
|
||||
<image x="1310" y="568" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAYUlEQVR42mP8//8/
|
||||
AymAiYFEMAg1sGAKOTQ4wNkHGg4Q0ABUneCggOAmOBxYcACnk9BUg0QcFIBCgyeU
|
||||
HjwgpAEYJgsWPACqgyCQyIEHaJ5GDyWgNLIv0VRjjwdMRfQNJQCIvyUFPaAxvQAA
|
||||
AABJRU5ErkJggg==" style="fill:black; stroke:black; font-weight:normal;" height="16" preserveAspectRatio="none" />
|
||||
<text x="1329" y="581" style="fill:black; stroke:none; font-weight:normal;" xml:space="preserve"> if_codegen(in ClassFile, in CodeAttribute, in String, in boolean): void</text>
|
||||
<image x="1452" y="514" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAA7ElEQVR42q2SXXUE
|
||||
IQyF09kVMBIiAQmRMBIioRIioRKQEgkjAQk4mF42wMzu6UN7ujl5APL3ceHjOA4a
|
||||
lj1nd7qYiqjo9eQ+V2KPAJdrGPVwtzxPljMbqc/ZvZ5L7zUngOScw2zSt+bqpUza
|
||||
YFtibvSObC8uWczzrER03u1+nS+sj8Yt5iVLPifTGLXQH+1/BcBoSCKBhzsPHibm
|
||||
WN7MjKjue6W1lgp3TZ+aVDhBJZy0rL3qtiVO/dLQa4oAHSHRE0RrT/O9O1J7SwQK
|
||||
v6b6iA4LpPg2W2eDQ0P4uoLkS+3nvxRsL1/t3bL+xr4BXAV0uUgPznkAAAAASUVO
|
||||
RK5CYII=" style="fill:black; stroke:black;" height="16" preserveAspectRatio="none" />
|
||||
<text x="1471" y="526" style="fill:black; stroke:none;" xml:space="preserve">NotEqualOp</text>
|
||||
<rect x="3152" y="455" width="400" style="fill:rgb(191,191,191); stroke:none;" height="64" />
|
||||
<rect x="3151" y="454" width="400" style="fill:rgb(127,127,127); stroke:none;" height="64" />
|
||||
<rect x="3150" y="453" width="400" style="fill:rgb(63,63,63); stroke:none;" height="64" />
|
||||
<rect x="3149" y="452" width="400" style="stroke:none;" height="64" />
|
||||
<rect x="3149" y="452" width="399" style="fill:none; stroke:black;" height="63" />
|
||||
<line x1="3149" x2="3548" y1="478" style="fill:none; stroke:black;" y2="478" />
|
||||
<line x1="3149" x2="3548" y1="488" style="fill:none; stroke:black;" y2="488" />
|
||||
<rect x="3159" y="493" width="380" style="stroke:none; font-weight:normal;" height="16" />
|
||||
<image x="3159" y="493" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAYUlEQVR42mP8//8/
|
||||
AymAiYFEMAg1sGAKOTQ4wNkHGg4Q0ABUneCggOAmOBxYcACnk9BUg0QcFIBCgyeU
|
||||
HjwgpAEYJgsWPACqgyCQyIEHaJ5GDyWgNLIv0VRjjwdMRfQNJQCIvyUFPaAxvQAA
|
||||
AABJRU5ErkJggg==" style="fill:black; stroke:black; font-weight:normal;" height="16" preserveAspectRatio="none" />
|
||||
<text x="3178" y="506" style="fill:black; stroke:none; font-weight:normal;" xml:space="preserve"> codegen(in ClassFile, in CodeAttribute, in Expr, in boolean, in Menge): void</text>
|
||||
<image x="3311" y="457" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAA7ElEQVR42q2SXXUE
|
||||
IQyF09kVMBIiAQmRMBIioRIioRKQEgkjAQk4mF42wMzu6UN7ujl5APL3ceHjOA4a
|
||||
lj1nd7qYiqjo9eQ+V2KPAJdrGPVwtzxPljMbqc/ZvZ5L7zUngOScw2zSt+bqpUza
|
||||
YFtibvSObC8uWczzrER03u1+nS+sj8Yt5iVLPifTGLXQH+1/BcBoSCKBhzsPHibm
|
||||
WN7MjKjue6W1lgp3TZ+aVDhBJZy0rL3qtiVO/dLQa4oAHSHRE0RrT/O9O1J7SwQK
|
||||
v6b6iA4LpPg2W2eDQ0P4uoLkS+3nvxRsL1/t3bL+xr4BXAV0uUgPznkAAAAASUVO
|
||||
RK5CYII=" style="fill:black; stroke:black;" height="16" preserveAspectRatio="none" />
|
||||
<text x="3330" y="469" style="fill:black; stroke:none;" xml:space="preserve">MinusOp</text>
|
||||
<rect x="1323" y="378" width="73" style="fill:rgb(191,191,191); stroke:none;" height="26" />
|
||||
<rect x="1322" y="377" width="73" style="fill:rgb(127,127,127); stroke:none;" height="26" />
|
||||
<rect x="1321" y="376" width="73" style="fill:rgb(63,63,63); stroke:none;" height="26" />
|
||||
<rect x="1320" y="375" width="73" style="stroke:none;" height="26" />
|
||||
<rect x="1320" y="375" width="72" style="fill:none; stroke:black;" height="25" />
|
||||
<image x="1330" y="380" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAA7ElEQVR42q2SXXUE
|
||||
IQyF09kVMBIiAQmRMBIioRIioRKQEgkjAQk4mF42wMzu6UN7ujl5APL3ceHjOA4a
|
||||
lj1nd7qYiqjo9eQ+V2KPAJdrGPVwtzxPljMbqc/ZvZ5L7zUngOScw2zSt+bqpUza
|
||||
YFtibvSObC8uWczzrER03u1+nS+sj8Yt5iVLPifTGLXQH+1/BcBoSCKBhzsPHibm
|
||||
WN7MjKjue6W1lgp3TZ+aVDhBJZy0rL3qtiVO/dLQa4oAHSHRE0RrT/O9O1J7SwQK
|
||||
v6b6iA4LpPg2W2eDQ0P4uoLkS+3nvxRsL1/t3bL+xr4BXAV0uUgPznkAAAAASUVO
|
||||
RK5CYII=" style="fill:black; stroke:black;" height="16" preserveAspectRatio="none" />
|
||||
<text x="1349" y="392" style="fill:black; stroke:none;" xml:space="preserve">OrOp</text>
|
||||
<rect x="921" y="370" width="83" style="fill:rgb(191,191,191); stroke:none;" height="26" />
|
||||
<rect x="920" y="369" width="83" style="fill:rgb(127,127,127); stroke:none;" height="26" />
|
||||
<rect x="919" y="368" width="83" style="fill:rgb(63,63,63); stroke:none;" height="26" />
|
||||
<rect x="918" y="367" width="83" style="stroke:none;" height="26" />
|
||||
<rect x="918" y="367" width="82" style="fill:none; stroke:black;" height="25" />
|
||||
<image x="928" y="372" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAA7ElEQVR42q2SXXUE
|
||||
IQyF09kVMBIiAQmRMBIioRIioRKQEgkjAQk4mF42wMzu6UN7ujl5APL3ceHjOA4a
|
||||
lj1nd7qYiqjo9eQ+V2KPAJdrGPVwtzxPljMbqc/ZvZ5L7zUngOScw2zSt+bqpUza
|
||||
YFtibvSObC8uWczzrER03u1+nS+sj8Yt5iVLPifTGLXQH+1/BcBoSCKBhzsPHibm
|
||||
WN7MjKjue6W1lgp3TZ+aVDhBJZy0rL3qtiVO/dLQa4oAHSHRE0RrT/O9O1J7SwQK
|
||||
v6b6iA4LpPg2W2eDQ0P4uoLkS+3nvxRsL1/t3bL+xr4BXAV0uUgPznkAAAAASUVO
|
||||
RK5CYII=" style="fill:black; stroke:black;" height="16" preserveAspectRatio="none" />
|
||||
<text x="947" y="384" style="fill:black; stroke:none;" xml:space="preserve">AndOp</text>
|
||||
<rect x="2027" y="325" width="400" style="fill:rgb(191,191,191); stroke:none;" height="64" />
|
||||
<rect x="2026" y="324" width="400" style="fill:rgb(127,127,127); stroke:none;" height="64" />
|
||||
<rect x="2025" y="323" width="400" style="fill:rgb(63,63,63); stroke:none;" height="64" />
|
||||
<rect x="2024" y="322" width="400" style="stroke:none;" height="64" />
|
||||
<rect x="2024" y="322" width="399" style="fill:none; stroke:black;" height="63" />
|
||||
<line x1="2024" x2="2423" y1="348" style="fill:none; stroke:black;" y2="348" />
|
||||
<line x1="2024" x2="2423" y1="358" style="fill:none; stroke:black;" y2="358" />
|
||||
<rect x="2034" y="363" width="380" style="stroke:none; font-weight:normal;" height="16" />
|
||||
<image x="2034" y="363" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAYUlEQVR42mP8//8/
|
||||
AymAiYFEMAg1sGAKOTQ4wNkHGg4Q0ABUneCggOAmOBxYcACnk9BUg0QcFIBCgyeU
|
||||
HjwgpAEYJgsWPACqgyCQyIEHaJ5GDyWgNLIv0VRjjwdMRfQNJQCIvyUFPaAxvQAA
|
||||
AABJRU5ErkJggg==" style="fill:black; stroke:black; font-weight:normal;" height="16" preserveAspectRatio="none" />
|
||||
<text x="2053" y="376" style="fill:black; stroke:none; font-weight:normal;" xml:space="preserve"> codegen(in ClassFile, in CodeAttribute, in Expr, in boolean, in Menge): void</text>
|
||||
<image x="2186" y="327" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAA7ElEQVR42q2SXXUE
|
||||
IQyF09kVMBIiAQmRMBIioRIioRKQEgkjAQk4mF42wMzu6UN7ujl5APL3ceHjOA4a
|
||||
lj1nd7qYiqjo9eQ+V2KPAJdrGPVwtzxPljMbqc/ZvZ5L7zUngOScw2zSt+bqpUza
|
||||
YFtibvSObC8uWczzrER03u1+nS+sj8Yt5iVLPifTGLXQH+1/BcBoSCKBhzsPHibm
|
||||
WN7MjKjue6W1lgp3TZ+aVDhBJZy0rL3qtiVO/dLQa4oAHSHRE0RrT/O9O1J7SwQK
|
||||
v6b6iA4LpPg2W2eDQ0P4uoLkS+3nvxRsL1/t3bL+xr4BXAV0uUgPznkAAAAASUVO
|
||||
RK5CYII=" style="fill:black; stroke:black;" height="16" preserveAspectRatio="none" />
|
||||
<text x="2205" y="339" style="fill:black; stroke:none;" xml:space="preserve">TimesOp</text>
|
||||
<rect x="2185" y="515" width="400" style="fill:rgb(191,191,191); stroke:none;" height="82" />
|
||||
<rect x="2184" y="514" width="400" style="fill:rgb(127,127,127); stroke:none;" height="82" />
|
||||
<rect x="2183" y="513" width="400" style="fill:rgb(63,63,63); stroke:none;" height="82" />
|
||||
<rect x="2182" y="512" width="400" style="stroke:none;" height="82" />
|
||||
<rect x="2182" y="512" width="399" style="fill:none; stroke:black;" height="81" />
|
||||
<line x1="2182" x2="2581" y1="538" style="fill:none; stroke:black;" y2="538" />
|
||||
<line x1="2182" x2="2581" y1="548" style="fill:none; stroke:black;" y2="548" />
|
||||
<rect x="2192" y="553" width="380" style="stroke:none; font-weight:normal;" height="16" />
|
||||
<image x="2192" y="553" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAYUlEQVR42mP8//8/
|
||||
AymAiYFEMAg1sGAKOTQ4wNkHGg4Q0ABUneCggOAmOBxYcACnk9BUg0QcFIBCgyeU
|
||||
HjwgpAEYJgsWPACqgyCQyIEHaJ5GDyWgNLIv0VRjjwdMRfQNJQCIvyUFPaAxvQAA
|
||||
AABJRU5ErkJggg==" style="fill:black; stroke:black; font-weight:normal;" height="16" preserveAspectRatio="none" />
|
||||
<text x="2211" y="566" style="fill:black; stroke:none; font-weight:normal;" xml:space="preserve"> codegen(in ClassFile, in CodeAttribute, in Expr, in boolean, in Menge): void</text>
|
||||
<rect x="2192" y="571" width="380" style="stroke:none; font-weight:normal;" height="16" />
|
||||
<image x="2192" y="571" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAYUlEQVR42mP8//8/
|
||||
AymAiYFEMAg1sGAKOTQ4wNkHGg4Q0ABUneCggOAmOBxYcACnk9BUg0QcFIBCgyeU
|
||||
HjwgpAEYJgsWPACqgyCQyIEHaJ5GDyWgNLIv0VRjjwdMRfQNJQCIvyUFPaAxvQAA
|
||||
AABJRU5ErkJggg==" style="fill:black; stroke:black; font-weight:normal;" height="16" preserveAspectRatio="none" />
|
||||
<text x="2211" y="584" style="fill:black; stroke:none; font-weight:normal;" xml:space="preserve"> if_codegen(in ClassFile, in CodeAttribute, in String, in boolean): void</text>
|
||||
<image x="2327" y="517" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAA7ElEQVR42q2SXXUE
|
||||
IQyF09kVMBIiAQmRMBIioRIioRKQEgkjAQk4mF42wMzu6UN7ujl5APL3ceHjOA4a
|
||||
lj1nd7qYiqjo9eQ+V2KPAJdrGPVwtzxPljMbqc/ZvZ5L7zUngOScw2zSt+bqpUza
|
||||
YFtibvSObC8uWczzrER03u1+nS+sj8Yt5iVLPifTGLXQH+1/BcBoSCKBhzsPHibm
|
||||
WN7MjKjue6W1lgp3TZ+aVDhBJZy0rL3qtiVO/dLQa4oAHSHRE0RrT/O9O1J7SwQK
|
||||
v6b6iA4LpPg2W2eDQ0P4uoLkS+3nvxRsL1/t3bL+xr4BXAV0uUgPznkAAAAASUVO
|
||||
RK5CYII=" style="fill:black; stroke:black;" height="16" preserveAspectRatio="none" />
|
||||
<text x="2346" y="529" style="fill:black; stroke:none;" xml:space="preserve">GreaterEquOp</text>
|
||||
<rect x="2923" y="182" width="400" style="fill:rgb(191,191,191); stroke:none;" height="64" />
|
||||
<rect x="2922" y="181" width="400" style="fill:rgb(127,127,127); stroke:none;" height="64" />
|
||||
<rect x="2921" y="180" width="400" style="fill:rgb(63,63,63); stroke:none;" height="64" />
|
||||
<rect x="2920" y="179" width="400" style="stroke:none;" height="64" />
|
||||
<rect x="2920" y="179" width="399" style="fill:none; stroke:black;" height="63" />
|
||||
<line x1="2920" x2="3319" y1="205" style="fill:none; stroke:black;" y2="205" />
|
||||
<line x1="2920" x2="3319" y1="215" style="fill:none; stroke:black;" y2="215" />
|
||||
<rect x="2930" y="220" width="380" style="stroke:none; font-weight:normal;" height="16" />
|
||||
<image x="2930" y="220" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAiklEQVR42rVRgQ2A
|
||||
IAwDwiF+4k7hE/WTnbJP3CdYoyEoqJjoQsiAdrSbjTGap7CTjcMOcy3ofu6xtxIQ
|
||||
wpLyJkIerkUPBUqqfAmikXYlo+R66gSgA3XpiMKn3OZtPaEDcfm/vzHAElSNiP7W
|
||||
JZR/IKAtzArcttabo56KBzzDeHXGl6ZL0ItJf0BYALD3PkMWvNRAAAAAAElFTkSu
|
||||
QmCC" style="fill:black; stroke:black; font-weight:normal;" height="16" preserveAspectRatio="none" />
|
||||
<text x="2949" y="233" style="fill:black; stroke:none; font-weight:normal;" xml:space="preserve"> codegen(in ClassFile, in CodeAttribute, in Expr, in boolean, in Menge): void</text>
|
||||
<image x="3088" y="184" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAABBElEQVR42q1SYZnD
|
||||
IAylWwVUQiTgYJFQCZmDOVjOwSREwiREQqdgSMBBFwajcLu7/bl8+fpR8l7egzCs
|
||||
6+peISqi6pogREIavob1XGC7WkOmhIbQZkYf7gf7dgRDF9BPobLJjtnJpgPAWH5Z
|
||||
6Z28Z+aTXHLvjNagdKUQHSNnP3IViHC8HW1nbNkI9GycDGgwHWr95GPs3J9h7b+t
|
||||
PxDa4+Z1Z8lsICAjmqtsDwVTIUCqspRDOxeXJbophmip5E/kCcHbLdlOIiyR5tmD
|
||||
Lwo2nTpgDaF0rWHtIWG6wSU5KzylO6i6amabw+vZzMWbpU3FcprMyYW4bTL2T42q
|
||||
9G/x4Vr/gfAAzgaEraDyPpwAAAAASUVORK5CYII=" style="fill:black; stroke:black;" height="16" preserveAspectRatio="none" />
|
||||
<text x="3107" y="196" style="fill:black; stroke:none;" xml:space="preserve">AddOp</text>
|
||||
<rect x="2460" y="325" width="400" style="fill:rgb(191,191,191); stroke:none;" height="64" />
|
||||
<rect x="2459" y="324" width="400" style="fill:rgb(127,127,127); stroke:none;" height="64" />
|
||||
<rect x="2458" y="323" width="400" style="fill:rgb(63,63,63); stroke:none;" height="64" />
|
||||
<rect x="2457" y="322" width="400" style="stroke:none;" height="64" />
|
||||
<rect x="2457" y="322" width="399" style="fill:none; stroke:black;" height="63" />
|
||||
<line x1="2457" x2="2856" y1="348" style="fill:none; stroke:black;" y2="348" />
|
||||
<line x1="2457" x2="2856" y1="358" style="fill:none; stroke:black;" y2="358" />
|
||||
<rect x="2467" y="363" width="380" style="stroke:none; font-weight:normal;" height="16" />
|
||||
<image x="2467" y="363" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAYUlEQVR42mP8//8/
|
||||
AymAiYFEMAg1sGAKOTQ4wNkHGg4Q0ABUneCggOAmOBxYcACnk9BUg0QcFIBCgyeU
|
||||
HjwgpAEYJgsWPACqgyCQyIEHaJ5GDyWgNLIv0VRjjwdMRfQNJQCIvyUFPaAxvQAA
|
||||
AABJRU5ErkJggg==" style="fill:black; stroke:black; font-weight:normal;" height="16" preserveAspectRatio="none" />
|
||||
<text x="2486" y="376" style="fill:black; stroke:none; font-weight:normal;" xml:space="preserve"> codegen(in ClassFile, in CodeAttribute, in Expr, in boolean, in Menge): void</text>
|
||||
<image x="2614" y="327" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAA7ElEQVR42q2SXXUE
|
||||
IQyF09kVMBIiAQmRMBIioRIioRKQEgkjAQk4mF42wMzu6UN7ujl5APL3ceHjOA4a
|
||||
lj1nd7qYiqjo9eQ+V2KPAJdrGPVwtzxPljMbqc/ZvZ5L7zUngOScw2zSt+bqpUza
|
||||
YFtibvSObC8uWczzrER03u1+nS+sj8Yt5iVLPifTGLXQH+1/BcBoSCKBhzsPHibm
|
||||
WN7MjKjue6W1lgp3TZ+aVDhBJZy0rL3qtiVO/dLQa4oAHSHRE0RrT/O9O1J7SwQK
|
||||
v6b6iA4LpPg2W2eDQ0P4uoLkS+3nvxRsL1/t3bL+xr4BXAV0uUgPznkAAAAASUVO
|
||||
RK5CYII=" style="fill:black; stroke:black;" height="16" preserveAspectRatio="none" />
|
||||
<text x="2633" y="339" style="fill:black; stroke:none;" xml:space="preserve">ModuloOp</text>
|
||||
<rect x="3" y="506" width="400" style="fill:rgb(191,191,191); stroke:none;" height="82" />
|
||||
<rect x="2" y="505" width="400" style="fill:rgb(127,127,127); stroke:none;" height="82" />
|
||||
<rect x="1" y="504" width="400" style="fill:rgb(63,63,63); stroke:none;" height="82" />
|
||||
<rect x="0" y="503" width="400" style="stroke:none;" height="82" />
|
||||
<rect x="0" y="503" width="399" style="fill:none; stroke:black;" height="81" />
|
||||
<line x1="0" x2="399" y1="529" style="fill:none; stroke:black;" y2="529" />
|
||||
<line x1="0" x2="399" y1="539" style="fill:none; stroke:black;" y2="539" />
|
||||
<rect x="10" y="544" width="380" style="stroke:none; font-weight:normal;" height="16" />
|
||||
<image x="10" y="544" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAYUlEQVR42mP8//8/
|
||||
AymAiYFEMAg1sGAKOTQ4wNkHGg4Q0ABUneCggOAmOBxYcACnk9BUg0QcFIBCgyeU
|
||||
HjwgpAEYJgsWPACqgyCQyIEHaJ5GDyWgNLIv0VRjjwdMRfQNJQCIvyUFPaAxvQAA
|
||||
AABJRU5ErkJggg==" style="fill:black; stroke:black; font-weight:normal;" height="16" preserveAspectRatio="none" />
|
||||
<text x="29" y="557" style="fill:black; stroke:none; font-weight:normal;" xml:space="preserve"> codegen(in ClassFile, in CodeAttribute, in Expr, in boolean, in Menge): void</text>
|
||||
<rect x="10" y="562" width="380" style="stroke:none; font-weight:normal;" height="16" />
|
||||
<image x="10" y="562" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAYUlEQVR42mP8//8/
|
||||
AymAiYFEMAg1sGAKOTQ4wNkHGg4Q0ABUneCggOAmOBxYcACnk9BUg0QcFIBCgyeU
|
||||
HjwgpAEYJgsWPACqgyCQyIEHaJ5GDyWgNLIv0VRjjwdMRfQNJQCIvyUFPaAxvQAA
|
||||
AABJRU5ErkJggg==" style="fill:black; stroke:black; font-weight:normal;" height="16" preserveAspectRatio="none" />
|
||||
<text x="29" y="575" style="fill:black; stroke:none; font-weight:normal;" xml:space="preserve"> if_codegen(in ClassFile, in CodeAttribute, in String, in boolean): void</text>
|
||||
<image x="157" y="508" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAA7ElEQVR42q2SXXUE
|
||||
IQyF09kVMBIiAQmRMBIioRIioRKQEgkjAQk4mF42wMzu6UN7ujl5APL3ceHjOA4a
|
||||
lj1nd7qYiqjo9eQ+V2KPAJdrGPVwtzxPljMbqc/ZvZ5L7zUngOScw2zSt+bqpUza
|
||||
YFtibvSObC8uWczzrER03u1+nS+sj8Yt5iVLPifTGLXQH+1/BcBoSCKBhzsPHibm
|
||||
WN7MjKjue6W1lgp3TZ+aVDhBJZy0rL3qtiVO/dLQa4oAHSHRE0RrT/O9O1J7SwQK
|
||||
v6b6iA4LpPg2W2eDQ0P4uoLkS+3nvxRsL1/t3bL+xr4BXAV0uUgPznkAAAAASUVO
|
||||
RK5CYII=" style="fill:black; stroke:black;" height="16" preserveAspectRatio="none" />
|
||||
<text x="176" y="520" style="fill:black; stroke:none;" xml:space="preserve">GreaterOp</text>
|
||||
<rect x="1594" y="325" width="400" style="fill:rgb(191,191,191); stroke:none;" height="64" />
|
||||
<rect x="1593" y="324" width="400" style="fill:rgb(127,127,127); stroke:none;" height="64" />
|
||||
<rect x="1592" y="323" width="400" style="fill:rgb(63,63,63); stroke:none;" height="64" />
|
||||
<rect x="1591" y="322" width="400" style="stroke:none;" height="64" />
|
||||
<rect x="1591" y="322" width="399" style="fill:none; stroke:black;" height="63" />
|
||||
<line x1="1591" x2="1990" y1="348" style="fill:none; stroke:black;" y2="348" />
|
||||
<line x1="1591" x2="1990" y1="358" style="fill:none; stroke:black;" y2="358" />
|
||||
<rect x="1601" y="363" width="380" style="stroke:none; font-weight:normal;" height="16" />
|
||||
<image x="1601" y="363" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAYUlEQVR42mP8//8/
|
||||
AymAiYFEMAg1sGAKOTQ4wNkHGg4Q0ABUneCggOAmOBxYcACnk9BUg0QcFIBCgyeU
|
||||
HjwgpAEYJgsWPACqgyCQyIEHaJ5GDyWgNLIv0VRjjwdMRfQNJQCIvyUFPaAxvQAA
|
||||
AABJRU5ErkJggg==" style="fill:black; stroke:black; font-weight:normal;" height="16" preserveAspectRatio="none" />
|
||||
<text x="1620" y="376" style="fill:black; stroke:none; font-weight:normal;" xml:space="preserve"> codegen(in ClassFile, in CodeAttribute, in Expr, in boolean, in Menge): void</text>
|
||||
<image x="1752" y="327" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAA7ElEQVR42q2SXXUE
|
||||
IQyF09kVMBIiAQmRMBIioRIioRKQEgkjAQk4mF42wMzu6UN7ujl5APL3ceHjOA4a
|
||||
lj1nd7qYiqjo9eQ+V2KPAJdrGPVwtzxPljMbqc/ZvZ5L7zUngOScw2zSt+bqpUza
|
||||
YFtibvSObC8uWczzrER03u1+nS+sj8Yt5iVLPifTGLXQH+1/BcBoSCKBhzsPHibm
|
||||
WN7MjKjue6W1lgp3TZ+aVDhBJZy0rL3qtiVO/dLQa4oAHSHRE0RrT/O9O1J7SwQK
|
||||
v6b6iA4LpPg2W2eDQ0P4uoLkS+3nvxRsL1/t3bL+xr4BXAV0uUgPznkAAAAASUVO
|
||||
RK5CYII=" style="fill:black; stroke:black;" height="16" preserveAspectRatio="none" />
|
||||
<text x="1771" y="339" style="fill:black; stroke:none;" xml:space="preserve">DivideOp</text>
|
||||
<rect x="2673" y="461" width="400" style="fill:rgb(191,191,191); stroke:none;" height="64" />
|
||||
<rect x="2672" y="460" width="400" style="fill:rgb(127,127,127); stroke:none;" height="64" />
|
||||
<rect x="2671" y="459" width="400" style="fill:rgb(63,63,63); stroke:none;" height="64" />
|
||||
<rect x="2670" y="458" width="400" style="stroke:none;" height="64" />
|
||||
<rect x="2670" y="458" width="399" style="fill:none; stroke:black;" height="63" />
|
||||
<line x1="2670" x2="3069" y1="484" style="fill:none; stroke:black;" y2="484" />
|
||||
<line x1="2670" x2="3069" y1="494" style="fill:none; stroke:black;" y2="494" />
|
||||
<rect x="2680" y="499" width="380" style="stroke:none; font-weight:normal;" height="16" />
|
||||
<image x="2680" y="499" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAYUlEQVR42mP8//8/
|
||||
AymAiYFEMAg1sGAKOTQ4wNkHGg4Q0ABUneCggOAmOBxYcACnk9BUg0QcFIBCgyeU
|
||||
HjwgpAEYJgsWPACqgyCQyIEHaJ5GDyWgNLIv0VRjjwdMRfQNJQCIvyUFPaAxvQAA
|
||||
AABJRU5ErkJggg==" style="fill:black; stroke:black; font-weight:normal;" height="16" preserveAspectRatio="none" />
|
||||
<text x="2699" y="512" style="fill:black; stroke:none; font-weight:normal;" xml:space="preserve"> codegen(in ClassFile, in CodeAttribute, in Expr, in boolean, in Menge): void</text>
|
||||
<image x="2837" y="463" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAA7ElEQVR42q2SXXUE
|
||||
IQyF09kVMBIiAQmRMBIioRIioRKQEgkjAQk4mF42wMzu6UN7ujl5APL3ceHjOA4a
|
||||
lj1nd7qYiqjo9eQ+V2KPAJdrGPVwtzxPljMbqc/ZvZ5L7zUngOScw2zSt+bqpUza
|
||||
YFtibvSObC8uWczzrER03u1+nS+sj8Yt5iVLPifTGLXQH+1/BcBoSCKBhzsPHibm
|
||||
WN7MjKjue6W1lgp3TZ+aVDhBJZy0rL3qtiVO/dLQa4oAHSHRE0RrT/O9O1J7SwQK
|
||||
v6b6iA4LpPg2W2eDQ0P4uoLkS+3nvxRsL1/t3bL+xr4BXAV0uUgPznkAAAAASUVO
|
||||
RK5CYII=" style="fill:black; stroke:black;" height="16" preserveAspectRatio="none" />
|
||||
<text x="2856" y="475" style="fill:black; stroke:none;" xml:space="preserve">PlusOp</text>
|
||||
<rect x="2181" y="187" width="81" style="fill:rgb(191,191,191); stroke:none;" height="26" />
|
||||
<rect x="2180" y="186" width="81" style="fill:rgb(127,127,127); stroke:none;" height="26" />
|
||||
<rect x="2179" y="185" width="81" style="fill:rgb(63,63,63); stroke:none;" height="26" />
|
||||
<rect x="2178" y="184" width="81" style="stroke:none;" height="26" />
|
||||
<rect x="2178" y="184" width="80" style="fill:none; stroke:black;" height="25" />
|
||||
<image x="2188" y="189" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAABBElEQVR42q1SYZnD
|
||||
IAylWwVUQiTgYJFQCZmDOVjOwSREwiREQqdgSMBBFwajcLu7/bl8+fpR8l7egzCs
|
||||
6+peISqi6pogREIavob1XGC7WkOmhIbQZkYf7gf7dgRDF9BPobLJjtnJpgPAWH5Z
|
||||
6Z28Z+aTXHLvjNagdKUQHSNnP3IViHC8HW1nbNkI9GycDGgwHWr95GPs3J9h7b+t
|
||||
PxDa4+Z1Z8lsICAjmqtsDwVTIUCqspRDOxeXJbophmip5E/kCcHbLdlOIiyR5tmD
|
||||
Lwo2nTpgDaF0rWHtIWG6wSU5KzylO6i6amabw+vZzMWbpU3FcprMyYW4bTL2T42q
|
||||
9G/x4Vr/gfAAzgaEraDyPpwAAAAASUVORK5CYII=" style="fill:black; stroke:black;" height="16" preserveAspectRatio="none" />
|
||||
<text x="2207" y="201" style="fill:black; stroke:none;" xml:space="preserve">MulOp</text>
|
||||
<rect x="898" y="144" width="542" style="fill:rgb(191,191,191); stroke:none;" height="136" />
|
||||
<rect x="897" y="143" width="542" style="fill:rgb(127,127,127); stroke:none;" height="136" />
|
||||
<rect x="896" y="142" width="542" style="fill:rgb(63,63,63); stroke:none;" height="136" />
|
||||
<rect x="895" y="141" width="542" style="stroke:none;" height="136" />
|
||||
<rect x="895" y="141" width="541" style="fill:none; stroke:black;" height="135" />
|
||||
<line x1="895" x2="1436" y1="167" style="fill:none; stroke:black;" y2="167" />
|
||||
<line x1="895" x2="1436" y1="177" style="fill:none; stroke:black;" y2="177" />
|
||||
<rect x="905" y="182" width="522" style="stroke:none; font-weight:normal;" height="16" />
|
||||
<image x="905" y="182" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAYUlEQVR42mP8//8/
|
||||
AymAiYFEMAg1sGAKOTQ4wNkHGg4Q0ABUneCggOAmOBxYcACnk9BUg0QcFIBCgyeU
|
||||
HjwgpAEYJgsWPACqgyCQyIEHaJ5GDyWgNLIv0VRjjwdMRfQNJQCIvyUFPaAxvQAA
|
||||
AABJRU5ErkJggg==" style="fill:black; stroke:black; font-weight:normal;" height="16" preserveAspectRatio="none" />
|
||||
<text x="924" y="195" style="fill:black; stroke:none; font-weight:normal;" xml:space="preserve"> codegen(in ClassFile, in CodeAttribute, in Expr, in boolean, in Menge): void</text>
|
||||
<rect x="905" y="200" width="522" style="stroke:none; font-weight:normal;" height="16" />
|
||||
<image x="905" y="200" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAYUlEQVR42mP8//8/
|
||||
AymAiYFEMAg1sGAKOTQ4wNkHGg4Q0ABUneCggOAmOBxYcACnk9BUg0QcFIBCgyeU
|
||||
HjwgpAEYJgsWPACqgyCQyIEHaJ5GDyWgNLIv0VRjjwdMRfQNJQCIvyUFPaAxvQAA
|
||||
AABJRU5ErkJggg==" style="fill:black; stroke:black; font-weight:normal;" height="16" preserveAspectRatio="none" />
|
||||
<text x="924" y="213" style="fill:black; stroke:none; font-weight:normal;" xml:space="preserve"> if_codegen(in ClassFile, in CodeAttribute, in boolean, in Expr, in Statement, in Statement, in Menge): void</text>
|
||||
<rect x="905" y="218" width="522" style="stroke:none; font-weight:normal;" height="16" />
|
||||
<image x="905" y="218" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAYUlEQVR42mP8//8/
|
||||
AymAiYFEMAg1sGAKOTQ4wNkHGg4Q0ABUneCggOAmOBxYcACnk9BUg0QcFIBCgyeU
|
||||
HjwgpAEYJgsWPACqgyCQyIEHaJ5GDyWgNLIv0VRjjwdMRfQNJQCIvyUFPaAxvQAA
|
||||
AABJRU5ErkJggg==" style="fill:black; stroke:black; font-weight:normal;" height="16" preserveAspectRatio="none" />
|
||||
<text x="924" y="231" style="fill:black; stroke:none; font-weight:normal;" xml:space="preserve"> loop_codegen(in ClassFile, in CodeAttribute, in Expr, in int, in boolean, in Menge): void</text>
|
||||
<rect x="905" y="236" width="522" style="stroke:none; font-weight:normal;" height="16" />
|
||||
<image x="905" y="236" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAjUlEQVR42rWR2w2A
|
||||
IAxFrXEQN5FNZJPiJozSUdikXiEhRNDGD5sSoJybPiBVnd6N6Mg7Y6nOk2WgWRVe
|
||||
ZLagGudaFptDEqJaki0AxKU2Ih5mcMHVswS5uGYwS097tz6WdBP0dIhe9k2i1MiH
|
||||
Kf0gSMkSYCYxJnDFr4iktoHBlPCMxtvrDRj8Qw/91vTQThWRPIE1rC5kAAAAAElF
|
||||
TkSuQmCC" style="fill:black; stroke:black; font-weight:normal;" height="16" preserveAspectRatio="none" />
|
||||
<text x="924" y="249" style="fill:black; stroke:none; font-weight:normal;" xml:space="preserve"> replace_index(in CodeAttribute, in Menge, in int, in int): void</text>
|
||||
<rect x="905" y="254" width="522" style="stroke:none; font-weight:normal;" height="16" />
|
||||
<image x="905" y="254" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAjUlEQVR42rWR2w2A
|
||||
IAxFrXEQN5FNZJPiJozSUdikXiEhRNDGD5sSoJybPiBVnd6N6Mg7Y6nOk2WgWRVe
|
||||
ZLagGudaFptDEqJaki0AxKU2Ih5mcMHVswS5uGYwS097tz6WdBP0dIhe9k2i1MiH
|
||||
Kf0gSMkSYCYxJnDFr4iktoHBlPCMxtvrDRj8Qw/91vTQThWRPIE1rC5kAAAAAElF
|
||||
TkSuQmCC" style="fill:black; stroke:black; font-weight:normal;" height="16" preserveAspectRatio="none" />
|
||||
<text x="924" y="267" style="fill:black; stroke:none; font-weight:normal;" xml:space="preserve"> build(in ClassFile, in CodeAttribute, in Expr, in Menge, in boolean, in boolean, in boolean, in Menge): void</text>
|
||||
<image x="1135" y="146" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAABBElEQVR42q1SYZnD
|
||||
IAylWwVUQiTgYJFQCZmDOVjOwSREwiREQqdgSMBBFwajcLu7/bl8+fpR8l7egzCs
|
||||
6+peISqi6pogREIavob1XGC7WkOmhIbQZkYf7gf7dgRDF9BPobLJjtnJpgPAWH5Z
|
||||
6Z28Z+aTXHLvjNagdKUQHSNnP3IViHC8HW1nbNkI9GycDGgwHWr95GPs3J9h7b+t
|
||||
PxDa4+Z1Z8lsICAjmqtsDwVTIUCqspRDOxeXJbophmip5E/kCcHbLdlOIiyR5tmD
|
||||
Lwo2nTpgDaF0rWHtIWG6wSU5KzylO6i6amabw+vZzMWbpU3FcprMyYW4bTL2T42q
|
||||
9G/x4Vr/gfAAzgaEraDyPpwAAAAASUVORK5CYII=" style="fill:black; stroke:black;" height="16" preserveAspectRatio="none" />
|
||||
<text x="1154" y="158" style="fill:black; stroke:none;" xml:space="preserve">LogOp</text>
|
||||
<rect x="981" y="3" width="400" style="fill:rgb(191,191,191); stroke:none;" height="64" />
|
||||
<rect x="980" y="2" width="400" style="fill:rgb(127,127,127); stroke:none;" height="64" />
|
||||
<rect x="979" y="1" width="400" style="fill:rgb(63,63,63); stroke:none;" height="64" />
|
||||
<rect x="978" y="0" width="400" style="stroke:none;" height="64" />
|
||||
<rect x="978" y="0" width="399" style="fill:none; stroke:black;" height="63" />
|
||||
<line x1="978" x2="1377" y1="26" style="fill:none; stroke:black;" y2="26" />
|
||||
<line x1="978" x2="1377" y1="36" style="fill:none; stroke:black;" y2="36" />
|
||||
<rect x="988" y="41" width="380" style="stroke:none; font-weight:normal;" height="16" />
|
||||
<image x="988" y="41" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAiklEQVR42rVRgQ2A
|
||||
IAwDwiF+4k7hE/WTnbJP3CdYoyEoqJjoQsiAdrSbjTGap7CTjcMOcy3ofu6xtxIQ
|
||||
wpLyJkIerkUPBUqqfAmikXYlo+R66gSgA3XpiMKn3OZtPaEDcfm/vzHAElSNiP7W
|
||||
JZR/IKAtzArcttabo56KBzzDeHXGl6ZL0ItJf0BYALD3PkMWvNRAAAAAAElFTkSu
|
||||
QmCC" style="fill:black; stroke:black; font-weight:normal;" height="16" preserveAspectRatio="none" />
|
||||
<text x="1007" y="54" style="fill:black; stroke:none; font-weight:normal;" xml:space="preserve"> codegen(in ClassFile, in CodeAttribute, in Expr, in boolean, in Menge): void</text>
|
||||
<image x="1140" y="5" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAABBElEQVR42q1SYZnD
|
||||
IAylWwVUQiTgYJFQCZmDOVjOwSREwiREQqdgSMBBFwajcLu7/bl8+fpR8l7egzCs
|
||||
6+peISqi6pogREIavob1XGC7WkOmhIbQZkYf7gf7dgRDF9BPobLJjtnJpgPAWH5Z
|
||||
6Z28Z+aTXHLvjNagdKUQHSNnP3IViHC8HW1nbNkI9GycDGgwHWr95GPs3J9h7b+t
|
||||
PxDa4+Z1Z8lsICAjmqtsDwVTIUCqspRDOxeXJbophmip5E/kCcHbLdlOIiyR5tmD
|
||||
Lwo2nTpgDaF0rWHtIWG6wSU5KzylO6i6amabw+vZzMWbpU3FcprMyYW4bTL2T42q
|
||||
9G/x4Vr/gfAAzgaEraDyPpwAAAAASUVORK5CYII=" style="fill:black; stroke:black;" height="16" preserveAspectRatio="none" />
|
||||
<text x="1159" y="17" style="fill:black; stroke:none;" xml:space="preserve">Operator</text>
|
||||
<rect x="1749" y="514" width="400" style="fill:rgb(191,191,191); stroke:none;" height="82" />
|
||||
<rect x="1748" y="513" width="400" style="fill:rgb(127,127,127); stroke:none;" height="82" />
|
||||
<rect x="1747" y="512" width="400" style="fill:rgb(63,63,63); stroke:none;" height="82" />
|
||||
<rect x="1746" y="511" width="400" style="stroke:none;" height="82" />
|
||||
<rect x="1746" y="511" width="399" style="fill:none; stroke:black;" height="81" />
|
||||
<line x1="1746" x2="2145" y1="537" style="fill:none; stroke:black;" y2="537" />
|
||||
<line x1="1746" x2="2145" y1="547" style="fill:none; stroke:black;" y2="547" />
|
||||
<rect x="1756" y="552" width="380" style="stroke:none; font-weight:normal;" height="16" />
|
||||
<image x="1756" y="552" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAYUlEQVR42mP8//8/
|
||||
AymAiYFEMAg1sGAKOTQ4wNkHGg4Q0ABUneCggOAmOBxYcACnk9BUg0QcFIBCgyeU
|
||||
HjwgpAEYJgsWPACqgyCQyIEHaJ5GDyWgNLIv0VRjjwdMRfQNJQCIvyUFPaAxvQAA
|
||||
AABJRU5ErkJggg==" style="fill:black; stroke:black; font-weight:normal;" height="16" preserveAspectRatio="none" />
|
||||
<text x="1775" y="565" style="fill:black; stroke:none; font-weight:normal;" xml:space="preserve"> codegen(in ClassFile, in CodeAttribute, in Expr, in boolean, in Menge): void</text>
|
||||
<rect x="1756" y="570" width="380" style="stroke:none; font-weight:normal;" height="16" />
|
||||
<image x="1756" y="570" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAYUlEQVR42mP8//8/
|
||||
AymAiYFEMAg1sGAKOTQ4wNkHGg4Q0ABUneCggOAmOBxYcACnk9BUg0QcFIBCgyeU
|
||||
HjwgpAEYJgsWPACqgyCQyIEHaJ5GDyWgNLIv0VRjjwdMRfQNJQCIvyUFPaAxvQAA
|
||||
AABJRU5ErkJggg==" style="fill:black; stroke:black; font-weight:normal;" height="16" preserveAspectRatio="none" />
|
||||
<text x="1775" y="583" style="fill:black; stroke:none; font-weight:normal;" xml:space="preserve"> if_codegen(in ClassFile, in CodeAttribute, in String, in boolean): void</text>
|
||||
<image x="1901" y="516" width="16" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAA7ElEQVR42q2SXXUE
|
||||
IQyF09kVMBIiAQmRMBIioRIioRKQEgkjAQk4mF42wMzu6UN7ujl5APL3ceHjOA4a
|
||||
lj1nd7qYiqjo9eQ+V2KPAJdrGPVwtzxPljMbqc/ZvZ5L7zUngOScw2zSt+bqpUza
|
||||
YFtibvSObC8uWczzrER03u1+nS+sj8Yt5iVLPifTGLXQH+1/BcBoSCKBhzsPHibm
|
||||
WN7MjKjue6W1lgp3TZ+aVDhBJZy0rL3qtiVO/dLQa4oAHSHRE0RrT/O9O1J7SwQK
|
||||
v6b6iA4LpPg2W2eDQ0P4uoLkS+3nvxRsL1/t3bL+xr4BXAV0uUgPznkAAAAASUVO
|
||||
RK5CYII=" style="fill:black; stroke:black;" height="16" preserveAspectRatio="none" />
|
||||
<text x="1920" y="528" style="fill:black; stroke:none;" xml:space="preserve">LessEquOp</text>
|
||||
<path d="M588 128 L588 108 L1179 108 L1179 67" style="fill:none; stroke:black;" />
|
||||
<polygon style="stroke:none;" points=" 1179 67 1185 91 1173 91" />
|
||||
<polygon style="fill:none; stroke:black;" points=" 1179 67 1185 91 1173 91" />
|
||||
<path d="M2220 184 L2220 108 L1179 108" style="fill:none; stroke:black;" />
|
||||
<path d="M1167 141 L1167 108 L1179 108" style="fill:none; stroke:black;" />
|
||||
<path d="M3121 179 L3121 108 L1179 108" style="fill:none; stroke:black;" />
|
||||
<path d="M201 503 L201 483 L588 483 L588 195" style="fill:none; stroke:black;" />
|
||||
<polygon style="stroke:none;" points=" 588 195 594 219 582 219" />
|
||||
<polygon style="fill:none; stroke:black;" points=" 588 195 594 219 582 219" />
|
||||
<path d="M640 504 L640 483 L588 483" style="fill:none; stroke:black;" />
|
||||
<path d="M1070 505 L1070 483 L588 483" style="fill:none; stroke:black;" />
|
||||
<path d="M1501 509 L1501 483 L588 483" style="fill:none; stroke:black;" />
|
||||
<path d="M1947 511 L1947 483 L588 483" style="fill:none; stroke:black;" />
|
||||
<path d="M2383 512 L2383 483 L588 483" style="fill:none; stroke:black;" />
|
||||
<path d="M3350 452 L3350 438 L3121 438" style="fill:none; stroke:black;" />
|
||||
<path d="M1358 375 L1358 347 L1167 347" style="fill:none; stroke:black;" />
|
||||
<path d="M961 367 L961 347 L1167 347 L1167 280" style="fill:none; stroke:black;" />
|
||||
<polygon style="stroke:none;" points=" 1167 280 1173 304 1161 304" />
|
||||
<polygon style="fill:none; stroke:black;" points=" 1167 280 1173 304 1161 304" />
|
||||
<path d="M2225 322 L2225 302 L2220 302" style="fill:none; stroke:black;" />
|
||||
<path d="M2871 458 L2871 438 L3121 438 L3121 246" style="fill:none; stroke:black;" />
|
||||
<polygon style="stroke:none;" points=" 3121 246 3127 270 3115 270" />
|
||||
<polygon style="fill:none; stroke:black;" points=" 3121 246 3127 270 3115 270" />
|
||||
<path d="M2658 322 L2658 302 L2220 302" style="fill:none; stroke:black;" />
|
||||
<path d="M1792 322 L1792 302 L2220 302 L2220 213" style="fill:none; stroke:black;" />
|
||||
<polygon style="stroke:none;" points=" 2220 213 2226 237 2214 237" />
|
||||
<polygon style="fill:none; stroke:black;" points=" 2220 213 2226 237 2214 237" />
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 42 KiB After Width: | Height: | Size: 42 KiB |
Before Width: | Height: | Size: 195 KiB After Width: | Height: | Size: 193 KiB |
Before Width: | Height: | Size: 187 KiB After Width: | Height: | Size: 185 KiB |
@ -3,8 +3,11 @@
|
||||
*/
|
||||
package de.dhbwstuttgart.bytecode.simplifyRes;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import com.google.common.collect.Collections2;
|
||||
|
||||
/**
|
||||
* @author fayez
|
||||
*
|
||||
@ -12,7 +15,9 @@ import java.util.List;
|
||||
public class GenericGeneratorResultsForAllMethods {
|
||||
private final List<MethodAndConstraints> methodsAndConstraints;
|
||||
|
||||
|
||||
public GenericGeneratorResultsForAllMethods() {
|
||||
this(Collections.emptyList());
|
||||
}
|
||||
/**
|
||||
* @param methodsAndConstraints
|
||||
*/
|
||||
|
@ -40,9 +40,11 @@ public class GenericGenratorResultForSourceFile {
|
||||
public GenericsGeneratorResultForClass getSimplifyResultsByName(String pkgName, String name) {
|
||||
|
||||
if (this.pkgName.equals(pkgName)) {
|
||||
return genericGeneratorResultForAllClasses.stream().filter(sr -> sr.getClassName().equals(name)).findAny()
|
||||
.orElseThrow(() -> new NoSuchElementException(
|
||||
"Simplify results for the class " + pkgName + "." + name + " are not found"));
|
||||
return genericGeneratorResultForAllClasses
|
||||
.stream()
|
||||
.filter(sr -> sr.getClassName().equals(name))
|
||||
.findAny()
|
||||
.orElse(new GenericsGeneratorResultForClass(name));
|
||||
}
|
||||
throw new NoSuchElementException("Simplify results for the class " + pkgName + "." + name + " are not found");
|
||||
}
|
||||
|
@ -3,6 +3,7 @@
|
||||
*/
|
||||
package de.dhbwstuttgart.bytecode.simplifyRes;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@ -14,6 +15,9 @@ public class GenericsGeneratorResultForClass {
|
||||
private final List<GenericsGeneratorResult> classConstraints;
|
||||
private final GenericGeneratorResultsForAllMethods methodsAndTheirConstraints;
|
||||
|
||||
public GenericsGeneratorResultForClass(String className) {
|
||||
this(className, Collections.emptyList(), new GenericGeneratorResultsForAllMethods());
|
||||
}
|
||||
/**
|
||||
* @param className
|
||||
* @param classConstraints
|
||||
@ -52,6 +56,9 @@ public class GenericsGeneratorResultForClass {
|
||||
.anyMatch(i -> i.equals(id));
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public List<GenericsGeneratorResult> getMethodConstraintsByID(String id) {
|
||||
return methodsAndTheirConstraints.getMethodsAndConstraints().stream().filter(mc -> mc.getMethodID().equals(id))
|
||||
.findFirst().get().getConstraints();
|
||||
|
@ -59,43 +59,64 @@ import org.apache.commons.io.output.NullOutputStream;
|
||||
|
||||
public class JavaTXCompiler {
|
||||
|
||||
final CompilationEnvironment environment;
|
||||
Boolean resultmodel = true;
|
||||
public final Map<File, SourceFile> sourceFiles = new HashMap<>();
|
||||
Boolean log = true; // gibt an ob ein Log-File nach
|
||||
// System.getProperty("user.dir")+"src/test/java/logFiles" geschrieben werden
|
||||
// soll?
|
||||
public volatile UnifyTaskModel usedTasks = new UnifyTaskModel();
|
||||
public static JavaTXCompiler INSTANCE;
|
||||
final CompilationEnvironment environment;
|
||||
Boolean resultmodel = true;
|
||||
public final Map<File, SourceFile> sourceFiles = new HashMap<>();
|
||||
Boolean log = true; //gibt an ob ein Log-File nach System.getProperty("user.dir")+"src/test/java/logFiles" geschrieben werden soll?
|
||||
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 {
|
||||
this(Arrays.asList(sourceFile));
|
||||
}
|
||||
public JavaTXCompiler(File sourceFile, Boolean log) throws IOException, ClassNotFoundException {
|
||||
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 {
|
||||
this(sourceFile);
|
||||
this.log = log;
|
||||
}
|
||||
public ConstraintSet<Pair> getConstraints() throws ClassNotFoundException {
|
||||
List<ClassOrInterface> allClasses = new ArrayList<>();//environment.getAllAvailableClasses();
|
||||
for (SourceFile sf : sourceFiles.values()) {
|
||||
allClasses.addAll(sf.getClasses());
|
||||
}
|
||||
List<ClassOrInterface> importedClasses = new ArrayList<>();
|
||||
//Alle Importierten Klassen in allen geparsten Sourcefiles kommen ins FC
|
||||
for (File forSourceFile : sourceFiles.keySet())
|
||||
for (JavaClassName name : sourceFiles.get(forSourceFile).getImports()) {
|
||||
//TODO: Hier werden imports von eigenen (.jav) Klassen nicht beachtet
|
||||
ClassOrInterface importedClass = ASTFactory.createClass(
|
||||
ClassLoader.getSystemClassLoader().loadClass(name.toString()));
|
||||
importedClasses.add(importedClass);
|
||||
}
|
||||
allClasses.addAll(importedClasses);
|
||||
|
||||
public JavaTXCompiler(List<File> sources) throws IOException, ClassNotFoundException {
|
||||
environment = new CompilationEnvironment(sources);
|
||||
for (File s : sources) {
|
||||
sourceFiles.put(s, parse(s));
|
||||
}
|
||||
}
|
||||
return new TYPE(sourceFiles.values(), allClasses).getConstraints();
|
||||
}
|
||||
|
||||
public ConstraintSet<Pair> getConstraints() throws ClassNotFoundException {
|
||||
List<ClassOrInterface> allClasses = new ArrayList<>();// environment.getAllAvailableClasses();
|
||||
for (SourceFile sf : sourceFiles.values()) {
|
||||
allClasses.addAll(sf.getClasses());
|
||||
}
|
||||
List<ClassOrInterface> importedClasses = new ArrayList<>();
|
||||
// Alle Importierten Klassen in allen geparsten Sourcefiles kommen ins FC
|
||||
for (File forSourceFile : sourceFiles.keySet())
|
||||
for (JavaClassName name : sourceFiles.get(forSourceFile).getImports()) {
|
||||
// TODO: Hier werden imports von eigenen (.jav) Klassen nicht beachtet
|
||||
ClassOrInterface importedClass = ASTFactory
|
||||
.createClass(ClassLoader.getSystemClassLoader().loadClass(name.toString()));
|
||||
importedClasses.add(importedClass);
|
||||
public List<ClassOrInterface> getAvailableClasses(SourceFile forSourceFile) throws ClassNotFoundException {
|
||||
//PL 2018-09-18: List durch Set ersetzt, damit die Klassen nur einmal hinzugefuegt werden
|
||||
//List<ClassOrInterface> allClasses = new ArrayList<>();//environment.getAllAvailableClasses();
|
||||
Set<ClassOrInterface> allClasses = new HashSet<>();
|
||||
|
||||
/* PL 2018-09-19 geloescht werden bereits in typeInference hinzugefuegt
|
||||
}
|
||||
allClasses.addAll(importedClasses);
|
||||
|
||||
@ -711,6 +732,20 @@ public class JavaTXCompiler {
|
||||
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()
|
||||
throws ClassNotFoundException {
|
||||
List<GenericGenratorResultForSourceFile> result = new ArrayList<>();
|
||||
|
@ -2,6 +2,10 @@ package de.dhbwstuttgart.syntaxtree;
|
||||
|
||||
import org.antlr.v4.runtime.Token;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
|
||||
import de.dhbwstuttgart.parser.NullToken;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
|
||||
@ -15,11 +19,21 @@ public class GenericDeclarationList extends SyntaxTreeNode implements Iterable<G
|
||||
|
||||
private Token offsetOfLastElement;
|
||||
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);
|
||||
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
|
||||
|
@ -1,24 +1,24 @@
|
||||
package de.dhbwstuttgart.syntaxtree.statement;
|
||||
import java.util.List;
|
||||
|
||||
import de.dhbwstuttgart.syntaxtree.StatementVisitor;
|
||||
import de.dhbwstuttgart.syntaxtree.type.RefTypeOrTPHOrWildcardOrGeneric;
|
||||
import de.dhbwstuttgart.typeinference.assumptions.TypeInferenceBlockInformation;
|
||||
import de.dhbwstuttgart.typeinference.constraints.ConstraintSet;
|
||||
import de.dhbwstuttgart.exceptions.NotImplementedException;
|
||||
|
||||
|
||||
public class NewArray extends Expression
|
||||
{
|
||||
public NewArray(int offset,int variableLength)
|
||||
{
|
||||
super(null,null);
|
||||
}
|
||||
private RefTypeOrTPHOrWildcardOrGeneric type;
|
||||
public List<Expression> expr;
|
||||
|
||||
@Override
|
||||
public void accept(StatementVisitor visitor) {
|
||||
visitor.visit(this);
|
||||
}
|
||||
}
|
||||
package de.dhbwstuttgart.syntaxtree.statement;
|
||||
import java.util.List;
|
||||
|
||||
import de.dhbwstuttgart.syntaxtree.StatementVisitor;
|
||||
import de.dhbwstuttgart.syntaxtree.type.RefTypeOrTPHOrWildcardOrGeneric;
|
||||
import de.dhbwstuttgart.typeinference.assumptions.TypeInferenceBlockInformation;
|
||||
import de.dhbwstuttgart.typeinference.constraints.ConstraintSet;
|
||||
import de.dhbwstuttgart.exceptions.NotImplementedException;
|
||||
|
||||
|
||||
public class NewArray extends Expression
|
||||
{
|
||||
public NewArray(int offset,int variableLength)
|
||||
{
|
||||
super(null,null);
|
||||
}
|
||||
private RefTypeOrTPHOrWildcardOrGeneric type;
|
||||
public List<Expression> expr;
|
||||
|
||||
@Override
|
||||
public void accept(StatementVisitor visitor) {
|
||||
visitor.visit(this);
|
||||
}
|
||||
}
|
||||
|
@ -1,11 +1,37 @@
|
||||
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.statement.NewArray;
|
||||
import de.dhbwstuttgart.syntaxtree.type.*;
|
||||
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.Map.Entry;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import javax.print.DocFlavor.STRING;
|
||||
import javax.security.auth.kerberos.KerberosKey;
|
||||
|
||||
/**
|
||||
* TODO:
|
||||
@ -29,62 +55,90 @@ public class TypeInsertFactory {
|
||||
|
||||
public static TypeInsert createInsertPoints(RefTypeOrTPHOrWildcardOrGeneric type, Token offset, ClassOrInterface cl, Method m,
|
||||
ResultSet resultSet) {
|
||||
ResolvedType resolvedType = resultSet.resolveType(type);
|
||||
TypeInsertPoint insertPoint = new TypeInsertPoint(offset,
|
||||
new TypeToInsertString(resolvedType.resolvedType).insert);
|
||||
return new TypeInsert(insertPoint, new HashSet<>(), resolvedType.getResultPair());
|
||||
|
||||
try {
|
||||
ResolvedType resolvedType = resultSet.resolveType(type);
|
||||
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){
|
||||
//Momentan wird Methode ignoriert. Parameter werden immer als Klassenparameter angefügt:
|
||||
//Offset zum Einstzen bestimmen:
|
||||
Token offset;
|
||||
String insert = "";
|
||||
String end;
|
||||
if(cl.getGenerics().iterator().hasNext()){
|
||||
//offset = cl.getGenerics().iterator().next().getOffset();
|
||||
offset = cl.getGenerics().getOffset();
|
||||
end=",";
|
||||
}else{
|
||||
offset = cl.getGenerics().getOffset();
|
||||
insert += "<";
|
||||
end = ">";
|
||||
private static synchronized Set<TypeInsertPoint> createGenericInsert(GenericsGeneratorResultForClass genericResult, ClassOrInterface cl, Method m, ResultSet resultSet){
|
||||
Set<TypeInsertPoint> result = createGenericClassInserts(genericResult, cl);
|
||||
|
||||
for (Method method : cl.getMethods()) {
|
||||
Resolver resolver = new Resolver(resultSet);
|
||||
List<GenericsGeneratorResult> methodConstraints = genericResult.getMethodConstraintsByID(MethodUtility.createID(resolver, method));
|
||||
createMethodConstraints(method, methodConstraints);
|
||||
}
|
||||
|
||||
//Alle einzusetzenden Generics und deren Bounds bestimmen:
|
||||
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);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
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{
|
||||
|
@ -1,73 +1,73 @@
|
||||
package de.dhbwstuttgart.typedeployment;
|
||||
|
||||
import de.dhbwstuttgart.exceptions.NotImplementedException;
|
||||
import de.dhbwstuttgart.syntaxtree.*;
|
||||
import de.dhbwstuttgart.syntaxtree.statement.JavaInternalExpression;
|
||||
import de.dhbwstuttgart.syntaxtree.statement.LambdaExpression;
|
||||
import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder;
|
||||
import de.dhbwstuttgart.typeinference.result.ResultSet;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
public class TypeInsertPlacer extends AbstractASTWalker{
|
||||
Set<TypeInsert> inserts = new HashSet<>();
|
||||
private ResultSet withResults;
|
||||
|
||||
public Set<TypeInsert> getTypeInserts(SourceFile forSourceFile, ResultSet withResults){
|
||||
this.withResults = withResults;
|
||||
forSourceFile.accept(this);
|
||||
return inserts;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void visit(ClassOrInterface classOrInterface) {
|
||||
TypeInsertPlacerClass cl = new TypeInsertPlacerClass(classOrInterface, withResults);
|
||||
this.inserts.addAll(cl.inserts);
|
||||
}
|
||||
}
|
||||
|
||||
class TypeInsertPlacerClass extends AbstractASTWalker{
|
||||
protected final ResultSet results;
|
||||
protected final ClassOrInterface cl;
|
||||
public final Set<TypeInsert> inserts = new HashSet<>();
|
||||
private Method method;
|
||||
|
||||
TypeInsertPlacerClass(ClassOrInterface forClass, ResultSet withResults){
|
||||
this.cl = forClass;
|
||||
this.method = null;
|
||||
this.results = withResults;
|
||||
forClass.accept(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void visit(Method method) {
|
||||
this.method = method;
|
||||
if(method.getReturnType() instanceof TypePlaceholder)
|
||||
inserts.add(TypeInsertFactory.createInsertPoints(
|
||||
method.getReturnType(), method.getReturnType().getOffset(), cl, method, results));
|
||||
super.visit(method);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void visit(Field field) {
|
||||
if(field.getType() instanceof TypePlaceholder){
|
||||
inserts.add(TypeInsertFactory.createInsertPoints(
|
||||
field.getType(), field.getType().getOffset(), cl, method, results));
|
||||
}
|
||||
super.visit(field);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void visit(FormalParameter param) {
|
||||
if(param.getType() instanceof TypePlaceholder)
|
||||
inserts.add(TypeInsertFactory.createInsertPoints(
|
||||
param.getType(), param.getType().getOffset(), cl, method, results));
|
||||
super.visit(param);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void visit(LambdaExpression lambdaExpression) {
|
||||
//Lambda-Ausdrücke brauchen keine Typeinsetzungen
|
||||
}
|
||||
}
|
||||
package de.dhbwstuttgart.typedeployment;
|
||||
|
||||
import de.dhbwstuttgart.exceptions.NotImplementedException;
|
||||
import de.dhbwstuttgart.syntaxtree.*;
|
||||
import de.dhbwstuttgart.syntaxtree.statement.JavaInternalExpression;
|
||||
import de.dhbwstuttgart.syntaxtree.statement.LambdaExpression;
|
||||
import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder;
|
||||
import de.dhbwstuttgart.typeinference.result.ResultSet;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
public class TypeInsertPlacer extends AbstractASTWalker{
|
||||
Set<TypeInsert> inserts = new HashSet<>();
|
||||
private ResultSet withResults;
|
||||
|
||||
public Set<TypeInsert> getTypeInserts(SourceFile forSourceFile, ResultSet withResults){
|
||||
this.withResults = withResults;
|
||||
forSourceFile.accept(this);
|
||||
return inserts;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void visit(ClassOrInterface classOrInterface) {
|
||||
TypeInsertPlacerClass cl = new TypeInsertPlacerClass(classOrInterface, withResults);
|
||||
this.inserts.addAll(cl.inserts);
|
||||
}
|
||||
}
|
||||
|
||||
class TypeInsertPlacerClass extends AbstractASTWalker{
|
||||
protected final ResultSet results;
|
||||
protected final ClassOrInterface cl;
|
||||
public final Set<TypeInsert> inserts = new HashSet<>();
|
||||
private Method method;
|
||||
|
||||
TypeInsertPlacerClass(ClassOrInterface forClass, ResultSet withResults){
|
||||
this.cl = forClass;
|
||||
this.method = null;
|
||||
this.results = withResults;
|
||||
forClass.accept(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void visit(Method method) {
|
||||
this.method = method;
|
||||
if(method.getReturnType() instanceof TypePlaceholder)
|
||||
inserts.add(TypeInsertFactory.createInsertPoints(
|
||||
method.getReturnType(), method.getReturnType().getOffset(), cl, method, results));
|
||||
super.visit(method);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void visit(Field field) {
|
||||
if(field.getType() instanceof TypePlaceholder){
|
||||
inserts.add(TypeInsertFactory.createInsertPoints(
|
||||
field.getType(), field.getType().getOffset(), cl, method, results));
|
||||
}
|
||||
super.visit(field);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void visit(FormalParameter param) {
|
||||
if(param.getType() instanceof TypePlaceholder)
|
||||
inserts.add(TypeInsertFactory.createInsertPoints(
|
||||
param.getType(), param.getType().getOffset(), cl, method, results));
|
||||
super.visit(param);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void visit(LambdaExpression lambdaExpression) {
|
||||
//Lambda-Ausdrücke brauchen keine Typeinsetzungen
|
||||
}
|
||||
}
|
||||
|
@ -1,59 +1,59 @@
|
||||
package de.dhbwstuttgart.typedeployment;
|
||||
|
||||
import org.antlr.v4.runtime.Token;
|
||||
|
||||
import de.dhbwstuttgart.typeinference.unify.model.ReferenceType;
|
||||
|
||||
import java.time.OffsetDateTime;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
public class TypeInsertPoint {
|
||||
public Token point;
|
||||
private String insertString;
|
||||
private int extraOffset = 0;
|
||||
|
||||
public TypeInsertPoint(Token point, String toInsert){
|
||||
this.point = point;
|
||||
this.insertString = (toInsert.endsWith(" ")) ? toInsert : toInsert + " " ;
|
||||
}
|
||||
|
||||
public String insert(String intoSource, List<TypeInsertPoint> additionalOffset){
|
||||
int offset = additionalOffset.stream().filter((token ->
|
||||
//token.point.getLine() != point.getLine() && token.point.getCharPositionInLine() <= point.getCharPositionInLine()))
|
||||
token.point.getStartIndex() <= point.getStartIndex()))
|
||||
.mapToInt((typeInsertPoint -> typeInsertPoint.insertString.length())).sum();
|
||||
return new StringBuilder(intoSource).insert(point.getStartIndex()+offset+extraOffset, insertString).toString();
|
||||
}
|
||||
|
||||
public String getInsertString() {
|
||||
return insertString;
|
||||
}
|
||||
|
||||
public void addExtraOffset(int toAdd) {
|
||||
this.extraOffset += toAdd;
|
||||
}
|
||||
|
||||
public int getPositionInCode() {
|
||||
return point.getStartIndex() + extraOffset;
|
||||
}
|
||||
|
||||
/* PL 2018-06-19
|
||||
* Zwei TypeInsertPoint's sind gleich, wenn ihre point's gleich sind
|
||||
* eingefuegt damit man TypeReplaceMarker vergleichen kann
|
||||
* @see java.lang.Object#equals(java.lang.Object)
|
||||
*/
|
||||
public boolean equals(Object obj) {
|
||||
if(!(obj instanceof TypeInsertPoint)) {
|
||||
return false;
|
||||
}
|
||||
else {
|
||||
return ((TypeInsertPoint)obj).point.equals(this.point) &&
|
||||
((TypeInsertPoint)obj).insertString.equals(this.insertString);
|
||||
}
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return point.toString() + " " + insertString.toString();
|
||||
}
|
||||
}
|
||||
package de.dhbwstuttgart.typedeployment;
|
||||
|
||||
import org.antlr.v4.runtime.Token;
|
||||
|
||||
import de.dhbwstuttgart.typeinference.unify.model.ReferenceType;
|
||||
|
||||
import java.time.OffsetDateTime;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
public class TypeInsertPoint {
|
||||
public Token point;
|
||||
private String insertString;
|
||||
private int extraOffset = 0;
|
||||
|
||||
public TypeInsertPoint(Token point, String toInsert){
|
||||
this.point = point;
|
||||
this.insertString = (toInsert.endsWith(" ")) ? toInsert : toInsert + " " ;
|
||||
}
|
||||
|
||||
public String insert(String intoSource, List<TypeInsertPoint> additionalOffset){
|
||||
int offset = additionalOffset.stream().filter((token ->
|
||||
//token.point.getLine() != point.getLine() && token.point.getCharPositionInLine() <= point.getCharPositionInLine()))
|
||||
token.point.getStartIndex() <= point.getStartIndex()))
|
||||
.mapToInt((typeInsertPoint -> typeInsertPoint.insertString.length())).sum();
|
||||
return new StringBuilder(intoSource).insert(point.getStartIndex()+offset+extraOffset, insertString).toString();
|
||||
}
|
||||
|
||||
public String getInsertString() {
|
||||
return insertString;
|
||||
}
|
||||
|
||||
public void addExtraOffset(int toAdd) {
|
||||
this.extraOffset += toAdd;
|
||||
}
|
||||
|
||||
public int getPositionInCode() {
|
||||
return point.getStartIndex() + extraOffset;
|
||||
}
|
||||
|
||||
/* PL 2018-06-19
|
||||
* Zwei TypeInsertPoint's sind gleich, wenn ihre point's gleich sind
|
||||
* eingefuegt damit man TypeReplaceMarker vergleichen kann
|
||||
* @see java.lang.Object#equals(java.lang.Object)
|
||||
*/
|
||||
public boolean equals(Object obj) {
|
||||
if(!(obj instanceof TypeInsertPoint)) {
|
||||
return false;
|
||||
}
|
||||
else {
|
||||
return ((TypeInsertPoint)obj).point.equals(this.point) &&
|
||||
((TypeInsertPoint)obj).insertString.equals(this.insertString);
|
||||
}
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return point.toString() + " " + insertString.toString();
|
||||
}
|
||||
}
|
||||
|
@ -1,62 +1,62 @@
|
||||
package de.dhbwstuttgart.typeinference.result;
|
||||
|
||||
import de.dhbwstuttgart.syntaxtree.type.RefTypeOrTPHOrWildcardOrGeneric;
|
||||
|
||||
/**
|
||||
* Paare, welche das Unifikationsergebnis darstellen
|
||||
*/
|
||||
public abstract class ResultPair<A extends RefTypeOrTPHOrWildcardOrGeneric,B extends RefTypeOrTPHOrWildcardOrGeneric> {
|
||||
private final A left;
|
||||
private final B right;
|
||||
|
||||
public abstract void accept(ResultPairVisitor visitor);
|
||||
|
||||
public ResultPair(A left, B right){
|
||||
this.left = left;
|
||||
this.right = right;
|
||||
}
|
||||
|
||||
public A getLeft() {
|
||||
return left;
|
||||
}
|
||||
|
||||
public B getRight() {
|
||||
return right;
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return "(" + left.toString() + ", " + right.toString() + ")";
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
final int prime = 31;
|
||||
int result = 1;
|
||||
result = prime * result + ((left == null) ? 0 : left.getOffset().hashCode());
|
||||
result = prime * result + ((right == null) ? 0 : right.getOffset().hashCode());
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (this == obj)
|
||||
return true;
|
||||
if (obj == null)
|
||||
return false;
|
||||
if (getClass() != obj.getClass())
|
||||
return false;
|
||||
ResultPair<?,?> other = (ResultPair<?,?>) obj;
|
||||
if (left == null) {
|
||||
if (other.left != null)
|
||||
return false;
|
||||
} else if (!left.getOffset().equals(other.left.getOffset()))
|
||||
return false;
|
||||
if (right == null) {
|
||||
if (other.right != null)
|
||||
return false;
|
||||
} else if (!right.getOffset().equals(other.right.getOffset()))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
package de.dhbwstuttgart.typeinference.result;
|
||||
|
||||
import de.dhbwstuttgart.syntaxtree.type.RefTypeOrTPHOrWildcardOrGeneric;
|
||||
|
||||
/**
|
||||
* Paare, welche das Unifikationsergebnis darstellen
|
||||
*/
|
||||
public abstract class ResultPair<A extends RefTypeOrTPHOrWildcardOrGeneric,B extends RefTypeOrTPHOrWildcardOrGeneric> {
|
||||
private final A left;
|
||||
private final B right;
|
||||
|
||||
public abstract void accept(ResultPairVisitor visitor);
|
||||
|
||||
public ResultPair(A left, B right){
|
||||
this.left = left;
|
||||
this.right = right;
|
||||
}
|
||||
|
||||
public A getLeft() {
|
||||
return left;
|
||||
}
|
||||
|
||||
public B getRight() {
|
||||
return right;
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return "(" + left.toString() + ", " + right.toString() + ")";
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
final int prime = 31;
|
||||
int result = 1;
|
||||
result = prime * result + ((left == null) ? 0 : left.getOffset().hashCode());
|
||||
result = prime * result + ((right == null) ? 0 : right.getOffset().hashCode());
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (this == obj)
|
||||
return true;
|
||||
if (obj == null)
|
||||
return false;
|
||||
if (getClass() != obj.getClass())
|
||||
return false;
|
||||
ResultPair<?,?> other = (ResultPair<?,?>) obj;
|
||||
if (left == null) {
|
||||
if (other.left != null)
|
||||
return false;
|
||||
} else if (!left.getOffset().equals(other.left.getOffset()))
|
||||
return false;
|
||||
if (right == null) {
|
||||
if (other.right != null)
|
||||
return false;
|
||||
} else if (!right.getOffset().equals(other.right.getOffset()))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,309 +1,309 @@
|
||||
package de.dhbwstuttgart.typeinference.result;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
import de.dhbwstuttgart.exceptions.NotImplementedException;
|
||||
import de.dhbwstuttgart.syntaxtree.type.ExtendsWildcardType;
|
||||
import de.dhbwstuttgart.syntaxtree.type.GenericRefType;
|
||||
import de.dhbwstuttgart.syntaxtree.type.RefType;
|
||||
import de.dhbwstuttgart.syntaxtree.type.RefTypeOrTPHOrWildcardOrGeneric;
|
||||
import de.dhbwstuttgart.syntaxtree.type.SuperWildcardType;
|
||||
import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder;
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
public class ResultSet {
|
||||
|
||||
public final Set<ResultPair> results;
|
||||
public Set<ResultPair<TypePlaceholder, TypePlaceholder>> genIns;
|
||||
|
||||
public ResultSet(Set<ResultPair> set){
|
||||
this.results = set;
|
||||
this.genIns = new HashSet<>();
|
||||
package de.dhbwstuttgart.typeinference.result;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
import de.dhbwstuttgart.exceptions.NotImplementedException;
|
||||
import de.dhbwstuttgart.syntaxtree.type.ExtendsWildcardType;
|
||||
import de.dhbwstuttgart.syntaxtree.type.GenericRefType;
|
||||
import de.dhbwstuttgart.syntaxtree.type.RefType;
|
||||
import de.dhbwstuttgart.syntaxtree.type.RefTypeOrTPHOrWildcardOrGeneric;
|
||||
import de.dhbwstuttgart.syntaxtree.type.SuperWildcardType;
|
||||
import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder;
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
public class ResultSet {
|
||||
|
||||
public final Set<ResultPair> results;
|
||||
public Set<ResultPair<TypePlaceholder, TypePlaceholder>> genIns;
|
||||
|
||||
public ResultSet(Set<ResultPair> set){
|
||||
this.results = set;
|
||||
this.genIns = new HashSet<>();
|
||||
results.forEach(x -> { if (x instanceof PairTPHsmallerTPH) { this.genIns.add(x);}} );
|
||||
}
|
||||
|
||||
public boolean contains(ResultPair toCheck) {
|
||||
return this.results.contains(toCheck);
|
||||
}
|
||||
|
||||
public void remove(ResultPair toCheck) {
|
||||
results.remove(toCheck);
|
||||
}
|
||||
|
||||
public ResolvedType resolveType(RefTypeOrTPHOrWildcardOrGeneric type) {
|
||||
if(type instanceof TypePlaceholder)
|
||||
return new Resolver(this).resolve((TypePlaceholder)type);
|
||||
if(type instanceof GenericRefType)return new ResolvedType(type, new HashSet<>());
|
||||
if(type instanceof RefType) {
|
||||
RelatedTypeWalker related = new RelatedTypeWalker(null, this);
|
||||
type.accept(related);
|
||||
return new ResolvedType(type, related.relatedTPHs);
|
||||
} else {
|
||||
throw new NotImplementedException();
|
||||
//return new ResolvedType(type,new HashSet<>());
|
||||
}
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return results.toString();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (o instanceof ResultSet) {
|
||||
ResultSet other = (ResultSet)o;
|
||||
return this.results.equals(other.results);
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return results.hashCode();
|
||||
}
|
||||
}
|
||||
|
||||
class Resolver implements ResultSetVisitor {
|
||||
private final ResultSet result;
|
||||
private TypePlaceholder toResolve;
|
||||
private RefTypeOrTPHOrWildcardOrGeneric resolved;
|
||||
private final Set<GenericInsertPair> additionalTPHs = new HashSet<>();
|
||||
private ResultPair<?,?> currentPair;
|
||||
|
||||
public Resolver(ResultSet resultPairs){
|
||||
this.result = resultPairs;
|
||||
}
|
||||
|
||||
public ResolvedType resolve(TypePlaceholder tph){
|
||||
toResolve = tph;
|
||||
resolved = null;
|
||||
System.out.println(tph.toString());
|
||||
for(ResultPair<?,?> resultPair : result.results) {
|
||||
if(resultPair instanceof PairTPHEqualTPH && ((PairTPHEqualTPH) resultPair).getLeft().equals(toResolve)){
|
||||
currentPair = resultPair;
|
||||
return resolve(((PairTPHEqualTPH) resultPair).getRight());
|
||||
}
|
||||
}
|
||||
for(ResultPair<?,?> resultPair : result.results){
|
||||
currentPair = resultPair;
|
||||
resultPair.accept(this);
|
||||
}
|
||||
if(resolved==null){//TPH kommt nicht im Result vor:
|
||||
resolved = tph;
|
||||
}
|
||||
|
||||
ResolvedType result = new ResolvedType(resolved, additionalTPHs);//resolved;
|
||||
result.setResultPair(currentPair);
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void visit(PairTPHsmallerTPH p) {
|
||||
currentPair = p;
|
||||
if(p.left.equals(toResolve)){
|
||||
additionalTPHs.add(new GenericInsertPair(p.left, p.right));
|
||||
additionalTPHs.addAll(new RelatedTypeWalker(p.right, result).relatedTPHs);
|
||||
}
|
||||
if(p.right.equals(toResolve))
|
||||
additionalTPHs.addAll(new RelatedTypeWalker(p.left, result).relatedTPHs);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void visit(PairTPHequalRefTypeOrWildcardType p) {
|
||||
currentPair = p;
|
||||
if(p.left.equals(toResolve)){
|
||||
resolved = p.right;
|
||||
RelatedTypeWalker related = new RelatedTypeWalker(null, result);
|
||||
p.right.accept(related);
|
||||
additionalTPHs.addAll(related.relatedTPHs);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void visit(PairTPHEqualTPH p) {
|
||||
//Do nothing. Dieser Fall wird in der resolve-Methode abgefangen
|
||||
}
|
||||
|
||||
@Override
|
||||
public void visit(RefType refType) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void visit(GenericRefType genericRefType) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void visit(SuperWildcardType superWildcardType) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void visit(TypePlaceholder typePlaceholder) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void visit(ExtendsWildcardType extendsWildcardType) {
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Sucht aus dem Result Set den Sub/supertyp für einen TPH
|
||||
*/
|
||||
@SuppressWarnings("rawtypes")
|
||||
class TPHResolver implements ResultSetVisitor {
|
||||
|
||||
private final TypePlaceholder tph;
|
||||
Set<GenericInsertPair> resolved = new HashSet<>();
|
||||
private final ResultSet resultSet;
|
||||
|
||||
TPHResolver(TypePlaceholder tph, ResultSet resultSet){
|
||||
this.resultSet = resultSet;
|
||||
this.tph = tph;
|
||||
for(ResultPair p : resultSet.results){
|
||||
p.accept(this);
|
||||
}
|
||||
if(resolved.size() == 0){
|
||||
resolved.add(new GenericInsertPair(tph, null));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void visit(PairTPHsmallerTPH p) {
|
||||
if(p.left.equals(tph) || p.right.equals(tph)){
|
||||
resolved.add(new GenericInsertPair(p.left, p.right));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void visit(PairTPHequalRefTypeOrWildcardType p) {
|
||||
TypePlaceholder otherSide = null;
|
||||
if(p.right.equals(tph)){
|
||||
otherSide = p.left;
|
||||
}
|
||||
if(otherSide != null){
|
||||
Set<ResultPair> newResultSet = new HashSet<>(this.resultSet.results);
|
||||
newResultSet.remove(p);
|
||||
resolved.addAll(new TPHResolver(otherSide, new ResultSet(newResultSet)).resolved);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void visit(PairTPHEqualTPH p) {
|
||||
//ignorieren. Wird vom Resolver behandelt
|
||||
}
|
||||
|
||||
@Override
|
||||
public void visit(RefType refType) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void visit(GenericRefType genericRefType) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void visit(SuperWildcardType superWildcardType) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void visit(TypePlaceholder typePlaceholder) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void visit(ExtendsWildcardType extendsWildcardType) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
class RelatedTypeWalker implements ResultSetVisitor {
|
||||
|
||||
final Set<GenericInsertPair> relatedTPHs = new HashSet<>();
|
||||
private final TypePlaceholder toResolve;
|
||||
private final ResultSet resultSet;
|
||||
|
||||
/**
|
||||
* 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 resultSet
|
||||
*/
|
||||
RelatedTypeWalker(TypePlaceholder start, ResultSet resultSet){
|
||||
this.toResolve = start;
|
||||
this.resultSet = resultSet;
|
||||
int resolved = 0;
|
||||
do{
|
||||
resolved = relatedTPHs.size();
|
||||
for(ResultPair p : resultSet.results){
|
||||
p.accept(this);
|
||||
p.accept(this);
|
||||
}
|
||||
}while(resolved - relatedTPHs.size() > 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void visit(PairTPHsmallerTPH p) {
|
||||
if(p.getRight().equals(toResolve)){
|
||||
relatedTPHs.addAll(new TPHResolver(p.right, resultSet).resolved);
|
||||
//relatedTPHs.addAll(new RelatedTypeWalker(p.right, resultSet).relatedTPHs);
|
||||
}
|
||||
if(p.getLeft().equals(toResolve)){
|
||||
relatedTPHs.addAll(new TPHResolver(p.left, resultSet).resolved);
|
||||
//relatedTPHs.addAll(new RelatedTypeWalker(p.left, resultSet).relatedTPHs);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void visit(PairTPHequalRefTypeOrWildcardType p) {
|
||||
if(p.getLeft().equals(toResolve)){
|
||||
p.getRight().accept(this);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void visit(PairTPHEqualTPH p) {
|
||||
//Kann ignoriert werden. Diese Fälle werden vom Resolver behandelt
|
||||
}
|
||||
|
||||
/*
|
||||
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
|
||||
*/
|
||||
|
||||
@Override
|
||||
public void visit(RefType refType) {
|
||||
for(RefTypeOrTPHOrWildcardOrGeneric param : refType.getParaList()){
|
||||
param.accept(this);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void visit(SuperWildcardType superWildcardType) {
|
||||
superWildcardType.getInnerType().accept(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void visit(TypePlaceholder typePlaceholder) {
|
||||
relatedTPHs.addAll(new TPHResolver(typePlaceholder, resultSet).resolved);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void visit(ExtendsWildcardType extendsWildcardType) {
|
||||
extendsWildcardType.getInnerType().accept(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void visit(GenericRefType genericRefType) {
|
||||
}
|
||||
}
|
||||
|
||||
public boolean contains(ResultPair toCheck) {
|
||||
return this.results.contains(toCheck);
|
||||
}
|
||||
|
||||
public void remove(ResultPair toCheck) {
|
||||
results.remove(toCheck);
|
||||
}
|
||||
|
||||
public ResolvedType resolveType(RefTypeOrTPHOrWildcardOrGeneric type) {
|
||||
if(type instanceof TypePlaceholder)
|
||||
return new Resolver(this).resolve((TypePlaceholder)type);
|
||||
if(type instanceof GenericRefType)return new ResolvedType(type, new HashSet<>());
|
||||
if(type instanceof RefType) {
|
||||
RelatedTypeWalker related = new RelatedTypeWalker(null, this);
|
||||
type.accept(related);
|
||||
return new ResolvedType(type, related.relatedTPHs);
|
||||
} else {
|
||||
throw new NotImplementedException();
|
||||
//return new ResolvedType(type,new HashSet<>());
|
||||
}
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return results.toString();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (o instanceof ResultSet) {
|
||||
ResultSet other = (ResultSet)o;
|
||||
return this.results.equals(other.results);
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return results.hashCode();
|
||||
}
|
||||
}
|
||||
|
||||
class Resolver implements ResultSetVisitor {
|
||||
private final ResultSet result;
|
||||
private TypePlaceholder toResolve;
|
||||
private RefTypeOrTPHOrWildcardOrGeneric resolved;
|
||||
private final Set<GenericInsertPair> additionalTPHs = new HashSet<>();
|
||||
private ResultPair<?,?> currentPair;
|
||||
|
||||
public Resolver(ResultSet resultPairs){
|
||||
this.result = resultPairs;
|
||||
}
|
||||
|
||||
public ResolvedType resolve(TypePlaceholder tph){
|
||||
toResolve = tph;
|
||||
resolved = null;
|
||||
System.out.println(tph.toString());
|
||||
for(ResultPair<?,?> resultPair : result.results) {
|
||||
if(resultPair instanceof PairTPHEqualTPH && ((PairTPHEqualTPH) resultPair).getLeft().equals(toResolve)){
|
||||
currentPair = resultPair;
|
||||
return resolve(((PairTPHEqualTPH) resultPair).getRight());
|
||||
}
|
||||
}
|
||||
for(ResultPair<?,?> resultPair : result.results){
|
||||
currentPair = resultPair;
|
||||
resultPair.accept(this);
|
||||
}
|
||||
if(resolved==null){//TPH kommt nicht im Result vor:
|
||||
resolved = tph;
|
||||
}
|
||||
|
||||
ResolvedType result = new ResolvedType(resolved, additionalTPHs);//resolved;
|
||||
result.setResultPair(currentPair);
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void visit(PairTPHsmallerTPH p) {
|
||||
currentPair = p;
|
||||
if(p.left.equals(toResolve)){
|
||||
additionalTPHs.add(new GenericInsertPair(p.left, p.right));
|
||||
additionalTPHs.addAll(new RelatedTypeWalker(p.right, result).relatedTPHs);
|
||||
}
|
||||
if(p.right.equals(toResolve))
|
||||
additionalTPHs.addAll(new RelatedTypeWalker(p.left, result).relatedTPHs);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void visit(PairTPHequalRefTypeOrWildcardType p) {
|
||||
currentPair = p;
|
||||
if(p.left.equals(toResolve)){
|
||||
resolved = p.right;
|
||||
RelatedTypeWalker related = new RelatedTypeWalker(null, result);
|
||||
p.right.accept(related);
|
||||
additionalTPHs.addAll(related.relatedTPHs);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void visit(PairTPHEqualTPH p) {
|
||||
//Do nothing. Dieser Fall wird in der resolve-Methode abgefangen
|
||||
}
|
||||
|
||||
@Override
|
||||
public void visit(RefType refType) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void visit(GenericRefType genericRefType) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void visit(SuperWildcardType superWildcardType) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void visit(TypePlaceholder typePlaceholder) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void visit(ExtendsWildcardType extendsWildcardType) {
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Sucht aus dem Result Set den Sub/supertyp für einen TPH
|
||||
*/
|
||||
@SuppressWarnings("rawtypes")
|
||||
class TPHResolver implements ResultSetVisitor {
|
||||
|
||||
private final TypePlaceholder tph;
|
||||
Set<GenericInsertPair> resolved = new HashSet<>();
|
||||
private final ResultSet resultSet;
|
||||
|
||||
TPHResolver(TypePlaceholder tph, ResultSet resultSet){
|
||||
this.resultSet = resultSet;
|
||||
this.tph = tph;
|
||||
for(ResultPair p : resultSet.results){
|
||||
p.accept(this);
|
||||
}
|
||||
if(resolved.size() == 0){
|
||||
resolved.add(new GenericInsertPair(tph, null));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void visit(PairTPHsmallerTPH p) {
|
||||
if(p.left.equals(tph) || p.right.equals(tph)){
|
||||
resolved.add(new GenericInsertPair(p.left, p.right));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void visit(PairTPHequalRefTypeOrWildcardType p) {
|
||||
TypePlaceholder otherSide = null;
|
||||
if(p.right.equals(tph)){
|
||||
otherSide = p.left;
|
||||
}
|
||||
if(otherSide != null){
|
||||
Set<ResultPair> newResultSet = new HashSet<>(this.resultSet.results);
|
||||
newResultSet.remove(p);
|
||||
resolved.addAll(new TPHResolver(otherSide, new ResultSet(newResultSet)).resolved);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void visit(PairTPHEqualTPH p) {
|
||||
//ignorieren. Wird vom Resolver behandelt
|
||||
}
|
||||
|
||||
@Override
|
||||
public void visit(RefType refType) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void visit(GenericRefType genericRefType) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void visit(SuperWildcardType superWildcardType) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void visit(TypePlaceholder typePlaceholder) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void visit(ExtendsWildcardType extendsWildcardType) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
class RelatedTypeWalker implements ResultSetVisitor {
|
||||
|
||||
final Set<GenericInsertPair> relatedTPHs = new HashSet<>();
|
||||
private final TypePlaceholder toResolve;
|
||||
private final ResultSet resultSet;
|
||||
|
||||
/**
|
||||
* 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 resultSet
|
||||
*/
|
||||
RelatedTypeWalker(TypePlaceholder start, ResultSet resultSet){
|
||||
this.toResolve = start;
|
||||
this.resultSet = resultSet;
|
||||
int resolved = 0;
|
||||
do{
|
||||
resolved = relatedTPHs.size();
|
||||
for(ResultPair p : resultSet.results){
|
||||
p.accept(this);
|
||||
p.accept(this);
|
||||
}
|
||||
}while(resolved - relatedTPHs.size() > 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void visit(PairTPHsmallerTPH p) {
|
||||
if(p.getRight().equals(toResolve)){
|
||||
relatedTPHs.addAll(new TPHResolver(p.right, resultSet).resolved);
|
||||
//relatedTPHs.addAll(new RelatedTypeWalker(p.right, resultSet).relatedTPHs);
|
||||
}
|
||||
if(p.getLeft().equals(toResolve)){
|
||||
relatedTPHs.addAll(new TPHResolver(p.left, resultSet).resolved);
|
||||
//relatedTPHs.addAll(new RelatedTypeWalker(p.left, resultSet).relatedTPHs);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void visit(PairTPHequalRefTypeOrWildcardType p) {
|
||||
if(p.getLeft().equals(toResolve)){
|
||||
p.getRight().accept(this);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void visit(PairTPHEqualTPH p) {
|
||||
//Kann ignoriert werden. Diese Fälle werden vom Resolver behandelt
|
||||
}
|
||||
|
||||
/*
|
||||
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
|
||||
*/
|
||||
|
||||
@Override
|
||||
public void visit(RefType refType) {
|
||||
for(RefTypeOrTPHOrWildcardOrGeneric param : refType.getParaList()){
|
||||
param.accept(this);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void visit(SuperWildcardType superWildcardType) {
|
||||
superWildcardType.getInnerType().accept(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void visit(TypePlaceholder typePlaceholder) {
|
||||
relatedTPHs.addAll(new TPHResolver(typePlaceholder, resultSet).resolved);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void visit(ExtendsWildcardType extendsWildcardType) {
|
||||
extendsWildcardType.getInnerType().accept(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void visit(GenericRefType genericRefType) {
|
||||
}
|
||||
}
|
@ -1,23 +1,23 @@
|
||||
package de.dhbwstuttgart.typeinference.unify;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import com.google.common.collect.Sets;
|
||||
|
||||
import de.dhbwstuttgart.typeinference.unify.interfaces.ISetOperations;
|
||||
|
||||
/**
|
||||
* Implements set operations using google guava.
|
||||
* @author DH10STF
|
||||
*
|
||||
*/
|
||||
public class GuavaSetOperations implements ISetOperations {
|
||||
|
||||
@Override
|
||||
public <B> Set<List<B>> cartesianProduct(List<? extends Set<? extends B>> sets) {
|
||||
// Wraps the call to google guava
|
||||
return Sets.cartesianProduct(sets);
|
||||
}
|
||||
|
||||
}
|
||||
package de.dhbwstuttgart.typeinference.unify;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import com.google.common.collect.Sets;
|
||||
|
||||
import de.dhbwstuttgart.typeinference.unify.interfaces.ISetOperations;
|
||||
|
||||
/**
|
||||
* Implements set operations using google guava.
|
||||
* @author DH10STF
|
||||
*
|
||||
*/
|
||||
public class GuavaSetOperations implements ISetOperations {
|
||||
|
||||
@Override
|
||||
public <B> Set<List<B>> cartesianProduct(List<? extends Set<? extends B>> sets) {
|
||||
// Wraps the call to google guava
|
||||
return Sets.cartesianProduct(sets);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,108 +1,108 @@
|
||||
package de.dhbwstuttgart.typeinference.unify;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
import java.util.Optional;
|
||||
import java.util.Set;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import de.dhbwstuttgart.typeinference.unify.interfaces.IUnify;
|
||||
import de.dhbwstuttgart.typeinference.unify.model.PairOperator;
|
||||
import de.dhbwstuttgart.typeinference.unify.model.PlaceholderType;
|
||||
import de.dhbwstuttgart.typeinference.unify.model.TypeParams;
|
||||
import de.dhbwstuttgart.typeinference.unify.model.Unifier;
|
||||
import de.dhbwstuttgart.typeinference.unify.model.UnifyPair;
|
||||
import de.dhbwstuttgart.typeinference.unify.model.UnifyType;
|
||||
|
||||
/**
|
||||
* Implementation of the Martelli-Montanari unification algorithm.
|
||||
* @author Florian Steurer
|
||||
*/
|
||||
public class MartelliMontanariUnify implements IUnify {
|
||||
|
||||
@Override
|
||||
public Optional<Unifier> unify(Set<UnifyType> terms) {
|
||||
// Sets with less than 2 terms are trivially unified
|
||||
if(terms.size() < 2)
|
||||
return Optional.of(Unifier.identity());
|
||||
|
||||
// For the the set of terms {t1,...,tn},
|
||||
// build a list of equations {(t1 = t2), (t2 = t3), (t3 = t4), ....}
|
||||
ArrayList<UnifyPair> termsList = new ArrayList<UnifyPair>();
|
||||
Iterator<UnifyType> iter = terms.iterator();
|
||||
UnifyType prev = iter.next();
|
||||
package de.dhbwstuttgart.typeinference.unify;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
import java.util.Optional;
|
||||
import java.util.Set;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import de.dhbwstuttgart.typeinference.unify.interfaces.IUnify;
|
||||
import de.dhbwstuttgart.typeinference.unify.model.PairOperator;
|
||||
import de.dhbwstuttgart.typeinference.unify.model.PlaceholderType;
|
||||
import de.dhbwstuttgart.typeinference.unify.model.TypeParams;
|
||||
import de.dhbwstuttgart.typeinference.unify.model.Unifier;
|
||||
import de.dhbwstuttgart.typeinference.unify.model.UnifyPair;
|
||||
import de.dhbwstuttgart.typeinference.unify.model.UnifyType;
|
||||
|
||||
/**
|
||||
* Implementation of the Martelli-Montanari unification algorithm.
|
||||
* @author Florian Steurer
|
||||
*/
|
||||
public class MartelliMontanariUnify implements IUnify {
|
||||
|
||||
@Override
|
||||
public Optional<Unifier> unify(Set<UnifyType> terms) {
|
||||
// Sets with less than 2 terms are trivially unified
|
||||
if(terms.size() < 2)
|
||||
return Optional.of(Unifier.identity());
|
||||
|
||||
// For the the set of terms {t1,...,tn},
|
||||
// build a list of equations {(t1 = t2), (t2 = t3), (t3 = t4), ....}
|
||||
ArrayList<UnifyPair> termsList = new ArrayList<UnifyPair>();
|
||||
Iterator<UnifyType> iter = terms.iterator();
|
||||
UnifyType prev = iter.next();
|
||||
while(iter.hasNext()) {
|
||||
UnifyType next = iter.next();
|
||||
UnifyType next = iter.next();
|
||||
termsList.add(new UnifyPair(prev, next, PairOperator.EQUALSDOT));
|
||||
prev = next;
|
||||
}
|
||||
|
||||
// Start with the identity unifier. Substitutions will be added later.
|
||||
Unifier mgu = Unifier.identity();
|
||||
|
||||
// Apply rules while possible
|
||||
int idx = 0;
|
||||
while(idx < termsList.size()) {
|
||||
UnifyPair pair = termsList.get(idx);
|
||||
UnifyType rhsType = pair.getRhsType();
|
||||
UnifyType lhsType = pair.getLhsType();
|
||||
TypeParams rhsTypeParams = rhsType.getTypeParams();
|
||||
TypeParams lhsTypeParams = lhsType.getTypeParams();
|
||||
|
||||
// REDUCE - Rule
|
||||
if(!(rhsType instanceof PlaceholderType) && !(lhsType instanceof PlaceholderType)) {
|
||||
Set<UnifyPair> result = new HashSet<>();
|
||||
|
||||
// f<...> = g<...> with f != g are not unifiable
|
||||
if(!rhsType.getName().equals(lhsType.getName()))
|
||||
return Optional.empty(); // conflict
|
||||
// f<t1,...,tn> = f<s1,...,sm> are not unifiable
|
||||
if(rhsTypeParams.size() != lhsTypeParams.size())
|
||||
return Optional.empty(); // conflict
|
||||
// f = g is not unifiable (cannot be f = f because erase rule would have been applied)
|
||||
//if(rhsTypeParams.size() == 0)
|
||||
//return Optional.empty();
|
||||
|
||||
// Unpack the arguments
|
||||
for(int i = 0; i < rhsTypeParams.size(); i++)
|
||||
result.add(new UnifyPair(rhsTypeParams.get(i), lhsTypeParams.get(i), PairOperator.EQUALSDOT));
|
||||
|
||||
termsList.remove(idx);
|
||||
termsList.addAll(result);
|
||||
continue;
|
||||
}
|
||||
|
||||
// DELETE - Rule
|
||||
if(pair.getRhsType().equals(pair.getLhsType())) {
|
||||
termsList.remove(idx);
|
||||
continue;
|
||||
}
|
||||
|
||||
// SWAP - Rule
|
||||
if(!(lhsType instanceof PlaceholderType) && (rhsType instanceof PlaceholderType)) {
|
||||
termsList.remove(idx);
|
||||
termsList.add(new UnifyPair(rhsType, lhsType, PairOperator.EQUALSDOT));
|
||||
continue;
|
||||
}
|
||||
|
||||
// OCCURS-CHECK
|
||||
if(pair.getLhsType() instanceof PlaceholderType
|
||||
&& pair.getRhsType().getTypeParams().occurs((PlaceholderType) pair.getLhsType()))
|
||||
return Optional.empty();
|
||||
|
||||
// SUBST - Rule
|
||||
if(lhsType instanceof PlaceholderType) {
|
||||
mgu.add((PlaceholderType) lhsType, rhsType);
|
||||
//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));
|
||||
idx = idx+1 == termsList.size() ? 0 : idx+1;
|
||||
continue;
|
||||
}
|
||||
|
||||
idx++;
|
||||
}
|
||||
|
||||
return Optional.of(mgu);
|
||||
}
|
||||
}
|
||||
prev = next;
|
||||
}
|
||||
|
||||
// Start with the identity unifier. Substitutions will be added later.
|
||||
Unifier mgu = Unifier.identity();
|
||||
|
||||
// Apply rules while possible
|
||||
int idx = 0;
|
||||
while(idx < termsList.size()) {
|
||||
UnifyPair pair = termsList.get(idx);
|
||||
UnifyType rhsType = pair.getRhsType();
|
||||
UnifyType lhsType = pair.getLhsType();
|
||||
TypeParams rhsTypeParams = rhsType.getTypeParams();
|
||||
TypeParams lhsTypeParams = lhsType.getTypeParams();
|
||||
|
||||
// REDUCE - Rule
|
||||
if(!(rhsType instanceof PlaceholderType) && !(lhsType instanceof PlaceholderType)) {
|
||||
Set<UnifyPair> result = new HashSet<>();
|
||||
|
||||
// f<...> = g<...> with f != g are not unifiable
|
||||
if(!rhsType.getName().equals(lhsType.getName()))
|
||||
return Optional.empty(); // conflict
|
||||
// f<t1,...,tn> = f<s1,...,sm> are not unifiable
|
||||
if(rhsTypeParams.size() != lhsTypeParams.size())
|
||||
return Optional.empty(); // conflict
|
||||
// f = g is not unifiable (cannot be f = f because erase rule would have been applied)
|
||||
//if(rhsTypeParams.size() == 0)
|
||||
//return Optional.empty();
|
||||
|
||||
// Unpack the arguments
|
||||
for(int i = 0; i < rhsTypeParams.size(); i++)
|
||||
result.add(new UnifyPair(rhsTypeParams.get(i), lhsTypeParams.get(i), PairOperator.EQUALSDOT));
|
||||
|
||||
termsList.remove(idx);
|
||||
termsList.addAll(result);
|
||||
continue;
|
||||
}
|
||||
|
||||
// DELETE - Rule
|
||||
if(pair.getRhsType().equals(pair.getLhsType())) {
|
||||
termsList.remove(idx);
|
||||
continue;
|
||||
}
|
||||
|
||||
// SWAP - Rule
|
||||
if(!(lhsType instanceof PlaceholderType) && (rhsType instanceof PlaceholderType)) {
|
||||
termsList.remove(idx);
|
||||
termsList.add(new UnifyPair(rhsType, lhsType, PairOperator.EQUALSDOT));
|
||||
continue;
|
||||
}
|
||||
|
||||
// OCCURS-CHECK
|
||||
if(pair.getLhsType() instanceof PlaceholderType
|
||||
&& pair.getRhsType().getTypeParams().occurs((PlaceholderType) pair.getLhsType()))
|
||||
return Optional.empty();
|
||||
|
||||
// SUBST - Rule
|
||||
if(lhsType instanceof PlaceholderType) {
|
||||
mgu.add((PlaceholderType) lhsType, rhsType);
|
||||
//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));
|
||||
idx = idx+1 == termsList.size() ? 0 : idx+1;
|
||||
continue;
|
||||
}
|
||||
|
||||
idx++;
|
||||
}
|
||||
|
||||
return Optional.of(mgu);
|
||||
}
|
||||
}
|
||||
|
@ -1,91 +1,91 @@
|
||||
package de.dhbwstuttgart.typeinference.unify;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
import java.util.Optional;
|
||||
import java.util.Set;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import de.dhbwstuttgart.typeinference.unify.interfaces.IMatch;
|
||||
import de.dhbwstuttgart.typeinference.unify.model.PairOperator;
|
||||
import de.dhbwstuttgart.typeinference.unify.model.PlaceholderType;
|
||||
import de.dhbwstuttgart.typeinference.unify.model.TypeParams;
|
||||
import de.dhbwstuttgart.typeinference.unify.model.Unifier;
|
||||
import de.dhbwstuttgart.typeinference.unify.model.UnifyPair;
|
||||
import de.dhbwstuttgart.typeinference.unify.model.UnifyType;
|
||||
|
||||
/**
|
||||
* Implementation of match derived from unification algorithm.
|
||||
* @author Martin Pluemicke
|
||||
*/
|
||||
public class Match implements IMatch {
|
||||
|
||||
@Override
|
||||
//A<X> =. A<Integer> ==> True
|
||||
//A<Integer> =. A<X> ==> False
|
||||
public Optional<Unifier> match(ArrayList<UnifyPair> termsList) {
|
||||
|
||||
// Start with the identity unifier. Substitutions will be added later.
|
||||
Unifier mgu = Unifier.identity();
|
||||
|
||||
// Apply rules while possible
|
||||
int idx = 0;
|
||||
while(idx < termsList.size()) {
|
||||
UnifyPair pair = termsList.get(idx);
|
||||
UnifyType rhsType = pair.getRhsType();
|
||||
UnifyType lhsType = pair.getLhsType();
|
||||
TypeParams rhsTypeParams = rhsType.getTypeParams();
|
||||
TypeParams lhsTypeParams = lhsType.getTypeParams();
|
||||
|
||||
// REDUCE - Rule
|
||||
if(!(rhsType instanceof PlaceholderType) && !(lhsType instanceof PlaceholderType)) {
|
||||
Set<UnifyPair> result = new HashSet<>();
|
||||
|
||||
// f<...> = g<...> with f != g are not unifiable
|
||||
if(!rhsType.getName().equals(lhsType.getName()))
|
||||
return Optional.empty(); // conflict
|
||||
// f<t1,...,tn> = f<s1,...,sm> are not unifiable
|
||||
if(rhsTypeParams.size() != lhsTypeParams.size())
|
||||
return Optional.empty(); // conflict
|
||||
// f = g is not unifiable (cannot be f = f because erase rule would have been applied)
|
||||
//if(rhsTypeParams.size() == 0)
|
||||
//return Optional.empty();
|
||||
|
||||
// Unpack the arguments
|
||||
for(int i = 0; i < rhsTypeParams.size(); i++)
|
||||
result.add(new UnifyPair(lhsTypeParams.get(i), rhsTypeParams.get(i), PairOperator.EQUALSDOT));
|
||||
|
||||
termsList.remove(idx);
|
||||
termsList.addAll(result);
|
||||
continue;
|
||||
}
|
||||
|
||||
// DELETE - Rule
|
||||
if(pair.getRhsType().equals(pair.getLhsType())) {
|
||||
termsList.remove(idx);
|
||||
continue;
|
||||
}
|
||||
|
||||
// SWAP - Rule
|
||||
if(!(lhsType instanceof PlaceholderType) && (rhsType instanceof PlaceholderType)) {
|
||||
return Optional.empty(); // conflict
|
||||
}
|
||||
|
||||
// OCCURS-CHECK
|
||||
//deleted
|
||||
|
||||
// SUBST - Rule
|
||||
if(lhsType instanceof PlaceholderType) {
|
||||
mgu.add((PlaceholderType) lhsType, rhsType);
|
||||
termsList = termsList.stream().map(mgu::applyleft).collect(Collectors.toCollection(ArrayList::new));
|
||||
idx = idx+1 == termsList.size() ? 0 : idx+1;
|
||||
continue;
|
||||
}
|
||||
|
||||
idx++;
|
||||
}
|
||||
|
||||
return Optional.of(mgu);
|
||||
}
|
||||
}
|
||||
package de.dhbwstuttgart.typeinference.unify;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
import java.util.Optional;
|
||||
import java.util.Set;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import de.dhbwstuttgart.typeinference.unify.interfaces.IMatch;
|
||||
import de.dhbwstuttgart.typeinference.unify.model.PairOperator;
|
||||
import de.dhbwstuttgart.typeinference.unify.model.PlaceholderType;
|
||||
import de.dhbwstuttgart.typeinference.unify.model.TypeParams;
|
||||
import de.dhbwstuttgart.typeinference.unify.model.Unifier;
|
||||
import de.dhbwstuttgart.typeinference.unify.model.UnifyPair;
|
||||
import de.dhbwstuttgart.typeinference.unify.model.UnifyType;
|
||||
|
||||
/**
|
||||
* Implementation of match derived from unification algorithm.
|
||||
* @author Martin Pluemicke
|
||||
*/
|
||||
public class Match implements IMatch {
|
||||
|
||||
@Override
|
||||
//A<X> =. A<Integer> ==> True
|
||||
//A<Integer> =. A<X> ==> False
|
||||
public Optional<Unifier> match(ArrayList<UnifyPair> termsList) {
|
||||
|
||||
// Start with the identity unifier. Substitutions will be added later.
|
||||
Unifier mgu = Unifier.identity();
|
||||
|
||||
// Apply rules while possible
|
||||
int idx = 0;
|
||||
while(idx < termsList.size()) {
|
||||
UnifyPair pair = termsList.get(idx);
|
||||
UnifyType rhsType = pair.getRhsType();
|
||||
UnifyType lhsType = pair.getLhsType();
|
||||
TypeParams rhsTypeParams = rhsType.getTypeParams();
|
||||
TypeParams lhsTypeParams = lhsType.getTypeParams();
|
||||
|
||||
// REDUCE - Rule
|
||||
if(!(rhsType instanceof PlaceholderType) && !(lhsType instanceof PlaceholderType)) {
|
||||
Set<UnifyPair> result = new HashSet<>();
|
||||
|
||||
// f<...> = g<...> with f != g are not unifiable
|
||||
if(!rhsType.getName().equals(lhsType.getName()))
|
||||
return Optional.empty(); // conflict
|
||||
// f<t1,...,tn> = f<s1,...,sm> are not unifiable
|
||||
if(rhsTypeParams.size() != lhsTypeParams.size())
|
||||
return Optional.empty(); // conflict
|
||||
// f = g is not unifiable (cannot be f = f because erase rule would have been applied)
|
||||
//if(rhsTypeParams.size() == 0)
|
||||
//return Optional.empty();
|
||||
|
||||
// Unpack the arguments
|
||||
for(int i = 0; i < rhsTypeParams.size(); i++)
|
||||
result.add(new UnifyPair(lhsTypeParams.get(i), rhsTypeParams.get(i), PairOperator.EQUALSDOT));
|
||||
|
||||
termsList.remove(idx);
|
||||
termsList.addAll(result);
|
||||
continue;
|
||||
}
|
||||
|
||||
// DELETE - Rule
|
||||
if(pair.getRhsType().equals(pair.getLhsType())) {
|
||||
termsList.remove(idx);
|
||||
continue;
|
||||
}
|
||||
|
||||
// SWAP - Rule
|
||||
if(!(lhsType instanceof PlaceholderType) && (rhsType instanceof PlaceholderType)) {
|
||||
return Optional.empty(); // conflict
|
||||
}
|
||||
|
||||
// OCCURS-CHECK
|
||||
//deleted
|
||||
|
||||
// SUBST - Rule
|
||||
if(lhsType instanceof PlaceholderType) {
|
||||
mgu.add((PlaceholderType) lhsType, rhsType);
|
||||
termsList = termsList.stream().map(mgu::applyleft).collect(Collectors.toCollection(ArrayList::new));
|
||||
idx = idx+1 == termsList.size() ? 0 : idx+1;
|
||||
continue;
|
||||
}
|
||||
|
||||
idx++;
|
||||
}
|
||||
|
||||
return Optional.of(mgu);
|
||||
}
|
||||
}
|
||||
|
@ -1,121 +1,121 @@
|
||||
package de.dhbwstuttgart.typeinference.unify;
|
||||
|
||||
import java.io.FileWriter;
|
||||
import java.io.IOException;
|
||||
import java.io.Writer;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.ForkJoinPool;
|
||||
|
||||
import de.dhbwstuttgart.core.JavaTXCompiler;
|
||||
import de.dhbwstuttgart.typeinference.constraints.Constraint;
|
||||
import de.dhbwstuttgart.typeinference.constraints.ConstraintSet;
|
||||
import de.dhbwstuttgart.typeinference.constraints.Pair;
|
||||
import de.dhbwstuttgart.typeinference.unify.interfaces.IFiniteClosure;
|
||||
import de.dhbwstuttgart.typeinference.unify.model.FiniteClosure;
|
||||
import de.dhbwstuttgart.typeinference.unify.model.UnifyPair;
|
||||
|
||||
public class TypeUnify {
|
||||
|
||||
/**
|
||||
* unify parallel ohne result modell
|
||||
* @param undConstrains
|
||||
* @param oderConstraints
|
||||
* @param fc
|
||||
* @param logFile
|
||||
* @param log
|
||||
* @param cons
|
||||
* @return
|
||||
*/
|
||||
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);
|
||||
ForkJoinPool pool = new ForkJoinPool();
|
||||
pool.invoke(unifyTask);
|
||||
Set<Set<UnifyPair>> res = unifyTask.join();
|
||||
try {
|
||||
logFile.write("\nnoShortendElements: " + unifyTask.noShortendElements + "\n");
|
||||
logFile.flush();
|
||||
}
|
||||
catch (IOException e) {
|
||||
System.err.println("no log-File");
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
/**
|
||||
* unify asynchron mit Rückgabe UnifyResultModel ohne dass alle results gesammelt sind
|
||||
* @param undConstrains
|
||||
* @param oderConstraints
|
||||
* @param fc
|
||||
* @param logFile
|
||||
* @param log
|
||||
* @param cons
|
||||
* @param ret
|
||||
* @return
|
||||
*/
|
||||
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);
|
||||
ForkJoinPool pool = new ForkJoinPool();
|
||||
pool.invoke(unifyTask);
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* unify parallel mit Rückgabe UnifyResultModel nachdem alle results gesammelt sind
|
||||
* @param undConstrains
|
||||
* @param oderConstraints
|
||||
* @param fc
|
||||
* @param logFile
|
||||
* @param log
|
||||
* @param cons
|
||||
* @param ret
|
||||
* @return
|
||||
*/
|
||||
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);
|
||||
ForkJoinPool pool = new ForkJoinPool();
|
||||
pool.invoke(unifyTask);
|
||||
Set<Set<UnifyPair>> res = unifyTask.join();
|
||||
try {
|
||||
logFile.write("\nnoShortendElements: " + unifyTask.noShortendElements +"\n");
|
||||
logFile.flush();
|
||||
}
|
||||
catch (IOException e) {
|
||||
System.err.println("no log-File");
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
/*
|
||||
public Set<Set<UnifyPair>> unifySequential(Set<UnifyPair> eq, IFiniteClosure fc, FileWriter logFile, Boolean log) {
|
||||
TypeUnifyTask unifyTask = new TypeUnifyTask(eq, fc, false, logFile, log);
|
||||
Set<Set<UnifyPair>> res = unifyTask.compute();
|
||||
return res;
|
||||
}
|
||||
*/
|
||||
|
||||
/**
|
||||
* unify sequentiell mit oderconstraints
|
||||
* @param undConstrains
|
||||
* @param oderConstraints
|
||||
* @param fc
|
||||
* @param logFile
|
||||
* @param log
|
||||
* @param cons
|
||||
* @return
|
||||
*/
|
||||
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);
|
||||
Set<Set<UnifyPair>> res = unifyTask.compute();
|
||||
try {
|
||||
logFile.write("\nnoShortendElements: " + unifyTask.noShortendElements +"\n");
|
||||
logFile.flush();
|
||||
}
|
||||
catch (IOException e) {
|
||||
System.err.println("no log-File");
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
}
|
||||
package de.dhbwstuttgart.typeinference.unify;
|
||||
|
||||
import java.io.FileWriter;
|
||||
import java.io.IOException;
|
||||
import java.io.Writer;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.ForkJoinPool;
|
||||
|
||||
import de.dhbwstuttgart.core.JavaTXCompiler;
|
||||
import de.dhbwstuttgart.typeinference.constraints.Constraint;
|
||||
import de.dhbwstuttgart.typeinference.constraints.ConstraintSet;
|
||||
import de.dhbwstuttgart.typeinference.constraints.Pair;
|
||||
import de.dhbwstuttgart.typeinference.unify.interfaces.IFiniteClosure;
|
||||
import de.dhbwstuttgart.typeinference.unify.model.FiniteClosure;
|
||||
import de.dhbwstuttgart.typeinference.unify.model.UnifyPair;
|
||||
|
||||
public class TypeUnify {
|
||||
|
||||
/**
|
||||
* unify parallel ohne result modell
|
||||
* @param undConstrains
|
||||
* @param oderConstraints
|
||||
* @param fc
|
||||
* @param logFile
|
||||
* @param log
|
||||
* @param cons
|
||||
* @return
|
||||
*/
|
||||
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);
|
||||
ForkJoinPool pool = new ForkJoinPool();
|
||||
pool.invoke(unifyTask);
|
||||
Set<Set<UnifyPair>> res = unifyTask.join();
|
||||
try {
|
||||
logFile.write("\nnoShortendElements: " + unifyTask.noShortendElements + "\n");
|
||||
logFile.flush();
|
||||
}
|
||||
catch (IOException e) {
|
||||
System.err.println("no log-File");
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
/**
|
||||
* unify asynchron mit Rückgabe UnifyResultModel ohne dass alle results gesammelt sind
|
||||
* @param undConstrains
|
||||
* @param oderConstraints
|
||||
* @param fc
|
||||
* @param logFile
|
||||
* @param log
|
||||
* @param cons
|
||||
* @param ret
|
||||
* @return
|
||||
*/
|
||||
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);
|
||||
ForkJoinPool pool = new ForkJoinPool();
|
||||
pool.invoke(unifyTask);
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* unify parallel mit Rückgabe UnifyResultModel nachdem alle results gesammelt sind
|
||||
* @param undConstrains
|
||||
* @param oderConstraints
|
||||
* @param fc
|
||||
* @param logFile
|
||||
* @param log
|
||||
* @param cons
|
||||
* @param ret
|
||||
* @return
|
||||
*/
|
||||
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);
|
||||
ForkJoinPool pool = new ForkJoinPool();
|
||||
pool.invoke(unifyTask);
|
||||
Set<Set<UnifyPair>> res = unifyTask.join();
|
||||
try {
|
||||
logFile.write("\nnoShortendElements: " + unifyTask.noShortendElements +"\n");
|
||||
logFile.flush();
|
||||
}
|
||||
catch (IOException e) {
|
||||
System.err.println("no log-File");
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
/*
|
||||
public Set<Set<UnifyPair>> unifySequential(Set<UnifyPair> eq, IFiniteClosure fc, FileWriter logFile, Boolean log) {
|
||||
TypeUnifyTask unifyTask = new TypeUnifyTask(eq, fc, false, logFile, log);
|
||||
Set<Set<UnifyPair>> res = unifyTask.compute();
|
||||
return res;
|
||||
}
|
||||
*/
|
||||
|
||||
/**
|
||||
* unify sequentiell mit oderconstraints
|
||||
* @param undConstrains
|
||||
* @param oderConstraints
|
||||
* @param fc
|
||||
* @param logFile
|
||||
* @param log
|
||||
* @param cons
|
||||
* @return
|
||||
*/
|
||||
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);
|
||||
Set<Set<UnifyPair>> res = unifyTask.compute();
|
||||
try {
|
||||
logFile.write("\nnoShortendElements: " + unifyTask.noShortendElements +"\n");
|
||||
logFile.flush();
|
||||
}
|
||||
catch (IOException e) {
|
||||
System.err.println("no log-File");
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,68 +1,68 @@
|
||||
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);
|
||||
package de.dhbwstuttgart.typeinference.unify.interfaces;
|
||||
|
||||
public Set<UnifyType> grArg(PlaceholderType type, Set<UnifyType> fBounded);
|
||||
public Set<UnifyType> smArg(PlaceholderType type, Set<UnifyType> fBounded);
|
||||
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);
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
@ -1,29 +1,29 @@
|
||||
package de.dhbwstuttgart.typeinference.unify.interfaces;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Optional;
|
||||
import java.util.Set;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import de.dhbwstuttgart.typeinference.unify.model.UnifyType;
|
||||
import de.dhbwstuttgart.typeinference.unify.model.Unifier;
|
||||
import de.dhbwstuttgart.typeinference.unify.model.UnifyPair;
|
||||
|
||||
/**
|
||||
* Match
|
||||
* @author Martin Pluemicke
|
||||
* abgeleitet aus IUnify.java
|
||||
*/
|
||||
public interface IMatch {
|
||||
|
||||
/**
|
||||
* Finds the most general matcher sigma of the set {t1 =. t1',...,tn =. tn'} so that
|
||||
* sigma(t1) = t1' , ... sigma(tn) = tn'.
|
||||
* @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.
|
||||
*/
|
||||
public Optional<Unifier> match(ArrayList<UnifyPair> termsList);
|
||||
|
||||
|
||||
}
|
||||
package de.dhbwstuttgart.typeinference.unify.interfaces;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Optional;
|
||||
import java.util.Set;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import de.dhbwstuttgart.typeinference.unify.model.UnifyType;
|
||||
import de.dhbwstuttgart.typeinference.unify.model.Unifier;
|
||||
import de.dhbwstuttgart.typeinference.unify.model.UnifyPair;
|
||||
|
||||
/**
|
||||
* Match
|
||||
* @author Martin Pluemicke
|
||||
* abgeleitet aus IUnify.java
|
||||
*/
|
||||
public interface IMatch {
|
||||
|
||||
/**
|
||||
* Finds the most general matcher sigma of the set {t1 =. t1',...,tn =. tn'} so that
|
||||
* sigma(t1) = t1' , ... sigma(tn) = tn'.
|
||||
* @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.
|
||||
*/
|
||||
public Optional<Unifier> match(ArrayList<UnifyPair> termsList);
|
||||
|
||||
|
||||
}
|
||||
|
@ -1,102 +1,102 @@
|
||||
package de.dhbwstuttgart.typeinference.unify.interfaces;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
import java.util.Set;
|
||||
|
||||
import de.dhbwstuttgart.typeinference.unify.model.UnifyPair;
|
||||
|
||||
/**
|
||||
* Contains the inference rules that are applied to the set Eq.
|
||||
* @author Florian Steurer
|
||||
*/
|
||||
public interface IRuleSet {
|
||||
|
||||
public Optional<UnifyPair> reduceUp(UnifyPair pair);
|
||||
public Optional<UnifyPair> reduceLow(UnifyPair pair);
|
||||
public Optional<UnifyPair> reduceUpLow(UnifyPair pair);
|
||||
public Optional<Set<UnifyPair>> reduceExt(UnifyPair pair, IFiniteClosure fc);
|
||||
public Optional<Set<UnifyPair>> reduceSup(UnifyPair pair, IFiniteClosure fc);
|
||||
public Optional<Set<UnifyPair>> reduceEq(UnifyPair pair);
|
||||
public Optional<Set<UnifyPair>> reduce1(UnifyPair pair, IFiniteClosure fc);
|
||||
public Optional<Set<UnifyPair>> reduce2(UnifyPair pair);
|
||||
|
||||
/*
|
||||
* Missing Reduce-Rules for Wildcards
|
||||
*/
|
||||
public Optional<UnifyPair> reduceWildcardLow(UnifyPair pair);
|
||||
public Optional<UnifyPair> reduceWildcardLowRight(UnifyPair pair);
|
||||
public Optional<UnifyPair> reduceWildcardUp(UnifyPair pair);
|
||||
public Optional<UnifyPair> reduceWildcardUpRight(UnifyPair pair);
|
||||
|
||||
/*
|
||||
* vgl. JAVA_BSP/Wildcard6.java
|
||||
public Optional<UnifyPair> reduceWildcardLowUp(UnifyPair pair);
|
||||
public Optional<UnifyPair> reduceWildcardUpLow(UnifyPair pair);
|
||||
public Optional<UnifyPair> reduceWildcardLeft(UnifyPair pair);
|
||||
*/
|
||||
|
||||
/*
|
||||
* Additional Rules which replace cases of the cartesian product
|
||||
*/
|
||||
|
||||
/**
|
||||
* Rule that replaces the fourth case of the cartesian product where (a <.? Theta)
|
||||
*/
|
||||
public Optional<UnifyPair> reduceTph(UnifyPair pair);
|
||||
|
||||
/**
|
||||
* Rule that replaces the sixth case of the cartesian product where (? ext Theta <.? a)
|
||||
*/
|
||||
public Optional<Set<UnifyPair>> reduceTphExt(UnifyPair pair);
|
||||
|
||||
/**
|
||||
* Rule that replaces the fourth case of the cartesian product where (? sup Theta <.? a)
|
||||
*/
|
||||
public Optional<Set<UnifyPair>> reduceTphSup(UnifyPair pair);
|
||||
|
||||
/*
|
||||
* FunN Rules
|
||||
*/
|
||||
public Optional<Set<UnifyPair>> reduceFunN(UnifyPair pair);
|
||||
public Optional<Set<UnifyPair>> greaterFunN(UnifyPair pair);
|
||||
public Optional<Set<UnifyPair>> smallerFunN(UnifyPair pair);
|
||||
|
||||
/**
|
||||
* Checks whether the erase1-Rule applies to the pair.
|
||||
* @return True if the pair is erasable, false otherwise.
|
||||
*/
|
||||
public boolean erase1(UnifyPair pair, IFiniteClosure fc);
|
||||
|
||||
/**
|
||||
* Checks whether the erase2-Rule applies to the pair.
|
||||
* @return True if the pair is erasable, false otherwise.
|
||||
*/
|
||||
public boolean erase2(UnifyPair pair, IFiniteClosure fc);
|
||||
|
||||
/**
|
||||
* Checks whether the erase3-Rule applies to the pair.
|
||||
* @return True if the pair is erasable, false otherwise.
|
||||
*/
|
||||
public boolean erase3(UnifyPair pair);
|
||||
|
||||
public Optional<UnifyPair> swap(UnifyPair pair);
|
||||
|
||||
public Optional<UnifyPair> adapt(UnifyPair pair, IFiniteClosure fc);
|
||||
public Optional<UnifyPair> adaptExt(UnifyPair pair, IFiniteClosure fc);
|
||||
public Optional<UnifyPair> adaptSup(UnifyPair pair, IFiniteClosure fc);
|
||||
|
||||
/**
|
||||
* Applies the subst-Rule to a set of pairs (usually Eq').
|
||||
* @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.
|
||||
*/
|
||||
public Optional<Set<UnifyPair>> subst(Set<UnifyPair> pairs, List<Set<Set<UnifyPair>>> oderConstraints);
|
||||
|
||||
/**
|
||||
* Applies the subst-Rule to a set of pairs (usually Eq').
|
||||
* @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.
|
||||
*/
|
||||
public Optional<Set<UnifyPair>> subst(Set<UnifyPair> pairs);
|
||||
}
|
||||
package de.dhbwstuttgart.typeinference.unify.interfaces;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
import java.util.Set;
|
||||
|
||||
import de.dhbwstuttgart.typeinference.unify.model.UnifyPair;
|
||||
|
||||
/**
|
||||
* Contains the inference rules that are applied to the set Eq.
|
||||
* @author Florian Steurer
|
||||
*/
|
||||
public interface IRuleSet {
|
||||
|
||||
public Optional<UnifyPair> reduceUp(UnifyPair pair);
|
||||
public Optional<UnifyPair> reduceLow(UnifyPair pair);
|
||||
public Optional<UnifyPair> reduceUpLow(UnifyPair pair);
|
||||
public Optional<Set<UnifyPair>> reduceExt(UnifyPair pair, IFiniteClosure fc);
|
||||
public Optional<Set<UnifyPair>> reduceSup(UnifyPair pair, IFiniteClosure fc);
|
||||
public Optional<Set<UnifyPair>> reduceEq(UnifyPair pair);
|
||||
public Optional<Set<UnifyPair>> reduce1(UnifyPair pair, IFiniteClosure fc);
|
||||
public Optional<Set<UnifyPair>> reduce2(UnifyPair pair);
|
||||
|
||||
/*
|
||||
* Missing Reduce-Rules for Wildcards
|
||||
*/
|
||||
public Optional<UnifyPair> reduceWildcardLow(UnifyPair pair);
|
||||
public Optional<UnifyPair> reduceWildcardLowRight(UnifyPair pair);
|
||||
public Optional<UnifyPair> reduceWildcardUp(UnifyPair pair);
|
||||
public Optional<UnifyPair> reduceWildcardUpRight(UnifyPair pair);
|
||||
|
||||
/*
|
||||
* vgl. JAVA_BSP/Wildcard6.java
|
||||
public Optional<UnifyPair> reduceWildcardLowUp(UnifyPair pair);
|
||||
public Optional<UnifyPair> reduceWildcardUpLow(UnifyPair pair);
|
||||
public Optional<UnifyPair> reduceWildcardLeft(UnifyPair pair);
|
||||
*/
|
||||
|
||||
/*
|
||||
* Additional Rules which replace cases of the cartesian product
|
||||
*/
|
||||
|
||||
/**
|
||||
* Rule that replaces the fourth case of the cartesian product where (a <.? Theta)
|
||||
*/
|
||||
public Optional<UnifyPair> reduceTph(UnifyPair pair);
|
||||
|
||||
/**
|
||||
* Rule that replaces the sixth case of the cartesian product where (? ext Theta <.? a)
|
||||
*/
|
||||
public Optional<Set<UnifyPair>> reduceTphExt(UnifyPair pair);
|
||||
|
||||
/**
|
||||
* Rule that replaces the fourth case of the cartesian product where (? sup Theta <.? a)
|
||||
*/
|
||||
public Optional<Set<UnifyPair>> reduceTphSup(UnifyPair pair);
|
||||
|
||||
/*
|
||||
* FunN Rules
|
||||
*/
|
||||
public Optional<Set<UnifyPair>> reduceFunN(UnifyPair pair);
|
||||
public Optional<Set<UnifyPair>> greaterFunN(UnifyPair pair);
|
||||
public Optional<Set<UnifyPair>> smallerFunN(UnifyPair pair);
|
||||
|
||||
/**
|
||||
* Checks whether the erase1-Rule applies to the pair.
|
||||
* @return True if the pair is erasable, false otherwise.
|
||||
*/
|
||||
public boolean erase1(UnifyPair pair, IFiniteClosure fc);
|
||||
|
||||
/**
|
||||
* Checks whether the erase2-Rule applies to the pair.
|
||||
* @return True if the pair is erasable, false otherwise.
|
||||
*/
|
||||
public boolean erase2(UnifyPair pair, IFiniteClosure fc);
|
||||
|
||||
/**
|
||||
* Checks whether the erase3-Rule applies to the pair.
|
||||
* @return True if the pair is erasable, false otherwise.
|
||||
*/
|
||||
public boolean erase3(UnifyPair pair);
|
||||
|
||||
public Optional<UnifyPair> swap(UnifyPair pair);
|
||||
|
||||
public Optional<UnifyPair> adapt(UnifyPair pair, IFiniteClosure fc);
|
||||
public Optional<UnifyPair> adaptExt(UnifyPair pair, IFiniteClosure fc);
|
||||
public Optional<UnifyPair> adaptSup(UnifyPair pair, IFiniteClosure fc);
|
||||
|
||||
/**
|
||||
* Applies the subst-Rule to a set of pairs (usually Eq').
|
||||
* @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.
|
||||
*/
|
||||
public Optional<Set<UnifyPair>> subst(Set<UnifyPair> pairs, List<Set<Set<UnifyPair>>> oderConstraints);
|
||||
|
||||
/**
|
||||
* Applies the subst-Rule to a set of pairs (usually Eq').
|
||||
* @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.
|
||||
*/
|
||||
public Optional<Set<UnifyPair>> subst(Set<UnifyPair> pairs);
|
||||
}
|
||||
|
@ -1,16 +1,16 @@
|
||||
package de.dhbwstuttgart.typeinference.unify.interfaces;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* Contains operations on sets.
|
||||
* @author Florian Steurer
|
||||
*/
|
||||
public interface ISetOperations {
|
||||
/**
|
||||
* Calculates the cartesian product of the sets.
|
||||
* @return The cartesian product
|
||||
*/
|
||||
<B> Set<List<B>> cartesianProduct(List<? extends Set<? extends B>> sets);
|
||||
}
|
||||
package de.dhbwstuttgart.typeinference.unify.interfaces;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* Contains operations on sets.
|
||||
* @author Florian Steurer
|
||||
*/
|
||||
public interface ISetOperations {
|
||||
/**
|
||||
* Calculates the cartesian product of the sets.
|
||||
* @return The cartesian product
|
||||
*/
|
||||
<B> Set<List<B>> cartesianProduct(List<? extends Set<? extends B>> sets);
|
||||
}
|
||||
|
@ -1,35 +1,35 @@
|
||||
package de.dhbwstuttgart.typeinference.unify.interfaces;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Optional;
|
||||
import java.util.Set;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import de.dhbwstuttgart.typeinference.unify.model.UnifyType;
|
||||
import de.dhbwstuttgart.typeinference.unify.model.Unifier;
|
||||
|
||||
/**
|
||||
* Standard unification algorithm (e.g. Robinson, Paterson-Wegman, Martelli-Montanari)
|
||||
* @author Florian Steurer
|
||||
*/
|
||||
public interface IUnify {
|
||||
|
||||
/**
|
||||
* Finds the most general unifier sigma of the set {t1 =. t1',...,tn =. tn'} so that
|
||||
* sigma(t1) = sigma(t1') , ... sigma(tn) = sigma(tn').
|
||||
* @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.
|
||||
*/
|
||||
public Optional<Unifier> unify(Set<UnifyType> terms);
|
||||
|
||||
/**
|
||||
* Finds the most general unifier sigma of the set {t1 =. t1',...,tn =. tn'} so that
|
||||
* sigma(t1) = sigma(t1') , ... sigma(tn) = sigma(tn').
|
||||
* @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.
|
||||
*/
|
||||
default public Optional<Unifier> unify(UnifyType... terms) {
|
||||
return unify(Arrays.stream(terms).collect(Collectors.toSet()));
|
||||
}
|
||||
|
||||
}
|
||||
package de.dhbwstuttgart.typeinference.unify.interfaces;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Optional;
|
||||
import java.util.Set;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import de.dhbwstuttgart.typeinference.unify.model.UnifyType;
|
||||
import de.dhbwstuttgart.typeinference.unify.model.Unifier;
|
||||
|
||||
/**
|
||||
* Standard unification algorithm (e.g. Robinson, Paterson-Wegman, Martelli-Montanari)
|
||||
* @author Florian Steurer
|
||||
*/
|
||||
public interface IUnify {
|
||||
|
||||
/**
|
||||
* Finds the most general unifier sigma of the set {t1 =. t1',...,tn =. tn'} so that
|
||||
* sigma(t1) = sigma(t1') , ... sigma(tn) = sigma(tn').
|
||||
* @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.
|
||||
*/
|
||||
public Optional<Unifier> unify(Set<UnifyType> terms);
|
||||
|
||||
/**
|
||||
* Finds the most general unifier sigma of the set {t1 =. t1',...,tn =. tn'} so that
|
||||
* sigma(t1) = sigma(t1') , ... sigma(tn) = sigma(tn').
|
||||
* @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.
|
||||
*/
|
||||
default public Optional<Unifier> unify(UnifyType... terms) {
|
||||
return unify(Arrays.stream(terms).collect(Collectors.toSet()));
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,96 +1,96 @@
|
||||
package de.dhbwstuttgart.typeinference.unify.model;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.HashMap;
|
||||
import java.util.Set;
|
||||
|
||||
import de.dhbwstuttgart.typeinference.unify.interfaces.IFiniteClosure;
|
||||
import de.dhbwstuttgart.typeinference.unify.interfaces.UnifyTypeVisitor;
|
||||
|
||||
/**
|
||||
* An extends wildcard type "? extends T".
|
||||
*/
|
||||
public final class ExtendsType extends WildcardType {
|
||||
|
||||
public <T> UnifyType accept(UnifyTypeVisitor<T> visitor, T ht) {
|
||||
return visitor.visit(this, ht);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new extends wildcard type.
|
||||
* @param extendedType The extended type e.g. Integer in "? extends Integer"
|
||||
*/
|
||||
public ExtendsType(UnifyType extendedType) {
|
||||
super("? extends " + extendedType.getName(), extendedType);
|
||||
if (extendedType instanceof ExtendsType) {
|
||||
System.out.print("");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* The extended type e.g. Integer in "? extends Integer"
|
||||
*/
|
||||
public UnifyType getExtendedType() {
|
||||
return wildcardedType;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the type parameters of the wildcarded type and returns a new extendstype that extends that type.
|
||||
*/
|
||||
@Override
|
||||
public UnifyType setTypeParams(TypeParams newTp) {
|
||||
UnifyType newType = wildcardedType.setTypeParams(newTp);
|
||||
if(newType == wildcardedType)
|
||||
return this; // Reduced the amount of objects created
|
||||
return new ExtendsType(wildcardedType.setTypeParams(newTp));
|
||||
}
|
||||
|
||||
@Override
|
||||
Set<UnifyType> smArg(IFiniteClosure fc, Set<UnifyType> fBounded) {
|
||||
return fc.smArg(this, fBounded);
|
||||
}
|
||||
|
||||
@Override
|
||||
Set<UnifyType> grArg(IFiniteClosure fc, Set<UnifyType> fBounded) {
|
||||
return fc.grArg(this, fBounded);
|
||||
}
|
||||
|
||||
@Override
|
||||
UnifyType apply(Unifier unif) {
|
||||
UnifyType newType = wildcardedType.apply(unif);
|
||||
if(newType.hashCode() == wildcardedType.hashCode() && newType.equals(wildcardedType))
|
||||
return this; // Reduced the amount of objects created
|
||||
return new ExtendsType(newType);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
return wildcardedType.hashCode() + 229;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if(!(obj instanceof ExtendsType))
|
||||
return false;
|
||||
|
||||
if(obj.hashCode() != this.hashCode())
|
||||
return false;
|
||||
|
||||
ExtendsType other = (ExtendsType) obj;
|
||||
|
||||
|
||||
return other.getWildcardedType().equals(wildcardedType);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "? extends " + wildcardedType;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
package de.dhbwstuttgart.typeinference.unify.model;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.HashMap;
|
||||
import java.util.Set;
|
||||
|
||||
import de.dhbwstuttgart.typeinference.unify.interfaces.IFiniteClosure;
|
||||
import de.dhbwstuttgart.typeinference.unify.interfaces.UnifyTypeVisitor;
|
||||
|
||||
/**
|
||||
* An extends wildcard type "? extends T".
|
||||
*/
|
||||
public final class ExtendsType extends WildcardType {
|
||||
|
||||
public <T> UnifyType accept(UnifyTypeVisitor<T> visitor, T ht) {
|
||||
return visitor.visit(this, ht);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new extends wildcard type.
|
||||
* @param extendedType The extended type e.g. Integer in "? extends Integer"
|
||||
*/
|
||||
public ExtendsType(UnifyType extendedType) {
|
||||
super("? extends " + extendedType.getName(), extendedType);
|
||||
if (extendedType instanceof ExtendsType) {
|
||||
System.out.print("");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* The extended type e.g. Integer in "? extends Integer"
|
||||
*/
|
||||
public UnifyType getExtendedType() {
|
||||
return wildcardedType;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the type parameters of the wildcarded type and returns a new extendstype that extends that type.
|
||||
*/
|
||||
@Override
|
||||
public UnifyType setTypeParams(TypeParams newTp) {
|
||||
UnifyType newType = wildcardedType.setTypeParams(newTp);
|
||||
if(newType == wildcardedType)
|
||||
return this; // Reduced the amount of objects created
|
||||
return new ExtendsType(wildcardedType.setTypeParams(newTp));
|
||||
}
|
||||
|
||||
@Override
|
||||
Set<UnifyType> smArg(IFiniteClosure fc, Set<UnifyType> fBounded) {
|
||||
return fc.smArg(this, fBounded);
|
||||
}
|
||||
|
||||
@Override
|
||||
Set<UnifyType> grArg(IFiniteClosure fc, Set<UnifyType> fBounded) {
|
||||
return fc.grArg(this, fBounded);
|
||||
}
|
||||
|
||||
@Override
|
||||
UnifyType apply(Unifier unif) {
|
||||
UnifyType newType = wildcardedType.apply(unif);
|
||||
if(newType.hashCode() == wildcardedType.hashCode() && newType.equals(wildcardedType))
|
||||
return this; // Reduced the amount of objects created
|
||||
return new ExtendsType(newType);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
return wildcardedType.hashCode() + 229;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if(!(obj instanceof ExtendsType))
|
||||
return false;
|
||||
|
||||
if(obj.hashCode() != this.hashCode())
|
||||
return false;
|
||||
|
||||
ExtendsType other = (ExtendsType) obj;
|
||||
|
||||
|
||||
return other.getWildcardedType().equals(wildcardedType);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "? extends " + wildcardedType;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -1,103 +1,103 @@
|
||||
package de.dhbwstuttgart.typeinference.unify.model;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.Set;
|
||||
|
||||
import de.dhbwstuttgart.typeinference.unify.interfaces.IFiniteClosure;
|
||||
import de.dhbwstuttgart.typeinference.unify.interfaces.UnifyTypeVisitor;
|
||||
|
||||
/**
|
||||
* A real function type in java.
|
||||
* @author Florian Steurer
|
||||
*/
|
||||
public class FunNType extends UnifyType {
|
||||
|
||||
public <T> UnifyType accept(UnifyTypeVisitor<T> visitor, T ht) {
|
||||
return visitor.visit(this, ht);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a FunN-Type with the specified TypeParameters.
|
||||
*/
|
||||
protected FunNType(TypeParams p) {
|
||||
super("Fun"+(p.size()-1)+"$$", p);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new FunNType.
|
||||
* @param tp The parameters of the type.
|
||||
* @return A FunNType.
|
||||
* @throws IllegalArgumentException is thrown when there are to few type parameters or there are wildcard-types.
|
||||
*/
|
||||
public static FunNType getFunNType(TypeParams tp) throws IllegalArgumentException {
|
||||
if(tp.size() == 0)
|
||||
throw new IllegalArgumentException("FunNTypes need at least one type parameter");
|
||||
for(UnifyType t : tp)
|
||||
if(t instanceof WildcardType)
|
||||
throw new IllegalArgumentException("Invalid TypeParams for a FunNType: " + tp);
|
||||
return new FunNType(tp);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the degree of the function type, e.g. 2 for FunN<Integer, Integer, Integer>.
|
||||
*/
|
||||
public int getN() {
|
||||
return typeParams.size()-1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public UnifyType setTypeParams(TypeParams newTp) {
|
||||
if(newTp.hashCode() == typeParams.hashCode() && newTp.equals(typeParams))
|
||||
return this;
|
||||
return getFunNType(newTp);
|
||||
}
|
||||
|
||||
@Override
|
||||
Set<UnifyType> smArg(IFiniteClosure fc, Set<UnifyType> fBounded) {
|
||||
return fc.smArg(this, fBounded);
|
||||
}
|
||||
|
||||
@Override
|
||||
Set<UnifyType> grArg(IFiniteClosure fc, Set<UnifyType> fBounded) {
|
||||
return fc.grArg(this, fBounded);
|
||||
}
|
||||
|
||||
@Override
|
||||
UnifyType apply(Unifier unif) {
|
||||
// TODO this bypasses the validation of the type parameters.
|
||||
// Wildcard types can be unified into FunNTypes.
|
||||
TypeParams newParams = typeParams.apply(unif);
|
||||
if(newParams.hashCode() == typeParams.hashCode() && newParams.equals(typeParams))
|
||||
return this;
|
||||
|
||||
return new FunNType(newParams);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean wrongWildcard() {
|
||||
return (new ArrayList<UnifyType>(Arrays.asList(getTypeParams()
|
||||
.get())).stream().filter(x -> (x instanceof WildcardType)).findFirst().isPresent());
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return 181 + typeParams.hashCode();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if(!(obj instanceof FunNType))
|
||||
return false;
|
||||
|
||||
if(obj.hashCode() != this.hashCode())
|
||||
return false;
|
||||
|
||||
FunNType other = (FunNType) obj;
|
||||
|
||||
return other.getTypeParams().equals(typeParams);
|
||||
}
|
||||
|
||||
}
|
||||
package de.dhbwstuttgart.typeinference.unify.model;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.Set;
|
||||
|
||||
import de.dhbwstuttgart.typeinference.unify.interfaces.IFiniteClosure;
|
||||
import de.dhbwstuttgart.typeinference.unify.interfaces.UnifyTypeVisitor;
|
||||
|
||||
/**
|
||||
* A real function type in java.
|
||||
* @author Florian Steurer
|
||||
*/
|
||||
public class FunNType extends UnifyType {
|
||||
|
||||
public <T> UnifyType accept(UnifyTypeVisitor<T> visitor, T ht) {
|
||||
return visitor.visit(this, ht);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a FunN-Type with the specified TypeParameters.
|
||||
*/
|
||||
protected FunNType(TypeParams p) {
|
||||
super("Fun"+(p.size()-1)+"$$", p);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new FunNType.
|
||||
* @param tp The parameters of the type.
|
||||
* @return A FunNType.
|
||||
* @throws IllegalArgumentException is thrown when there are to few type parameters or there are wildcard-types.
|
||||
*/
|
||||
public static FunNType getFunNType(TypeParams tp) throws IllegalArgumentException {
|
||||
if(tp.size() == 0)
|
||||
throw new IllegalArgumentException("FunNTypes need at least one type parameter");
|
||||
for(UnifyType t : tp)
|
||||
if(t instanceof WildcardType)
|
||||
throw new IllegalArgumentException("Invalid TypeParams for a FunNType: " + tp);
|
||||
return new FunNType(tp);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the degree of the function type, e.g. 2 for FunN<Integer, Integer, Integer>.
|
||||
*/
|
||||
public int getN() {
|
||||
return typeParams.size()-1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public UnifyType setTypeParams(TypeParams newTp) {
|
||||
if(newTp.hashCode() == typeParams.hashCode() && newTp.equals(typeParams))
|
||||
return this;
|
||||
return getFunNType(newTp);
|
||||
}
|
||||
|
||||
@Override
|
||||
Set<UnifyType> smArg(IFiniteClosure fc, Set<UnifyType> fBounded) {
|
||||
return fc.smArg(this, fBounded);
|
||||
}
|
||||
|
||||
@Override
|
||||
Set<UnifyType> grArg(IFiniteClosure fc, Set<UnifyType> fBounded) {
|
||||
return fc.grArg(this, fBounded);
|
||||
}
|
||||
|
||||
@Override
|
||||
UnifyType apply(Unifier unif) {
|
||||
// TODO this bypasses the validation of the type parameters.
|
||||
// Wildcard types can be unified into FunNTypes.
|
||||
TypeParams newParams = typeParams.apply(unif);
|
||||
if(newParams.hashCode() == typeParams.hashCode() && newParams.equals(typeParams))
|
||||
return this;
|
||||
|
||||
return new FunNType(newParams);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean wrongWildcard() {
|
||||
return (new ArrayList<UnifyType>(Arrays.asList(getTypeParams()
|
||||
.get())).stream().filter(x -> (x instanceof WildcardType)).findFirst().isPresent());
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return 181 + typeParams.hashCode();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if(!(obj instanceof FunNType))
|
||||
return false;
|
||||
|
||||
if(obj.hashCode() != this.hashCode())
|
||||
return false;
|
||||
|
||||
FunNType other = (FunNType) obj;
|
||||
|
||||
return other.getTypeParams().equals(typeParams);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,100 +1,100 @@
|
||||
package de.dhbwstuttgart.typeinference.unify.model;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* A node of a directed graph.
|
||||
* @author Florian Steurer
|
||||
*
|
||||
* @param <T> The type of the content of the node.
|
||||
*/
|
||||
class Node<T> {
|
||||
|
||||
/**
|
||||
* The content of the node.
|
||||
*/
|
||||
private T content;
|
||||
|
||||
/**
|
||||
* The set of predecessors
|
||||
*/
|
||||
private HashSet<Node<T>> predecessors = new HashSet<>();
|
||||
|
||||
/**
|
||||
* The set of descendants
|
||||
*/
|
||||
private HashSet<Node<T>> descendants = new HashSet<>();
|
||||
|
||||
/**
|
||||
* Creates a node containing the specified content.
|
||||
*/
|
||||
public Node(T content) {
|
||||
this.content = content;
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a directed edge from this node to the descendant (this -> descendant)
|
||||
*/
|
||||
public void addDescendant(Node<T> descendant) {
|
||||
if(descendants.contains(descendant))
|
||||
return;
|
||||
|
||||
descendants.add(descendant);
|
||||
descendant.addPredecessor(this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a directed edge from the predecessor to this node (predecessor -> this)
|
||||
*/
|
||||
public void addPredecessor(Node<T> predecessor) {
|
||||
if(predecessors.contains(predecessor))
|
||||
return;
|
||||
|
||||
predecessors.add(predecessor);
|
||||
predecessor.addDescendant(this);
|
||||
}
|
||||
|
||||
/**
|
||||
* The content of this node.
|
||||
*/
|
||||
public T getContent() {
|
||||
return content;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns all predecessors (nodes that have a directed edge to this node)
|
||||
*/
|
||||
public Set<Node<T>> getPredecessors() {
|
||||
return predecessors;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns all descendants. All nodes M, where there is a edge from this node to the node M.
|
||||
* @return
|
||||
*/
|
||||
public Set<Node<T>> getDescendants() {
|
||||
return descendants;
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves the content of all descendants.
|
||||
*/
|
||||
public Set<T> getContentOfDescendants() {
|
||||
return descendants.stream().map(x -> x.getContent()).collect(Collectors.toSet());
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves the content of all predecessors.
|
||||
*/
|
||||
public Set<T> getContentOfPredecessors() {
|
||||
return predecessors.stream().map(x -> x.getContent()).collect(Collectors.toSet());
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "Elem: Node(" + content.toString() + ")\nPrec: " + getContentOfPredecessors().toString()
|
||||
+ "\nDesc: " + getContentOfDescendants().toString() + "\n\n";
|
||||
}
|
||||
}
|
||||
package de.dhbwstuttgart.typeinference.unify.model;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* A node of a directed graph.
|
||||
* @author Florian Steurer
|
||||
*
|
||||
* @param <T> The type of the content of the node.
|
||||
*/
|
||||
class Node<T> {
|
||||
|
||||
/**
|
||||
* The content of the node.
|
||||
*/
|
||||
private T content;
|
||||
|
||||
/**
|
||||
* The set of predecessors
|
||||
*/
|
||||
private HashSet<Node<T>> predecessors = new HashSet<>();
|
||||
|
||||
/**
|
||||
* The set of descendants
|
||||
*/
|
||||
private HashSet<Node<T>> descendants = new HashSet<>();
|
||||
|
||||
/**
|
||||
* Creates a node containing the specified content.
|
||||
*/
|
||||
public Node(T content) {
|
||||
this.content = content;
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a directed edge from this node to the descendant (this -> descendant)
|
||||
*/
|
||||
public void addDescendant(Node<T> descendant) {
|
||||
if(descendants.contains(descendant))
|
||||
return;
|
||||
|
||||
descendants.add(descendant);
|
||||
descendant.addPredecessor(this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a directed edge from the predecessor to this node (predecessor -> this)
|
||||
*/
|
||||
public void addPredecessor(Node<T> predecessor) {
|
||||
if(predecessors.contains(predecessor))
|
||||
return;
|
||||
|
||||
predecessors.add(predecessor);
|
||||
predecessor.addDescendant(this);
|
||||
}
|
||||
|
||||
/**
|
||||
* The content of this node.
|
||||
*/
|
||||
public T getContent() {
|
||||
return content;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns all predecessors (nodes that have a directed edge to this node)
|
||||
*/
|
||||
public Set<Node<T>> getPredecessors() {
|
||||
return predecessors;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns all descendants. All nodes M, where there is a edge from this node to the node M.
|
||||
* @return
|
||||
*/
|
||||
public Set<Node<T>> getDescendants() {
|
||||
return descendants;
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves the content of all descendants.
|
||||
*/
|
||||
public Set<T> getContentOfDescendants() {
|
||||
return descendants.stream().map(x -> x.getContent()).collect(Collectors.toSet());
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves the content of all predecessors.
|
||||
*/
|
||||
public Set<T> getContentOfPredecessors() {
|
||||
return predecessors.stream().map(x -> x.getContent()).collect(Collectors.toSet());
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "Elem: Node(" + content.toString() + ")\nPrec: " + getContentOfPredecessors().toString()
|
||||
+ "\nDesc: " + getContentOfDescendants().toString() + "\n\n";
|
||||
}
|
||||
}
|
||||
|
@ -1,195 +1,195 @@
|
||||
package de.dhbwstuttgart.typeinference.unify.model;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileWriter;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.Random;
|
||||
import java.util.Set;
|
||||
|
||||
import de.dhbwstuttgart.typeinference.unify.distributeVariance;
|
||||
import de.dhbwstuttgart.typeinference.unify.interfaces.IFiniteClosure;
|
||||
import de.dhbwstuttgart.typeinference.unify.interfaces.UnifyTypeVisitor;
|
||||
|
||||
/**
|
||||
* An unbounded placeholder type.
|
||||
* @author Florian Steurer
|
||||
*/
|
||||
public final class PlaceholderType extends UnifyType{
|
||||
|
||||
/**
|
||||
* Static list containing the names of all existing placeholders.
|
||||
* Used for generating fresh placeholders.
|
||||
*/
|
||||
public static final ArrayList<String> EXISTING_PLACEHOLDERS = new ArrayList<String>();
|
||||
|
||||
/**
|
||||
* Prefix of auto-generated placeholder names.
|
||||
*/
|
||||
protected static String nextName = "gen_";
|
||||
|
||||
/**
|
||||
* Random number generator used to generate fresh placeholder name.
|
||||
*/
|
||||
protected static Random rnd = new Random(43558747548978L);
|
||||
|
||||
/**
|
||||
* True if this object was auto-generated, false if this object was user-generated.
|
||||
*/
|
||||
private final boolean IsGenerated;
|
||||
|
||||
|
||||
/**
|
||||
* isWildcardable gibt an, ob ein Wildcardtyp dem PlaceholderType zugeordnet werden darf
|
||||
*/
|
||||
private boolean wildcardable = true;
|
||||
|
||||
/**
|
||||
* is innerType gibt an, ob der Type des PlaceholderType innerhalb eines Typkonstruktorsverwendet wird
|
||||
*/
|
||||
private boolean innerType = false;
|
||||
|
||||
/**
|
||||
* variance shows the variance of the pair
|
||||
* -1: contravariant
|
||||
* 1 covariant
|
||||
* 0 invariant
|
||||
* PL 2018-03-21
|
||||
*/
|
||||
private int variance = 0;
|
||||
|
||||
/**
|
||||
* Creates a new placeholder type with the specified name.
|
||||
*/
|
||||
public PlaceholderType(String name) {
|
||||
super(name, new TypeParams());
|
||||
EXISTING_PLACEHOLDERS.add(name); // Add to list of existing placeholder names
|
||||
IsGenerated = false; // This type is user generated
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new placeholdertype
|
||||
* @param isGenerated true if this placeholder is auto-generated, false if it is user-generated.
|
||||
*/
|
||||
protected PlaceholderType(String name, boolean isGenerated) {
|
||||
super(name, new TypeParams());
|
||||
EXISTING_PLACEHOLDERS.add(name); // Add to list of existing placeholder names
|
||||
IsGenerated = isGenerated;
|
||||
}
|
||||
|
||||
public <T> UnifyType accept(UnifyTypeVisitor<T> visitor, T ht) {
|
||||
return visitor.visit(this, ht);
|
||||
}
|
||||
|
||||
/**
|
||||
* 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.
|
||||
* @return A fresh placeholder type.
|
||||
*/
|
||||
public synchronized static PlaceholderType freshPlaceholder() {
|
||||
String name = nextName + (char) (rnd.nextInt(22) + 97); // Returns random char between 'a' and 'z'
|
||||
// Add random chars while the name is in use.
|
||||
while(EXISTING_PLACEHOLDERS.contains(name)) {
|
||||
name += (char) (rnd.nextInt(22) + 97); // Returns random char between 'a' and 'z'
|
||||
}
|
||||
return new PlaceholderType(name, true);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* True if this placeholder is auto-generated, false if it is user-generated.
|
||||
*/
|
||||
public boolean isGenerated() {
|
||||
return IsGenerated;
|
||||
}
|
||||
|
||||
public void setVariance(int v) {
|
||||
variance = v;
|
||||
}
|
||||
|
||||
public int getVariance() {
|
||||
return variance;
|
||||
}
|
||||
|
||||
public void reversVariance() {
|
||||
if (variance == 1) {
|
||||
setVariance(-1);
|
||||
} else {
|
||||
if (variance == -1) {
|
||||
setVariance(1);
|
||||
}}
|
||||
}
|
||||
|
||||
public Boolean isWildcardable() {
|
||||
return wildcardable;
|
||||
}
|
||||
public void disableWildcardtable() {
|
||||
wildcardable = false;
|
||||
}
|
||||
|
||||
public void enableWildcardtable() {
|
||||
wildcardable = true;
|
||||
}
|
||||
|
||||
public void setWildcardtable(Boolean wildcardable) {
|
||||
this.wildcardable = wildcardable;
|
||||
}
|
||||
|
||||
public Boolean isInnerType() {
|
||||
return innerType;
|
||||
}
|
||||
|
||||
public void setInnerType(Boolean innerType) {
|
||||
this.innerType = innerType;
|
||||
}
|
||||
|
||||
@Override
|
||||
Set<UnifyType> smArg(IFiniteClosure fc, Set<UnifyType> fBounded) {
|
||||
return fc.smArg(this, fBounded);
|
||||
}
|
||||
|
||||
@Override
|
||||
Set<UnifyType> grArg(IFiniteClosure fc, Set<UnifyType> fBounded) {
|
||||
return fc.grArg(this, fBounded);
|
||||
}
|
||||
|
||||
@Override
|
||||
public UnifyType setTypeParams(TypeParams newTp) {
|
||||
return this; // Placeholders never have params.
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return typeName.hashCode();
|
||||
}
|
||||
|
||||
@Override
|
||||
UnifyType apply(Unifier unif) {
|
||||
if(unif.hasSubstitute(this)) {
|
||||
UnifyType ret = unif.getSubstitute(this);
|
||||
//PL 2018-05-17 Auskommentierung muesste korrekt sein,
|
||||
//bereits in JavaTXComplier Variancen gesetzt werden.
|
||||
//ret.accept(new distributeVariance(), this.getVariance());
|
||||
return ret;
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if(!(obj instanceof PlaceholderType))
|
||||
return false;
|
||||
|
||||
return ((PlaceholderType) obj).getName().equals(typeName);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public Collection<PlaceholderType> getInvolvedPlaceholderTypes() {
|
||||
ArrayList<PlaceholderType> ret = new ArrayList<>();
|
||||
ret.add(this);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
package de.dhbwstuttgart.typeinference.unify.model;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileWriter;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.Random;
|
||||
import java.util.Set;
|
||||
|
||||
import de.dhbwstuttgart.typeinference.unify.distributeVariance;
|
||||
import de.dhbwstuttgart.typeinference.unify.interfaces.IFiniteClosure;
|
||||
import de.dhbwstuttgart.typeinference.unify.interfaces.UnifyTypeVisitor;
|
||||
|
||||
/**
|
||||
* An unbounded placeholder type.
|
||||
* @author Florian Steurer
|
||||
*/
|
||||
public final class PlaceholderType extends UnifyType{
|
||||
|
||||
/**
|
||||
* Static list containing the names of all existing placeholders.
|
||||
* Used for generating fresh placeholders.
|
||||
*/
|
||||
public static final ArrayList<String> EXISTING_PLACEHOLDERS = new ArrayList<String>();
|
||||
|
||||
/**
|
||||
* Prefix of auto-generated placeholder names.
|
||||
*/
|
||||
protected static String nextName = "gen_";
|
||||
|
||||
/**
|
||||
* Random number generator used to generate fresh placeholder name.
|
||||
*/
|
||||
protected static Random rnd = new Random(43558747548978L);
|
||||
|
||||
/**
|
||||
* True if this object was auto-generated, false if this object was user-generated.
|
||||
*/
|
||||
private final boolean IsGenerated;
|
||||
|
||||
|
||||
/**
|
||||
* isWildcardable gibt an, ob ein Wildcardtyp dem PlaceholderType zugeordnet werden darf
|
||||
*/
|
||||
private boolean wildcardable = true;
|
||||
|
||||
/**
|
||||
* is innerType gibt an, ob der Type des PlaceholderType innerhalb eines Typkonstruktorsverwendet wird
|
||||
*/
|
||||
private boolean innerType = false;
|
||||
|
||||
/**
|
||||
* variance shows the variance of the pair
|
||||
* -1: contravariant
|
||||
* 1 covariant
|
||||
* 0 invariant
|
||||
* PL 2018-03-21
|
||||
*/
|
||||
private int variance = 0;
|
||||
|
||||
/**
|
||||
* Creates a new placeholder type with the specified name.
|
||||
*/
|
||||
public PlaceholderType(String name) {
|
||||
super(name, new TypeParams());
|
||||
EXISTING_PLACEHOLDERS.add(name); // Add to list of existing placeholder names
|
||||
IsGenerated = false; // This type is user generated
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new placeholdertype
|
||||
* @param isGenerated true if this placeholder is auto-generated, false if it is user-generated.
|
||||
*/
|
||||
protected PlaceholderType(String name, boolean isGenerated) {
|
||||
super(name, new TypeParams());
|
||||
EXISTING_PLACEHOLDERS.add(name); // Add to list of existing placeholder names
|
||||
IsGenerated = isGenerated;
|
||||
}
|
||||
|
||||
public <T> UnifyType accept(UnifyTypeVisitor<T> visitor, T ht) {
|
||||
return visitor.visit(this, ht);
|
||||
}
|
||||
|
||||
/**
|
||||
* 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.
|
||||
* @return A fresh placeholder type.
|
||||
*/
|
||||
public synchronized static PlaceholderType freshPlaceholder() {
|
||||
String name = nextName + (char) (rnd.nextInt(22) + 97); // Returns random char between 'a' and 'z'
|
||||
// Add random chars while the name is in use.
|
||||
while(EXISTING_PLACEHOLDERS.contains(name)) {
|
||||
name += (char) (rnd.nextInt(22) + 97); // Returns random char between 'a' and 'z'
|
||||
}
|
||||
return new PlaceholderType(name, true);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* True if this placeholder is auto-generated, false if it is user-generated.
|
||||
*/
|
||||
public boolean isGenerated() {
|
||||
return IsGenerated;
|
||||
}
|
||||
|
||||
public void setVariance(int v) {
|
||||
variance = v;
|
||||
}
|
||||
|
||||
public int getVariance() {
|
||||
return variance;
|
||||
}
|
||||
|
||||
public void reversVariance() {
|
||||
if (variance == 1) {
|
||||
setVariance(-1);
|
||||
} else {
|
||||
if (variance == -1) {
|
||||
setVariance(1);
|
||||
}}
|
||||
}
|
||||
|
||||
public Boolean isWildcardable() {
|
||||
return wildcardable;
|
||||
}
|
||||
public void disableWildcardtable() {
|
||||
wildcardable = false;
|
||||
}
|
||||
|
||||
public void enableWildcardtable() {
|
||||
wildcardable = true;
|
||||
}
|
||||
|
||||
public void setWildcardtable(Boolean wildcardable) {
|
||||
this.wildcardable = wildcardable;
|
||||
}
|
||||
|
||||
public Boolean isInnerType() {
|
||||
return innerType;
|
||||
}
|
||||
|
||||
public void setInnerType(Boolean innerType) {
|
||||
this.innerType = innerType;
|
||||
}
|
||||
|
||||
@Override
|
||||
Set<UnifyType> smArg(IFiniteClosure fc, Set<UnifyType> fBounded) {
|
||||
return fc.smArg(this, fBounded);
|
||||
}
|
||||
|
||||
@Override
|
||||
Set<UnifyType> grArg(IFiniteClosure fc, Set<UnifyType> fBounded) {
|
||||
return fc.grArg(this, fBounded);
|
||||
}
|
||||
|
||||
@Override
|
||||
public UnifyType setTypeParams(TypeParams newTp) {
|
||||
return this; // Placeholders never have params.
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return typeName.hashCode();
|
||||
}
|
||||
|
||||
@Override
|
||||
UnifyType apply(Unifier unif) {
|
||||
if(unif.hasSubstitute(this)) {
|
||||
UnifyType ret = unif.getSubstitute(this);
|
||||
//PL 2018-05-17 Auskommentierung muesste korrekt sein,
|
||||
//bereits in JavaTXComplier Variancen gesetzt werden.
|
||||
//ret.accept(new distributeVariance(), this.getVariance());
|
||||
return ret;
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if(!(obj instanceof PlaceholderType))
|
||||
return false;
|
||||
|
||||
return ((PlaceholderType) obj).getName().equals(typeName);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public Collection<PlaceholderType> getInvolvedPlaceholderTypes() {
|
||||
ArrayList<PlaceholderType> ret = new ArrayList<>();
|
||||
ret.add(this);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
@ -1,100 +1,100 @@
|
||||
package de.dhbwstuttgart.typeinference.unify.model;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Set;
|
||||
|
||||
import de.dhbwstuttgart.typeinference.unify.interfaces.IFiniteClosure;
|
||||
import de.dhbwstuttgart.typeinference.unify.interfaces.UnifyTypeVisitor;
|
||||
|
||||
/**
|
||||
* A reference type e.q. Integer or List<T>.
|
||||
* @author Florian Steurer
|
||||
*
|
||||
*/
|
||||
public class ReferenceType extends UnifyType {
|
||||
|
||||
/**
|
||||
* The buffered hashCode
|
||||
*/
|
||||
private final int hashCode;
|
||||
|
||||
/**
|
||||
* gibt an, ob der ReferenceType eine generische Typvariable ist
|
||||
*/
|
||||
private final boolean genericTypeVar;
|
||||
|
||||
|
||||
public <T> UnifyType accept(UnifyTypeVisitor<T> visitor, T ht) {
|
||||
return visitor.visit(this, ht);
|
||||
}
|
||||
|
||||
public ReferenceType(String name, Boolean genericTypeVar) {
|
||||
super(name, new TypeParams());
|
||||
hashCode = 31 + 17 * typeName.hashCode() + 17 * typeParams.hashCode();
|
||||
this.genericTypeVar = genericTypeVar;
|
||||
}
|
||||
|
||||
public ReferenceType(String name, UnifyType... params) {
|
||||
super(name, new TypeParams(params));
|
||||
hashCode = 31 + 17 * typeName.hashCode() + 17 * typeParams.hashCode();
|
||||
genericTypeVar = false;
|
||||
}
|
||||
|
||||
public ReferenceType(String name, TypeParams params) {
|
||||
super(name, params);
|
||||
hashCode = 31 + 17 * typeName.hashCode() + 17 * typeParams.hashCode();
|
||||
genericTypeVar = false;
|
||||
}
|
||||
|
||||
public boolean isGenTypeVar () {
|
||||
return genericTypeVar;
|
||||
}
|
||||
|
||||
@Override
|
||||
Set<UnifyType> smArg(IFiniteClosure fc, Set<UnifyType> fBounded) {
|
||||
return fc.smArg(this, fBounded);
|
||||
}
|
||||
|
||||
@Override
|
||||
Set<UnifyType> grArg(IFiniteClosure fc, Set<UnifyType> fBounded) {
|
||||
return fc.grArg(this, fBounded);
|
||||
}
|
||||
|
||||
@Override
|
||||
UnifyType apply(Unifier unif) {
|
||||
TypeParams newParams = typeParams.apply(unif);
|
||||
|
||||
if(newParams.hashCode() == typeParams.hashCode() && newParams.equals(typeParams))
|
||||
return this;
|
||||
|
||||
return new ReferenceType(typeName, newParams);
|
||||
}
|
||||
|
||||
@Override
|
||||
public UnifyType setTypeParams(TypeParams newTp) {
|
||||
if(newTp.hashCode() == typeParams.hashCode() && newTp.equals(typeParams))
|
||||
return this; // reduced the amount of objects created
|
||||
return new ReferenceType(typeName, newTp);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return hashCode;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if(!(obj instanceof ReferenceType))
|
||||
return false;
|
||||
|
||||
if(obj.hashCode() != this.hashCode())
|
||||
return false;
|
||||
|
||||
ReferenceType other = (ReferenceType) obj;
|
||||
|
||||
if(!other.getName().equals(typeName))
|
||||
return false;
|
||||
|
||||
return other.getTypeParams().equals(typeParams);
|
||||
}
|
||||
}
|
||||
package de.dhbwstuttgart.typeinference.unify.model;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Set;
|
||||
|
||||
import de.dhbwstuttgart.typeinference.unify.interfaces.IFiniteClosure;
|
||||
import de.dhbwstuttgart.typeinference.unify.interfaces.UnifyTypeVisitor;
|
||||
|
||||
/**
|
||||
* A reference type e.q. Integer or List<T>.
|
||||
* @author Florian Steurer
|
||||
*
|
||||
*/
|
||||
public class ReferenceType extends UnifyType {
|
||||
|
||||
/**
|
||||
* The buffered hashCode
|
||||
*/
|
||||
private final int hashCode;
|
||||
|
||||
/**
|
||||
* gibt an, ob der ReferenceType eine generische Typvariable ist
|
||||
*/
|
||||
private final boolean genericTypeVar;
|
||||
|
||||
|
||||
public <T> UnifyType accept(UnifyTypeVisitor<T> visitor, T ht) {
|
||||
return visitor.visit(this, ht);
|
||||
}
|
||||
|
||||
public ReferenceType(String name, Boolean genericTypeVar) {
|
||||
super(name, new TypeParams());
|
||||
hashCode = 31 + 17 * typeName.hashCode() + 17 * typeParams.hashCode();
|
||||
this.genericTypeVar = genericTypeVar;
|
||||
}
|
||||
|
||||
public ReferenceType(String name, UnifyType... params) {
|
||||
super(name, new TypeParams(params));
|
||||
hashCode = 31 + 17 * typeName.hashCode() + 17 * typeParams.hashCode();
|
||||
genericTypeVar = false;
|
||||
}
|
||||
|
||||
public ReferenceType(String name, TypeParams params) {
|
||||
super(name, params);
|
||||
hashCode = 31 + 17 * typeName.hashCode() + 17 * typeParams.hashCode();
|
||||
genericTypeVar = false;
|
||||
}
|
||||
|
||||
public boolean isGenTypeVar () {
|
||||
return genericTypeVar;
|
||||
}
|
||||
|
||||
@Override
|
||||
Set<UnifyType> smArg(IFiniteClosure fc, Set<UnifyType> fBounded) {
|
||||
return fc.smArg(this, fBounded);
|
||||
}
|
||||
|
||||
@Override
|
||||
Set<UnifyType> grArg(IFiniteClosure fc, Set<UnifyType> fBounded) {
|
||||
return fc.grArg(this, fBounded);
|
||||
}
|
||||
|
||||
@Override
|
||||
UnifyType apply(Unifier unif) {
|
||||
TypeParams newParams = typeParams.apply(unif);
|
||||
|
||||
if(newParams.hashCode() == typeParams.hashCode() && newParams.equals(typeParams))
|
||||
return this;
|
||||
|
||||
return new ReferenceType(typeName, newParams);
|
||||
}
|
||||
|
||||
@Override
|
||||
public UnifyType setTypeParams(TypeParams newTp) {
|
||||
if(newTp.hashCode() == typeParams.hashCode() && newTp.equals(typeParams))
|
||||
return this; // reduced the amount of objects created
|
||||
return new ReferenceType(typeName, newTp);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return hashCode;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if(!(obj instanceof ReferenceType))
|
||||
return false;
|
||||
|
||||
if(obj.hashCode() != this.hashCode())
|
||||
return false;
|
||||
|
||||
ReferenceType other = (ReferenceType) obj;
|
||||
|
||||
if(!other.getName().equals(typeName))
|
||||
return false;
|
||||
|
||||
return other.getTypeParams().equals(typeParams);
|
||||
}
|
||||
}
|
||||
|
@ -1,88 +1,88 @@
|
||||
package de.dhbwstuttgart.typeinference.unify.model;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Set;
|
||||
|
||||
import de.dhbwstuttgart.typeinference.unify.interfaces.IFiniteClosure;
|
||||
import de.dhbwstuttgart.typeinference.unify.interfaces.UnifyTypeVisitor;
|
||||
|
||||
/**
|
||||
* A super wildcard type e.g. ? super Integer.
|
||||
* @author Florian Steurer
|
||||
*/
|
||||
public final class SuperType extends WildcardType {
|
||||
|
||||
public <T> UnifyType accept(UnifyTypeVisitor<T> visitor, T ht) {
|
||||
return visitor.visit(this, ht);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new instance "? extends superedType"
|
||||
* @param superedType The type that is supered e.g. Integer in "? super Integer"
|
||||
*/
|
||||
public SuperType(UnifyType superedType) {
|
||||
super("? super " + superedType.getName(), superedType);
|
||||
}
|
||||
|
||||
/**
|
||||
* The type that is supered e.g. Integer in "? super Integer"
|
||||
*/
|
||||
public UnifyType getSuperedType() {
|
||||
return wildcardedType;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "? super " + wildcardedType;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the type parameters of the wildcarded type and returns a new supertype that supers that type.
|
||||
*/
|
||||
@Override
|
||||
public UnifyType setTypeParams(TypeParams newTp) {
|
||||
UnifyType newType = wildcardedType.setTypeParams(newTp);
|
||||
if(newType == wildcardedType)
|
||||
return this; // Reduced the amount of objects created
|
||||
return new SuperType(wildcardedType.setTypeParams(newTp));
|
||||
}
|
||||
|
||||
@Override
|
||||
Set<UnifyType> smArg(IFiniteClosure fc, Set<UnifyType> fBounded) {
|
||||
return fc.smArg(this, fBounded);
|
||||
}
|
||||
|
||||
@Override
|
||||
Set<UnifyType> grArg(IFiniteClosure fc, Set<UnifyType> fBounded) {
|
||||
return fc.grArg(this, fBounded);
|
||||
}
|
||||
|
||||
@Override
|
||||
UnifyType apply(Unifier unif) {
|
||||
UnifyType newType = wildcardedType.apply(unif);
|
||||
if(newType.hashCode() == wildcardedType.hashCode() && newType.equals(wildcardedType))
|
||||
return this; // Reduced the amount of objects created
|
||||
return new SuperType(newType);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
return wildcardedType.hashCode() + 3917;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if(!(obj instanceof SuperType))
|
||||
return false;
|
||||
|
||||
if(obj.hashCode() != this.hashCode())
|
||||
return false;
|
||||
|
||||
SuperType other = (SuperType) obj;
|
||||
return other.getSuperedType().equals(wildcardedType);
|
||||
}
|
||||
}
|
||||
package de.dhbwstuttgart.typeinference.unify.model;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Set;
|
||||
|
||||
import de.dhbwstuttgart.typeinference.unify.interfaces.IFiniteClosure;
|
||||
import de.dhbwstuttgart.typeinference.unify.interfaces.UnifyTypeVisitor;
|
||||
|
||||
/**
|
||||
* A super wildcard type e.g. ? super Integer.
|
||||
* @author Florian Steurer
|
||||
*/
|
||||
public final class SuperType extends WildcardType {
|
||||
|
||||
public <T> UnifyType accept(UnifyTypeVisitor<T> visitor, T ht) {
|
||||
return visitor.visit(this, ht);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new instance "? extends superedType"
|
||||
* @param superedType The type that is supered e.g. Integer in "? super Integer"
|
||||
*/
|
||||
public SuperType(UnifyType superedType) {
|
||||
super("? super " + superedType.getName(), superedType);
|
||||
}
|
||||
|
||||
/**
|
||||
* The type that is supered e.g. Integer in "? super Integer"
|
||||
*/
|
||||
public UnifyType getSuperedType() {
|
||||
return wildcardedType;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "? super " + wildcardedType;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the type parameters of the wildcarded type and returns a new supertype that supers that type.
|
||||
*/
|
||||
@Override
|
||||
public UnifyType setTypeParams(TypeParams newTp) {
|
||||
UnifyType newType = wildcardedType.setTypeParams(newTp);
|
||||
if(newType == wildcardedType)
|
||||
return this; // Reduced the amount of objects created
|
||||
return new SuperType(wildcardedType.setTypeParams(newTp));
|
||||
}
|
||||
|
||||
@Override
|
||||
Set<UnifyType> smArg(IFiniteClosure fc, Set<UnifyType> fBounded) {
|
||||
return fc.smArg(this, fBounded);
|
||||
}
|
||||
|
||||
@Override
|
||||
Set<UnifyType> grArg(IFiniteClosure fc, Set<UnifyType> fBounded) {
|
||||
return fc.grArg(this, fBounded);
|
||||
}
|
||||
|
||||
@Override
|
||||
UnifyType apply(Unifier unif) {
|
||||
UnifyType newType = wildcardedType.apply(unif);
|
||||
if(newType.hashCode() == wildcardedType.hashCode() && newType.equals(wildcardedType))
|
||||
return this; // Reduced the amount of objects created
|
||||
return new SuperType(newType);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
return wildcardedType.hashCode() + 3917;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if(!(obj instanceof SuperType))
|
||||
return false;
|
||||
|
||||
if(obj.hashCode() != this.hashCode())
|
||||
return false;
|
||||
|
||||
SuperType other = (SuperType) obj;
|
||||
return other.getSuperedType().equals(wildcardedType);
|
||||
}
|
||||
}
|
||||
|
@ -1,191 +1,191 @@
|
||||
package de.dhbwstuttgart.typeinference.unify.model;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
|
||||
/**
|
||||
* The generic or non-generic parameters of a type e.g. <T> for List<T>
|
||||
* @author Florian Steurer
|
||||
*/
|
||||
public final class TypeParams implements Iterable<UnifyType>{
|
||||
/**
|
||||
* The array which backs the type parameters.
|
||||
*/
|
||||
private final UnifyType[] typeParams;
|
||||
|
||||
/**
|
||||
* Hashcode calculation is expensive and must be cached.
|
||||
*/
|
||||
private final int hashCode;
|
||||
|
||||
/**
|
||||
* Creates a new set of type parameters.
|
||||
* @param types The type parameters.
|
||||
*/
|
||||
public TypeParams(List<UnifyType> types){
|
||||
typeParams = new UnifyType[types.size()];
|
||||
for(int i=0;i<types.size();i++){
|
||||
typeParams[i] = types.get(i);
|
||||
if(types.get(i)==null)throw new NullPointerException();
|
||||
}
|
||||
|
||||
// Hashcode calculation is expensive and must be cached.
|
||||
hashCode = Arrays.deepHashCode(typeParams);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new set of type parameters.
|
||||
* @param types The type parameters.
|
||||
*/
|
||||
public TypeParams(UnifyType... types) {
|
||||
typeParams = types;
|
||||
|
||||
// Hashcode calculation is expensive and must be cached.
|
||||
hashCode = Arrays.deepHashCode(typeParams);
|
||||
}
|
||||
|
||||
/**
|
||||
* True if every parameter in this object is a placeholder type, false otherwise.
|
||||
*/
|
||||
public boolean arePlaceholders() {
|
||||
return Arrays.stream(typeParams).allMatch(x -> x instanceof PlaceholderType);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the number of the type parameters in this object.
|
||||
* @return number of type parameters, always positive (including 0).
|
||||
*/
|
||||
public int size() {
|
||||
return typeParams.length;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if this object has size() of zero, false otherwise.
|
||||
*/
|
||||
public boolean empty() {
|
||||
return typeParams.length == 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Applies a unifier to every parameter in this object.
|
||||
* @param unif The applied unifier.
|
||||
* @return A new type parameter object, where the unifier was applied to every parameter.
|
||||
*/
|
||||
public TypeParams apply(Unifier unif) {
|
||||
UnifyType[] newParams = new UnifyType[typeParams.length];
|
||||
|
||||
// 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
|
||||
// This reduced the needed TypeParams-Instances for the lambda14-Test from
|
||||
// 130.000 to 30.000 without a decrease in speed.
|
||||
boolean isNew = false;
|
||||
|
||||
for(int i = 0; i < typeParams.length; i++) {
|
||||
UnifyType newType = typeParams[i].apply(unif);
|
||||
newParams[i] = newType;
|
||||
if(!isNew && (newType.hashCode() != typeParams[i].hashCode() || !newType.equals(typeParams[i])))
|
||||
isNew = true;
|
||||
}
|
||||
|
||||
if(!isNew)
|
||||
return this;
|
||||
return new TypeParams(newParams);
|
||||
}
|
||||
|
||||
/**
|
||||
* True if the PlaceholderType t is a parameter of this object, or if any parameter
|
||||
* contains t (arbitrary depth of recursion), false otherwise.
|
||||
*/
|
||||
public boolean occurs(PlaceholderType t) {
|
||||
for(UnifyType p : typeParams)
|
||||
if(p instanceof PlaceholderType) {//PL 2018-01-31 dangeling else Problem { ... } eingefuegt.
|
||||
if(p.equals(t))
|
||||
return true;
|
||||
}
|
||||
else {
|
||||
if(p.getTypeParams().occurs(t))
|
||||
return true; }
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the i-th parameter of this object.
|
||||
*/
|
||||
public UnifyType get(int i) {
|
||||
return typeParams[i];
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the parameters of this object.
|
||||
* PL 2018-03-17
|
||||
*/
|
||||
public UnifyType[] get() {
|
||||
return typeParams;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
public TypeParams set(UnifyType t, int idx) {
|
||||
// Reduce the creation of new objects for less memory
|
||||
// Reduced the needed instances of TypeParams in the lambda14-Test from
|
||||
// 150.000 to 130.000
|
||||
if(t.hashCode() == typeParams[idx].hashCode() && t.equals(typeParams[idx]))
|
||||
return this;
|
||||
UnifyType[] newparams = Arrays.copyOf(typeParams, typeParams.length);
|
||||
newparams[idx] = t;
|
||||
return new TypeParams(newparams);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Iterator<UnifyType> iterator() {
|
||||
return Arrays.stream(typeParams).iterator();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return hashCode;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if(!(obj instanceof TypeParams))
|
||||
return false;
|
||||
|
||||
if(obj.hashCode() != this.hashCode())
|
||||
return false;
|
||||
|
||||
TypeParams other = (TypeParams) obj;
|
||||
|
||||
if(other.size() != this.size())
|
||||
return false;
|
||||
|
||||
for(int i = 0; i < this.size(); i++){
|
||||
//if(this.get(i) == null)
|
||||
//System.out.print("s");
|
||||
}
|
||||
for(int i = 0; i < this.size(); i++)
|
||||
if(!(this.get(i).equals(other.get(i))))
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
String res = "";
|
||||
for(UnifyType t : typeParams)
|
||||
res += t + ",";
|
||||
return "<" + res.substring(0, res.length()-1) + ">";
|
||||
}
|
||||
|
||||
public Collection<? extends PlaceholderType> getInvolvedPlaceholderTypes() {
|
||||
ArrayList<PlaceholderType> ret = new ArrayList<>();
|
||||
for(UnifyType t : typeParams){
|
||||
ret.addAll(t.getInvolvedPlaceholderTypes());
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
package de.dhbwstuttgart.typeinference.unify.model;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
|
||||
/**
|
||||
* The generic or non-generic parameters of a type e.g. <T> for List<T>
|
||||
* @author Florian Steurer
|
||||
*/
|
||||
public final class TypeParams implements Iterable<UnifyType>{
|
||||
/**
|
||||
* The array which backs the type parameters.
|
||||
*/
|
||||
private final UnifyType[] typeParams;
|
||||
|
||||
/**
|
||||
* Hashcode calculation is expensive and must be cached.
|
||||
*/
|
||||
private final int hashCode;
|
||||
|
||||
/**
|
||||
* Creates a new set of type parameters.
|
||||
* @param types The type parameters.
|
||||
*/
|
||||
public TypeParams(List<UnifyType> types){
|
||||
typeParams = new UnifyType[types.size()];
|
||||
for(int i=0;i<types.size();i++){
|
||||
typeParams[i] = types.get(i);
|
||||
if(types.get(i)==null)throw new NullPointerException();
|
||||
}
|
||||
|
||||
// Hashcode calculation is expensive and must be cached.
|
||||
hashCode = Arrays.deepHashCode(typeParams);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new set of type parameters.
|
||||
* @param types The type parameters.
|
||||
*/
|
||||
public TypeParams(UnifyType... types) {
|
||||
typeParams = types;
|
||||
|
||||
// Hashcode calculation is expensive and must be cached.
|
||||
hashCode = Arrays.deepHashCode(typeParams);
|
||||
}
|
||||
|
||||
/**
|
||||
* True if every parameter in this object is a placeholder type, false otherwise.
|
||||
*/
|
||||
public boolean arePlaceholders() {
|
||||
return Arrays.stream(typeParams).allMatch(x -> x instanceof PlaceholderType);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the number of the type parameters in this object.
|
||||
* @return number of type parameters, always positive (including 0).
|
||||
*/
|
||||
public int size() {
|
||||
return typeParams.length;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if this object has size() of zero, false otherwise.
|
||||
*/
|
||||
public boolean empty() {
|
||||
return typeParams.length == 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Applies a unifier to every parameter in this object.
|
||||
* @param unif The applied unifier.
|
||||
* @return A new type parameter object, where the unifier was applied to every parameter.
|
||||
*/
|
||||
public TypeParams apply(Unifier unif) {
|
||||
UnifyType[] newParams = new UnifyType[typeParams.length];
|
||||
|
||||
// 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
|
||||
// This reduced the needed TypeParams-Instances for the lambda14-Test from
|
||||
// 130.000 to 30.000 without a decrease in speed.
|
||||
boolean isNew = false;
|
||||
|
||||
for(int i = 0; i < typeParams.length; i++) {
|
||||
UnifyType newType = typeParams[i].apply(unif);
|
||||
newParams[i] = newType;
|
||||
if(!isNew && (newType.hashCode() != typeParams[i].hashCode() || !newType.equals(typeParams[i])))
|
||||
isNew = true;
|
||||
}
|
||||
|
||||
if(!isNew)
|
||||
return this;
|
||||
return new TypeParams(newParams);
|
||||
}
|
||||
|
||||
/**
|
||||
* True if the PlaceholderType t is a parameter of this object, or if any parameter
|
||||
* contains t (arbitrary depth of recursion), false otherwise.
|
||||
*/
|
||||
public boolean occurs(PlaceholderType t) {
|
||||
for(UnifyType p : typeParams)
|
||||
if(p instanceof PlaceholderType) {//PL 2018-01-31 dangeling else Problem { ... } eingefuegt.
|
||||
if(p.equals(t))
|
||||
return true;
|
||||
}
|
||||
else {
|
||||
if(p.getTypeParams().occurs(t))
|
||||
return true; }
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the i-th parameter of this object.
|
||||
*/
|
||||
public UnifyType get(int i) {
|
||||
return typeParams[i];
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the parameters of this object.
|
||||
* PL 2018-03-17
|
||||
*/
|
||||
public UnifyType[] get() {
|
||||
return typeParams;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
public TypeParams set(UnifyType t, int idx) {
|
||||
// Reduce the creation of new objects for less memory
|
||||
// Reduced the needed instances of TypeParams in the lambda14-Test from
|
||||
// 150.000 to 130.000
|
||||
if(t.hashCode() == typeParams[idx].hashCode() && t.equals(typeParams[idx]))
|
||||
return this;
|
||||
UnifyType[] newparams = Arrays.copyOf(typeParams, typeParams.length);
|
||||
newparams[idx] = t;
|
||||
return new TypeParams(newparams);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Iterator<UnifyType> iterator() {
|
||||
return Arrays.stream(typeParams).iterator();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return hashCode;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if(!(obj instanceof TypeParams))
|
||||
return false;
|
||||
|
||||
if(obj.hashCode() != this.hashCode())
|
||||
return false;
|
||||
|
||||
TypeParams other = (TypeParams) obj;
|
||||
|
||||
if(other.size() != this.size())
|
||||
return false;
|
||||
|
||||
for(int i = 0; i < this.size(); i++){
|
||||
//if(this.get(i) == null)
|
||||
//System.out.print("s");
|
||||
}
|
||||
for(int i = 0; i < this.size(); i++)
|
||||
if(!(this.get(i).equals(other.get(i))))
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
String res = "";
|
||||
for(UnifyType t : typeParams)
|
||||
res += t + ",";
|
||||
return "<" + res.substring(0, res.length()-1) + ">";
|
||||
}
|
||||
|
||||
public Collection<? extends PlaceholderType> getInvolvedPlaceholderTypes() {
|
||||
ArrayList<PlaceholderType> ret = new ArrayList<>();
|
||||
for(UnifyType t : typeParams){
|
||||
ret.addAll(t.getInvolvedPlaceholderTypes());
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,189 +1,189 @@
|
||||
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<>();
|
||||
package de.dhbwstuttgart.typeinference.unify.model;
|
||||
|
||||
/**
|
||||
* Creates a new instance with a single substitution (source -> target).
|
||||
* @param The type that is replaced
|
||||
* @param The type that replaces
|
||||
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<>();
|
||||
|
||||
/**
|
||||
* 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) {
|
||||
substitutions.put(source, target);
|
||||
}
|
||||
|
||||
/**
|
||||
* Identity function as an "unifier".
|
||||
*/
|
||||
protected Unifier() {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates an unifier that is the identity function (thus has no substitutions).
|
||||
substitutions.put(source, target);
|
||||
}
|
||||
|
||||
/**
|
||||
* Identity function as an "unifier".
|
||||
*/
|
||||
protected Unifier() {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 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) {
|
||||
Unifier tempU = new Unifier(source, target);
|
||||
// Every new substitution must be applied to previously added substitutions
|
||||
// otherwise the unifier needs to be applied multiple times to unify two terms
|
||||
for(PlaceholderType pt : substitutions.keySet())
|
||||
substitutions.put(pt, substitutions.get(pt).apply(tempU));
|
||||
substitutions.put(source, target);
|
||||
}
|
||||
|
||||
@Override
|
||||
public UnifyType apply(UnifyType t) {
|
||||
return t.apply(this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Applies the unifier to the two terms of the pair.
|
||||
* @return A new pair where the left and right-hand side are applied
|
||||
*/
|
||||
public UnifyPair apply(UnifyPair p) {
|
||||
UnifyType newLhs = this.apply(p.getLhsType());
|
||||
UnifyType newRhs = this.apply(p.getRhsType());
|
||||
return new UnifyPair(newLhs, newRhs, p.getPairOp());
|
||||
}
|
||||
|
||||
/**
|
||||
* Applies the unifier to the two terms of the pair.
|
||||
* works only for single subsitution
|
||||
* @return A new pair where the left and right-hand side are applied
|
||||
*/
|
||||
public UnifyPair apply(UnifyPair thisAsPair, UnifyPair p) {
|
||||
UnifyType newLhs = this.apply(p.getLhsType());
|
||||
UnifyType newRhs = this.apply(p.getRhsType());
|
||||
//Varianceweitergabe wird nicht benoetigt.
|
||||
//PlaceholderType lhsph = (PlaceholderType)thisAsPair.getLhsType();
|
||||
//if (lhsph.getVariance() != 0) {
|
||||
// if (p.getLhsType().equals(lhsph)) {
|
||||
// if (p.getRhsType() instanceof PlaceholderType) {
|
||||
// ((PlaceholderType)p.getRhsType()).setVariance(lhsph.getVariance());
|
||||
// }
|
||||
// }
|
||||
// if (p.getRhsType().equals(lhsph)) {
|
||||
// if (p.getLhsType() instanceof PlaceholderType) {
|
||||
// ((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
|
||||
Set<UnifyPair> suniUnifyPair = new HashSet<>();
|
||||
suniUnifyPair.addAll(thisAsPair.getAllSubstitutions());
|
||||
suniUnifyPair.add(thisAsPair);
|
||||
if (p.getLhsType() instanceof PlaceholderType //&& newLhs instanceof PlaceholderType entfernt PL 2018-04-13
|
||||
&& p.getPairOp() == PairOperator.EQUALSDOT) {
|
||||
suniUnifyPair.add(p); //p koennte auch subsitution sein
|
||||
}
|
||||
return new UnifyPair(newLhs, newRhs, p.getPairOp(), suniUnifyPair, p);
|
||||
}
|
||||
return new UnifyPair(newLhs, newRhs, p.getPairOp(), p.getSubstitution(), p.getBasePair(), p.getfBounded());
|
||||
}
|
||||
|
||||
/**
|
||||
* Applies the unifier to the left terms of the pair.
|
||||
* @return A new pair where the left and right-hand side are applied
|
||||
*/
|
||||
public UnifyPair applyleft(UnifyPair p) {
|
||||
return new UnifyPair(this.apply(p.getLhsType()), p.getRhsType(), p.getPairOp());
|
||||
}
|
||||
|
||||
/**
|
||||
* True if the typevariable t will be substituted if the unifier is applied.
|
||||
* false otherwise.
|
||||
*/
|
||||
public boolean hasSubstitute(PlaceholderType t) {
|
||||
return substitutions.containsKey(t);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the type that will replace the typevariable t if the unifier is applied.
|
||||
*/
|
||||
public UnifyType getSubstitute(PlaceholderType t) {
|
||||
return substitutions.get(t);
|
||||
}
|
||||
|
||||
/**
|
||||
* The number of substitutions in the unifier. If zero, this is the identity function.
|
||||
*/
|
||||
public int size() {
|
||||
return substitutions.size();
|
||||
}
|
||||
|
||||
/**
|
||||
* Garantuees that if there is a substitutions (a -> b) in this unifier,
|
||||
* a is not an element of the targetParams. Substitutions that do not
|
||||
* satisfy this condition, are swapped.
|
||||
*/
|
||||
public void swapPlaceholderSubstitutions(Iterable<UnifyType> targetParams) {
|
||||
for(UnifyType tph : targetParams) {
|
||||
if(!(tph instanceof PlaceholderType))
|
||||
continue;
|
||||
// Swap a substitutions (a -> b) if a is an element of the target params.
|
||||
if(substitutions.containsKey(tph)) {
|
||||
if((substitutions.get(tph) instanceof PlaceholderType)) {
|
||||
PlaceholderType newLhs = (PlaceholderType) substitutions.get(tph);
|
||||
substitutions.remove(tph);
|
||||
substitutions.put(newLhs, tph);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void swapPlaceholderSubstitutionsReverse(Iterable<UnifyType> sourceParams) {
|
||||
for(UnifyType tph : sourceParams) {
|
||||
if(!(tph instanceof PlaceholderType))
|
||||
continue;
|
||||
if(substitutions.containsValue(tph)) {
|
||||
UnifyType key = substitutions.values().stream().filter(x -> x.equals(tph)).findAny().get();
|
||||
if(key instanceof PlaceholderType) {
|
||||
PlaceholderType newLhs = (PlaceholderType) tph;
|
||||
substitutions.remove(key);
|
||||
substitutions.put(newLhs, key);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
String result = "{ ";
|
||||
for(Entry<PlaceholderType, UnifyType> entry : substitutions.entrySet())
|
||||
result += "(" + entry.getKey() + " -> " + entry.getValue() + "), ";
|
||||
if(!substitutions.isEmpty())
|
||||
result = result.substring(0, result.length()-2);
|
||||
result += " }";
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Iterator<Entry<PlaceholderType, UnifyType>> iterator() {
|
||||
return substitutions.entrySet().iterator();
|
||||
}
|
||||
}
|
||||
|
||||
Unifier tempU = new Unifier(source, target);
|
||||
// Every new substitution must be applied to previously added substitutions
|
||||
// otherwise the unifier needs to be applied multiple times to unify two terms
|
||||
for(PlaceholderType pt : substitutions.keySet())
|
||||
substitutions.put(pt, substitutions.get(pt).apply(tempU));
|
||||
substitutions.put(source, target);
|
||||
}
|
||||
|
||||
@Override
|
||||
public UnifyType apply(UnifyType t) {
|
||||
return t.apply(this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Applies the unifier to the two terms of the pair.
|
||||
* @return A new pair where the left and right-hand side are applied
|
||||
*/
|
||||
public UnifyPair apply(UnifyPair p) {
|
||||
UnifyType newLhs = this.apply(p.getLhsType());
|
||||
UnifyType newRhs = this.apply(p.getRhsType());
|
||||
return new UnifyPair(newLhs, newRhs, p.getPairOp());
|
||||
}
|
||||
|
||||
/**
|
||||
* Applies the unifier to the two terms of the pair.
|
||||
* works only for single subsitution
|
||||
* @return A new pair where the left and right-hand side are applied
|
||||
*/
|
||||
public UnifyPair apply(UnifyPair thisAsPair, UnifyPair p) {
|
||||
UnifyType newLhs = this.apply(p.getLhsType());
|
||||
UnifyType newRhs = this.apply(p.getRhsType());
|
||||
//Varianceweitergabe wird nicht benoetigt.
|
||||
//PlaceholderType lhsph = (PlaceholderType)thisAsPair.getLhsType();
|
||||
//if (lhsph.getVariance() != 0) {
|
||||
// if (p.getLhsType().equals(lhsph)) {
|
||||
// if (p.getRhsType() instanceof PlaceholderType) {
|
||||
// ((PlaceholderType)p.getRhsType()).setVariance(lhsph.getVariance());
|
||||
// }
|
||||
// }
|
||||
// if (p.getRhsType().equals(lhsph)) {
|
||||
// if (p.getLhsType() instanceof PlaceholderType) {
|
||||
// ((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
|
||||
Set<UnifyPair> suniUnifyPair = new HashSet<>();
|
||||
suniUnifyPair.addAll(thisAsPair.getAllSubstitutions());
|
||||
suniUnifyPair.add(thisAsPair);
|
||||
if (p.getLhsType() instanceof PlaceholderType //&& newLhs instanceof PlaceholderType entfernt PL 2018-04-13
|
||||
&& p.getPairOp() == PairOperator.EQUALSDOT) {
|
||||
suniUnifyPair.add(p); //p koennte auch subsitution sein
|
||||
}
|
||||
return new UnifyPair(newLhs, newRhs, p.getPairOp(), suniUnifyPair, p);
|
||||
}
|
||||
return new UnifyPair(newLhs, newRhs, p.getPairOp(), p.getSubstitution(), p.getBasePair(), p.getfBounded());
|
||||
}
|
||||
|
||||
/**
|
||||
* Applies the unifier to the left terms of the pair.
|
||||
* @return A new pair where the left and right-hand side are applied
|
||||
*/
|
||||
public UnifyPair applyleft(UnifyPair p) {
|
||||
return new UnifyPair(this.apply(p.getLhsType()), p.getRhsType(), p.getPairOp());
|
||||
}
|
||||
|
||||
/**
|
||||
* True if the typevariable t will be substituted if the unifier is applied.
|
||||
* false otherwise.
|
||||
*/
|
||||
public boolean hasSubstitute(PlaceholderType t) {
|
||||
return substitutions.containsKey(t);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the type that will replace the typevariable t if the unifier is applied.
|
||||
*/
|
||||
public UnifyType getSubstitute(PlaceholderType t) {
|
||||
return substitutions.get(t);
|
||||
}
|
||||
|
||||
/**
|
||||
* The number of substitutions in the unifier. If zero, this is the identity function.
|
||||
*/
|
||||
public int size() {
|
||||
return substitutions.size();
|
||||
}
|
||||
|
||||
/**
|
||||
* Garantuees that if there is a substitutions (a -> b) in this unifier,
|
||||
* a is not an element of the targetParams. Substitutions that do not
|
||||
* satisfy this condition, are swapped.
|
||||
*/
|
||||
public void swapPlaceholderSubstitutions(Iterable<UnifyType> targetParams) {
|
||||
for(UnifyType tph : targetParams) {
|
||||
if(!(tph instanceof PlaceholderType))
|
||||
continue;
|
||||
// Swap a substitutions (a -> b) if a is an element of the target params.
|
||||
if(substitutions.containsKey(tph)) {
|
||||
if((substitutions.get(tph) instanceof PlaceholderType)) {
|
||||
PlaceholderType newLhs = (PlaceholderType) substitutions.get(tph);
|
||||
substitutions.remove(tph);
|
||||
substitutions.put(newLhs, tph);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void swapPlaceholderSubstitutionsReverse(Iterable<UnifyType> sourceParams) {
|
||||
for(UnifyType tph : sourceParams) {
|
||||
if(!(tph instanceof PlaceholderType))
|
||||
continue;
|
||||
if(substitutions.containsValue(tph)) {
|
||||
UnifyType key = substitutions.values().stream().filter(x -> x.equals(tph)).findAny().get();
|
||||
if(key instanceof PlaceholderType) {
|
||||
PlaceholderType newLhs = (PlaceholderType) tph;
|
||||
substitutions.remove(key);
|
||||
substitutions.put(newLhs, key);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
String result = "{ ";
|
||||
for(Entry<PlaceholderType, UnifyType> entry : substitutions.entrySet())
|
||||
result += "(" + entry.getKey() + " -> " + entry.getValue() + "), ";
|
||||
if(!substitutions.isEmpty())
|
||||
result = result.substring(0, result.length()-2);
|
||||
result += " }";
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Iterator<Entry<PlaceholderType, UnifyType>> iterator() {
|
||||
return substitutions.entrySet().iterator();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,256 +1,256 @@
|
||||
package de.dhbwstuttgart.typeinference.unify.model;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
import java.util.Set;
|
||||
|
||||
|
||||
/**
|
||||
* A pair which contains two types and an operator, e.q. (Integer <. a).
|
||||
* @author Florian Steurer
|
||||
*/
|
||||
public class UnifyPair {
|
||||
|
||||
/**
|
||||
* The type on the left hand side of the pair.
|
||||
*/
|
||||
private final UnifyType lhs;
|
||||
|
||||
/**
|
||||
* The type on the right hand side of the pair.
|
||||
*/
|
||||
private final UnifyType rhs;
|
||||
|
||||
/**
|
||||
* The operator that determines the relation between the left and right hand side type.
|
||||
*/
|
||||
private PairOperator pairOp;
|
||||
|
||||
/** wieder loesecn wird nicht mehr benoetigt PL 2018-03-31
|
||||
* variance shows the variance of the pair
|
||||
* -1: contravariant
|
||||
* 1 covariant
|
||||
* 0 invariant
|
||||
* PL 2018-03-21
|
||||
*/
|
||||
private byte variance = 0;
|
||||
|
||||
private boolean undefinedPair = false;
|
||||
|
||||
/**
|
||||
* Unifier/substitute that generated this pair
|
||||
* PL 2018-03-15
|
||||
*/
|
||||
private Set<UnifyPair> substitution;
|
||||
|
||||
/**
|
||||
* Base on which the the unifier is applied
|
||||
* PL 2018-03-15
|
||||
*/
|
||||
private UnifyPair basePair;
|
||||
|
||||
/**
|
||||
* For pairs a <. Theta generated in the rule reduceTphSup
|
||||
* to store the f-Bouned Elements to avoid endless recursion
|
||||
* PL 2018-03-15
|
||||
*/
|
||||
private Set<UnifyType> fBounded = new HashSet<>();
|
||||
|
||||
private final int hashCode;
|
||||
|
||||
/**
|
||||
* Creates a new instance 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 op The operator that determines the relation between the left and right hand side type.
|
||||
*/
|
||||
public UnifyPair(UnifyType lhs, UnifyType rhs, PairOperator op) {
|
||||
this.lhs = lhs;
|
||||
this.rhs = rhs;
|
||||
pairOp = op;
|
||||
substitution = new HashSet<>();
|
||||
|
||||
// Caching 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) {
|
||||
this.lhs = lhs;
|
||||
this.rhs = rhs;
|
||||
pairOp = op;
|
||||
substitution = uni;
|
||||
basePair = base;
|
||||
this.variance = variance;
|
||||
|
||||
|
||||
// Caching 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) {
|
||||
this(lhs, rhs, op, uni, base);
|
||||
|
||||
this.fBounded = fBounded;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the type on the left hand side of the pair.
|
||||
*/
|
||||
public UnifyType getLhsType() {
|
||||
return lhs;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the type on the right hand side of the pair.
|
||||
*/
|
||||
public UnifyType getRhsType() {
|
||||
return rhs;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the operator that determines the relation between the left and right hand side type.
|
||||
*/
|
||||
public PairOperator getPairOp() {
|
||||
return pairOp;
|
||||
}
|
||||
|
||||
public void setPairOp(PairOperator po) {
|
||||
pairOp = po;
|
||||
}
|
||||
|
||||
public void addSubstitutions(Set<UnifyPair> sup) {
|
||||
substitution.addAll(sup);
|
||||
}
|
||||
|
||||
public byte getVariance() {
|
||||
return variance;
|
||||
}
|
||||
|
||||
public void setVariance(byte v) {
|
||||
variance = v;
|
||||
}
|
||||
|
||||
public void setUndefinedPair() {
|
||||
undefinedPair = true;
|
||||
}
|
||||
public Set<UnifyPair> getSubstitution() {
|
||||
return new HashSet<>(substitution);
|
||||
}
|
||||
|
||||
public UnifyPair getBasePair() {
|
||||
return basePair;
|
||||
}
|
||||
public boolean isUndefinedPair() {
|
||||
return undefinedPair;
|
||||
}
|
||||
|
||||
public Set<UnifyPair> getAllSubstitutions () {
|
||||
Set<UnifyPair> ret = new HashSet<>();
|
||||
ret.addAll(new ArrayList<>(getSubstitution()));
|
||||
if (basePair != null) {
|
||||
ret.addAll(new ArrayList<>(basePair.getAllSubstitutions()));
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
public Set<UnifyPair> getAllBases () {
|
||||
Set<UnifyPair> ret = new HashSet<>();
|
||||
if (basePair != null) {
|
||||
ret.add(getBasePair());
|
||||
ret.addAll(basePair.getAllBases());
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
public UnifyPair getGroundBasePair () {
|
||||
if (basePair == null) {
|
||||
return this;
|
||||
}
|
||||
if (basePair.getBasePair() == null) {
|
||||
return basePair;
|
||||
}
|
||||
else {
|
||||
return basePair.getGroundBasePair();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* wenn in einem Paar bestehend aus 2 Typvariablen eine nicht wildcardtable ist,
|
||||
* so beide auf nicht wildcardtable setzen
|
||||
*/
|
||||
public void disableCondWildcards() {
|
||||
if (lhs instanceof PlaceholderType && rhs instanceof PlaceholderType
|
||||
&& (!((PlaceholderType)lhs).isWildcardable() || !((PlaceholderType)rhs).isWildcardable()))
|
||||
{
|
||||
((PlaceholderType)lhs).disableWildcardtable();
|
||||
((PlaceholderType)rhs).disableWildcardtable();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public Boolean wrongWildcard() {
|
||||
return lhs.wrongWildcard() || rhs.wrongWildcard();
|
||||
}
|
||||
|
||||
public Set<UnifyType> getfBounded() {
|
||||
return this.fBounded;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if(!(obj instanceof UnifyPair))
|
||||
return false;
|
||||
|
||||
if(obj.hashCode() != this.hashCode())
|
||||
return false;
|
||||
|
||||
UnifyPair other = (UnifyPair) obj;
|
||||
|
||||
if (isUndefinedPair()) {
|
||||
if (other.getBasePair() != basePair || (other.getBasePair() == null && basePair == null)) {
|
||||
return false;
|
||||
}
|
||||
if (!other.getBasePair().equals(basePair) ||
|
||||
!other.getAllSubstitutions().equals(getAllSubstitutions())) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return other.getPairOp() == pairOp
|
||||
&& other.getLhsType().equals(lhs)
|
||||
&& other.getRhsType().equals(rhs);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return hashCode;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
String ret = "";
|
||||
if (lhs instanceof PlaceholderType) {
|
||||
ret = new Integer(((PlaceholderType)lhs).getVariance()).toString() + " " + ((PlaceholderType)lhs).isInnerType()
|
||||
+ " " + ((PlaceholderType)lhs).isWildcardable();
|
||||
}
|
||||
if (rhs instanceof PlaceholderType) {
|
||||
ret = ret + ", " + new Integer(((PlaceholderType)rhs).getVariance()).toString() + " " + ((PlaceholderType)rhs).isInnerType()
|
||||
+ " " + ((PlaceholderType)rhs).isWildcardable();
|
||||
}
|
||||
return "(" + lhs + " " + pairOp + " " + rhs + ", " + ret + ")"; //+ ", [" + getfBounded().toString()+ "])";
|
||||
}
|
||||
|
||||
/*
|
||||
public List<? extends PlaceholderType> getInvolvedPlaceholderTypes() {
|
||||
ArrayList<PlaceholderType> ret = new ArrayList<>();
|
||||
ret.addAll(lhs.getInvolvedPlaceholderTypes());
|
||||
ret.addAll(rhs.getInvolvedPlaceholderTypes());
|
||||
return ret;
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
|
||||
package de.dhbwstuttgart.typeinference.unify.model;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
import java.util.Set;
|
||||
|
||||
|
||||
/**
|
||||
* A pair which contains two types and an operator, e.q. (Integer <. a).
|
||||
* @author Florian Steurer
|
||||
*/
|
||||
public class UnifyPair {
|
||||
|
||||
/**
|
||||
* The type on the left hand side of the pair.
|
||||
*/
|
||||
private final UnifyType lhs;
|
||||
|
||||
/**
|
||||
* The type on the right hand side of the pair.
|
||||
*/
|
||||
private final UnifyType rhs;
|
||||
|
||||
/**
|
||||
* The operator that determines the relation between the left and right hand side type.
|
||||
*/
|
||||
private PairOperator pairOp;
|
||||
|
||||
/** wieder loesecn wird nicht mehr benoetigt PL 2018-03-31
|
||||
* variance shows the variance of the pair
|
||||
* -1: contravariant
|
||||
* 1 covariant
|
||||
* 0 invariant
|
||||
* PL 2018-03-21
|
||||
*/
|
||||
private byte variance = 0;
|
||||
|
||||
private boolean undefinedPair = false;
|
||||
|
||||
/**
|
||||
* Unifier/substitute that generated this pair
|
||||
* PL 2018-03-15
|
||||
*/
|
||||
private Set<UnifyPair> substitution;
|
||||
|
||||
/**
|
||||
* Base on which the the unifier is applied
|
||||
* PL 2018-03-15
|
||||
*/
|
||||
private UnifyPair basePair;
|
||||
|
||||
/**
|
||||
* For pairs a <. Theta generated in the rule reduceTphSup
|
||||
* to store the f-Bouned Elements to avoid endless recursion
|
||||
* PL 2018-03-15
|
||||
*/
|
||||
private Set<UnifyType> fBounded = new HashSet<>();
|
||||
|
||||
private final int hashCode;
|
||||
|
||||
/**
|
||||
* Creates a new instance 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 op The operator that determines the relation between the left and right hand side type.
|
||||
*/
|
||||
public UnifyPair(UnifyType lhs, UnifyType rhs, PairOperator op) {
|
||||
this.lhs = lhs;
|
||||
this.rhs = rhs;
|
||||
pairOp = op;
|
||||
substitution = new HashSet<>();
|
||||
|
||||
// Caching 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) {
|
||||
this.lhs = lhs;
|
||||
this.rhs = rhs;
|
||||
pairOp = op;
|
||||
substitution = uni;
|
||||
basePair = base;
|
||||
this.variance = variance;
|
||||
|
||||
|
||||
// Caching 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) {
|
||||
this(lhs, rhs, op, uni, base);
|
||||
|
||||
this.fBounded = fBounded;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the type on the left hand side of the pair.
|
||||
*/
|
||||
public UnifyType getLhsType() {
|
||||
return lhs;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the type on the right hand side of the pair.
|
||||
*/
|
||||
public UnifyType getRhsType() {
|
||||
return rhs;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the operator that determines the relation between the left and right hand side type.
|
||||
*/
|
||||
public PairOperator getPairOp() {
|
||||
return pairOp;
|
||||
}
|
||||
|
||||
public void setPairOp(PairOperator po) {
|
||||
pairOp = po;
|
||||
}
|
||||
|
||||
public void addSubstitutions(Set<UnifyPair> sup) {
|
||||
substitution.addAll(sup);
|
||||
}
|
||||
|
||||
public byte getVariance() {
|
||||
return variance;
|
||||
}
|
||||
|
||||
public void setVariance(byte v) {
|
||||
variance = v;
|
||||
}
|
||||
|
||||
public void setUndefinedPair() {
|
||||
undefinedPair = true;
|
||||
}
|
||||
public Set<UnifyPair> getSubstitution() {
|
||||
return new HashSet<>(substitution);
|
||||
}
|
||||
|
||||
public UnifyPair getBasePair() {
|
||||
return basePair;
|
||||
}
|
||||
public boolean isUndefinedPair() {
|
||||
return undefinedPair;
|
||||
}
|
||||
|
||||
public Set<UnifyPair> getAllSubstitutions () {
|
||||
Set<UnifyPair> ret = new HashSet<>();
|
||||
ret.addAll(new ArrayList<>(getSubstitution()));
|
||||
if (basePair != null) {
|
||||
ret.addAll(new ArrayList<>(basePair.getAllSubstitutions()));
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
public Set<UnifyPair> getAllBases () {
|
||||
Set<UnifyPair> ret = new HashSet<>();
|
||||
if (basePair != null) {
|
||||
ret.add(getBasePair());
|
||||
ret.addAll(basePair.getAllBases());
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
public UnifyPair getGroundBasePair () {
|
||||
if (basePair == null) {
|
||||
return this;
|
||||
}
|
||||
if (basePair.getBasePair() == null) {
|
||||
return basePair;
|
||||
}
|
||||
else {
|
||||
return basePair.getGroundBasePair();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* wenn in einem Paar bestehend aus 2 Typvariablen eine nicht wildcardtable ist,
|
||||
* so beide auf nicht wildcardtable setzen
|
||||
*/
|
||||
public void disableCondWildcards() {
|
||||
if (lhs instanceof PlaceholderType && rhs instanceof PlaceholderType
|
||||
&& (!((PlaceholderType)lhs).isWildcardable() || !((PlaceholderType)rhs).isWildcardable()))
|
||||
{
|
||||
((PlaceholderType)lhs).disableWildcardtable();
|
||||
((PlaceholderType)rhs).disableWildcardtable();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public Boolean wrongWildcard() {
|
||||
return lhs.wrongWildcard() || rhs.wrongWildcard();
|
||||
}
|
||||
|
||||
public Set<UnifyType> getfBounded() {
|
||||
return this.fBounded;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if(!(obj instanceof UnifyPair))
|
||||
return false;
|
||||
|
||||
if(obj.hashCode() != this.hashCode())
|
||||
return false;
|
||||
|
||||
UnifyPair other = (UnifyPair) obj;
|
||||
|
||||
if (isUndefinedPair()) {
|
||||
if (other.getBasePair() != basePair || (other.getBasePair() == null && basePair == null)) {
|
||||
return false;
|
||||
}
|
||||
if (!other.getBasePair().equals(basePair) ||
|
||||
!other.getAllSubstitutions().equals(getAllSubstitutions())) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return other.getPairOp() == pairOp
|
||||
&& other.getLhsType().equals(lhs)
|
||||
&& other.getRhsType().equals(rhs);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return hashCode;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
String ret = "";
|
||||
if (lhs instanceof PlaceholderType) {
|
||||
ret = new Integer(((PlaceholderType)lhs).getVariance()).toString() + " " + ((PlaceholderType)lhs).isInnerType()
|
||||
+ " " + ((PlaceholderType)lhs).isWildcardable();
|
||||
}
|
||||
if (rhs instanceof PlaceholderType) {
|
||||
ret = ret + ", " + new Integer(((PlaceholderType)rhs).getVariance()).toString() + " " + ((PlaceholderType)rhs).isInnerType()
|
||||
+ " " + ((PlaceholderType)rhs).isWildcardable();
|
||||
}
|
||||
return "(" + lhs + " " + pairOp + " " + rhs + ", " + ret + ")"; //+ ", [" + getfBounded().toString()+ "])";
|
||||
}
|
||||
|
||||
/*
|
||||
public List<? extends PlaceholderType> getInvolvedPlaceholderTypes() {
|
||||
ArrayList<PlaceholderType> ret = new ArrayList<>();
|
||||
ret.addAll(lhs.getInvolvedPlaceholderTypes());
|
||||
ret.addAll(rhs.getInvolvedPlaceholderTypes());
|
||||
return ret;
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
|
||||
|
@ -1,119 +1,119 @@
|
||||
package de.dhbwstuttgart.typeinference.unify.model;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import de.dhbwstuttgart.syntaxtree.StatementVisitor;
|
||||
import de.dhbwstuttgart.typeinference.unify.interfaces.IFiniteClosure;
|
||||
import de.dhbwstuttgart.typeinference.unify.interfaces.UnifyTypeVisitor;
|
||||
|
||||
/**
|
||||
* Represents a java type.
|
||||
* @author Florian Steurer
|
||||
*/
|
||||
public abstract class UnifyType {
|
||||
|
||||
/**
|
||||
* The name of the type e.q. "Integer", "? extends Integer" or "List" for (List<T>)
|
||||
*/
|
||||
protected final String typeName;
|
||||
|
||||
/**
|
||||
* The type parameters of the type.
|
||||
*/
|
||||
protected final TypeParams typeParams;
|
||||
|
||||
/**
|
||||
* Creates a new instance
|
||||
* @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>)
|
||||
*/
|
||||
protected UnifyType(String name, TypeParams p) {
|
||||
typeName = name;
|
||||
typeParams = p;
|
||||
}
|
||||
|
||||
|
||||
abstract public <T> UnifyType accept(UnifyTypeVisitor<T> visitor, T ht);
|
||||
|
||||
/**
|
||||
* Returns the name of the type.
|
||||
* @return The name e.q. List for List<T>, Integer or ? extends Integer
|
||||
*/
|
||||
public String getName() {
|
||||
return typeName;
|
||||
}
|
||||
|
||||
/**
|
||||
* The parameters of the type.
|
||||
* @return Parameters of the type, e.q. <T> for List<T>.
|
||||
*/
|
||||
public TypeParams getTypeParams() {
|
||||
return typeParams;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a new type that equals this type except for the type parameters.
|
||||
* @param newTp The type params of the new type.
|
||||
* @return A new type object.
|
||||
*/
|
||||
public abstract UnifyType setTypeParams(TypeParams newTp);
|
||||
|
||||
/**
|
||||
* Implementation of the visitor-pattern. Returns the set of smArg
|
||||
* by calling the most specific overload in the FC.
|
||||
* @param fc The FC that is called.
|
||||
* @return The set that is smArg(this)
|
||||
*/
|
||||
abstract Set<UnifyType> smArg(IFiniteClosure fc, Set<UnifyType> fBounded);
|
||||
|
||||
/**
|
||||
* Implementation of the visitor-pattern. Returns the set of grArg
|
||||
* by calling the most specific overload in the FC.
|
||||
* @param fc The FC that is called.
|
||||
* @return The set that is grArg(this)
|
||||
*/
|
||||
abstract Set<UnifyType> grArg(IFiniteClosure fc, Set<UnifyType> fBounded);
|
||||
|
||||
/**
|
||||
* Applies a unifier to this object.
|
||||
* @param unif The unifier
|
||||
* @return A UnifyType, that may or may not be a new object, that has its subtypes substituted.
|
||||
*/
|
||||
abstract UnifyType apply(Unifier unif);
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
String params = "";
|
||||
if(typeParams.size() != 0) {
|
||||
for(UnifyType param : typeParams)
|
||||
params += param.toString() + ",";
|
||||
params = "<" + params.substring(0, params.length()-1) + ">";
|
||||
}
|
||||
|
||||
return typeName + params;
|
||||
}
|
||||
|
||||
public Collection<PlaceholderType> getInvolvedPlaceholderTypes() {
|
||||
ArrayList<PlaceholderType> ret = new ArrayList<>();
|
||||
ret.addAll(typeParams.getInvolvedPlaceholderTypes());
|
||||
return ret;
|
||||
}
|
||||
|
||||
public Boolean wrongWildcard() {//default
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return this.toString().hashCode();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
return this.toString().equals(obj.toString());
|
||||
}
|
||||
package de.dhbwstuttgart.typeinference.unify.model;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import de.dhbwstuttgart.syntaxtree.StatementVisitor;
|
||||
import de.dhbwstuttgart.typeinference.unify.interfaces.IFiniteClosure;
|
||||
import de.dhbwstuttgart.typeinference.unify.interfaces.UnifyTypeVisitor;
|
||||
|
||||
/**
|
||||
* Represents a java type.
|
||||
* @author Florian Steurer
|
||||
*/
|
||||
public abstract class UnifyType {
|
||||
|
||||
/**
|
||||
* The name of the type e.q. "Integer", "? extends Integer" or "List" for (List<T>)
|
||||
*/
|
||||
protected final String typeName;
|
||||
|
||||
/**
|
||||
* The type parameters of the type.
|
||||
*/
|
||||
protected final TypeParams typeParams;
|
||||
|
||||
/**
|
||||
* Creates a new instance
|
||||
* @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>)
|
||||
*/
|
||||
protected UnifyType(String name, TypeParams p) {
|
||||
typeName = name;
|
||||
typeParams = p;
|
||||
}
|
||||
|
||||
|
||||
abstract public <T> UnifyType accept(UnifyTypeVisitor<T> visitor, T ht);
|
||||
|
||||
/**
|
||||
* Returns the name of the type.
|
||||
* @return The name e.q. List for List<T>, Integer or ? extends Integer
|
||||
*/
|
||||
public String getName() {
|
||||
return typeName;
|
||||
}
|
||||
|
||||
/**
|
||||
* The parameters of the type.
|
||||
* @return Parameters of the type, e.q. <T> for List<T>.
|
||||
*/
|
||||
public TypeParams getTypeParams() {
|
||||
return typeParams;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a new type that equals this type except for the type parameters.
|
||||
* @param newTp The type params of the new type.
|
||||
* @return A new type object.
|
||||
*/
|
||||
public abstract UnifyType setTypeParams(TypeParams newTp);
|
||||
|
||||
/**
|
||||
* Implementation of the visitor-pattern. Returns the set of smArg
|
||||
* by calling the most specific overload in the FC.
|
||||
* @param fc The FC that is called.
|
||||
* @return The set that is smArg(this)
|
||||
*/
|
||||
abstract Set<UnifyType> smArg(IFiniteClosure fc, Set<UnifyType> fBounded);
|
||||
|
||||
/**
|
||||
* Implementation of the visitor-pattern. Returns the set of grArg
|
||||
* by calling the most specific overload in the FC.
|
||||
* @param fc The FC that is called.
|
||||
* @return The set that is grArg(this)
|
||||
*/
|
||||
abstract Set<UnifyType> grArg(IFiniteClosure fc, Set<UnifyType> fBounded);
|
||||
|
||||
/**
|
||||
* Applies a unifier to this object.
|
||||
* @param unif The unifier
|
||||
* @return A UnifyType, that may or may not be a new object, that has its subtypes substituted.
|
||||
*/
|
||||
abstract UnifyType apply(Unifier unif);
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
String params = "";
|
||||
if(typeParams.size() != 0) {
|
||||
for(UnifyType param : typeParams)
|
||||
params += param.toString() + ",";
|
||||
params = "<" + params.substring(0, params.length()-1) + ">";
|
||||
}
|
||||
|
||||
return typeName + params;
|
||||
}
|
||||
|
||||
public Collection<PlaceholderType> getInvolvedPlaceholderTypes() {
|
||||
ArrayList<PlaceholderType> ret = new ArrayList<>();
|
||||
ret.addAll(typeParams.getInvolvedPlaceholderTypes());
|
||||
return ret;
|
||||
}
|
||||
|
||||
public Boolean wrongWildcard() {//default
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return this.toString().hashCode();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
return this.toString().equals(obj.toString());
|
||||
}
|
||||
}
|
@ -1,72 +1,72 @@
|
||||
package de.dhbwstuttgart.typeinference.unify.model;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* A wildcard type that is either a ExtendsType or a SuperType.
|
||||
* @author Florian Steurer
|
||||
*/
|
||||
public abstract class WildcardType extends UnifyType {
|
||||
|
||||
/**
|
||||
* The wildcarded type, e.q. Integer for ? extends Integer. Never a wildcard type itself.
|
||||
*/
|
||||
protected UnifyType wildcardedType;
|
||||
|
||||
/**
|
||||
* Creates a new instance.
|
||||
* @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.
|
||||
*/
|
||||
protected WildcardType(String name, UnifyType wildcardedType) {
|
||||
super(name, wildcardedType.getTypeParams());
|
||||
this.wildcardedType = wildcardedType;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the wildcarded type, e.q. Integer for ? extends Integer.
|
||||
* @return The wildcarded type. Never a wildcard type itself.
|
||||
*/
|
||||
public UnifyType getWildcardedType() {
|
||||
return wildcardedType;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the type parameters of the WILDCARDED TYPE.
|
||||
*/
|
||||
@Override
|
||||
public TypeParams getTypeParams() {
|
||||
return wildcardedType.getTypeParams();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean wrongWildcard () {//This is an error
|
||||
return (wildcardedType instanceof WildcardType);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return wildcardedType.hashCode() + getName().hashCode() + 17;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if(!(obj instanceof WildcardType))
|
||||
return false;
|
||||
|
||||
if(obj.hashCode() != this.hashCode())
|
||||
return false;
|
||||
|
||||
WildcardType other = (WildcardType) obj;
|
||||
return other.getWildcardedType().equals(wildcardedType);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public Collection<PlaceholderType> getInvolvedPlaceholderTypes() {
|
||||
ArrayList<PlaceholderType> ret = new ArrayList<>();
|
||||
ret.addAll(wildcardedType.getInvolvedPlaceholderTypes());
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
package de.dhbwstuttgart.typeinference.unify.model;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* A wildcard type that is either a ExtendsType or a SuperType.
|
||||
* @author Florian Steurer
|
||||
*/
|
||||
public abstract class WildcardType extends UnifyType {
|
||||
|
||||
/**
|
||||
* The wildcarded type, e.q. Integer for ? extends Integer. Never a wildcard type itself.
|
||||
*/
|
||||
protected UnifyType wildcardedType;
|
||||
|
||||
/**
|
||||
* Creates a new instance.
|
||||
* @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.
|
||||
*/
|
||||
protected WildcardType(String name, UnifyType wildcardedType) {
|
||||
super(name, wildcardedType.getTypeParams());
|
||||
this.wildcardedType = wildcardedType;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the wildcarded type, e.q. Integer for ? extends Integer.
|
||||
* @return The wildcarded type. Never a wildcard type itself.
|
||||
*/
|
||||
public UnifyType getWildcardedType() {
|
||||
return wildcardedType;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the type parameters of the WILDCARDED TYPE.
|
||||
*/
|
||||
@Override
|
||||
public TypeParams getTypeParams() {
|
||||
return wildcardedType.getTypeParams();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean wrongWildcard () {//This is an error
|
||||
return (wildcardedType instanceof WildcardType);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return wildcardedType.hashCode() + getName().hashCode() + 17;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if(!(obj instanceof WildcardType))
|
||||
return false;
|
||||
|
||||
if(obj.hashCode() != this.hashCode())
|
||||
return false;
|
||||
|
||||
WildcardType other = (WildcardType) obj;
|
||||
return other.getWildcardedType().equals(wildcardedType);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public Collection<PlaceholderType> getInvolvedPlaceholderTypes() {
|
||||
ArrayList<PlaceholderType> ret = new ArrayList<>();
|
||||
ret.addAll(wildcardedType.getInvolvedPlaceholderTypes());
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|