Logo


The BenchGen project aims to synthesize programs that are sufficiently expressive to stress-test computing systems, such as operating systems, compiler optimizations, memory allocation libraries and even computer architectures.



Benchmark Generation via L-Systems


About:

BenchGen implements an L-System to generate programs from a seed string and a set of production rules, enabling the creation of large programs through iterative expansion of the L-System. The program generator is entirely written in C++. To know more about how BenchGen works, you can read a brief report about it.

The BenchGen is develop in Compilers Lab and is financed by FAPEMIG and Google. We appreciate their support and contributions to the development of this project.


Releases:

• C Language Support:

      v1.0.0-alpha

• Multi Language Support:

      v1.0.0-beta


Installing and Running:

After cloning the repository, you can build the project by running the make command in the src/gen directory. Notice that clang++ is used as the default compiler.

To run BenchGen, you need to provide the following five parameters: An example of usage is:

Run in alpha version:

git clone --branch v1.0.0-alpha https://github.com/lac-dcc/BenchGen.git
make -C ./BenchGen/src/gen/
./benchGen 1 productionRule.txt seedString.txt myProgram array

Run in beta version:

git clone --branch v1.0.0-beta https://github.com/lac-dcc/BenchGen.git
make -C ./BenchGen/src/gen/
./benchGen 1 productionRule.txt seedString.txt myProgram array programmingLanguage

See more: here


How to create a benchmark via L-grammar

The L-system grammar used by BenchGen currently supports three commands:

BenchGen also employs data structures in its benchmarks, providing four functions for data manipulation:

Based on this, we can define production rules that describe how the benchmark will be structured:

Axiom

CALL(new A)

Production Rules

A = LOOP(B C contains);
B = IF(new LOOP(remove contains), new A remove contains);
C = new contains B;

This program, for instance, begins with a function call that creates a new data structure using the new command. Then, a loop structure is created according to rule A, which calls rules B and C, checking the structure using the contains command.

For more details, our technical report provides additional information on the syntax of control structures in Section 3.1.


Contributing

Descrição da imagem Fork on GitHub


Team