Code generation is the automated creation of source code from a high-level specification, such as natural language, input-output examples, or formal constraints. It is the core mechanism enabling program synthesis, where systems infer general programs from specific requirements. This process spans from template-based generation and compiler codegen to advanced neural synthesis using large language models (LLMs) like GPT-4 and Code Llama, which translate intent directly into functional code.
