diff --git a/Makefile b/Makefile index 2aa999c6f518e746d206dc68d36eea965a9555da..43b91c8fead3f9117c4b43d226600d4bc616adc9 100755 --- a/Makefile +++ b/Makefile @@ -54,7 +54,8 @@ make ultraclean Clean the repository from binaries and compilation artif make ttooljavac Build TTool only with javac make ttoolnotest Build TTool with gradle, but do not execute test. Performs the install -make allnotest Builld all apps, but do not execute tests. Performs the install +make allnotest Builld all apps, but do not execute tests. Performs the install +make ttoolhelp Generate the help of TTool in HTML format Other targets: @@ -127,6 +128,10 @@ export WEBCRAWLER_SERVER_BINARY = $(TTOOL_BUILD)/webcrawler-server.jar export JTTOOL_DIR = $(TTOOL_PATH)/jttool export JTTOOL_BINARY = $(TTOOL_BUILD)/jttool.jar +export TTOOL_HELP_DIR = $(TTOOL_PATH)/src/main/resources/help +MD_FILES=$(wildcard src/main/resources/help/*.md) +MD2HTML=$(MD_FILES:.md=.html) + all: ttool launcher ttool-cli graphminimize graphshow tiftranslator tmltranslator rundse remotesimulator webcrawler install allnotest: GRADLE_OPTIONS += $(GRADLE_NO_TEST) @@ -141,7 +146,7 @@ ttoolnotest: $(TTOOL_BINARY): FORCE @($(GRADLE) :ttool:build $(GRADLE_OPTIONS)) || ($(ERROR_MSG) $(GRADLE_VERSION) $(GRADLE_VERSION_NEEDED)&& $(MAKE) -C $(TTOOL_DIR) -e $@) -ttooljavac: +ttooljavac: $(MAKE) -C $(TTOOL_DIR) $(MAKE) -C $(TTOOLCLI_DIR) @@ -196,6 +201,13 @@ $(WEBCRAWLER_SERVER_BINARY): FORCE $(JTTOOL_BINARY): FORCE @$(MAKE) -C $(JTTOOL_DIR) -e $@ +ttoolhelp: html + +html: $(MD2HTML) + +%.html: %.md + pandoc $< -f markdown -t html -s -o $@ + # ======================================== # ========== DOCUMENTATION ========== # ======================================== diff --git a/build.txt b/build.txt index f2553be6972e31755684665f8ee55d21221f2dd0..736cf1d23e0b20a73b7b5e6a72e2619296b2616c 100644 --- a/build.txt +++ b/build.txt @@ -1 +1 @@ -12963 \ No newline at end of file +12964 \ No newline at end of file diff --git a/src/main/java/help/HelpEntry.java b/src/main/java/help/HelpEntry.java new file mode 100644 index 0000000000000000000000000000000000000000..0a6714190f64bc504757326f66cec847a83f460b --- /dev/null +++ b/src/main/java/help/HelpEntry.java @@ -0,0 +1,78 @@ +/* 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. + */ + + +package help; + +import common.ConfigurationTTool; +import common.SpecConfigTTool; +import launcher.RTLLauncher; +import myutil.PluginManager; +import myutil.TraceManager; +import ui.MainGUI; +import ui.util.IconManager; +import ui.window.JDialogSystemCGeneration; +import ui.*; + +import java.io.File; +import java.util.BitSet; +import java.util.*; + + +/** + * Class HelpEntry + * Creation: 28/02/2019 + * Version 2.0 28/02/2019 + * + * @author Ludovic APVRILLE + */ +public class HelpEntry { + public String pathToHTMLFile; + public String masterKeyword; + public String[] keywords; + public String htmlContent; + + Vector<HelpEntry> entries; + + + public HelpEntry() { + entries = new Vector<>(); + } + + +} diff --git a/src/main/java/help/HelpManager.java b/src/main/java/help/HelpManager.java new file mode 100644 index 0000000000000000000000000000000000000000..9795ab28a8a440c8eddc1cefd12b18ceb0bac441 --- /dev/null +++ b/src/main/java/help/HelpManager.java @@ -0,0 +1,80 @@ +/* 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. + */ + + +package help; + +import common.ConfigurationTTool; +import common.SpecConfigTTool; +import launcher.RTLLauncher; +import myutil.PluginManager; +import myutil.TraceManager; +import ui.MainGUI; +import ui.util.IconManager; +import ui.window.JDialogSystemCGeneration; +import ui.*; + +import java.io.File; +import java.util.BitSet; +import java.util.*; + + +/** + * Class HelpManager + * Creation: 28/02/2019 + * Version 2.0 28/02/2019 + * + * @author Ludovic APVRILLE + */ +public class HelpManager { + + private boolean helpLoaded = false; + + Vector<HelpEntry> entries; + + public HelpManager() { + entries = new Vector<>(); + } + + // Returns false in case of failure + public boolean loadEntries() { + helpLoaded = true; + + return true; + } +} diff --git a/src/main/java/tmltranslator/dsez3engine/OptimizationModel.java b/src/main/java/tmltranslator/dsez3engine/OptimizationModel.java index 58d342cf5f740b8827dfd4d2884dc7d60b1c85a3..aa7cd0f84bd703a9e9ffaa92c36c8fdcd6902319 100644 --- a/src/main/java/tmltranslator/dsez3engine/OptimizationModel.java +++ b/src/main/java/tmltranslator/dsez3engine/OptimizationModel.java @@ -830,12 +830,7 @@ public class OptimizationModel { } - - class TestFailedException extends Exception { - public TestFailedException() { - super("Check FAILED"); - } - } + } diff --git a/src/main/java/ui/MainGUI.java b/src/main/java/ui/MainGUI.java index 83c2c4848e30c4e61abd529781969b3a69acce58..709c2f2ac94b22d528c984151fc09cc1a9575078 100644 --- a/src/main/java/ui/MainGUI.java +++ b/src/main/java/ui/MainGUI.java @@ -39,6 +39,7 @@ package ui; +import help.HelpManager; import myutil.*; import avatartranslator.AvatarSpecification; import common.ConfigurationTTool; @@ -329,6 +330,9 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Per private JFrameInteractiveSimulation jfis; private JFrameAvatarInteractiveSimulation jfais; + // Help + HelpManager helpManager; + // Invariants Invariant currentInvariant; @@ -555,6 +559,9 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Per //split.setDividerLocation(220); } + // Help + helpManager = new HelpManager(); + // // ToolBar diff --git a/src/main/java/ui/util/DefaultText.java b/src/main/java/ui/util/DefaultText.java index bc3d629fefaea16ee90e0d6ca10143999ddee468..7a959f378dfbe8d13ad3b4c4d82128babd2fdec1 100755 --- a/src/main/java/ui/util/DefaultText.java +++ b/src/main/java/ui/util/DefaultText.java @@ -50,8 +50,8 @@ package ui.util; */ public class DefaultText { - public static String BUILD = "12962"; - public static String DATE = "2019/02/27 03:02:17 CET"; + public static String BUILD = "12963"; + public static String DATE = "2019/02/28 03:02:18 CET"; public static StringBuffer sbAbout = makeAbout(); diff --git a/src/main/resources/help/architecture.html b/src/main/resources/help/architecture.html new file mode 100644 index 0000000000000000000000000000000000000000..6d7e98764cfebc595c82678e1475d9c343b7b733 --- /dev/null +++ b/src/main/resources/help/architecture.html @@ -0,0 +1,13 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + <meta http-equiv="Content-Style-Type" content="text/css" /> + <meta name="generator" content="pandoc" /> + <title></title> + <style type="text/css">code{white-space: pre;}</style> +</head> +<body> +<p>The architecture is used to capture abstract hardware nodes that can be connected through buses.</p> +</body> +</html> diff --git a/src/main/resources/help/architecture.md b/src/main/resources/help/architecture.md new file mode 100644 index 0000000000000000000000000000000000000000..f06d0428467df3079e7d2259c78dab09c66aef67 --- /dev/null +++ b/src/main/resources/help/architecture.md @@ -0,0 +1 @@ +The architecture is used to capture abstract hardware nodes that can be connected through buses. \ No newline at end of file diff --git a/src/main/resources/help/clockdivider.html b/src/main/resources/help/clockdivider.html new file mode 100644 index 0000000000000000000000000000000000000000..79d5c7b72c40e318173446935595f19f22d579fc --- /dev/null +++ b/src/main/resources/help/clockdivider.html @@ -0,0 +1,14 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + <meta http-equiv="Content-Style-Type" content="text/css" /> + <meta name="generator" content="pandoc" /> + <title></title> + <style type="text/css">code{white-space: pre;}</style> +</head> +<body> +<p>The clock divider parameter specifies the relation between the main hardware clock (which is assumed to be unique) and the clock of the corresponding hardware node.</p> +<p>Said differently, a clock divider of "x" means that the clock of this nodes runs at mainclock/x MHz.</p> +</body> +</html> diff --git a/src/main/resources/help/clockdivider.md b/src/main/resources/help/clockdivider.md new file mode 100644 index 0000000000000000000000000000000000000000..d8e26e105cc5fe1605e0381e274472d2ae7b3c28 --- /dev/null +++ b/src/main/resources/help/clockdivider.md @@ -0,0 +1,3 @@ +The clock divider parameter specifies the relation between the main hardware clock (which is assumed to be unique) and the clock of the corresponding hardware node. + +Said differently, a clock divider of "x" means that the clock of this nodes runs at mainclock/x MHz. \ No newline at end of file diff --git a/src/main/resources/help/cpu.html b/src/main/resources/help/cpu.html new file mode 100644 index 0000000000000000000000000000000000000000..5638f104bd689d3025634d227b45fbc44ade0ea7 --- /dev/null +++ b/src/main/resources/help/cpu.html @@ -0,0 +1,13 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + <meta http-equiv="Content-Style-Type" content="text/css" /> + <meta name="generator" content="pandoc" /> + <title></title> + <style type="text/css">code{white-space: pre;}</style> +</head> +<body> +<p>The CPU node abstracts a CPU. It simulation semantics ...</p> +</body> +</html> diff --git a/src/main/resources/help/cpu.md b/src/main/resources/help/cpu.md new file mode 100644 index 0000000000000000000000000000000000000000..9f64719388d358132a6a31c0f00c1b1b6f44f0ed --- /dev/null +++ b/src/main/resources/help/cpu.md @@ -0,0 +1,2 @@ +The CPU node abstracts a CPU. +It simulation semantics ... \ No newline at end of file diff --git a/src/main/resources/help/diplodocus.html b/src/main/resources/help/diplodocus.html new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/src/main/resources/help/diplodocus.md b/src/main/resources/help/diplodocus.md new file mode 100644 index 0000000000000000000000000000000000000000..3ef34ca22eb5baba49d07848aa02b3961d8b29d7 --- /dev/null +++ b/src/main/resources/help/diplodocus.md @@ -0,0 +1 @@ +Diplodocus targets the hardware/software partitioning of embedded systems \ No newline at end of file diff --git a/src/main/resources/help/general.html b/src/main/resources/help/general.html new file mode 100644 index 0000000000000000000000000000000000000000..9257a784b55a2bbf1f1c1c2bca6e0183b785a86f --- /dev/null +++ b/src/main/resources/help/general.html @@ -0,0 +1,15 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + <meta http-equiv="Content-Style-Type" content="text/css" /> + <meta name="generator" content="pandoc" /> + <title></title> + <style type="text/css">code{white-space: pre;}</style> +</head> +<body> +<p>TTool is a tool for assisting designer to create the architecture and the software of embedded systems.</p> +<p>TTool can be executed on Microsoft Windows, MacOS and Linux Operating Systems.</p> +<p>TTool supports the three main modeling profiles: - Diplodocus - Avatar - SysML-Sec</p> +</body> +</html> diff --git a/src/main/resources/help/general.md b/src/main/resources/help/general.md new file mode 100644 index 0000000000000000000000000000000000000000..4fb43b5b297e35fd7d415d701bfa1802332dfef2 --- /dev/null +++ b/src/main/resources/help/general.md @@ -0,0 +1,8 @@ +TTool is a tool for assisting designer to create the architecture and the software of embedded systems. + +TTool can be executed on Microsoft Windows, MacOS and Linux Operating Systems. + +TTool supports the three main modeling profiles: +- Diplodocus +- Avatar +- SysML-Sec \ No newline at end of file diff --git a/src/main/resources/help/helpTable.txt b/src/main/resources/help/helpTable.txt new file mode 100644 index 0000000000000000000000000000000000000000..56af7995899bd12c9c0f64986b8df4d2afb2c132 --- /dev/null +++ b/src/main/resources/help/helpTable.txt @@ -0,0 +1,5 @@ +- general TTool general +- diplodocus.md diplodocus hardware software partitioning dse design space exploration +-- architecture +--- cpu +----clockdivider clock_divider clock divider cpu diff --git a/ttool/build.gradle b/ttool/build.gradle index 502062b93e293401c7c20f6699002e286fd1edae..c23db901286b5a8552515070962a95b573324ea2 100644 --- a/ttool/build.gradle +++ b/ttool/build.gradle @@ -57,5 +57,5 @@ jar { mainClassName = 'Main' test { - testLogging.showStandardStreams = true + testLogging.showStandardStreams = false }