ITEC 460 - Translator Design and Construction - Spring 2018

Instructor: Dr. Okie, 219 Davis Hall

Phone: Office: 831-5992; Home: 951-7372 (Before 9:00 p.m., please)

Email: nokie (Feel free to send email. I'll reply as quickly as possible.)

Office Hours: M: 12-1; WF 9-10; TuTh: 10:30-11:30 and by appointment. You're welcome to come by at any time and if not busy I'd be glad to help you. You may want to check my complete schedule to see when my meetings and classes are normally held.

Content: This course provides an introduction to the field of programming language translators (ie compilers). In the course we will construct a working compiler that illustrates the fundamental concepts of real-world compilers, and we will see a particularly effective mixture of theory and practice because the theory strongly supports the creation of powerful compilation systems.

We should be able to cover selected sections in chapters 1-8 of the text. Some of what we cover will depend on your interests and your choices for the source and target languages for the compiler that you implement. Source language possibilities include a subset of Java or Ada, and for the intermediate and/or target languages, assembly languages for JVM byte code, LLVM, SPARC, and MIPS.

Implementation will be in Java using parser generator tools such as ANTLR, Coco/R, CUP, JFlex (a lexer generator), and SableCC.

Course Outcomes Students who complete the course will be able to:

  1. Analyze and write regular expressions and finite automata for a given language and write software that recognizes the language.
  2. Analyze and write a grammar for a context free language and write a recursive descent parser for a language.
  3. Describe and trace the operation of top-down and bottom-up parsing algorithms and describe their relative strengths.
  4. Use tools to create a compiler for a given language.

Required Text: Compilers: Principles, Techniques, & Tools, Second Edition, Aho, Lam, Sethi, and Ullman, Pearson Education (Addison Wesley), 2007, ISBN-10: 0-321-48681-1.

The errata for the text is here.

Some other good books:

Prerequisites: ITEC 352 and ITEC 380.

Course web page:

Per cent Activity
50 - 60 Programs, Homework, and In-class Activities
20 - 30 One or two in-class tests
20 Comprehensive final exam (10:15 a.m. - 12:15 p.m., Wednesday, May 2, 2018 )
100 Total

Attendance: Attendance is not required. You will find it much easier to make a good grade in the class if you come to class. You will not be allowed to make up any in-class activities that you miss. Good attendance and class participation will be to your benefit should your final grade for the course be on a borderline.

Laptops: Laptops and other electronic devices are not to be used during class unless you have permission. Research shows that multitasking hurts learning, and it is also distracting to others. Experience shows that electronic distractions typically lower a student's performance in the course by a full letter grade.

Program grading: My standard grading policy follows, but it may be modified some since you will be writing a compiler. Programs with compilation errors will normally receive a grade of 25 or less. Programs with runtime errors will normally receive a grade of 75 or less. Programs with incorrect results will normally receive a grade of 85 or less. Programs which do not use specified features will normally receive a grade of 85 or less.

Programming assignments should, of course, use appropriate style (e.g. use of white space, suitable variable names, and meaningful comments internal to your code and in headers to files and procedures). The documentation should include a header that includes your name, the date, a problem description, the language, the system, and instructions for compilation. Style is normally worth about 20%.

Program submission: Programs will be turned in using the submit command which will copy specified files to the submit directory. The submit command is being rewritten and so these instructions may change some. You should read the instructions for using submit. Note that submit is NOT the same as a dropbox. Remember that you can submit multiple times, but if you submit the same file twice, the later submission deletes any files with the same name that were submitted earlier. Remember that you must be on rucs for submit to copy the files to the correct directory. To access rucs, you should use a free secure shell client such as putty.   Remember that you can also use submit to query the files that you have successfully submitted.

Homework problems: Any homework assignments will be graded on correctnesss and completeness, as well as neatness, clarity, and grammar.

Late policy: My standard late policy follows, but it may be modified some since you will be writing a compiler. Unless otherwise specified, late homework will not normally be accepted. Programming assignments will normally have a 10% per day late penalty, up until when the assignment is graded.

Exams: In exceptional circumstances I may give permission to miss an exam if you contact me in advance. In such cases the weight of your final will be increased. Otherwise a missed exam will be worth 0 points.

Honor Code: This class will be conducted in strict observance of the Honor Code. Please refer to your Student Handbook for details of expected behavior.

Of course, all work that you submit for grading must be your own.  In relation to programs specifically, you may discuss with other students what task your program is supposed to accomplish.  However, you may not discuss how a program is to accomplish its task with anyone except me or an authorized tutor. Similarly, you may discuss with others how a feature of a language works, but you must not let anyone write code for your and you must not use someone else's solution as a basis for your own.

If you receive any help of any kind on an assignment (such as using a utility routine that you find in a book or on the web), then the work that you turn in must give credit for that help.

Please be aware that if I suspect that you have violated the Honor Code, then I will not hesitate to file charges with the Dean of Students Office.

Dr. Okie's Home Page