convert all runtime functions to compile-time generators