Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 4

CS400 Compiler Construction Dr.

Simon Lin

Quizzes & Assignments

Fall 2013
Version: 10/10/2013

Students: Please email slin@apu.edu your quizzes and assignments by their due dates. Thanks. =========================================================================. Quiz 6 for Week 6 assigned on 10/10/2013 Thursday, due 10/16/2013 Wednesday midnight Textbook page 151-152: (1) Given the NFA in Figure 3.29 (p 151), please show its equivalent DFA. (2) Given the NFA in Figure 3.30 (p 152), please show its equivalent DFA. =========================================================================. Quiz 5 for Week 5 assigned on 10/03/2013 Thursday, due 10/06/2013 Sunday midnight Textbook page 151-152: (3) Given the NFA in Figure 3.29 (p 151), describe its language by some examples (from shortest length to length 5), and then describe its language using regular expression. Lets call this NFA as NFA329. (4) Given the NFA329 (as given in last problem), please show its equivalent DFA. (5) Given the NFA in Figure 3.30 (p 152), describe its language by some examples (from shortest length to length 5), and then describe its language using some regular expressions. Lets call this NFA as NFA330. (6) Given the NFA330 (as given in last problem), try your best to show its equivalent DFA. =========================================================================. Assignment 2 (AG2) assigned on 9/26/2013 Thursday, due 10/22/2013 Tuesday (3.5 weeks) This is your term project phase 1. Please complete your requirement and high-level design of your minicompiler. For the requirement, you need to define the language and grammar for your super-minicompiler. One example will be (1) declaration of integer, (2) simple assignment statement, and (3) simple if statement. For the high-level design, you need to show at least 10 examples of your language, at least 3 parse trees for 3 simple programs (that are part of your language), and the structure of your symbol table. You need to decide your language tool, which can be Java, C++, or C. Please show your high-level design (i.e. algorithms, not pseudo-code) of your lexical analyzer, parser, and intermediate-code generator. You are not allowed to use Java Scanner class in your lexical analyzer. Please submit your WORD document by the due date. =========================================================================. Quiz 4 for Week 4 assigned on 9/26/2013 Thursday, due 9/29/2013 Sunday midnight Textbook page 125: Exercise 3.3.2: a), b), c) and d) only. [4 problems]
Describe the languages denoted by the following regular expressions: a) a(a|b)*a b) ( (|a)b*)* c) (a|b)*a(a|b)(a|b) d) a*ba*ba*ba*

=========================================================================. Quiz 3 for Week 3 assigned on 9/19/2013 Thursday, due 9/22/2013 Sunday midnight Textbook page 51: Exercise 2.2.1: a), b), and c). Exercise 2.2.2: a), b), and c) only. Exercise 2.2.3: for Exercise 2.2.2 a), b), & c) only. Exercise 2.2.4: a) only. You may be asked to share your answers or viewpoints to the class next week. ==========================================================================. Assignment 1 (AG1) assigned on 9/12/2013 Thursday, due 10/01/2013 Tuesday (2.5 weeks) Please do exercises 1.6.1, 1.6.2, 1.6.3, and 1.6.4 (total 4 problems) on page 35-36. They are block-structured code. Please enter those code to Java to verify that your
Page 1 of 4

CS400 Compiler Construction Dr. Simon Lin

Quizzes & Assignments

Fall 2013
Version: 10/10/2013

answers are correct. Please also show your code and output on your paper. =========================================================================.

Student Presentation Schedule for CS400 - Fall 2013:


Seq# Last Name, First Name

Presentation 1 (2 points) 2.1-2.3 3.1-3.2 3.3-3.4 3.5-3.6 4.1-4.2 4.3-4.4 on 9/17 on 9/24 on 9/24 on 10/01 on 10/22 on 10/22

Presentation 2 (2 points) 8.1-8.3 6.4-6.6 5.1-5.2 5.3-5.4 6.1-6.3 7.1-7.3 on 11/21 on 11/12 on 11/05 on 11/05 on 11/12 on 11/19

1 2 3 4 5 6

Cadieux, Nick Crary, Nathaniel Fu, David Yu-Liang Haggard, Russell Rivera, Tony Jose Strohm, Jeremy

