Authors: [Lars-Ake Fredlund (lfredlund@fi.upm.es), Clara Benac Earle (cbenac@fi.upm.es)
](mailto:Lars-Ake Fredlund (lfredlund@fi.upm.es), Clara Benac Earle (cbenac@fi.upm.es)).
Ranker is a tool that helps compare, using testing, how well different implementations of the same specification behave, obtaining a "ranking" of the implementations (which are better, which are worse). The tool uses the Quviq QuickCheck tool for testing.
Ranker requires rebar3 for building and testing. See here for getting started with rebar3.
To compile, execute the following command:
$ rebar3 compile
After compilation Erlang beam files will be left in the directory _build/default/lib/ranker/ebin/.
Should you wish to install the Ranker tool in the standard
Erlang library structure, the following commands can be used:
$ erl -pa _build/default/lib/ranker/ebin/
> ranker_install:install().
To generate Markdown docs, execute the following command:
```
$ env ERL_LIBS=$PWD/_build/default/lib/edown rebar3 edoc
```
The examples
directory contains two examples, a set of Java based
implementations of a simple sorting algorithm in the directory java, and
a set of Erlang based implementations of a list reversal in the
directory erlang.
A prerequisite for working with the Java example is having the JavaErlang library installed. To build and test the Java example, after having compiled the Ranker tool, follow the steps below:
examples/java$ make
examples/java$ erl -sname tst -pa ../../_build/default/lib/ranker/ebin/ -pa ebin
1> test:test().
...
2> ranker_render:render_classes("corr").
...
3> halt().
As a result of the ranking analysis there will be a set of files corr_classes_X.{bin,dot,interpretation,pdf} which describe the computed ranking (step-by-step).
To build and test the Erlang example, after having compiled the Ranker tool, follow the steps below:
examples/erlang make
examples/erlang erl -pa ../../_build/default/lib/ranker/ebin/ -pa ebin
1> test:test().
...
2> ranker_render:render_classes("corr").
...
3> halt().
As a result of the ranking analysis there will be a set of files corr_classes_X.{bin,dot,interpretation,pdf} which describe the computed ranking (step-by-step).
The directory extras contains a small interactive application, based on the gnuplot tool, to interact with complexity graphs computed by the Complexity tool. Consult the README file in the extras directory for further information.