What This Document Is
This is a programming assignment for Stony Brook University’s CSE 304: Compiler Design course. It focuses on a core component of compiler construction: code generation. Students will be tasked with implementing a code generator for a specific abstract machine, building upon previous coursework in lexical analysis, parsing, and semantic analysis. This assignment represents a significant step in understanding how high-level programming language constructs are translated into machine-executable instructions.
Why This Document Matters
This assignment is crucial for students enrolled in Compiler Design who are seeking to solidify their understanding of the compilation process. It’s particularly valuable when you’ve completed the foundational stages – scanning, parsing, and type checking – and are ready to tackle the complexities of generating target code. Successfully completing this assignment demonstrates a practical grasp of compiler principles and prepares you for more advanced topics in program optimization and runtime systems. Access to the full assignment details will provide the necessary guidance to successfully implement the code generator.
Topics Covered
* Abstract Machine Architecture (CREAM)
* Code Generation Techniques
* Symbol Table Utilization
* Abstract Syntax Tree (AST) Traversal
* Data Representation and Memory Mapping
* Compiler Front-End Integration
* Understanding Compiler Back-End Processes
What This Document Provides
* A detailed assignment description outlining the objectives and requirements.
* Information regarding the target abstract machine (CREAM) and resources for installation.
* An overview of the existing compiler front-end components available for integration.
* Guidance on the structure of the AST and relevant data structures (Entities, Statements, Expressions, Types).
* Specifications for key entity classes like VariableEntity, FieldEntity, and MethodEntity.
* A clear outline of the code generation task and its place within the overall compilation pipeline.