- Java 1.7+
- Eclipse OCL 6.0.1+
This repository contains all the necessary scripts and inputs we used to evaluate TD-SB-temPsy
tool.
The repository contains 2
major steps:
- Data Preprocessing: traces generation and interpolation from
Preprocessing
folder, based on raw traces and unique signals defined in these traces. - Tool execution: execution of
TD-SB-TemPsy
tool fromlu.svv.offline
folder, given the preprocessed/interpolated traces (.csv
format) and temporal properties (.xmi
format).
Our data preprocessing is implemented in class TracesPreprocessorAndInterpolator.java
located under Preprocessing
folder.
The preprocessing is essentially based on two steps:
- Traces Merge:
The merge code is written in class TracesMerger.java
.
- Function
mergeLogsBasedOnSimulationDuration
takes in our raw tracesRawTraces
folder and returns merged traces stored under a generated folder calledMergedTraces
. The merge consists of merging all the logs from the input raw traces (represented in a.tsv
format). - Function
writeToStatisticsFile
is used to compute the merge statistics (w.r.t number of entries and the simulation duration per merged log). The latter callscreateMergeStatisticsFile
andaddInformationAfterTracesMerge
functions sdefined underTraceStatistics
class.
- Merged Traces Preprocessing:
The preprocessing inputs are:
- The merged traces (generated from the previous step), that we store under
Preprocessing/MergedTraces
folder. - The
xmi
properties stored underXmiProperties
folder.
Our preprocessing is implemented in TracesPreprocessorAndInterpolator
class.
Similarly to the traces merger, we first preprocess the traces then we compute the preprocessing statistics.
- Preprocessing:
It is based on 5 functions as follows:
removeUselessAttributesAndConvertTimestamps
: removes the useless columns and converts the date format to microseconds from the raw traces generated underMergedTraces
folder. The output traces are stored underPreProcRawData
folder.getTracesToInterpolate
: for eachxmi
property from the properties folderXmiProperties
, we first retrieve all the unique signals from the property definition, then we loop over the preprocessed traces fromPreProcRawData
folder. For each of these traces, we store all the records from that trace that concern the unique property signals only to a new trace that we store underCsvLogs
folder. It results that eachxmi
property can come with many generatedcsv
traces fromCsvLogs
folder. We then generate a match filematch.txt
that we store under the generated folderMatch
. The file contains all theproperties/traces
possible combinations.sort
: used to sort the preprocessed traces fromCsvLogs
folder, based on the timestamp column.applyInterpolation
: for each of the preprocessed traces underCsvLogs
folder, we apply an interpolation function in order to deal absence of records for missing timestamps. We implemented2
different interpolations. The choice of the interpolation depends on the required interpolation from each signal definition, from each.xmi
property. Our interpolation functions are the following:- A
linear
interpolation. - A
piecewise-constant
interpolation, based on the last-seen signal value.
- A
mergeRecordsByTimestamp
: the function is used to merge all rows from each log fromCsvLogs
folder based on similar timestamps.getFinalLogs
: used to keep the required columns only in each preprocessed trace. It produces the final traces that we need for our trace diagnostics approach later.evaluateComplexSignals
andgetFinalTracesWithComplexSignals
are functions used evaluate complex signals, represented as a mathematical expression.
To run TD-SB-TemPsy
, one needs 2
types of inputs:
- properties written in an
.xmi
format, stored underXmiProperties
folder and - preprocessed/interpolated traces written in a
.csv
format, stored underCsvLogs
folder. Two more folders are needed to run our tool: lib
: contains thesb-tempsy-report.ocl
file that contains the full implementation of the violation causes/ diagnoses semantics definitions.models
: contains the4
followingecore
models:sbtempsy.ecore
: a model generated from ourDSL
TD-SB-TemPsy-DSL
syntax,trace.ecore
: a model that defines the data structure of our traces anddiagnostics.ecore
: a model that contains the full definition of all the violation types supported byTD-SB-TemPsy
tool andcheck.ecore
: a model that is used to generate artefacts based on the three models aforementioned. Finally, the main class for running our tool is the following:
SingleDiagnosticsMain.java
: the main class required to report diagnosis for a single violated property over a single trace.
TD-SB-TemPsy
tool can be ran using 2
different methods:
- from the IDE
(e.g., Eclipse
environement), the arguments in lines 10
and 11
shall be replaced by the absolute paths of
the property and the trace, respectively.
- Example:
String propertyFile = "./XmiProperties/PropertyExample.xmi";
String traceFile = "./RawTraces/traceExample1.csv";
- as a standalone, using a jar
file, where the absolute paths of the property and the trace shall be
written in the commandline.
Copyright by University of Luxembourg 2020-2021.
Developed by Chaima Boufaied, chaima.boufaied@uni.lu University of Luxembourg.
Developed by Claudio Menghi, claudio.menghi@uni.lu University of Luxembourg.
Developed by Domenico Bianculli, domenico.bianculli@uni.lu University of Luxembourg.
Developed by Lionel Briand, lionel.briand@uni.lu University of Luxembourg.