CSC 512/412 Course Syllabus

CSC 512/412 – Compiler Construction

Section 01

FALL 2019

3 Credit Hours

Course Description

 

This course covers the basic topics in constructing compilers for programming languages, which include: Overview of Compilation, Scanning, Parsing, Context‐Sensitive Analysis, Intermediate Representations, Procedure Abstraction, Code Shape, Introduction to Code Optimization, Code Generation, and Several Advanced Topics in Program Optimization.

Learning Outcomes

 

By the end of the course, students should be able to design and implement algorithms for scanners, parsers, semantic analyzers,  and code generators; to critique different implementation choices and analysis approaches; to understand the fundamental theory on regular expression, DFA, NFA, context-free and context-sensitive grammars; to reiterate basic algorithms for  register allocation, instruction scheduling, instruction selection; to explain several common techniques used in code optimizations and the major challenges in static code optimizations.

Course Structure

 

The course will be primarily based on lectures.

Instructors

Xipeng Shen (xshen5) - Instructor
Email: xshen5@ncsu.edu
Phone: 919-513-7577
Office Location: 3276 Engineering Building II (EB2)
Office Hours: 12:30pm-1:30pm Tuesday

Course Meetings

Lecture

Days: Tu, Th
Time: 4:30pm - 5:45pm
Campus: Centennial
Location: 1021 Engineering Building 2
This meeting is required.

Meeting Notes

 

 

Course Materials

Textbooks

Engineering a Compiler - Keith D. Cooper and Linda Torczon
Edition: 2
ISBN: 978­0120884780
Web Link: https://www.amazon.com/Engineering-Compiler-Second-Keith-Cooper/dp/012088478X?ie=UTF8&*Version*=1&*entries*=0
Cost: $86
This textbook is optional.
Compilers: Principles, Techniques, and Tools - Alfred V. Aho, Monica S. Lam, Ravi Sethi, and Jeffrey D. Ullman
Edition: 2
ISBN: 978-0321486813
Web Link: https://www.amazon.com/Compilers-Principles-Techniques-Tools-2nd/dp/0321486811
Cost: $166
This textbook is optional.

Expenses

None.

Materials

None.

Requisites and Restrictions

Prerequisites

CSC 316 (Data Structures) and CSC 333 (Automata, Grammars and Computability). Helpful: CSC 253 (C and C++ for Java Programmers), CSC 224 (Applied Discrete Mathematics), CSC 234 (Computer Organization & Assembly Language), and MA 121 (Calculus).

Co-requisites

None.

Restrictions

None.

General Education Program (GEP) Information

GEP Category

This course does not fulfill a General Education Program category.

GEP Co-requisites

This course does not fulfill a General Education Program co-requisite.

Transportation

This course will not require students to provide their own transportation. Non-scheduled class time for field trips or out-of-class activities is NOT required for this class.

Safety & Risk Assumptions

None.

Grading

Grade Components

ComponentWeightDetails
Midterm Exam 50%

 

The midterm exam will be an in­-class, closed­book exam. There will be no makeup exam for midterm. You need to email the instructor in advance with justifications to skip the scheduled midterm.

Programming Projects 25%

 

There will be a major course project related with building up tools for analyzing and transforming (e.g., GPU) programs.

Assignments 25%

 

There will be several written assignments with some of them having an associated small hands-on programming part that corresponds to one step in the front end of compiler construction and code generations. (some questions are optional for CSC412 students)

Participation

 

Participation in the class is required; absence requires instructor approval; each student gets a one-time exception. Repeated absences could result in an up to 10% deduction of the final grade.

Letter Grades

This Course uses Standard NCSU Letter Grading:
97A+100
93A<97
90A-<93
87B+<90
83B<87
80B-<83
77C+<80
73C<77
70C-<73
67D+<70
63D<67
60D-<63
0F<60

Requirements for Credit-Only (S/U) Grading

