cal poly - cs311 -- fall 2007

5

Click here to load reader

Upload: pomonaskater1992

Post on 13-Apr-2017

104 views

Category:

Education


3 download

TRANSCRIPT

Page 1: Cal poly  - cs311 -- fall 2007

7/22/15 4:35 PMCal Poly -- CS311 -- Fall 2007

Page 1 of 5file:///CSUPomonaARC/cs311fall2007/index.html

CS 311 Language Translation and Automata (4 units)

Introduction to language translation. Regular expressions. Finite automata. Lexical analysis. Context-freegrammars and push down automata. Syntax analysis. 4 lectures/problem-solving. Prerequisites: CS241 andCS264 with grades of C or better, or consent of instructor.

Cal Poly Pomona - CS311 - Fall 2007

Prof. John [email protected] Science DepartmentCalifornia State Polytechnic UniversityPomona, California, USA

RELOAD this page EACH VISIT in order to view recent updates ...

Course Data

Time: MW 4-6 PM Place: 8 302 Office & Hours: MW 3-4 Grading: 8 quizes (Wednesdays on weeks 3 - 10) 60% and final 40%.

Textbook -- Theory

J. Martin, Introduction to Languages and the Theory of Computation, 3rd ed., McGraw Hill, 2003.

Practical Resources -- Implementation

ANTLR v3 provides a methodology for parsing inputs whose theoretical syntactic structures are studied inthis course (and more ...).

CS311 ScheduleWeek Mon Wed

1 Sep. 24 Sep. 26

2 Oct. 1 Oct. 3

3 Oct. 8 Oct. 10Quiz1

4 Oct. 15 Oct. 17

Page 2: Cal poly  - cs311 -- fall 2007

7/22/15 4:35 PMCal Poly -- CS311 -- Fall 2007

Page 2 of 5file:///CSUPomonaARC/cs311fall2007/index.html

Quiz2

5 Oct. 22 Oct. 24Quiz3

6 Oct. 29 Oct. 31Quiz4

7 Nov. 5 Nov. 7Quiz5

8 Holiday Nov. 14NO Quiz

9 Nov. 19 Nov. 21Quiz6

10 Nov. 26 Nov. 28Quiz7

11 FINAL EXAM :-)

Week 1

I am attending a conference in Macau, China (near Hong Kong), presenting a research paper at ICTAC'07 on"Skolem machines" (Colloquium paper). The first regular, in-class lecture will be on Monday, October 1.

A. Reading assignment: §1.5 of the Martin textbook. Try the following homework problems: 1.38 through1.47 (on pgs. 37 and 38).

B. Read §3.2 of the Martin textbook. More of Chapter 3 next week.

C. Locate the "regex" package in the Java documentation. Quickly read the class descriptions for the classesin this package. The package has classes and methods for specifying regular expressions and matching themagainst strings (which is content of Chapter 3 of Martin text). More about this next week.

D. Click on the ANTLR link above and browse around there. Try to anticipate what this is about, eventhough first reading may be somewhat obscure (no matter ;-).

Week 2

Chapter 3. Problems #3.1 through 3.10.

Week 3

Problems #3.19, 3.20, 3.43 and 3.46

Page 3: Cal poly  - cs311 -- fall 2007

7/22/15 4:35 PMCal Poly -- CS311 -- Fall 2007

Page 3 of 5file:///CSUPomonaARC/cs311fall2007/index.html

Quiz on Wednesday: Given simple language description, find a regular expression for the language and drawa FA to accept it.§3.5, constructions for union, intersection, difference of regular languages. Problem #3.33. Start Chapter 4, definition of NFA, convert NFA to DFA(FA).Problems #4.2, 4,10.

Week 4

Monday: Hand back Quiz#1 & discussion. Homework problems from last week. Introduction to NFAs withempty transitions. Homework problems #4.13, 4.16, 4.17, 4.20.

Wednesday: Quiz#2 -- one problem regarding "distinguishable strings", one problem converting NFA toDFA.Converting NFA-! to NFA. Homework problems: #4.28, 4.29. Motivation for Kleene's theorem.

Week 5

Monday: Hand back Quiz#2 & discussion.. Worked problems (from assignments last week). Kleene's Theorem (part 1), Problems #4.35, 4.36, 4.37.

Wednesday: Quiz#3. Two problems: a) !-elimination {one of #4.29(a-e)}, b) another NFA-->DFA usingsubset construction.Kleene's Theorem (part 2), Problem #4.38.

Week 6

Monday: Hand back Quiz#3 & discussion... Homework problems from chapter 4. This week we start Chapter 6 on context-free grammars. Topics from Chapter 5 will be worked in over thenext two weeks. For monday, read §6.1. Homework #6.1, 6.2, 6.4

Wednesday: Quiz#4 includes one problem like #4.36, and one problem like #4.38.Lecture (and examples) from §6.1, 6.2.

Week 7

Monday: Hand back Quiz#4.Discuss homework problems #6.1, 6.2, 6.4. Lecture on §6.3, 6.4

Page 4: Cal poly  - cs311 -- fall 2007

7/22/15 4:35 PMCal Poly -- CS311 -- Fall 2007

Page 4 of 5file:///CSUPomonaARC/cs311fall2007/index.html

Homework: #6.10 (a,b) draw NFAs, #6.11,6.12 (read), #6.13, #61.4, #6.15(read).

Wednesday: Quiz#5, one problem like #6.1(a-h), one problem FA <--> regular grammar.Lecture on ambiguity, ANTLR demo.

Week 8

Monday: CP Holiday ;-)

Wednesday: Hand back Quiz#5, discussion.NO QUIZ TODAY! Lecture on §6.6. Nullable variables demo (regarding Example 6.14, p.233).Unit productions demo (regarding Example 6.15, p.237).Chomsky Normal Form demo (regarding Example 6.16, p.239).Homework problems: #6.22, 6.26, 6.32, 6.34, 6.35, 6.39

Week 9

Monday: Homework problems from last week.Continue lectures on Chapter 7, PDAs. Homework problems: #7.4, 7.5, 7.8

Wednesday: Quiz#6 (one problem like 6.26, one like 6.39) More on PDAs.

Week 10

Monday: Hand back Quiz#6, discuss. Lecture on topics from Chapter 5, and converting LL(1) CFG to top-down parser using DPDA. Homework problem: #7.30 .

Quiz#7 takehome - due on Wednesday: #7.5.a (in textbook): Find a PDA for non-palindromes over {a,b}.Explain how your PDA works. Show your PDA's behavior on abbab (accept) and abbba (cannot accept) andabba (cannot accept).

Wednesday: Quiz#7 takehome due. Lecture: Some topics from Chapter 8. Review for final.

Final Exam

The final exam is Monday, December 3, 4-6 in 8/302. The final is comprehensive. It will have about 10 questions. The questions will be either problems to work,which are similar to the homework problems listed above and quiz problems, OR they might involvedefinitions of terms.

Page 5: Cal poly  - cs311 -- fall 2007

7/22/15 4:35 PMCal Poly -- CS311 -- Fall 2007

Page 5 of 5file:///CSUPomonaARC/cs311fall2007/index.html

Here is a FINAL STUDY TEMPLATE GUIDE ...