Infer Lab Instructions
Note: Infer works on Linux and MacOSX. If you use Windows, you'll need
to run Infer in a Linux VM.
(1) Install Infer according to the instructions here:
https://github.com/facebook/infer/blob/master/INSTALL.md. Follow the
"Install Infer from source" variant of the instructions rather than the
"Pre-compiled clang" variant.
(2) Run the tests to make sure everything works: make -j test.
(3) Set up your OCaml development environment by following the
"Development dependency" instructions here:
doing this, open an ML file (e.g., infer/src/checkers/ThreadSafety.ml)
and make sure syntax highlighting, jump-to-definition, etc. are working
(4) An optional part of the lab will involve using your new Infer
analysis to find bugs in open-source Android code. Doing the following
will make this easier:
- Download the Android SDK: https://developer.android.com/studio/index.html
- Download SDK tools: run `android` to launch SDK manager UI, check the
latest few versions of "Android SDK Tools"/"Android SDK Build-tools",
and click "Install"
- Download some Android apps. Here's a few ideas, but pick any apps that
interest you! Tip: since many open-source Android apps use submodules,
it's usually a good idea to clone with
git clone --recursive
- https://f-droid.org/ (list of open-source apps)
- https://github.com/pcqpcq/open-source-android-apps (another list of open-source apps)
- Try building an app: ./gradlew assembleDebug, then try running Infer
on it: infer -- ./gradlew assembleDebug