The Library Information Search Teller is an automated simulation of a librarian. Ultimately, LIST will be able to fine people who have overdue books, recommend books based on the history of the books borrowed by the user, and answer questions that any patron may have. At this stage, LIST can only do the former two of the mentioned actions. LIST maintains a list of books with their author, title, subject, and call number. It also maintains a list of users with their name, address, and patron ID. In addition, LIST has a borrowed relation that tells it who has borrowed which book and when the books are due. LIST also maintains a database of the books each patron has borrowed.
| ?-send(Name,Street,Town,State,Zip,Author,Title,currentDate(12,13,2000),Fine).
Zip = 123456,
Fine = 200,
Name = name(doe,john),
Town = fineville,
Title = [introduction,to,insect,biology,and,diversity],
State = nj,
Author = author(daly,howell),
Street = [1,main,street] ?;
Zip = 123456,
Fine = 200,
Name = name(doe,john),
Town = fineville,
Title = [the,hound,of,the,baskervilles],
State = nj,
Author = author(doyle,arthur),
Street = [1,main,street] ?;
Zip = 456123,
Fine = 200,
Name = name(gomez,maria),
Town = springville,
Title = [the,adventures,of,sherlock,holmes],
State = nj,
Author = author(doyle,arthur),
Street = [32,kennedy,court] ? ;
Zip = 234561,
Fine = 200,
Name = name(wang,amanda),
Town = pleasantville,
Title = [christmas,carol],
State = nj,
Author = author(dickens,charles),
Street = [7,goodluck,place] ? ;
no
Recommending Books
LIST keeps a database of the books each user has borrowed. From this
database, LIST can recommend books by learning the user's favorite
subject and finding books with this subject. Here are some sample
queries and answers:
| ?- recommend(123456789,Title).
Title = [introduction,to,insect,biology,and,diversity] ?;
Title = [fundamentals,of,entomology] ? ;
Title = [the,economic,importance,of,insects] ? ;
no
| ?- recommend(789123456, Title).
Title = [pride,and,prejudice] ? ;
Title = [sense,and,sensibility] ? ;
Title = [persuasion] ? ;
Title = [emma] ? ;
Title = [mansfield,park] ? ;
Title = [northanger,abbey] ? ;
Title = [great,expectations] ? ;
Title = [christmas,carol] ? ;
Title = [oliver,twist] ? ;
Title = [a,tale,of,two,cities] ? ;
no
| ?- recommend(567891234, Title).
Title = [pride,and,prejudice] ? ;
Title = [sense,and,sensibility] ? ;
Title = [persuasion] ? ;
Title = [emma] ? ;
Title = [mansfield,park] ? ;
Title = [northanger,abbey] ? ;
Title = [great,expectations] ? ;
Title = [christmas,carol] ? ;
Title = [oliver,twist] ? ;
Title = [a,tale,of,two,cities] ? ;
no
| ?- recommend(456789123, Title).
Title = [the,murder,of,roger,ackroyd] ? ;
Title = [the,perils,of,poirot] ? ;
Title = [miss,marple,:,the,complete,short,stories] ? ;
Title = [masterpieces,of,murder] ? ;
Title = [and,then,there,were,none] ? ;
Title = [the,adventures,of,sherlock,holmes] ? ;
Title = [the,hound,of,the,baskervilles] ? ;
no