A generator of fusion functions for Semantic Fusion (YinYang).
Project description
fusion-function-generator (ffg)
Automatic generation of Fusion Functions used by yinyang fuzzer for Semantic Fusion.
Lib structure
The package is divided into 4 folders:
- gen
- operators
- visitors
- emitter
The folder gen contains the code which is used to generate the whole
operators folder, the configuration file exposing some api to control which operators to use during the generation of the tree as well as some constants for the options to the generation algorithm.
the file tree_generation instead contains the main tree generation algorithm.
operators contains the basic definition of the operators classes.
visitors folder contains useful api to print, export to DOT format and rewrite the trees to their inverses.
Finally, emitter includes the code needed to export fusion functions to the format understood by YinYang. It also contains an emitter that outputs fusion functions and its inverses to DOT file.
Cookbook
Use only a subset of the theories in the generation:
ffg.gen.gen_configuration.set_available_theories(['bool', 'real'])
Get the available theories:
ffg.gen.gen_configuration.get_theories()
Generate a fusion function of two variables (as a tree):
tree, _ = ffg.gen.tree_generation.generate_tree(root_type, size, ['x', 'y'], 'z')
Emit the fusion function to YinYang format as a string:
output = io.StringIO()
emit_function(tree, output, wrap=False)
ff = output.getvalue()
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ffg-0.1.2.tar.gz.
File metadata
- Download URL: ffg-0.1.2.tar.gz
- Upload date:
- Size: 22.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.8.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5549f5a493619128ac9adff21c97bc8faecfd11e4327b77b1b3efc900625bd2a
|
|
| MD5 |
fce9425963e3ec12f6578e14e286ab66
|
|
| BLAKE2b-256 |
b63c91bd19f50e037a12cb993b7be90d7acd672594803ca0ac9dd92d9f01bb16
|
File details
Details for the file ffg-0.1.2-py3-none-any.whl.
File metadata
- Download URL: ffg-0.1.2-py3-none-any.whl
- Upload date:
- Size: 46.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.8.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9a3ffd9c97e0047b08a49009dcd11549ba2baa3a1caff69c7c8af9884203e7b0
|
|
| MD5 |
d6a60385a82b9ba44286f3b147e9e125
|
|
| BLAKE2b-256 |
d2e7f6767f31bdb8998cd55630ff7a88139540c4c7b7cbae07a2859a138d5aac
|