Hello everyone,
I am working on a project where I need to generate syntactically different but semantically equivalent C code variants.
My current pipeline already uses compilation and code obfuscation techniques.
However, I am specifically interested in source-to-source transformations (C → transformed C), ideally built on Clang LibTooling.
Before developing my own tool, I would like to know:
Are there existing open-source tools, libraries, or research projects that perform source-to-source transformations using LLVM LibTooling?
I am particularly looking for tools that can:
-
transform code while preserving semantics,
-
rewrite syntax structures (loops, conditionals, expressions, etc.),
-
introduce safe refactorings or controlled mutations,
-
generate multiple different code variants automatically.
Any of the following would be helpful:
-
links to existing tools or libraries,
-
academic projects built on LibTooling doing source-to-source code variant generation,
Even partial tools or research prototypes would be useful.
Thanks in advance for any pointers or recommendations!
Best regards,
Markus