covexp
is a MATLAB package which runs your experiments on
Simulink programs (i.e. subjects), caches them and aggregates results.
We initially created it to experiment with Simulink model coverage. Now we use it for general-purpose experiments on some subjects.
Clone this git repo, cd
to the cloned directory, then in a MATLAB prompt:
covexp.covcollect();
Edit ../covcfg.m which is self-documented.
set PARFOR = true
Results on individual subjects are cached in the disc with the covdata.mat
suffix
To create an experiment, write a function and put that function name in
covcfg.m
's EXPERIMENTS
field.
Existing experiments are in +covexp/+experiments
If your experiment would return result, you need to initialize data-structures.
Initialize results that the experiment would return using a function in
, and point to that function in covcfg.m
using EXP_INITS
Existing data-structure initialization functions are inside +covexp/+experiments/+ds_init
- Experiment should not throw errors. If an experiment throws, subsequent experiments for the same subject will not run.
- In Parallel mode other models will be run, but the
touched
file will not be cleared so that you know which model threw. - In serial mode the script will stop sot that you can fix the bug.
- Do not close the Simulink model inside experiments
Choose which experiments you want to run in DO_THESE_EXPERIMENTS
configuration.
You can pass in an array of experiment ids. Experiments would be perfomed sequentially on a subject.
In some other machine, issue following
tar -cjvf backup.tar.bz2 *covdata.mat *_pp.slx
Here, we are also copying the pre-processed _pp.slx
files.
Next, copy the tar.bz2 file in your machine and extract:
tar -xjvf backup.tar.bz2 --overwrite
Since the cached covdata.mat
files were created in a different machine,
they contain absolute directory locations for that machine. To fix these,
run the fix_input_loc
(5th) experiment
Explain how to interpret the cached results
simdur
: duration to simulate the original modelduration
: duration to collect coverage