CS-179E Compiler Design Project - Fall 2004


    Minimal Compiler Requirements for General Purpose Languages

    • Language feature set
      • Values: integers, strings
      • Bindings
        • Block structure
        • Declarations: variables, procedures
      • Abstraction: procedures
      • Types: integer, string, one-dim. static arrays
      • Expressions: integer arithmetic and comparisons.
      • Comments: multi-line 
      • Imperative features: 
        • Commands: assignment, sequence, selection, iteration, i/o
    • Code generator: stack code with interpreter

    Suggested Extensions

    • Language feature set: 
      • Types: multi-dimensional arrays, records
      • Block structure: nested blocks
      • Abstraction: recursive procedures
      • Comments: nested multi-line
      • Object oriented features
    • Code generator: 
      • Assembly code for x86 or other processor
      • Object code for x86 or other processor
Project Milestones:
  1. Source Language Specification & Design:
  2. Scanner: JLex regular expressions
  3. Parser: CUP grammar;
  4. Scanning and parsing modules fully functional and tested
  5. Generation of an abstract syntax tree (AST)
  6. Semantic analysis (context checking): Scope rules, types, and attributes
  7. Intermediate representation: generation of the adorned AST (semantic tree)
  8. Destination Language Specification and Implementation:
  9. Code generator:
    1. Declarations
    2. Expressions
    3. Commands
      1. Assignment
      2. Iteration
      3. Selection
      4. Procedure call
  10. Final testing and evaluation


Reporting Milestones (each report presented by a different team member):

  1. Project Proposal and Presentation
  2. Detailed Project Design Proposal and Presentation
  3. Final Project Report, including all supporting materials, code, tests and final evaluation.

Take One!