Commit dee83c34 authored by Ludovic Apvrille's avatar Ludovic Apvrille

Merge branch 'revert-ed201590' into 'master'

Revert "Merge branch 'latencyDetailedAnalysis' into 'master'"

See merge request !262
parents ed201590 6fe33a38
......@@ -26,10 +26,6 @@ dependencies {
compile name:'jautomata-core'
compile name:'com.microsoft.z3'
compileOnly name: 'jna-3.3.0'
compile name: 'jgrapht-core-1.3.0'
compile name: 'jgrapht-ext-1.3.0'
compile name: 'jgrapht-io-1.3.0'
compile name: 'jgraphx-3.4.1.3'
}
jar {
......
......@@ -36,6 +36,7 @@
* knowledge of the CeCILL license and that you accept its terms.
*/
package tmltranslator;
import myutil.TraceManager;
......@@ -43,7 +44,8 @@ import myutil.TraceManager;
import java.util.*;
/**
* Class TMLArchitecture Creation: 05/09/2007
* Class TMLArchitecture
* Creation: 05/09/2007
*
* @author Ludovic APVRILLE
* @version 1.1 19/05/2008
......@@ -57,6 +59,7 @@ public class TMLArchitecture {
private int hashCode;
private boolean hashCodeComputed = false;
public TMLArchitecture() {
init();
}
......@@ -67,10 +70,10 @@ public class TMLArchitecture {
}
private void computeHashCode() {
TMLArchiTextSpecification architxt = new TMLArchiTextSpecification(/* "spec.tarchi" */);
TMLArchiTextSpecification architxt = new TMLArchiTextSpecification(/*"spec.tarchi"*/);
String s = architxt.toTextFormat(this);
hashCode = s.hashCode();
// TraceManager.addDev("TARCHI hashcode = " + hashCode);
//TraceManager.addDev("TARCHI hashcode = " + hashCode);
}
public int getHashCode() {
......@@ -90,6 +93,7 @@ public class TMLArchitecture {
return masterClockFrequency;
}
public void addHwNode(HwNode _node) {
hwnodes.add(_node);
}
......@@ -133,6 +137,7 @@ public class TMLArchitecture {
addHwLink(link);
}
public boolean hasCPU() {
for (HwNode node : hwnodes) {
if (node instanceof HwCPU) {
......@@ -144,7 +149,7 @@ public class TMLArchitecture {
public boolean hasHwExecutionNode() {
for (HwNode node : hwnodes) {
if ((node instanceof HwCPU) || (node instanceof HwA) || (node instanceof HwFPGA)) {
if ((node instanceof HwCPU)|| (node instanceof HwA)|| (node instanceof HwFPGA)) {
return true;
}
}
......@@ -253,6 +258,7 @@ public class TMLArchitecture {
return list;
}
public int getNbOfCPU() {
int cpt = 0;
for (HwNode node : hwnodes) {
......@@ -273,6 +279,7 @@ public class TMLArchitecture {
return cpt;
}
public int getNbOfMem() {
int cpt = 0;
for (HwNode node : hwnodes) {
......@@ -293,9 +300,9 @@ public class TMLArchitecture {
public HwNode getHwNodeByName(String _name) {
for (HwNode node : hwnodes) {
// TraceManager.addDev("Comparing >" + node.getName() + "< vs >" + _name + "<");
//TraceManager.addDev("Comparing >" + node.getName() + "< vs >" + _name + "<");
if (node.getName().compareTo(_name) == 0) {
// TraceManager.addDev("Returning node " + node.getName());
//TraceManager.addDev("Returning node " + node.getName());
return node;
}
}
......@@ -382,8 +389,7 @@ public class TMLArchitecture {
List<HwLink> tempList = new ArrayList<HwLink>();
for (HwLink link : hwlinks) {
if (link.hwnode == node)
tempList.add(link);
if (link.hwnode == node) tempList.add(link);
}
return tempList;
......@@ -400,8 +406,7 @@ public class TMLArchitecture {
public boolean isNodeConnectedToBus(HwNode node, HwBus bus) {
for (HwLink link : hwlinks) {
if (node == link.hwnode && bus == link.bus)
return true;
if (node == link.hwnode && bus == link.bus) return true;
}
return false;
}
......@@ -410,8 +415,7 @@ public class TMLArchitecture {
List<HwLink> tempList = new ArrayList<HwLink>();
for (HwLink link : hwlinks) {
if (link.bus == bus)
tempList.add(link);
if (link.bus == bus) tempList.add(link);
}
return tempList;
......@@ -426,17 +430,17 @@ public class TMLArchitecture {
if (node instanceof HwCPU) {
HwCPU cpu = (HwCPU) node;
complexity += cpu.nbOfCores * cpu.byteDataSize * cpu.pipelineSize;
// TraceManager.addDev("complexity CPU= " + complexity);
//TraceManager.addDev("complexity CPU= " + complexity);
}
if (node instanceof HwBus) {
HwBus bus = (HwBus) node;
complexity += bus.byteDataSize * bus.pipelineSize;
// TraceManager.addDev("complexity bus= " + complexity);
//TraceManager.addDev("complexity bus= " + complexity);
}
}
// TraceManager.addDev("Complexity = " + complexity);
//TraceManager.addDev("Complexity = " + complexity);
return complexity;
}
......@@ -472,10 +476,11 @@ public class TMLArchitecture {
return false;
}
// For NoC manipulation
public void removeAllNonHwExecutionNodes() {
List<HwNode> newList = new ArrayList<HwNode>();
for (HwNode node : hwnodes) {
for(HwNode node: hwnodes) {
if (node instanceof HwExecutionNode) {
newList.add(node);
}
......@@ -484,9 +489,9 @@ public class TMLArchitecture {
}
public HwNoC getHwNoC() {
for (HwNode node : hwnodes) {
for(HwNode node: hwnodes) {
if (node instanceof HwNoC) {
return ((HwNoC) node);
return ((HwNoC)node);
}
}
return null;
......@@ -498,60 +503,17 @@ public class TMLArchitecture {
}
public boolean equalSpec(Object o) {
if (this == o)
return true;
if (o == null || getClass() != o.getClass())
return false;
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
TMLArchitecture that = (TMLArchitecture) o;
TMLComparingMethod comp = new TMLComparingMethod();
if (!comp.isHwNodeListEquals(hwnodes, that.hwnodes))
return false;
if (!comp.isHwNodeListEquals(hwnodes, that.hwnodes)) return false;
if (!comp.isHwlinkListEquals(hwlinks, that.hwlinks))
return false;
if(!comp.isHwlinkListEquals(hwlinks, that.hwlinks)) return false;
return masterClockFrequency == that.masterClockFrequency;
}
public List<HwNode> getBUSs() {
List<HwNode> buss = new ArrayList<HwNode>();
for (HwNode node : hwnodes) {
if (node instanceof HwBus) {
buss.add(node);
}
}
return buss;
}
public List<HwMemory> getMemories() {
List<HwMemory> list = new ArrayList<HwMemory>();
for (HwNode node : hwnodes) {
if (node instanceof HwMemory) {
HwMemory memory = (HwMemory) node;
list.add(memory);
}
}
return list;
}
public List<HwBridge> getHwBridge() {
List<HwBridge> bridgeList = new ArrayList<HwBridge>();
for (HwNode node : hwnodes) {
if (node instanceof HwBridge) {
HwBridge bridge = (HwBridge) node;
bridgeList.add(bridge);
}
}
return bridgeList;
}
}
This diff is collapsed.
This diff is collapsed.
......@@ -36,6 +36,7 @@
* knowledge of the CeCILL license and that you accept its terms.
*/
package ui;
import common.ConfigurationTTool;
......@@ -47,16 +48,19 @@ import javax.swing.*;
//import java.awt.*;
//import java.awt.event.*;
/**
* Class JMenuBarTurtle Creation: 09/12/2003 Version 1.0 09/12/2003 Version 1.5
* 11/10/2018
* Class JMenuBarTurtle
* Creation: 09/12/2003
* Version 1.0 09/12/2003
* Version 1.5 11/10/2018
*
* @author Ludovic APVRILLE, Arthur VUAGNIAUX
*/
public class JMenuBarTurtle extends JMenuBar {
private JMenu menugraph;
// Menu
//Menu
private JMenu file, saveLastGraph, diagram, cd, ad, iod, ucd, sd, edit, vAndV, codeG, view, tool, capture, ontologies, help;
public JMenuBarTurtle(MainGUI mgui) {
......@@ -76,6 +80,7 @@ public class JMenuBarTurtle extends JMenuBar {
menuItem.addActionListener(mgui);
}
public void makeFileMenu(MainGUI mgui) {
JMenuItem menuItem;
......@@ -167,9 +172,8 @@ public class JMenuBarTurtle extends JMenuBar {
if (ConfigurationTTool.LastOpenFileDefined) {
file.addSeparator();
for (int i = 0; i < ConfigurationTTool.LastOpenFiles.length; i++) {
// TraceManager.addDev("Considering last open file: " +
// ConfigurationTTool.LastOpenFiles[i]);
for(int i=0; i<ConfigurationTTool.LastOpenFiles.length;i++){
//TraceManager.addDev("Considering last open file: " + ConfigurationTTool.LastOpenFiles[i]);
if ((ConfigurationTTool.LastOpenFiles[i] != null) && (ConfigurationTTool.LastOpenFiles[i].length() > 0)) {
menuItem = file.add(mgui.actionsLast[i]);
menuItem.addMouseListener(mgui.mouseHandler);
......@@ -199,7 +203,7 @@ public class JMenuBarTurtle extends JMenuBar {
JMenuItem menuItem;
makeFileMenu(mgui);
// Edit
//Edit
menuItem = edit.add(mgui.actions[TGUIAction.ACT_CUT]);
menuItem.setName("Edit Cut");
menuItem.addMouseListener(mgui.mouseHandler);
......@@ -286,12 +290,10 @@ public class JMenuBarTurtle extends JMenuBar {
menuItem = iod.add(mgui.actions[TGUIAction.IOD_PARALLEL]);
menuItem.setName("Iod Parallel");
menuItem.addMouseListener(mgui.mouseHandler);
/*
* menuItem = iod.add(mgui.actions[TGUIAction.IOD_SEQUENCE]);
* menuItem.addMouseListener(mgui.mouseHandler); menuItem =
* iod.add(mgui.actions[TGUIAction.IOD_PREEMPTION]);
* menuItem.addMouseListener(mgui.mouseHandler);
*/
/*menuItem = iod.add(mgui.actions[TGUIAction.IOD_SEQUENCE]);
menuItem.addMouseListener(mgui.mouseHandler);
menuItem = iod.add(mgui.actions[TGUIAction.IOD_PREEMPTION]);
menuItem.addMouseListener(mgui.mouseHandler);*/
menuItem = iod.add(mgui.actions[TGUIAction.IOD_CHOICE]);
menuItem.setName("Iod Choice");
menuItem.addMouseListener(mgui.mouseHandler);
......@@ -515,7 +517,7 @@ public class JMenuBarTurtle extends JMenuBar {
menuItem.setName("Ad Time Limited Latency");
menuItem.addMouseListener(mgui.mouseHandler);
// V&V
// V&V
menuItem = vAndV.add(mgui.actions[TGUIAction.ACT_MODEL_CHECKING]);
menuItem.setName("V&V Syntax Analysis");
menuItem.addMouseListener(mgui.mouseHandler);
......@@ -526,6 +528,7 @@ public class JMenuBarTurtle extends JMenuBar {
menuItem.setName("V&V Gen RTLOTOS");
menuItem.addMouseListener(mgui.mouseHandler);
if (MainGUI.lotosOn) {
menuItem = vAndV.add(mgui.actions[TGUIAction.ACT_GEN_LOTOS]);
menuItem.setName("V&V Gen LOTOS");
......@@ -544,12 +547,10 @@ public class JMenuBarTurtle extends JMenuBar {
menuItem.setName("V&V Gen Design");
menuItem.addMouseListener(mgui.mouseHandler);
/*
* vAndV.addSeparator();
*
* menuItem = vAndV.add(mgui.actions[TGUIAction.ACT_GEN_JAVA]);
* menuItem.addMouseListener(mgui.mouseHandler);
*/
/*vAndV.addSeparator();
menuItem = vAndV.add(mgui.actions[TGUIAction.ACT_GEN_JAVA]);
menuItem.addMouseListener(mgui.mouseHandler);*/
vAndV.addSeparator();
......@@ -591,15 +592,13 @@ public class JMenuBarTurtle extends JMenuBar {
menuItem.setName("V&V Saved Aut");
menuItem.addMouseListener(mgui.mouseHandler);
/*
* vAndV.addSeparator(); menuItem =
* vAndV.add(mgui.actions[TGUIAction.ACT_VIEW_PM_AUT]);
* menuItem.addMouseListener(mgui.mouseHandler); menuItem =
* vAndV.add(mgui.actions[TGUIAction.ACT_VIEW_PM_AUTPROJ]);
* menuItem.addMouseListener(mgui.mouseHandler); menuItem =
* vAndV.add(mgui.actions[TGUIAction.ACT_VIEW_PM_SAVED_AUT]);
* menuItem.addMouseListener(mgui.mouseHandler);
*/
/*vAndV.addSeparator();
menuItem = vAndV.add(mgui.actions[TGUIAction.ACT_VIEW_PM_AUT]);
menuItem.addMouseListener(mgui.mouseHandler);
menuItem = vAndV.add(mgui.actions[TGUIAction.ACT_VIEW_PM_AUTPROJ]);
menuItem.addMouseListener(mgui.mouseHandler);
menuItem = vAndV.add(mgui.actions[TGUIAction.ACT_VIEW_PM_SAVED_AUT]);
menuItem.addMouseListener(mgui.mouseHandler);*/
vAndV.addSeparator();
menuItem = vAndV.add(mgui.actions[TGUIAction.ACT_AVATAR_SIM]);
......@@ -615,13 +614,13 @@ public class JMenuBarTurtle extends JMenuBar {
menuItem.setName("V&V Avatar Static Analysis");
menuItem.addMouseListener(mgui.mouseHandler);
/*
* vAndV.addSeparator(); menuItem =
* vAndV.add(mgui.actions[TGUIAction.ACT_DEADLOCK_SEEKER_AUT]);
* menuItem.addMouseListener(mgui.mouseHandler); menuItem =
* vAndV.add(mgui.actions[TGUIAction.ACT_DEADLOCK_SEEKER_SAVED_AUT]);
* menuItem.addMouseListener(mgui.mouseHandler);
*/
/*vAndV.addSeparator();
menuItem = vAndV.add(mgui.actions[TGUIAction.ACT_DEADLOCK_SEEKER_AUT]);
menuItem.addMouseListener(mgui.mouseHandler);
menuItem = vAndV.add(mgui.actions[TGUIAction.ACT_DEADLOCK_SEEKER_SAVED_AUT]);
menuItem.addMouseListener(mgui.mouseHandler);*/
// Code generation
......@@ -647,13 +646,6 @@ public class JMenuBarTurtle extends JMenuBar {
menuItem.setName("CodeG Executable");
menuItem.addMouseListener(mgui.mouseHandler);
if (mgui.isExperimentalOn()) {
vAndV.addSeparator();
menuItem = vAndV.add(mgui.actions[TGUIAction.ACT_GEN_LATENCY_GRAPH]);
menuItem.setName("Latency Detailed Analysis");
menuItem.addMouseListener(mgui.mouseHandler);
}
// View
menuItem = view.add(mgui.actions[TGUIAction.ACT_VIEW_BIRDEYES_EMB]);
menuItem.setName("View Hide Birdeye");
......@@ -712,12 +704,14 @@ public class JMenuBarTurtle extends JMenuBar {
menuItem.setName("View Saved Graph");
menuItem.addMouseListener(mgui.mouseHandler);
/*
* if (MainGUI.systemcOn) { view.addSeparator(); menuItem =
* view.add(mgui.actions[TGUIAction.ACT_VIEW_WAVE]);
* menuItem.addMouseListener(mgui.mouseHandler); view.addSeparator(); menugraph
* = new JMenu("View generated automata"); view.add(menugraph); }
*/
/*if (MainGUI.systemcOn) {
view.addSeparator();
menuItem = view.add(mgui.actions[TGUIAction.ACT_VIEW_WAVE]);
menuItem.addMouseListener(mgui.mouseHandler);
view.addSeparator();
menugraph = new JMenu("View generated automata");
view.add(menugraph);
}*/
// Tool
capture = new JMenu("Capture");
......@@ -745,6 +739,7 @@ public class JMenuBarTurtle extends JMenuBar {
menuItem.setName("Capture Selected");
menuItem.addMouseListener(mgui.mouseHandler);
ontologies = new JMenu("Ontologies");
tool.add(ontologies);
menuItem = ontologies.add(mgui.actions[TGUIAction.ACT_GENERATE_ONTOLOGIES_CURRENT_DIAGRAM]);
......@@ -782,6 +777,7 @@ public class JMenuBarTurtle extends JMenuBar {
menuItem.setName("Tool Search");
menuItem.addMouseListener(mgui.mouseHandler);
// HELP
menuItem = help.add(mgui.actions[TGUIAction.ACT_INTEGRATED_HELP]);
menuItem.setName("Help");
......@@ -810,14 +806,14 @@ public class JMenuBarTurtle extends JMenuBar {
// MenuBar
add(file);
add(edit);
// add(diagram);
//add(diagram);
add(vAndV);
add(codeG);
add(view);
add(tool);
add(help);
// menuItem.setName("Menu Item");
//menuItem.setName("Menu Item");
}
} // Class
This diff is collapsed.
......@@ -183,7 +183,6 @@ public class ModeManager {
actions[TGUIAction.ACT_GEN_AUT].setEnabled(true);
actions[TGUIAction.ACT_GEN_AUTS].setEnabled(true);
actions[TGUIAction.ACT_GEN_UPPAAL].setEnabled(true);
actions[TGUIAction.ACT_GEN_LATENCY_GRAPH].setEnabled(true);
break;
case MainGUI.AVATAR_SYNTAXCHECKING_OK:
actions[TGUIAction.ACT_AVATAR_SIM].setEnabled(true);
......@@ -253,7 +252,6 @@ public class ModeManager {
actions[TGUIAction.ACT_AVATAR_FV_PROVERIF].setEnabled(false);
actions[TGUIAction.ACT_AVATAR_FV_STATICANALYSIS].setEnabled(false);
actions[TGUIAction.ACT_AVATAR_EXECUTABLE_GENERATION].setEnabled(false);
actions[TGUIAction.ACT_GEN_LATENCY_GRAPH].setEnabled(false);
break;
case MainGUI.METHO_CHANGED:
actions[TGUIAction.ACT_GEN_RTLOTOS].setEnabled(false);
......@@ -302,7 +300,6 @@ public class ModeManager {
actions[TGUIAction.ACT_AVATAR_FV_PROVERIF].setEnabled(false);
actions[TGUIAction.ACT_AVATAR_FV_STATICANALYSIS].setEnabled(false);
actions[TGUIAction.ACT_AVATAR_EXECUTABLE_GENERATION].setEnabled(false);
actions[TGUIAction.ACT_GEN_LATENCY_GRAPH].setEnabled(false);
break;
case MainGUI.MODEL_SAVED:
......
......@@ -678,8 +678,6 @@ public class TGUIAction extends AbstractAction {
public static final int MOVE_ENABLED = 463;
public static final int FIRST_DIAGRAM = 464;
public static final int ACT_GEN_LATENCY_GRAPH = 519;
public static final int NB_ACTION = 525;
private static final TAction [] actions = new TAction[NB_ACTION];
......@@ -1407,7 +1405,6 @@ public class TGUIAction extends AbstractAction {
actions[MOVE_ENABLED] = new TAction("Move", "Move enabled", IconManager.imgic780, IconManager.imgic780, "Move enabled (shift + arrow)", "Move", 0);
actions[FIRST_DIAGRAM] = new TAction("FirstDiagram", "First Diagram", IconManager.imgic142, IconManager.imgic142, "Switch the the first diagram", "Switch to the first diagram", 0);
actions[ACT_GEN_LATENCY_GRAPH] = new TAction("generate-latency-graph", "Analyze Latency Graph", IconManager.imgic1118, IconManager.imgic1118, "Analyze Latency Graph", "Analyze Latency Graph", '0');
}
public String getActionCommand() {
......
This diff is collapsed.
This diff is collapsed.
......@@ -95,7 +95,6 @@ public class SimulationTransactionParser extends DefaultHandler {
st.length = attributes.getValue("length");
st.virtualLength = attributes.getValue("virtuallength");
st.channelName = attributes.getValue("ch");
st.id = attributes.getValue("id");
if (trans == null) {
trans = new Vector<SimulationTransaction>();
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment