The attached file contains an example of code generation using ObjectGenerators which builds a very simple homemade RuleEngine.
Code generation is an excellent way of increasing performance moving run-time calculations to compile-time.
We could generate code creating routines or implemeting methods using ObjectGenerators. In this example we are using ObjectGenerators.
Update: Rule Engine is now on GitHub https://github.com/intersystems-ib/cache-iat-ruleengine