SA4U is a static analyzer for detecting unit conversion errors in UAV source code.
bugs/
- contains scripts to recreate bugs diagnosed by SA4Udemos/
- contains examples to analyze with SA4Ulsp/
- contains the SA4U VSCode extensionplatforms/
- contains support data for SA4U to analyze special subjectssa4u_z3/
- contains the source code for the latest SA4U
$ (cd sa4u_z3 && docker image build -t sa4u ./)
$ docker container run \
-v "$(pwd)/demos/01":/src/ \
sa4u \
-m /src/CMASI.xml \
-p /src/ex_prior.json \
-c /src/compile_commands_dir
You should see no errors.
Uncomment the first line in demos/01
that indicates that there is an error. Invoke SA4U like you did in step 2. You should see output like this:
ERROR!
afrl::cmasi::Location3D::getAltitude return unit known from CMASI definition
afrl::cmasi::Location3D::getAltitude known from CMASI definition
Variable z declared in /src/ex.cpp on line 25 (1)
Call to set_alt_in_cm in /src/ex.cpp on line 29 column 3 (9)
Call to set_alt_in_cm in /src/ex.cpp on line 31 column 3 (10)