Ranger is an extension of the Forester tool to support a resource bounds analysis of heap-manipulating programs. Ranger takes as an input a program in C and transforms it to a corresponding arithmetic program. Such program is then analysed using an underlying bounds analyzer (in our case the Loopus tool) and compute the complexities of functions and loops.
Following packages are needed in order to compile and run the Ranger toolchain on your system:
In order to compile and work with our tool we highly recommend to clone the repository to the local repository. You need to have the git version control system installed.
To download the library, run
In order to prepare the tool for compilation issue the following command in the root directory of the tool,
where $PATH_TO_GCC
is a path to a gcc version 4.8:
$ ./switch-host-gcc.sh $PATH_TO_GCC
The compilation might end with an error (the actual failure is in different module, which is not used by Ranger), then run the following (to compile libfa.so and ranger):
$ make -C ./fa_build/
To run the Ranger run the following command, which for file.c will generate the corresponding integer program in file called int_file.c:
$ ./fa_build/fagcc file.c
Finally, compile the resulting aritmetic program using clang-3.5, and then run loopus:
$ clang-3.5 -g -emit-llvm -DCLOOPUS -c int_file.c
$ loopus -zPrintComplexity int_file.bc
Our experimental evaluation can be found in the following paper [1]
If you have any questions, do not hesitate to contact the tool/method authors:
Copyright (c) 2018 Tomas Fiedor <ifiedortom@fit.vutbr.cz>