- 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
Preprocessingfolder, based on raw traces and unique signals defined in these traces. - Tool execution: execution of
TD-SB-TemPsytool fromlu.svv.offlinefolder, given the preprocessed/interpolated traces (.csvformat) and temporal properties (.xmiformat).
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
mergeLogsBasedOnSimulationDurationtakes in our raw tracesRawTracesfolder 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.tsvformat). - Function
writeToStatisticsFileis used to compute the merge statistics (w.r.t number of entries and the simulation duration per merged log). The latter callscreateMergeStatisticsFileandaddInformationAfterTracesMergefunctions sdefined underTraceStatisticsclass.
- Merged Traces Preprocessing:
The preprocessing inputs are:
- The merged traces (generated from the previous step), that we store under
Preprocessing/MergedTracesfolder. - The
xmiproperties stored underXmiPropertiesfolder.
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 underMergedTracesfolder. The output traces are stored underPreProcRawDatafolder.getTracesToInterpolate: for eachxmiproperty from the properties folderXmiProperties, we first retrieve all the unique signals from the property definition, then we loop over the preprocessed traces fromPreProcRawDatafolder. 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 underCsvLogsfolder. It results that eachxmiproperty can come with many generatedcsvtraces fromCsvLogsfolder. We then generate a match filematch.txtthat we store under the generated folderMatch. The file contains all theproperties/tracespossible combinations.sort: used to sort the preprocessed traces fromCsvLogsfolder, based on the timestamp column.applyInterpolation: for each of the preprocessed traces underCsvLogsfolder, we apply an interpolation function in order to deal absence of records for missing timestamps. We implemented2different interpolations. The choice of the interpolation depends on the required interpolation from each signal definition, from each.xmiproperty. Our interpolation functions are the following:- A
linearinterpolation. - A
piecewise-constantinterpolation, based on the last-seen signal value.
- A
mergeRecordsByTimestamp: the function is used to merge all rows from each log fromCsvLogsfolder 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.evaluateComplexSignalsandgetFinalTracesWithComplexSignalsare 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
.xmiformat, stored underXmiPropertiesfolder and - preprocessed/interpolated traces written in a
.csvformat, stored underCsvLogsfolder. Two more folders are needed to run our tool: lib: contains thesb-tempsy-report.oclfile that contains the full implementation of the violation causes/ diagnoses semantics definitions.models: contains the4followingecoremodels:sbtempsy.ecore: a model generated from ourDSLTD-SB-TemPsy-DSLsyntax,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-TemPsytool 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.