Presentation is loading. Please wait.

Presentation is loading. Please wait.

CS 614: Theory and Construction of Compilers Lecture 8 Fall 2002 Department of Computer Science University of Alabama Joel Jones.

Similar presentations


Presentation on theme: "CS 614: Theory and Construction of Compilers Lecture 8 Fall 2002 Department of Computer Science University of Alabama Joel Jones."— Presentation transcript:

1 CS 614: Theory and Construction of Compilers Lecture 8 Fall 2002 Department of Computer Science University of Alabama Joel Jones

2 ©2002 Joel Jones Outline “Everybody Dance Now” Review Tombstone Diagrams Tombstone ‘til you drop Reading & Questions for Next Class

3 ©2002 Joel Jones Definitions P L MST L S L Program P expressed in language L Machine M Translator from S to T expressed in L Interpreter for S expressed in language L

4 ©2002 Joel Jones Tombstone Diagram Problems 1: Compile a Triangle Source Program P Running the object program Disassembling the object program 2: (machine M, C compiler on M producing M, Java->C translator written in C) Diagrams for above Compile and run program P expressed in C Compile Java-into-C translator to machine code Compile and run program Q expressed in Java

5 ©2002 Joel Jones More Tombstone Diagram Problems 3: (Gnu RTL intermediate language; HLL: C, C++, Pascal; Machine Code: Alpha, PPC, SPARC; RTL->RTL optimizer; all written in C Install on SPARC, given a C compiler for SPARC Compile P in Pascal, into SPARC machine code Compile using RTL optimizer Cross-compile C++ program Q for PPC machine code

6 ©2002 Joel Jones Reading & Questions for Next Class Java Cup Web page http://www.cs.princeton.edu/~appel/modern/j ava/CUP/ http://www.cs.princeton.edu/~appel/modern/j ava/CUP/


Download ppt "CS 614: Theory and Construction of Compilers Lecture 8 Fall 2002 Department of Computer Science University of Alabama Joel Jones."

Similar presentations


Ads by Google