Comparative Languages Assignments, Spring 2005
Student web pages
Syllabus: See CS 363 Comparative Languages, GMU, Dr. White
- Slides from CS 363:
- Introduction (Ch. 1) Feb 4
- Survey of Languages (Ch. 2) Feb 9
- Language Syntax (Ch. 3, 4) Feb 11
- Sebesta Ch. 4 slides
- Java
- Names (Ch. 5),
Names with more examples
- Types (Ch. 6)
- Expressions/Assignment (Ch. 7)
- Control (Ch. 8)
- Semantics (Ch. 3.4, 3.5)
- Subprograms (Ch. 9)
- Functional Scheme (Ch. 15)
- Scheme, Smalltalk, Ruby, Python, Perl, Prolog, ML, CPP(STL), Java (unfinished)
- Logic programming,
Prolog
- Schedule from CS363
Helpful links from CS 363,
more helpful links,
and
also here
For those interested more on compilers, parsing, see
CS 540 slides at GMU,
Lex and Yacc
examples (flex and bison for us)
Homeworks:
- Homework 1 Feb. 16
Part 1: Do 1 (first part - parse tree), 2 (six strings), 3 (ambiguous grammar)
- Part 2: Do questions 4 and 5 from
Homework 1 Feb. 18
- Homework 2:
LR Parse Table, Scheme Exercises, see Handout.
- Homework 3:
LR Parse Table, Scheme Exercises 2, see Handout.
includes from the text, p. 186 5, 6: Using an LR Parsing table
- Homework 4:
Exer. 1 - Gnu Smalltalk,
Squeak Version
- Homework 5:
Exer. 2: Squeak and Smalltalk short exercises.
4th Quarter
- Homework 1 - Chap. 7, 8 + Scheme
- #1: Mixed mode arithmetic - see 7.4 (Ch. 7 Type conversions),
Short circuit evaluations - 7.6, Overloaded operators - 7.3,
Multiple selection statement - 8.2.2, goto - 8.4 (unconditional branching)
- Homework 2: Prolog Worksheet Warmups: see Xerox copies
Run the "Practice goals" and answer the questions for:
- Affordable journeys
- Acyclic directed graph
- Member
- Homework 3 - Static/Dynamic scopes, procedure activation records (Chap 9)
Text version
Help on activation records, dynamic and static links
Programs:
- Program 1: Warmup programs Feb 11
- Program 2: Clock Patience, in Java (?) and/or language of your choice Feb 18
- Program 3: Recursive Descent Parsing Feb 25
- Program 4:
Scheme Warmup programs
- Program 5: Scheme:Clock Patience, in Scheme, see the CS363 site for the assignment
Help for Scheme version
- ProgramB 5: GNUSmalltalk Version (gst) of Patience,
Squeak Smalltalk Version (inisqueak),
Gnu Smalltalk User's Guide + Class and Method Index
Squeak Class Reference,
Squeak Language Reference
- Smalltalk Practice exercises (not required, see Smalltalk exer. in Homework above) - writing functions in Smalltalk:
4th Quarter
Prolog
- Prog 1 Prolog assorted short programs
- Prog 2 River Crossing problem.
Live picture snapped of Farmer trying to cross the river (taken several years ago)
- Prog 3: Prolog Version of Patience
- Prog 4 Map coloring in Prolog. Constraint Satisfaction problem
- Prog 5 Introductory ML short progs to write
- Prog 6: Producer Consumer Problem - Concurrent programming: semaphores, monitors, and message passing
- Prog 7: Do your own project in more than one language to compare
Extra Program(s):
N-Queens in ML?