Please prepare to present for about 20 minutes with about 15 slides. If you can email me your PPT slides 2 days before your presentation, you will get some bonus credit.
=====================================================================================.

Quiz 1 for Week 1 assigned on 9/05/2013 Thursday, due 9/11/2013 Wednesday midnight Textbook page 3: Exercise 1.1.1, 1.1.2, and 1.1.3 (3 problems). You may be asked to share your viewpoints to the class next week. Quiz 2 for Week 2 assigned on 9/10/2013 Tuesday, due 9/15/2013 Sunday midnight Textbook page 14-15: Exercise 1.3.1 (just one problem). ===========================================================================.
Grading Factors and Essentials: The algorithm to compute your total score is as follows: Activities %Points Notes / Detail / Due Date Exam 1 (Mid-term) 14 On Week 7. Covering all materials from week 1 to week 6 Exam 2 (Final Exam) 24 On Week 15. Covering all materials from week 1 to week 14 One point per quiz. There are 11 quizzes. Weekly Quizzes (QZ1-11) 11 Assignment 1 (AG1) 3 AG1: Assignment 2 (AG2) 3 AG2: Assignment 3 (AG3) 3 AG3: Must turn in a project document, and have a 15-minute project presentation (using Term Project (TPJ) 33
PowerPoints). Term project document is worth 26 points and presentation 7 points.

Class Presentation Exercises Faith Integration Paper (FIP) Total ==>

4 5 100

You will be assigned 2 parts to present in class. Self-learning practice. Faith Integration Paper (FIP) for a Discussion Topic due on Week 10. 49% for 2 exams & 11 quizzes, 42% for 3 assignments & term project, 9% for others.

Course Schedule: (subject to change without further notification) Week# Text Topics / Outlines Chapter Date 1. 09/05 0 Course Overview 2. 3. 09/10 09/12 09/17 1 2 Introduction A Simple Syntax-Directed Translator

Quiz / Homework Dues QZ1. QZ2. QZ3. Page 2 of 4 FIP assigned. AG1 assigned.

CS400 Compiler Construction Dr. Simon Lin Week# Date 09/19 09/24 09/26 10/01 10/03 10/08 10/10 10/15 10/17 10/22 10/24 10/29 10/31 11/05 11/07 11/12 11/14 11/19 11/21 11/26 11/28 12/03 12/05 12/10 Text
Chapter

Quizzes & Assignments

Fall 2013
Version: 10/10/2013

Topics / Outlines

Quiz / Homework Dues

4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15.

3 3 3

Lexical Analysis: Lexical Analyzer, Tokens Lexical Analysis: Lexical-Analyzer Generator, Finite Automata Lexical Analysis: Regular Expressions to Automata, Design of Lexical-Analyzer Generator Mid-term Review Mid-term Exam (2 hours) Syntax Analysis: Context-Free Grammars Parsing Techniques: Top-Down, Bottom-Up Syntax Analysis: LR Parsing, Ambiguous Grammar Parser Generators Syntax-Directed Translation Intermediate-Code Generation Run-Time Environment Code Generation Students Project Presentation (I) with early-bird bonus Thanksgiving HOLIDAY NO Class Students Project Presentation (II) Final Exam Review Final Exam (2 hours)

QZ4. QZ5. QZ6.

AG2 assigned. AG1 due. AG3 assigned.

1-3 4 4 5 6 7 8 Project Project

QZ7. QZ8. QZ9. QZ10. QZ11.

AG2 due.

FIP due AG3 due.

Term Project presentation & document due. Term Project presentation & document due.

Course Special Notes: (N1) Course Web Sites All the course information and resources will be made available through the APU Sakai Website: https://sakai.apu.edu. (N2) E-Mail Every student must have an APU e-mail address. If you have any question about the course or need assistance, please contact the instructor in person, or by telephone during his/her office hours, or by e-mail at any time. (N3) Attendance Students are responsible for class attendance and for all the materials covered in class. Attendance is expected at every class session. (N4) Term Project: This term project has 7 phases or sub-projects to complete. Phase # Purpose Detail Description 1 Product Requirement Term project name (i.e., your product name) and its objective, purpose, and some attractive features (with some pictures) in one page maximum. 2 High-Level Design Also known as External Design Spec. Specification 3 Low-Level Design Also known as Internal Design Spec. Specification 4 Coding Using the language of your choice. 5 Testing Unit testing, Integration testing, System testing 6 Product Demo by At least 3 test runs for your product. Try to make your product very userSample Test Runs friendly, thus easy to use and sell. This part is like Users Manual for your product. (N5) Term Project Document Your project document is worth 26 points, and it must a) Have the requirement, high-level design, low-level design with algorithms for each critical module or issue, source code listings, and at least 3 test runs with their input and output displayed accordingly for each module (9 points), b) Have source code well-documented with block and line comments. (7 points), Page 3 of 4

