Translator utility functions for code generation