Welcome to CSE 131!

Instructor: Dr. Lingjia Tang
  • Office: CSE 2108
  • Email: lingjia at cs.ucsd.edu
  • Office Hours: Mon/Wed 3-4:00pm
TA: Xinxin Jin
  • Office Hours: Tue/Thur 3:00pm-4:00pm
  • Location: EBU3B-b 260A
  • Email: x7jin@cs.ucsd.edu
Course Info:
  • Lecture: HSS 1330, MW 5:00p - 6:20p
  • Discussion:Peter 102, F 4:00-4:50p
Course Textbook:
  • Aho, Lam, Sethi, and Ullman, Compilers: Principles, Techniques, and Tools, 2nd Edition, Addison Wesley, 2007
Slides

CSE 131 -- Compiler Construction
Spring 2013, Instructor: Lingjia Tang

Course Description

This course is an introduction to compiler construction. Topics covered will include the following: lexical scanning, parsing, abstract syntax trees, semantic analysis, intermediate code generation, optimization, and code generation.

  • "You can't modify a constant, float upstream, win an argument with the IRS, or satisfy this compiler" - a real compiler error message from Apple's MPW C compiler. More funny compiler msgs.
  • Guidelines and Grading Info.

    • REQUIRED: PIAZZA
      • I will be using PIAZZA for the majority of class correspondence. Piazza connects everyone in the class as well as the instructors. Use it to ask questions, discuss homeworks/projects, etc. Myself and the TAs will be checking Piazza regularly to chime in.
      • URL: https://piazza.com/ucsd/spring2013/cse131b/home
      • The initial class roster will receive invites, however it is your responsibility to make sure you are signed up. If you are not already on, click the link and sign up.
      • I will put slides and other materials on Piazza from time to time in PDF format.
    • Grading
      • The grade for 131 will be based on programming projects, one midterm, and a final, as follows:
        • Projects: 45%
        • Midterm: 20%
        • Final: 35%
        • Earn extra creit by class/piazza participation!: 5%
      • The final will be inclusive of all course material.
      • Late project submissions are not encouraged. You will have three grace days during the quarter. I.e., you can turn one project in three days late, or three assignments in one day late, etc. I recommend not spending those days frivolously early in the quarter. After you have spent your grace days, late project will be accepted, but with no guarantees that they will be graded, and with significant penalties if they are. Anytime after the end of class counts as a day late. The second day begins 24 hours later.
      • You have the right of appeal for grading on all tests. You have one week from the time the midterms are returned to make appeals, including addition errors on your score. Check it over carefully when you get it. All appeals must be made in writing and given to the instructor.
    • Integrity
      • Cheating WILL be taken seriously. It is not fair to honest students to take cheating lightly, nor is it fair to the cheater to let him/her go on thinking that is a reasonable alternative in life. Don't test me on this one.
      • The following is not considered cheating:
        • discussing projects in groups (with the implementation done separately, later).
      • The following is:
        • looking at others' completed implementation
        • using solutions from the web, previous versions of the class, or anywhere else.
        • Receiving, providing, or soliciting assistance from another student during a test.
      • Penalties -- Very Serious! anyone copying information or having information copied during a test will receive an F for the class and will not be allowed to drop.  They will be reported to their college dean.  If you can prove non-cooperative copying took place, your grade may be restored, but you must prove it to the dean -- I don't want to be involved.  Anyone caught cheating on the projects will not be allowed to turn in further projects.  Your grade will be based exclusively on the tests (with a suitable penalty applied)
    • Project submission
      • All projects will be handed in using submission scripts. To submit your project, first enter into the project directory and "make clean". Then executing the UNIX shell command: bundlePN, where N specifies the project number (1-3). For example, bundleP1 represents project 1. This script will tar up your solution directory and then submit it via a turninscript.
        Note:
      • If you are cooperating with your partners, only one of you must submit.
      • Be sure that your code compiles before submitting it. If your submission does not compile, we cannot give you a grade.

    Course Schedule

    Subject to jitter
    Mon, April 1 Overview of Compilers Read: Chapter 1
    Wed, April 3 Lexical Analysis Read: Chapter 3
    Mon, April 8 Syntax Analysis - CFG, Parsing -
    Wed, April 10 Syntax Analysis - more Parsing -
    Mon, April 15 Semantic Analysis - Symbol Table and Scoping
    Wed, April 17 No class (travel)
    Mon, April 22 Semantic Analysis - Type Checking 1
    Wed, April 24 Semantic Analysis - Type Checking 2
    Mon, April 29 Midterm Review Previous notes
    Wed, May 1 Runtime Environment 1
    Mon, May 6 Midterm Good luck!
    Wed, May 9 Runtime Environment 2 -
    Mon, May 13 IR Generation
    Wed, May 15 IR Optimization
    Mon, May 20 More Optimization -
    Wed, May 23 More optimization
    Mon, May 27 No class (Memorial Day!)
    Wed, May 29 More optimization
    Mon, June 3 More optimization
    Wed, June 5 Final Review
    Fri, June 14 FINAL EXAM Time: 7:00p - 9:59p; Location: TBD

    Project Assignments

    Projects Links Due Date
    Project 1: Lexical Analysis Project Description and starting code are on Piazza April 15 0:00am
    Project 2: Syntax Analysis Project Description and starting code are on Piazza April 28 11:59pm
    Project 3: Semantic Analysis May 19 11:59pm
    Project 4: Code Generation June 9 11:59pm