Proof of concept of the paper "What is Your Function? Static Pattern Matching on Function Behavior".
Whayrf is a monomorphic system, which means programs that use the same syntactic function more than once may not behave as expect. A source code transformation is possible to support polymorphism, refer to section 3.3 of the paper for further discussion.
There are two different ways to setup and run Whayrf.
-
Make sure you have OCaml and OPAM installed on the latest version:
$ opam update $ opam upgrade $ opam switch 4.02.1
-
Install the dependencies:
$ opam install oasis batteries menhir ounit
-
Generate configuration:
$ oasis setup -setup-update dynamic
-
Configure:
$ ./configure
-
Enable tests:
$ ocaml setup.ml -configure --enable-tests
-
Build:
$ make
-
Interact with the toploop (sample programs can be found at
test-sources/
):$ ocamlrun whayrf_toploop.byte
-
Run the tests:
$ make test
Having Docker and Docker Compose installed, run:
$ docker-compose run --rm whayrf
This builds and runs the tests.
In order to interact with the toploop (sample programs can be found at
test-sources/
):
$ docker-compose run --rm whayrf 'ocamlrun whayrf_toploop.byte'
- Leandro Facchinetti lfacchi2@jhu.edu.
- Pottayil Harisanker Menon pharisa2@jhu.edu.
- Zachary Palmer zachary.palmer@jhu.edu.
- Alexander Rozenshteyn arozens1@jhu.edu.
- Scott F. Smith scott@jhu.edu.
The Johns Hopkins University