Performance in research, seminar and independent study types of courses (6xx and 8xx) is evaluated as either "S" (Satisfactory) or "U" (Unsatisfactory), and these grades are not used in computing the grade point average. For credit only courses (S/U) the requirements necessary to obtain the grade of "S" must be clearly outlined.

Requirements for Auditors (AU)

Information about and requirements for auditing a course can be found at http://policies.ncsu.edu/regulation/reg-02-20-04.

Policies on Incomplete Grades

If an extended deadline is not authorized by the Graduate School, an unfinished incomplete grade will automatically change to an F after either (a) the end of the next regular semester in which the student is enrolled (not including summer sessions), or (b) by the end of 12 months if the student is not enrolled, whichever is shorter. Incompletes that change to F will count as an attempted course on transcripts. The burden of fulfilling an incomplete grade is the responsibility of the student. The university policy on incomplete grades is located at http://policies.ncsu.edu/regulation/reg-02-50-03. Additional information relative to incomplete grades for graduate students can be found in the Graduate Administrative Handbook in Section 3.18.F at http://www.fis.ncsu.edu/grad_publicns/handbook/

Late Assignments

 

No late assignments will be accepted. If an emergency (e.g., hospitalization) prevented an assignment from being submitted, its grade will be determined by averaging the completed assignments in the same category. Instructor may grant an extension if a student has some extenuating circumstances warranting it (which is very rare). Student must receive this extension by noon the day it is due. Note: requesting an extension is not the same as receiving it.

Attendance Policy

For complete attendance and excused absence policies, please see http://policies.ncsu.edu/regulation/reg-02-20-03

Attendance Policy

Attendence is required for this course.

Absences Policy

Absence requires instructor approval; each student gets a one-time exception. Repeated absences could result in an up to 10% deduction of the final grade.

Makeup Work Policy

None.

Additional Excuses Policy

None.

Academic Integrity

Academic Integrity

Students are required to comply with the university policy on academic integrity found in the Code of Student Conduct found at http://policies.ncsu.edu/policy/pol-11-35-01

Academic Honesty

See http://policies.ncsu.edu/policy/pol-11-35-01 for a detailed explanation of academic honesty.

Honor Pledge

Your signature on any test or assignment indicates "I have neither given nor received unauthorized aid on this test or assignment."

Electronically-Hosted Course Components

There are no electronically-hosted components for this course.

Accommodations for Disabilities

Reasonable accommodations will be made for students with verifiable disabilities. In order to take advantage of available accommodations, student must register with the Disability Services Office (http://www.ncsu.edu/dso), 919-515-7653. For more information on NC State's policy on working with students with disabilities, please see the Academic Accommodations for Students with Disabilities Regulation at http://policies.ncsu.edu/regulation/reg-02-20-01.

Non-Discrimination Policy

NC State University provides equality of opportunity in education and employment for all students and employees. Accordingly, NC State affirms its commitment to maintain a work environment for all employees and an academic environment for all students that is free from all forms of discrimination. Discrimination based on race, color, religion, creed, sex, national origin, age, disability, veteran status, or sexual orientation is a violation of state and federal law and/or NC State University policy and will not be tolerated. Harassment of any person (either in the form of quid pro quo or creation of a hostile environment) based on race, color, religion, creed, sex, national origin, age, disability, veteran status, or sexual orientation also is a violation of state and federal law and/or NC State University policy and will not be tolerated. Retaliation against any person who complains about discrimination is also prohibited. NC State's policies and regulations covering discrimination, harassment, and retaliation may be accessed at http://policies.ncsu.edu/policy/pol-04-25-05 or http://www.ncsu.edu/equal_op/. Any person who feels that he or she has been the subject of prohibited discrimination, harassment, or retaliation should contact the Office for Equal Opportunity (OEO) at 919-515-3148.

Note on Recording

Please be advised this course is being recorded for current and potential future educational purposes. By your continued participation in this recorded course, you are providing your permission to be recorded.

Course Schedule

NOTE: The course schedule is subject to change.

Click here for the detailed schedule.