Skip to content
/ sa4u Public
forked from obicons/sa4u

Static Analysis for Unmanned Aerial Systems

Notifications You must be signed in to change notification settings

Ikutania/sa4u

 
 

Repository files navigation

SA4U

SA4U is a static analyzer for detecting unit conversion errors in UAV source code.

Directory Layout

There are currently 2 directories:

  • platforms/ contains Dockerfiles for building an environment to analyze supported UAV systems. Currently, we support ArduPilot. We intend to eventually support PX4. Each system has its own subdirectory, e.g. platforms/ArduPilot.
  • src/ contains the source code for SA4U.

Important Notes

The analysis process generates a lot of data. You may run out of memory. Increase your swap size if this occurs. SA4U is designed to use memory in a way that swapping should not slow down the analysis too much.

Build Steps

  1. Clone this repository:
> git clone https://github.com/obicons/sa4u
  1. Change directories into sa4u (cd sa4u). Initialize all dependencies:
> git submodule update --init --recursive
  1. Build a platform to analyze. Have a coffee & browse HN. ArduPilot has many dependencies, so this will take a while.
> docker image build -t sa4u-ardupilot ./platforms/ArduPilot
  1. Change the permissions of the source code repository so that the Docker container's user can read/write:
> chmod -R a+rw ./
  1. Start an analysis container:
> docker container run -ti -v $(pwd):/home/ardupilot/sa4u sa4u-ardupilot bash
  1. In the analysis container, build SA4U:
> cd /home/ardupilot/sa4u/src/
> make

7: Run the analysis:

> ./sa4u                                                    \
    --compilation-database ../../ardupilot/build/sitl/      \
    --mavlink-definitions ../platforms/ArduPilot/common.xml \
    --prior-types ../platforms/ArduPilot/sample.json

About

Static Analysis for Unmanned Aerial Systems

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 93.7%
  • Python 4.0%
  • TypeScript 1.2%
  • Dockerfile 0.5%
  • Shell 0.5%
  • Makefile 0.1%