diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 8f4d89aa..c001021c 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -2,14 +2,11 @@ <project version="4"> <component name="ChangeListManager"> <list default="true" id="5cf612a7-261d-49e6-bf7a-db4b05e41151" name="Default" comment=""> - <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/test/strucTypes5/FieldTest.jav" /> - <change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" /> <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/de/dhbwstuttgart/strucTypes5/algo/Type.java" afterPath="$PROJECT_DIR$/src/de/dhbwstuttgart/strucTypes5/algo/Type.java" /> <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/de/dhbwstuttgart/strucTypes5/algo/TypeExpr.java" afterPath="$PROJECT_DIR$/src/de/dhbwstuttgart/strucTypes5/algo/TypeExpr.java" /> - <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/de/dhbwstuttgart/strucTypes5/assumptions/AssumptionFactory.java" afterPath="$PROJECT_DIR$/src/de/dhbwstuttgart/strucTypes5/assumptions/AssumptionFactory.java" /> - <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/de/dhbwstuttgart/strucTypes5/assumptions/AssumptionMakerGlobal.java" afterPath="$PROJECT_DIR$/src/de/dhbwstuttgart/strucTypes5/assumptions/AssumptionMakerGlobal.java" /> + <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/de/dhbwstuttgart/strucTypes5/assumptions/AssumptionMap.java" afterPath="$PROJECT_DIR$/src/de/dhbwstuttgart/strucTypes5/assumptions/AssumptionMap.java" /> <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/de/dhbwstuttgart/strucTypes5/ausgabe/Class2String.java" afterPath="$PROJECT_DIR$/src/de/dhbwstuttgart/strucTypes5/ausgabe/Class2String.java" /> - <change type="MODIFICATION" beforePath="$PROJECT_DIR$/test/strucTypes5/TypeExprTest.java" afterPath="$PROJECT_DIR$/test/strucTypes5/TypeExprTest.java" /> + <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/de/dhbwstuttgart/strucTypes5/constraints/ConstraintSubTypeGeneric.java" afterPath="$PROJECT_DIR$/src/de/dhbwstuttgart/strucTypes5/constraints/ConstraintSubTypeGeneric.java" /> </list> <ignored path="$PROJECT_DIR$/bin/" /> <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" /> @@ -25,35 +22,21 @@ <component name="ExecutionTargetManager" SELECTED_TARGET="default_target" /> <component name="FileEditorManager"> <leaf SIDE_TABS_SIZE_LIMIT_KEY="300"> - <file leaf-file-name="TypeExpr.java" pinned="false" current-in-tab="true"> - <entry file="file://$PROJECT_DIR$/src/de/dhbwstuttgart/strucTypes5/algo/TypeExpr.java"> + <file leaf-file-name="ConstraintSubTypeGeneric.java" pinned="false" current-in-tab="false"> + <entry file="file://$PROJECT_DIR$/src/de/dhbwstuttgart/strucTypes5/constraints/ConstraintSubTypeGeneric.java"> <provider selected="true" editor-type-id="text-editor"> - <state relative-caret-position="192"> - <caret line="38" column="36" lean-forward="true" selection-start-line="38" selection-start-column="36" selection-end-line="38" selection-end-column="36" /> - <folding> - <element signature="imports" expanded="true" /> - </folding> + <state relative-caret-position="75"> + <caret line="5" column="13" lean-forward="false" selection-start-line="5" selection-start-column="13" selection-end-line="5" selection-end-column="13" /> + <folding /> </state> </provider> </entry> </file> - <file leaf-file-name="AssumptionMakerGlobal.java" pinned="false" current-in-tab="false"> - <entry file="file://$PROJECT_DIR$/src/de/dhbwstuttgart/strucTypes5/assumptions/AssumptionMakerGlobal.java"> + <file leaf-file-name="ConstraintSubType.java" pinned="false" current-in-tab="true"> + <entry file="file://$PROJECT_DIR$/src/de/dhbwstuttgart/strucTypes5/constraints/ConstraintSubType.java"> <provider selected="true" editor-type-id="text-editor"> - <state relative-caret-position="255"> - <caret line="38" column="0" lean-forward="false" selection-start-line="38" selection-start-column="0" selection-end-line="38" selection-end-column="0" /> - <folding> - <element signature="imports" expanded="true" /> - </folding> - </state> - </provider> - </entry> - </file> - <file leaf-file-name="AssumptionFactory.java" pinned="false" current-in-tab="false"> - <entry file="file://$PROJECT_DIR$/src/de/dhbwstuttgart/strucTypes5/assumptions/AssumptionFactory.java"> - <provider selected="true" editor-type-id="text-editor"> - <state relative-caret-position="201"> - <caret line="40" column="0" lean-forward="true" selection-start-line="40" selection-start-column="0" selection-end-line="40" selection-end-column="0" /> + <state relative-caret-position="233"> + <caret line="34" column="23" lean-forward="false" selection-start-line="34" selection-start-column="23" selection-end-line="34" selection-end-column="23" /> <folding /> </state> </provider> @@ -62,18 +45,28 @@ <file leaf-file-name="Type.java" pinned="false" current-in-tab="false"> <entry file="file://$PROJECT_DIR$/src/de/dhbwstuttgart/strucTypes5/algo/Type.java"> <provider selected="true" editor-type-id="text-editor"> - <state relative-caret-position="293"> - <caret line="37" column="0" lean-forward="false" selection-start-line="37" selection-start-column="0" selection-end-line="37" selection-end-column="0" /> + <state relative-caret-position="8"> + <caret line="18" column="13" lean-forward="false" selection-start-line="18" selection-start-column="13" selection-end-line="18" selection-end-column="13" /> <folding /> </state> </provider> </entry> </file> - <file leaf-file-name="AssumptionMap.java" pinned="false" current-in-tab="false"> - <entry file="file://$PROJECT_DIR$/src/de/dhbwstuttgart/strucTypes5/assumptions/AssumptionMap.java"> + <file leaf-file-name="TI.java" pinned="false" current-in-tab="false"> + <entry file="file://$PROJECT_DIR$/src/de/dhbwstuttgart/strucTypes5/algo/TI.java"> <provider selected="true" editor-type-id="text-editor"> - <state relative-caret-position="90"> - <caret line="12" column="13" lean-forward="false" selection-start-line="12" selection-start-column="13" selection-end-line="12" selection-end-column="13" /> + <state relative-caret-position="173"> + <caret line="58" column="9" lean-forward="true" selection-start-line="58" selection-start-column="9" selection-end-line="58" selection-end-column="9" /> + <folding /> + </state> + </provider> + </entry> + </file> + <file leaf-file-name="InterfaceForConstraint.java" pinned="false" current-in-tab="false"> + <entry file="file://$PROJECT_DIR$/src/de/dhbwstuttgart/strucTypes5/constraints/InterfaceForConstraint.java"> + <provider selected="true" editor-type-id="text-editor"> + <state relative-caret-position="150"> + <caret line="10" column="24" lean-forward="true" selection-start-line="10" selection-start-column="24" selection-end-line="10" selection-end-column="24" /> <folding> <element signature="imports" expanded="true" /> </folding> @@ -81,58 +74,6 @@ </provider> </entry> </file> - <file leaf-file-name="AssumptionTest.java" pinned="false" current-in-tab="false"> - <entry file="file://$PROJECT_DIR$/test/strucTypes5/AssumptionTest.java"> - <provider selected="true" editor-type-id="text-editor"> - <state relative-caret-position="204"> - <caret line="44" column="16" lean-forward="false" selection-start-line="44" selection-start-column="16" selection-end-line="44" selection-end-column="16" /> - <folding /> - </state> - </provider> - </entry> - </file> - <file leaf-file-name="TypeExprTest.java" pinned="false" current-in-tab="false"> - <entry file="file://$PROJECT_DIR$/test/strucTypes5/TypeExprTest.java"> - <provider selected="true" editor-type-id="text-editor"> - <state relative-caret-position="435"> - <caret line="50" column="46" lean-forward="false" selection-start-line="50" selection-start-column="46" selection-end-line="50" selection-end-column="46" /> - <folding /> - </state> - </provider> - </entry> - </file> - <file leaf-file-name="FieldTest.java" pinned="false" current-in-tab="false"> - <entry file="file://$PROJECT_DIR$/test/strucTypes5/FieldTest.java"> - <provider selected="true" editor-type-id="text-editor"> - <state relative-caret-position="263"> - <caret line="30" column="32" lean-forward="false" selection-start-line="30" selection-start-column="32" selection-end-line="30" selection-end-column="32" /> - <folding /> - </state> - </provider> - </entry> - </file> - <file leaf-file-name="AssumptionMethod.java" pinned="false" current-in-tab="false"> - <entry file="file://$PROJECT_DIR$/src/de/dhbwstuttgart/strucTypes5/assumptions/AssumptionMethod.java"> - <provider selected="true" editor-type-id="text-editor"> - <state relative-caret-position="60"> - <caret line="10" column="13" lean-forward="false" selection-start-line="10" selection-start-column="13" selection-end-line="10" selection-end-column="13" /> - <folding> - <element signature="imports" expanded="true" /> - </folding> - </state> - </provider> - </entry> - </file> - <file leaf-file-name="FieldTest.jav" pinned="false" current-in-tab="false"> - <entry file="file://$PROJECT_DIR$/test/strucTypes5/FieldTest.jav"> - <provider selected="true" editor-type-id="text-editor"> - <state relative-caret-position="120"> - <caret line="8" column="8" lean-forward="true" selection-start-line="8" selection-start-column="8" selection-end-line="8" selection-end-column="8" /> - <folding /> - </state> - </provider> - </entry> - </file> </leaf> </component> <component name="FileTemplateManagerImpl"> @@ -156,10 +97,19 @@ <find>Constraint</find> <find>methodCa</find> <find>getClass</find> - <find>out</find> <find>ConstraintM</find> <find>Fehler</find> <find>return</find> + <find>generaTe</find> + <find>TypeVar</find> + <find>gene</find> + <find>neue Klas</find> + <find>typevarStor</find> + <find>neu</find> + <find>Not im</find> + <find>new</find> + <find>System</find> + <find>out</find> </findStrings> </component> <component name="Git.Settings"> @@ -173,9 +123,6 @@ <component name="IdeDocumentHistory"> <option name="CHANGED_PATHS"> <list> - <option value="$PROJECT_DIR$/src/de/dhbwstuttgart/strucTypes5/Assumptions/AssumptionField.java" /> - <option value="$PROJECT_DIR$/src/de/dhbwstuttgart/strucTypes5/Assumptions/AssumptionMakerGlobal.java" /> - <option value="$PROJECT_DIR$/src/de/dhbwstuttgart/strucTypes5/Assumptions/AssumptionArgument.java" /> <option value="$PROJECT_DIR$/src/de/dhbwstuttgart/strucTypes5/Assumptions/AssumptionFactory.java" /> <option value="$PROJECT_DIR$/src/de/dhbwstuttgart/strucTypes5/Assumptions/AssumptionMakerLocal.java" /> <option value="$PROJECT_DIR$/src/de/dhbwstuttgart/strucTypes5/Assumptions/AssumptionMethod.java" /> @@ -186,8 +133,6 @@ <option value="$PROJECT_DIR$/src/de/dhbwstuttgart/strucTypes5/ausgabe/Class2Code.java" /> <option value="$PROJECT_DIR$/src/de/dhbwstuttgart/strucTypes5/constraints/ConstraintField.java" /> <option value="$PROJECT_DIR$/src/de/dhbwstuttgart/strucTypes5/constraints/ConstraintMethod.java" /> - <option value="$PROJECT_DIR$/src/de/dhbwstuttgart/strucTypes5/constraints/ConstraintSubTypeGeneric.java" /> - <option value="$PROJECT_DIR$/src/de/dhbwstuttgart/strucTypes5/assumptions/AssumptionMap.java" /> <option value="$PROJECT_DIR$/test/strucTypes5/Class2StringTest.java" /> <option value="$PROJECT_DIR$/test/strucTypes5/NewOperatorTest.java" /> <option value="$PROJECT_DIR$/test/strucTypes5/ConstructTest.jav" /> @@ -218,11 +163,16 @@ <option value="$PROJECT_DIR$/test/strucTypes5/NewOperatorTest3.jav" /> <option value="$PROJECT_DIR$/test/strucTypes5/FieldTest.java" /> <option value="$PROJECT_DIR$/test/strucTypes5/FieldTest.jav" /> - <option value="$PROJECT_DIR$/src/de/dhbwstuttgart/strucTypes5/ausgabe/Class2String.java" /> <option value="$PROJECT_DIR$/src/de/dhbwstuttgart/strucTypes5/assumptions/AssumptionMakerGlobal.java" /> <option value="$PROJECT_DIR$/test/strucTypes5/TypeExprTest.java" /> <option value="$PROJECT_DIR$/src/de/dhbwstuttgart/strucTypes5/assumptions/AssumptionFactory.java" /> <option value="$PROJECT_DIR$/src/de/dhbwstuttgart/strucTypes5/algo/Type.java" /> + <option value="$PROJECT_DIR$/src/de/dhbwstuttgart/strucTypes5/assumptions/MappingAltNeu.java" /> + <option value="$PROJECT_DIR$/src/de/dhbwstuttgart/strucTypes5/assumptions/ResultTuple.java" /> + <option value="$PROJECT_DIR$/src/de/dhbwstuttgart/strucTypes5/ausgabe/Class2String.java" /> + <option value="$PROJECT_DIR$/src/de/dhbwstuttgart/strucTypes5/assumptions/AssumptionMap.java" /> + <option value="$PROJECT_DIR$/src/de/dhbwstuttgart/strucTypes5/constraints/ConstraintSubTypeGeneric.java" /> + <option value="$PROJECT_DIR$/src/de/dhbwstuttgart/strucTypes5/assumptions/ChangeTypeVars.java" /> <option value="$PROJECT_DIR$/src/de/dhbwstuttgart/strucTypes5/algo/TypeExpr.java" /> </list> </option> @@ -309,6 +259,24 @@ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> </PATH_ELEMENT> </PATH> + <PATH> + <PATH_ELEMENT> + <option name="myItemId" value="JavaCompilerCore" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="JavaCompilerCore" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="test" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="strucTypes5" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> + </PATH_ELEMENT> + </PATH> <PATH> <PATH_ELEMENT> <option name="myItemId" value="JavaCompilerCore" /> @@ -323,6 +291,50 @@ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> </PATH_ELEMENT> </PATH> + <PATH> + <PATH_ELEMENT> + <option name="myItemId" value="JavaCompilerCore" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="JavaCompilerCore" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="src" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="dhbwstuttgart" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="typeinference" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> + </PATH_ELEMENT> + </PATH> + <PATH> + <PATH_ELEMENT> + <option name="myItemId" value="JavaCompilerCore" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="JavaCompilerCore" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="src" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="dhbwstuttgart" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="typecheck" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> + </PATH_ELEMENT> + </PATH> <PATH> <PATH_ELEMENT> <option name="myItemId" value="JavaCompilerCore" /> @@ -363,6 +375,32 @@ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> </PATH_ELEMENT> </PATH> + <PATH> + <PATH_ELEMENT> + <option name="myItemId" value="JavaCompilerCore" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="JavaCompilerCore" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="src" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="dhbwstuttgart" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="strucTypes5" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="typeVars" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> + </PATH_ELEMENT> + </PATH> <PATH> <PATH_ELEMENT> <option name="myItemId" value="JavaCompilerCore" /> @@ -557,6 +595,7 @@ <recent name="de.dhbwstuttgart.strucTypes4" /> </key> <key name="CopyClassDialog.RECENTS_KEY"> + <recent name="de.dhbwstuttgart.strucTypes5.assumptions" /> <recent name="strucTypes5" /> <recent name="de.dhbwstuttgart.strucTypes5.algo" /> <recent name="strucTypes3" /> @@ -1089,10 +1128,10 @@ <recent_temporary> <list size="5"> <item index="0" class="java.lang.String" itemvalue="JUnit.NewOperatorTest3.run" /> - <item index="1" class="java.lang.String" itemvalue="JUnit.TypeExprTest.run" /> - <item index="2" class="java.lang.String" itemvalue="JUnit.FieldTest.run" /> - <item index="3" class="java.lang.String" itemvalue="JUnit.TypeExprTest" /> - <item index="4" class="java.lang.String" itemvalue="JUnit.NewOperatorTest2.run" /> + <item index="1" class="java.lang.String" itemvalue="JUnit.NewOperatorTest2.run" /> + <item index="2" class="java.lang.String" itemvalue="JUnit.TypeExprTest.run" /> + <item index="3" class="java.lang.String" itemvalue="JUnit.FieldTest.run" /> + <item index="4" class="java.lang.String" itemvalue="JUnit.TypeExprTest" /> </list> </recent_temporary> </component> @@ -1110,44 +1149,44 @@ <option name="presentableId" value="Default" /> <updated>1492600650522</updated> <workItem from="1492600653626" duration="3746000" /> - <workItem from="1492623646935" duration="105099000" /> + <workItem from="1492623646935" duration="120343000" /> </task> <servers /> </component> <component name="TestHistory"> - <history-entry file="NewOperatorTest3_run - 2017.04.30 at 13h 11m 14s.xml"> + <history-entry file="NewOperatorTest3_run - 2017.04.30 at 16h 33m 28s.xml"> <configuration name="NewOperatorTest3.run" configurationId="JUnit" /> </history-entry> - <history-entry file="NewOperatorTest3_run - 2017.04.30 at 13h 18m 28s.xml"> + <history-entry file="NewOperatorTest3_run - 2017.04.30 at 16h 38m 33s.xml"> <configuration name="NewOperatorTest3.run" configurationId="JUnit" /> </history-entry> - <history-entry file="NewOperatorTest3_run - 2017.04.30 at 13h 20m 56s.xml"> + <history-entry file="NewOperatorTest3_run - 2017.04.30 at 16h 40m 46s.xml"> <configuration name="NewOperatorTest3.run" configurationId="JUnit" /> </history-entry> - <history-entry file="NewOperatorTest3_run - 2017.04.30 at 13h 23m 46s.xml"> + <history-entry file="NewOperatorTest3_run - 2017.04.30 at 16h 40m 56s.xml"> <configuration name="NewOperatorTest3.run" configurationId="JUnit" /> </history-entry> - <history-entry file="NewOperatorTest3_run - 2017.04.30 at 13h 24m 28s.xml"> + <history-entry file="NewOperatorTest3_run - 2017.04.30 at 16h 42m 37s.xml"> <configuration name="NewOperatorTest3.run" configurationId="JUnit" /> </history-entry> - <history-entry file="NewOperatorTest3_run - 2017.04.30 at 13h 26m 10s.xml"> + <history-entry file="NewOperatorTest3_run - 2017.04.30 at 16h 42m 42s.xml"> <configuration name="NewOperatorTest3.run" configurationId="JUnit" /> </history-entry> - <history-entry file="NewOperatorTest3_run - 2017.04.30 at 13h 32m 53s.xml"> + <history-entry file="NewOperatorTest3_run - 2017.04.30 at 16h 42m 51s.xml"> <configuration name="NewOperatorTest3.run" configurationId="JUnit" /> </history-entry> - <history-entry file="TypeExprTest_run - 2017.04.30 at 13h 04m 03s.xml"> - <configuration name="TypeExprTest.run" configurationId="JUnit" /> + <history-entry file="NewOperatorTest3_run - 2017.04.30 at 16h 45m 33s.xml"> + <configuration name="NewOperatorTest3.run" configurationId="JUnit" /> </history-entry> - <history-entry file="TypeExprTest_run - 2017.04.30 at 13h 05m 19s.xml"> - <configuration name="TypeExprTest.run" configurationId="JUnit" /> + <history-entry file="NewOperatorTest3_run - 2017.04.30 at 16h 45m 45s.xml"> + <configuration name="NewOperatorTest3.run" configurationId="JUnit" /> </history-entry> - <history-entry file="TypeExprTest_run - 2017.04.30 at 13h 11m 00s.xml"> - <configuration name="TypeExprTest.run" configurationId="JUnit" /> + <history-entry file="NewOperatorTest3_run - 2017.04.30 at 16h 54m 37s.xml"> + <configuration name="NewOperatorTest3.run" configurationId="JUnit" /> </history-entry> </component> <component name="TimeTrackingManager"> - <option name="totallyTimeSpent" value="108845000" /> + <option name="totallyTimeSpent" value="124089000" /> </component> <component name="ToolWindowManager"> <frame x="0" y="27" width="1442" height="863" extended-state="0" /> @@ -1172,7 +1211,7 @@ <window_info id="Palette	" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" /> <window_info id="Image Layers" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" /> <window_info id="Capture Analysis" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" /> - <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.56806284" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" /> + <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.39005235" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" /> <window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="10" side_tool="false" content_ui="tabs" /> <window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="11" side_tool="false" content_ui="tabs" /> <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" /> @@ -1218,8 +1257,14 @@ <properties /> <option name="timeStamp" value="16" /> </line-breakpoint> + <line-breakpoint enabled="true" type="java-line"> + <url>file://$PROJECT_DIR$/src/de/dhbwstuttgart/strucTypes5/assumptions/ChangeTypeVars.java</url> + <line>46</line> + <properties /> + <option name="timeStamp" value="22" /> + </line-breakpoint> </breakpoints> - <option name="time" value="18" /> + <option name="time" value="23" /> </breakpoint-manager> <watches-manager /> </component> @@ -1228,119 +1273,6 @@ <option name="FILTER_TARGETS" value="false" /> </component> <component name="editorHistoryManager"> - <entry file="file://$PROJECT_DIR$/src/de/dhbwstuttgart/strucTypes5/interfaceTemplates/FieldInterface.java"> - <provider selected="true" editor-type-id="text-editor"> - <state relative-caret-position="120"> - <caret line="10" column="13" lean-forward="false" selection-start-line="10" selection-start-column="13" selection-end-line="10" selection-end-column="13" /> - <folding /> - </state> - </provider> - </entry> - <entry file="file://$PROJECT_DIR$/src/de/dhbwstuttgart/strucTypes5/interfaceTemplates/MethodInterface.java"> - <provider selected="true" editor-type-id="text-editor"> - <state relative-caret-position="135"> - <caret line="15" column="9" lean-forward="false" selection-start-line="15" selection-start-column="9" selection-end-line="15" selection-end-column="9" /> - <folding> - <element signature="imports" expanded="false" /> - </folding> - </state> - </provider> - </entry> - <entry file="file://$PROJECT_DIR$/src/de/dhbwstuttgart/strucTypes5/interfaceTemplates/Interface.java"> - <provider selected="true" editor-type-id="text-editor"> - <state relative-caret-position="225"> - <caret line="15" column="17" lean-forward="false" selection-start-line="15" selection-start-column="17" selection-end-line="15" selection-end-column="17" /> - <folding> - <element signature="imports" expanded="false" /> - </folding> - </state> - </provider> - </entry> - <entry file="file://$PROJECT_DIR$/test/strucTypes5/ConstructTest.java"> - <provider selected="true" editor-type-id="text-editor"> - <state relative-caret-position="161"> - <caret line="35" column="13" lean-forward="false" selection-start-line="35" selection-start-column="13" selection-end-line="35" selection-end-column="13" /> - <folding> - <element signature="imports" expanded="false" /> - </folding> - </state> - </provider> - </entry> - <entry file="file://$PROJECT_DIR$/src/de/dhbwstuttgart/strucTypes5/constraints/InterfaceForConstraint.java"> - <provider selected="true" editor-type-id="text-editor"> - <state relative-caret-position="161"> - <caret line="16" column="11" lean-forward="false" selection-start-line="16" selection-start-column="11" selection-end-line="16" selection-end-column="11" /> - <folding> - <element signature="imports" expanded="true" /> - </folding> - </state> - </provider> - </entry> - <entry file="file://$PROJECT_DIR$/src/de/dhbwstuttgart/strucTypes5/assumptions/AssumptionClass.java"> - <provider selected="true" editor-type-id="text-editor"> - <state relative-caret-position="325"> - <caret line="87" column="4" lean-forward="false" selection-start-line="87" selection-start-column="4" selection-end-line="87" selection-end-column="4" /> - <folding> - <element signature="imports" expanded="true" /> - <element signature="e#1415#1416#0" expanded="true" /> - <element signature="e#1440#1441#0" expanded="true" /> - <element signature="e#1486#1487#0" expanded="true" /> - <element signature="e#1514#1515#0" expanded="true" /> - <element signature="e#1559#1560#0" expanded="true" /> - <element signature="e#1594#1595#0" expanded="true" /> - <element signature="e#1656#1657#0" expanded="true" /> - <element signature="e#1704#1705#0" expanded="true" /> - <element signature="e#1751#1752#0" expanded="true" /> - <element signature="e#1787#1788#0" expanded="true" /> - <element signature="e#1852#1853#0" expanded="true" /> - <element signature="e#1902#1903#0" expanded="true" /> - <element signature="e#1958#1959#0" expanded="true" /> - <element signature="e#1992#1993#0" expanded="true" /> - <element signature="e#2064#2065#0" expanded="true" /> - <element signature="e#2110#2111#0" expanded="true" /> - <element signature="e#2165#2166#0" expanded="true" /> - <element signature="e#2207#2208#0" expanded="true" /> - <element signature="e#2406#2407#0" expanded="true" /> - <element signature="e#2445#2446#0" expanded="true" /> - </folding> - </state> - </provider> - </entry> - <entry file="file://$PROJECT_DIR$/test/strucTypes5/NewOperatorTest.java"> - <provider selected="true" editor-type-id="text-editor"> - <state relative-caret-position="405"> - <caret line="69" column="39" lean-forward="true" selection-start-line="69" selection-start-column="39" selection-end-line="69" selection-end-column="39" /> - <folding /> - </state> - </provider> - </entry> - <entry file="file://$PROJECT_DIR$/test/strucTypes5/NewOperatorTest2.jav"> - <provider selected="true" editor-type-id="text-editor"> - <state relative-caret-position="135"> - <caret line="9" column="37" lean-forward="false" selection-start-line="9" selection-start-column="37" selection-end-line="9" selection-end-column="37" /> - <folding /> - </state> - </provider> - </entry> - <entry file="file://$PROJECT_DIR$/src/de/dhbwstuttgart/strucTypes5/constraints/OldConstraints.java"> - <provider selected="true" editor-type-id="text-editor"> - <state relative-caret-position="255"> - <caret line="17" column="5" lean-forward="true" selection-start-line="17" selection-start-column="5" selection-end-line="17" selection-end-column="5" /> - <folding> - <element signature="e#492#493#0" expanded="true" /> - <element signature="e#548#549#0" expanded="true" /> - </folding> - </state> - </provider> - </entry> - <entry file="file://$PROJECT_DIR$/src/de/dhbwstuttgart/strucTypes5/constraints/ConstraintSubType.java"> - <provider selected="true" editor-type-id="text-editor"> - <state relative-caret-position="345"> - <caret line="41" column="58" lean-forward="true" selection-start-line="41" selection-start-column="58" selection-end-line="41" selection-end-column="58" /> - <folding /> - </state> - </provider> - </entry> <entry file="file://$PROJECT_DIR$/src/de/dhbwstuttgart/strucTypes5/algo/Construct.java"> <provider selected="true" editor-type-id="text-editor"> <state relative-caret-position="133"> @@ -1351,16 +1283,6 @@ </state> </provider> </entry> - <entry file="file://$PROJECT_DIR$/src/de/dhbwstuttgart/strucTypes5/typeVars/MappingAltNeu.java"> - <provider selected="true" editor-type-id="text-editor"> - <state relative-caret-position="261"> - <caret line="39" column="14" lean-forward="false" selection-start-line="39" selection-start-column="14" selection-end-line="39" selection-end-column="14" /> - <folding> - <element signature="imports" expanded="true" /> - </folding> - </state> - </provider> - </entry> <entry file="file://$PROJECT_DIR$/src/de/dhbwstuttgart/strucTypes5/algo/ConstructInterfaceTemplates.java"> <provider selected="true" editor-type-id="text-editor"> <state relative-caret-position="1243"> @@ -1519,14 +1441,6 @@ </state> </provider> </entry> - <entry file="file://$PROJECT_DIR$/test/strucTypes5/NewOperatorTest2.java"> - <provider selected="true" editor-type-id="text-editor"> - <state relative-caret-position="465"> - <caret line="58" column="0" lean-forward="true" selection-start-line="58" selection-start-column="0" selection-end-line="58" selection-end-column="0" /> - <folding /> - </state> - </provider> - </entry> <entry file="file://$PROJECT_DIR$/src/de/dhbwstuttgart/typeinference/unify/GuavaSetOperations.java"> <provider selected="true" editor-type-id="text-editor"> <state relative-caret-position="90"> @@ -1543,24 +1457,6 @@ </state> </provider> </entry> - <entry file="file://$PROJECT_DIR$/src/de/dhbwstuttgart/strucTypes5/constraints/ConstraintField.java"> - <provider selected="true" editor-type-id="text-editor"> - <state relative-caret-position="85"> - <caret line="8" column="13" lean-forward="false" selection-start-line="8" selection-start-column="13" selection-end-line="8" selection-end-column="13" /> - <folding> - <element signature="imports" expanded="true" /> - </folding> - </state> - </provider> - </entry> - <entry file="file://$PROJECT_DIR$/src/de/dhbwstuttgart/strucTypes5/ausgabe/Class2String.java"> - <provider selected="true" editor-type-id="text-editor"> - <state relative-caret-position="136"> - <caret line="130" column="42" lean-forward="true" selection-start-line="130" selection-start-column="42" selection-end-line="130" selection-end-column="42" /> - <folding /> - </state> - </provider> - </entry> <entry file="file://$PROJECT_DIR$/test/strucTypes5/FieldTest.jav"> <provider selected="true" editor-type-id="text-editor"> <state relative-caret-position="120"> @@ -1577,14 +1473,6 @@ </state> </provider> </entry> - <entry file="file://$PROJECT_DIR$/src/de/dhbwstuttgart/strucTypes5/algo/TI.java"> - <provider selected="true" editor-type-id="text-editor"> - <state relative-caret-position="570"> - <caret line="52" column="31" lean-forward="false" selection-start-line="52" selection-start-column="30" selection-end-line="52" selection-end-column="31" /> - <folding /> - </state> - </provider> - </entry> <entry file="file://$PROJECT_DIR$/src/de/dhbwstuttgart/strucTypes5/Start.java"> <provider selected="true" editor-type-id="text-editor"> <state relative-caret-position="75"> @@ -1617,24 +1505,6 @@ </state> </provider> </entry> - <entry file="file://$PROJECT_DIR$/src/de/dhbwstuttgart/strucTypes5/assumptions/AssumptionMap.java"> - <provider selected="true" editor-type-id="text-editor"> - <state relative-caret-position="90"> - <caret line="12" column="13" lean-forward="false" selection-start-line="12" selection-start-column="13" selection-end-line="12" selection-end-column="13" /> - <folding> - <element signature="imports" expanded="true" /> - </folding> - </state> - </provider> - </entry> - <entry file="file://$PROJECT_DIR$/test/strucTypes5/TypeExprTest.java"> - <provider selected="true" editor-type-id="text-editor"> - <state relative-caret-position="435"> - <caret line="50" column="46" lean-forward="false" selection-start-line="50" selection-start-column="46" selection-end-line="50" selection-end-column="46" /> - <folding /> - </state> - </provider> - </entry> <entry file="file://$PROJECT_DIR$/test/strucTypes5/FieldTest.java"> <provider selected="true" editor-type-id="text-editor"> <state relative-caret-position="263"> @@ -1663,32 +1533,186 @@ </state> </provider> </entry> + <entry file="file://$PROJECT_DIR$/src/de/dhbwstuttgart/strucTypes5/assumptions/MappingAltNeu.java"> + <provider selected="true" editor-type-id="text-editor"> + <state relative-caret-position="45"> + <caret line="3" column="34" lean-forward="false" selection-start-line="3" selection-start-column="34" selection-end-line="3" selection-end-column="34" /> + <folding /> + </state> + </provider> + </entry> + <entry file="file://$PROJECT_DIR$/src/de/dhbwstuttgart/strucTypes5/assumptions/ResultTuple.java"> + <provider selected="true" editor-type-id="text-editor"> + <state relative-caret-position="210"> + <caret line="14" column="5" lean-forward="true" selection-start-line="14" selection-start-column="5" selection-end-line="14" selection-end-column="5" /> + <folding /> + </state> + </provider> + </entry> <entry file="file://$PROJECT_DIR$/src/de/dhbwstuttgart/strucTypes5/assumptions/AssumptionFactory.java"> <provider selected="true" editor-type-id="text-editor"> - <state relative-caret-position="201"> - <caret line="40" column="0" lean-forward="true" selection-start-line="40" selection-start-column="0" selection-end-line="40" selection-end-column="0" /> + <state relative-caret-position="75"> + <caret line="5" column="48" lean-forward="false" selection-start-line="5" selection-start-column="48" selection-end-line="5" selection-end-column="48" /> + <folding /> + </state> + </provider> + </entry> + <entry file="file://$PROJECT_DIR$/test/strucTypes5/NewOperatorTest2.java"> + <provider selected="true" editor-type-id="text-editor"> + <state relative-caret-position="210"> + <caret line="60" column="0" lean-forward="true" selection-start-line="60" selection-start-column="0" selection-end-line="60" selection-end-column="0" /> + <folding /> + </state> + </provider> + </entry> + <entry file="file://$PROJECT_DIR$/src/de/dhbwstuttgart/strucTypes5/typeVars/TypeVarStore.java"> + <provider selected="true" editor-type-id="text-editor"> + <state relative-caret-position="-112"> + <caret line="84" column="52" lean-forward="false" selection-start-line="84" selection-start-column="52" selection-end-line="84" selection-end-column="52" /> + <folding> + <element signature="imports" expanded="false" /> + </folding> + </state> + </provider> + </entry> + <entry file="file://$PROJECT_DIR$/src/de/dhbwstuttgart/strucTypes5/typeVars/MappingAltNeu.java"> + <provider selected="true" editor-type-id="text-editor"> + <state relative-caret-position="203"> + <caret line="39" column="20" lean-forward="false" selection-start-line="39" selection-start-column="14" selection-end-line="39" selection-end-column="20" /> + <folding> + <element signature="imports" expanded="true" /> + </folding> + </state> + </provider> + </entry> + <entry file="file://$PROJECT_DIR$/src/de/dhbwstuttgart/strucTypes5/typeVars/ResultTuple.java"> + <provider selected="true" editor-type-id="text-editor"> + <state relative-caret-position="285"> + <caret line="19" column="35" lean-forward="true" selection-start-line="19" selection-start-column="35" selection-end-line="19" selection-end-column="35" /> + <folding /> + </state> + </provider> + </entry> + <entry file="file://$PROJECT_DIR$/src/de/dhbwstuttgart/strucTypes5/assumptions/AssumptionClass.java"> + <provider selected="true" editor-type-id="text-editor"> + <state relative-caret-position="127"> + <caret line="15" column="13" lean-forward="false" selection-start-line="15" selection-start-column="13" selection-end-line="15" selection-end-column="13" /> + <folding> + <element signature="imports" expanded="true" /> + <element signature="e#1559#1560#0" expanded="true" /> + <element signature="e#1594#1595#0" expanded="true" /> + </folding> + </state> + </provider> + </entry> + <entry file="file://$PROJECT_DIR$/src/de/dhbwstuttgart/strucTypes5/constraints/ConstraintMethod.java"> + <provider selected="true" editor-type-id="text-editor"> + <state relative-caret-position="-411"> + <caret line="10" column="13" lean-forward="false" selection-start-line="10" selection-start-column="13" selection-end-line="10" selection-end-column="13" /> + <folding> + <element signature="imports" expanded="true" /> + </folding> + </state> + </provider> + </entry> + <entry file="file://$PROJECT_DIR$/src/de/dhbwstuttgart/strucTypes5/constraints/ConstraintField.java"> + <provider selected="true" editor-type-id="text-editor"> + <state relative-caret-position="120"> + <caret line="8" column="13" lean-forward="false" selection-start-line="8" selection-start-column="13" selection-end-line="8" selection-end-column="13" /> + <folding> + <element signature="imports" expanded="true" /> + </folding> + </state> + </provider> + </entry> + <entry file="file://$PROJECT_DIR$/src/de/dhbwstuttgart/strucTypes5/algo/TypeExpr.java"> + <provider selected="true" editor-type-id="text-editor"> + <state relative-caret-position="-396"> + <caret line="150" column="48" lean-forward="false" selection-start-line="150" selection-start-column="48" selection-end-line="150" selection-end-column="48" /> + <folding> + <element signature="imports" expanded="true" /> + </folding> + </state> + </provider> + </entry> + <entry file="file://$PROJECT_DIR$/src/de/dhbwstuttgart/strucTypes5/assumptions/AssumptionMap.java"> + <provider selected="true" editor-type-id="text-editor"> + <state relative-caret-position="195"> + <caret line="77" column="5" lean-forward="false" selection-start-line="77" selection-start-column="5" selection-end-line="77" selection-end-column="5" /> + <folding> + <element signature="imports" expanded="true" /> + </folding> + </state> + </provider> + </entry> + <entry file="file://$PROJECT_DIR$/test/strucTypes5/TypeExprTest.java"> + <provider selected="true" editor-type-id="text-editor"> + <state relative-caret-position="397"> + <caret line="55" column="22" lean-forward="false" selection-start-line="55" selection-start-column="16" selection-end-line="55" selection-end-column="22" /> + <folding /> + </state> + </provider> + </entry> + <entry file="file://$PROJECT_DIR$/src/de/dhbwstuttgart/strucTypes5/assumptions/ChangeTypeVars.java"> + <provider selected="true" editor-type-id="text-editor"> + <state relative-caret-position="158"> + <caret line="115" column="26" lean-forward="false" selection-start-line="115" selection-start-column="26" selection-end-line="115" selection-end-column="26" /> + <folding> + <element signature="imports" expanded="true" /> + </folding> + </state> + </provider> + </entry> + <entry file="file://$PROJECT_DIR$/src/de/dhbwstuttgart/strucTypes5/ausgabe/Class2String.java"> + <provider selected="true" editor-type-id="text-editor"> + <state relative-caret-position="105"> + <caret line="17" column="13" lean-forward="false" selection-start-line="17" selection-start-column="13" selection-end-line="17" selection-end-column="13" /> <folding /> </state> </provider> </entry> <entry file="file://$PROJECT_DIR$/src/de/dhbwstuttgart/strucTypes5/algo/Type.java"> <provider selected="true" editor-type-id="text-editor"> - <state relative-caret-position="293"> - <caret line="37" column="0" lean-forward="false" selection-start-line="37" selection-start-column="0" selection-end-line="37" selection-end-column="0" /> + <state relative-caret-position="8"> + <caret line="18" column="13" lean-forward="false" selection-start-line="18" selection-start-column="13" selection-end-line="18" selection-end-column="13" /> <folding /> </state> </provider> </entry> - <entry file="file://$PROJECT_DIR$/src/de/dhbwstuttgart/strucTypes5/algo/TypeExpr.java"> + <entry file="file://$PROJECT_DIR$/src/de/dhbwstuttgart/strucTypes5/algo/TI.java"> <provider selected="true" editor-type-id="text-editor"> - <state relative-caret-position="192"> - <caret line="38" column="36" lean-forward="true" selection-start-line="38" selection-start-column="36" selection-end-line="38" selection-end-column="36" /> + <state relative-caret-position="173"> + <caret line="58" column="9" lean-forward="true" selection-start-line="58" selection-start-column="9" selection-end-line="58" selection-end-column="9" /> + <folding /> + </state> + </provider> + </entry> + <entry file="file://$PROJECT_DIR$/src/de/dhbwstuttgart/strucTypes5/constraints/InterfaceForConstraint.java"> + <provider selected="true" editor-type-id="text-editor"> + <state relative-caret-position="150"> + <caret line="10" column="24" lean-forward="true" selection-start-line="10" selection-start-column="24" selection-end-line="10" selection-end-column="24" /> <folding> <element signature="imports" expanded="true" /> </folding> </state> </provider> </entry> + <entry file="file://$PROJECT_DIR$/src/de/dhbwstuttgart/strucTypes5/constraints/ConstraintSubTypeGeneric.java"> + <provider selected="true" editor-type-id="text-editor"> + <state relative-caret-position="75"> + <caret line="5" column="13" lean-forward="false" selection-start-line="5" selection-start-column="13" selection-end-line="5" selection-end-column="13" /> + <folding /> + </state> + </provider> + </entry> + <entry file="file://$PROJECT_DIR$/src/de/dhbwstuttgart/strucTypes5/constraints/ConstraintSubType.java"> + <provider selected="true" editor-type-id="text-editor"> + <state relative-caret-position="233"> + <caret line="34" column="23" lean-forward="false" selection-start-line="34" selection-start-column="23" selection-end-line="34" selection-end-column="23" /> + <folding /> + </state> + </provider> + </entry> </component> <component name="masterDetails"> <states> diff --git a/src/de/dhbwstuttgart/strucTypes5/algo/Type.java b/src/de/dhbwstuttgart/strucTypes5/algo/Type.java index cbf27d61..0492e7bf 100644 --- a/src/de/dhbwstuttgart/strucTypes5/algo/Type.java +++ b/src/de/dhbwstuttgart/strucTypes5/algo/Type.java @@ -27,19 +27,12 @@ public class Type { AssumptionMakerGlobal assumptionMakerGlobal = new AssumptionMakerGlobal(cl,typeVarStore); assumptions.addAll(assumptionMakerGlobal.getAssumptionAbstractList()); - - + // TypeExpression für jede Methode ausführen for (Method m : cl.getMethods()) { // Erstelle Lokale Assumptions AssumptionMakerLocal assumptionMakerLocal = new AssumptionMakerLocal(m, typeVarStore); assumptions.addAll(assumptionMakerLocal.getResultAssumptionList()); TypeExpr typeExpr = new TypeExpr(assumptions , m, typeVarStore); - - - - - - constraintList.addAll(typeExpr.getResultConstraints()); } } diff --git a/src/de/dhbwstuttgart/strucTypes5/algo/TypeExpr.java b/src/de/dhbwstuttgart/strucTypes5/algo/TypeExpr.java index 3dae0291..80243920 100644 --- a/src/de/dhbwstuttgart/strucTypes5/algo/TypeExpr.java +++ b/src/de/dhbwstuttgart/strucTypes5/algo/TypeExpr.java @@ -3,6 +3,8 @@ package de.dhbwstuttgart.strucTypes5.algo; import de.dhbwstuttgart.strucTypes5.assumptions.AssumptionClass; import de.dhbwstuttgart.strucTypes5.assumptions.AssumptionMakerLocal; import de.dhbwstuttgart.strucTypes5.assumptions.AssumptionMap; +import de.dhbwstuttgart.strucTypes5.assumptions.ChangeTypeVars; +import de.dhbwstuttgart.strucTypes5.ausgabe.Class2String; import de.dhbwstuttgart.strucTypes5.constraints.*; import de.dhbwstuttgart.strucTypes5.typeVars.TypeVar; import de.dhbwstuttgart.strucTypes5.typeVars.TypeVarAbstract; @@ -67,7 +69,6 @@ public class TypeExpr { LocalVar localVar = (LocalVar) expression; // Erstellung keines Constriants // Lediglich eintrag in TypeVarStore - // ToDo wie sieht es mit einem MethodCall aus? TypeVarAbstract typeVar = assumptionMap.getVarAssumption(localVar.get_expression()); typeVarStore.addTuple(typeVar,localVar.getType()); List<ConstraintAbstract> result = new ArrayList<>(); @@ -143,17 +144,57 @@ public class TypeExpr { + /* + Information: + Als erstes werden die Typvariablen verwendet die bereits zuvor in Construct eingefügt wurden. + Danach wird die Assumption ausgetauscht mit einer neuen Klasse mit neuen Typvariablen. + Diese können dann verwendet werden. + */ + + //Versuche Informationen zu laden AssumptionClass assumptionClass = assumptionMap.getClassAssumption(newClass.getType().toString()); if (assumptionClass != null) { - System.out.println("assumption gefunden"); OldConstraints oldConstraints= new OldConstraints(assumptionClass.getConstraints()); result.add(oldConstraints); + + System.out.println("-----------------KlassenAssumption ------"); + System.out.println(assumptionClass.getTypeVarStore().toString()); + Class2String class2String = new Class2String(); + System.out.println(class2String.generateStringTypeVars(assumptionClass.getCl(), assumptionClass.getTypeVarStore())); + System.out.println("-----------------------"); + + ChangeTypeVars changeTypeVars = new ChangeTypeVars(); + AssumptionClass assumptionClass1 = changeTypeVars.change(assumptionClass); + assumptionMap.putClass(assumptionClass1); } + + + + + /* + //Versuche Informationen zu laden + AssumptionClass assumptionClass = assumptionMap.getClassAssumption(newClass.getType().toString()); + if (assumptionClass != null) { + + // an dieser Stelle müssen die Variablen getauscht werden + ChangeTypeVars changeTypeVars = new ChangeTypeVars(); + AssumptionClass assumptionClass1 = changeTypeVars.change(assumptionClass); + OldConstraints oldConstraints = new OldConstraints(assumptionClass1.getConstraints()); + result.add(oldConstraints); + + // print new generatet class + System.out.println("-----------------neue Klasse ------"); + Class2String class2String = new Class2String(); + + System.out.println(class2String.generateStringTypeVars(assumptionClass1.getCl(), assumptionClass1.getTypeVarStore())); + System.out.println("-----------------------"); + } + */ + + typeVarStore.addTuple(TypeVarFactory.makeTypeVar() , newClass.getType()); - - return result; } else { diff --git a/src/de/dhbwstuttgart/strucTypes5/assumptions/AssumptionMap.java b/src/de/dhbwstuttgart/strucTypes5/assumptions/AssumptionMap.java index 0cb97cf4..9d68a9f1 100644 --- a/src/de/dhbwstuttgart/strucTypes5/assumptions/AssumptionMap.java +++ b/src/de/dhbwstuttgart/strucTypes5/assumptions/AssumptionMap.java @@ -71,6 +71,12 @@ public class AssumptionMap { } + + public boolean putClass(AssumptionClass ass){ + classAss.put( ass.getCl().getClassName().toString(), ass); + return true; + } + public TypeVarAbstract getThisVar(String name) { return fass.get(name).getTypeVar(); } diff --git a/src/de/dhbwstuttgart/strucTypes5/assumptions/ChangeTypeVars.java b/src/de/dhbwstuttgart/strucTypes5/assumptions/ChangeTypeVars.java new file mode 100644 index 00000000..c888e397 --- /dev/null +++ b/src/de/dhbwstuttgart/strucTypes5/assumptions/ChangeTypeVars.java @@ -0,0 +1,124 @@ +package de.dhbwstuttgart.strucTypes5.assumptions; + + + +import de.dhbwstuttgart.strucTypes5.algo.Type; +import de.dhbwstuttgart.strucTypes5.constraints.ConstraintAbstract; +import de.dhbwstuttgart.strucTypes5.constraints.ConstraintSubType; +import de.dhbwstuttgart.strucTypes5.constraints.ConstraintSubTypeGeneric; +import de.dhbwstuttgart.strucTypes5.constraints.InterfaceForConstraint; +import de.dhbwstuttgart.strucTypes5.interfaceTemplates.Interface; +import de.dhbwstuttgart.strucTypes5.typeVars.MappingAltNeu; +import de.dhbwstuttgart.strucTypes5.typeVars.ResultTuple; +import de.dhbwstuttgart.strucTypes5.typeVars.TypeVar; +import de.dhbwstuttgart.strucTypes5.typeVars.TypeVarAbstract; +import de.dhbwstuttgart.typeinference.constraints.Constraint; + +import java.util.ArrayList; +import java.util.List; + +/** + * This class is for using the new Operator. + * This Class Change the Typvar and give Back a new Class for Saving in the Assumptions + * There have to be replace the typvars in the class, the generics, and the typeVars in the constraints. + */ +public class ChangeTypeVars { + + + public AssumptionClass change(AssumptionClass oldAssClass) { + + AssumptionClass assumptionClass = new AssumptionClass(); + + assumptionClass.setCl(oldAssClass.getCl()); + + + ResultTuple resultTuple = oldAssClass.getTypeVarStore().freshVariableAndMapping(); + MappingAltNeu mappingAltNeu = resultTuple.getMappingAltNeu(); + + + // now make new Constraints and generics + List<ConstraintAbstract> constraints = oldAssClass.getConstraints(); + List<ConstraintAbstract> newConstraints = new ArrayList<>(); + for (ConstraintAbstract c : constraints) { + if (c instanceof ConstraintSubTypeGeneric ) { + + ConstraintSubTypeGeneric csub = (ConstraintSubTypeGeneric) c; + + Object tsub = csub.getSubType(); + Object tsuper = csub.getSuperType(); + + Object tsubnew = null; + Object tsupernew = null; + + if (tsub instanceof TypeVar) { + TypeVar tsubcast = (TypeVar) tsub; + TypeVar newTSub = (TypeVar) mappingAltNeu.getNeu(tsubcast); + tsubnew = newTSub; + } + else if (tsub instanceof InterfaceForConstraint) { + tsubnew = tsub; + } + else { + System.err.println("Fehler ChangeTypeVars"); + } + + + if (tsuper instanceof TypeVar) { + TypeVar tsupercast = (TypeVar) tsuper; + TypeVar newTsuper = (TypeVar) mappingAltNeu.getNeu(tsupercast); + tsubnew = newTsuper; + } + else if (tsuper instanceof InterfaceForConstraint) { + tsupernew = tsuper; + } + else { + System.err.println("Fehler ChangeTypeVars"); + } + + + ConstraintSubTypeGeneric<Object,Object> cs = new ConstraintSubTypeGeneric<>(tsubnew ,tsupernew ); + + newConstraints.add(cs); + + } + else if (c instanceof ConstraintSubType) { + ConstraintSubType csub = (ConstraintSubType) c; + + TypeVar tsub = csub.getSubtype(); + TypeVar tsuper = csub.getSuperType(); + + TypeVar newTSub = (TypeVar) mappingAltNeu.getNeu(tsub); + TypeVar newTsuper = (TypeVar) mappingAltNeu.getNeu(tsuper); + + ConstraintSubType newC = new ConstraintSubType(newTSub , newTsuper); + newConstraints.add(newC); + } + } + + + assumptionClass.setTypeVarStore(resultTuple.getTypeVarStore()); + assumptionClass.setConstraints(newConstraints); + assumptionClass.setGeneratedinterfaces(oldAssClass.getGeneratedinterfaces()); + + + // Tausche Generics aus + List<TypeVarAbstract> genericsneu = new ArrayList<>(); + for (TypeVarAbstract tv : oldAssClass.getGenericsForClass()) { + if (tv instanceof TypeVar) { + TypeVar genericNeu = (TypeVar) mappingAltNeu.getNeu(tv); + genericsneu.add(genericNeu); + } + } + + assumptionClass.setGenericsForClass(genericsneu); + + + // Was fehlt ist die AssumptionList + return assumptionClass; + } + + + + + +} diff --git a/src/de/dhbwstuttgart/strucTypes5/ausgabe/Class2String.java b/src/de/dhbwstuttgart/strucTypes5/ausgabe/Class2String.java index 1dfadd0c..089fecd1 100644 --- a/src/de/dhbwstuttgart/strucTypes5/ausgabe/Class2String.java +++ b/src/de/dhbwstuttgart/strucTypes5/ausgabe/Class2String.java @@ -175,7 +175,7 @@ public class Class2String { return ((RefType) ref).getName().toString(); } - System.out.println(ref); + //System.out.println(ref); // Typ ist nicht bekannt if (typeVarStore.getTypeVarByTPH(ref) == null) { diff --git a/src/de/dhbwstuttgart/strucTypes5/constraints/ConstraintSubTypeGeneric.java b/src/de/dhbwstuttgart/strucTypes5/constraints/ConstraintSubTypeGeneric.java index 2a7acfc1..2520e100 100644 --- a/src/de/dhbwstuttgart/strucTypes5/constraints/ConstraintSubTypeGeneric.java +++ b/src/de/dhbwstuttgart/strucTypes5/constraints/ConstraintSubTypeGeneric.java @@ -33,7 +33,7 @@ public class ConstraintSubTypeGeneric<T1, T2> extends ConstraintAbstract { @Override public String toString() { - return String.format("ConstraintSubType( %s <* %s )" , subType , superType); + return String.format("ConstraintSubTypeG( %s <* %s )" , subType , superType); }