Comparative Languages Assignments, Spring 2005

  • Student web pages
  • Syllabus: See CS 363 Comparative Languages, GMU, Dr. White
    1. Slides from CS 363:
    2. 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:

    1. Homework 1 Feb. 16
      Part 1: Do 1 (first part - parse tree), 2 (six strings), 3 (ambiguous grammar)
    2. Part 2: Do questions 4 and 5 from Homework 1 Feb. 18
    3. Homework 2: LR Parse Table, Scheme Exercises, see Handout.
    4. Homework 3: LR Parse Table, Scheme Exercises 2, see Handout.
      includes from the text, p. 186 5, 6: Using an LR Parsing table
    5. Homework 4: Exer. 1 - Gnu Smalltalk, Squeak Version
    6. Homework 5: Exer. 2: Squeak and Smalltalk short exercises.
    4th Quarter
    1. 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)
    2. Homework 2: Prolog Worksheet Warmups: see Xerox copies
        Run the "Practice goals" and answer the questions for:
        • Affordable journeys
        • Acyclic directed graph
        • Member
    3. Homework 3 - Static/Dynamic scopes, procedure activation records (Chap 9)
      Text version
      Help on activation records, dynamic and static links

    Programs:

    1. Program 1: Warmup programs Feb 11
    2. Program 2: Clock Patience, in Java (?) and/or language of your choice Feb 18
    3. Program 3: Recursive Descent Parsing Feb 25
    4. Program 4: Scheme Warmup programs
    5. Program 5: Scheme:Clock Patience, in Scheme, see the CS363 site for the assignment
      Help for Scheme version
    6. 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
    4th Quarter
  • Prolog
    1. Prog 1 Prolog assorted short programs
    2. Prog 2 River Crossing problem.
      Live picture snapped of Farmer trying to cross the river (taken several years ago)
    3. Prog 3: Prolog Version of Patience
    4. Prog 4 Map coloring in Prolog. Constraint Satisfaction problem
    5. Prog 5 Introductory ML short progs to write
    6. Prog 6: Producer Consumer Problem - Concurrent programming: semaphores, monitors, and message passing
    7. Prog 7: Do your own project in more than one language to compare

    Extra Program(s):

  • N-Queens in ML?