Nantes Université

Skip to content
Extraits de code Groupes Projets
Valider 7d91c436 rédigé par hiba-coder's avatar hiba-coder
Parcourir les fichiers

readme v2.0

parent 00f3eed3
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
Affichage de
avec 409 ajouts et 3279 suppressions
......@@ -97,6 +97,7 @@ import traceDQL.Variable
import traceDQL.ValueParameter
import traceDQL.ValueObjectParameter
import traceDQL.SimpleTrace
import org.eclipse.xtend.lib.annotations.ToStringProcessor.Util
@Aspect(className=Package)
class PackageAspect extends NamedElementAspect {
......@@ -1277,7 +1278,10 @@ class ResultAspect {
return a.floatValue() / b.floatValue()
} else if(a instanceof Long || b instanceof Long) {
return a.longValue() / b.longValue()
} else {
} else if(a instanceof Integer || b instanceof Integer) {
var num = new Double(a.intValue()) /new Double( b.intValue())
return num === Math.floor(num) ? num.intValue : num
}else {
return a.intValue() / b.intValue()
}
}
......
Aucun aperçu pour ce type de fichier
Package Training{
/** Here we suggest for you to write simple queries that allows you to get to know the TraceDQL syntax and semantics **/
/** Tow sections are defined:
* A Query section, where you may define your TraceDQL queries.
* A Data section, where you may call this queries to execute an register the return value in the corresponding data.
/** Here, we suggest that you train on simple queries that allow you to get to know the syntax and semantics of TraceDQL. **/
/** Two sections are defined:
* A Query section where you can define your TraceDQL queries.
* A Data section where you can call these queries to execute and register the return value in the corresponding data.
*
* The values of data may be found in a generated file under the results folder, named <package_name>_Library.xmi, for example: Training_Library.xmi
* The data values can be found in a generated file in the <results> folder, named <package_name>_Library.xmi, for example: Training_Library.xmi
*/
/****************************************************************************************************************************************************/
......@@ -26,10 +26,10 @@ Package Training{
/************************************************************ Preliminary ************************************************************/
/****************************************************************************************************************************************************/
/** A TraceDQL query is defined in a Block which may contains a set of sub queries **/
/** A Block has name and parameters **/
/** A Query has name **/
/** A Query selects elements from the output of another query **/
/** A TraceDQL query is defined in a Block, which may contain a number of sub-queries. **/
/** A Block has a name and parameters. **/
/** A Query has a name. **/
/** A Query selects elements from the output of another query. **/
/****************************************************************************************************************************************************/
/************************************************************ ************************************************************/
......@@ -37,6 +37,10 @@ Package Training{
/************************************************************ ************************************************************/
/****************************************************************************************************************************************************/
/**
* Here you have a set of blocks. You can execute them by uncommenting their corresponding data in the Data section.
*/
/** Q1: Extract Products **/
Block products_Q1(){
......@@ -91,10 +95,11 @@ Package Training{
}
}
/** Q5: Count the size of products without considering duplicates */
/** Q5: Count the size of Products without considering duplicates */
Block products_Q5(){
query query_products{
SELECT SIZE ON Product,
SELECT ON Product, //SIZE
REMOVE REDUNDANCY BY id IN Product
}
}
......@@ -112,7 +117,8 @@ Package Training{
Block products_Q6_2(type){
query query_products{
SELECT ON Product,
WHERE (elementtype.name) EQUAL (value type)
WHERE (elementtype.name) EQUAL (value type),
REMOVE REDUNDANCY BY id IN Product
}
}
......@@ -142,7 +148,7 @@ Package Training{
}
}
/** The type of the product will be set at the corresponding data */
/** The type of product is set on the corresponding data */
/****************************************************************************************************************************************************/
/************************************************************ ************************************************************/
......@@ -159,12 +165,12 @@ Package Training{
Data products_Q2_2() = products_Q2_2;
/** **/
/** Data Q3 **/
/** Data Q3 **
Data products_Q3_1() = products_Q3_1;
Data products_Q3_2() = products_Q3_2;
/** **/
/** Data Q4 **/
/** Data Q4 **
Data products_Q4() = products_Q4;
/** **/
......@@ -173,20 +179,21 @@ Package Training{
/** **/
/** Data Q6 **/
Data products_Q6_1(type::Lampe) = products_Q6_1;
Data products_Q6_2(type::Lampe) = products_Q6_2;
/** Alternatives **/
//Data products_Q6_1(type::Lampe) = products_Q6_1;
//Data products_Q6_2(type::Lampe) = products_Q6_2;
Data products_Q6_2_rotor(type::Rotor) = products_Q6_2;
/** Alternatives **
Data products_Q6_2(type:Lampe) = products_Q6_2;
Data products_Q6_2(type:'Lampe') = products_Q6_2;
Data products_Q6_2() = products_Q6_2[type::Lampe];
Data products_Q6_2(type::Lampe) = products_Q6_2[type::Lampe];
/** **/
/** Data Q7 **/
/** Data Q7 **
Data products_Q7() = products_Q7;
/** **/
/** Data Q8 **/
/** Data Q8 **
Data modules_names_Q8()=modules_names_Q8;
/** **/
......
Package Produced_Product{
/******* Here we extract the produced product/container of each type *******/
/******* Here, we extract the produced product/container of each type *******/
import smallcasestudy.runtimestate.*
executionTrace "/models/gemoc-gen/execution/execution-20250417_172753/execution.simpletrace"
......@@ -13,7 +13,7 @@ Package Produced_Product{
/**
* To count the produced product of the specific type, we technically need to:
* In order to be able to count the produced product of the specific type, we technically need to:
*
* select the size of the product with the specific type without considering duplicates.
*
......@@ -40,8 +40,8 @@ Package Produced_Product{
}
/* Note that:
* In case you wants the list of the product/containers themselves -> remove the option SIZE from SELECT.
* In case you wants to see the specific product during all its states -> remove the "," and the last instruction (i.e., REMOVE)
* If you want the list of products/containers themselves -> remove the SIZE option from SELECT.
* If you want to see the specific product in all its states -> remove the "," and the last instruction (i.e. REMOVE).
*/
/****************************************************************************************************************************************************/
......
......@@ -4,6 +4,7 @@ Package Operating_Time{
import smallcasestudy.runtimestate.*
import smallcasestudy.*
import Produced_Product.*
executionTrace "/models/gemoc-gen/execution/execution-20250417_172753/execution.simpletrace"
/****************************************************************************************************************************************************/
......@@ -44,7 +45,7 @@ Package Operating_Time{
*
* simulation_duration = last_timestamp - first_timestamp
*
* Since the first timestamp equal 0 :
* Since the first timestamp equal 0 then:
*
* simulation_duration = last_timestamp
*
......@@ -56,15 +57,19 @@ Package Operating_Time{
}
}
/**
* Notice that now, after calculating the product produced and the simulation time, we can calculate
* the throughput KPI and the takt time KPI.
* These two KPIs are defined in the Data section.
*/
/**
* Each module has a set of Tasks, created during the simulation.
* A Task had a startTime, an endTime and a state
* For a given module, to compute its operating time, we need to compute the sum of time duration each of its task.
* A Task has a startTime, an endTime and a state
* For a given module, to calculate its operating time, we need to calculate the sum of the duration of each of its tasks.
* The time duration of a task is: endTime-startTime.
* A task may have its endTime greater than the simulation duration in case it has not be finished.
* A task may have an endTime greater than the simulation duration if it has not been completed.
* In this case, the time duration of the task is: simulation_duration - startTime.
*
* Therefore a operation time of a module, is the sum of endTime-startTime if endTime less equal to simulation_duration, else is the simulation_duration - startTime.
*
* The following query allows computing the operation time of a specific module.
......@@ -95,7 +100,7 @@ Package Operating_Time{
/**
* Visualize the different names of the modules
*/
TransitData modules_names()=modules_names;
Data modules_names()=modules_names;
/** **/
/**
......@@ -104,6 +109,18 @@ Package Operating_Time{
Data SD()= simulation_Duration;
/** **/
/**
* Compute the throughput
*/
Data throughput()= produced_products[type::Lampe]/simulation_Duration;
/** **/
/**
* Compute the takt time
*/
Data takt_time()= simulation_Duration/produced_products[type::Lampe];
/** **/
/**
* Compute the module utilization time
*
......
Package Lead_Time{
/******* Here we study the life cycle of a specific product: the Lampe *******/
/***** Note that this can bee applied on other products *****/
/******* Here, we look at the life cycle of a specific product: the Lampe *******/
/***** Note that this may also apply to other products. *****/
import smallcasestudy.runtimestate.*
executionTrace "/models/gemoc-gen/execution/execution-20250417_172753/execution.simpletrace"
......@@ -41,8 +41,8 @@ Package Lead_Time{
}
/**
* A query to visualize the different component of a specific product in a specific state.
* To compute this query on the Lampe product with each of its states, we define its corresponding data at the Data Section.
* A query to visualize the different components of a given product in a given state.
* To compute this query on the lamp product with each of its states, we define its corresponding data in the Data section.
*/
Block product_par_state(type, state){
query pps_0{
......@@ -73,8 +73,8 @@ Package Lead_Time{
* (2) a task (i.e., Task).
*/
/** Therefore, to compute the time during which a product type remained in the system (lead_time)
* We must know the first timesatmp the product type appears on the system (instantiation_time), and
/** Therefore, to calculate the time a product type has been in the system (lead_time)
* We need to know the first timesatmp the product type appears in the system (instantiation_time), and
* the first timestamp when it reaches its final state (deliver_time).
*
*
......@@ -116,7 +116,7 @@ Package Lead_Time{
/***** Deliver time per type *****
*
* To extract from the trace the first timestamp when the Lampe product reaches its final state, technically we need to:
* To extract the first timestamp, from the trace, when the Lampe product reaches its final state, technically we need to:
*
* *** <From> the <FIRST> <ProductionSystemSimulation>, which contains a <ZoneState>, which in turns contains <Container> that contains the <LAST> <Lampe> product in its <final> <state>, <select> the <timeSystem> ***
*
......@@ -137,7 +137,7 @@ Package Lead_Time{
}
/**
* This last_ID query is used in the final TraceDQL query of Lampe product deliver time, by defining it as TransitData in Data section.
* This last_ID query is used in the TraceDQL query of the deliver time of the final Lampe product, by defining it as TransitData in Data section.
*
* The deliver time per type TraceDQL query is then given by the following block:
*/
......
<?xml version="1.0" encoding="ASCII"?>
<traceDQL:Package xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:smallcasestudy="http://www.example.org/smallcasestudy" xmlns:traceDQL="http://www.example.org/traceDQL" name="DataLibrary">
<data name="modules_names">
<value xsi:type="traceDQL:ValueObject">
<value xsi:type="smallcasestudy:Module" name="Supermarche bord de ligne 1">
<type href="../../models/myrmsModels/Lampex_v0.myrms#//@moduletypes.1"/>
<provides name="Stock (tous les elements)">
<providetype href="../../models/myrmsModels/Lampex_v0.myrms#//@moduletypes.1/@provides.0"/>
</provides>
</value>
<value xsi:type="smallcasestudy:Module" name="Poste de travail 3 1">
<type href="../../models/myrmsModels/Lampex_v0.myrms#//@moduletypes.4"/>
<provides name="Lampe (etat_4)">
<providetype href="../../models/myrmsModels/Lampex_v0.myrms#//@moduletypes.4/@provides.0"/>
</provides>
<requires name="Lampe (etat_3)">
<requiretype href="../../models/myrmsModels/Lampex_v0.myrms#//@moduletypes.4/@requires.0"/>
</requires>
<requires name="Capots">
<requiretype href="../../models/myrmsModels/Lampex_v0.myrms#//@moduletypes.4/@requires.1"/>
</requires>
</value>
<value xsi:type="smallcasestudy:Module" name="Poste de travail 4 1">
<type href="../../models/myrmsModels/Lampex_v0.myrms#//@moduletypes.5"/>
<provides name="Lampe (etat_fini)">
<providetype href="../../models/myrmsModels/Lampex_v0.myrms#//@moduletypes.5/@provides.0"/>
</provides>
<requires name="Lampe (etat_4)">
<requiretype href="../../models/myrmsModels/Lampex_v0.myrms#//@moduletypes.5/@requires.0"/>
</requires>
<requires name="CacheLumieres">
<requiretype href="../../models/myrmsModels/Lampex_v0.myrms#//@moduletypes.5/@requires.1"/>
</requires>
</value>
<value xsi:type="smallcasestudy:Module" name="Poste de travail 1 1">
<type href="../../models/myrmsModels/Lampex_v0.myrms#//@moduletypes.2"/>
<provides name="Lampe (etat_2)">
<providetype href="../../models/myrmsModels/Lampex_v0.myrms#//@moduletypes.2/@provides.0"/>
</provides>
<requires name="Lampes (etat_initial)/Interrupteurs">
<requiretype href="../../models/myrmsModels/Lampex_v0.myrms#//@moduletypes.2/@requires.0"/>
</requires>
<attributes value="2">
<attributetype href="../../models/myrmsModels/Lampex_v0.myrms#//@moduletypes.2/@attributetypes.0"/>
</attributes>
<attributes value="20">
<attributetype href="../../models/myrmsModels/Lampex_v0.myrms#//@moduletypes.2/@attributetypes.1"/>
</attributes>
</value>
<value xsi:type="smallcasestudy:Module" name="Poste de travail 2 1">
<type href="../../models/myrmsModels/Lampex_v0.myrms#//@moduletypes.3"/>
<provides name="Lampe (etat_3)">
<providetype href="../../models/myrmsModels/Lampex_v0.myrms#//@moduletypes.3/@provides.0"/>
</provides>
<requires name="Lampe (etat_2)">
<requiretype href="../../models/myrmsModels/Lampex_v0.myrms#//@moduletypes.3/@requires.0"/>
</requires>
<requires name="Rotors">
<requiretype href="../../models/myrmsModels/Lampex_v0.myrms#//@moduletypes.3/@requires.1"/>
</requires>
</value>
<value xsi:type="smallcasestudy:Module" name="Poste de travail 5 1">
<type href="../../models/myrmsModels/Lampex_v0.myrms#//@moduletypes.6"/>
<requires name="Lampe (etat_fini)">
<requiretype href="../../models/myrmsModels/Lampex_v0.myrms#//@moduletypes.6/@requires.0"/>
</requires>
<requires name="Emballages">
<requiretype href="../../models/myrmsModels/Lampex_v0.myrms#//@moduletypes.6/@requires.1"/>
</requires>
</value>
</value>
</data>
<data name="SD">
<value xsi:type="traceDQL:ValueNumber" valueInt="330"/>
</data>
<data name="throughput">
<value xsi:type="traceDQL:ValueNumber" valueDouble="0.030303030303030304"/>
</data>
<data name="takt_time">
<value xsi:type="traceDQL:ValueNumber" valueDouble="33.0"/>
</data>
<data name="module_Utilization">
<parameter name="name">
<value xsi:type="traceDQL:ValueObjectParameter">
<value href="../models/Step_2_Operating_Time.traceDQL#//@data.0"/>
</value>
</parameter>
</data>
<data name="module_Utilization">
<parameter name="name">
<value xsi:type="traceDQL:ValueObjectParameter">
<value href="../models/Step_2_Operating_Time.traceDQL#//@data.0/@value/@value.0"/>
</value>
</parameter>
<value xsi:type="traceDQL:ValueNumber"/>
</data>
<data name="module_Utilization">
<parameter name="name">
<value xsi:type="traceDQL:ValueObjectParameter">
<value href="../models/Step_2_Operating_Time.traceDQL#//@data.0/@value/@value.1"/>
</value>
</parameter>
<value xsi:type="traceDQL:ValueNumber" valueInt="220"/>
</data>
<data name="module_Utilization">
<parameter name="name">
<value xsi:type="traceDQL:ValueObjectParameter">
<value href="../models/Step_2_Operating_Time.traceDQL#//@data.0/@value/@value.2"/>
</value>
</parameter>
<value xsi:type="traceDQL:ValueNumber" valueInt="220"/>
</data>
<data name="module_Utilization">
<parameter name="name">
<value xsi:type="traceDQL:ValueObjectParameter">
<value href="../models/Step_2_Operating_Time.traceDQL#//@data.0/@value/@value.3"/>
</value>
</parameter>
<value xsi:type="traceDQL:ValueNumber" valueInt="120"/>
</data>
<data name="module_Utilization">
<parameter name="name">
<value xsi:type="traceDQL:ValueObjectParameter">
<value href="../models/Step_2_Operating_Time.traceDQL#//@data.0/@value/@value.4"/>
</value>
</parameter>
<value xsi:type="traceDQL:ValueNumber" valueInt="220"/>
</data>
<data name="module_Utilization">
<parameter name="name">
<value xsi:type="traceDQL:ValueObjectParameter">
<value href="../models/Step_2_Operating_Time.traceDQL#//@data.0/@value/@value.5"/>
</value>
</parameter>
<value xsi:type="traceDQL:ValueNumber" valueInt="220"/>
</data>
</traceDQL:Package>
<?xml version="1.0" encoding="ASCII"?>
<traceDQL:Package xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:traceDQL="http://www.example.org/traceDQL" name="DataLibrary">
<data name="produced_products">
<parameter name="type">
<value xsi:type="traceDQL:ValueObjectParameter">
<value href="../template/models/Lampex_v0.myrms#//@elementtype.0"/>
</value>
</parameter>
<value xsi:type="traceDQL:ValueNumber" valueInt="10"/>
</data>
<data name="produced_products">
<parameter name="type">
<value xsi:type="traceDQL:ValueObjectParameter">
<value href="../template/models/Lampex_v0.myrms#//@elementtype.1"/>
</value>
</parameter>
<value xsi:type="traceDQL:ValueNumber" valueInt="10"/>
</data>
<data name="produced_products">
<parameter name="type">
<value xsi:type="traceDQL:ValueObjectParameter">
<value href="../template/models/Lampex_v0.myrms#//@elementtype.2"/>
</value>
</parameter>
<value xsi:type="traceDQL:ValueNumber" valueInt="10"/>
</data>
<data name="produced_products">
<parameter name="type">
<value xsi:type="traceDQL:ValueObjectParameter">
<value href="../template/models/Lampex_v0.myrms#//@elementtype.3"/>
</value>
</parameter>
<value xsi:type="traceDQL:ValueNumber" valueInt="10"/>
</data>
<data name="produced_products">
<parameter name="type">
<value xsi:type="traceDQL:ValueObjectParameter">
<value href="../template/models/Lampex_v0.myrms#//@elementtype.4"/>
</value>
</parameter>
<value xsi:type="traceDQL:ValueNumber" valueInt="10"/>
</data>
<data name="produced_containers">
<parameter name="type">
<value xsi:type="traceDQL:ValueObjectParameter">
<value href="../template/models/Lampex_v0.myrms#//@elementtype.6"/>
</value>
</parameter>
<value xsi:type="traceDQL:ValueNumber" valueInt="10"/>
</data>
<data name="produced_containers">
<parameter name="type">
<value xsi:type="traceDQL:ValueObjectParameter">
<value href="../template/models/Lampex_v0.myrms#//@elementtype.5"/>
</value>
</parameter>
<value xsi:type="traceDQL:ValueNumber" valueInt="10"/>
</data>
</traceDQL:Package>
Impossible d'afficher diff de source : il est trop volumineux. Options pour résoudre ce problème : voir le blob.
<?xml version="1.0" encoding="UTF-8"?>
<sms:ProductionLine xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:sms="http://www.example.org/sms">
<sms:ProductionLine xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:sms="http://www.example.org/sms" simulationDuration="50">
<types name="Head"/>
<types name="Handle"/>
<types name="Hammer" isFinal="true"/>
......
<?xml version="1.0" encoding="UTF-8"?>
<sms:ProductionLine xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:sms="http://www.example.org/sms">
<sms:ProductionLine xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:sms="http://www.example.org/sms" simulationDuration="50">
<types name="Pallete"/>
<types name="Product"/>
<types name="RedProduct"/>
......
<?xml version="1.0" encoding="UTF-8"?>
<sms:ProductionLine xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:sms="http://www.example.org/sms">
<sms:ProductionLine xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:sms="http://www.example.org/sms" simulationDuration="50">
<types name="Pallete"/>
<types name="Product"/>
<types name="RedProduct"/>
......
......@@ -28,34 +28,46 @@ Project is created in Gemoc Studio environment (Version: 3.6.0-SNAPSHOT) using :
To run this project:
1. Install [Gemoc Studio](https://gemoc.org/download.html).
1. In the language environment
- Import the [Simple Trace project](https://github.com/gemoc/simpler-traces)
- Import the ***xTraceDQL_Import***
- Import the language for which a model will be executed and the trace will be generated to be analyzed by the TraceDQL queries. You may use the provided languages, i.e., ***xSMS*** or ***xArduino***
- Clone and import the [Simple Trace project](https://github.com/gemoc/simpler-traces)
- Import the ***Language_Workbench/xTraceDQL_Import***
- Note that an error may occur in the Xtext project regarding the Xtext version.
To fix this error, click on _GEMOC Studio_ > _About GEMOC Studio_ > _Installation Details_, search for Xtext, and check the version installed in your GEMOC Studio (e.g., 2.35.0). This version must match the one specified in the **MANIFEST.MF** file of the Xtext projects.
- Import the language for which a model will be executed and the trace will be generated to be analyzed by the ***TraceDQL*** queries. You may use the provided languages, i.e., ***xSMS*** or ***xArduino***
1. Run the project as Eclipse Application.
- Click on ***Run*** in the top menu.
- Select ***Run Confguration***.
- In the left panel, double-click on ***Eclipse Application***, then choose a name (e.g., runtime) and set a location if needed.
- In the **Arguments** tab, under the **VM argumnts** section,you may add the following argument to improve launch performance:
- -Dequinox.resolver.revision.batch.size=10
- Finally, click on ***Run***.
Note that two windows may pop up when you start the run, you can click on ***Continue***/***OK***.
1. In the Modeling workbench, you may:
- Create a project and define models for your chosen language, or
- Import the modeling project, for which you had import its language, form the \Modeling_Workbench : ***sms_Models*** for ***xSMS*** and ***arduino_Models*** for ***xArduino***.
- Import the modeling project, for which you had import its language, from the \Modeling_Workbench : ***sms_Models*** for ***xSMS*** and ***arduino_Models*** for ***xArduino***.
Each modeling project contains a model ready to run.
You may then run the model as follows:
- Click on ***Run*** in the top menu > then select ***Run Configurations***.
- In the left panel, double-click on ***Executable model with Gemoc java engine***.
- Under the ***Main*** tab, use _Browse_ to select the ***Model to execute***.
- Choose the ***Language*** of the model.
- Under the ***Main*** tab, use _Browse_ to select the ***Model to execute*** (e.g., _SimpleCaseSystem.sms_, in case you choose the ***xSMS*** language).
- Choose the ***Language*** of the model (e.g., the xSMS language).
- Select the ***Main Method*** using _Browse_.
- Specify the ***Main model element path*** using _Browse_.
- In the ***Engine Addons*** tab, check the ***SimpleTraceAddon*** and ***saveTraceOnEngineStop*** option.
- Finally, you may click on ***Run***.
1. After executing the model, an execution folder will be added to the executions, which contains the model being executed and the execution trace.
The execution trace path can be found by : right-click on the file > _Properties_ > _Path_.
1. You may now use the TraceDQL to extract the data you need from the trace.
- Create new project (_New_ > _Project_ > _General_ > _Project_).
- Convert it to _xtext_ project (right-click > _Configure_ > _convert to xtext project_).
- Right-click on the generated execution trace, and select ***initTraceDQL***.
- Choose the project you just created.
1. You may now use the ***TraceDQL*** to extract the data you need from the trace.
- You may use a predefined ***TraceDQL*** model queries that you may found in the \Modeling_Workbench\TraceDQL_Models_Import ; The ***TraceDQL_SMS*** project for queries executed on an execution trace of ***xSMS*** models or ***TraceDQL_Arduino*** for models of ***xArduino***.
Note that you must change the path of the execution trace in the imported ***TraceDQL*** models; The execution trace path can be found by : right-click on the trace file > _Properties_ > _Path_.
- Or you may define a ***TraceDQL*** project from scratch:
- Create new project (e.g., ***TraceDQL_Models*** ) (_New_ > _Project_ > _General_ > _Project_).
- Convert it to _xtext_ project (right-click > _Configure_ > _convert to xtext project_).
- Right-click on the generated execution trace, and select ***initTraceDQL***.
- In the pop up windows, select the ***TraceDQL_Models*** project you just created.
This will generate a ***template*** folder under the selected project, which includes:(1) A ***metamodels*** folder containing both the trace metamodel and the metamodel of the executed model, and (2) A ***models*** folder containing the executed model .
***Note***: This step can also be performed manually, if preferred.
1. Now you may create TraceDQL models (_New_ > _File_, do not forget to specify the ***traceDQL*** extension), and strat writing your queries.
2. You may use a predefined TraceDQL model queries that you may found in the \Modeling_Workbench\TraceDQL_Models_Import ; The project ***TraceDQL_SMS*** for models of ***xSMS*** or ***TraceDQL_Arduino*** for models in ***xArduino***.
- Now you may create ***TraceDQL*** models; Create a folder named ***models***, under this folder you may create a ***TraceDQL*** models (_New_ > _File_, do not forget to specify the extension i.e., ***traceDQL***), and start writing your queries.
2. After defining or importing the ***TraceDQL*** models, the final step is to execute them. To do so, repeat the same instructions from Step 4, but this time select the ***TraceDQL*** model in the ***Model to Execute*** section and choose the ***TraceDQL*** language. There is no need to configure the ***Engine Addons*** tab.
2. Executing ***TraceDQL*** models will generate a ***results*** folder, when you may find the results of your queries.
## Tutorial: How to Use TraceDQL on an Execution Trace
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter