Commit 2d9703ef authored by Ludovic Apvrille's avatar Ludovic Apvrille

Adding sketch for TTool CLI work

parent 4d578e2d
......@@ -92,6 +92,9 @@ export TTOOL_BINARY = $(TTOOL_BUILD)/ttool.jar
export LAUNCHER_DIR = $(TTOOL_PATH)/launcher
export LAUNCHER_BINARY = $(TTOOL_BUILD)/launcher.jar
export TTOOLCLI_DIR = $(TTOOL_PATH)/ttool-cli
export TTOOLCLI_BINARY = $(TTOOL_BUILD)/ttool-cli.jar
export GRAPHMINIMIZE_DIR = $(TTOOL_PATH)/graphminimize
export GRAPHMINIMIZE_BINARY = $(TTOOL_BUILD)/graphminimize.jar
......@@ -119,7 +122,7 @@ export WEBCRAWLER_SERVER_BINARY = $(TTOOL_BUILD)/webcrawler-server.jar
export JTTOOL_DIR = $(TTOOL_PATH)/jttool
export JTTOOL_BINARY = $(TTOOL_BUILD)/jttool.jar
all: ttool launcher graphminimize graphshow tiftranslator tmltranslator rundse remotesimulator webcrawler
all: ttool launcher ttool-cli graphminimize graphshow tiftranslator tmltranslator rundse remotesimulator webcrawler
ttool: $(TTOOL_BINARY)
......@@ -134,6 +137,11 @@ launcher: $(LAUNCHER_BINARY)
@($(GRADLE) :launcher:build) || ($(ERROR_MSG) && $(MAKE) -C $(LAUNCHER_DIR) -e $@)
ttool-cli: $(TTOOLCLI_BINARY)
@($(GRADLE) :ttool-cli:build) || ($(ERROR_MSG) && $(MAKE) -C $(TTOOLCLI_DIR) -e $@)
graphminimize: $(GRAPHMINIMIZE_BINARY)
......@@ -308,6 +316,7 @@ $(ADVANCED_RELEASE:.tgz=.tar): $(STDRELEASE:.tgz=.tar) documentation
@cp -R $(TTOOL_SRC)/* $(TTOOL_TARGET)/src
@cp -r $(TTOOL_DIR)/src/main/java/* $(TTOOL_TARGET)/src
@cp -r $(LAUNCHER_DIR)/src/main/java/* $(TTOOL_TARGET)/src
@cp -r $(TTOOLCLI_DIR)/src/main/java/* $(TTOOL_TARGET)/src
@cp -r $(GRAPHMINIMIZE_DIR)/src/main/java/* $(TTOOL_TARGET)/src
@cp -r $(GRAPHSHOW_DIR)/src/main/java/* $(TTOOL_TARGET)/src
@cp -r $(TIFTRANSLATOR_DIR)/src/main/java/* $(TTOOL_TARGET)/src
......@@ -503,6 +512,7 @@ test:
@$(MAKE) -C $(TTOOL_DIR) -e clean
@$(MAKE) -C $(LAUNCHER_DIR) -e clean
@$(MAKE) -C $(TTOOLCLI_DIR) -e clean
@$(MAKE) -C $(GRAPHSHOW_DIR) -e clean
......@@ -17,6 +17,7 @@ include 'services:webservice'
include 'ttool'
include 'launcher'
include 'ttool-cli'
include 'graphminimize'
include 'graphshow'
include 'tiftranslator'
DEPEND = $(patsubst %,$(TTOOL_BUILD)/%,$(shell cat $(MANIFEST) | grep Class-Path | cut -d: -f2))
LOCAL_JAVA = $(shell cd $(LOCAL_SRC_DIR); find . -name "*.java")
LOCAL_CLASS = $(patsubst,%.class,$(LOCAL_JAVA))
.PHONY: compile clean
@echo "$(PREFIX) Archiving"
@mkdir -p $(TTOOL_BUILD)
ifneq ($(strip $(LOCAL_RESOURCES_DIR)),)
$(TTOOL_BUILD)/%.jar: $(TTOOL_LIBS)/%.jar
@mkdir -p $(TTOOL_BUILD)
@cp $< $@
compile: $(patsubst %,$(LOCAL_SRC_DIR)/%,$(LOCAL_JAVA)) $(patsubst %,$(TTOOL_SRC)/%,$(GLOBAL_JAVA))
@echo "$(PREFIX) Compiling"
@mkdir -p $(LOCAL_BUILD_DIR)
@$(JAVAC) $(CFLAGS) $(patsubst %,$(LOCAL_SRC_DIR)/%,$(LOCAL_JAVA))
@rm -rf $(LOCAL_BUILD_DIR)
apply plugin: 'application'
// This defines the source sets for this subproject
sourceSets {
main {
java {
srcDir "${rootProject.absPath}/src/main/java"
resources {
srcDir "${rootProject.absPath}/src/main/resources"
test {
java {
dependencies {
compile name: 'opencloud'
compile name: 'JavaPlot'
compile name: 'derbynet'
compile name: 'commons-codec-1.10'
compile name: 'commons-math3-3.6.1'
compile name: 'commons-io-2.5'
compile name: 'jsoup-1.8.1'
compile name: 'gs-core-1.3'
compile name: 'batik-xml'
compile name: 'batik-util'
compile name: 'batik-svggen'
compile name: 'batik-dom'
compile name: 'batik-awt-util'
compile name: 'jautomata-core'
// Use JUnit test framework
testCompile 'junit:junit:4.12'
testCompile group: 'org.hamcrest', name: 'hamcrest-core', version: '1.3'
testCompile files('src/test/libs/fr.tpt.mem4csd.utils.compare_1.0.0.jar')
jar {
manifest {
'Class-Path': configurations.compile.collect { it.getName() }.join(' '),
'Main-Class': 'TToolCLI'
mainClassName = 'TToolCLI'
Main-Class: TToolCLI
/* Copyright or (C) or Copr. GET / ENST, Telecom-Paris, Ludovic Apvrille, Andrea Enrici
* ludovic.apvrille AT
* andrea.enrici AT
* 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
* "".
* 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.
import myutil.*;
import ui.*;
* Class TToolCLI
* Command line application for minimizing graphs
* Apps of the package show, minimize and convert
* Creation: 11/01/2017
* @author Ludovic APVRILLE
* @version 1.10 05/10/2018
public class TToolCLI {
public static void printCopyright() {
System.out.println("TToolCLI: (C) Telecom ParisTech, Ludovic APVRILLE ludovic.apvrille,");
System.out.println("GraphMinimize is released under a CECILL License. See");
System.out.println("For more information on TTool related technologies, please consult");
public static void printUsage() {
System.out.println("TToolCLI: usage");
public static boolean checkArgs(String[] args) {
return !(args.length < 1);
public static boolean hasDebug(String[] args) {
for (String s : args) {
if (s.equals("-debug")) {
return true;
return false;
public static String getInputFile(String[] args) {
return args[args.length - 1];
public static void main(String[] args) {
String[] tmp;
if (!checkArgs(args)) {
int nbOfOptions = 0;
if (hasDebug(args)) {
TraceManager.devPolicy = TraceManager.TO_CONSOLE;
} else {
TraceManager.devPolicy = TraceManager.TO_DEVNULL;
} // Class GraphShow
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager">
<output url="file://$MODULE_DIR$/../../build/classes/main" />
<output-test url="file://$MODULE_DIR$/../../build/classes/test" />
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/java" isTestSource="false" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="module" module-name="shared" />
\ No newline at end of file
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