CS400 Compiler Construction Dr. Simon Lin c)

Quizzes & Assignments

Fall 2013
Version: 10/10/2013

Be fully page-numbered by WORD processor, and be single-spaced with font size being 10, 11, or 12, and font being Times New Roman or Arial (2 points), d) Have a header and footer on each page. The header must contain your student id number, your name, course id with name, and your project name. The footer must contain todays date and page number in the format of Page n of max. (2 points) e) Have a bibliography to list all your reference books/papers/manuals, and have a Table-of-Contents (TOC) with each chapter heading pointing to its correct page number (1 point), f) Be submitted together with all your source programs, project document, and executable modules if any. (5 points) (N6) Term Project Presentation Your 15-minute project presentation is worth 7 points, and you must use Microsoft Power Points. Please try to present your term project in a way to sell your product and/or service. You may need to prepare about 20 some slides. (N7) Reading Assignments for Class Participation -- The students should read the chapters prior to the class in which the materials will be discussed. If you did not read the chapters ahead of time, you may not be able to participate with the class discussion or presentation. (N8)Turning in Assignments and Projects by their Due Dates -- Each assignment should be turned in by its due date. Late work (if accepted by the instructor) will be penalized 25% for each week late or portion thereof. Term project must be turned in by its due date with no exception. Please include your full name, course name, assignment number, and completion date on all the papers you turn in. (N9) Do NOT copy software from our computer systems unless the licensing of that software explicitly permits such copying. In that case, you must use that software in conformance with its licensing agreement. Many of the programs/tools that are used in our classes are available as Academic Editions for purchase from the Cougar Byte, which is the APU computer/book store on the main campus. (N10) Computer Languages for Term Project You may use Java, C, C++, or PHP. (N11) Professional and Web Resources: 1. Java reference - http://java.sun.com/docs/books/tutorial/ 2. Java reference - http://java.sun.com/docs/books/jls/ 3. Java reference - http://java.sun.com/javase/6/docs/api/ Special Policies for Teamwork Assignments The instructor may designate certain assignments as teamwork assignments. If every member of the team does a similar amount of work, every member of the team will receive the same grade. However, if the instructor perceives that there is an inequitable workload, then individual team members may receive more points, or fewer points, than other members. The decision to adjust the point distribution within a team is reserved for the instructor's discretion. Special Policies for Classroom Learning Learning is best achieved in an atmosphere where the passion for learning is encouraged and everyone has the opportunity to participate in classroom activities. There are six categories of student incivility that undermine this atmosphere. They are disengaged, disinterested, disrespectful, disruptive, defiant and disturbed behaviors. Actions that fall into these categories impede teaching and learning processes for all and will not be permitted. Scholarly disagreement with the instructor does not itself constitute incivility. Classroom actions that fall into one of these categories may result in dismissal from the class or the course. Special Policies for Laptops in the Classroom Students using laptops for other than course-related activities such as note taking or other instructor-directed use will not be permitted. With the advent of wireless available in campus classrooms, it has enabled student incivility as described above. Web browsing, chat, IM, and other non-course related laptop use are activities that are disengaged, disinterested, and disrespectful, as well as potentially disruptive to the learning atmosphere. The instructor reserves the right to ban the use of laptops, and inspect the students use of the laptop. Use of laptops to write lecture notes is permitted, and encouraged, but the student using their laptops for note-taking must email their notes to the instructor immediately upon completion of the lecture. Any failure to email their notes will result in a ban of the students use of their laptops in the classroom. This policy also applies to cell phones, iPhones, iPads, PDAs, BlackBerrys, and any other wireless or web-enabled gadgets. ==========================================================================================.

Page 4 of 4

You might also like