Skip to content

Installing ASLi and BAP

Kait Lam edited this page Jan 5, 2023 · 1 revision

Installation

This will compile and install local versions of ASLi, BAP, and the ASLi plugin for BAP.

  1. Install build depends and opam:

    sudo apt install python3 pkg-config cmake ninja-build
    sudo apt install opam 
    
  2. Initialise opam and create switch:

    opam switch create "name" 4.09.1
    opam init
    opam install merlin  # (optional language server for ocaml)
    
  3. Install ASLi:

    git clone -b partial_eval [email protected]:UQ-PAC/asl-interpreter.git
    cd asl-interpreter 
    opam install --deps-only --with-test ./asli.opam
    dune build
    cd ..
    

    (This may take a while to compile z3.)

  4. Install BAP:

    git clone -b aarch64-pull-request-2 [email protected]:UQ-PAC/bap.git
    cd bap
    opam install --deps-only --with-test ./opam/opam
    

    Now, LLVM should be installed, possibly by opam above. Change the version number below after checking llc --version or with llc-<tab>.

    ./configure --enable-everything --disable-ghidra --prefix=`opam var prefix` --llvm-version=14
    make && make install
    cd ..
    

    (This can take around 15 minutes.)

  5. Install BAP ASLi plugin:

    opam pin ./asl-interpreter/ -k path
    git clone [email protected]:UQ-PAC/bap-asli-plugin.git
    cd bap-asli-plugin 
    make
    
  6. BAP should now be usable with ASLi with the method here: https://github.com/UQ-PAC/bap-asli-plugin#use

Clone this wiki locally