Author: Adam Freiberg
e-mail: [email protected]
GEhash was developed as a part of my bachelor's thesis about Evolutionary Design of Hash Functions Using Grammatical Evolution.
Its main focus is on generating hash function for IPv6 used in network flow monitoring.
Project uses CMake to generate build files.
For basic configuration run following commands:
cmake -S . -B build
cmake --build build
There are two ways to run program.
First is to run program directly:
./build/src/GEHash ... [parameters]
Or use provided shell script:
./eval.sh ... [parameters]
Second option automaticaly handles multiple runs (to avoid statistical error) and output files.
To display all parameters and their usage, run following command:
./build/src/GEHash [-h|--help]
Output files are in JSON format for easier processing. There are two main categories of status
parameter. First is progress
and second is result
, which indicates stage of evoluion run.
Example of output data:
[
...,
{
"fitness": 24579.0,
"gen": 4,
"status": "progress"
},
{
"fitness": 24579.0,
"gen": 5,
"phenotype": {
"code": "hash = ~(hash+(~(key)^key<<3)+hash);"
},
"status": "result"
}
]
Documentation
ENABLE_DOCS
- generate documentation wih Doxygen
Dynamic analyzers
ENABLE_SANITIZER_ADDRESS
- use address sanitizerENABLE_SANITIZER_LEAK
- use memory leak sanitizerENABLE_SANITIZER_UNDEFINED_BEHAVIOR
- use undefined behaviour sanitizer
Staic analyzers
ENABLE_CLANG_TIDY
- use Clang-tidy static analyzer tool
Gram library available at GitHub.
ChaiScript library available at GitHub.
Nlohmann JSON used lightweight version available at GitHub due to extensive size of original repository. Full version available here
Catch2 test library for C++ available at GitHub. Currently using v2.13.4.
Testing will be added in future releases.