AI Summary
[DOCUMENT_TYPE: user_assignment]
**What This Document Is**
This document outlines a programming assignment for CS 780, Compiler Design and Construction at Wright State University. It details a project focused on implementing a foundational component of compiler technology: type inference. Specifically, the assignment centers around building a system to analyze and determine the data types within simple postfix expressions. The task requires students to apply concepts related to stack-based computation and basic type systems. It’s designed to be completed using the Cool programming language, a key tool utilized throughout the course.
**Why This Document Matters**
This assignment is crucial for students enrolled in a compiler design course. It provides practical experience translating theoretical knowledge into a working program. Individuals preparing to build more complex compilers will find the skills honed here – understanding data types, stack manipulation, and basic interpreter design – to be invaluable. It’s most beneficial to work through this assignment *before* tackling larger compiler projects, as it establishes a solid base for future learning. Students who successfully complete this assignment will demonstrate a core understanding of how compilers handle type information.
**Common Limitations or Challenges**
This assignment focuses on a simplified language and type system. It does *not* cover advanced compiler features like syntax analysis, code optimization, or complex data structures. The assignment intentionally limits error handling requirements to allow focus on the core type inference logic, but robust error handling is still encouraged. The provided materials do not include a complete, ready-to-run solution; students are expected to develop their own implementation based on the provided specifications.
**What This Document Provides**
* A clear description of the assignment’s objective: implementing a type inference engine.
* A specification of the input format – a series of commands representing postfix expressions.
* A detailed explanation of the expected behavior for each command within the simplified language.
* Guidance on utilizing a stack data structure for implementing the type inference logic.
* An estimated size of a potential solution, offering a benchmark for effort.
* Sample interaction demonstrating the expected program behavior.