Artifact for the paper Higher-Order Demand-Driven Program Analysis.
Leandro Facchinetti | lfacchi2@jhu.edu | The Johns Hopkins University |
Zachary Palmer | zachary.palmer@swarthmore.edu | Swarthmore College |
Scott F. Smith | scott@jhu.edu | The Johns Hopkins University |
-
Windows Instructions
Install OCaml for Windows, which includes the Cygwin shell with OCaml and OPAM preinstalled.
-
Initialize OPAM:
$ opam init $ eval `opam config env`
-
Update & upgrade:
$ opam update $ opam upgrade
-
Switch to the appropriate compiler version:
$ opam switch 4.06.1 $ eval `opam config env`
Windows Instructions
Either
$ opam switch 4.06.1+mingw64 $ eval `opam config env`
or
$ opam switch 4.06.1+mingw32 $ eval `opam config env`
depending on the system.
-
Install the dependencies:
$ opam install dune \ batteries \ menhir \ ounit \ ppx_deriving \ ppx_deriving_yojson \ "ocaml-monadic=0.4.0" \ monadlib \ "jhupllib=0.1.1" \ "pds-reachability=0.2.1"
Note that newer versions of some of the constrained packages above may work, but the above-listed versions were tested with this project.
-
If your shell hashes binary locations, you may need to clear your hashes, for example (in Bash):
$ hash -r
-
Build:
$ make
-
Interact with the toploop (find sample programs at
test-sources/
):$ ./ddpa_toploop
-
Run the tests:
$ make test
--log=trace
: Enable verbose logging.--disable-inconsistency-check
: By default, the toploop checks programs for inconsistencies. For example, it checks that only functions appear in the operator position of a function call, and that only records appear in the subject position of a record projection. This inconsistency check forces variable lookups that interfere with benchmarking, and this flag disables it.--select-context-stack=0ddpa
: Uses DDPA with a 0-level context stack (which is a monovariant analysis). Any positive integer value is admitted here (e.g.7ddpa
).
Run the following for extended help (including options to produce diagrams of the incremental PDR graphs):
$ ./toploop_main.native --help
- Install Odefa.
- Install Racket 6.12 or newer.
- Install Racket dependencies:
$ raco pkg install gregor
- Install P4F.
- Run
benchmark/run.sh
:$ bash benchmark/run.sh
- Run
benchmark/collect-results.rkt
:$ racket benchmark/collect-results.rkt
Odefa depends on libraries which tend to develop at the same time as it does, but which are functionally independent and are designed to be used by other projects. Configure these libraries for local development by pinning them:
-
jhupllib
:$ git clone https://github.com/JHU-PL-Lab/jhu-pl-lib.git ../jhu-pl-lib $ opam pin add jhupllib ../jhu-pl-lib
-
pds-reachability
:$ git clone https://github.com/JHU-PL-Lab/pds-reachability.git ../pds-reachability $ opam pin add pds-reachability ../pds-reachability
When these libraries change, run
$ opam upgrade jhupllib pds-reachability