Artifact evaluation for ICSE 2022 SEIP submission "When Cyber-Physical Systems Meet AI: A Benchmark, an Evaluation, and a Way Forward" by Jiayang Song, Deyun Lyu, Zhenya Zhang, Zhijie Wang, Tianyi Zhang and Lei Ma.
- Operating system: Linux / MacOS / Windows;
- Matlab (Simulink/Stateflow) version: >= 2020a; (Matlab license needed)
- MATLAB toolboxes dependency
-
The directory
AI-CPS-Benchmark/
contains abenchmarks/
sub-directory and atools/
. The former stores the 9 CPS models introduced in Benchmarks, and the latter involves two falsification tools, namely Breach and S-TaLiRo, used for RQ2: Falsification. -
The directory
benchmarks/
has 9 sub-directories, each storing one CPS model introduced in Benchmarks. Each model directory has a similar structure, and we take the directoryACC/
as an example of illustration. -
ACC/
involves the following sub-directories: -
traditional/
stores the original ACC Simulink model with a traditional controller. -
DRL/
has three sub-directories:train/
,model/
,agent/
. The foldertrain/
stores the scripts for training DRL controllers,model/
stores the Simulink models with trained DRL controllers, andagent/
stores the trained agents (DRL controllers) based on different DRL algorithms. -
RQ1/
stores the scripts for replicating the results of RQ1, where we compare the performances between AI-enabled CPS and traditional CPS; -
RQ2/
stores the scripts for replicating the results of RQ2, where we evaluate the effectiveness of different falsification approaches on AI-enabled CPS; -
RQ3/
stores the scripts for replicating the results of RQ3, where we construct CPS with hybrid controllers and evaluate their performances using the methods in RQ1 and RQ2. -
The folder
tools/
includes two widely-used falsification tools, namely, Breach and S-TaLiRo. Specifically, we select Global Nelder-Mead (GNM) and CMAES for Breach, and Simulated Annealing (SA) and stochastic optimization with adaptive restart (SOAR) for S-TaLiRo. Details can be found here.
- Clone the repository
git clone https://github.com/lyudeyun/AI-CPS-Benchmarks.git
- It is recommended to install the latest version of breach to handle the simulink models with reinforcement learning controller.
- Install Breach
- start matlab, set up a C/C++ compiler using the command
mex -setup
. (Refer to here for more details.) - navigate to
breach/
in Matlab commandline, and runInstallBreach
- Modify the configuration parameters of GNM algorithm
vi breach/Core/Algos/@BreachProblem/setup_global_nelder_mead.m
, then replace the line'num_corners', min(2^dim_pb, 10*dim_pb)
with'num_corners', 0
vi breach/Params/HaltonRefine.m
, then replace the lineseed = ones(dim_num,1)
withseed = round(rem(now, 1)*1000000) * ones(dim_num,1)
- Modify the seed of CMA-ES algorithm
vi /breach/Core/Algos/@BreachProblems/BreachProblems.m
- in the function
setup_cmaes
, replace the linesolver_opt.Seed = 0
withsolver_opt.Seed = round(rem(now, 1)*1000000)
- start matlab, set up a C/C++ compiler using the command
- Install S-TaLiRo
- If you have a previous version of the toolbox installed, remove it completely.
- Download the S-TaLiRo from here.
- See the
readme.txt
file for any other Matlab packages that might be required. - Run the
setup_staliro.m
file in the toolbox to setup the toolbox on your local machine. - Type
help staliro
to get a detailed description of the toolbox and refer to the demos folder to run sample problems handled by the tool. - Installation of SOAR algorithm, see here.
- Details can be found [here]https://sites.google.com/view/ai-cps-benchmark/replication-package)
a5d9e99dac1de2d5d38bce2b91656fbc27b396bf