In order to support the development of Acumen source code transformations, Adam has implemented a basic generator of Acumen models (instances of the Prog type) comprising multiple Acumen classes (ClassDefs). On a high level, the algorithm works as follows:
- Generate list of leaf classes (containing no constructor calls or object field references) and add these to an environment (list of ClassDefs).
- A small, random number of times, repeat the following: generate a list of classes based on the environment, and add these to the environment.
- Generate a main class based on the environment and wrap it in a Prog.