Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Clone this wiki locally
Curated Collection of Simulink Models for Model-based Empirical Studies
To benefit empirical studies of model-based cyber-physical systems (CPS) and commercial CPS development tool chains (e.g. Matlab/Simulink), we are developing and maintaining the by-far largest corpus of freely available Simulink models, containing over 1,000 models.
SLforge: Automatically Finding Bugs in a Commercial Cyber-Physical Systems Development Tool
We are developing automated testing schemes to generate random, valid Cyber-Physical System (CPS) models to use them in differential testing of commercial CPS development tool chains (e.g. the popular MATLAB/Simulink tool chain from The MathWorks). Our tool SLforge parses modeling specifications from the vendor-provided documentations, and utilizes them to construct valid Simulink models, which can be used for randomized differential testing of Simulink. Our technique has already found 10+ confirmed bugs in the Simulink tool chain.
Tool implementation for Simulink is located under
directory. Check out how to run the tool.
- Our paper Automatically Finding Bugs in a Commercial Cyber-Physical System Development Tool Chain with SLforge has been accepted in 40th International Conference on Software Engineering (ICSE) 2018; ICSE 2018 Artifacts
- Our SLforge poster has received third prize in the ACM Student Research Competition at 40th International Conference on Software Engineering (ICSE) 2018.
- Presented poster Understanding and Improving Cyber-Physical System Models and Development Tools at the Doctoral Symposium at 40th International Conference on Software Engineering (ICSE) 2018
- Presented our paper A Curated Corpus or Simulink Models for Model-based Empirical Studies at 4th International Workshop on Software Engineering for Smart Cyber-Physical Systems (SEsCPS), co-located at 40th International Conference on Software Engineering (ICSE) 2018
- Presented in the students' presentation session and tools demonstration session at Seventh Summer School on Formal Techniques, by Stanford Research Institute (SRI) International, May 2017
- Presented demo Fuzzing Cyber-Physical Systems Development Environments with CyFuzz in HSCC 2017
- Presented at the 6th Workshop on Design, Modeling, and Evaluation of Cyber Physical Systems (CyPhy'16)
- ICSE 2018 Artifacts
- Tool demo (video)
We welcome new contributors! Please check out getting started guide. We manage the project in GitHub.
Getting the tool
Use Git to get the latest version and the correct 3rdparty dependencies. Please search and install Git and then invoke the followings in a Git command window:
git clone https://github.com/verivital/slsf_randgen.git cd slsf_randgen git submodule init git submodule update
- Matlab with Simulink version R2017a. Matlab scripts can be run from either Windows or Linux.
- Python3: if you want to detect crash-bugs. Python2 might not work. Also requires Linux (We have tested the scripts in Ubuntu 14.04+) to run the Python scripts, as we have not tested them in other platforms.
- https://embed.cs.utah.edu/csmith/: if you want to generate custom blocks (see below for instructions)
Building and installing Csmith (required if you want to create custom blocks using s-functions)
- Please clone source code from (customized Csmith)[ttps://github.com/shafiul/csmith].
- To build csmith, follow official doc at https://embed.cs.utah.edu/csmith/
- If using Ubuntu: You need
- Once built, the Csmith binary is located inside
- We have to ensure csmith executable and
includedirectory is in operating system path (see below).
Set up environment variables (in Linux)
Adding following in your
bash.rc will add
MATLAB executable in OS path:
export CSMITH_PATH=/path/to/csmith export PATH=$PATH:/$CSMITH_PATH/src:path/to/matlab/binary export C_INCLUDE_PATH=$CSMITH_PATH/runtime export CSMITH_HOME=$CSMITH_PATH # Needed for running csmith test driver