Programming Language Pragmatics (IT3005)

Welcome to Jenhui Chen's Fall 2005!
This page will be used to post all relevant material for this class, including web references, notes, homeworks, midterm and final specification, etc.

Textbook:

Michael L. Scott, Programming Language Pragmatics, Morgan Kaufmann, Academic Press, 2000.

Office Hours:

I will be in my Room through 10:00 am to 06:00 pm, Monday to Thursday. Note: it is always a good idea to send me a brief e-mail a couple of days in advance.

TA

The TA for this class is Spot & James. Their office hours are: Wednesday, from 2pm to 5pm (Warning: this schedule may change). You can reach them via e-mail

Schedule

I give my powerpoint presentations, which you can find here.
Occasional deviations from the table below will be promptly documented on this page.

Topics

Reading

Slides

Preface None powerpoint

Introduction
Review of Regular languages

PLP: 1.1, 1.2, 1.3, 1.4, 1.5, 1.6

powerpoint

Lexical Analysis
Lex

PLP 2.1, 2.2
Lex & Yacc: 1, 2, 6

powerpoint

Syntax Analysis:
Context Free Languages,
LL(k) and LR(1) parsing

PLP: 2.1, 2.2, 2.3

General: powerpoint

Syntax Directed Translation
YACC

PLP: 2.3, 5.1-5.3
YACC: 4.9, 7.6
l & y 1,3,7,8


Translation & Yacc: powerpoint

Midterm Exam

 

Nov. 10, 2005

 

 

 

Names, Scopes, and Bindings

PLP: 3.1, 3.2, 3.3, 3.4, 3.5, 3.6

powerpoint

Control Flow PLP: 6.1, 6.2, 6.3, 6.4, 6.5, 6.6, 6.7, 6.8 powerpoint

Data Types & Type Systems

PLP: 7.1, 7.2, 7.3, 7.4, 7.5, 7.6, 7.7, 7.8, 7.10, 7.11, 7.12

powerpoint

Intermediate code
SPIM

not available

powerpoint

Runtime Environments

not available

powerpoint

Code Generation

not availabe

powerpoint

Code Optimization

not available

powerpoint

Final Exam & Review

 

Jan. 12, 2005

Lex's and Yacc's related materials:

You can learn more about regular expressions at the regular expressions info site.

The main topic of today is Lexical Analysis & Lex. You can lean about Lex (aside of course the Lex & Yacc book and the powerpoint presentation) from tutorials freely available on the web. This one is particularly concise: worth a look.

This page is dedicated to both Lex and Yacc: check out their on-line manuals. There is an another useful web site for your arbitrary questions.

Some other interesting topics about NP hard problems and P= ? NP. You can read on P/NP in the web site Wikipedia.

Homework 1:

You have to read a source file as input hwk1.txt, which is made by Prof. Chen. The text file contains many characters and symbols. As I mentioned in the class, you (of course, not `you' but your executable program) have to recognize each item (token) of the source file and produce a text file as your result named "result.txt". This result must include the recognition of which is noun, verb, adjective, adverb, proposition, pronoun, etc. Some other specifically required items such as ISBN ID, the hexadeciaml representation, telephone number, E-mail address, etc. are also included.
I also give you my first example of Lex, which can let the computer dynamically recognize your input sequence of lines. You can download it and make it via Lex tool and then compile it via the Linux's C compiler. Read it carefully and try to build your first runnable program ASAP, so that you can progress further. Here are Lex tutorial and Lex & Yacc user manual files for you too.
Due to the security policy of our LAB, of course, you have to use putty telnet tool to make a connection to our Linux Server.
Due Date: 06:00 pm, Monday, October 31, 2005. (a firm deadline)

Homework 2: Simple Calculator X (SCX)

In this homework, you have to write a simple calculator that can operate any one of the following operations:

Due Date: 06:00 pm, Monday, December 12, 2005. (a firm deadline)