ASU Fall 2012: Compiler Construction - Final Presentation
Upcoming SlideShare
Loading in...5
×
 

ASU Fall 2012: Compiler Construction - Final Presentation

on

  • 169 views

The presentation for the course Compiler Construction. The language was a subset of Object Oriented Pascal

The presentation for the course Compiler Construction. The language was a subset of Object Oriented Pascal

Statistics

Views

Total Views
169
Views on SlideShare
169
Embed Views
0

Actions

Likes
0
Downloads
1
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

CC Attribution-NonCommercial-NoDerivs LicenseCC Attribution-NonCommercial-NoDerivs LicenseCC Attribution-NonCommercial-NoDerivs License

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

ASU Fall 2012: Compiler Construction - Final Presentation ASU Fall 2012: Compiler Construction - Final Presentation Presentation Transcript

  • Compiler Construction Final presentation Manish Sinha Ankit Mandhani
  • Design: Features Supported ● Parse Trees ● Semantic Checking ● Generation of three address codes and Control Flow Graph ● Code Generation – All expressions – Multidimensional arrays – Local, global and heap variables – Loops and Branching – Multiple class and objects – Simple Method calls – Print statements
  • Features possible but not supported ● Complex Method Calls – Method calls with parameters – Method calls using objects – Recursion and nested method calls ● Optimizations – Value and extended value numbering – Constant folding ● Control flow for Goto and Labels
  • Not supported due to design limitations ● Code generation for local arrays ● Better heap and stack management
  • Could have done differently ● Nested symbol table – For handling all cases of semantic checking – For code generation ● More modular code for Project 4 to handle all cases of memory allocation and access efficiently ● More information in TAC ● Better and Quicker Design decisions for Project 2
  • Collaboration
  • Achieving Collaboration ● Design and Architecture ● Source code management – Using git – Resolving merges and conflicts – Diff and resolve tool – Hosting code ● Bug tracking
  • Lesson: How to improve collaboration ● Source code management – Better usage of branches – Using rebase instead of merge ● Bug tracking: Using a real bug tracker
  • Language: Possible Changes ● Return keyword assignment: assignment_statement | ...... | return expression ● Last Statement not having semicolon statement_sequences: statement_sequence SEMICOLON statement_sequence: statement | statement_sequence SEMICOLON statement
  • Language Features Possible new features
  • for looping construct e.g. for(i := 0; i < 4; i := i+1) Grammar changes: statement: for_statement for_statement: FOR LPAREN for_statement_conditions RPAREN for_body for_statement_conditions: statement SEMICOLON expression SEMICOLON statement for_body: PBEGIN statement_sequences END
  • foreach looping construct e.g. foreach(house: integer in houses) Grammar changes: statement: foreach_statement foreach_statement: FOREACH LPAREN foreach_statement_conditions RPAREN for_body foreach_statement_conditions: identifier COLON type_denoter in variable_access
  • break construct e.g. break Grammar changes: statement: BREAK
  • The end