specialSession - Recurring questions asked Special session:...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
1 CSE 450: Compilers K. Stirewalt Special session: Topics: – Review of composite structures – Unit testing – Teamwork and collaborative development – Visualizing how the pieces fit together CSE 450: Compilers K. Stirewalt Recurring questions asked Questions: – “We have been having trouble getting started with this project. Could you give us a clue on where to begin?” – How do I build and represent types, especially the composite types? – What is / how do I build a symbol table? – How/where in my code do I populate the top-level symbol table with information about pre-defined procedures/functions, such as Put, GenInt, etc? CSE 450: Compilers K. Stirewalt General design problems Noticeable absence of “system- level” design – No development/testing of abstractions in isolation – Important “subsystems” coded in an ad hoc manner as a side effect of modifications to the yacc grammar “Big bang” approach to testing Ineffective teamwork: – No agreement on common APIs or plan for integration before splitting up work. – “Joe said he would develop the symbol table and get back to me, but he hasn’t contacted me, and I don’t know what his status is…” CSE 450: Compilers K. Stirewalt Composite object structures Expression trees are examples of composite object structures – General notion of an expression, which may be a: • simple object (e.g., an instance of a Variable or Literal) or • composite object (e.g., instance of an Add, Subtract, Multiply, or Divide) Syntax trees and types are also composite object structures Composite designs especially useful when the abstract class declares polymorphic operations CSE 450: Compilers K. Stirewalt Composite pattern (idealized) Client Component Operation() Composite Operation() Add(Component) Remove(Component) GetChild(int) : Component Leaf Operation() children * * CSE 450: Compilers K. Stirewalt Classes Expr and Literal class Expr {
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 07/25/2008 for the course CSE 450 taught by Professor Stirewalt during the Spring '08 term at Michigan State University.

Page1 / 4

specialSession - Recurring questions asked Special session:...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online