The query file will be case insensitive. Any lines preceeded with // will be considered comments and will be ignored. Whitespace is ignored. The query file contains only comments and queries.
A query consists of the following:
1) The keyword Query
2) The head of the query which is the name and then one or more
arguments in parenthesis e.g. Foo(x,y)
3) the symbol <=>
4) a body which consists of 1 or more relations separated by
semicolons. All of these relations must be in the ontology file given
to the agent.
5) a period
Note: because of the unstability of some information sources on the internet, it's possible that one or more of the class wrappers required to answer some of these queries may break making it impossible to answer that query. If your program can not answer a query and you've determined that a broken wrapper is at fault, please email saia@cs.washington.edu with the name of the query and the wrapper and I will either put up a new query or see about fixing the wrapper.
The queries:
//**Given Queries*** //Find all reviews of the movie(s) Godzilla Query Godzilla(url) <=> review-of("Godzilla",url). //Find the year and title of all movies starring "Divine" andher role in these movies Query Divine(movieTitle, year, role) <=> actor-of(movieTitle, "Divine", role); year-of(year, movieTitle). //Find the artists who play on the soundtrack of the movie(s) "Stranger than Paradise" Query STP(artist) <=> soundtrack-of(movieTitle, musicTitle); plays-on(musicTitle, artist). //Find titles of all books by James Joyce Query Joyce(bookTitle) <=> author-of(bookTitle,"James Joyce"). //Find the price of all videos starring "Harrison Ford" Query Ford(video-price) <=> actor-of(movieTitle, "Harrison Ford", role); price-of( movieTitle, s, f, video-price ). //***Shabe Group Queries*** //Get Sheet Music Books of Artist "Mariah Carey" published in the year //"1997" MariahCarey97(title) <=> author-of(title, "Mariah Carey"); year-of(title, "1997"). //Find the year and title and review of all movies starring "Mel Gibson" and //co-starring "Danny Glover" MelAndGlen(title, year, url) <=> actor-of(title, "Mel Gibson", role); actor-of(title, "Danny Glover", role); year-of(title, year); review-of(title,url). //Find all music titles on which "Phil Collins" plays with "Nathan East" PhilNick(title) <=> plays-on(title, "Phil Collins"); plays-on(title, "Nathan East"). //Find year and title of all books by "Erle Stanley Gardner" PerryMason(title, year) <=> author-of(title,"Erle Stanley Gardner"); year-of(title, year). //Find reviews of movies starring "Pierce Brosnan" Brosnan(url) <=> review-of(title,url); actor-of(title,"Pierce Brosnan", role). //***TeamAI group queries*** //Madonna1 returns all the title, store and price information for all the movies that //Madonna has acted in. Query Madonna1(title, store, price) <=> actor-of(title, "Madonna", role); price-of(title, store, format, price). //Gibson1 returns the address of the Seattle theatres where a Mel Gibson movie is being //played along with the title of the movie. Query Gibson1(title, address) <=> actor-of(title, "Mel Gibson", Role); shows-in(title, "Seattle", "Washington", theatre, time); address-of(theatre, address). //Grisham1 returns the title, price and store of videos of all the movies based on John //Grisham's novels. Query Grisham1(title, price, store) <=> book-of(title, b-title); author-of(b-title, "John Grisham"); price-of(title,store,format,price). //Hanks1 returns all the movies, catagories and roles in which Tom Hanks has won an oscar. Query Hanks1(title, category, role) <=> oscar(category, "Tom Hanks", title, year); actor-of(title, "Tom Hanks", role). //G1 returns the title and review urls of all the G movies released in 1984. Query G1(title, url) <=> year-of(title, "1984"); movieInfo(title, "G", duration, movie-category); review-of(title, url). //***House Blend queries*** // Find street maps to all theaters in Seattle Query MAPS( map ) <=> address-info( Adr, "Seattle", "WA" ); address-of( Th, Adr ); map-of( Adr, map ). // Find reviews of all movies playing at // theaters in Seattle Query REVS( M, R ) <=> shows-in( M, "Seattle", "WA", Th, Tm ); address-of( Adr, Th ); address-info( Adr, "Seattle", "WA" ); review-of( M, R ). // Find Stores, Titles, Formats, Prices of // movies for sale, if they are currently // playing in Detroit Query SELL( S, T, F, P ) <=> price-of( T, S, F, P ); shows-in( T, "Detroit", "MI", Th, Tm ). // Find Formats available for videos of // movies that are playing in Orono, Maine Query FORMS( V, F ) <=> price-of( V, S, F, P ); shows-in( V, "Orono", "ME", Th, Tm ). // Find directors and movies playing at // theaters in Corpus Christi Query DIRS( T, D ) <=> shows-in( T, "Corpus Christi", "TX", Th, Tm ); address-info( Adr, "Corpus Christi", "TX" ); address-of( Th, Adr ); director-of( T, D ). //***iMIB queries*** // 1. find author of movie Roots Query AuthorFromMovie( auth ) <=> book-of("Roots", bkTitle ); author-of(bkTitle, auth ). // 2. find all interesting data about Titanic Query TitanicInfo( songname, direc, produc, rating, duration, movieCat ) <=> director-of("Titanic", direc); producer-of("Titanic",produc ); song-on("Titanic", songname); movieInfo("Titanic", rating,duration, MovieCat). // 3. find studio name to all movies with the name "The" -ha,ha,... Query TheMoviesStudio( studioName ) <=> movieStudio("The",studioName). // 4. Find soundtrack to Deep Impact Query DeepImpactSoundTrack( soundtr ) <=> soundtrack-of("Deep Impact",soundtr). // 5. find all titles Madonna as performed Query MadonnaTitles( titles ) <=> plays-on(Music-title,"Madonna"). //***Superfinder*** //1. Find all theaters and time, showing in Seattle-area, WA //of the movie Deep Impact Query DImpact(City,State,Theatre,Time) <=> shows-in("Deep Impact",City,State,Theatre,Time). //2. Find all theaters and time, showing in Seattle-area, WA, //and all reviews of the movie Deep Impact Query DImpact(Theatre,Url) <=> shows-in("Deep Impact",City,State,Theatre,Time); review-of("Deep Impact",Url). //3. Find all theaters in Seattle-area, WA, //all reviews of, and movies starting Meg Ryan. Query Ryan(Movie-title,Theatre,Url) <=> actor-of(Movie-title, "Meg Ryan", Role); year-of(Movie-title,Year); shows-in(Movie-title,City,State,Theatre,Time); review-of(Movie-title,Url). //4. Find all books and price written by George Lucas. Query Lucas(Book-title,Price) <=> author-of(Book-title, "George Lucas"); price-of(Book-title,"Book Site",Format,Price). //5. Find all Movies and Years that Anthony Hopkins won Oscars for. Query Hopkins(Movie-title,OscarCategory,Year) <=> actor-of(Movie-title, "Anthony Hopkins", Role); year-of(Movie-title,Year); oscar(OscarCategory, Person-name, Movie-title, Year). //***Queries for the heuristics*** //Find films directed by Alfred Hitchcock where the movie is based //on a book and there is a soundtrack of the movie: Query AHFilm(film,book) <=> director-of(film,"Alfred Hitchcock"); book-of(film,book); soundtrack-of(film, musictitle). //Find actors of all movies where the director of the movie was //also the producer and where the movie was released in 1995: Query Actor1995(actor,movie,r) <=> actor-of(movie,actor,r); director-of(movie,Z); producer(movie,Z); year-of(movie,"1995"). //Find the names of performers of music from the soundtracks of movies that //were released in 1997 and in which the director also acted. Query Performer(person,movie) <=> soundtrack-of(movie,music); plays-on(music,person); year-of(movie,"1997"); director-of(movie,x); actor-of(movie,x,role). //Find books written by actors that have won oscars and also directed movies. Query Books(actor,book) <=> author-of(book,actor); oscar(cat,actor,movie,year); actor-of(movie,actor,role); director-of(m,actor). //Find all songs on soundtracks of movies that won oscars in 1997. Query Songs(Song-name,Movie-Title) <=> oscar(Oscar-category, Person-name, Movie-title, Year); year-of(Movie-title,"1997"); soundtrack-of(Movie-title, Music-title); song-on(Music-title, Song-name). //***BJ Group // DoubleOscar // Who won an Oscar in both 1993 and 1994? Query DoubleOscar(a) <=> oscar(z, a, t2, "1994");oscar(r, a, t1, "1993"). // MelGibsonRole.qry // Find all the movies and roles that Mel Gibson starred in. Query MelGibsonRole(t, ro) <=> role-in-movie(t, "Mel Gibson", ro). // CrossroadsCobbleHill.qry // Find all the movies that are showing in both Crossroads, Belleuve // and Cobble Hill, New York. Query CrossroadsCobbleHill(t) <=> shows-in(t, "Bellevue", "WA", "Crossroads", st1); shows-in(t, "New York", "NY", "Cobble Hill Cinemas", st2). // Crossroads.qry // Get review for movies showing at Crossroads Query Crossroads (t,u) <=> shows-in(t, "Bellevue", "WA", "Crossroads", time); year-of(t, "1998"); review-of(t, u). // OscarAtCrossroads.qry // Get the movies currently showing in Crossroads // with an Oscar winner from 1987. Query Oscar87WinnerNowAtCrossroads(p, t) <=> oscar(oc, p, ot, "1987"); role-in-movie(t, p, mrole); shows-in(t, "Bellevue", "WA", "Crossroads", stime).