A randomized differential testing framework (i.e. a fuzzer) for regex engines, applying domain-knowledge of regular expression structure.
You can attempt to use the provided Dockerfile on your machine, which runs all the required steps to set up a container in which freak will run and build. Note that freak is only known to be supported on Linux due to the specific Unix-like OS interface it assumes.
In general, the Dockerfile outlines the prerequisites for a working build environment. If you choose to set things up manually (or if the Dockerfile fails for some reason), these are the explicit steps that you should take.
- Install OCaml and the opam package manager. If you're doing this manually, see here --- installing opam will also install the OCaml compiler.
- Install Rust using rustup. This will also install the cargo build and package manager.
- Install Go and initialize it properly, i.e. add the Go binary path to the PATH environment variable.
- Copy/clone this repository and enter the directory.
- Install the required dependencies from opam: dune, base64, eio_main. This can be done with
opam install <package-name>.
When you are in the freak directory (with all dependencies installed from opam), you should be able to build the project by simply running dune build.
You should be able to run freak after building it by invoking dune exec -- freak. The test harness will create a _freak_wrappers_(id) folder for each thread it spawns, where (id) ranges from 1 to the number of threads spawned. Mismatches that are found will be saved in a corresponding _mismatches_found_(id) folder.