Commit b23d7030 authored by Ludovic Apvrille's avatar Ludovic Apvrille

Update on code for avatar translation

parent e4fac6b0
......@@ -161,14 +161,14 @@ stdrelease:
mkdir -p $(TTOOL_TARGET)/lib
cd $(TTOOL_MODELING); cp $(RELEASE_STD_FILES_LIB) $(TTOOL_TARGET)/lib
cp $(TTOOL_DOC)/README_lib $(TTOOL_TARGET)/lib
# simulators
mkdir -p $(TTOOL_TARGET)/simulators/systemc1/src_simulator
mkdir -p $(TTOOL_TARGET)/simulators/systemc1/lib
cp $(TTOOL_SIMULATORS)/systemc1/lib/README $(TTOOL_TARGET)/simulators/systemc1/lib/
cp $(TTOOL_SIMULATORS)/systemc1/Makefile $(TTOOL_TARGET)/simulators/systemc1
cp $(TTOOL_SIMULATORS)/systemc1/Makefile.defs $(TTOOL_TARGET)/simulators/systemc1
cp $(TTOOL_SIMULATORS)/systemc1/src_simulator/*.cpp $(TTOOL_TARGET)/simulators/systemc1/src_simulator
cp $(TTOOL_SIMULATORS)/systemc1/src_simulator/*.h $(TTOOL_TARGET)/simulators/systemc1/src_simulator
# DIPLODOCUS simulators
#mkdir -p $(TTOOL_TARGET)/simulators/systemc1/src_simulator
#mkdir -p $(TTOOL_TARGET)/simulators/systemc1/lib
#cp $(TTOOL_SIMULATORS)/systemc1/lib/README $(TTOOL_TARGET)/simulators/systemc1/lib/
#cp $(TTOOL_SIMULATORS)/systemc1/Makefile $(TTOOL_TARGET)/simulators/systemc1
#cp $(TTOOL_SIMULATORS)/systemc1/Makefile.defs $(TTOOL_TARGET)/simulators/systemc1
#cp $(TTOOL_SIMULATORS)/systemc1/src_simulator/*.cpp $(TTOOL_TARGET)/simulators/systemc1/src_simulator
#cp $(TTOOL_SIMULATORS)/systemc1/src_simulator/*.h $(TTOOL_TARGET)/simulators/systemc1/src_simulator
mkdir -p $(TTOOL_TARGET)/simulators/c++2/src_simulator
mkdir -p $(TTOOL_TARGET)/simulators/c++2/src_simulator/app
mkdir -p $(TTOOL_TARGET)/simulators/c++2/src_simulator/arch
......@@ -256,9 +256,86 @@ preinstall: jar preinstall_linux
preinstall_linux:
#jars
cp $(TTOOL_BIN)/*.jar $(TTOOL_PREINSTALL_LINUX)/TTool/bin/
#models
cd $(TTOOL_MODELING); cp $(RELEASE_STD_FILES_XML) $(TTOOL_PREINSTALL_LINUX)/TTool/modeling/
cp $(TTOOL_DOC)/README_modeling $(TTOOL_PREINSTALL_LINUX)/TTool/modeling/
# lib
mkdir -p $(TTOOL_PREINSTALL_LINUX)/TTool/lib
cd $(TTOOL_MODELING); cp $(RELEASE_STD_FILES_LIB) $(TTOOL_PREINSTALL_LINUX)/TTool/lib
cp $(TTOOL_DOC)/README_lib cp $(RELEASE_STD_FILES_LIB) $(TTOOL_PREINSTALL_LINUX)/TTool/lib
# DIPLODOCUS simulators
mkdir -p $(TTOOL_PREINSTALL_LINUX)/TTool/simulators/c++2/src_simulator
mkdir -p $(TTOOL_PREINSTALL_LINUX)/TTool/simulators/c++2/src_simulator/app
mkdir -p $(TTOOL_PREINSTALL_LINUX)/TTool/simulators/c++2/src_simulator/arch
mkdir -p $(TTOOL_PREINSTALL_LINUX)/TTool/simulators/c++2/src_simulator/ebrdd
mkdir -p $(TTOOL_PREINSTALL_LINUX)/TTool/simulators/c++2/src_simulator/evt
mkdir -p $(TTOOL_PREINSTALL_LINUX)/TTool/simulators/c++2/src_simulator/sim
mkdir -p $(TTOOL_PREINSTALL_LINUX)/TTool/simulators/c++2/src_simulator/TEPE
mkdir -p $(TTOOL_PREINSTALL_LINUX)/TTool/simulators/c++2/lib
cp $(TTOOL_SIMULATORS)/c++2/lib/README $(TTOOL_PREINSTALL_LINUX)/TTool/simulators/c++2/lib/
cp $(TTOOL_SIMULATORS)/c++2/Makefile $(TTOOL_PREINSTALL_LINUX)/TTool/simulators/c++2
cp $(TTOOL_SIMULATORS)/c++2/Makefile.defs $(TTOOL_PREINSTALL_LINUX)/TTool/simulators/c++2
cp $(TTOOL_SIMULATORS)/c++2/schedstyle.css $(TTOOL_PREINSTALL_LINUX)/TTool/simulators/c++2
cp $(TTOOL_SIMULATORS)/c++2/src_simulator/*.cpp $(TTOOL_PREINSTALL_LINUX)/TTool/simulators/c++2/src_simulator
cp $(TTOOL_SIMULATORS)/c++2/src_simulator/*.h $(TTOOL_PREINSTALL_LINUX)/TTool/simulators/c++2/src_simulator
cp $(TTOOL_SIMULATORS)/c++2/src_simulator/app/*.cpp $(TTOOL_PREINSTALL_LINUX)/TTool/simulators/c++2/src_simulator/app
cp $(TTOOL_SIMULATORS)/c++2/src_simulator/app/*.h $(TTOOL_PREINSTALL_LINUX)/TTool/simulators/c++2/src_simulator/app
cp $(TTOOL_SIMULATORS)/c++2/src_simulator/arch/*.cpp $(TTOOL_PREINSTALL_LINUX)/TTool/simulators/c++2/src_simulator/arch
cp $(TTOOL_SIMULATORS)/c++2/src_simulator/arch/*.h $(TTOOL_PREINSTALL_LINUX)/TTool/simulators/c++2/src_simulator/arch
cp $(TTOOL_SIMULATORS)/c++2/src_simulator/ebrdd/*.cpp $(TTOOL_PREINSTALL_LINUX)/TTool/simulators/c++2/src_simulator/ebrdd
cp $(TTOOL_SIMULATORS)/c++2/src_simulator/ebrdd/*.h $(TTOOL_PREINSTALL_LINUX)/TTool/simulators/c++2/src_simulator/ebrdd
cp $(TTOOL_SIMULATORS)/c++2/src_simulator/evt/*.cpp $(TTOOL_PREINSTALL_LINUX)/TTool/simulators/c++2/src_simulator/evt
cp $(TTOOL_SIMULATORS)/c++2/src_simulator/evt/*.h $(TTOOL_PREINSTALL_LINUX)/TTool/simulators/c++2/src_simulator/evt
cp $(TTOOL_SIMULATORS)/c++2/src_simulator/sim/*.cpp $(TTOOL_PREINSTALL_LINUX)/TTool/simulators/c++2/src_simulator/sim
cp $(TTOOL_SIMULATORS)/c++2/src_simulator/sim/*.h $(TTOOL_PREINSTALL_LINUX)/TTool/simulators/c++2/src_simulator/sim
cp $(TTOOL_SIMULATORS)/c++2/src_simulator/TEPE/*.cpp $(TTOOL_PREINSTALL_LINUX)/TTool/simulators/c++2/src_simulator/TEPE
cp $(TTOOL_SIMULATORS)/c++2/src_simulator/TEPE/*.h $(TTOOL_PREINSTALL_LINUX)/TTool/simulators/c++2/src_simulator/TEPE
# Licenses
cd $(TTOOL_DOC); cp $(RELEASE_STD_FILES_LICENSES) $(TTOOL_PREINSTALL_LINUX)/TTool
# Main readme
cp $(TTOOL_DOC)/README $(TTOOL_PREINSTALL_LINUX)/TTool
# LOTOS
mkdir -p $(TTOOL_PREINSTALL_LINUX)/TTool)/lotos
cp $(TTOOL_DOC)/README_lotos $(TTOOL_PREINSTALL_LINUX)/TTool/lotos
#NC
mkdir -p $(TTOOL_PREINSTALL_LINUX)/TTool/nc
cp $(TTOOL_DOC)/README_nc $(TTOOL_TARGET)/nc
#TML
mkdir -p $(TTOOL_PREINSTALL_LINUX)/TTool/tmlcode
cp $(TTOOL_DOC)/README_tml $(TTOOL_PREINSTALL_LINUX)/TTool/tmlcode
#UPPAAL
mkdir -p $(TTOOL_PREINSTALL_LINUX)/TTool/uppaal
cp $(TTOOL_DOC)/README_uppaal $(TTOOL_PREINSTALL_LINUX)/TTool/uppaal
# Proverif
mkdir -p $(TTOOL_PREINSTALL_LINUX)/TTool/proverif
cp $(TTOOL_DOC)/README_proverif $(TTOOL_PREINSTALL_LINUX)/TTool/proverif
# Figure
mkdir -p $(TTOOL_PREINSTALL_LINUX)/TTool/figure
cp $(TTOOL_DOC)/README_figure $(TTOOL_PREINSTALL_LINUX)/TTool/figure
# VCD
mkdir -p $(TTOOL_PREINSTALL_LINUX)/TTool/vcd
cp $(TTOOL_DOC)/README_vcd $(TTOOL_PREINSTALL_LINUX)/TTool/vcd
# Basic doc
mkdir -p $(TTOOL_TARGET)/doc
cp $(TTOOL_DOC)/README_doc $(TTOOL_TARGET)/doc
# AVATAR executable code
mkdir -p $(TTOOL_TARGET)/executablecode
mkdir -p $(TTOOL_TARGET)/executablecode/src
mkdir -p $(TTOOL_TARGET)/executablecode/generated_src
cp $(TTOOL_EXECUTABLECODE)/Makefile $(TTOOL_TARGET)/executablecode/
cp $(TTOOL_EXECUTABLECODE)/Makefile.defs $(TTOOL_TARGET)/executablecode/
cp $(TTOOL_EXECUTABLECODE)/Makefile.forsoclib $(TTOOL_TARGET)/executablecode/
cp $(TTOOL_EXECUTABLECODE)/src/*.c $(TTOOL_TARGET)/executablecode/src/
cp $(TTOOL_EXECUTABLECODE)/src/*.h $(TTOOL_TARGET)/executablecode/src/
cp $(TTOOL_EXECUTABLECODE)/generated_src/README $(TTOOL_TARGET)/executablecode/generated_src/
# Basic bin
mkdir -p $(TTOOL_TARGET)/bin
cp $(TTOOL_DOC)/README_bin $(TTOOL_TARGET)/bin
cp $(TTOOL_BIN)/configuration.gcf $(TTOOL_TARGET)/bin
cp -R $(TTOOL_BIN)/$(TTOOL_LOTOS_H).h $(TTOOL_BIN)/$(TTOOL_LOTOS_H)_?.h $(TTOOL_BIN)/$(TTOOL_LOTOS_H)_?.t $(TTOOL_BIN)/$(TTOOL_LOTOS_H)_?.f $(TTOOL_TARGET)/bin
cp $(TTOOL_BIN)/$(TTOOL_BINARY) $(TTOOL_BIN)/$(LAUNCHER_BINARY) $(TTOOL_BIN)/$(TIFTRANSLATOR_BINARY) $(TTOOL_BIN)/$(TMLTRANSLATOR_BINARY) $(TTOOL_BIN)/$(RUNDSE_BINARY) $(TTOOL_BIN)/$(TTOOL_CONFIG_SRC) $(TTOOL_BIN)/$(JSOUP_BINARY) $(TTOOL_BIN)/$(COMMON_CODEC_BINARY) $(TTOOL_TARGET)/bin
jttooljar:
cd $(JTTOOL);$(JAVAC) $(JTTOOL_DIR)/*.java;$(JAR) cmf $(TTOOL_SRC)/$(TTOOL_JAR_TXT) $(TTOOL_BIN)/$(JTTOOL_JAR) $(JTTOOL_DIR)/*.class
......
......@@ -65,7 +65,9 @@
<ExternalServer data="10.188.65.215:12345"/>
<LastWindowAttributes x="90" y="25" width="1219" height="597" max="false" />
<LastWindowAttributes x="494" y="224" width="1219" height="597" max="false" />
<ProVerifHash data=""/>
</TURTLECONFIGURATION>
SRCS = generated_src/main.c generated_src/ObserverProp1.c generated_src/RemotelyControlledMicrowave.c generated_src/RemoteControl.c generated_src/MicroWaveOven.c generated_src/Bell.c generated_src/ControlPanel.c generated_src/Controller.c generated_src/Magnetron.c generated_src/Door.c generated_src/WirelessInterface.c
\ No newline at end of file
SRCS = generated_src/main.c generated_src/ObserverProp1.c generated_src/RemotelyControlledMicrowave.c generated_src/MicroWaveOven.c generated_src/Bell.c generated_src/ControlPanel.c generated_src/Controller.c generated_src/Magnetron.c generated_src/Door.c
\ No newline at end of file
......@@ -51,6 +51,7 @@ import translator.RTLOTOSKeyword;
import translator.tojava.JKeyword;
public abstract class AvatarTerm extends AvatarElement {
public abstract boolean isLeftHand ();
public AvatarTerm (String _name, Object _referenceObject) {
......
/**Copyright or (C) or Copr. GET / ENST, Telecom-Paris, Ludovic Apvrille
*
* ludovic.apvrille AT enst.fr
*
* This software is a computer program whose purpose is to allow the
* edition of TURTLE analysis, design and deployment diagrams, to
* allow the generation of RT-LOTOS or Java code from this diagram,
* and at last to allow the analysis of formal validation traces
* obtained from external tools, e.g. RTL from LAAS-CNRS and CADP
* from INRIA Rhone-Alpes.
*
* This software is governed by the CeCILL license under French law and
* abiding by the rules of distribution of free software. You can use,
* modify and/ or redistribute the software under the terms of the CeCILL
* license as circulated by CEA, CNRS and INRIA at the following URL
* "http://www.cecill.info".
*
* As a counterpart to the access to the source code and rights to copy,
* modify and redistribute granted by the license, users are provided only
* with a limited warranty and the software's author, the holder of the
* economic rights, and the successive licensors have only limited
* liability.
*
* In this respect, the user's attention is drawn to the risks associated
* with loading, using, modifying and/or developing or reproducing the
* software by the user in light of its specific status of free software,
* that may mean that it is complicated to manipulate, and that also
* therefore means that it is reserved for developers and experienced
* professionals having in-depth computer knowledge. Users are therefore
* encouraged to load and test the software's suitability as regards their
* requirements in conditions enabling the security of their systems and/or
* data to be ensured and, more generally, to use and operate it in the
* same conditions as regards security.
*
* The fact that you are presently reading this means that you have had
* knowledge of the CeCILL license and that you accept its terms.
*
* /**
* Class AVATAR2UPPAAL
* Creation: 25/05/2010
* @version 1.1 25/05/2010
* @author Ludovic APVRILLE
* @see
*/
*
* ludovic.apvrille AT enst.fr
*
* This software is a computer program whose purpose is to allow the
* edition of TURTLE analysis, design and deployment diagrams, to
* allow the generation of RT-LOTOS or Java code from this diagram,
* and at last to allow the analysis of formal validation traces
* obtained from external tools, e.g. RTL from LAAS-CNRS and CADP
* from INRIA Rhone-Alpes.
*
* This software is governed by the CeCILL license under French law and
* abiding by the rules of distribution of free software. You can use,
* modify and/ or redistribute the software under the terms of the CeCILL
* license as circulated by CEA, CNRS and INRIA at the following URL
* "http://www.cecill.info".
*
* As a counterpart to the access to the source code and rights to copy,
* modify and redistribute granted by the license, users are provided only
* with a limited warranty and the software's author, the holder of the
* economic rights, and the successive licensors have only limited
* liability.
*
* In this respect, the user's attention is drawn to the risks associated
* with loading, using, modifying and/or developing or reproducing the
* software by the user in light of its specific status of free software,
* that may mean that it is complicated to manipulate, and that also
* therefore means that it is reserved for developers and experienced
* professionals having in-depth computer knowledge. Users are therefore
* encouraged to load and test the software's suitability as regards their
* requirements in conditions enabling the security of their systems and/or
* data to be ensured and, more generally, to use and operate it in the
* same conditions as regards security.
*
* The fact that you are presently reading this means that you have had
* knowledge of the CeCILL license and that you accept its terms.
*
* /**
* Class AVATAR2UPPAAL
* Creation: 25/05/2010
* @version 1.1 25/05/2010
* @author Ludovic APVRILLE
* @see
*/
package avatartranslator.touppaal;
......@@ -158,7 +158,7 @@ public class AVATAR2UPPAAL {
avspec.makeRobustness();
TraceManager.addDev("-> Spec:" + avspec.toString());
//TraceManager.addDev("-> Spec:" + avspec.toString());
UPPAALLocation.reinitID();
gatesNotSynchronized = new LinkedList();
......@@ -788,6 +788,8 @@ public class AVATAR2UPPAAL {
TraceManager.addDev("Adding Action :" + _at.getAction(i));
tmps = _at.getAction(i).toString ();
TraceManager.addDev("tmps=" + tmps);
// Setting a variable
if (AvatarTerm.createActionFromString (_block, tmps).isAVariableSetting ()) {
loc1 = addLocation(_template);
......
......@@ -7892,6 +7892,8 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe
actionOnButton(TGComponentManager.CONNECTOR, TGComponentManager.AVATARMAD_IMPACT_CONNECTOR);
} else if (command.equals(actions[TGUIAction.AMAD_MEET_CONNECTOR].getActionCommand())) {
actionOnButton(TGComponentManager.CONNECTOR, TGComponentManager.AVATARMAD_MEET_CONNECTOR);
} else if (command.equals(actions[TGUIAction.AMAD_BELONGSTOCOMPOSITION_CONNECTOR].getActionCommand())) {
actionOnButton(TGComponentManager.CONNECTOR, TGComponentManager.AVATARMAD_BELONGSTOCOMPOSITION_CONNECTOR);
// AVATAR RD
} else if (command.equals(actions[TGUIAction.ARD_EDIT].getActionCommand())) {
......
......@@ -372,6 +372,7 @@ public class TGComponentManager {
public static final int AVATARMAD_VERSIONING_CONNECTOR = 5254;
public static final int AVATARMAD_IMPACT_CONNECTOR = 5255;
public static final int AVATARMAD_MEET_CONNECTOR = 5256;
public static final int AVATARMAD_BELONGSTOCOMPOSITION_CONNECTOR = 5257;
// AVATAR PD -> starts at 5300
public static final int APD_BLOCK = 5300;
......@@ -1256,6 +1257,8 @@ public class TGComponentManager {
return AVATARMAD_IMPACT_CONNECTOR;
} else if (tgc instanceof AvatarMADMeetConnector) {
return AVATARMAD_MEET_CONNECTOR;
} else if (tgc instanceof AvatarMADBelongsToCompositionConnector) {
return AVATARMAD_BELONGSTOCOMPOSITION_CONNECTOR;
// AVATAR RD
} else if (tgc instanceof AvatarRDRequirement) {
......@@ -1788,6 +1791,9 @@ public class TGComponentManager {
case AVATARMAD_MEET_CONNECTOR:
tgc = new AvatarMADMeetConnector(x, y, tdp.getMinX(), tdp.getMaxX(), tdp.getMinY(), tdp.getMaxY(), false, null, tdp, p1, p2, listPoint);
break;
case AVATARMAD_BELONGSTOCOMPOSITION_CONNECTOR:
tgc = new AvatarMADBelongsToCompositionConnector(x, y, tdp.getMinX(), tdp.getMaxX(), tdp.getMinY(), tdp.getMaxY(), false, null, tdp, p1, p2, listPoint);
break;
// AVATAR RD
case AVATARRD_DERIVE_CONNECTOR:
......
......@@ -362,6 +362,7 @@ public class TGUIAction extends AbstractAction {
public static final int AMAD_DIAGRAM_REFERENCE = 372;
public static final int AMAD_ELEMENT_REFERENCE = 373;
public static final int AMAD_COMPOSITION_CONNECTOR = 374;
public static final int AMAD_BELONGSTOCOMPOSITION_CONNECTOR = 417;
public static final int AMAD_IMPACT_CONNECTOR = 375;
public static final int AMAD_MEET_CONNECTOR = 377;
public static final int AMAD_VERSIONING_CONNECTOR = 376;
......@@ -556,7 +557,7 @@ public class TGUIAction extends AbstractAction {
public static final int ACT_INTERNAL_SEARCH = 415;
//--
public static final int NB_ACTION = 417;
public static final int NB_ACTION = 418;
private static final TAction [] actions = new TAction[NB_ACTION];
......@@ -1036,11 +1037,11 @@ public class TGUIAction extends AbstractAction {
actions[AMAD_ASSUMPTION] = new TAction("add-amad-assumption", "Add an assumption", IconManager.imgic5060, IconManager.imgic5060, "Assumption", "Add an assumption to the currently opened avatar Modeling Assumptions Diagram", 0);
actions[AMAD_DIAGRAM_REFERENCE] = new TAction("add-amad-diagram-reference", "Add a diagram reference", IconManager.imgic5058, IconManager.imgic5058, "Diagram reference", "Add a diagram reference to the currently opened avatar Modeling Assumptions Diagram", 0);
actions[AMAD_ELEMENT_REFERENCE] = new TAction("add-amad-element-reference", "Add a reference to an modeling element", IconManager.imgic5062, IconManager.imgic5062, "Element reference", "Add a reference to an model element in the currently opened avatar Modeling Assumptions Diagram", 0);
actions[AMAD_COMPOSITION_CONNECTOR] = new TAction("add-amad-composition", "Add a composition link", IconManager.imgic1012, IconManager.imgic1012, "Composition", "Add a composition link between two assumptions of the currently opened avatar Modeling Assumptions diagram", 0);
actions[AMAD_COMPOSITION_CONNECTOR] = new TAction("add-amad-composition", "Add a composite link", IconManager.imgic1012, IconManager.imgic1012, "Composite", "Add a composite link between two assumptions of the currently opened avatar Modeling Assumptions diagram", 0);
actions[AMAD_VERSIONING_CONNECTOR] = new TAction("add-amad-versioning", "Add a versioning link", IconManager.imgic5064, IconManager.imgic5064, "Versioning", "Add a versioning link between two assumptions of the currently opened avatar Modeling Assumptions diagram", 0);
actions[AMAD_IMPACT_CONNECTOR] = new TAction("add-amad-impact", "Add an impact link", IconManager.imgic5066, IconManager.imgic5066, "Impact", "Add an impact link between two references to model elements, in the currently opened avatar Modeling Assumptions diagram", 0);
actions[AMAD_MEET_CONNECTOR] = new TAction("add-amad-meet", "Add an meet link", IconManager.imgic5066, IconManager.imgic5066, "Meet", "Add an meet link between a model element and an assumption in the currently opened avatar Modeling Assumptions diagram", 0);
actions[AMAD_MEET_CONNECTOR] = new TAction("add-amad-meet", "Add an meet link", IconManager.imgic5066, IconManager.imgic5066, "Meet", "Add an meet link between a model element and an assumption in the currently opened Avatar Modeling Assumptions diagram", 0);
actions[AMAD_BELONGSTOCOMPOSITION_CONNECTOR] = new TAction("amad-belongstocomposition-connector", "Add a composition connector between references", IconManager.imgic5002, IconManager.imgic5002, "Composition connector", "Add a composition between blocks of the currently opened Avatar Modeling Assumptions diagram", 0);
// AVATAR Requirement Diagrams
actions[ARD_EDIT] = new TAction("edit-ard-diagram", "Edit AVATAR Requirement Diagram", IconManager.imgic100, IconManager.imgic101, "Edit AVATAR Requirement Diagram", "Make it possible to edit the currently opened AVATAR Requirement Diagram", 0);
......
/**Copyright or (C) or Copr. GET / ENST, Telecom-Paris, Ludovic Apvrille
ludovic.apvrille AT enst.fr
This software is a computer program whose purpose is to allow the
edition of TURTLE analysis, design and deployment diagrams, to
allow the generation of RT-LOTOS or Java code from this diagram,
and at last to allow the analysis of formal validation traces
obtained from external tools, e.g. RTL from LAAS-CNRS and CADP
from INRIA Rhone-Alpes.
This software is governed by the CeCILL license under French law and
abiding by the rules of distribution of free software. You can use,
modify and/ or redistribute the software under the terms of the CeCILL
license as circulated by CEA, CNRS and INRIA at the following URL
"http://www.cecill.info".
As a counterpart to the access to the source code and rights to copy,
modify and redistribute granted by the license, users are provided only
with a limited warranty and the software's author, the holder of the
economic rights, and the successive licensors have only limited
liability.
In this respect, the user's attention is drawn to the risks associated
with loading, using, modifying and/or developing or reproducing the
software by the user in light of its specific status of free software,
that may mean that it is complicated to manipulate, and that also
therefore means that it is reserved for developers and experienced
professionals having in-depth computer knowledge. Users are therefore
encouraged to load and test the software's suitability as regards their
requirements in conditions enabling the security of their systems and/or
data to be ensured and, more generally, to use and operate it in the
same conditions as regards security.
The fact that you are presently reading this means that you have had
knowledge of the CeCILL license and that you accept its terms.
/**
* Class AvatarMADAssumption
* Avatar assumption: to be used in Modeling Assumptions diagram of AVATAR
* Creation: 27/08/2013
* @version 1.0 27/08/2013
* @author Ludovic APVRILLE
* @see
*/
ludovic.apvrille AT enst.fr
This software is a computer program whose purpose is to allow the
edition of TURTLE analysis, design and deployment diagrams, to
allow the generation of RT-LOTOS or Java code from this diagram,
and at last to allow the analysis of formal validation traces
obtained from external tools, e.g. RTL from LAAS-CNRS and CADP
from INRIA Rhone-Alpes.
This software is governed by the CeCILL license under French law and
abiding by the rules of distribution of free software. You can use,
modify and/ or redistribute the software under the terms of the CeCILL
license as circulated by CEA, CNRS and INRIA at the following URL
"http://www.cecill.info".
As a counterpart to the access to the source code and rights to copy,
modify and redistribute granted by the license, users are provided only
with a limited warranty and the software's author, the holder of the
economic rights, and the successive licensors have only limited
liability.
In this respect, the user's attention is drawn to the risks associated
with loading, using, modifying and/or developing or reproducing the
software by the user in light of its specific status of free software,
that may mean that it is complicated to manipulate, and that also
therefore means that it is reserved for developers and experienced
professionals having in-depth computer knowledge. Users are therefore
encouraged to load and test the software's suitability as regards their
requirements in conditions enabling the security of their systems and/or
data to be ensured and, more generally, to use and operate it in the
same conditions as regards security.
The fact that you are presently reading this means that you have had
knowledge of the CeCILL license and that you accept its terms.
/**
* Class AvatarMADAssumption
* Avatar assumption: to be used in Modeling Assumptions diagram of AVATAR
* Creation: 27/08/2013
* @version 1.0 27/08/2013
* @author Ludovic APVRILLE
* @see
*/
package ui.avatarmad;
......@@ -129,18 +129,18 @@ public class AvatarMADAssumption extends TGCScalableWithInternalComponent implem
connectingPoint[9] = new AvatarMADAssumptionConnectingPoint(this, 0, 0, true, true, 0.25, 1.0, TGConnectingPoint.SOUTH);
connectingPoint[10] = new AvatarMADAssumptionConnectingPoint(this, 0, 0, true, true, 0.5, 1.0, TGConnectingPoint.SOUTH);
connectingPoint[11] = new AvatarMADAssumptionConnectingPoint(this, 0, 0, true, true, 0.75, 1.0, TGConnectingPoint.SOUTH);
connectingPoint[12] = new AvatarMADToAssumptionsConnectingPoint(this, 0, 0, true, false, 0.0, 0.25, TGConnectingPoint.WEST);
connectingPoint[13] = new AvatarMADToAssumptionsConnectingPoint(this, 0, 0, true, false, 0.0, 0.5, TGConnectingPoint.WEST);
connectingPoint[14] = new AvatarMADToAssumptionsConnectingPoint(this, 0, 0, true, false, 0.0, 0.75, TGConnectingPoint.WEST);
connectingPoint[15] = new AvatarMADToAssumptionsConnectingPoint(this, 0, 0, true, false, 1.0, 0.25, TGConnectingPoint.EAST);
connectingPoint[16] = new AvatarMADToAssumptionsConnectingPoint(this, 0, 0, true, false, 1.0, 0.5, TGConnectingPoint.EAST);
connectingPoint[17] = new AvatarMADToAssumptionsConnectingPoint(this, 0, 0, true, false, 1.0, 0.75, TGConnectingPoint.EAST);
connectingPoint[18] = new AvatarMADToAssumptionsConnectingPoint(this, 0, 0, true, false, 0.25, 0.0, TGConnectingPoint.NORTH);
connectingPoint[19] = new AvatarMADToAssumptionsConnectingPoint(this, 0, 0, true, false, 0.5, 0.0, TGConnectingPoint.NORTH);
connectingPoint[20] = new AvatarMADToAssumptionsConnectingPoint(this, 0, 0, true, false, 0.75, 0.0, TGConnectingPoint.NORTH);
connectingPoint[21] = new AvatarMADToAssumptionsConnectingPoint(this, 0, 0, true, false, 0.25, 1.0, TGConnectingPoint.SOUTH);
connectingPoint[22] = new AvatarMADToAssumptionsConnectingPoint(this, 0, 0, true, false, 0.5, 1.0, TGConnectingPoint.SOUTH);
connectingPoint[23] = new AvatarMADToAssumptionsConnectingPoint(this, 0, 0, true, false, 0.75, 1.0, TGConnectingPoint.SOUTH);
connectingPoint[12] = new AvatarMADToAssumptionsConnectingPoint(this, 0, 0, false, true, 0.0, 0.25, TGConnectingPoint.WEST);
connectingPoint[13] = new AvatarMADToAssumptionsConnectingPoint(this, 0, 0, false, true, 0.0, 0.5, TGConnectingPoint.WEST);
connectingPoint[14] = new AvatarMADToAssumptionsConnectingPoint(this, 0, 0, false, true, 0.0, 0.75, TGConnectingPoint.WEST);
connectingPoint[15] = new AvatarMADToAssumptionsConnectingPoint(this, 0, 0, false, true, 1.0, 0.25, TGConnectingPoint.EAST);
connectingPoint[16] = new AvatarMADToAssumptionsConnectingPoint(this, 0, 0, false, true, 1.0, 0.5, TGConnectingPoint.EAST);
connectingPoint[17] = new AvatarMADToAssumptionsConnectingPoint(this, 0, 0, false, true, 1.0, 0.75, TGConnectingPoint.EAST);
connectingPoint[18] = new AvatarMADToAssumptionsConnectingPoint(this, 0, 0, false, true, 0.25, 0.0, TGConnectingPoint.NORTH);
connectingPoint[19] = new AvatarMADToAssumptionsConnectingPoint(this, 0, 0, false, true, 0.5, 0.0, TGConnectingPoint.NORTH);
connectingPoint[20] = new AvatarMADToAssumptionsConnectingPoint(this, 0, 0, false, true, 0.75, 0.0, TGConnectingPoint.NORTH);
connectingPoint[21] = new AvatarMADToAssumptionsConnectingPoint(this, 0, 0, false, true, 0.25, 1.0, TGConnectingPoint.SOUTH);
connectingPoint[22] = new AvatarMADToAssumptionsConnectingPoint(this, 0, 0, false, true, 0.5, 1.0, TGConnectingPoint.SOUTH);
connectingPoint[23] = new AvatarMADToAssumptionsConnectingPoint(this, 0, 0, false, true, 0.75, 1.0, TGConnectingPoint.SOUTH);
connectingPoint[24] = new AvatarMADAssumptionConnectingPoint(this, 0, 0, true, true, 0.5, 1.0, TGConnectingPoint.SOUTH);
connectingPoint[25] = new AvatarMADAssumptionConnectingPoint(this, 0, 0, true, true, 0.5, 1.0, TGConnectingPoint.SOUTH);
connectingPoint[26] = new AvatarMADAssumptionConnectingPoint(this, 0, 0, true, true, 0.5, 1.0, TGConnectingPoint.SOUTH);
......
/**Copyright or (C) or Copr. GET / ENST, Telecom-Paris, Ludovic Apvrille
ludovic.apvrille AT enst.fr
This software is a computer program whose purpose is to allow the
edition of TURTLE analysis, design and deployment diagrams, to
allow the generation of RT-LOTOS or Java code from this diagram,
and at last to allow the analysis of formal validation traces
obtained from external tools, e.g. RTL from LAAS-CNRS and CADP
from INRIA Rhone-Alpes.
This software is governed by the CeCILL license under French law and
abiding by the rules of distribution of free software. You can use,
modify and/ or redistribute the software under the terms of the CeCILL
license as circulated by CEA, CNRS and INRIA at the following URL
"http://www.cecill.info".
As a counterpart to the access to the source code and rights to copy,
modify and redistribute granted by the license, users are provided only
with a limited warranty and the software's author, the holder of the
economic rights, and the successive licensors have only limited
liability.
In this respect, the user's attention is drawn to the risks associated
with loading, using, modifying and/or developing or reproducing the
software by the user in light of its specific status of free software,
that may mean that it is complicated to manipulate, and that also
therefore means that it is reserved for developers and experienced
professionals having in-depth computer knowledge. Users are therefore
encouraged to load and test the software's suitability as regards their
requirements in conditions enabling the security of their systems and/or
data to be ensured and, more generally, to use and operate it in the
same conditions as regards security.
The fact that you are presently reading this means that you have had
knowledge of the CeCILL license and that you accept its terms.
/**
* Class AvatarMADBelongsToCompositionConnector
* Connector used in AVATAR Assumption Diagrams
* Creation: 16/10/2015
* @version 1.0 16/10/2015
* @author Ludovic APVRILLE
* @see
*/
package ui.avatarmad;
import java.awt.*;
import java.awt.geom.*;
import javax.swing.*;
import java.util.*;
import org.w3c.dom.*;
import myutil.*;
import ui.*;
import ui.cd.*;
import ui.window.*;
public class AvatarMADBelongsToCompositionConnector extends TGConnectorWithCommentConnectionPoints implements ScalableTGComponent{
protected int d = 20;
protected int D = 26;
//protected int widthValue, heightValue, maxWidthValue, h;
protected Polygon p;
protected int xp1, xp2, yp1, yp2;
protected double oldScaleFactor;
protected boolean rescaled;
public AvatarMADBelongsToCompositionConnector(int _x, int _y, int _minX, int _minY, int _maxX, int _maxY, boolean _pos, TGComponent _father, TDiagramPanel _tdp, TGConnectingPoint _p1, TGConnectingPoint _p2, Vector _listPoint) {
super(_x, _y, _minX, _minY, _maxX, _maxY, _pos, _father, _tdp, _p1, _p2, _listPoint);
myImageIcon = IconManager.imgic202;
value = "{info}";
editable = true;
oldScaleFactor = tdp.getZoom();
rescaled = true;
}
protected void drawLastSegment(Graphics g, int x1, int y1, int x2, int y2) {
if ((p == null) || (rescaled) || (xp1 != x1) || (xp2 != x2) || (yp1 != y1) || (yp2 != y2)){
p = new Polygon();
xp1 = x1;
xp2 = x2;
yp1 = y1;
yp2 = y2;
Double alpha;
int dd = (int)(d*tdp.getZoom());
int DD = (int)(D*tdp.getZoom());
if (x1 == x2) {
if (y1 > y2) {
p.addPoint(x2, y2+DD);
p.addPoint(x2+(dd/2), y2+(DD/2));
p.addPoint(x2, y2);
p.addPoint(x2-(dd/2), y2+(DD/2));
} else {
p.addPoint(x2, y2-DD);
p.addPoint(x2+(dd/2), y2-(DD/2));
p.addPoint(x2, y2);
p.addPoint(x2-(dd/2), y2-(DD/2));
}
} else {
double xd[] = new double[4];
double yd[] = new double[4];
/* Previous way of computing the diamond
double a = ((double)y1-y2)/(x1-x2);
alpha = Math.atan(a);
if (x2 < x1) {
x2 = (int)(x2 + (Math.cos(alpha)*D));
y2 = (int)(y2 + (Math.sin(alpha)*D));
} else {
x2 = (int)(x2 - (Math.cos(alpha)*D));
y2 = (int)(y2 - (Math.sin(alpha)*D));
}
int distance;
for(int i=0; i<4; i++){
if ((i%2) == 0) {
distance = D;
} else {
distance = d;
}
xd[i] = x2 + (Math.cos(alpha)*distance);
yd[i] = y2 + (Math.sin(alpha)*distance);
p.addPoint((int)xd[i], (int)yd[i]);
alpha = alpha + (Math.PI/2);
}*/
//P
xd[0] = x2;
yd[0] = y2;
int x0 = x1 - x2;
int y0 = y1 - y2;
double k = 1/(Math.sqrt((x0*x0)+(y0*y0)));
double u = x0*k;
double v = y0*k;
double Ex = DD*u;
double Ey = DD*v;
double Fx = dd*v;
double Fy = -dd*u;
//Q
xd[1] = x2+((Ex+Fx)/2);
yd[1] = y2+((Ey+Fy)/2);
//R
xd[2] = x2+Ex;
yd[2] = y2+Ey;
//S
xd[3] = xd[1] - Fx;
yd[3] = yd[1] - Fy;
for(int i=0; i<4; i++) {
p.addPoint((int)xd[i], (int)yd[i]);
}
}
}
g.fillPolygon(p);
g.drawLine(x1, y1, x2, y2);
rescaled = false;
}
public TGComponent extraIsOnOnlyMe(int x1, int y1) {
if (p != null) {
if (p.contains(x1, y1)) {
return this;
}
}
return null;
}
public void rescale(double scaleFactor){
//System.out.println("Rescale connector");
int xx, yy;
for(int i=0; i<nbInternalTGComponent; i++) {
xx = tgcomponent[i].getX();
yy = tgcomponent[i].getY();
//System.out.println("Internal comp xx= " + xx + " y==" + yy);
tgcomponent[i].dx = (tgcomponent[i].dx + xx) / oldScaleFactor * scaleFactor;
tgcomponent[i].dy = (tgcomponent[i].dy + yy) / oldScaleFactor * scaleFactor;
xx = (int)(tgcomponent[i].dx);
tgcomponent[i].dx = tgcomponent[i].dx - xx;
yy = (int)(tgcomponent[i].dy);
tgcomponent[i].dy = tgcomponent[i].dy - yy;
tgcomponent[i].setCd(xx, yy);
//System.out.println("Internal comp xx= " + xx + " y==" + yy);
}
oldScaleFactor = scaleFactor;
rescaled = true;
}
public int getType() {
return TGComponentManager.AVATARMAD_BELONGSTOCOMPOSITION_CONNECTOR;
}
}
/**Copyright or (C) or Copr. GET / ENST, Telecom-Paris, Ludovic Apvrille
*
* ludovic.apvrille AT enst.fr
*
* This software is a computer program whose purpose is to allow the
* edition of TURTLE analysis, design and deployment diagrams, to
* allow the generation of RT-LOTOS or Java code from this diagram,
* and at last to allow the analysis of formal validation traces
* obtained from external tools, e.g. RTL from LAAS-CNRS and CADP
* from INRIA Rhone-Alpes.
*
* This software is governed by the CeCILL license under French law and
* abiding by the rules of distribution of free software. You can use,
* modify and/ or redistribute the software under the terms of the CeCILL
* license as circulated by CEA, CNRS and INRIA at the following URL
* "http://www.cecill.info".
*
* As a counterpart to the access to the source code and rights to copy,
* modify and redistribute granted by the license, users are provided only
* with a limited warranty and the software's author, the holder of the
* economic rights, and the successive licensors have only limited
* liability.
*
* In this respect, the user's attention is drawn to the risks associated
* with loading, using, modifying and/or developing or reproducing the
* software by the user in light of its specific status of free software,
* that may mean that it is complicated to manipulate, and that also
* therefore means that it is reserved for developers and experienced
* professionals having in-depth computer knowledge. Users are therefore
* encouraged to load and test the software's suitability as regards their
* requ