From 6699352a57590a2305b7d07625ce91fe5f6f068e Mon Sep 17 00:00:00 2001 From: apvrille <ludovic.apvrille@eurecom.fr> Date: Thu, 22 Feb 2018 09:44:51 +0100 Subject: [PATCH] Improvement on the DSE window --- .idea/libraries/libs.xml | 2 +- modeling/DIPLODOCUS/SmartCardProtocol.xml | 144 +++++++++--------- src/main/java/dseengine/DSEConfiguration.java | 24 +-- src/main/java/ui/window/JDialogDSE.java | 16 +- 4 files changed, 94 insertions(+), 92 deletions(-) diff --git a/.idea/libraries/libs.xml b/.idea/libraries/libs.xml index bb5dfd548a..c41bb1c9cf 100644 --- a/.idea/libraries/libs.xml +++ b/.idea/libraries/libs.xml @@ -19,7 +19,7 @@ <root url="jar://$PROJECT_DIR$/libs/derbynet.jar!/" /> <root url="jar://$PROJECT_DIR$/libs/junit-4.12.jar!/" /> <root url="jar://$PROJECT_DIR$/libs/derbyclient-10.9.1.0.jar!/" /> - <root url="jar://$PROJECT_DIR$/libs/commons-math3-3.6.1.jar" /> + <root url="jar://$PROJECT_DIR$/libs/commons-math3-3.6.1.jar!/" /> </CLASSES> <JAVADOC /> <SOURCES /> diff --git a/modeling/DIPLODOCUS/SmartCardProtocol.xml b/modeling/DIPLODOCUS/SmartCardProtocol.xml index 416d0e44b4..66e90fdf8a 100755 --- a/modeling/DIPLODOCUS/SmartCardProtocol.xml +++ b/modeling/DIPLODOCUS/SmartCardProtocol.xml @@ -8,8 +8,8 @@ <cdparam x="522" y="390" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector" value="Connector between ports" /> -<P1 x="522" y="390" id="200" /> -<P2 x="468" y="336" id="47" /> +<P1 x="535" y="377" id="200" /> +<P2 x="455" y="323" id="47" /> <AutomaticDrawing data="true" /> </CONNECTOR> <CONNECTOR type="126" id="2" > @@ -24,16 +24,16 @@ <cdparam x="652" y="444" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector" value="Connector between ports" /> -<P1 x="816" y="554" id="179" /> -<P2 x="971" y="502" id="107" /> +<P1 x="805" y="544" id="179" /> +<P2 x="971" y="481" id="107" /> <AutomaticDrawing data="true" /> </CONNECTOR> <CONNECTOR type="126" id="4" > <cdparam x="652" y="418" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector" value="Connector between ports" /> -<P1 x="816" y="522" id="181" /> -<P2 x="922" y="482" id="105" /> +<P1 x="805" y="512" id="181" /> +<P2 x="932" y="472" id="105" /> <AutomaticDrawing data="true" /> </CONNECTOR> <CONNECTOR type="126" id="5" > @@ -41,134 +41,134 @@ <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector" value="Connector between ports" /> <P1 x="752" y="408" id="189" /> -<P2 x="831" y="376" id="150" /> +<P2 x="844" y="363" id="150" /> <AutomaticDrawing data="true" /> </CONNECTOR> <CONNECTOR type="126" id="6" > <cdparam x="685" y="310" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector" value="Connector between ports" /> -<P1 x="857" y="376" id="154" /> -<P2 x="922" y="368" id="115" /> +<P1 x="844" y="389" id="154" /> +<P2 x="932" y="358" id="115" /> <AutomaticDrawing data="true" /> </CONNECTOR> <CONNECTOR type="126" id="7" > <cdparam x="652" y="395" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector" value="Connector between ports" /> -<P1 x="816" y="493" id="185" /> -<P2 x="922" y="459" id="113" /> +<P1 x="805" y="483" id="185" /> +<P2 x="932" y="449" id="113" /> <AutomaticDrawing data="true" /> </CONNECTOR> <CONNECTOR type="126" id="8" > <cdparam x="652" y="369" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector" value="Connector between ports" /> -<P1 x="816" y="461" id="183" /> -<P2 x="922" y="432" id="111" /> +<P1 x="805" y="451" id="183" /> +<P2 x="932" y="422" id="111" /> <AutomaticDrawing data="true" /> </CONNECTOR> <CONNECTOR type="126" id="9" > <cdparam x="737" y="314" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector" value="Connector between ports" /> -<P1 x="922" y="403" id="109" /> -<P2 x="816" y="432" id="187" /> +<P1 x="932" y="393" id="109" /> +<P2 x="805" y="422" id="187" /> <AutomaticDrawing data="true" /> </CONNECTOR> <CONNECTOR type="126" id="10" > <cdparam x="735" y="260" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector" value="Connector between ports" /> -<P1 x="919" y="336" id="117" /> -<P2 x="749" y="284" id="70" /> +<P1 x="932" y="323" id="117" /> +<P2 x="736" y="271" id="70" /> <AutomaticDrawing data="true" /> </CONNECTOR> <CONNECTOR type="126" id="11" > <cdparam x="641" y="230" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector" value="Connector between ports" /> -<P1 x="749" y="248" id="68" /> -<P2 x="919" y="297" id="119" /> +<P1 x="736" y="235" id="68" /> +<P2 x="932" y="284" id="119" /> <AutomaticDrawing data="true" /> </CONNECTOR> <CONNECTOR type="126" id="12" > <cdparam x="641" y="195" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector" value="Connector between ports" /> -<P1 x="749" y="204" id="66" /> -<P2 x="919" y="254" id="121" /> +<P1 x="736" y="191" id="66" /> +<P2 x="932" y="241" id="121" /> <AutomaticDrawing data="true" /> </CONNECTOR> <CONNECTOR type="126" id="13" > <cdparam x="740" y="353" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector" value="Connector between ports" /> -<P1 x="831" y="376" id="149" /> -<P2 x="749" y="315" id="64" /> +<P1 x="844" y="363" id="149" /> +<P2 x="736" y="302" id="64" /> <AutomaticDrawing data="true" /> </CONNECTOR> <CONNECTOR type="126" id="14" > <cdparam x="460" y="270" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector" value="Connector between ports" /> -<P1 x="522" y="304" id="74" /> -<P2 x="468" y="304" id="41" /> +<P1 x="535" y="291" id="74" /> +<P2 x="455" y="291" id="41" /> <AutomaticDrawing data="true" /> </CONNECTOR> <CONNECTOR type="126" id="15" > <cdparam x="387" y="129" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector" value="Connector between ports" /> -<P1 x="466" y="127" id="37" /> -<P2 x="525" y="127" id="62" /> +<P1 x="455" y="117" id="37" /> +<P2 x="535" y="117" id="62" /> <AutomaticDrawing data="true" /> </CONNECTOR> <CONNECTOR type="126" id="16" > <cdparam x="389" y="200" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector" value="Connector between ports" /> -<P1 x="468" y="216" id="43" /> -<P2 x="522" y="216" id="76" /> +<P1 x="455" y="203" id="43" /> +<P2 x="535" y="203" id="76" /> <AutomaticDrawing data="true" /> </CONNECTOR> <CONNECTOR type="126" id="17" > <cdparam x="460" y="236" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector" value="Connector between ports" /> -<P1 x="522" y="261" id="78" /> -<P2 x="468" y="261" id="45" /> +<P1 x="535" y="248" id="78" /> +<P2 x="455" y="248" id="45" /> <AutomaticDrawing data="true" /> </CONNECTOR> <CONNECTOR type="126" id="18" > <cdparam x="460" y="296" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector" value="Connector between ports" /> -<P1 x="536" y="349" id="80" /> -<P2 x="548" y="390" id="205" /> +<P1 x="536" y="323" id="80" /> +<P2 x="535" y="403" id="205" /> <AutomaticDrawing data="true" /> </CONNECTOR> <CONNECTOR type="126" id="19" > <cdparam x="389" y="163" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector" value="Connector between ports" /> -<P1 x="468" y="170" id="39" /> -<P2 x="522" y="170" id="72" /> +<P1 x="455" y="157" id="39" /> +<P2 x="535" y="157" id="72" /> <AutomaticDrawing data="true" /> </CONNECTOR> <CONNECTOR type="126" id="20" > <cdparam x="967" y="190" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="1000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector from TGComponent to TGComponent" value="Connector between ports" /> -<P1 x="919" y="204" id="123" /> -<P2 x="749" y="125" id="84" /> +<P1 x="932" y="191" id="123" /> +<P2 x="736" y="112" id="84" /> <AutomaticDrawing data="true" /> </CONNECTOR> <CONNECTOR type="126" id="21" > <cdparam x="1028" y="535" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="1000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector from TGComponent to TGComponent" value="Connector between ports" /> -<P1 x="630" y="347" id="60" /> +<P1 x="630" y="326" id="60" /> <P2 x="671" y="408" id="177" /> <AutomaticDrawing data="true" /> </CONNECTOR> @@ -176,24 +176,24 @@ <cdparam x="1304" y="321" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="1000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector from TGComponent to TGComponent" value="Connector between ports" /> -<P1 x="1224" y="379" id="138" /> -<P2 x="1180" y="386" id="103" /> +<P1 x="1234" y="369" id="138" /> +<P2 x="1169" y="376" id="103" /> <AutomaticDrawing data="true" /> </CONNECTOR> <CONNECTOR type="126" id="23" > <cdparam x="1168" y="455" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="1000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector from TGComponent to TGComponent" value="Connector between ports" /> -<P1 x="1180" y="421" id="101" /> -<P2 x="1224" y="414" id="136" /> +<P1 x="1169" y="411" id="101" /> +<P2 x="1234" y="404" id="136" /> <AutomaticDrawing data="true" /> </CONNECTOR> <CONNECTOR type="126" id="26" > <cdparam x="1037" y="180" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="1000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector from TGComponent to TGComponent" value="Connector between ports" /> -<P1 x="1180" y="214" id="99" /> -<P2 x="1180" y="282" id="97" /> +<P1 x="1169" y="204" id="99" /> +<P2 x="1169" y="272" id="97" /> <Point x="1224" y="226" /> <Point x="1224" y="266" /> <AutomaticDrawing data="true" /> @@ -218,8 +218,8 @@ <cdparam x="873" y="361" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="1000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector from TGComponent to TGComponent" value="Connector between ports" /> -<P1 x="1180" y="461" id="95" /> -<P2 x="1224" y="442" id="134" /> +<P1 x="1169" y="451" id="95" /> +<P2 x="1234" y="432" id="134" /> <AutomaticDrawing data="true" /> </CONNECTOR> <COMPONENT type="1205" id="36" > @@ -6393,7 +6393,7 @@ the smart card and the terminal <Modeling type="TML Architecture" nameTab="Mapping2" > <TMLArchiDiagramPanel name="DIPLODOCUS architecture and mapping Diagram" minX="10" maxX="1400" minY="10" maxY="900" attributes="0" masterClockFrequency="200" > <COMPONENT type="1105" id="1529" > -<cdparam x="420" y="527" /> +<cdparam x="309" y="358" /> <sizeparam width="189" height="131" minWidth="100" minHeight="50" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" /> @@ -6429,7 +6429,7 @@ the smart card and the terminal </COMPONENT> <COMPONENT type="1102" id="1554" > -<cdparam x="389" y="438" /> +<cdparam x="278" y="269" /> <sizeparam width="250" height="50" minWidth="100" minHeight="50" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" /> @@ -6465,7 +6465,7 @@ the smart card and the terminal </COMPONENT> <COMPONENT type="1100" id="1588" > -<cdparam x="685" y="396" /> +<cdparam x="574" y="227" /> <sizeparam width="174" height="135" minWidth="150" minHeight="100" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" /> @@ -6501,7 +6501,7 @@ the smart card and the terminal </COMPONENT> <SUBCOMPONENT type="1101" id="1563" > <father id="1588" num="0" /> -<cdparam x="715" y="448" /> +<cdparam x="604" y="279" /> <sizeparam width="109" height="40" minWidth="75" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="0" maxX="65" minY="0" maxY="95" /> @@ -6520,7 +6520,7 @@ the smart card and the terminal </SUBCOMPONENT> <COMPONENT type="1100" id="1622" > -<cdparam x="167" y="400" /> +<cdparam x="56" y="231" /> <sizeparam width="165" height="126" minWidth="150" minHeight="100" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" /> @@ -6556,7 +6556,7 @@ the smart card and the terminal </COMPONENT> <SUBCOMPONENT type="1101" id="1597" > <father id="1622" num="0" /> -<cdparam x="160" y="445" /> +<cdparam x="49" y="276" /> <sizeparam width="172" height="40" minWidth="75" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="0" maxX="-7" minY="0" maxY="86" /> @@ -6575,8 +6575,8 @@ the smart card and the terminal </SUBCOMPONENT> <COMPONENT type="1100" id="1674" > -<cdparam x="389" y="243" /> -<sizeparam width="250" height="146" minWidth="150" minHeight="100" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<cdparam x="278" y="74" /> +<sizeparam width="272" height="167" minWidth="150" minHeight="100" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" /> <infoparam name="CPU0" value="name" /> @@ -6611,10 +6611,10 @@ the smart card and the terminal </COMPONENT> <SUBCOMPONENT type="1101" id="1631" > <father id="1674" num="0" /> -<cdparam x="396" y="258" /> +<cdparam x="288" y="105" /> <sizeparam width="109" height="40" minWidth="75" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> -<cdrectangleparam minX="0" maxX="141" minY="0" maxY="106" /> +<cdrectangleparam minX="0" maxX="163" minY="0" maxY="127" /> <infoparam name="TGComponent" value="AppC::TCPIP" /> <TGConnectingPoint num="0" id="1623" /> <TGConnectingPoint num="1" id="1624" /> @@ -6630,10 +6630,10 @@ the smart card and the terminal </SUBCOMPONENT> <SUBCOMPONENT type="1101" id="1640" > <father id="1674" num="1" /> -<cdparam x="415" y="349" /> +<cdparam x="304" y="180" /> <sizeparam width="144" height="40" minWidth="75" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> -<cdrectangleparam minX="0" maxX="106" minY="0" maxY="106" /> +<cdrectangleparam minX="0" maxX="128" minY="0" maxY="127" /> <infoparam name="TGComponent" value="AppC::Application" /> <TGConnectingPoint num="0" id="1632" /> <TGConnectingPoint num="1" id="1633" /> @@ -6649,10 +6649,10 @@ the smart card and the terminal </SUBCOMPONENT> <SUBCOMPONENT type="1101" id="1649" > <father id="1674" num="2" /> -<cdparam x="486" y="303" /> +<cdparam x="386" y="136" /> <sizeparam width="141" height="40" minWidth="75" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> -<cdrectangleparam minX="0" maxX="109" minY="0" maxY="106" /> +<cdrectangleparam minX="0" maxX="131" minY="0" maxY="127" /> <infoparam name="TGComponent" value="AppC::SmartCard" /> <TGConnectingPoint num="0" id="1641" /> <TGConnectingPoint num="1" id="1642" /> @@ -6668,11 +6668,11 @@ the smart card and the terminal </SUBCOMPONENT> <CONNECTOR type="125" id="1675" > -<cdparam x="513" y="536" /> +<cdparam x="402" y="367" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="1000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector from Memory0 to Bus0" value="{info}" /> -<P1 x="514" y="527" id="1506" /> -<P2 x="514" y="488" id="1536" /> +<P1 x="403" y="358" id="1506" /> +<P2 x="403" y="319" id="1536" /> <AutomaticDrawing data="true" /> <extraparam> <info priority="0" /> @@ -6680,11 +6680,11 @@ the smart card and the terminal </extraparam> </CONNECTOR> <CONNECTOR type="125" id="1676" > -<cdparam x="301" y="469" /> +<cdparam x="190" y="300" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="1000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector from CPU1 to Bus0" value="{info}" /> -<P1 x="332" y="463" id="1602" /> -<P2 x="389" y="463" id="1533" /> +<P1 x="221" y="294" id="1602" /> +<P2 x="278" y="294" id="1533" /> <AutomaticDrawing data="true" /> <extraparam> <info priority="0" /> @@ -6692,11 +6692,11 @@ the smart card and the terminal </extraparam> </CONNECTOR> <CONNECTOR type="125" id="1677" > -<cdparam x="773" y="479" /> +<cdparam x="662" y="310" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="1000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector from CPU2 to Bus0" value="{info}" /> -<P1 x="685" y="463" id="1567" /> -<P2 x="639" y="463" id="1534" /> +<P1 x="574" y="294" id="1567" /> +<P2 x="528" y="294" id="1534" /> <AutomaticDrawing data="true" /> <extraparam> <info priority="0" /> @@ -6704,11 +6704,11 @@ the smart card and the terminal </extraparam> </CONNECTOR> <CONNECTOR type="125" id="1678" > -<cdparam x="499" y="331" /> +<cdparam x="388" y="162" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="1000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector from CPU0 to Bus0" value="{info}" /> -<P1 x="514" y="389" id="1656" /> -<P2 x="514" y="438" id="1531" /> +<P1 x="414" y="241" id="1656" /> +<P2 x="403" y="269" id="1531" /> <AutomaticDrawing data="true" /> <extraparam> <info priority="0" /> diff --git a/src/main/java/dseengine/DSEConfiguration.java b/src/main/java/dseengine/DSEConfiguration.java index a01313f215..7ce3fecfaa 100755 --- a/src/main/java/dseengine/DSEConfiguration.java +++ b/src/main/java/dseengine/DSEConfiguration.java @@ -63,7 +63,6 @@ import java.io.InputStreamReader; import java.util.*; import java.util.List; import org.apache.commons.math3.util.CombinatoricsUtils; - //import tmltranslator.touppaal.*; //import tmltranslator.tomappingsystemc.*; //import tmltranslator.toturtle.*; @@ -1607,10 +1606,10 @@ public class DSEConfiguration implements Runnable { return 0; } - public long getNbOfPossibleMappings(TMLModeling tl) { + public static long getNbOfPossibleMappings(int minNbOfCPUs, int maxNbOfCPUs, TMLModeling tl) { long nb = 0; int nbOfTasks = tl.getTasks().size(); - for (int i=minNbOfCPUs; i<=maxNbOfCPUs; i++) { + for (int i=minNbOfCPUs; i<maxNbOfCPUs; i++) { nb += CombinatoricsUtils.stirlingS2(nbOfTasks, i); } @@ -1641,7 +1640,8 @@ public class DSEConfiguration implements Runnable { max = min + 1; } - TraceManager.addDev("runDSE. Task model loaded. Nb of possible mappings:" + getNbOfPossibleMappings(_tmlm)); + TraceManager.addDev("runDSE. Task model loaded. Nb of possible mappings:" + + getNbOfPossibleMappings(minNbOfCPUs, maxNbOfCPUs, _tmlm)); Vector<TMLMapping<TGComponent>> maps = new Vector<>(); @@ -1714,7 +1714,7 @@ public class DSEConfiguration implements Runnable { private void computeMappings(Vector<TMLTask> remainingTasks, CPUWithTasks[] cpus_tasks, Vector<TMLMapping<TGComponent>> maps, TMLModeling<TGComponent> _tmlm) { if (remainingTasks.size() == 0) { // Can generate the mapping from cpus_tasks - TraceManager.addDev("Making mapping"); + //TraceManager.addDev("Making mapping"); makeMapping(cpus_tasks, maps, _tmlm); return; } @@ -1724,7 +1724,7 @@ public class DSEConfiguration implements Runnable { TMLTask t = remainingTasks.get(0); remainingTasks.remove(t); - TraceManager.addDev("Mapping task: " + t.getName()); + //TraceManager.addDev("Mapping task: " + t.getName()); // Two solutions: either it is mapped on the first free CPU, or it is mapped on an already occupied CPU // Memo: all cpus must have at least one task at the end @@ -1733,7 +1733,7 @@ public class DSEConfiguration implements Runnable { if (nbOfFreeCPUs(cpus_tasks) >= (remainingTasks.size()+1)) { // The task must be mapped on a free CPU // Search for the first free CPU - TraceManager.addDev("The following task must be mapped on a free CPU: " + t.getName()); + //TraceManager.addDev("The following task must be mapped on a free CPU: " + t.getName()); for(int i=0; i<cpus_tasks.length; i++) { if (cpus_tasks[i].getNbOfTasks() == 0) { cpus_tasks[i].addTask(t); @@ -1743,20 +1743,20 @@ public class DSEConfiguration implements Runnable { return; } } - TraceManager.addDev("Task could not be mapped on a free CPU: " + t.getName()); + //TraceManager.addDev("Task could not be mapped on a free CPU: " + t.getName()); } - TraceManager.addDev("Regular mapping of: " + t.getName() + " length=" + cpus_tasks.length); + //TraceManager.addDev("Regular mapping of: " + t.getName() + " length=" + cpus_tasks.length); // It can be mapped on whatever CPU, until the first free one has been met (the first free CPU is inclusive) remainingTasks.remove(t); for(int i=0; i<cpus_tasks.length; i++) { cpus_tasks[i].addTask(t); - TraceManager.addDev("Mapping " + t.getName() + " on CPU #" + i); + //TraceManager.addDev("Mapping " + t.getName() + " on CPU #" + i); computeMappings(remainingTasks, cpus_tasks, maps, _tmlm); - TraceManager.addDev("Removing " + t.getName() + " from CPU #" + i); + //TraceManager.addDev("Removing " + t.getName() + " from CPU #" + i); cpus_tasks[i].removeTask(t); if (cpus_tasks[i].getNbOfTasks() == 0) { - TraceManager.addDev("Stopping mapping since of" + t.getName() + " since CPU #" + i + " is free"); + //TraceManager.addDev("Stopping mapping since of" + t.getName() + " since CPU #" + i + " is free"); remainingTasks.add(t); return; } diff --git a/src/main/java/ui/window/JDialogDSE.java b/src/main/java/ui/window/JDialogDSE.java index 3d8f33f2ad..050842cc53 100644 --- a/src/main/java/ui/window/JDialogDSE.java +++ b/src/main/java/ui/window/JDialogDSE.java @@ -81,10 +81,10 @@ public class JDialogDSE extends JDialog implements ActionListener, ListSelection protected final static int STARTED = 2; protected final static int STOPPED = 3; int mode; - JRadioButton dseButton; - JRadioButton simButton; - JButton addConstraint; - ButtonGroup group; + protected JRadioButton dseButton; + protected JRadioButton simButton; + protected JButton addConstraint; + protected ButtonGroup group; //components @@ -253,12 +253,13 @@ public class JDialogDSE extends JDialog implements ActionListener, ListSelection constraintTextField=new JTextField(); - addConstraint = new JButton("Add Constraint"); addConstraint.addActionListener(this); addConstraint.setPreferredSize(new Dimension(50, 25)); addConstraint.setActionCommand("addConstraint"); - jp03.add(addConstraint, c03); + /*if (mgui.isExperimentalOn()) { + jp03.add(addConstraint, c03); + }*/ @@ -298,7 +299,8 @@ public class JDialogDSE extends JDialog implements ActionListener, ListSelection outputText.setMargin(new Insets(10, 10, 10, 10)); outputText.setTabSize(3); outputText.append("Output results"); - JScrollPane jsp = new JScrollPane(outputText, JScrollPane.VERTICAL_SCROLLBAR_ALWAYS, JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS); + JScrollPane jsp = new JScrollPane(outputText, JScrollPane.VERTICAL_SCROLLBAR_ALWAYS, + JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS); jsp.setPreferredSize(new Dimension(300,300)); Font f = new Font("Courrier", Font.BOLD, 12); outputText.setFont(f); -- GitLab