A Movie Query System
A Movie Query System
Desired Features of a Movie Database
Using Lists to Store Movies
Representing Individual Movies
The Movie Constructor
Movie List Structure
Movie Selectors
Movie Selectors Using Procedural Abstraction
A Small Database
Using the Database
A Movie Filtering Predicate
Exercises
A Natural Language Interface
Example Interaction
Structure of the Query Loop
Getting the Query and Testing for Exit
Processing the Query
A Pattern/Action ADT
A List of Pattern/Action Pairs
The Structure of Query Processing
A Procedure to Process Queries: answer-by-pattern
Matching Patterns
The match? Procedure
Substituting for Wildcards
Using the apply Procedure
Returning Wild-card Substitutions
Extending the Capabilities
Matching Against an Option List
Scheme's list? Predicate and member Procedure
Updated matches?
Matching Examples
Updating the Pattern/Action Pairs