refactoring such that code generators have access to a generation context that includes a mapping from symbols to implementations