MCS-177 Project: Movie Query System
Problem
In this project, you will fill out a program that uses a natural language
interface with a database of movies by working through section 7.6 of the
text. There are two major parts to this project. One is to
write the procedures you need to search through the database. The
second is to finish the implementation of the natural language interface.
For this project, you will work in groups of two (with perhaps one
group of three, should that prove necessary due to an odd number of
students). You may not work with the same partner as Project 2: Sum
of Divisors. Because your partner is counting on you,
attendance at lab is mandatory; we will take
roll.
We warn you that working in a group of two does not mean that your
work load will be halved; in fact, some groups may find that the
amount of hassle will effectively increase the work. Our intention is
that you gain experience in working in teams, since teamwork is very
common in today's workplace. You should have a clear understanding of
each other's responsibilities, and be dependable and punctual in
carrying them out. Also, be sure that neither partner monopolizes the
work, but rather that you share it as equally as possible. Finally, we
strongly encourage you to set up a group meeting with a lab instructor
after your second day of working together in lab (Tuesday, November 21),
so that we can assess how the project is going and, if need be,
suggest strategies for more successfully working together.
Project Report
As usual, write up a lab report that explains the project to an
audience generally knowledgeable about Scheme and such, but ignorant of
specifically what you did. Answer all of the questions posed, but do not
simply write up your lab as a sequence of exercises. Instead, try to convey
the big picture of what you accomplished. Remember, there are some tips
in the document entitled
Suggestions
for clear lab reports in computer science courses.
Computer Exercises
You are required to do exercises 7.22-7.32 (except for 7.28) for the project,
and you may additionally do as many of exercises 7.33-7.38 as you have
time and interest. You should probably do exercise 7.34 before exercise
7.35, but otherwise the optional exercises are independent of one another,
so you can generally do any of them without having done the preceding ones.
The following is a breakdown of the exercises into related groups:
- Save the following file to somewhere in your directory:
~mc27/labs/movie-queries/movie.scm
and then evaluate everything in it. This file contains the main procedures
for the movie query system from section 7.6, commented and organized for
your ease of understanding.
- Work on exercises 7.22-7.24 on pages 189-190 during the first lab day.
These exercises will give you practice manipulating lists using
filter and map. You do not yet have to work with the
movie query system.
- Next do exercises 7.25-7.27 on pages 196-197. These exercises deal with
the basics of the query system. Note that you can't actually test your
solution to exercise 7.25 using the query-loop until you reach exercise
7.27. However, other than this you should test as you go. As the text of
exercise 7.26 remarks, you should test each procedure independently rather
than only in the context of the overall query-loop.
- The final required part of the lab is exercises 7.29-7.32. For these exercises
you'll want to use the second version given in the text of the pattern/action
list and the
matches? procedure. The second of these versions
is commented out at the bottom of the movie.scm file.