This repository is for the artifact evaluation of the paper "Effective Hybrid System Falsification Using Monte Carlo Tree Search Guided by QB-Robustness" accepted by CAV 2021.
-
Operating system: Linux or MacOS;
-
Matlab (Simulink/Stateflow) version: >= 2020a. (Matlab license needed)
-
Python version: >= 3.3
-
Clone the repository.
git clone https://github.com/choshina/ForeSee.git
git submodule init
git submodule update
-
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
- start matlab, set up a C/C++ compiler using the command
-
Install our tool ForeSee.
- in terminal navigate to ForeSee home, and run
sh InstallForeSee.sh
- in terminal navigate to ForeSee home, and run
In the following, we call one algorithm (out of the baseline breach and the proposed approach ForeSee) solving one specification (out of the ones in Table 1 in our paper) as a problem instance. Since the optimization algorithms used in our experiments are stochastic, we repeated each falsification trial for 30 times, and count the success rate, i.e., how many trials out of the 30 trials succeeded, as the indicator of the effectiveness of different techniques; for each trial, we set 900 seconds as the timeout. Therefore, the worst case for each problem instance is 900*30 seconds (7.5 hours).
In our script, we make the number of trials configurable. Therefore, it is not needed to run 30 trials for each problem instance; the user can input a smaller number, e.g., 10, and check if the success rate is similar to what has been presented in Table 2 of our paper.
Run python foresee.py [RQ1|RQ2|RQ3]
, then the script will ask users to specify experiment settings.
Users can specify 3 settings:
- specification ID
- for RQ1: select one from
AT[1-22]|AFC[1-6]|FFR[1-2]
, e.g.,AT6
- for RQ2: select one from
AT1|AT3|AT4|AT9|AT15|AFC3
- for RQ3: select one from
AT17|AT19|AT21
- for RQ1: select one from
- falsification algorithm
- select one from
breach|foresee
, e.g.,foresee
- select one from
- the number of trials
- specify a natural number, e.g.,
10
- specify a natural number, e.g.,
- (RQ2 only) rescaling factors for specific signals
- (RQ3 only) the hyperparameters
c
andB
P- select one for
c
from0|0.02|0.2|0.5|1.0
- select one for
B
P from2|5|10|15|20
- select one for
Then users can wait until the results display.
In general, the usage of ForeSee for a new Simulink model consists of 3 steps:
- write a configuration file
new
intest/conf/
- generate test script by
python test/foresee_gen.py test/conf/new
- run test by
make
We use the Simulink model "narmamaglev_v1" (See here for details) as an example to show how ForeSee runs new model.
- we prepared an example configuration file
test/conf/NN_example
. Users can specify specifications, the number of trials, scalars, and etc by editting this file. Be sure to change theaddpath
item as the ForeSee home. - navigate to
test/
, and runpython foresee_gen.py conf/NN_example
. - navigate to ForeSee home, and run
make
.
The configuration file contains a number of items. For each item, the syntax is as follows:
item n
line 1
line 2
...
line n
The number of lines is consistent with the value of n
.